blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ad9a0ccc39f03f5eb1a94de1393a013f9bbff6f0 | 181843233675994f536372a05990a120c4e394e5 | /src/main/java/com/in28minutes/springboot/rest/example/springboot2jpawithhibernateandh2/StudentO.java | 896616f0c47554e70707a170748cb4e29316ac39 | [] | no_license | alexey-shek/spring-boot-2-jpa-with-hibernate-and-h2 | 33daa0564cbbf47b38df343eee38fd06bcbc5a56 | f1e13d0df6d45ac1390a4a9ba22257770e2f6547 | refs/heads/master | 2020-08-03T16:26:49.452239 | 2019-10-01T14:44:18 | 2019-10-01T14:44:18 | 211,813,292 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 791 | java | package com.in28minutes.springboot.rest.example.springboot2jpawithhibernateandh2;
public class StudentO {
private long id = System.nanoTime();
private String name;
private String passportNumber;
public StudentO(String name, String passport) {
this.id = id;
this.name = name;
this.passportNumber = passport;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassportNumber() {
return passportNumber;
}
public void setPassportNumber(String passportNumber) {
this.passportNumber = passportNumber;
}
}
| [
"[email protected]"
] | |
9dd1641d27978e779ad128cb4753fe9104d5d8ce | 428802dfcaac098ab9b97429b0367dfae9beaa88 | /src/main/java/net/codingarea/cloudbungeecmds/module/ProxyCommandsAPI.java | 94a9bffe8e34621dd14cfe43b6593917f2d734bd | [
"Apache-2.0"
] | permissive | KxmischesDomi/CloudProxyCommands | 74d6bc47f4bba715e94c41ca53f952a86720c783 | ec4e063f517a32d333218ac1e8dda690c192c104 | refs/heads/master | 2023-06-03T21:58:51.389306 | 2021-06-17T14:02:19 | 2021-06-17T14:02:19 | 372,967,457 | 3 | 0 | Apache-2.0 | 2021-06-05T12:40:43 | 2021-06-01T21:38:18 | Java | UTF-8 | Java | false | false | 1,491 | java | package net.codingarea.cloudbungeecmds.module;
import net.codingarea.cloudbungeecmds.messaging.MessagingHandler;
import net.codingarea.cloudbungeecmds.messaging.MessagingReceiver;
import net.codingarea.cloudbungeecmds.messaging.impl.receiving.CloudMessagingReceiving;
import net.codingarea.cloudbungeecmds.module.api.command.impl.ProxyConsoleCommandSender;
import net.codingarea.cloudbungeecmds.module.api.command.impl.ProxyPlayerCommandSender;
import net.codingarea.cloudbungeecmds.module.management.ProxyCommandManagement;
import org.jetbrains.annotations.NotNull;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicReference;
/**
* @author KxmischesDomi | https://github.com/kxmischesdomi
* @since 1.0
*/
public interface ProxyCommandsAPI {
AtomicReference<ProxyCommandsAPI> HOLDER = new AtomicReference<>();
AtomicReference<ProxyCommandManagement> MANAGEMENT = new AtomicReference<>();
default void loadCommandsModule() {
HOLDER.set(this);
MANAGEMENT.set(new ProxyCommandManagement());
MessagingHandler.initialize();
MessagingReceiver.HOLDER.set(new CloudMessagingReceiving());
}
default void unloadCommandsModule() {
MANAGEMENT.get().unregisterAllCommands();
}
ProxyConsoleCommandSender getConsoleCommandSender();
ProxyPlayerCommandSender getProxyPlayerCommandSender(@NotNull UUID uuid);
static ProxyCommandManagement getCommandsManagement() {
return MANAGEMENT.get();
}
static ProxyCommandsAPI getModule() {
return HOLDER.get();
}
} | [
"[email protected]"
] | |
c9b3c4b1fbe863b7bf84c72bf946507e5c432dfa | c988795800e8e6c8150657e03359e04160396be9 | /app/src/main/java/com/dh/perfectoffer/xutils/view/annotation/ViewInject.java | b105583563d768221978d86bc33ed1abb9937f9b | [] | no_license | caozhiou0804/perfectoffer | 740b194710d3ffc1641216626f7ca85133837ebc | 102a1c5c1300b66c0eaf13f3310eeccf57c0ab61 | refs/heads/master | 2020-12-25T09:28:30.567523 | 2016-08-08T01:43:21 | 2016-08-08T01:43:21 | 64,631,956 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,000 | java | /*
* Copyright (c) 2013. wyouflf ([email protected])
*
* 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.dh.perfectoffer.xutils.view.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ViewInject {
int value();
/* parent view id */
int parentId() default 0;
}
| [
"[email protected]"
] | |
e4be4deb073173172c1ad9d353a49e6f53a43a1c | 4df56bcdc06bd5e1dfe788b9b337a50911abfe75 | /chrome/android/javatests/src/org/chromium/chrome/browser/app/metrics/TabbedActivityLaunchCauseMetricsTest.java | dde3c8f5c919bd3512795fa68ee63268620fefd0 | [
"BSD-3-Clause"
] | permissive | Dr3xler/chromium | 54f33430525cec0e6da9efc45a2cbc60b4197b40 | 268e816f13aa8e06dbdb4f6b9a6d465b4d99480c | refs/heads/main | 2023-06-22T19:31:10.411169 | 2021-07-15T12:47:46 | 2021-07-15T12:47:46 | 386,290,191 | 0 | 0 | BSD-3-Clause | 2021-07-15T12:56:21 | 2021-07-15T12:56:21 | null | UTF-8 | Java | false | false | 11,627 | java | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.app.metrics;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.pressKey;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import android.app.Activity;
import android.app.SearchManager;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.test.runner.lifecycle.Stage;
import android.view.KeyEvent;
import androidx.test.filters.MediumTest;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.mockito.quality.Strictness;
import org.chromium.android.support.PackageManagerWrapper;
import org.chromium.base.ActivityState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ContextUtils;
import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.test.util.ApplicationTestUtils;
import org.chromium.base.test.util.Batch;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Criteria;
import org.chromium.base.test.util.CriteriaHelper;
import org.chromium.base.test.util.FlakyTest;
import org.chromium.base.test.util.JniMocker;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.LauncherShortcutActivity;
import org.chromium.chrome.browser.ServiceTabLauncher;
import org.chromium.chrome.browser.ServiceTabLauncherJni;
import org.chromium.chrome.browser.bookmarkswidget.BookmarkWidgetProxy;
import org.chromium.chrome.browser.document.ChromeLauncherActivity;
import org.chromium.chrome.browser.flags.ChromeSwitches;
import org.chromium.chrome.browser.searchwidget.SearchActivity;
import org.chromium.chrome.test.ChromeBrowserTestRule;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.ChromeTabbedActivityTestRule;
import org.chromium.chrome.test.util.ChromeApplicationTestUtils;
import org.chromium.network.mojom.ReferrerPolicy;
import org.chromium.ui.mojom.WindowOpenDisposition;
import org.chromium.url.GURL;
import java.util.Collections;
import java.util.List;
/**
* Integration tests for TabbedActivityLaunchCauseMetrics.
*/
@RunWith(ChromeJUnit4ClassRunner.class)
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
@Batch(Batch.PER_CLASS)
public final class TabbedActivityLaunchCauseMetricsTest {
private static final long CHROME_LAUNCH_TIMEOUT = 10000L;
@Rule
public final ChromeTabbedActivityTestRule mActivityTestRule =
new ChromeTabbedActivityTestRule();
@ClassRule
public static final ChromeBrowserTestRule sBrowserTestRule = new ChromeBrowserTestRule();
@Rule
public final JniMocker mJniMocker = new JniMocker();
@Rule
public MockitoRule mMockitoRule = MockitoJUnit.rule().strictness(Strictness.STRICT_STUBS);
@Mock
private ServiceTabLauncher.Natives mServiceTabLauncherJni;
private static int histogramCountForValue(int value) {
if (!LibraryLoader.getInstance().isInitialized()) return 0;
return RecordHistogram.getHistogramValueCountForTesting(
LaunchCauseMetrics.LAUNCH_CAUSE_HISTOGRAM, value);
}
@Test
@MediumTest
public void testMainIntentMetrics() throws Throwable {
final int count = histogramCountForValue(LaunchCauseMetrics.LaunchCause.MAIN_LAUNCHER_ICON);
mActivityTestRule.startMainActivityFromLauncher();
CriteriaHelper.pollInstrumentationThread(() -> {
Criteria.checkThat(
histogramCountForValue(LaunchCauseMetrics.LaunchCause.MAIN_LAUNCHER_ICON),
Matchers.is(count + 1));
});
ChromeApplicationTestUtils.fireHomeScreenIntent(mActivityTestRule.getActivity());
mActivityTestRule.resumeMainActivityFromLauncher();
CriteriaHelper.pollInstrumentationThread(() -> {
Criteria.checkThat(
histogramCountForValue(LaunchCauseMetrics.LaunchCause.MAIN_LAUNCHER_ICON),
Matchers.is(count + 2));
});
}
@Test
@MediumTest
public void testNoMainIntentMetricsFromRecents() throws Throwable {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
ApplicationStatus.ActivityStateListener listener =
new ApplicationStatus.ActivityStateListener() {
@Override
public void onActivityStateChange(
Activity activity, @ActivityState int newState) {
if (newState == ActivityState.CREATED) {
// Android strips FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY from sent intents,
// so we have to inject it as early as possible during startup.
activity.setIntent(activity.getIntent().addFlags(
Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY));
}
};
};
ApplicationStatus.registerStateListenerForAllActivities(listener);
final int mainCount =
histogramCountForValue(LaunchCauseMetrics.LaunchCause.MAIN_LAUNCHER_ICON);
final int recentsCount = histogramCountForValue(LaunchCauseMetrics.LaunchCause.RECENTS);
mActivityTestRule.startMainActivityFromIntent(intent, null);
CriteriaHelper.pollInstrumentationThread(() -> {
Criteria.checkThat(histogramCountForValue(LaunchCauseMetrics.LaunchCause.RECENTS),
Matchers.is(recentsCount + 1));
});
Assert.assertEquals(mainCount,
histogramCountForValue(LaunchCauseMetrics.LaunchCause.MAIN_LAUNCHER_ICON));
ApplicationStatus.unregisterActivityStateListener(listener);
}
@Test
@MediumTest
public void testLauncherShortcutMetrics() throws Throwable {
Intent intent = new Intent(LauncherShortcutActivity.ACTION_OPEN_NEW_INCOGNITO_TAB);
intent.setClass(ContextUtils.getApplicationContext(), LauncherShortcutActivity.class);
final int count = 1
+ histogramCountForValue(
LaunchCauseMetrics.LaunchCause.MAIN_LAUNCHER_ICON_SHORTCUT);
mActivityTestRule.startMainActivityFromIntent(intent, null);
CriteriaHelper.pollInstrumentationThread(() -> {
Criteria.checkThat(histogramCountForValue(
LaunchCauseMetrics.LaunchCause.MAIN_LAUNCHER_ICON_SHORTCUT),
Matchers.is(count));
});
}
@Test
@MediumTest
public void testBookmarkWidgetMetrics() throws Throwable {
Intent intent = new Intent();
intent.setClass(ContextUtils.getApplicationContext(), BookmarkWidgetProxy.class);
intent.setData(Uri.parse("about:blank"));
final int count =
1 + histogramCountForValue(LaunchCauseMetrics.LaunchCause.HOME_SCREEN_WIDGET);
mActivityTestRule.setActivity(ApplicationTestUtils.waitForActivityWithClass(
ChromeTabbedActivity.class, Stage.RESUMED,
() -> ContextUtils.getApplicationContext().sendBroadcast(intent)));
CriteriaHelper.pollInstrumentationThread(() -> {
Criteria.checkThat(
histogramCountForValue(LaunchCauseMetrics.LaunchCause.HOME_SCREEN_WIDGET),
Matchers.is(count));
}, CHROME_LAUNCH_TIMEOUT, CriteriaHelper.DEFAULT_POLLING_INTERVAL);
}
private static class TestContext extends ContextWrapper {
public TestContext(Context baseContext) {
super(baseContext);
}
@Override
public PackageManager getPackageManager() {
return new PackageManagerWrapper(super.getPackageManager()) {
@Override
public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) {
if (intent.getAction().equals(Intent.ACTION_WEB_SEARCH)) {
return Collections.emptyList();
}
return TestContext.super.getPackageManager().queryIntentActivities(
intent, flags);
}
};
}
}
@Test
@MediumTest
public void testExternalSearchIntentNoResolvers() throws Throwable {
final int count = 1
+ histogramCountForValue(
LaunchCauseMetrics.LaunchCause.EXTERNAL_SEARCH_ACTION_INTENT);
final Context contextToRestore = ContextUtils.getApplicationContext();
ContextUtils.initApplicationContextForTests(new TestContext(contextToRestore));
Intent intent = new Intent(Intent.ACTION_SEARCH);
intent.setClass(ContextUtils.getApplicationContext(), ChromeLauncherActivity.class);
intent.putExtra(SearchManager.QUERY, "about:blank");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
SearchActivity searchActivity = ApplicationTestUtils.waitForActivityWithClass(
SearchActivity.class, Stage.RESUMED, () -> contextToRestore.startActivity(intent));
onView(withId(R.id.url_bar)).perform(click());
ChromeTabbedActivity cta = ApplicationTestUtils.waitForActivityWithClass(
ChromeTabbedActivity.class, Stage.CREATED, null,
() -> onView(withId(R.id.url_bar)).perform(pressKey(KeyEvent.KEYCODE_ENTER)));
CriteriaHelper.pollInstrumentationThread(() -> {
Criteria.checkThat(
histogramCountForValue(
LaunchCauseMetrics.LaunchCause.EXTERNAL_SEARCH_ACTION_INTENT),
Matchers.is(count));
}, CHROME_LAUNCH_TIMEOUT, CriteriaHelper.DEFAULT_POLLING_INTERVAL);
ApplicationTestUtils.finishActivity(cta);
ApplicationTestUtils.finishActivity(searchActivity);
ContextUtils.initApplicationContextForTests(contextToRestore);
}
@Test
@MediumTest
@FlakyTest(message = "https://crbug.com/1224738")
public void testServiceWorkerTabLaunch() throws Throwable {
final int count = 1 + histogramCountForValue(LaunchCauseMetrics.LaunchCause.NOTIFICATION);
mJniMocker.mock(ServiceTabLauncherJni.TEST_HOOKS, mServiceTabLauncherJni);
mActivityTestRule.setActivity(ApplicationTestUtils.waitForActivityWithClass(
ChromeTabbedActivity.class, Stage.RESUMED, () -> {
ServiceTabLauncher.launchTab(0, false, new GURL("about:blank"),
WindowOpenDisposition.NEW_FOREGROUND_TAB, "", ReferrerPolicy.DEFAULT,
"", null);
}));
CriteriaHelper.pollInstrumentationThread(() -> {
Criteria.checkThat(histogramCountForValue(LaunchCauseMetrics.LaunchCause.NOTIFICATION),
Matchers.is(count));
}, CHROME_LAUNCH_TIMEOUT, CriteriaHelper.DEFAULT_POLLING_INTERVAL);
}
}
| [
"[email protected]"
] | |
3adf9e49547dd82a9a4257aa09012526d4af7642 | 7130e47450bd80f35c7213c88a737e639d329e6f | /wxxr-mobile-net/src/main/java/com/wxxr/mobile/core/rpc/rest/CookieHeaderDelegate.java | 1082781ea2759aa5054efb7ef7a8432f5cd59d0c | [] | no_license | wxynick/framework | 983be31104b360008a2d36565bc82d74b82804fc | 93b5fe0c3e40ad434325b1755d0b1be5255977ac | refs/heads/master | 2016-09-06T18:33:32.119410 | 2014-04-04T11:52:21 | 2014-04-04T11:52:21 | 9,125,521 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,115 | java | package com.wxxr.mobile.core.rpc.rest;
import com.wxxr.javax.ws.rs.core.Cookie;
import com.wxxr.javax.ws.rs.ext.RuntimeDelegate;
/**
* @author <a href="mailto:[email protected]">Bill Burke</a>
* @version $Revision$
*/
public class CookieHeaderDelegate implements RuntimeDelegate.HeaderDelegate
{
public Object fromString(String value) throws IllegalArgumentException
{
if (value == null) throw new IllegalArgumentException("Cookie header value was null");
try
{
int version = 0;
String domain = null;
String path = null;
String cookieName = null;
String cookieValue = null;
String parts[] = value.split("[;,]");
for (String part : parts)
{
String nv[] = part.split("=", 2);
String name = nv.length > 0 ? nv[0].trim() : "";
String value1 = nv.length > 1 ? nv[1].trim() : "";
if (value1.startsWith("\"") && value1.endsWith("\"") && value1.length() > 1)
value1 = value1.substring(1, value1.length() - 1);
if (!name.startsWith("$"))
{
cookieName = name;
cookieValue = value1;
}
else if (name.equalsIgnoreCase("$Version"))
{
version = Integer.parseInt(value1);
}
else if (name.equalsIgnoreCase("$Path"))
{
path = value1;
}
else if (name.equalsIgnoreCase("$Domain"))
{
domain = value1;
}
}
return new Cookie(cookieName, cookieValue, path, domain, version);
}
catch (Exception ex)
{
throw new IllegalArgumentException("Failed to parse cookie string '" + value + "'", ex);
}
}
public String toString(Object value)
{
Cookie cookie = (Cookie) value;
StringBuffer buf = new StringBuffer();
ServerCookie.appendCookieValue(buf, 0, cookie.getName(), cookie.getValue(), cookie.getPath(), cookie.getDomain(), null, -1, false);
return buf.toString();
}
} | [
""
] | |
6029e6e5d8dfd932af454ba99705f1c4f84392d1 | 381325a109e35a67425dedfc9973da4a6b83959c | /vm-common/.svn/pristine/b1/b104ded44b1a72156fc12e4caecced0bf4cb4b9c.svn-base | a2c229e309087b7884b5ba35af67579423441402 | [] | no_license | ShangfengDing/IaaS | 213287571e2ba3c06814565fbb229ef9c964a91a | 89d7120ceac53d22520e353325f193c7cdf3a6ff | refs/heads/master | 2022-12-22T21:01:06.596557 | 2019-11-07T13:12:14 | 2019-11-07T13:12:14 | 220,217,355 | 0 | 1 | null | 2022-12-16T04:01:46 | 2019-11-07T11:07:33 | JavaScript | UTF-8 | Java | false | false | 1,129 | /**
* File: AppRouterError.java
* Author: weed
* Create Time: 2012-11-26
*/
package appcloud.common.errorcode;
import appcloud.common.annotation.ErrorAnnotation;
/**
* @author weed
*
*/
public enum AREC{
@ErrorAnnotation(msg="成功。")
NO_ERROR,
@ErrorAnnotation(msg="类型错误。")
TYPE_ERROR,
@ErrorAnnotation(msg="源地址不存在。")
SRC_NOT_EXIST,
@ErrorAnnotation(msg="批量接口参数中存在多个源地址。")
MULTI_SRC,
@ErrorAnnotation(msg="目标地址不存在。")
DST_NOT_EXIST,
@ErrorAnnotation(msg="批量接口参数中目标地址重复。")
DUPED_DST,
@ErrorAnnotation(msg="只能指向一个app的域名。")
NONAPP_DST,
@ErrorAnnotation(msg="不支持跨域的域名指向。")
SUFFIX_CROSSED,
@ErrorAnnotation(msg="路由项已存在。")
RE_EXISTED,
@ErrorAnnotation(msg="路由项不存在。")
RE_NOT_EXIST,
@ErrorAnnotation(msg="要添加的域名已存在。")
DOMAIN_EXISTED,
@ErrorAnnotation(msg="要删除的域名不存在。")
DOMAIN_NOT_EXIST,
@ErrorAnnotation(msg="要更新的Nginx不存在。")
NGINX_NOT_EXIST,
;
}
| [
"[email protected]"
] | ||
581dfea3c2c9eabc554cdc544286bd1e68265ec1 | eac8ea1cb58bb7489ec89728f7c3758f84074094 | /src/main/java/com/project/sms/entities/promotion/IPromotionRepository.java | 3bb6b6157467c235cd359cd797d6ce7b36f75549 | [] | no_license | Solonaru/SMS | 24bd20f462adc1b36e0e5fb26bd10e110d254cbb | 5d553c6ad41af0e392767f86dedb53f4b81e231a | refs/heads/master | 2021-10-10T20:39:39.072432 | 2019-01-16T21:24:07 | 2019-01-16T21:24:07 | 157,060,738 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 191 | java | package com.project.sms.entities.promotion;
import org.springframework.data.repository.CrudRepository;
public interface IPromotionRepository extends CrudRepository<Promotion, Integer> {
}
| [
"[email protected]"
] | |
1b6f28bef99290ff934fc26fad1cf2079c0f35d9 | 1b4112fc36900d3a719b64861fd26722ee6eb5d9 | /src/extra/importsf/bicycle/Bicycle.java | 337680fd4779a37890119f18fcfd54130e590f77 | [] | no_license | jointheleague/Level-8-Examples | e96d4462bdc7d12824011162cdfae7452faf117a | a4893d84d07cfbd8eb74b8d22bbfbea5411defcd | refs/heads/master | 2023-09-05T17:31:50.313706 | 2021-11-02T00:04:47 | 2021-11-02T00:04:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 602 | java | package extra.importsf.bicycle;
import extra.importsf.vehicle.Vehicle;
import java.util.ArrayList;
import java.util.List;
import static extra.importsf.vehicle.Vehicle.*;
import static extra.importsf.vehicle.Airship.*;
public class Bicycle {
public static void main(String[] args) {
// makeNoise();
// System.out.println(canMove);
List<String> s1 = new ArrayList<>();
s1.add("apple");
s1.add("banana");
List<String> s2 = new ArrayList<>();
s2.add("apple");
s2.add("banana");
System.out.println(s1.equals(s2));
}
}
| [
"[email protected]"
] | |
a176967241590685af4d94e052403ed0326e9389 | d916d81af590535fa50a8042a97d9f5102878865 | /event-storming-classic/src/main/java/com/eventstorming/team/TeamRepository.java | 4e7208b9f10da371193910511f5663709c22565b | [
"MIT"
] | permissive | michalcholewinski/event-storming-board | 6dd91ff33a0360cbb126a8591998283001b77f37 | c53eef8af12f4dec345dc23184f1f9f2c7d3345a | refs/heads/master | 2020-07-09T19:29:36.109876 | 2019-09-15T11:36:02 | 2019-09-15T11:36:02 | 204,062,974 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 172 | java | package com.eventstorming.team;
import org.springframework.data.jpa.repository.JpaRepository;
public interface TeamRepository extends JpaRepository<TeamEntity, Long> {
}
| [
"[email protected]"
] | |
f886f4b35cb6904e71aa3d4d9283917af27a4f1d | 07ea79d4c00a990350886bdf0e490aed4ade58f6 | /src/networking/packets/lobby/LeavePacket.java | 287725d9888773e3c913d1f4b88726215153ef75 | [] | no_license | javierationmex/165-Group-Project | 7d373be190d8e42985b5532ca3a0bc761a0be6dd | 95ff0b0e2572b87f68de37d729cd4a016e676f87 | refs/heads/master | 2020-04-10T19:07:31.234890 | 2015-11-20T06:50:18 | 2015-11-20T06:50:18 | 31,390,743 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 349 | java | package networking.packets.lobby;
import networking.packets.IPacket;
import java.util.UUID;
/**
* Created by Max on 3/23/2015.
*/
public class LeavePacket implements IPacket {
private UUID ghostID;
public LeavePacket(UUID ghostID) {
this.ghostID = ghostID;
}
public UUID getGhostID() {
return ghostID;
}
}
| [
"[email protected]"
] | |
af7ac4ce11173a8f006ab30674ac63a0e3df9b47 | 3fd6e1d45a5b242eaa87372c899017fecc15f2f7 | /where/src/com/example/where/util/InternetService.java | f748aad494c6ee213458da3d29cac1ea1eeb5876 | [] | no_license | Fullhzr/homeWork | 2b2cca8216580724f84a0aa8167285109f360d93 | 20530a4e6e35c0e8fe765fbf5ae6faf8a4bb4340 | refs/heads/master | 2020-04-13T14:23:01.494379 | 2018-12-27T08:31:27 | 2018-12-27T08:31:27 | 163,261,057 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,372 | java | package com.example.where.util;
import java.lang.reflect.Method;
import java.util.List;
import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.content.Context;
import android.content.Intent;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiManager;
import android.provider.Settings;
public class InternetService {
private Boolean isOpenoldStateForGps;
private Context context;
private ConnectivityManager connManager; // 上网连接管理器
private WifiManager wifiManager; // wifi管理器
public Boolean getIsOpenoldStateForGps() {
return isOpenoldStateForGps;
}
public void setIsOpenoldStateForGps(Boolean isOpenoldStateForGps) {
this.isOpenoldStateForGps = isOpenoldStateForGps;
}
// 扫描出的网络连接列表
private List<ScanResult> mWifiList;
public InternetService(Context context) {
this.context = context;
connManager = (ConnectivityManager) this.context
.getSystemService(Context.CONNECTIVITY_SERVICE);
wifiManager = (WifiManager) this.context
.getSystemService(Context.WIFI_SERVICE);
}
/**
* @return 网络是否连接可用
*/
public boolean isNetworkConnected() {
NetworkInfo networkinfo = connManager.getActiveNetworkInfo();
if (networkinfo != null) {
return networkinfo.isConnected();
}
return false;
}
/**
* @return wifi是否连接可用
*/
public boolean isWifiConnected() {
NetworkInfo mWifi = connManager
.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
if (mWifi != null) {
return mWifi.isConnected();
}
return false;
}
/**
* 当wifi不能访问网络时,mobile才会起作用
*
* @return GPRS是否连接可用
*/
public boolean isMobileConnected() {
NetworkInfo mMobile = connManager
.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
if (mMobile != null) {
return mMobile.isConnected();
}
return false;
}
/**
* GPRS网络开关 反射ConnectivityManager中hide的方法setMobileDataEnabled 可以开启和关闭GPRS网络
*
* @param isEnable
* @throws Exception
*/
public void toggleGprs(boolean isEnable) throws Exception {
Class<?> cmClass = connManager.getClass();
Class<?>[] argClasses = new Class[1];
argClasses[0] = boolean.class;
// 反射ConnectivityManager中hide的方法setMobileDataEnabled,可以开启和关闭GPRS网络
Method method = cmClass.getMethod("setMobileDataEnabled", argClasses);
method.invoke(connManager, isEnable);
}
/**
* WIFI网络开关
*
* @param enabled
* @return 设置是否success
*/
public boolean toggleWiFi(boolean enabled) {
return wifiManager.setWifiEnabled(enabled);
}
// 检查当前wifi状态
public int checkWifiState() {
return wifiManager.getWifiState();
}
// 判断wifi是否打开
public boolean isWifiEnabled() {
return wifiManager.isWifiEnabled();
}
/*
* 获取wifi列表
*/
public List<ScanResult> getAllWifiList() {
wifiManager.startScan();
return mWifiList = wifiManager.getScanResults();
}
/*
* 判断网络是否开启
*/
public static boolean isWifi(Context context) {
ConnectivityManager cm = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkINfo = cm.getActiveNetworkInfo();
if (networkINfo != null
&& networkINfo.getType() == ConnectivityManager.TYPE_WIFI) {
return true;
}
return false;
}
/**
*
* @return 是否处于飞行模式
*/
public boolean isAirplaneModeOn() {
// 返回值是1时表示处于飞行模式
int modeIdx = Settings.System.getInt(context.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0);
boolean isEnabled = (modeIdx == 1);
return isEnabled;
}
/**
* 飞行模式开关
*
* @param setAirPlane
*/
public void toggleAirplaneMode(boolean setAirPlane) {
Settings.System.putInt(context.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, setAirPlane ? 1 : 0);
// 广播飞行模式信号的改变,让相应的程序可以处理。
// 不发送广播时,在非飞行模式下,Android 2.2.1上测试关闭了Wifi,不关闭正常的通话网络(如GMS/GPRS等)。
// 不发送广播时,在飞行模式下,Android 2.2.1上测试无法关闭飞行模式。
Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
// intent.putExtra("Sponsor", "Sodino");
// 2.3及以后,需设置此状态,否则会一直处于与运营商断连的情况
intent.putExtra("state", setAirPlane);
context.sendBroadcast(intent);
}
/**
* 判断GPS是否开启,GPS或者AGPS开启一个就认为是开启的
*
* @param context
* @return true 表示开启
*/
public static final boolean isOPen(final Context context) {
LocationManager locationManager = (LocationManager) context
.getSystemService(Context.LOCATION_SERVICE);
// 通过GPS卫星定位,定位级别可以精确到街(通过24颗卫星定位,在室外和空旷的地方定位准确、速度快)
boolean gps = locationManager
.isProviderEnabled(LocationManager.GPS_PROVIDER);
// 通过WLAN或移动网络(3G/2G)确定的位置(也称作AGPS,辅助GPS定位。主要用于在室内或遮盖物(建筑群或茂密的深林等)密集的地方定位)
boolean network = locationManager
.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
if (gps || network) {
return true;
}
return false;
}
/**
* 强制帮用户打开GPS
*
* @param context
*/
public static final void openGPS(Context context) {
Intent GPSIntent = new Intent();
GPSIntent.setClassName("com.android.settings",
"com.android.settings.widget.SettingsAppWidgetProvider");
GPSIntent.addCategory("android.intent.category.ALTERNATIVE");
GPSIntent.setData(Uri.parse("custom:3"));
try {
PendingIntent.getBroadcast(context, 0, GPSIntent, 0).send();
} catch (CanceledException e) {
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
a0533226b74b41f6dfd3f20ddace1e2d536ab1a1 | a36dce4b6042356475ae2e0f05475bd6aed4391b | /2005/julypersistenceEJB/ejbModule/com/hps/july/persistence/EJSJDBCPersisterCMPPIEReferenceBean_9693a3c8.java | e42604224870e49a4a463726b2784ea87a9ffca4 | [] | no_license | ildar66/WSAD_NRI | b21dbee82de5d119b0a507654d269832f19378bb | 2a352f164c513967acf04d5e74f36167e836054f | refs/heads/master | 2020-12-02T23:59:09.795209 | 2017-07-01T09:25:27 | 2017-07-01T09:25:27 | 95,954,234 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 12,751 | java | package com.hps.july.persistence;
import com.ibm.ejs.persistence.*;
import javax.ejb.EntityBean;
import java.sql.*;
/**
* EJSJDBCPersisterCMPPIEReferenceBean_9693a3c8
*/
public class EJSJDBCPersisterCMPPIEReferenceBean_9693a3c8 extends EJSJDBCPersister implements com.hps.july.persistence.EJSFinderPIEReferenceBean {
private static final String _createString = "INSERT INTO pie_reference (idreference, idplatinum, name, owner, p_status, sprav) VALUES (?, ?, ?, ?, ?, ?)";
private static final String _removeString = "DELETE FROM pie_reference WHERE idreference = ?";
private static final String _storeString = "UPDATE pie_reference SET idplatinum = ?, name = ?, owner = ?, p_status = ?, sprav = ? WHERE idreference = ?";
private static final String _loadString = "SELECT T1.idreference, T1.idplatinum, T1.name, T1.owner, T1.p_status, T1.sprav FROM pie_reference T1 WHERE T1.idreference = ?";
private static final String _loadForUpdateString = _loadString + " FOR UPDATE";
private static final String[] _predicateColumnNames = {"idplatinum", "name", "owner", "p_status", "sprav"};
private static final boolean[] _predicateMaps = {true, true, true, true, true};
private byte[] serObj = null;
/**
* EJSJDBCPersisterCMPPIEReferenceBean_9693a3c8
*/
public EJSJDBCPersisterCMPPIEReferenceBean_9693a3c8() throws java.rmi.RemoteException {
super(); }
/**
* postInit
*/
public void postInit() {
}
/**
* _create
*/
public void _create(EntityBean eb) throws Exception {
Object objectTemp = null;
PIEReferenceBean b = (PIEReferenceBean) eb;
PreparedStatement pstmt;
Object cacheData[] = new Object[5];
pstmt = getPreparedStatement(_createString);
try {
pstmt.setInt(1, b.idreference);
objectTemp = com.ibm.vap.converters.VapTrimStringConverter.singleton().dataFrom(b.idplatinum);
if (objectTemp == null) {
pstmt.setNull(2, java.sql.Types.CHAR);
}
else {
pstmt.setString(2, (java.lang.String)objectTemp);
}
cacheData[0] = objectTemp;
if (b.name == null) {
pstmt.setNull(3, java.sql.Types.VARCHAR);
}
else {
pstmt.setString(3, b.name);
}
cacheData[1] = b.name;
pstmt.setInt(4, b.owner);
cacheData[2] = new Integer(b.owner);
objectTemp = com.ibm.vap.converters.VapTrimStringConverter.singleton().dataFrom(b.pstatus);
if (objectTemp == null) {
pstmt.setNull(5, java.sql.Types.CHAR);
}
else {
pstmt.setString(5, (java.lang.String)objectTemp);
}
cacheData[3] = objectTemp;
objectTemp = com.ibm.vap.converters.VapTrimStringConverter.singleton().dataFrom(b.sprav);
if (objectTemp == null) {
pstmt.setNull(6, java.sql.Types.CHAR);
}
else {
pstmt.setString(6, (java.lang.String)objectTemp);
}
cacheData[4] = objectTemp;
pstmt.executeUpdate();
}
finally {
returnPreparedStatement(pstmt);
}
putDataIntoCache(cacheData);
}
/**
* hydrate
*/
public void hydrate(EntityBean eb, Object data, Object pKey) throws Exception {
Object objectTemp = null;
PIEReferenceBean b = (PIEReferenceBean) eb;
com.hps.july.persistence.PIEReferenceKey _primaryKey = (com.hps.july.persistence.PIEReferenceKey)pKey;
java.sql.ResultSet resultSet = (java.sql.ResultSet) data;
int tempint;
b.idreference = _primaryKey.idreference;
b.idplatinum = (java.lang.String)com.ibm.vap.converters.VapTrimStringConverter.singleton().objectFrom(resultSet.getString(2));
b.name = resultSet.getString(3);
b.owner = resultSet.getInt(4);
b.pstatus = (java.lang.String)com.ibm.vap.converters.VapTrimStringConverter.singleton().objectFrom(resultSet.getString(5));
b.sprav = (java.lang.String)com.ibm.vap.converters.VapTrimStringConverter.singleton().objectFrom(resultSet.getString(6));
Object[] cacheData = new Object[5];
cacheData[0] = resultSet.getString(2);
cacheData[1] = resultSet.getString(3);
tempint = resultSet.getInt(4);
cacheData[2] = resultSet.wasNull() ? null : new Integer(tempint);
cacheData[3] = resultSet.getString(5);
cacheData[4] = resultSet.getString(6);
putDataIntoCache(cacheData);
}
/**
* load
*/
public void load(EntityBean eb, Object pKey, boolean forUpdate) throws Exception {
Object objectTemp = null;
PIEReferenceBean b = (PIEReferenceBean) eb;
com.hps.july.persistence.PIEReferenceKey _primaryKey = (com.hps.july.persistence.PIEReferenceKey)pKey;
PreparedStatement pstmt;
ResultSet resultSet = null;
pstmt = getPreparedStatement(_loadString);
try {
pstmt.setInt(1, _primaryKey.idreference);
resultSet = pstmt.executeQuery();
if (!(resultSet.next())) throw new javax.ejb.ObjectNotFoundException();
hydrate(eb, resultSet, pKey);
}
finally {
if (resultSet != null) resultSet.close();
returnPreparedStatement(pstmt);
}
}
/**
* refresh
*/
public void refresh(EntityBean eb, boolean forUpdate) throws Exception {
PIEReferenceBean b = (PIEReferenceBean) eb;
com.hps.july.persistence.PIEReferenceKey _primaryKey = new com.hps.july.persistence.PIEReferenceKey();
_primaryKey.idreference = b.idreference;
load(b, _primaryKey, forUpdate);
}
/**
* store
*/
public void store(EntityBean eb) throws Exception {
Object objectTemp = null;
PIEReferenceBean b = (PIEReferenceBean) eb;
com.hps.july.persistence.PIEReferenceKey _primaryKey = new com.hps.july.persistence.PIEReferenceKey();
_primaryKey.idreference = b.idreference;
PreparedStatement pstmt;
Object cacheData[] = getDataFromCache();
RdbRt aTemplate = new RdbRt(_storeString, _predicateColumnNames, _predicateMaps);
pstmt = getPreparedStatement(aTemplate.nativeQuery(cacheData));
try {
pstmt.setInt(6, _primaryKey.idreference);
objectTemp = com.ibm.vap.converters.VapTrimStringConverter.singleton().dataFrom(b.idplatinum);
if (objectTemp == null) {
pstmt.setNull(1, java.sql.Types.CHAR);
}
else {
pstmt.setString(1, (java.lang.String)objectTemp);
}
if (b.name == null) {
pstmt.setNull(2, java.sql.Types.VARCHAR);
}
else {
pstmt.setString(2, b.name);
}
pstmt.setInt(3, b.owner);
objectTemp = com.ibm.vap.converters.VapTrimStringConverter.singleton().dataFrom(b.pstatus);
if (objectTemp == null) {
pstmt.setNull(4, java.sql.Types.CHAR);
}
else {
pstmt.setString(4, (java.lang.String)objectTemp);
}
objectTemp = com.ibm.vap.converters.VapTrimStringConverter.singleton().dataFrom(b.sprav);
if (objectTemp == null) {
pstmt.setNull(5, java.sql.Types.CHAR);
}
else {
pstmt.setString(5, (java.lang.String)objectTemp);
}
int inputPos = 6;
if (cacheData[0] != null) {
pstmt.setString(++inputPos, (java.lang.String)cacheData[0]);
}
if (cacheData[1] != null) {
pstmt.setString(++inputPos, (java.lang.String)cacheData[1]);
}
if (cacheData[2] != null) {
pstmt.setInt(++inputPos, ((Number)cacheData[2]).intValue());
}
if (cacheData[3] != null) {
pstmt.setString(++inputPos, (java.lang.String)cacheData[3]);
}
if (cacheData[4] != null) {
pstmt.setString(++inputPos, (java.lang.String)cacheData[4]);
}
if (pstmt.executeUpdate() < 1) {
throw new OptimisticUpdateFailureException("executeUpdate returned zero rows updated");
}
}
finally {
returnPreparedStatement(pstmt);
}
}
/**
* remove
*/
public void remove(EntityBean eb) throws Exception {
Object objectTemp = null;
PIEReferenceBean b = (PIEReferenceBean) eb;
com.hps.july.persistence.PIEReferenceKey _primaryKey = new com.hps.july.persistence.PIEReferenceKey();
_primaryKey.idreference = b.idreference;
PreparedStatement pstmt;
Object cacheData[] = getDataFromCache();
RdbRt aTemplate = new RdbRt(_removeString, _predicateColumnNames, _predicateMaps);
pstmt = getPreparedStatement(aTemplate.nativeQuery(cacheData));
try {
pstmt.setInt(1, _primaryKey.idreference);
int inputPos = 1;
if (cacheData[0] != null) {
pstmt.setString(++inputPos, (java.lang.String)cacheData[0]);
}
if (cacheData[1] != null) {
pstmt.setString(++inputPos, (java.lang.String)cacheData[1]);
}
if (cacheData[2] != null) {
pstmt.setInt(++inputPos, ((Number)cacheData[2]).intValue());
}
if (cacheData[3] != null) {
pstmt.setString(++inputPos, (java.lang.String)cacheData[3]);
}
if (cacheData[4] != null) {
pstmt.setString(++inputPos, (java.lang.String)cacheData[4]);
}
if (pstmt.executeUpdate() < 1) {
throw new OptimisticUpdateFailureException("executeUpdate returned zero rows updated");
}
}
finally {
returnPreparedStatement(pstmt);
}
}
/**
* getPrimaryKey
*/
public Object getPrimaryKey(Object data) throws Exception {
com.hps.july.persistence.PIEReferenceKey key = new com.hps.july.persistence.PIEReferenceKey();
java.sql.ResultSet resultSet = (java.sql.ResultSet) data;
if (resultSet != null) {
Object objectTemp = null;
key.idreference = resultSet.getInt(1);
return key;
}
return null;
}
/**
* RdbRt
*/
public class RdbRt {
public static final String EQUALS = " = ";
public static final String ISNULL = " IS NULL";
public static final String MARKER = "?";
public static final String AND = " AND ";
private String fStatement;
private String[] fPredicates = new String[0];
private boolean[] fPredicateMap = new boolean[0];
public RdbRt() { }
public RdbRt(String aStmt) {
rootStmt(aStmt);
}
public RdbRt(String aStmt, String[] anArray, boolean[] aMap) {
rootStmt(aStmt);
predicates(anArray);
predicateMap(aMap);
}
public String nativeQuery() {
StringBuffer aBuffer = new StringBuffer();
statementOn(aBuffer);
return aBuffer.toString();
}
public String nativeQuery(Object[] values) {
StringBuffer aBuffer = new StringBuffer();
statementOn(aBuffer, values);
return aBuffer.toString();
}
public String[] predicates() {
return fPredicates;
}
public void predicates(String[] anArray) {
fPredicates = anArray;
}
public boolean[] predicateMap() {
return fPredicateMap;
}
public void predicateMap(boolean[] anArray) {
fPredicateMap = anArray;
}
public void predicatesOn(StringBuffer aBuffer, Object[] values) {
int j = predicates().length;
if (j != values.length)
throw new RuntimeException("differing number of predicates and values");
String each;
for (int i = 0; i < j; i++) {
if (!fPredicateMap[i]) continue;
aBuffer.append(AND);
each = predicates()[i];
aBuffer.append(each);
if (values[i] == null)
aBuffer.append(ISNULL);
else {
aBuffer.append(EQUALS);
aBuffer.append(MARKER);
}
}
}
public String rootStmt() {
return fStatement;
}
public void rootStmt(String aStmt) {
fStatement = aStmt;
}
public void statementOn(StringBuffer aBuffer) {
aBuffer.append(rootStmt());
}
public void statementOn(StringBuffer aBuffer, Object[] values) {
aBuffer.append(rootStmt());
if (predicates() != null && predicates().length != 0) {
predicatesOn(aBuffer, values);
}
}
}
/**
* findByPrimaryKey
*/
public com.hps.july.persistence.PIEReference findByPrimaryKey(com.hps.july.persistence.PIEReferenceKey key) throws java.rmi.RemoteException, javax.ejb.FinderException {
return (com.hps.july.persistence.PIEReference) home.activateBean(key);
}
/**
* findBySpravOrderByCodeAsc
*/
public EJSFinder findBySpravOrderByCodeAsc(java.lang.String argSprav) throws javax.ejb.FinderException, java.rmi.RemoteException {
ResultSet resultSet = null;
PreparedStatement pstmt = null;
try {
preFind();
pstmt = getPreparedStatement("SELECT T1.idreference, T1.idplatinum, T1.name, T1.owner, T1.p_status, T1.sprav FROM pie_reference T1 WHERE sprav = ? ORDER BY idreference ASC");
if (argSprav == null) {
pstmt.setNull(1, java.sql.Types.VARCHAR);
} else {
pstmt.setString(1, argSprav);
}
resultSet = pstmt.executeQuery();
return new EJSJDBCFinder(resultSet, this, pstmt);
}
catch (Exception ex) {
throw new EJSPersistenceException("find failed:", ex);
}
}
/**
* findByOwnerAndSpravOrderByNameAsc
*/
public EJSFinder findByOwnerAndSpravOrderByNameAsc(java.lang.Integer argOwner, java.lang.String argSprav) throws javax.ejb.FinderException, java.rmi.RemoteException {
ResultSet resultSet = null;
PreparedStatement pstmt = null;
try {
preFind();
pstmt = getPreparedStatement("SELECT T1.idreference, T1.idplatinum, T1.name, T1.owner, T1.p_status, T1.sprav FROM pie_reference T1 WHERE owner=? AND sprav = ? ORDER BY name ASC");
pstmt.setObject(1, argOwner);
if (argSprav == null) {
pstmt.setNull(2, java.sql.Types.VARCHAR);
} else {
pstmt.setString(2, argSprav);
}
resultSet = pstmt.executeQuery();
return new EJSJDBCFinder(resultSet, this, pstmt);
}
catch (Exception ex) {
throw new EJSPersistenceException("find failed:", ex);
}
}
}
| [
"[email protected]"
] | |
04772adc2b533338584f0203546bf5c78f4e387f | 1fb139df4b706e679a59eb3bdadcf31bcc88f460 | /parent/jquery01/src/main/java/com/xhp/springjdbc/Item.java | 8d1fa232b90ec0280682389c374caca64f8f7303 | [] | no_license | MyAndroidcom/notes | c19ebba224c7f0cf1c68470cc6e84836c7f083e1 | a4c5f985f459c60aa7bd3bcd53a60e3c2e17a413 | refs/heads/master | 2021-01-17T12:54:32.406442 | 2016-10-27T10:30:33 | 2016-10-27T10:30:33 | 59,255,388 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,819 | java | package com.xhp.springjdbc;
public class Item extends BasePojo {
private Long id;
private String title;
private String sellPoint;
private Long price;
private Integer num;
private String barcode;
private String image;
private Long cid;
private Integer status;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getSellPoint() {
return sellPoint;
}
public void setSellPoint(String sellPoint) {
this.sellPoint = sellPoint;
}
public Long getPrice() {
return price;
}
public void setPrice(Long price) {
this.price = price;
}
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public String getBarcode() {
return barcode;
}
public void setBarcode(String barcode) {
this.barcode = barcode;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public Long getCid() {
return cid;
}
public void setCid(Long cid) {
this.cid = cid;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
@Override
public String toString() {
return "Item [id=" + id + ", title=" + title + ", sellPoint=" + sellPoint + ", price=" + price
+ ", num=" + num + ", barcode=" + barcode + ", image=" + image + ", cid=" + cid + ", status="
+ status + "]";
}
}
| [
"[email protected]"
] | |
a2ba9e9777fd0fdc3710e9146c34efb7cb200936 | 08b9d0932c710e1b15007b0119964ed04f996da3 | /bird-gateway/bird-gateway-common/src/main/java/com/bird/gateway/common/enums/RpcTypeEnum.java | 956b8e34199f76a3a222dca8930ed28d4deee9df | [
"MIT"
] | permissive | leihtg/bird-java | 0b9ec6ac97ae5a460044ef78a14c85181aad0c6a | 6cbb23766852c358ae036b6c0dc46f7054cedb2b | refs/heads/master | 2021-05-17T14:29:31.078892 | 2020-04-03T10:36:59 | 2020-04-03T10:36:59 | 250,822,319 | 0 | 0 | MIT | 2020-03-28T14:58:13 | 2020-03-28T14:58:13 | null | UTF-8 | Java | false | false | 1,214 | java | package com.bird.gateway.common.enums;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author liuxx
* @date 2018/11/28
*/
@Getter
@RequiredArgsConstructor
public enum RpcTypeEnum {
/**
* Http rpc type enum.
*/
HTTP("http", true),
/**
* Dubbo rpc type enum.
*/
DUBBO("dubbo", true),
/**
* springCloud rpc type enum.
*/
SPRING_CLOUD("springCloud", true);
private final String name;
private final Boolean support;
/**
* acquire operator supports.
*
* @return operator support.
*/
public static List<RpcTypeEnum> acquireSupports() {
return Arrays.stream(RpcTypeEnum.values())
.filter(e -> e.support).collect(Collectors.toList());
}
/**
* acquireByName.
*
* @param name this is rpc type
* @return RpcTypeEnum
*/
public static RpcTypeEnum acquireByName(final String name) {
return Arrays.stream(RpcTypeEnum.values())
.filter(e -> e.support && e.name.equalsIgnoreCase(name)).findFirst()
.orElse(null);
}
}
| [
"[email protected]"
] | |
6394f8e131f00dd61f2faa16f79d38a615e92aa8 | ebfaed6c80b4a5cdd0a3258723431e17e2b0c16f | /src/TestScripts/test_25.java | 5944d92ab37e95c9c53e0e77e48205b21df04ff4 | [] | no_license | Shwetachinni/Bluestone | ef34c3d529bef041cfa15231298ceff458d67235 | ca4995bef0d057fb96fe2dc92c52101c834caf48 | refs/heads/master | 2020-09-04T11:31:00.839669 | 2019-11-07T06:40:12 | 2019-11-07T06:40:12 | 219,721,043 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 354 | java | package TestScripts;
import org.testng.annotations.Test;
import Generic.Open_closeAppln;
import POM.pom_25;
public class test_25 extends Open_closeAppln{
@Test
public void select_coins() throws InterruptedException
{
pom_25 p1=new pom_25(driver);
p1.search_rings();
Thread.sleep(3000);
p1.click_Mousover(driver);
}
}
| [
"TYSS@TYSS-4F-77"
] | TYSS@TYSS-4F-77 |
8aef93c946cd928b7ddeb0dfdc84ce6e2686aaf5 | b50237dadd8f5cede7e4c6f2a2472147bfcdafd7 | /src/main/java/artifacts/common/ServerProxy.java | 68352af87a67c9ce0b2d2e4fde677de8d695803d | [
"MIT"
] | permissive | cs8minty/artifacts | c05c5bf42310ff5545ac86ecd192567a6e1b30da | e90a9e257284896e762c426ff225928271d7d7fd | refs/heads/master | 2020-09-08T10:44:50.694870 | 2019-11-12T03:08:51 | 2019-11-12T03:08:51 | 221,111,685 | 0 | 0 | MIT | 2019-11-12T02:23:13 | 2019-11-12T02:23:10 | null | UTF-8 | Java | false | false | 350 | java | package artifacts.common;
import net.minecraft.item.Item;
public class ServerProxy implements IProxy {
@Override
public void preInit() {
}
@Override
public void init() {
}
@Override
public void postInit() {
}
@Override
public void registerItemRenderer(Item item, int meta, String name) {
}
}
| [
"[email protected]"
] | |
464c9a18bd9dcc90327f931d684c83d7784cf02f | 8754676f9c4e1b0aa0e7978bf033ccc0381f3efc | /JavaCardPassportApplication/src/UI/MainPanel.java | 996cabaebcb9756d8a45698440fc3fa90ab1834a | [] | no_license | AbuHelweh/JavaCardPassport | 951cf742d7a53bd24fef48477142ab6c39abf535 | 48bf517f3ea9418c2d5acff0d5eec0cdd7515c48 | refs/heads/master | 2022-01-05T13:26:48.223580 | 2018-07-30T21:49:45 | 2018-07-30T21:49:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,307 | 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 UI;
import javax.swing.JFrame;
/**
*
* @author luca
*/
public class MainPanel extends javax.swing.JPanel {
private JFrame frame;
public static boolean needsReset = false;
/**
* Creates new form MainPanel
* @param frame
*/
public MainPanel(JFrame frame) {
initComponents();
this.frame = frame;
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jSeparator1 = new javax.swing.JSeparator();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
jButton3 = new javax.swing.JButton();
jLabel1.setText("Welcome to the new and improved");
jLabel2.setText("JMRTD application for terminals!!!!");
jLabel3.setText("Choose between creating and verifying");
jButton1.setText("Create Passport");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("Verify Passport");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jLabel4.setText("Created by: Luca Campelli and Rodrigo Brandão");
jButton3.setText("Exit");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(78, 78, 78)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(jLabel1)))
.addGroup(layout.createSequentialGroup()
.addGap(60, 60, 60)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton2))
.addComponent(jLabel3)))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel4))
.addGroup(layout.createSequentialGroup()
.addGap(168, 168, 168)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(68, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
.addComponent(jLabel3)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))
.addGap(18, 18, 18)
.addComponent(jButton3)
.addGap(54, 54, 54)
.addComponent(jLabel4)
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
//Create
ProgramFrame program = new ProgramFrame(this.frame);
program.init(new CreatePanel(program));
}//GEN-LAST:event_jButton1ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
//Verify
ProgramFrame program = new ProgramFrame(this.frame);
program.init(new VerifyPanel(program));
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
System.exit(0);
}//GEN-LAST:event_jButton3ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JSeparator jSeparator1;
// End of variables declaration//GEN-END:variables
}
| [
"="
] | = |
a71791286e5466db3675d8737a17b7acb926cc92 | 4207fe9ec29ab92cbe146468b9a52937bd71dabf | /DSII/src/controladores/ControladorAuxiliar.java | c0479309f994366622fc1fd82e75868ac956ba27 | [] | no_license | juandrd/0939879-0933174 | 65c221c93f44f671ce5207e0dc14a75f266adb41 | d81d11c740b2b0cdbcfb50d17631539677d7ca19 | refs/heads/master | 2021-01-21T02:30:48.131721 | 2012-12-17T19:33:33 | 2012-12-17T19:33:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,403 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controladores;
import dao.AuxiliaresJpaController;
import dao.BusesJpaController;
import dao.exceptions.NonexistentEntityException;
import dao.exceptions.PreexistingEntityException;
import entidades.Auxiliares;
import entidades.Buses;
import entidades.Empleados;
import entidades.Estaciones;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.EntityManager;
/**
*
* @author Juan
*/
public class ControladorAuxiliar {
private FabricaObjetos mi_fabrica;
AuxiliaresJpaController daoAuxiliar;
//se requiere para elaborar consultas personalizadas
EntityManager manager;
public ControladorAuxiliar()
{
mi_fabrica = new FabricaObjetos();
manager= mi_fabrica.crear().createEntityManager();
daoAuxiliar= new AuxiliaresJpaController(mi_fabrica.getFactory());
}
public int insertar(Empleados empleado,Estaciones estacion)
{
if (!empleado.getIdentificacion().isEmpty() && !estacion.getNombre().isEmpty()
) {
Auxiliares aux = new Auxiliares();
aux.setIdentificacion(empleado.getIdentificacion() );
aux.setEstacion(estacion.getNombre());
try
{
daoAuxiliar.create(aux);
return 0;
}
catch (PreexistingEntityException ex)
{
System.out.println(ex.getMessage());
return 1;
}
catch (Exception ex)
{
System.out.println(ex.getMessage());
}
}
return -1;
}
public int modificar(Empleados empleado,Estaciones estacion)
{
if (!empleado.getIdentificacion().isEmpty() && !estacion.getNombre().isEmpty()
) {
Auxiliares auxiliar = daoAuxiliar.findAuxiliares(empleado.getIdentificacion());
auxiliar.setIdentificacion(empleado.getIdentificacion());
auxiliar.setEstacion(estacion.getNombre());
try
{
daoAuxiliar.edit(auxiliar);
return 0;
}
catch (NonexistentEntityException ex)
{
System.out.println(ex.getMessage());
return -1;
}
catch (Exception ex)
{
System.out.println(ex.getMessage());
}
}
return -1;
}
public Auxiliares consultar(String id){
Auxiliares a=daoAuxiliar.findAuxiliares(id);
return a;
}
public LinkedList consultarAll()
{
List lista;
LinkedList listaAuxiliares= new LinkedList();
//sirve para ejecutar consultas
// if(sql_select.contains("WHERE"))
lista = daoAuxiliar.findAuxiliaresEntities();
//else lista = manager.createQuery("SELECT b FROM Buses b ").getResultList();
for(int i=0;i<lista.size();i++)
{
Auxiliares a = (Auxiliares) lista.get(i);
listaAuxiliares.add(a);
}
return listaAuxiliares;
}
}
| [
"Juan@Juan-PC"
] | Juan@Juan-PC |
dc0f97940ba7a1c8903cfe451c2d369488287ecc | df345f4283c776690d6baf8ed95dcabd87cfb2b4 | /hw12-0036505665/src/main/java/hr/fer/zemris/optjava/dz13/nodes/TurnRightNode.java | bdb17684fdad3823af8ebe946b74794dbd214dbe | [] | no_license | yetra/ropaeruj-19-20 | 70b69d88effe61956a40b9f829061efb1cec5bab | a2c6cc758ace2e898caea8fbc83c8cc48d77a0d1 | refs/heads/master | 2022-03-29T18:25:14.181296 | 2020-02-05T15:11:53 | 2020-02-05T15:11:53 | 213,433,874 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 483 | java | package hr.fer.zemris.optjava.dz13.nodes;
import hr.fer.zemris.optjava.dz13.ant.Ant;
/**
* A terminal node that turns the given ant to the right by 90 degrees.
*
* @author Bruna Dujmović
*
*/
public class TurnRightNode extends Node {
@Override
public void control(Ant ant) {
ant.turnRight();
}
@Override
public Node copy() {
return new TurnRightNode();
}
@Override
public String toString() {
return "Right";
}
}
| [
"[email protected]"
] | |
d29b7e7dda6dfe0383e1ab14a4c4fdc9a4ddee86 | 5b243a29a89adb5ea5c186daaf6b2df54b693534 | /src/main/java/com/bow/camptotheca/db/Catalog.java | 5478eeb0624ecc897afbb06a999dc9bd3c60ed57 | [] | no_license | williamxww/camptotheca | 3dfbff8e78b1f2db14030cbbaf3ea36ae0a6856c | 2d56b510c600ca3f6434e0cf71c870418f92054f | refs/heads/master | 2021-01-22T11:12:17.554288 | 2017-06-07T16:11:33 | 2017-06-07T16:11:33 | 92,675,143 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,821 | java | package com.bow.camptotheca.db;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
/**
* 数据库的表通过此类可以找出<br/>
*
* The Catalog keeps track of all available tables in the database and their
* associated schemas. For now, this is a stub catalog that must be populated
* with tables by a user program before it can be used -- eventually, this
* should be converted to a catalog that reads a catalog table from disk.
*
* Threadsafe
*/
public class Catalog {
/**
* Map< tableId(DbFile's id) , table> 一个文件一定属于一张表
*/
private final ConcurrentHashMap<Integer, DbTable> catalog;
/**
* Map< table name , table id >
*/
private final ConcurrentHashMap<String, Integer> name2IdMap;
/**
* Constructor. Creates a new, empty catalog.
*/
public Catalog() {
// some code goes here
catalog = new ConcurrentHashMap<>();
name2IdMap = new ConcurrentHashMap<>();
}
/**
* Add a new table to the catalog. This table's contents are stored in the
* specified DbFile.
*
* @param file the contents of the table to add; file.getId() is the
* identfier of this file/tupledesc param for the calls getTupleDesc
* and getFile
* @param name the name of the table -- may be an empty string. May not be
* null. If a name
* @param pkeyField the name of the primary key field conflict exists, use
* the last table to be added as the table for a given name.
*/
public void addTable(DbFile file, String name, String pkeyField) {
// some code goes here
catalog.put(file.getId(), new DbTable(file, name, pkeyField));
name2IdMap.put(name, file.getId());
}
public void addTable(DbFile file, String name) {
addTable(file, name, "");
}
/**
* Add a new table to the catalog. This table has tuples formatted using the
* specified TupleDesc and its contents are stored in the specified DbFile.
*
* @param file the contents of the table to add; file.getId() is the
* identfier of this file/tupledesc param for the calls getTupleDesc
* and getFile
*/
public void addTable(DbFile file) {
addTable(file, (UUID.randomUUID()).toString());
}
/**
* Return the id of the table with a specified name,
*
* @throws NoSuchElementException if the table doesn't exist
*/
public int getTableId(String name) throws NoSuchElementException {
// some code goes here
if (name != null) {
Integer tid = name2IdMap.get(name);
if (tid != null) {
return tid;
}
}
throw new NoSuchElementException();
}
/**
* tableId 就是 DbFile's id<br/>
* Returns the tuple descriptor (schema) of the specified table
*
* @param tableId The id of the table, as specified by the DbFile.getId()
* function passed to addTable
* @throws NoSuchElementException if the table doesn't exist
*/
public TupleDesc getTupleDesc(int tableId) throws NoSuchElementException {
// some code goes here
return getDatabaseFile(tableId).getTupleDesc();
}
/**
* Returns the DbFile that can be used to read the contents of the specified
* table.
*
* @param tableId The id of the table, as specified by the DbFile.getId()
* function passed to addTable
*/
public DbFile getDatabaseFile(int tableId) throws NoSuchElementException {
// some code goes here
DbTable table = catalog.get(tableId);
if (table != null) {
return table.getFile();
}
throw new NoSuchElementException();
}
public String getPrimaryKey(int tableId) {
// some code goes here
return catalog.get(tableId).getPkeyField();
}
public Iterator<Integer> tableIdIterator() {
// some code goes here
return name2IdMap.values().iterator();
}
public String getTableName(int id) {
// some code goes here
return catalog.get(id).getName();
}
/** Delete all tables from the catalog */
public void clear() {
// some code goes here
catalog.clear();
name2IdMap.clear();
}
/**
* Reads the schema from a file and creates the appropriate tables in the
* database.
*
* @param catalogFile
*/
public void loadSchema(String catalogFile) {
String line = "";
String baseFolder = new File(new File(catalogFile).getAbsolutePath()).getParent();
try {
BufferedReader br = new BufferedReader(new FileReader(new File(catalogFile)));
while ((line = br.readLine()) != null) {
// assume line is of the format name (field type, field type,
// ...)
String name = line.substring(0, line.indexOf("(")).trim();
// System.out.println("TABLE NAME: " + name);
String fields = line.substring(line.indexOf("(") + 1, line.indexOf(")")).trim();
String[] els = fields.split(",");
ArrayList<String> names = new ArrayList<String>();
ArrayList<Type> types = new ArrayList<Type>();
String primaryKey = "";
for (String e : els) {
String[] els2 = e.trim().split(" ");
names.add(els2[0].trim());
if (els2[1].trim().toLowerCase().equals("int"))
types.add(Type.INT_TYPE);
else if (els2[1].trim().toLowerCase().equals("string"))
types.add(Type.STRING_TYPE);
else {
System.out.println("Unknown type " + els2[1]);
System.exit(0);
}
if (els2.length == 3) {
if (els2[2].trim().equals("pk"))
primaryKey = els2[0].trim();
else {
System.out.println("Unknown annotation " + els2[2]);
System.exit(0);
}
}
}
Type[] typeAr = types.toArray(new Type[0]);
String[] namesAr = names.toArray(new String[0]);
TupleDesc t = new TupleDesc(typeAr, namesAr);
HeapFile tabHf = new HeapFile(new File(baseFolder + "/" + name + ".dat"), t);
addTable(tabHf, name, primaryKey);
System.out.println("Added table : " + name + " with schema " + t);
}
} catch (IOException e) {
e.printStackTrace();
System.exit(0);
} catch (IndexOutOfBoundsException e) {
System.out.println("Invalid catalog entry : " + line);
System.exit(0);
}
}
/**
* 一张表对应一个文件
*/
private class DbTable {
private final DbFile file;
private final String name;
private final String pkeyField;
public DbTable(DbFile file, String name, String pkeyField) {
this.file = file;
this.name = name;
this.pkeyField = pkeyField;
}
public DbFile getFile() {
return file;
}
public String getName() {
return name;
}
public String getPkeyField() {
return pkeyField;
}
}
}
| [
"[email protected]"
] | |
2c1ee6e11306bc743878846179cd94f7c75dc046 | acd0a08a749fbc0d70bd89c4464cdaa892f70994 | /后端/src/main/java/com/zgt/opengauss/zeus/config/MybatisPlusConfig.java | 46c4770fbd34f0c9750f9d8fe2e302fab86478ee | [
"MIT"
] | permissive | opengauss-mirror/tryme | 3d756a0c556583525187b046c7b579c7bb346a0e | 95e1ef949d394107b07485787110a0400fce83a4 | refs/heads/master | 2023-08-31T15:01:04.200588 | 2021-09-22T08:07:49 | 2021-09-22T08:07:49 | 403,050,157 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 835 | java | package com.zgt.opengauss.zeus.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author zhangrb
* @date 2021/7/8
*/
@Configuration
@MapperScan("com.zgt.opengauss.zeus.mapper")
public class MybatisPlusConfig {
// 最新版
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
return interceptor;
}
}
| [
"[email protected]"
] | |
ddaf63ad49c3822eccdaa5f347f688eb1e47e89a | 9d1c4bbc2f82507f55d0f24194de9c199e18ca4e | /src/main/java/com/itemtracker/auth/service/SecurityServiceImpl.java | 0decc68d84acab0716c3dfb2435338442e022b9d | [] | no_license | filipw2/spring | 76d8b6f74769754612fd9e21749e360194b6acda | 5c06d7fee19bcdf48191ceb2488316312cb9a24b | refs/heads/master | 2020-03-14T10:53:46.157378 | 2018-05-22T19:56:51 | 2018-05-22T19:56:51 | 131,578,537 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,539 | java | package com.itemtracker.auth.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Service;
@Service
public class SecurityServiceImpl implements SecurityService{
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private UserDetailsService userDetailService;
@Override
public String findLoggedInUsername() {
Object userDetails = SecurityContextHolder.getContext().getAuthentication().getDetails();
if(userDetails instanceof UserDetails) {
return ((UserDetails)userDetails).getUsername();
}
return null;
}
@Override
public void autologin(String username,String password) {
UserDetails userDetails = userDetailService.loadUserByUsername(username);
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(userDetails,password,userDetails.getAuthorities());
authenticationManager.authenticate(usernamePasswordAuthenticationToken);
if(usernamePasswordAuthenticationToken.isAuthenticated()) {
SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);
}
}
}
| [
"[email protected]"
] | |
018169ad3399abfea80e0c7d8603fda570328c4a | 16e238a3b3e5fbe6bdc3f13bba3226d64a0caa71 | /app/src/main/java/dporras/nanodegree/quizapp/MainActivity.java | 8d24c34ca4f785c04e8d8ef7448d7b79e864c033 | [] | no_license | dporr/nanodegree_project3 | 5240fdd6ed2e2fe82da552a8d2abca7ad92d8c77 | eaeb8e73187b3415ea03ca5bee8e10d9958d8157 | refs/heads/master | 2021-06-05T02:27:20.153780 | 2016-07-01T18:58:30 | 2016-07-01T18:58:30 | 61,954,266 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,855 | java | package dporras.nanodegree.quizapp;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity{
private RadioGroup rGroupQuestion1;
private RadioGroup rGroupQuestion5;
private CheckBox q2_hendrix;
private CheckBox q2_trump;
private CheckBox q2_watters;
private CheckBox q2_clapton;
private EditText q3_mannish_boy;
private EditText q4_harmonica;
private int totalScore;
private String Q3_ANSWER="Mannish Boy";
private String Q4_ANSWER="Harmonica";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initLayoutComponents();
}
private void initLayoutComponents(){
rGroupQuestion1 = (RadioGroup) findViewById(R.id.rGroupQuestion1);
rGroupQuestion5 = (RadioGroup) findViewById(R.id.rGroupQuestion5);
q2_hendrix = (CheckBox) findViewById(R.id.q2_hendrix);
q2_trump = (CheckBox) findViewById(R.id.q2_trump);
q2_watters = (CheckBox) findViewById(R.id.q2_watters);
q2_clapton = (CheckBox) findViewById(R.id.q2_clapton);
q3_mannish_boy = (EditText) findViewById(R.id.q3_mannish_boy);
q4_harmonica = (EditText) findViewById(R.id.q4_harmonica);
}
/**
* Sumbit the quiz for evaluating
* @param view
*/
public void submitQuizz(View view){
//Retrieve question 1 rigth answer
switch (rGroupQuestion1.getCheckedRadioButtonId()){
case R.id.q1_radio_ukulele:
break;
case R.id.q1_radio_drums:
break;
case R.id.q1_radio_guitar:
totalScore++;
}
//Lower case q3 answer is the same as expected, give 1 point
if(q3_mannish_boy.getText().toString().trim().toLowerCase().equals(Q3_ANSWER.toLowerCase()))
totalScore++;
//Lower case q4 answer is the same as expected, give 1 point
if(q4_harmonica.getText().toString().trim().toLowerCase().equals(Q4_ANSWER.toLowerCase()))
totalScore++;
//If any blues player is checked gives 1 point, if trump is checked user failed to answer
if(!q2_trump.isChecked() &&
(q2_clapton.isChecked() || q2_hendrix.isChecked() || q2_watters.isChecked()))
totalScore++;
//Retrieve question 5 rigth answer
switch (rGroupQuestion5.getCheckedRadioButtonId()){
case R.id.q5_radio_electro:
break;
case R.id.q5_radio_nu_metal:
break;
case R.id.q5_radio_delta_blues:
totalScore++;
}
//Displays the final result
String result;
if(totalScore>0) {
result = "Congrats! Your total Score is: " + totalScore + " of 5 total possible points!";
}else{
result = "Sorry! Your total Score is: " + totalScore + " keep trying!";
}
Toast.makeText(MainActivity.this, result , Toast.LENGTH_SHORT).show();
cleanInputs();
}
private void cleanInputs(){
totalScore=0;
//Reset question 1 answer
rGroupQuestion1.clearCheck();
//Reset question 2 answers
q2_clapton.setChecked(false);
q2_hendrix.setChecked(false);
q2_trump.setChecked(false);
q2_watters.setChecked(false);
//Reset question 3 answer
q3_mannish_boy.setText("");
//Reset question 4 answer
q4_harmonica.setText("");
//Reset question 5 answers
rGroupQuestion5.clearCheck();
}
}
| [
"[email protected]"
] | |
0fb47715b53d053a1daf8ca2ad58b6631f047ae5 | 25db4f3cf67787a1d5cf7bdeaabdb16cbf715962 | /src/modernJava/chapter10/ex01/StockBuilder.java | fe3be9eb4f11f6528789beaf31fa6858f018b045 | [] | no_license | bruiser99-ko/modernJava | 0a0dcde2290b46d5eac8f742b491b36c13eb2f20 | 67b41f6aa924c575e31fa94a5b466ba59592164c | refs/heads/master | 2021-01-16T01:10:47.666052 | 2020-03-22T08:14:36 | 2020-03-22T08:14:36 | 242,920,997 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 773 | java | package modernJava.chapter10.ex01;
public class StockBuilder {
private final MethodChainingOrderBuilder builder;
private final Trade trade;
final Stock stock = new Stock();
StockBuilder(MethodChainingOrderBuilder builder, Trade trade, String symbol) {
this.builder = builder;
this.trade = trade;
stock.setSymbol(symbol);
}
public StockBuilder() {
this.builder = null;
this.trade = new Trade();
}
public TradeBuilderWithStock on(String market) {
stock.setMarket(market);
trade.setStock(stock);
return new TradeBuilderWithStock(builder, trade);
}
/* 람다식 추가 */
public void symbol(String symbol) {
stock.setSymbol(symbol);
}
public void market(String market) {
stock.setMarket(market);
}
}
| [
"[email protected]"
] | |
6eb89343f4ea1767c9c598bf9cb37d8ed75ca533 | d028c48cc8f29731c37bb327c7f8d390e2a8438d | /src/main/java/com/hood/transcoder/domain/movie/Movie.java | b9eda1c9a15d8e28cafd0a21f0341969712b1e65 | [
"MIT"
] | permissive | stevenmhood/transcoder | 7ade2d6b5eb731780a3d6b39f66dac819eaf8a63 | 0d50a39eadf72a69bc4803523d196188e3596a12 | refs/heads/master | 2020-05-17T09:21:11.821142 | 2014-06-15T05:36:12 | 2014-06-15T05:36:12 | 15,641,375 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,244 | java | package com.hood.transcoder.domain.movie;
import java.nio.file.Path;
import java.util.Objects;
public class Movie
{
private final MovieId movieId;
private final Path path;
public Movie( final MovieId movieId )
{
this( movieId, null );
}
public Movie( final MovieId movieId, final Path path )
{
this.movieId = movieId;
this.path = path;
}
public MovieId getMovieId()
{
return this.movieId;
}
public Path getPath()
{
return this.path;
}
@Override
public int hashCode()
{
return Objects.hash( this.movieId );
}
@Override
public boolean equals( final Object o )
{
if ( this == o )
{
return true;
}
if ( o == null )
{
return false;
}
if ( o instanceof Movie )
{
final Movie other = (Movie) o;
return Objects.equals( this.movieId, other.movieId );
}
return false;
}
@Override
public String toString()
{
return com.google.common.base.Objects.toStringHelper( this ).add( "movieId", this.movieId )
.add( "path", this.path ).toString();
}
}
| [
"[email protected]"
] | |
9f9bf0d48e4200ec57c1c20ef8d81687fd4d41ad | fccf4e1b9c15b2271e82e924e53bad2f6771dc82 | /src/thinginjava/concurrency/DaemonThreadFactory.java | ee25a1405de17c35209b0d400a2953fb1838636b | [] | no_license | luyna/learning-java | d7f424728dc5713d8b630a5cdee1e07c3dd55a79 | 6eb5e1eb66794a4ac524784833ef66448319212d | refs/heads/master | 2020-12-31T05:25:33.602149 | 2015-04-29T08:49:31 | 2015-04-29T08:49:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package thinginjava.concurrency;
import java.util.concurrent.ThreadFactory;
public class DaemonThreadFactory implements ThreadFactory {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setDaemon(true);
return t;
}
}
| [
"[email protected]"
] | |
fbe9ec9a5faf155bbab77560b5ed8c8a9786a86a | db3043ea4728125fd1d7a6a127daf0cc2caad626 | /OCPay_admin/src/main/java/com/stormfives/ocpay/member/dao/OcpayAddressBalanceDualDAO.java | 9af1b8bd32673b140fd9b47b454996fa9e5623d8 | [] | no_license | OdysseyOCN/OCPay | 74f0b2ee9b2c847599118861ffa43b8c869b2e71 | 5f6c03c8eea53ea107ac6917f3d97a3c7fc86209 | refs/heads/master | 2022-07-25T07:49:12.120351 | 2019-03-29T03:14:46 | 2019-03-29T03:14:46 | 135,281,926 | 9 | 5 | null | 2022-07-15T21:06:38 | 2018-05-29T10:48:50 | Java | UTF-8 | Java | false | false | 753 | java | package com.stormfives.ocpay.member.dao;
import com.stormfives.ocpay.member.dao.entity.OcpayAddressBalanceDual;
import com.stormfives.ocpay.member.dao.entity.OcpayAddressBalanceDualExample;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.math.BigDecimal;
import java.util.List;
@Mapper
public interface OcpayAddressBalanceDualDAO {
@Select("select sum(addresses_balance) from ocpay_address_balance_dual")
BigDecimal getTotalAmount();
@Select("select count(1) from ocpay_address_balance_dual")
int getCount();
@Delete("delete from ocpay_address_balance_dual")
void deleteDual();
} | [
"[email protected]"
] | |
07126c52894d5923c5d21ce2e5195b9e303acd7e | 38c4451ab626dcdc101a11b18e248d33fd8a52e0 | /identifiers/apache-ant-1.8.4/src/main/org/apache/tools/ant/types/selectors/BaseExtendSelector.java | fd4b4b6eab7c370d10f0ebff7c47c9c55656017e | [] | no_license | habeascorpus/habeascorpus-data | 47da7c08d0f357938c502bae030d5fb8f44f5e01 | 536d55729f3110aee058ad009bcba3e063b39450 | refs/heads/master | 2020-06-04T10:17:20.102451 | 2013-02-19T15:19:21 | 2013-02-19T15:19:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,377 | java | org PACKAGE_IDENTIFIER false
apache PACKAGE_IDENTIFIER false
tools PACKAGE_IDENTIFIER false
ant PACKAGE_IDENTIFIER false
types PACKAGE_IDENTIFIER false
selectors PACKAGE_IDENTIFIER false
java PACKAGE_IDENTIFIER false
io PACKAGE_IDENTIFIER false
File TYPE_IDENTIFIER false
org PACKAGE_IDENTIFIER false
apache PACKAGE_IDENTIFIER false
tools PACKAGE_IDENTIFIER false
ant PACKAGE_IDENTIFIER false
BuildException TYPE_IDENTIFIER false
org PACKAGE_IDENTIFIER false
apache PACKAGE_IDENTIFIER false
tools PACKAGE_IDENTIFIER false
ant PACKAGE_IDENTIFIER false
types PACKAGE_IDENTIFIER false
Parameter TYPE_IDENTIFIER false
BaseExtendSelector TYPE_IDENTIFIER true
BaseSelector TYPE_IDENTIFIER false
ExtendFileSelector TYPE_IDENTIFIER false
Parameter TYPE_IDENTIFIER false
parameters VARIABLE_IDENTIFIER true
BaseExtendSelector METHOD_IDENTIFIER false
setParameters METHOD_IDENTIFIER true
Parameter TYPE_IDENTIFIER false
parameters VARIABLE_IDENTIFIER true
parameters VARIABLE_IDENTIFIER false
parameters VARIABLE_IDENTIFIER false
Parameter TYPE_IDENTIFIER false
getParameters METHOD_IDENTIFIER true
parameters VARIABLE_IDENTIFIER false
isSelected METHOD_IDENTIFIER true
File TYPE_IDENTIFIER false
basedir VARIABLE_IDENTIFIER true
String TYPE_IDENTIFIER false
filename VARIABLE_IDENTIFIER true
File TYPE_IDENTIFIER false
file VARIABLE_IDENTIFIER true
BuildException TYPE_IDENTIFIER false
| [
"[email protected]"
] | |
30fc7fe1b2a699af7b4c29893383d1900b0132c1 | a2df6764e9f4350e0d9184efadb6c92c40d40212 | /aliyun-java-sdk-dataworks-public/src/main/java/com/aliyuncs/dataworks_public/model/v20180601/CheckCallbackResponse.java | fd8d22c9c2ad9f2a6fff2acdecf38cea0d279088 | [
"Apache-2.0"
] | permissive | warriorsZXX/aliyun-openapi-java-sdk | 567840c4bdd438d43be6bd21edde86585cd6274a | f8fd2b81a5f2cd46b1e31974ff6a7afed111a245 | refs/heads/master | 2022-12-06T15:45:20.418475 | 2020-08-20T08:37:31 | 2020-08-26T06:17:49 | 290,450,773 | 1 | 0 | NOASSERTION | 2020-08-26T09:15:48 | 2020-08-26T09:15:47 | null | UTF-8 | Java | false | false | 1,698 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.dataworks_public.model.v20180601;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.dataworks_public.transform.v20180601.CheckCallbackResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class CheckCallbackResponse extends AcsResponse {
private String returnCode;
private Boolean returnValue;
private String requestId;
public String getReturnCode() {
return this.returnCode;
}
public void setReturnCode(String returnCode) {
this.returnCode = returnCode;
}
public Boolean getReturnValue() {
return this.returnValue;
}
public void setReturnValue(Boolean returnValue) {
this.returnValue = returnValue;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
@Override
public CheckCallbackResponse getInstance(UnmarshallerContext context) {
return CheckCallbackResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
| [
"[email protected]"
] | |
10ae218e9f935f9498ebc182a5a3f069bc38c56c | c3241185f626bcbc8a8b2affbd44a79392405f35 | /app/src/main/java/org/vliux/android/gesturecut/util/SimpleAnimatorListener.java | c00a9ad5e2a6b04f3efef6998fdaf228de7a7906 | [] | no_license | vliux/GestureCut | 32b5c48a4c0c1d9ec6d1c01e8754ee36f067c82a | b031e6057903c990366acf221ccac569abfd42eb | refs/heads/master | 2020-12-30T10:12:38.622980 | 2015-02-25T07:57:57 | 2015-02-25T07:57:57 | 18,392,886 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 500 | java | package org.vliux.android.gesturecut.util;
import android.animation.Animator;
/**
* Created by vliux on 2/16/15.
*/
public class SimpleAnimatorListener implements Animator.AnimatorListener {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
}
| [
"[email protected]"
] | |
e28ce23417133c1547208dcf971ed304ffad83e3 | 5aa33eff5490fc80c5d9da70d9e16c88ba8c2111 | /mianshi-service/src/main/java/cn/xyz/commons/utils/ThreadUtil.java | 6f227e9d311a3b4e15e1aa04ff58137a5b8370f6 | [] | no_license | lyly0906/imapi | 70065f3d08548bdd6d9b69e760761ebd53736923 | 4d8fa2c013a0ae5deac343ae51f66ecfbb9c057f | refs/heads/master | 2020-03-21T15:01:59.525584 | 2018-06-26T05:53:19 | 2018-06-26T05:53:19 | 138,690,369 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 488 | java | package cn.xyz.commons.utils;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import cn.xyz.commons.support.Callback;
public class ThreadUtil{
public static final ExecutorService mThreadPool = Executors.newFixedThreadPool(1000);
public static void executeInThread(Callback callback){
mThreadPool.execute(new Runnable() {
@Override
public void run() {
callback.execute(Thread.currentThread().getName());
}
});
}
}
| [
"[email protected]"
] | |
b92df8a434c3f0d4213f8e378b975373afa41e28 | 32f7ffabe1863690b6870a1df9086322e88ee3e7 | /src/com/ict03/class06/Ex01.java | cd64603e4575a1bdc8f5b2c8630c022e9b6a7ae4 | [] | no_license | HJH3077/java_project | 19443bf36824149397f4efc01d05620a18501bdd | 180d4e25ee35979f89f3df5a7bfb4b841d8bd8a9 | refs/heads/master | 2023-04-02T12:51:57.001297 | 2021-04-11T19:50:30 | 2021-04-11T19:50:30 | 354,699,986 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 798 | java | package com.ict03.class06;
// 열거형(enum) : 상수를 하나의 객체로 인식하고, 여러개의 상수 객체들을 한 곳에 모아둔 하나의 묶음(객체)
public class Ex01 {
// 흔히 알려진 상수
static final int JAVA = 100;
static final int DB = 200;
// 열거형
public enum Lesson {
JAVA, JSP, SPRING, ANDROID, HTML
}
public static void main(String[] args) {
// System.out.println("JAVA : " + Ex01.); // ctrl space 하면 E가 enum임
System.out.println("JAVA : " + Ex01.JAVA);
// enum
System.out.println("enum JAVA : " + Lesson.JAVA);
Lesson[] arr = Lesson.values();
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i] + ":" + arr[i].ordinal()); // ordinal() : index값
// 배열의 순서가 나옴
}
}
}
| [
"[email protected]"
] | |
411edc822efe6ddf409389a181f28da10f5cfc33 | 74b47b895b2f739612371f871c7f940502e7165b | /aws-java-sdk-imagebuilder/src/main/java/com/amazonaws/services/imagebuilder/model/transform/PutContainerRecipePolicyResultJsonUnmarshaller.java | 328c286ef0864883be322591b4f6ab53b5af4258 | [
"Apache-2.0"
] | permissive | baganda07/aws-sdk-java | fe1958ed679cd95b4c48f971393bf03eb5512799 | f19bdb30177106b5d6394223a40a382b87adf742 | refs/heads/master | 2022-11-09T21:55:43.857201 | 2022-10-24T21:08:19 | 2022-10-24T21:08:19 | 221,028,223 | 0 | 0 | Apache-2.0 | 2019-11-11T16:57:12 | 2019-11-11T16:57:11 | null | UTF-8 | Java | false | false | 3,227 | java | /*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.imagebuilder.model.transform;
import java.math.*;
import javax.annotation.Generated;
import com.amazonaws.services.imagebuilder.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* PutContainerRecipePolicyResult JSON Unmarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PutContainerRecipePolicyResultJsonUnmarshaller implements Unmarshaller<PutContainerRecipePolicyResult, JsonUnmarshallerContext> {
public PutContainerRecipePolicyResult unmarshall(JsonUnmarshallerContext context) throws Exception {
PutContainerRecipePolicyResult putContainerRecipePolicyResult = new PutContainerRecipePolicyResult();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL) {
return putContainerRecipePolicyResult;
}
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("requestId", targetDepth)) {
context.nextToken();
putContainerRecipePolicyResult.setRequestId(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("containerRecipeArn", targetDepth)) {
context.nextToken();
putContainerRecipePolicyResult.setContainerRecipeArn(context.getUnmarshaller(String.class).unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return putContainerRecipePolicyResult;
}
private static PutContainerRecipePolicyResultJsonUnmarshaller instance;
public static PutContainerRecipePolicyResultJsonUnmarshaller getInstance() {
if (instance == null)
instance = new PutContainerRecipePolicyResultJsonUnmarshaller();
return instance;
}
}
| [
""
] | |
1a5f20cd5ff58ea7da8895ffb2cfcc30ba3c3612 | 0bb0b942edd9e6a4a051202361fc824723ec29ea | /android/app/src/main/java/com/recyclertest/MainActivity.java | 8b8a8229c56d2be6a3505346d13111c35712dff1 | [] | no_license | pravynandas/RecyclerTest | 4ec381081ced67bdde79b903ca77b31af75ead8c | a4bb080cf26ab63185d2283a750975924c7cf1b9 | refs/heads/master | 2022-11-18T04:20:00.929102 | 2020-07-15T13:34:35 | 2020-07-15T13:34:35 | 279,876,789 | 0 | 0 | null | 2020-07-15T13:32:20 | 2020-07-15T13:32:19 | null | UTF-8 | Java | false | false | 369 | java | package com.recyclertest;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "recyclerTest";
}
}
| [
"[email protected]"
] | |
8709a0c57315a5f3b940a34a859fb6ba6e27ba21 | 31f043184e2839ad5c3acbaf46eb1a26408d4296 | /src/main/java/com/github/highcharts4gwt/model/highcharts/option/api/plotoptions/spline/point/ClickEvent.java | 22ff0c3e88165dd939cf56d5947410df94781473 | [] | no_license | highcharts4gwt/highchart-wrapper | 52ffa84f2f441aa85de52adb3503266aec66e0ac | 0a4278ddfa829998deb750de0a5bd635050b4430 | refs/heads/master | 2021-01-17T20:25:22.231745 | 2015-06-30T15:05:01 | 2015-06-30T15:05:01 | 24,794,406 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 213 | java |
package com.github.highcharts4gwt.model.highcharts.option.api.plotoptions.spline.point;
import com.github.highcharts4gwt.model.highcharts.object.api.Point;
public interface ClickEvent {
Point point();
}
| [
"[email protected]"
] | |
82541fb5bbe194a28abc6618bf7497e454489fd5 | 1130eee1b845f59879815cc7d71e804cbdc82aeb | /eclipse-workspace/day_1/src/com/lanou3g/demo/Demo_3.java | 4ec7500032721a118106dedbab684bc03ec47e9b | [] | no_license | Nicetrylp/java | e4ba8713a9ecb6b676fb7b613eec03be5177b200 | 2d68790878de422549cce0ab8561617de791d394 | refs/heads/master | 2021-08-28T05:24:31.009749 | 2017-12-11T08:55:58 | 2017-12-11T08:55:58 | 112,324,746 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,683 | java | package com.lanou3g.demo;
import java.util.Scanner;
public class Demo_3 {
public static void main(String[] args) {
/*
System.out.println("请输入这次考试的分数:");
Scanner scanner = new Scanner(System.in);
// 接收分数
int score = scanner.nextInt();
if(score >= 90)
{
System.out.println("优秀");
}else if (score >= 70) {
System.out.println("良好");
}else if (score >= 60) {
System.out.println("及格");
}else {
System.out.println("不及格");
}
//
scanner.close();
*/
/*
* 练习题1.从控制台输入一个字符 如果是‘m’则输出男性 否则什么都不输出
*/
/*
System.out.println("请输入一个字符:");
Scanner scanner = new Scanner(System.in);
String str = scanner.nextLine();
//将字符串转成char类型
// 字符 索引 下标
char ch = str.charAt(0);
if(ch == 'm') {
System.out.println("男");
}
scanner.close();
*/
/*
* 输入一个数 判断 是哪个季节(3 4 5 春季 6 7 8 夏季 9 10 11 秋季 12 1 2 冬季)
*/
// 当有多个case同时执行一个语句时,可以省略break(根据实际情况选择)
/*
System.out.println("请输入一个月份");
Scanner scanner = new Scanner(System.in);
int month = scanner.nextInt();
switch (month) {
case 3:
case 4:
case 5:
System.out.println("春");
break;
case 6:
case 7:
case 8:
System.out.println("夏");
break;
case 9:
case 10:
case 11:
System.out.println("秋");
break;
case 12:
case 1:
case 2:
System.out.println("冬");
break;
default:
System.out.println("error");
break;
}
scanner.close();
*/
}
}
| [
"[email protected]"
] | |
6640fd8b601d26735307dacb94315140368f343d | 6fc4eba8df16e0c2d86a6ecd3ba5523ab6662e20 | /codeEnv/src/Main.java | 1fbc0478180b0d59df977079a1c85cdfac774da9 | [] | no_license | AdarshaNayak/code-env | 2e13a90e673f132c84f8a830b9363c95dd62496e | 2b2a928373b2f617ba02558f0a0cfed9ac781640 | refs/heads/master | 2022-03-15T03:57:28.823030 | 2019-11-14T14:21:57 | 2019-11-14T14:21:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,159 | java |
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.layout.*;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.Group;
import javafx.scene.control.*;
//import javafx.scene.layout.BorderPane;
public class Main extends Application {
@FXML
private ComboBox<String> languages;
@Override
public void start(Stage primaryStage) {
try {
//Load external fxml file
//Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("SolveCode.fxml"));
Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("DisplayQuestions.fxml"));
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setTitle("Coding Platform");
primaryStage.setMaximized(true);
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
| [
"[email protected]"
] | |
ba541dcc43635b375ff25bbb0c2530c2404ae882 | 61aa8af548ec9f440038e150ac6a6530dda34494 | /Projeto_1/src/main/java/br/ufscar/dc/dsw/POJO/Consulta.java | 7db95ebca9e8b2ea04602c34b76dea359847b946 | [] | no_license | reynold125/web1 | f0d158439d62a090eeff305b91c3a701f87af3e6 | 2b73ae46c356db35d0b0add6bcba0968bb41d4dd | refs/heads/main | 2023-09-05T22:36:11.353683 | 2021-11-24T11:51:39 | 2021-11-24T11:51:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 878 | java | package br.ufscar.dc.dsw.POJO;
import java.util.Date;
public class Consulta{
private String cpfCliente;
private String cpfProfissional;
private Date data;
public Consulta(String cpfCliente, String cpfProfissional, Date data) {
this.cpfCliente = cpfCliente;
this.cpfProfissional = cpfProfissional;
this.data = data;
}
public void setCpfCliente(String cpfCliente) {
this.cpfCliente = cpfCliente;
}
public String getCpfCliente() {
return this.cpfCliente;
}
public void setCpfProfissional(String cpfProfissional) {
this.cpfProfissional = cpfProfissional;
}
public String getCpfProfissional() {
return this.cpfProfissional;
}
public void setData(Date data) {
this.data = data;
}
public Date getData() {
return this.data;
}
} | [
"[email protected]"
] | |
5e5abc684483a6d7e34b4a8ef61d52771104324f | 8aa3696a5d29811f729e1bd98c7709dce767c42d | /src/main/java/uk/co/mysterymayhem/vmcplayback/osc/RecordingPacketListener.java | cda442a5b6be29d2449bd917b5bd2ebe1dd2ccc6 | [
"MIT"
] | permissive | Mysteryem/EmVMCPlayback | 39aa9dd8884dfc64a501b36fd0cd3cf625157668 | 130e6dff95d29840e62bffafedc6ed0875efc5d2 | refs/heads/master | 2023-07-14T16:12:50.811536 | 2021-08-25T22:08:11 | 2021-08-25T22:08:11 | 393,205,885 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,346 | java | package uk.co.mysterymayhem.vmcplayback.osc;
import com.illposed.osc.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.function.Predicate;
/**
* Packet listener that records received OSC packets.
* <p>
* Created by Mysteryem on 31/07/2021.
*/
public class RecordingPacketListener implements OSCPacketListener {
private static final Logger LOG = LoggerFactory.getLogger(RecordingPacketListener.class);
private final Predicate<RecordedMessage> messageSelector;
private int packetCount;
private int messageCount;
private long startTime;
private ArrayList<RecordedPacket<?, ?>> recordedPackets = new ArrayList<>();
public RecordingPacketListener(Predicate<RecordedMessage> messageSelector) {
this.messageSelector = messageSelector;
}
public void startRecording() {
// ditch any old messages
this.recordedPackets = new ArrayList<>();
// get the time now for use when calculating time offsets of when messages have been received
this.startTime = System.currentTimeMillis();
}
public int getPacketCount() {
return packetCount;
}
public int countMessages() {
return messageCount;
// Could calculate with this instead of counting as the packets get handled
//return this.recordedPackets.stream().map(RecordedPacket::getPacketData).mapToInt(RecordedPacketData::getMessageCount).sum();
}
public long getStartTime() {
return startTime;
}
public ArrayList<RecordedPacket<?, ?>> getRecordedPackets() {
return recordedPackets;
}
@Override
public void handlePacket(OSCPacketEvent event) {
long timeReceived = System.currentTimeMillis();
packetCount++;
long offsetTime = timeReceived - this.startTime;
OSCPacket packet = event.getPacket();
if (packet instanceof OSCMessage) {
OSCMessage message = (OSCMessage) packet;
RecordedMessagePacket recordedMessagePacket = new RecordedMessagePacket(offsetTime, message);
if (this.messageSelector.test(recordedMessagePacket.getPacketData())) {
this.recordedPackets.add(recordedMessagePacket);
// Should always be +1 since OSCMessages have a single message
this.messageCount += recordedMessagePacket.getPacketData().getMessageCount();
}
} else if (packet instanceof OSCBundle) {
OSCBundle bundle = (OSCBundle) packet;
RecordedBundlePacket recordedBundlePacket = RecordedBundlePacket.fromOscBundle(offsetTime, bundle, this.messageSelector);
// If the bundle has no recorded packet data (it has no messages), ignore it
if (recordedBundlePacket != null && !recordedBundlePacket.getPacketData().getRecordedPacketData().isEmpty()) {
this.recordedPackets.add(recordedBundlePacket);
this.messageCount += recordedBundlePacket.getPacketData().getMessageCount();
}
} else {
throw new RuntimeException("Unexpected OSCPacket '" + packet + "' of class '" + packet.getClass() + "'");
}
}
@Override
public void handleBadData(OSCBadDataEvent event) {
LOG.warn("Got bad data packet", event.getException());
}
}
| [
"[email protected]"
] | |
21b757ad5825f78185f78999c4436a2b6843c277 | 18720fe6f59710527c31b1e6ff9cc4039174f689 | /src/main/java/com/yigou/entity/Category.java | ec87a08cddedec41c073d943e7f7cbcd3fee51ec | [] | no_license | yigouteam/yigou | 49d4487615a5e7dd0dfdf94369ab2b9d39cd7033 | f1f445ff6ec4c0ae5f556678e31a79c21892312c | refs/heads/master | 2022-12-23T01:04:53.373599 | 2019-08-10T12:07:27 | 2019-08-10T12:07:27 | 201,627,895 | 0 | 0 | null | 2022-12-16T02:34:34 | 2019-08-10T12:34:01 | JavaScript | UTF-8 | Java | false | false | 635 | java | package com.yigou.entity;
import java.util.List;
public class Category {
private Integer id;
private String classname;
private List<Goods> goods;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getClassname() {
return classname;
}
public void setClassname(String classname) {
this.classname = classname == null ? null : classname.trim();
}
public List<Goods> getGoods() {
return goods;
}
public void setGoods(List<Goods> goods) {
this.goods = goods;
}
} | [
"Lenovo@DESKTOP-BKFF39V"
] | Lenovo@DESKTOP-BKFF39V |
fd91e63727c1607f3b5ece86951ddd864090f881 | 176fd4dd8ba40cdc05d43d853ce826dfd6ed8562 | /code/api-usage-mining/src/edu/ucla/cs/verify/threshold/RandomAccessFileClose.java | 52b5172613a3cbb88f0d27b8af66f3dc574cef8c | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/ExampleCheck | f9e22982f264a305fb0ad78ca473b527f0fe9ff7 | 243582982bec98d928a56a44cfb18a7c0e2c39f8 | refs/heads/main | 2023-08-06T06:59:47.559451 | 2021-09-27T03:11:14 | 2021-09-27T03:11:14 | 405,176,081 | 7 | 0 | null | null | null | null | UTF-8 | Java | false | false | 750 | java | package edu.ucla.cs.verify.threshold;
import java.util.ArrayList;
import edu.ucla.cs.mine.SequencePatternVerifier;
import edu.ucla.cs.utils.FileUtils;
public class RandomAccessFileClose {
public static void main(String[] args) {
String seq_output = "/home/troy/research/BOA/example/RandomAccessFile.close/NO/large-output.txt";
ArrayList<String> pattern1 = new ArrayList<String>();
pattern1.add("FINALLY {");
pattern1.add("close(0)");
pattern1.add("}");
int size = FileUtils.countLines(seq_output);
// verify sequence
SequencePatternVerifier pv1 = new SequencePatternVerifier(pattern1);
pv1.verify(seq_output);
double r1 = ((double) pv1.support.size()) / size;
System.out.println("sequence threshold: " + r1);
}
}
| [
"[email protected]"
] | |
b9551e712189e280bc78b106fb2a7c8197a5ba1c | bd6eaaa5e9df17cd8a0e08d6268d413a8ff5a8f7 | /src/tp5/ex7/TestJList1.java | 4c8b619f9436fb86ed0217357e579fa027f14de6 | [] | no_license | said-grich/tp_ihm | 0df5f296cb2a8c6514c56a72ee069a5a06a37615 | a171c1d6226f7e5a10b04896592936d088036ceb | refs/heads/master | 2023-03-20T08:05:47.617864 | 2021-03-17T11:03:09 | 2021-03-17T11:03:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,440 | java | package tp5.ex7;
import java.awt.*; import java.awt.event.*;
import java.util.Objects;
import javax.swing.*;
import javax.swing.event.* ; // utile pour ListSelectionListener
class FenList1 extends JFrame /*implements ListSelectionListener*/{
public FenList1(){
setTitle("Essais boite de liste"); setSize (480, 360) ;
Container contenu = getContentPane();
liste = new JList(couleurs) ;
liste.setBounds(150,10,100,30);
JLabel selectedValue=new JLabel();
selectedValue.setBounds(120,200,300,30);
contenu.add(selectedValue);
contenu.add(liste);
liste.addListSelectionListener((e)->{
if(!e.getValueIsAdjusting()){
Object valeurs = liste.getSelectedValue();
selectedValue.setText("le couleur sélectionné est :"+(String) valeurs);
}
}) ;
}
/* public void valueChanged(ListSelectionEvent e){
if (!e.getValueIsAdjusting()){//(1)
Object[] valeurs = liste.getSelectedValues();
for(var i = 0 ; i<valeurs.length ; i++)
System.out.println((String) valeurs[i]);}}
*/
private String[] couleurs = {"rouge", "bleu", "gris", "vert", "jaune",
"noir" } ;
private JList liste;
}
public class TestJList1{
public static void main(String args[]){
FenList1 fen = new FenList1();
fen.setVisible(true);
}
} | [
"[email protected]"
] | |
18395575e82128460788aef73fc95af0ee13bc5d | 952789d549bf98b84ffc02cb895f38c95b85e12c | /V_3.x/Server/tags/SpagoBI-3.3(20111222)/SpagoBIQbeEngine/src/it/eng/spagobi/engines/worksheet/services/designer/GetWorksheetFieldsAction.java | 8a8c0415c2a1502f1e68136e5f35e24f04b4eb04 | [] | no_license | emtee40/testingazuan | de6342378258fcd4e7cbb3133bb7eed0ebfebeee | f3bd91014e1b43f2538194a5eb4e92081d2ac3ae | refs/heads/master | 2020-03-26T08:42:50.873491 | 2015-01-09T16:17:08 | 2015-01-09T16:17:08 | null | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 7,679 | java | /*
* SpagoBI, the Open Source Business Intelligence suite
* © 2005-2015 Engineering Group
*
* This file is part of SpagoBI. SpagoBI is free software: you can redistribute it and/or modify it under the terms of the GNU
* Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or any later version.
* SpagoBI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received
* a copy of the GNU Lesser General Public License along with SpagoBI. If not, see: http://www.gnu.org/licenses/.
* The complete text of SpagoBI license is included in the COPYING.LESSER file.
*/
package it.eng.spagobi.engines.worksheet.services.designer;
import it.eng.spago.base.SourceBean;
import it.eng.spagobi.engines.worksheet.WorksheetEngineInstance;
import it.eng.spagobi.engines.worksheet.services.AbstractWorksheetEngineAction;
import it.eng.spagobi.tools.dataset.bo.IDataSet;
import it.eng.spagobi.tools.dataset.common.metadata.IFieldMetaData;
import it.eng.spagobi.tools.dataset.common.metadata.IFieldMetaData.FieldType;
import it.eng.spagobi.tools.dataset.common.metadata.IMetaData;
import it.eng.spagobi.tools.dataset.common.query.AggregationFunctions;
import it.eng.spagobi.utilities.assertion.Assert;
import it.eng.spagobi.utilities.engines.SpagoBIEngineServiceException;
import it.eng.spagobi.utilities.engines.SpagoBIEngineServiceExceptionHandler;
import it.eng.spagobi.utilities.service.JSONSuccess;
import java.io.IOException;
import org.apache.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONObject;
/**
* @author Davide Zerbetto ([email protected])
*/
public class GetWorksheetFieldsAction extends AbstractWorksheetEngineAction {
private static final long serialVersionUID = -5874137232683097175L;
/** Logger component. */
private static transient Logger logger = Logger.getLogger(GetWorksheetFieldsAction.class);
// PROPERTIES TO LOOK FOR INTO THE FIELDS
public static final String PROPERTY_VISIBLE = "visible";
public static final String PROPERTY_IS_SEGMENT_ATTRIBUTE = "isSegmentAttribute";
public static final String PROPERTY_IS_MANDATORY_MEASURE = "isMandatoryMeasure";
public static final String PROPERTY_AGGREGATION_FUNCTION = "aggregationFunction";
public void service(SourceBean request, SourceBean response) {
JSONObject resultsJSON;
logger.debug("IN");
try {
super.service(request, response);
WorksheetEngineInstance engineInstance = this.getEngineInstance();
Assert.assertNotNull(engineInstance, "It's not possible to execute " + this.getActionName() + " service before having properly created an instance of EngineInstance class");
IDataSet dataset = engineInstance.getDataSet();
Assert.assertNotNull(dataset, "The engine instance is missing the dataset!!");
IMetaData metadata = dataset.getMetadata();
Assert.assertNotNull(metadata, "No metadata retrieved by the dataset");
JSONArray fieldsJSON = writeFields(metadata);
logger.debug("Metadata read:");
logger.debug(fieldsJSON);
resultsJSON = new JSONObject();
resultsJSON.put("results", fieldsJSON);
try {
writeBackToClient( new JSONSuccess( resultsJSON ) );
} catch (IOException e) {
throw new SpagoBIEngineServiceException(getActionName(), "Impossible to write back the responce to the client [" + resultsJSON.toString(2)+ "]", e);
}
} catch(Throwable t) {
throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
} finally {
logger.debug("OUT");
}
}
public JSONArray writeFields(IMetaData metadata) throws Exception {
// field's meta
JSONArray fieldsMetaDataJSON = new JSONArray();
int fieldCount = metadata.getFieldCount();
logger.debug("Number of fields = " + fieldCount);
Assert.assertTrue(fieldCount > 0, "Dataset has no fields!!!");
for (int i = 0; i < fieldCount; i++) {
IFieldMetaData fieldMetaData = metadata.getFieldMeta(i);
Assert.assertNotNull(fieldMetaData, "Field metadata for position " + i + " not found.");
logger.debug("Evaluating field with name [" + fieldMetaData.getName() + "], alias [" + fieldMetaData.getAlias() + "] ...");
Object propertyRawValue = fieldMetaData.getProperty(PROPERTY_VISIBLE);
logger.debug("Read property " + PROPERTY_VISIBLE + ": its value is [" + propertyRawValue + "]");
if (propertyRawValue != null
&& (propertyRawValue instanceof Boolean)
&& ((Boolean) propertyRawValue).booleanValue() == false) {
logger.debug("The field is not visible");
continue;
} else {
logger.debug("The field is visible");
}
String fieldName = getFieldName(fieldMetaData);
String fieldHeader = getFieldAlias(fieldMetaData);
JSONObject fieldMetaDataJSON = new JSONObject();
fieldMetaDataJSON.put("id", fieldName);
fieldMetaDataJSON.put("alias", fieldHeader);
FieldType type = fieldMetaData.getFieldType();
logger.debug("The field type is " + type.name());
switch (type) {
case ATTRIBUTE:
Object isSegmentAttributeObj = fieldMetaData.getProperty(PROPERTY_IS_SEGMENT_ATTRIBUTE);
logger.debug("Read property " + PROPERTY_IS_SEGMENT_ATTRIBUTE + ": its value is [" + propertyRawValue + "]");
String attributeNature = (isSegmentAttributeObj != null
&& (isSegmentAttributeObj instanceof Boolean)
&& ((Boolean) isSegmentAttributeObj).booleanValue()) ? "segment_attribute" : "attribute";
logger.debug("The nature of the attribute is recognized as " + attributeNature);
fieldMetaDataJSON.put("nature", attributeNature);
fieldMetaDataJSON.put("funct", AggregationFunctions.NONE);
fieldMetaDataJSON.put("iconCls", attributeNature);
break;
case MEASURE:
Object isMandatoryMeasureObj = fieldMetaData.getProperty(PROPERTY_IS_MANDATORY_MEASURE);
logger.debug("Read property " + PROPERTY_IS_MANDATORY_MEASURE + ": its value is [" + isMandatoryMeasureObj + "]");
String measureNature = (isMandatoryMeasureObj != null
&& (isMandatoryMeasureObj instanceof Boolean)
&& ((Boolean) isMandatoryMeasureObj).booleanValue()) ? "mandatory_measure" : "measure";
logger.debug("The nature of the measure is recognized as " + measureNature);
fieldMetaDataJSON.put("nature", measureNature);
String aggregationFunction = (String) fieldMetaData.getProperty(PROPERTY_AGGREGATION_FUNCTION);
logger.debug("Read property " + PROPERTY_AGGREGATION_FUNCTION + ": its value is [" + aggregationFunction + "]");
fieldMetaDataJSON.put("funct", AggregationFunctions.get(aggregationFunction).getName());
fieldMetaDataJSON.put("iconCls", measureNature);
String decimalPrecision= (String) fieldMetaData.getProperty(IFieldMetaData.DECIMALPRECISION);
if(decimalPrecision!=null){
fieldMetaDataJSON.put("precision", decimalPrecision);
}else{
fieldMetaDataJSON.put("precision", "2");
}
break;
}
fieldsMetaDataJSON.put(fieldMetaDataJSON);
}
return fieldsMetaDataJSON;
}
protected String getFieldAlias(IFieldMetaData fieldMetaData) {
String fieldAlias = fieldMetaData.getAlias() != null ? fieldMetaData.getAlias() : fieldMetaData.getName();
return fieldAlias;
}
protected String getFieldName(IFieldMetaData fieldMetaData) {
String fieldName = fieldMetaData.getName();
return fieldName;
}
}
| [
"franceschini@99afaf0d-6903-0410-885a-c66a8bbb5f81"
] | franceschini@99afaf0d-6903-0410-885a-c66a8bbb5f81 |
c63c35978c9b0ab16d9a0dfac18ad7722b1b6bf0 | 9870f862633d3ba6ce4babc41ca0f12afdf18766 | /cakesClub/src/test/java/com/cakesclub/qa/testcases/OrdersPageTest.java | b3ed36ba8224d02c24155ce63975358450a4f8dd | [] | no_license | sanjibautomation/cakesClub | c4b7bda64c4403accbddd7199250882d5abdcef2 | c194938324a4879501973bab369740773d583c07 | refs/heads/master | 2023-05-11T20:33:41.967759 | 2019-07-30T06:32:55 | 2019-07-30T06:32:55 | 198,579,118 | 0 | 0 | null | 2023-05-09T18:12:12 | 2019-07-24T07:10:17 | Java | UTF-8 | Java | false | false | 2,248 | java | package com.cakesclub.qa.testcases;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.cakesclub.qa.base.TestBase;
import com.cakesclub.qa.pages.DashBoardPage;
import com.cakesclub.qa.pages.LoginPage;
import com.cakesclub.qa.pages.OrdersPage;
import qa.cakesclub.qa.util.PaidOrderSelection;
public class OrdersPageTest extends TestBase {
OrdersPage ordersPage;
DashBoardPage dashBoardPage;
LoginPage loginPage;
PaidOrderSelection paidOrderSelection;
int orderFunctionality;
public OrdersPageTest(){
super();
}
@BeforeMethod
public void setUp(){
initialization();
loginPage = new LoginPage();
dashBoardPage = loginPage.login(prop.getProperty("username"), prop.getProperty("password"));
ordersPage = new OrdersPage();
dashBoardPage.ClickOnOrdersModule();
paidOrderSelection = new PaidOrderSelection();
}
@Test
public void validateOrdersPageTest(){
String actPageName = ordersPage.validateOrdersPageName();
String reqPageName = prop.getProperty("reqOrdersPageName");
Assert.assertEquals(actPageName, reqPageName,"Error: Orders PageName Not Matching.");
}
@Test
public void paymentOrderTest() throws InterruptedException{
orderFunctionality = 1;
paidOrderSelection.selectOrder(driver, prop.getProperty("ReqOrderId"), orderFunctionality);
ordersPage.paymentOrders();
}
@Test
public void viewOrderTest() throws InterruptedException{
orderFunctionality = 2;
paidOrderSelection.selectOrder(driver, prop.getProperty("ReqOrderId"), orderFunctionality);
ordersPage.viewOrders();
}
// Track Orders is not working
// @Test
// public void trackOrderTest() throws InterruptedException{
// orderFunctionality = 3;
// paidOrderSelection.selectOrder(driver, prop.getProperty("ReqOrderId"), orderFunctionality);
// ordersPage.trackOrders();
//
// }
@Test
public void searchOrderTest(){
ordersPage.searchOrder();
}
// Failed Order Tab Actions
@Test
public void viewFailedOrdersTest() throws InterruptedException{
ordersPage.failedViewOrder();
}
@Test
public void searchFailedOrderTest(){
ordersPage.searchFailedOrder();
}
}
| [
"Sanjib@Sanjib-PC"
] | Sanjib@Sanjib-PC |
5b69327ef894fe64135befc38f4a4e6e7a6cd213 | 3761a78d0049d3ca1efd8dc28555888463d746ec | /src/main/java/pl/saltsoft/ReadFile.java | 7102a2ba276dc3273e592a29c2448c9755ea5591 | [] | no_license | pkwiecinski/ExamplesNewest | 473edbf4c071bb0f72779f2994660b2f31d1f7fd | f09627aa925f4f00c13d1e40010b6f2cac7896a9 | refs/heads/master | 2020-04-26T12:35:06.254220 | 2019-03-03T14:32:46 | 2019-03-03T14:32:46 | 173,554,387 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 758 | java | package pl.saltsoft;
import java.io.*;
public class ReadFile {
public void readLinesFromFile(String filePath) throws Exception {
File file = new File(filePath);
FileReader r = new FileReader(file);
BufferedReader br = new BufferedReader(r);
String st = br.readLine();
while ( st != null) {
System.out.println(st);
st = br.readLine();
}
}
public void writeLinesFromFile(String filePath) throws Exception {
File file = new File(filePath);
FileWriter r = new FileWriter(file);
BufferedWriter br = new BufferedWriter(r);
br.write("Hello World. I wrote this.");
br.newLine();
br.flush();
br.close();
}
}
| [
"[email protected]"
] | |
f602b8064e806a626e98686e5b8db3d15b47879a | d84f50bab4d4efd8f4d99f2d605f9b7551bbd918 | /src/main/java/com/roma/elettorale/modelli3D/helpers/enumerators/tipologiastream.java | 62b38f0bb391d448ad17afd69e31b7fbd0e75a49 | [] | no_license | angew74/modelli3D | eac77f4359a0e7db0f200b3f7c0ae8941a703d9c | 024b39c3afb25cf8acdeb448fc3582ed43f6571d | refs/heads/master | 2022-07-15T03:13:12.132615 | 2019-11-30T12:21:41 | 2019-11-30T12:21:41 | 216,188,220 | 0 | 0 | null | 2022-03-08T21:23:24 | 2019-10-19T10:26:16 | Java | UTF-8 | Java | false | false | 129 | java | package com.roma.elettorale.modelli3D.helpers.enumerators;
public enum tipologiastream {
NIENTE,
MAIL,
PROTOCOLLO
}
| [
"[email protected]"
] | |
ea926f8822fe3bc0ad08d4a0f44a9acbe71d9844 | b2b273579dd0e6d4fcd7bcde0fb503dfd6d12aee | /app/src/main/java/com/example/android/diamondcell/Sales.java | 2c13213fc629f2a2b40f8bc491091e06e1ffb4b7 | [] | no_license | raysodorus10/DiamondCell | 65b0e27734012b9bebbc5b1ffbae028043fa4f90 | 32adceb83851e94d5e265c82a1fe4a41e341a758 | refs/heads/master | 2020-06-30T07:51:52.072325 | 2019-08-16T11:18:33 | 2019-08-16T11:18:33 | 200,770,953 | 0 | 0 | null | 2019-08-07T14:09:40 | 2019-08-06T03:39:15 | Java | UTF-8 | Java | false | false | 8,507 | java | package com.example.android.diamondcell;
import android.os.Parcel;
import android.os.Parcelable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class Sales implements Parcelable
{
private String mKode;
private Date mTglMasuk;
private String mNama;
private String mAlamat;
private String mTelp;
private String mKodeJabatan;
private JenisKelamin mJenisKelamin;
private Agama mAgama;
private Date mTanggalLahir;
private String mTempatLahir;
private String mEmail;
private boolean mStatusAktif;
private String mFoto;
protected Sales(Parcel in) {
mKode = in.readString();
mTglMasuk= new Date(in.readLong());
mNama = in.readString();
mAlamat = in.readString();
mTelp = in.readString();
mKodeJabatan = in.readString();
int jk= in.readByte();
switch (jk){
case 0: mJenisKelamin=JenisKelamin.PRIA;
break;
case 1: mJenisKelamin=JenisKelamin.WANITA;
break;
}
int agm= in.readByte();
switch (agm){
case 0:
mAgama=Agama.HINDU;
break;
case 1:
mAgama=Agama.ISLAM;
break;
case 2:
mAgama=Agama.BUDDHA;
break;
case 3:
mAgama=Agama.KATOLIK;
break;
case 4:
mAgama=Agama.KRISTEN;
break;
case 5:
mAgama=Agama.KONGHUCU;
break;
case 6:
mAgama=Agama.LAINNYA;
break;
}
mTempatLahir = in.readString();
mTanggalLahir=new Date(in.readLong());
mEmail = in.readString();
mStatusAktif = in.readByte() != 0;
mFoto = in.readString();
}
public static final Creator<Sales> CREATOR = new Creator<Sales>() {
@Override
public Sales createFromParcel(Parcel in) {
return new Sales(in);
}
@Override
public Sales[] newArray(int size) {
return new Sales[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel parcel, int i) {
parcel.writeString(mKode);
parcel.writeLong(mTglMasuk.getTime());
parcel.writeString(mNama);
parcel.writeString(mAlamat);
parcel.writeString(mTelp);
parcel.writeString(mKodeJabatan);
switch (mJenisKelamin){
case PRIA:
parcel.writeByte((byte) 0);
break;
case WANITA:
parcel.writeByte((byte) 1);
break;
}
switch (mAgama){
case HINDU:
parcel.writeByte((byte) 0);
break;
case ISLAM:
parcel.writeByte((byte) 1);
break;
case BUDDHA:
parcel.writeByte((byte) 2);
break;
case KATOLIK:
parcel.writeByte((byte) 3);
break;
case KRISTEN:
parcel.writeByte((byte) 4);
break;
case KONGHUCU:
parcel.writeByte((byte) 5);
break;
case LAINNYA:
parcel.writeByte((byte) 6);
break;
}
parcel.writeString(mTempatLahir);
parcel.writeLong(mTanggalLahir.getTime());
parcel.writeString(mEmail);
parcel.writeByte((byte) (mStatusAktif ? 1 : 0));
parcel.writeString(mFoto);
}
public Sales(String mKode){
this.mKode=mKode;
//Todo: Dapatkan data dari database berdasarkan Kode Sales
}
public Sales(String mKode, Date mTglMasuk, String mNama, String mAlamat, String mTelp, String mKodeJabatan,
JenisKelamin mJenisKelamin, Agama mAgama, Date mTanggalLahir, String mTempatLahir, String mEmail,
boolean mStatusAktif, String mFoto) {
this.mKode = mKode;
this.mTglMasuk = mTglMasuk;
this.mNama = mNama;
this.mAlamat = mAlamat;
this.mTelp = mTelp;
this.mKodeJabatan = mKodeJabatan;
this.mJenisKelamin = mJenisKelamin;
this.mAgama = mAgama;
this.mTanggalLahir = mTanggalLahir;
this.mTempatLahir = mTempatLahir;
this.mEmail = mEmail;
this.mStatusAktif = mStatusAktif;
this.mFoto = mFoto;
}
public String getmKode() {
return mKode;
}
public void setmKode(String mKode) {
this.mKode = mKode;
}
public Date getmTglMasuk() {
return mTglMasuk;
}
public void setmTglMasuk(Date mTglMasuk) {
this.mTglMasuk = mTglMasuk;
}
public String getmNama() {
return mNama;
}
public void setmNama(String mNama) {
this.mNama = mNama;
}
public String getmAlamat() {
return mAlamat;
}
public void setmAlamat(String mAlamat) {
this.mAlamat = mAlamat;
}
public String getmTelp() {
return mTelp;
}
public void setmTelp(String mTelp) {
this.mTelp = mTelp;
}
public String getmKodeJabatan() {
return mKodeJabatan;
}
public void setmKodeJabatan(String mKodeJabatan) {
this.mKodeJabatan = mKodeJabatan;
}
public JenisKelamin getmJenisKelamin() {
return mJenisKelamin;
}
public void setmJenisKelamin(JenisKelamin mJenisKelamin) {
this.mJenisKelamin = mJenisKelamin;
}
public Agama getmAgama() {
return mAgama;
}
public void setmAgama(Agama mAgama) {
this.mAgama = mAgama;
}
public Date getmTanggalLahir() {
return mTanggalLahir;
}
public void setmTanggalLahir(Date mTanggalLahir) {
this.mTanggalLahir = mTanggalLahir;
}
public String getmTempatLahir() {
return mTempatLahir;
}
public void setmTempatLahir(String mTempatLahir) {
this.mTempatLahir = mTempatLahir;
}
public String getmEmail() {
return mEmail;
}
public void setmEmail(String mEmail) {
this.mEmail = mEmail;
}
public boolean ismStatusAktif() {
return mStatusAktif;
}
public void setmStatusAktif(boolean mStatusAktif) {
this.mStatusAktif = mStatusAktif;
}
public String getmFoto() {
return mFoto;
}
public void setmFoto(String mFoto) {
this.mFoto = mFoto;
}
public String getmJenisKelaminAsString(){
if (mJenisKelamin==JenisKelamin.PRIA){
return "Pria";
}else if (mJenisKelamin==JenisKelamin.WANITA){
return "Wanita";
}else return "Unkown";
}
public String getmAgamaAsString(){
switch (mAgama){
case HINDU:
return "Hindu";
case ISLAM:
return "Islam";
case BUDDHA:
return "Buddha";
case KATOLIK:
return "Katolik";
case KRISTEN:
return "Kristen";
case KONGHUCU:
return "Konghucu";
case LAINNYA:
return "Lainnya";
default:
return "Unkown";
}
}
public String getmStatusAktifAsString(){
if (mStatusAktif){
return "Aktif";
}else if (!mStatusAktif){
return "Tidak Aktif";
}else return "Unkown";
}
public String getmTanggalLahirAsString(){
SimpleDateFormat dateFormat= new SimpleDateFormat("dd MMMM yyyy", Locale.getDefault());
return dateFormat.format(mTanggalLahir);
}
public String getmTglMasukAsString(){
SimpleDateFormat dateFormat= new SimpleDateFormat("dd MMMM yyyy", Locale.getDefault());
return dateFormat.format(mTglMasuk);
}
public Jabatan getJabatan(){
//Todo: Definisikan Proses Kueri Untuk Mendapatkan Jabatan Berdasarkan Kode Jabatan
return new Jabatan("mKode","namaJabatan",2);
}
public void save(){
//Todo: Definisikan Proses Save
}
public void update(){
//Todo: Definisikan Proses Update
}
public void fetch(){
//Todo: Definisikan Proses Load Data
}
public void delete(){
//Todo: Definisikan Proses Delete
}
}
| [
"[email protected]"
] | |
d79e18cdc7b1099dbb74b9cbeb6d10e27c340445 | e0861d43361e72cd53080c96ed06383c7208df3f | /Final/src/com/blakebartenbach/thefinal/ManyLinkedListsDriver.java | b13665b28a4c694db46f917a67dff85626ebdf0c | [] | no_license | bartenbach/Data-Structures-Using-Java | e6df059397bfae632a75b2b17502c00c921532f0 | 6f4174a9150a27301cbc6575ffccf5d3840d82b7 | refs/heads/master | 2021-09-08T18:45:35.147091 | 2017-08-13T18:08:01 | 2017-08-13T18:08:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,120 | 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.blakebartenbach.thefinal;
/**
*
* @author blake
*/
public class ManyLinkedListsDriver {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// double-ended list test
DoubleEndedList dEndedList = (DoubleEndedList) ManyLinkedLists.createLinkedList(ListType.DOUBLEENDEDLIST);
dEndedList.insertFirst(50000L);
dEndedList.insertFirst(40000L);
dEndedList.insertFirst(30000L);
dEndedList.insertLast(60000L); // element inserted at the end
dEndedList.displayList();
// doubly linked list test
DoublyLinkedList dLinkedList = (DoublyLinkedList) ManyLinkedLists.createLinkedList(ListType.DOUBLYLINKEDLIST);
dLinkedList.insertFirst(50000L);
dLinkedList.insertLast(60000L);
dLinkedList.insertAfter(50000L, 55000L); // element inserted in between elements
dLinkedList.displayList();
dLinkedList.displayBackward(); // list efficiently traversed backwards
}
}
| [
"[email protected]"
] | |
5e3da19e15437afe273327ca141e1ec0dea8ba1c | f3c0028d4138c69c4ce24b2fd01e4ca595a6af4d | /app/src/main/java/com/siweisoft/nurse/ui/day/adapter/LeftDayAdapter.java | a74be07ebf03f45304550ceb9d2f98afdf29e6cb | [] | no_license | canvaser/desktop | 83138fa37b36a02d4663d5e9cb136313f501a43e | 7652ece27d050d627c95fe0934734bf05db2cb0e | refs/heads/master | 2021-01-13T03:09:42.346997 | 2017-02-07T01:43:59 | 2017-02-07T01:43:59 | 77,433,645 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,251 | java | package com.siweisoft.nurse.ui.day.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import com.siweisoft.app.R;
import com.siweisoft.base.ui.adapter.AppRecycleAdapter;
import com.siweisoft.base.ui.interf.view.OnAppItemLongClickListener;
import com.siweisoft.nurse.ui.day.bean.dbbean.DayDBBean;
import com.siweisoft.nurse.ui.day.bean.uibean.LeftDayUIBean;
import com.siweisoft.util.data.FormatUtil;
import java.util.ArrayList;
/**
* Created by ${viwmox} on 2017-01-03.
*/
public class LeftDayAdapter extends AppRecycleAdapter implements View.OnLongClickListener{
ArrayList<DayDBBean> data;
OnAppItemLongClickListener longClickListener;
public LeftDayAdapter(Context context,ArrayList<DayDBBean> data) {
super(context);
this.data = data;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = layoutInflater.inflate(R.layout.list_left_day,parent,false);
LeftDayUIBean uiBean = new LeftDayUIBean(context,v);
return uiBean;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
LeftDayUIBean uiBean = (LeftDayUIBean) holder;
uiBean.getTimeTV().setText(FormatUtil.getInstance().toNowHHMMTime(data.get(position).getStartTime())+"--"+FormatUtil.getInstance().toNowHHMMTime(data.get(position).getEndTime()));
uiBean.getContentTV().setText(data.get(position).getContentTxt()+"");
uiBean.getRootV().setOnLongClickListener(this);
uiBean.getRootV().setTag(R.id.position,position);
uiBean.getRootV().setTag(R.id.data,data.get(position));
}
@Override
public int getItemCount() {
return data.size();
}
@Override
public void onClick(View v) {
}
@Override
public boolean onLongClick(View v) {
if(longClickListener!=null){
longClickListener.onAppItemLongClick(v, (Integer) v.getTag(R.id.position));
}
return true;
}
public void setLongClickListener(OnAppItemLongClickListener longClickListener) {
this.longClickListener = longClickListener;
}
}
| [
"[email protected]"
] | |
fedfbc4cb597a4f5d70ff47b7a3b130dc1003f57 | c35c47d59fbafe61ea4617de89fe109ab418f47e | /src/com/zzu/dao/Userdao.java | c9721fa7ddf110c3a17f735c61c0e3e50fc08fcc | [] | no_license | cpt1234/gitLoveZZU | 11ca4d2c5035487877a75e7d21e90897720b6538 | ea2aaec5719ea04baaea7891c3096304cbe13974 | refs/heads/master | 2021-07-16T14:09:35.972622 | 2018-04-12T06:41:29 | 2018-04-12T06:41:29 | 95,945,255 | 0 | 0 | null | 2018-04-12T06:41:30 | 2017-07-01T05:56:40 | Java | GB18030 | Java | false | false | 1,343 | java | package com.zzu.dao;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Repository;
import com.zzu.entity.User;
import com.zzu.entity.UserInfo;
@Repository(value="userDao")
public class Userdao implements Dao{
@Resource(name="hibernateTemplate")
private HibernateTemplate hibernateTemplate;
public void setHibernateTemplate(HibernateTemplate hibernateTemplate) {
this.hibernateTemplate = hibernateTemplate;
}
boolean isSuccessful=false;
String[] userinfoDatas=new String[9];
//保存用户并返回id
public <T> Serializable save(T t) {
Serializable id=null;
hibernateTemplate.clear();
id=hibernateTemplate.save(t);
hibernateTemplate.flush();
return id;
}
//查询用户并返回用户对象
public <T> List<T> query(String sql, String values) {
List<T> list = new ArrayList<T>();
hibernateTemplate.clear();
hibernateTemplate.flush();
list.clear();
list=(List<T>) hibernateTemplate.find(sql, values);
hibernateTemplate.flush();
return list;
}
//更新操作
@Override
public <T> T update(T t) {
hibernateTemplate.clear();
hibernateTemplate.update(t);
hibernateTemplate.flush();
return null;
}
}
| [
"[email protected]"
] | |
57ee5e331ca7c0a48416bae25a8f19e672f78730 | 3eb8a014643d54a3ac186039879bd517e63b130c | /src/main/java/indi/zqc/warehouse/enums/DWZStatusCode.java | 73e10bdf5378c0e8cd2400156a2e88dc813e2730 | [] | no_license | zhuqianchang/warehouse | 0a170cb58b2067581fbc8675dc95670d6dae08df | 42b475a77d7c05b3ea716e81650e2a5964536c31 | refs/heads/master | 2021-05-10T10:40:45.295602 | 2018-05-07T01:43:29 | 2018-05-07T01:43:29 | 118,389,758 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 744 | java | package indi.zqc.warehouse.enums;
/**
* Title : DwzStatusCode.java
* Package : indi.zqc.warehouse.enums
* Description : DWZ异步请求响应码
* Create on : 2018/1/24 20:11
*
* @author zhu.qianchang
* @version v1.0.0
*/
public enum DWZStatusCode {
OK(200, "成功"),
ERROR(300, "失败"),
TIMEOUT(301, "超时");
private int key;
private String value;
DWZStatusCode(int key, String value) {
this.key = key;
this.value = value;
}
public int getKey() {
return key;
}
public void setKey(int key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
| [
"[email protected]"
] | |
55bcaf38fa9114aa27cf2bcb2e81800ecbdf0033 | 0451be0cedc507c47a30123a4042c1cd52e7970c | /main/mcheli/eval/eval/exp/LetDivExpression.java | add9441ec512b3b69328f5e5dc4ca9f58e4d4601 | [] | no_license | 9Valjew/intellectual-property-is-overrated | 70e8b2dc4c6513d80e01cf202b4f4fb93a8b5f0a | c79b499e0f37a67fa4492f2705b1da9371f10958 | refs/heads/master | 2023-05-06T14:33:27.610380 | 2021-05-15T22:10:24 | 2021-05-15T22:10:24 | 367,691,296 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,092 | java | package mcheli.eval.eval.exp;
public class LetDivExpression extends DivExpression
{
public LetDivExpression() {
this.setOperator("/=");
}
protected LetDivExpression(final LetDivExpression from, final ShareExpValue s) {
super(from, s);
}
@Override
public AbstractExpression dup(final ShareExpValue s) {
return new LetDivExpression(this, s);
}
@Override
public long evalLong() {
final long val = super.evalLong();
this.expl.let(val, this.pos);
return val;
}
@Override
public double evalDouble() {
final double val = super.evalDouble();
this.expl.let(val, this.pos);
return val;
}
@Override
public Object evalObject() {
final Object val = super.evalObject();
this.expl.let(val, this.pos);
return val;
}
@Override
protected AbstractExpression replace() {
this.expl = this.expl.replaceVar();
this.expr = this.expr.replace();
return this.share.repl.replaceLet(this);
}
}
| [
"[email protected]"
] | |
fa04360097b8b251ab09f7e08eb7d19f34c52cfd | d386180708ed8be5ce1eccfce4eac05f2dd1982a | /PlayersAndTeams/src/test/java/com/codingdojo/mvc/PlayersAndTeamsApplicationTests.java | 1b5775c7d1f95d87e2487aaf4f98b399a9ae052f | [] | no_license | AnindoKhan/Java | 720ced87ce9a68fabc3b2120bbd0bbf3d5bb7f5a | 9d10534a9c92da19a13f58a8f47f7af43e081c22 | refs/heads/master | 2023-06-21T03:28:01.808640 | 2021-07-21T20:27:53 | 2021-07-21T20:27:53 | 388,227,476 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 219 | java | package com.codingdojo.mvc;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class PlayersAndTeamsApplicationTests {
@Test
void contextLoads() {
}
}
| [
"[email protected]"
] | |
a8e6f8fbfd873b5069d96ed4e288d8b12f67c3e8 | 597ae0da8444c42e33583ae5e34aafb787a25fbc | /hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java | 025a17b23cf35101f5cf9c7d5cdc1238f6b2ee13 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | artonio/hapi-fhir | 6d0979d6da54fd01ca3a80e944ad2ab0ccb5534d | c8a3e99d8f34fbe1e077be2ebe7cdecf787b170d | refs/heads/master | 2021-08-06T18:45:43.165648 | 2020-05-14T21:50:19 | 2020-05-14T21:50:19 | 179,379,046 | 1 | 0 | Apache-2.0 | 2020-05-14T21:51:55 | 2019-04-03T22:22:40 | Java | UTF-8 | Java | false | false | 3,063 | java | package ca.uhn.fhir.rest.param;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 - 2020 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import static org.apache.commons.lang3.StringUtils.defaultString;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
public class UriParam extends BaseParam implements IQueryParameterType {
private UriParamQualifierEnum myQualifier;
private String myValue;
/**
* Constructor
*/
public UriParam() {
super();
}
public UriParam(String theValue) {
setValue(theValue);
}
@Override
String doGetQueryParameterQualifier() {
return myQualifier != null ? myQualifier.getValue() : null;
}
@Override
String doGetValueAsQueryToken(FhirContext theContext) {
return ParameterUtil.escape(myValue);
}
@Override
void doSetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue) {
myQualifier = UriParamQualifierEnum.forValue(theQualifier);
myValue = ParameterUtil.unescape(theValue);
}
/**
* Gets the qualifier for this param (may be <code>null</code> and generally will be)
*/
public UriParamQualifierEnum getQualifier() {
return myQualifier;
}
public String getValue() {
return myValue;
}
public StringDt getValueAsStringDt() {
return new StringDt(myValue);
}
public UriDt getValueAsUriDt() {
return new UriDt(myValue);
}
public String getValueNotNull() {
return defaultString(myValue);
}
public boolean isEmpty() {
return StringUtils.isEmpty(myValue);
}
/**
* Sets the qualifier for this param (may be <code>null</code> and generally will be)
*
* @return Returns a reference to <code>this</code> for easy method chanining
*/
public UriParam setQualifier(UriParamQualifierEnum theQualifier) {
myQualifier = theQualifier;
return this;
}
/**
* Sets the value for this param
*
* @return Returns a reference to <code>this</code> for easy method chanining
*/
public UriParam setValue(String theValue) {
myValue = theValue;
return this;
}
@Override
public String toString() {
ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
builder.append("value", getValue());
return builder.toString();
}
}
| [
"[email protected]"
] | |
395c5b438d7e64910ac598a2b168020d4151c475 | a770e95028afb71f3b161d43648c347642819740 | /sources/org/telegram/ui/Cells/FeaturedStickerSetInfoCell.java | 3b9b155ea3add8a3d20e584b2c46593a31c92b73 | [] | no_license | Edicksonjga/TGDecompiledBeta | d7aa48a2b39bbaefd4752299620ff7b72b515c83 | d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b | refs/heads/master | 2023-08-25T04:12:15.592281 | 2021-10-28T20:24:07 | 2021-10-28T20:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 19,483 | java | package org.telegram.ui.Cells;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.util.Property;
import android.view.View;
import android.view.animation.OvershootInterpolator;
import android.widget.FrameLayout;
import android.widget.TextView;
import java.util.List;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MediaDataController;
import org.telegram.messenger.UserConfig;
import org.telegram.tgnet.TLRPC$StickerSetCovered;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.ActionBar.ThemeDescription;
import org.telegram.ui.Components.ColorSpanUnderline;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.ProgressButton;
import org.telegram.ui.Components.RecyclerListView;
public class FeaturedStickerSetInfoCell extends FrameLayout {
/* access modifiers changed from: private */
public ProgressButton addButton;
private AnimatorSet animatorSet;
private boolean canAddRemove;
private int currentAccount = UserConfig.selectedAccount;
/* access modifiers changed from: private */
public TextView delButton;
private boolean hasOnClick;
private TextView infoTextView;
/* access modifiers changed from: private */
public boolean isInstalled;
private boolean isUnread;
private TextView nameTextView;
private boolean needDivider;
private Paint paint = new Paint(1);
private final Theme.ResourcesProvider resourcesProvider;
private TLRPC$StickerSetCovered set;
private int stickerSetNameSearchIndex;
private int stickerSetNameSearchLength;
float unreadProgress;
private CharSequence url;
private int urlSearchLength;
public FeaturedStickerSetInfoCell(Context context, int i, boolean z, boolean z2, Theme.ResourcesProvider resourcesProvider2) {
super(context);
FrameLayout.LayoutParams layoutParams;
FrameLayout.LayoutParams layoutParams2;
FrameLayout.LayoutParams layoutParams3;
FrameLayout.LayoutParams layoutParams4;
this.canAddRemove = z2;
this.resourcesProvider = resourcesProvider2;
TextView textView = new TextView(context);
this.nameTextView = textView;
textView.setTextColor(getThemedColor("chat_emojiPanelTrendingTitle"));
this.nameTextView.setTextSize(1, 17.0f);
this.nameTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.nameTextView.setEllipsize(TextUtils.TruncateAt.END);
this.nameTextView.setSingleLine(true);
if (z) {
layoutParams = LayoutHelper.createFrameRelatively(-2.0f, -2.0f, 8388659, (float) i, 8.0f, 40.0f, 0.0f);
} else {
layoutParams = LayoutHelper.createFrame(-2, -2.0f, 51, (float) i, 8.0f, 40.0f, 0.0f);
}
addView(this.nameTextView, layoutParams);
TextView textView2 = new TextView(context);
this.infoTextView = textView2;
textView2.setTextColor(getThemedColor("chat_emojiPanelTrendingDescription"));
this.infoTextView.setTextSize(1, 13.0f);
this.infoTextView.setEllipsize(TextUtils.TruncateAt.END);
this.infoTextView.setSingleLine(true);
if (z) {
layoutParams2 = LayoutHelper.createFrameRelatively(-2.0f, -2.0f, 8388659, (float) i, 30.0f, 100.0f, 0.0f);
} else {
layoutParams2 = LayoutHelper.createFrame(-2, -2.0f, 51, (float) i, 30.0f, 100.0f, 0.0f);
}
addView(this.infoTextView, layoutParams2);
if (z2) {
ProgressButton progressButton = new ProgressButton(context);
this.addButton = progressButton;
progressButton.setTextColor(getThemedColor("featuredStickers_buttonText"));
this.addButton.setText(LocaleController.getString("Add", NUM));
if (z) {
layoutParams3 = LayoutHelper.createFrameRelatively(-2.0f, 28.0f, 8388661, 0.0f, 16.0f, 14.0f, 0.0f);
} else {
layoutParams3 = LayoutHelper.createFrame(-2, 28.0f, 53, 0.0f, 16.0f, 14.0f, 0.0f);
}
addView(this.addButton, layoutParams3);
TextView textView3 = new TextView(context);
this.delButton = textView3;
textView3.setGravity(17);
this.delButton.setTextColor(getThemedColor("featuredStickers_removeButtonText"));
this.delButton.setTextSize(1, 14.0f);
this.delButton.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.delButton.setText(LocaleController.getString("StickersRemove", NUM));
if (z) {
layoutParams4 = LayoutHelper.createFrameRelatively(-2.0f, 28.0f, 8388661, 0.0f, 16.0f, 14.0f, 0.0f);
} else {
layoutParams4 = LayoutHelper.createFrame(-2, 28.0f, 53, 0.0f, 16.0f, 14.0f, 0.0f);
}
addView(this.delButton, layoutParams4);
}
setWillNotDraw(false);
updateColors();
}
/* access modifiers changed from: protected */
public void onMeasure(int i, int i2) {
super.onMeasure(View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(i), NUM), View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(60.0f), NUM));
if (this.canAddRemove) {
int measuredWidth = this.addButton.getMeasuredWidth();
int measuredWidth2 = this.delButton.getMeasuredWidth();
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.delButton.getLayoutParams();
if (measuredWidth2 < measuredWidth) {
layoutParams.rightMargin = AndroidUtilities.dp(14.0f) + ((measuredWidth - measuredWidth2) / 2);
} else {
layoutParams.rightMargin = AndroidUtilities.dp(14.0f);
}
measureChildWithMargins(this.nameTextView, i, measuredWidth, i2, 0);
}
}
public void setAddOnClickListener(View.OnClickListener onClickListener) {
if (this.canAddRemove) {
this.hasOnClick = true;
this.addButton.setOnClickListener(onClickListener);
this.delButton.setOnClickListener(onClickListener);
}
}
public void setAddDrawProgress(boolean z, boolean z2) {
if (this.canAddRemove) {
this.addButton.setDrawProgress(z, z2);
}
}
public void setStickerSet(TLRPC$StickerSetCovered tLRPC$StickerSetCovered, boolean z) {
setStickerSet(tLRPC$StickerSetCovered, z, false, 0, 0, false);
}
public void setStickerSet(TLRPC$StickerSetCovered tLRPC$StickerSetCovered, boolean z, boolean z2, int i, int i2) {
setStickerSet(tLRPC$StickerSetCovered, z, z2, i, i2, false);
}
public void setStickerSet(TLRPC$StickerSetCovered tLRPC$StickerSetCovered, boolean z, boolean z2, int i, int i2, boolean z3) {
AnimatorSet animatorSet2 = this.animatorSet;
if (animatorSet2 != null) {
animatorSet2.cancel();
this.animatorSet = null;
}
float f = 1.0f;
if (this.set != tLRPC$StickerSetCovered) {
this.unreadProgress = z ? 1.0f : 0.0f;
invalidate();
}
this.set = tLRPC$StickerSetCovered;
this.stickerSetNameSearchIndex = i;
this.stickerSetNameSearchLength = i2;
if (i2 != 0) {
updateStickerSetNameSearchSpan();
} else {
this.nameTextView.setText(tLRPC$StickerSetCovered.set.title);
}
this.infoTextView.setText(LocaleController.formatPluralString("Stickers", tLRPC$StickerSetCovered.set.count));
this.isUnread = z;
if (!this.canAddRemove) {
return;
}
if (this.hasOnClick) {
this.addButton.setVisibility(0);
boolean z4 = z3 || MediaDataController.getInstance(this.currentAccount).isStickerPackInstalled(tLRPC$StickerSetCovered.set.id);
this.isInstalled = z4;
if (z2) {
if (z4) {
this.delButton.setVisibility(0);
} else {
this.addButton.setVisibility(0);
}
AnimatorSet animatorSet3 = new AnimatorSet();
this.animatorSet = animatorSet3;
animatorSet3.setDuration(250);
AnimatorSet animatorSet4 = this.animatorSet;
Animator[] animatorArr = new Animator[6];
TextView textView = this.delButton;
Property property = View.ALPHA;
float[] fArr = new float[1];
fArr[0] = this.isInstalled ? 1.0f : 0.0f;
animatorArr[0] = ObjectAnimator.ofFloat(textView, property, fArr);
TextView textView2 = this.delButton;
Property property2 = View.SCALE_X;
float[] fArr2 = new float[1];
fArr2[0] = this.isInstalled ? 1.0f : 0.0f;
animatorArr[1] = ObjectAnimator.ofFloat(textView2, property2, fArr2);
TextView textView3 = this.delButton;
Property property3 = View.SCALE_Y;
float[] fArr3 = new float[1];
fArr3[0] = this.isInstalled ? 1.0f : 0.0f;
animatorArr[2] = ObjectAnimator.ofFloat(textView3, property3, fArr3);
ProgressButton progressButton = this.addButton;
Property property4 = View.ALPHA;
float[] fArr4 = new float[1];
fArr4[0] = this.isInstalled ? 0.0f : 1.0f;
animatorArr[3] = ObjectAnimator.ofFloat(progressButton, property4, fArr4);
ProgressButton progressButton2 = this.addButton;
Property property5 = View.SCALE_X;
float[] fArr5 = new float[1];
fArr5[0] = this.isInstalled ? 0.0f : 1.0f;
animatorArr[4] = ObjectAnimator.ofFloat(progressButton2, property5, fArr5);
ProgressButton progressButton3 = this.addButton;
Property property6 = View.SCALE_Y;
float[] fArr6 = new float[1];
if (this.isInstalled) {
f = 0.0f;
}
fArr6[0] = f;
animatorArr[5] = ObjectAnimator.ofFloat(progressButton3, property6, fArr6);
animatorSet4.playTogether(animatorArr);
this.animatorSet.addListener(new AnimatorListenerAdapter() {
public void onAnimationEnd(Animator animator) {
if (FeaturedStickerSetInfoCell.this.isInstalled) {
FeaturedStickerSetInfoCell.this.addButton.setVisibility(4);
} else {
FeaturedStickerSetInfoCell.this.delButton.setVisibility(4);
}
}
});
this.animatorSet.setInterpolator(new OvershootInterpolator(1.02f));
this.animatorSet.start();
} else if (z4) {
this.delButton.setVisibility(0);
this.delButton.setAlpha(1.0f);
this.delButton.setScaleX(1.0f);
this.delButton.setScaleY(1.0f);
this.addButton.setVisibility(4);
this.addButton.setAlpha(0.0f);
this.addButton.setScaleX(0.0f);
this.addButton.setScaleY(0.0f);
} else {
this.addButton.setVisibility(0);
this.addButton.setAlpha(1.0f);
this.addButton.setScaleX(1.0f);
this.addButton.setScaleY(1.0f);
this.delButton.setVisibility(4);
this.delButton.setAlpha(0.0f);
this.delButton.setScaleX(0.0f);
this.delButton.setScaleY(0.0f);
}
} else {
this.addButton.setVisibility(8);
}
}
private void updateStickerSetNameSearchSpan() {
if (this.stickerSetNameSearchLength != 0) {
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(this.set.set.title);
try {
ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(getThemedColor("windowBackgroundWhiteBlueText4"));
int i = this.stickerSetNameSearchIndex;
spannableStringBuilder.setSpan(foregroundColorSpan, i, this.stickerSetNameSearchLength + i, 33);
} catch (Exception unused) {
}
this.nameTextView.setText(spannableStringBuilder);
}
}
public void setUrl(CharSequence charSequence, int i) {
this.url = charSequence;
this.urlSearchLength = i;
updateUrlSearchSpan();
}
private void updateUrlSearchSpan() {
if (this.url != null) {
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(this.url);
try {
spannableStringBuilder.setSpan(new ColorSpanUnderline(getThemedColor("windowBackgroundWhiteBlueText4")), 0, this.urlSearchLength, 33);
spannableStringBuilder.setSpan(new ColorSpanUnderline(getThemedColor("chat_emojiPanelTrendingDescription")), this.urlSearchLength, this.url.length(), 33);
} catch (Exception unused) {
}
this.infoTextView.setText(spannableStringBuilder);
}
}
public boolean isInstalled() {
return this.isInstalled;
}
public TLRPC$StickerSetCovered getStickerSet() {
return this.set;
}
public void setNeedDivider(boolean z) {
this.needDivider = z;
}
/* access modifiers changed from: protected */
public void onDraw(Canvas canvas) {
boolean z = this.isUnread;
if (z || this.unreadProgress != 0.0f) {
if (z) {
float f = this.unreadProgress;
if (f != 1.0f) {
float f2 = f + 0.16f;
this.unreadProgress = f2;
if (f2 > 1.0f) {
this.unreadProgress = 1.0f;
} else {
invalidate();
}
this.paint.setColor(getThemedColor("featuredStickers_unread"));
canvas.drawCircle((float) (this.nameTextView.getRight() + AndroidUtilities.dp(12.0f)), (float) AndroidUtilities.dp(20.0f), ((float) AndroidUtilities.dp(4.0f)) * this.unreadProgress, this.paint);
}
}
if (!z) {
float f3 = this.unreadProgress;
if (f3 != 0.0f) {
float f4 = f3 - 0.16f;
this.unreadProgress = f4;
if (f4 < 0.0f) {
this.unreadProgress = 0.0f;
} else {
invalidate();
}
}
}
this.paint.setColor(getThemedColor("featuredStickers_unread"));
canvas.drawCircle((float) (this.nameTextView.getRight() + AndroidUtilities.dp(12.0f)), (float) AndroidUtilities.dp(20.0f), ((float) AndroidUtilities.dp(4.0f)) * this.unreadProgress, this.paint);
}
if (this.needDivider) {
canvas.drawLine(0.0f, 0.0f, (float) getWidth(), 0.0f, Theme.dividerPaint);
}
}
public void updateColors() {
if (this.canAddRemove) {
this.addButton.setProgressColor(getThemedColor("featuredStickers_buttonProgress"));
this.addButton.setBackgroundRoundRect(getThemedColor("featuredStickers_addButton"), getThemedColor("featuredStickers_addButtonPressed"));
}
updateStickerSetNameSearchSpan();
updateUrlSearchSpan();
}
public static void createThemeDescriptions(List<ThemeDescription> list, RecyclerListView recyclerListView, ThemeDescription.ThemeDescriptionDelegate themeDescriptionDelegate) {
List<ThemeDescription> list2 = list;
list2.add(new ThemeDescription((View) recyclerListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[]{FeaturedStickerSetInfoCell.class}, new String[]{"nameTextView"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, "chat_emojiPanelTrendingTitle"));
RecyclerListView recyclerListView2 = recyclerListView;
list2.add(new ThemeDescription((View) recyclerListView2, ThemeDescription.FLAG_TEXTCOLOR, new Class[]{FeaturedStickerSetInfoCell.class}, new String[]{"infoTextView"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, "chat_emojiPanelTrendingDescription"));
RecyclerListView recyclerListView3 = recyclerListView;
list2.add(new ThemeDescription((View) recyclerListView3, ThemeDescription.FLAG_TEXTCOLOR, new Class[]{FeaturedStickerSetInfoCell.class}, new String[]{"addButton"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, "featuredStickers_buttonText"));
list2.add(new ThemeDescription((View) recyclerListView2, ThemeDescription.FLAG_TEXTCOLOR, new Class[]{FeaturedStickerSetInfoCell.class}, new String[]{"delButton"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, "featuredStickers_removeButtonText"));
list2.add(new ThemeDescription(recyclerListView3, 0, new Class[]{FeaturedStickerSetInfoCell.class}, (Paint) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, "featuredStickers_unread"));
RecyclerListView recyclerListView4 = recyclerListView;
list2.add(new ThemeDescription(recyclerListView4, 0, new Class[]{FeaturedStickerSetInfoCell.class}, Theme.dividerPaint, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, "divider"));
list2.add(new ThemeDescription((View) null, 0, (Class[]) null, (Paint) null, (Drawable[]) null, themeDescriptionDelegate, "featuredStickers_buttonProgress"));
ThemeDescription.ThemeDescriptionDelegate themeDescriptionDelegate2 = themeDescriptionDelegate;
list2.add(new ThemeDescription((View) null, 0, (Class[]) null, (Paint) null, (Drawable[]) null, themeDescriptionDelegate2, "featuredStickers_addButton"));
ThemeDescription.ThemeDescriptionDelegate themeDescriptionDelegate3 = themeDescriptionDelegate;
list2.add(new ThemeDescription((View) null, 0, (Class[]) null, (Paint) null, (Drawable[]) null, themeDescriptionDelegate3, "featuredStickers_addButtonPressed"));
list2.add(new ThemeDescription((View) null, 0, (Class[]) null, (Paint) null, (Drawable[]) null, themeDescriptionDelegate2, "windowBackgroundWhiteBlueText4"));
list2.add(new ThemeDescription((View) null, 0, (Class[]) null, (Paint) null, (Drawable[]) null, themeDescriptionDelegate3, "chat_emojiPanelTrendingDescription"));
}
private int getThemedColor(String str) {
Theme.ResourcesProvider resourcesProvider2 = this.resourcesProvider;
Integer color = resourcesProvider2 != null ? resourcesProvider2.getColor(str) : null;
return color != null ? color.intValue() : Theme.getColor(str);
}
}
| [
"[email protected]"
] | |
50a6cc3185137289e235a0802316be28cfed4c3b | 1bdab33b7bba71fc03965156649652f3462b2fc2 | /src/test/java/Second/JavaLearning/JavaLearning/PrimeNumber.java | 0dba887498bf272cc656f4b6ec79deb5fede3012 | [] | no_license | narendrareddytippala/JavaLearning | 80f7a178bf30666975d9a781057ba33318b4a81c | a594859b283699ddcb3e5bc2d0e21d5be8ac6e2a | refs/heads/main | 2023-04-10T05:54:26.718255 | 2021-04-05T16:36:47 | 2021-04-05T16:36:47 | 354,895,039 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 328 | java | package Second.JavaLearning.JavaLearning;
public class PrimeNumber {
public static void main(String[] args) {
int num = 4;
int count=0;
for(int i =1;i<=num;i++){
if(num%i==0){
count++;
}
}
if(count==2){
System.out.println("Its Prime number");
}else{ System.out.println("Its not Prime number");}
}
}
| [
"[email protected]"
] | |
ca857146f4c562e8c9d4d51ff8ea3e26ff7e713d | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a039/A039148Test.java | 5a00f3370e7b5cd6bc3aa920d91fb9e2b81fec1e | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a039;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A039148Test extends AbstractSequenceTest {
}
| [
"[email protected]"
] | |
1bbefb5621d0fe94b0ec0fc1d1bb61318fa2b35a | 6a48246db56e3ea89762a789c0482a7c06d21ab8 | /opensource/easeui/src/main/java/com/hyphenate/easeui/ui/EaseGroupListener.java | 403bbbdf18c7046a994db4f7783be0f99978454a | [
"Apache-2.0"
] | permissive | y1xian/What | d7cddb60010723dfed83bb2dafebe57ffec8f91c | ddd57d3a5095510773041df08af184ef6ce8ceae | refs/heads/master | 2021-06-21T19:30:34.174368 | 2021-04-09T02:27:39 | 2021-04-09T02:27:39 | 208,196,833 | 55 | 8 | Apache-2.0 | 2019-10-20T14:56:18 | 2019-09-13T04:44:31 | Kotlin | UTF-8 | Java | false | false | 2,450 | java | package com.hyphenate.easeui.ui;
import com.hyphenate.EMGroupChangeListener;
import com.hyphenate.chat.EMMucSharedFile;
import java.util.List;
/**
* group change listener
*
*/
public abstract class EaseGroupListener implements EMGroupChangeListener{
@Override
public void onInvitationReceived(String groupId, String groupName, String inviter, String reason) {
}
@Override
public void onRequestToJoinReceived(String groupId, String groupName, String applyer, String reason) {
}
@Override
public void onRequestToJoinAccepted(String groupId, String groupName, String accepter) {
}
@Override
public void onRequestToJoinDeclined(String groupId, String groupName, String decliner, String reason) {
}
@Override
public void onInvitationAccepted(String groupId, String inviter, String reason) {
}
@Override
public void onInvitationDeclined(String groupId, String invitee, String reason) {
}
@Override
public void onAutoAcceptInvitationFromGroup(String groupId, String inviter, String inviteMessage) {
}
@Override
public void onMuteListAdded(String groupId, final List<String> mutes, final long muteExpire) {
}
@Override
public void onMuteListRemoved(String groupId, final List<String> mutes) {
}
@Override
public void onWhiteListAdded(String groupId, List<String> whitelist) {
}
@Override
public void onWhiteListRemoved(String groupId, List<String> whitelist) {
}
@Override
public void onAllMemberMuteStateChanged(String groupId, boolean isMuted) {
}
@Override
public void onAdminAdded(String groupId, String administrator) {
}
@Override
public void onAdminRemoved(String groupId, String administrator) {
}
@Override
public void onOwnerChanged(String groupId, String newOwner, String oldOwner) {
}
@Override
public void onMemberJoined(final String groupId, final String member){
}
@Override
public void onMemberExited(final String groupId, final String member) {
}
@Override
public void onAnnouncementChanged(final String groupId, final String announcement) {
}
@Override
public void onSharedFileAdded(final String groupId, final EMMucSharedFile shareFile) {
}
@Override
public void onSharedFileDeleted(final String groupId, final String fileId) {
}
}
| [
"[email protected]"
] | |
9b4edf63faaf7d947aa16cb98e5847c7c167fcd5 | bbdfdcc197523fc8033d2489e418f97ac97a123a | /FJ-93/src/br/com/alura/aula/javaavancado/Pagamento.java | 4b90a03cc7c046354fc56d37b5d8e6c510f5da9f | [] | no_license | robinsonbrz/estudos | 7a6615de3d06469d50a26f501a8f22524993ce99 | 3bf61f0253320486616cb2f652c585f7cce2e24e | refs/heads/master | 2021-05-13T23:45:33.846564 | 2017-04-25T19:30:26 | 2017-04-25T19:30:26 | 116,524,224 | 1 | 0 | null | 2018-01-06T23:55:24 | 2018-01-06T23:55:24 | null | UTF-8 | Java | false | false | 706 | java | package br.com.alura.aula.javaavancado;
import java.util.Calendar;
public class Pagamento{
private String nome;
private double valor;
private Calendar data;
private Documento documentoPagador;
public Documento getCnpjPagador() {
return documentoPagador;
}
public void setCnpjPagador(Documento cnpjPagador) {
this.documentoPagador = cnpjPagador;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public double getValor() {
return this.valor;
}
public void setValor(double valor) {
this.valor = valor;
}
public Calendar getData() {
return this.data;
}
public void setData(Calendar data) {
this.data = data;
}
} | [
"[email protected]"
] | |
dedbd158bc865ffe01957638987cce45356f6690 | 386f86b60bb4371359b997b5cb1f0000f37d086b | /src/main/java/pojo/Artikel.java | 8534375e74cb7694df4a4b82754719b7e1298dcd | [] | no_license | HdeJonge/KlantBestellingBasic | ecc21e1165162867ba69decafe7a0b7c256005a6 | b00d3c4bb38788597cb05b7038ad30f78d3ba79e | refs/heads/master | 2021-01-21T14:53:14.747560 | 2017-08-20T13:36:19 | 2017-08-20T13:36:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 852 | java | package pojo;
import java.math.BigDecimal;
public class Artikel {
Integer id;
String naam;
BigDecimal prijs;
Integer voorraad;
public Artikel(){
}
public Artikel(String naam, BigDecimal prijs, int voorraad) {
this.naam = naam;
this.prijs = prijs;
this.voorraad= voorraad;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNaam() {
return naam;
}
public void setNaam(String naam) {
this.naam = naam;
}
public BigDecimal getPrijs() {
return prijs;
}
public void setPrijs(BigDecimal price) {
this.prijs = price;
}
public Integer getVoorraad() {
return voorraad;
}
public void setVoorraad(Integer voorraad) {
this.voorraad = voorraad;
}
public String toString(){
return "naam=" + naam
+ " prijs=" + prijs
+ " voorrad=" + voorraad;
}
}
| [
"[email protected]"
] | |
dd9b45b8961a1eefd447422582d1cdea1ab953a5 | c6663674288b84a1a56eb3ecdc5dc63743d58ac7 | /src/main/java/com/pheu/consumer/IConsumerManager.java | 3b3930d0eb96b892d59588ff45f1bd13140dd760 | [] | no_license | quynt-tiki/search-util | e7334d76262cbed3a5a7ce6d8687148b96b10062 | f780c84e43011e3d05acdbbe02ac73fc38d0b76a | refs/heads/master | 2020-04-17T04:09:19.931684 | 2019-01-17T11:44:51 | 2019-01-17T11:44:51 | 166,216,483 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package com.pheu.consumer;
import java.util.List;
public interface IConsumerManager
{
public String registerConsumer(String paramString, IConsumer paramIConsumer);
public void removeConsumer(String paramString);
public void startConsumer(String paramString);
public void stopConsumer(String paramString);
public IConsumer getConsumer(String paramString);
public List<IConsumer> listConsumer();
public void startAll();
public void stopAll();
}
| [
"[email protected]"
] | |
a0483f8bee1fbd5f1bbb1c4d40e0c7bc36064824 | 77e407ac1bb6ce56456d824f3b4374403b9f263a | /src/com/badlogic/androidgames/framework/gl/Animation.java | af88edff7016d9f94927c228a79ab55d9ad2f9bd | [] | no_license | nhatuhoang91/magic-box | a21e4d1d9d937c54e5f4fad8fa711515ff4a7437 | e95d0a84492e2905e24ec767f5c442d3b83214f0 | refs/heads/master | 2020-12-01T15:29:57.348589 | 2019-12-29T00:00:56 | 2019-12-29T00:00:56 | 230,668,813 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 717 | java | package com.badlogic.androidgames.framework.gl;
public class Animation {
public static final int ANIMATION_LOOPING = 0;
public static final int ANIMATION_NONLOOPING = 1;
final TextureRegion[] keyFrames;
final float frameDuration;
public Animation(float frameDuration, TextureRegion ... keyFrames){
this.frameDuration = frameDuration;
this.keyFrames = keyFrames;
}
public TextureRegion getKeyFrame(float stateTime, int mode){
int frameNumber = (int)(stateTime/frameDuration);
if(mode == ANIMATION_NONLOOPING){
frameNumber = Math.min(keyFrames.length - 1, frameNumber);
}else{
frameNumber = frameNumber % keyFrames.length;
}
return keyFrames[frameNumber];
}
}
| [
"[email protected]"
] | |
63881a2ddede308250e3d3370d2f0784ed9359b0 | c4a14d70951d7ec5aac7fe7ebb2db891cfe6c0b1 | /modulos/apps/LOCALGIS-Workbench/src/main/java/com/vividsolutions/jump/workbench/ui/plugin/ViewSchemaPlugIn.java | d35e8e68573d5df751966ea17a2cd58d78e501dc | [] | no_license | pepeysusmapas/allocalgis | 925756321b695066775acd012f9487cb0725fcde | c14346d877753ca17339f583d469dbac444ffa98 | refs/heads/master | 2020-09-14T20:15:26.459883 | 2016-09-27T10:08:32 | 2016-09-27T10:08:32 | null | 0 | 0 | null | null | null | null | WINDOWS-1258 | Java | false | false | 36,048 | java | /*
* The Unified Mapping Platform (JUMP) is an extensible, interactive GUI
* for visualizing and manipulating spatial features with geometry and attributes.
*
* Copyright (C) 2003 Vivid Solutions
*
* 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.
*
* For more information, contact:
*
* Vivid Solutions
* Suite #1A
* 2328 Government Street
* Victoria BC V8T 5G5
* Canada
*
* (250)385-6040
* www.vividsolutions.com
*/
package com.vividsolutions.jump.workbench.ui.plugin;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import javax.swing.ImageIcon;
import javax.swing.JInternalFrame;
import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
import com.geopista.app.AppContext;
import com.geopista.editor.WorkbenchGuiComponent;
import com.geopista.feature.Column;
import com.geopista.feature.Domain;
import com.geopista.feature.GeopistaSchema;
import com.geopista.feature.Table;
import com.geopista.util.ApplicationContext;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.io.ParseException;
import com.vividsolutions.jts.io.WKTReader;
import com.vividsolutions.jts.util.Assert;
import com.vividsolutions.jump.feature.AttributeType;
import com.vividsolutions.jump.feature.BasicFeature;
import com.vividsolutions.jump.feature.Feature;
import com.vividsolutions.jump.feature.FeatureDataset;
import com.vividsolutions.jump.feature.FeatureSchema;
import com.vividsolutions.jump.util.Blackboard;
import com.vividsolutions.jump.util.FlexibleDateParser;
import com.vividsolutions.jump.util.StringUtil;
import com.vividsolutions.jump.workbench.WorkbenchContext;
import com.vividsolutions.jump.workbench.model.CategoryEvent;
import com.vividsolutions.jump.workbench.model.FeatureEvent;
import com.vividsolutions.jump.workbench.model.Layer;
import com.vividsolutions.jump.workbench.model.LayerEvent;
import com.vividsolutions.jump.workbench.model.LayerEventType;
import com.vividsolutions.jump.workbench.model.LayerListener;
import com.vividsolutions.jump.workbench.model.LayerManager;
import com.vividsolutions.jump.workbench.model.LayerManagerProxy;
import com.vividsolutions.jump.workbench.model.Layerable;
import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn;
import com.vividsolutions.jump.workbench.plugin.EnableCheckFactory;
import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck;
import com.vividsolutions.jump.workbench.plugin.PlugInContext;
import com.vividsolutions.jump.workbench.ui.LayerNamePanel;
import com.vividsolutions.jump.workbench.ui.LayerNamePanelListener;
import com.vividsolutions.jump.workbench.ui.LayerNamePanelProxy;
import com.vividsolutions.jump.workbench.ui.SchemaPanel;
import com.vividsolutions.jump.workbench.ui.TreeLayerNamePanel;
import com.vividsolutions.jump.workbench.ui.cursortool.editing.EditingPlugIn;
import com.vividsolutions.jump.workbench.ui.images.IconLoader;
public class ViewSchemaPlugIn extends AbstractPlugIn {
private ApplicationContext aplicacion=AppContext.getApplicationContext();
private Blackboard blackboard = aplicacion.getBlackboard();
private static final String KEY = ViewSchemaPlugIn.class + " - FRAME";
private EditingPlugIn editingPlugIn;
private GeometryFactory factory = new GeometryFactory();
private WKTReader wktReader = new WKTReader(factory);
private FlexibleDateParser dateParser = new FlexibleDateParser();
private DateFormat dateFormatter = DateFormat.getDateInstance();
public ViewSchemaPlugIn(EditingPlugIn editingPlugIn) {
this.editingPlugIn = editingPlugIn;
}
public ViewSchemaPlugIn() {
}
public String getName() {
return "View / Edit Schema";
}
private void applyChanges(final Layer layer, final SchemaPanel panel)
throws Exception {
if (!panel.isModified()) {
//User just pressed the Apply button even though he made no edits.
//Don't truncate the undo history; instead, exit. [Jon Aquino]
return;
}
if (panel.validateInput() != null) {
throw new Exception(panel.validateInput());
}
panel.getModel().removeBlankRows();
if (!(layer.getFeatureCollectionWrapper().getFeatureSchema() instanceof GeopistaSchema)){
FeatureSchema newSchema = new FeatureSchema();
for (int i = 0; i < panel.getModel().getRowCount(); i++) {
newSchema.addAttribute(panel.getModel().get(i).getName(),
panel.getModel().get(i).getType());
}
List originalFeatures = layer.getFeatureCollectionWrapper().getFeatures(); //¿que pasa con el Geometry index y con el coordinateSystem?
ArrayList tempFeatures = new ArrayList();
//Two-phase commit. Phase 1: check that no conversion errors occur. [Jon Aquino]
for (Iterator i = layer.getFeatureCollectionWrapper().iterator();
i.hasNext();) {
Feature feature = (Feature) i.next();
tempFeatures.add(convert(feature, panel, newSchema));
}
//Phase 2: commit. [Jon Aquino]
for (int i = 0; i < originalFeatures.size(); i++) {
Feature originalFeature = (Feature) originalFeatures.get(i);
Feature tempFeature = (Feature) tempFeatures.get(i);
//Modify existing features rather than creating new features, because
//there may be references to the existing features (e.g. Attribute Viewers).
//[Jon Aquino]
originalFeature.setSchema(tempFeature.getSchema());
originalFeature.setAttributesRaw(tempFeature.getAttributes());
}
//Non-undoable. [Jon Aquino]
layer.getLayerManager().getUndoableEditReceiver().getUndoManager()
.discardAllEdits();
layer.setFeatureCollection(new FeatureDataset(originalFeatures,
newSchema));
layer.fireLayerChanged(LayerEventType.METADATA_CHANGED);
panel.markAsUnmodified();
}else{
GeopistaSchema newSchema=new GeopistaSchema();
// GeopistaSchema currentSchema=(GeopistaSchema)layer.getFeatureCollectionWrapper().getFeatureSchema();
// List currentAttrib=currentSchema.getAttributes();
//
// SchemaTableModel tableModel=(SchemaTableModel)blackboard.get("schemaModel");
// List fields =tableModel.getFields();
Table tableDummy = new Table("Table por defecto","Table por defecto");
GeopistaSchema schema=(GeopistaSchema)layer.getFeatureCollectionWrapper().getFeatureSchema();
//List atributes=schema.getAttributes();
for (int i = 0; i < panel.getModel().getRowCount(); i++) {
// if(panel.getModel().get(i).getOriginalIndex()==-1){
AttributeType atributeType = panel.getModel().get(i).getType();
String atributeName= panel.getModel().get(i).getName();
// Domain domainDummy = null;
// Refactorizado hacia la clase Domain
Domain domainDummy=Domain.getDomainForType(atributeType.toJavaClass());
// if(atributeType.equals(AttributeType.STRING)){
// domainDummy= new StringDomain("?[.*]","");
// }else if(atributeType.equals(AttributeType.INTEGER) || atributeType.equals(AttributeType.LONG )){
// domainDummy= new NumberDomain("?[-INF:INF]","");
// }else if(atributeType.equals(AttributeType.DOUBLE) || atributeType.equals(AttributeType.FLOAT)){
// domainDummy= new NumberDomain("?[-INF:INF]","");
// }else if(atributeType.equals(AttributeType.DATE)){
// domainDummy= new DateDomain("?[*:*]","");
// }else
// domainDummy= new StringDomain("?[.*]","");
Column columnDummy = new Column(atributeName, "", tableDummy,domainDummy);
newSchema.addAttribute(atributeName, atributeType, columnDummy,
GeopistaSchema.READ_WRITE);
// }else{
//
// newSchema.addAttribute((Attribute)atributes.get(panel.getModel().get(i).getOriginalIndex()));
// }
}
List originalFeatures = layer.getFeatureCollectionWrapper().getFeatures();
ArrayList tempFeatures = new ArrayList();
//Two-phase commit. Phase 1: check that no conversion errors occur. [Jon Aquino]
for (Iterator i = layer.getFeatureCollectionWrapper().iterator();
i.hasNext();) {
Feature feature = (Feature) i.next();
tempFeatures.add(convert(feature, panel, newSchema));
}
//Phase 2: commit. [Jon Aquino]
for (int i = 0; i < originalFeatures.size(); i++) {
Feature originalFeature = (Feature) originalFeatures.get(i);
Feature tempFeature = (Feature) tempFeatures.get(i);
//Modify existing features rather than creating new features, because
//there may be references to the existing features (e.g. Attribute Viewers).
//[Jon Aquino]
originalFeature.setSchema(tempFeature.getSchema());
originalFeature.setAttributesRaw(tempFeature.getAttributes());
}
//Non-undoable. [Jon Aquino]
layer.getLayerManager().getUndoableEditReceiver().getUndoManager()
.discardAllEdits();
layer.setFeatureCollection(new FeatureDataset(originalFeatures,
newSchema));
layer.fireLayerChanged(LayerEventType.METADATA_CHANGED);
panel.markAsUnmodified();
}
}
/*private Feature convert(Feature oldFeature, SchemaPanel panel,
GeopistaSchema newSchema) throws ConversionException {
Feature newFeature = new BasicFeature(newSchema);
for (int i = 0; i < panel.getModel().getRowCount(); i++) {
if (newSchema.getAttributeIndex(panel.getModel().get(i).getName()) == -1) {
newFeature.setAttribute(i,
(panel.getModel().get(i).getType() == AttributeType.GEOMETRY)
? oldFeature.getGeometry() : null);
} else {
try
{
if(panel.getModel().get(i).getOriginalIndex()==-1){
//Esto significa que el atributo no existia antes en la antigua feature
throw new IllegalArgumentException();
}else{
newFeature.setAttribute(i,convert(oldFeature.getAttribute(panel.getModel().get(i).getOriginalIndex()),
oldFeature.getSchema().getAttributeType(panel.getModel().get(i).getOriginalIndex()),
newFeature.getSchema().getAttributeType(panel.getModel().get(i).getName()),
panel.getModel().get(i).getName(),
panel.isForcingInvalidConversionsToNull()));
}
}catch (IllegalArgumentException e)
{
newFeature.setAttribute(i,null);
//return newFeature;
}
}
}
return newFeature;
}*/
private Feature convert(Feature oldFeature, SchemaPanel panel,
FeatureSchema newSchema) throws ConversionException {
Feature newFeature = new BasicFeature(newSchema);
for (int i = 0; i < panel.getModel().getRowCount(); i++) {
if (newSchema.getAttributeIndex(panel.getModel().get(i).getName()) == -1) { //CHECK: este esquema no devuelve -1
newFeature.setAttribute(i,
(panel.getModel().get(i).getType() == AttributeType.GEOMETRY)
? oldFeature.getGeometry() : null);
} else {
try
{
String newAttName=panel.getModel().get(i).getName();
int oldIndex=panel.getModel().get(i).getOriginalIndex();
// CHECK: Esto esta patas arriba!!
// newFeature.setAttribute(i,
// convert(oldFeature.getAttribute(oldFeature.getSchema().getAttributeIndex(newAttName)),
// oldFeature.getSchema().getAttributeType(oldFeature.getSchema().getAttributeIndex(newAttName)),
// newFeature.getSchema().getAttributeType(newAttName),
//
// panel.getModel().get(i).getName(),
// panel.isForcingInvalidConversionsToNull()));
Object oldValue = null;
AttributeType oldAttributeType = null;
if(oldIndex>-1)
{
oldValue = oldFeature.getAttribute(oldIndex);
oldAttributeType = oldFeature.getSchema().getAttributeType(oldIndex);
}
newFeature.setAttribute(i,
convert(oldValue,
oldAttributeType,
newFeature.getSchema().getAttributeType(i),
newAttName,
panel.isForcingInvalidConversionsToNull()));
}catch (IllegalArgumentException e)
{
newFeature.setAttribute(i,null);
}
}
}
return newFeature;
}
private String limitLength(String s) {
//Limit length of values reported in error messages -- WKT is potentially large.
//[Jon Aquino]
return StringUtil.limitLength(s, 30);
}
private Object convert(Object oldValue, AttributeType oldType,
AttributeType newType, String name,
boolean forcingInvalidConversionsToNull) throws ConversionException {
try {
if (oldValue == null) {
return (newType == AttributeType.GEOMETRY)
? factory.createPoint((Coordinate)null) : null;
}
if (oldType == AttributeType.STRING) {
String oldString = (String) oldValue;
if (newType == AttributeType.STRING) {
return oldString;
}
if (newType == AttributeType.INTEGER) {
try {
return new Integer(oldString);
} catch (NumberFormatException e) {
throw new ConversionException(
"Cannot convert to integer: \"" +
limitLength(oldValue.toString()) + "\" (" + name +
")");
}
}
if (newType == AttributeType.LONG) {
try {
return new Long(oldString);
} catch (NumberFormatException e) {
throw new ConversionException(
"Cannot convert to long: \"" +
limitLength(oldValue.toString()) + "\" (" + name +
")");
}
}
if (newType == AttributeType.DOUBLE) {
try {
return new Double(oldString);
} catch (NumberFormatException e) {
throw new ConversionException(
"Cannot convert to double: \"" +
limitLength(oldValue.toString()) + "\" (" + name +
")");
}
}
if (newType == AttributeType.FLOAT) {
try {
return new Float(oldString);
} catch (NumberFormatException e) {
throw new ConversionException(
"Cannot convert to float: \"" +
limitLength(oldValue.toString()) + "\" (" + name +
")");
}
}
if (newType == AttributeType.GEOMETRY) {
try {
return wktReader.read(oldString);
} catch (ParseException e) {
throw new ConversionException(
"Cannot convert to geometry: \"" +
limitLength(oldValue.toString()) + "\" (" + name +
")");
}
}
if (newType == AttributeType.DATE) {
try {
return dateParser.parse(oldString, false);
} catch (java.text.ParseException e) {
throw new ConversionException(
"Cannot convert to date: \"" +
limitLength(oldValue.toString()) + "\" (" + name +
")");
}
}
}
if (oldType == AttributeType.INTEGER) {
int oldInt = ((Number) oldValue).intValue();
//int oldInt = Integer.valueOf((String)oldValue).intValue();
if (newType == AttributeType.STRING) {
return "" + oldInt;
}
if (newType == AttributeType.INTEGER) {
return oldValue;
}
if (newType == AttributeType.LONG) {
return new Long(oldInt);
}
if (newType == AttributeType.DOUBLE) {
return new Double(oldInt);
}
if (newType == AttributeType.FLOAT) {
return new Float(oldInt);
}
if (newType == AttributeType.GEOMETRY) {
throw new ConversionException(
"Cannot convert to geometry: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.DATE) {
try {
return dateParser.parse("" + oldInt, false);
} catch (java.text.ParseException e) {
throw new ConversionException(
"Cannot convert to date: \"" +
limitLength(oldValue.toString()) + "\" (" + name +
")");
}
}
}
if (oldType == AttributeType.LONG) {
// long oldlng = ((Number) oldValue).longValue();
long oldlng = Long.valueOf((String)oldValue).longValue();
if (newType == AttributeType.STRING) {
return "" + oldlng;
}
if (newType == AttributeType.INTEGER) {
throw new ConversionException(
"Cannot convert to Integer: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.LONG) {
return oldValue;
}
if (newType == AttributeType.DOUBLE) {
return new Double(oldlng);
}
if (newType == AttributeType.FLOAT) {
return new Float(oldlng);
}
if (newType == AttributeType.GEOMETRY) {
throw new ConversionException(
"Cannot convert to geometry: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.DATE) {
try {
return dateParser.parse("" + oldlng, false);
} catch (java.text.ParseException e) {
throw new ConversionException(
"Cannot convert to date: \"" +
limitLength(oldValue.toString()) + "\" (" + name +
")");
}
}
}
if (oldType == AttributeType.DOUBLE) {
double oldDouble = ((Double) oldValue).doubleValue();
if (newType == AttributeType.STRING) {
return "" + oldDouble;
}
if (newType == AttributeType.INTEGER) {
return new Integer((int) oldDouble);
}
if (newType == AttributeType.LONG) {
return new Long((long) oldDouble);
}
if (newType == AttributeType.DOUBLE) {
return oldValue;
}
if (newType == AttributeType.FLOAT) {
return new Float(oldDouble);
}
if (newType == AttributeType.GEOMETRY) {
throw new ConversionException(
"Cannot convert to geometry: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.DATE) {
throw new ConversionException("Cannot convert to date: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
}
if (oldType == AttributeType.GEOMETRY) {
Geometry oldGeometry = (Geometry) oldValue;
if (newType == AttributeType.STRING) {
return oldGeometry.toString();
}
if (newType == AttributeType.INTEGER) {
throw new ConversionException(
"Cannot convert to integer: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.LONG) {
throw new ConversionException(
"Cannot convert to long: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.DOUBLE) {
throw new ConversionException(
"Cannot convert to double: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.FLOAT) {
throw new ConversionException(
"Cannot convert to float: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.GEOMETRY) {
return oldGeometry;
}
if (newType == AttributeType.DATE) {
throw new ConversionException("Cannot convert to date: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
}
if (oldType == AttributeType.DATE) {
Date oldDate = (Date) oldValue;
if (newType == AttributeType.STRING) {
return dateFormatter.format(oldDate);
}
if (newType == AttributeType.INTEGER) {
return new Integer((int) oldDate.getTime());
}
if (newType == AttributeType.LONG) {
return new Long( oldDate.getTime());
}
if (newType == AttributeType.DOUBLE) {
return new Double(oldDate.getTime());
}
if (newType == AttributeType.FLOAT) {
return new Float(oldDate.getTime());
}
if (newType == AttributeType.GEOMETRY) {
throw new ConversionException(
"Cannot convert to geometry: \"" +
limitLength(oldValue.toString()) + "\" (" + name + ")");
}
if (newType == AttributeType.DATE) {
return oldValue;
}
}
Assert.shouldNeverReachHere(newType.toString());
return null;
} catch (ConversionException e) {
if (forcingInvalidConversionsToNull) {
return (newType == AttributeType.GEOMETRY)
? factory.createPoint((Coordinate)null) : null;
}
throw e;
}
}
private void commitEditsInProgress(final SchemaPanel panel) {
//Skip if nothing is being edited, otherwise may get false positive. [Jon Aquino]
if (panel.getTable().getEditingRow() != -1) {
//If user is in the middle of editing a field name, call stopCellEditing
//so that new field name is committed (if valid) or an error is recorded
//(if invalid). [Jon Aquino]
panel.getTable()
.getCellEditor(panel.getTable().getEditingRow(),
panel.getTable().getEditingColumn()).stopCellEditing();
}
}
public boolean execute(PlugInContext context) throws Exception {
reportNothingToUndoYet(context);
//Can't simply use Blackboard#get(key, default) because default requires that
//we create a new EditSchemaFrame, and we don't want to do this unless we
//have to because the EditSchemaFrame constructor modifies the blackboard.
//Result: Executing this plug-in twice creates two frames, even if we don't close
//the first. [Jon Aquino]
if (frame(context) == null) {
context.getSelectedLayer(0).getBlackboard().put(KEY,
new EditSchemaFrame((WorkbenchGuiComponent) context.getWorkbenchGuiComponent(),
(Layer) context.getSelectedLayer(0), editingPlugIn));
}
frame(context).surface();
return true;
}
private EditSchemaFrame frame(PlugInContext context) {
return (EditSchemaFrame) context.getSelectedLayer(0).getBlackboard()
.get(KEY);
}
public static MultiEnableCheck createEnableCheck(
final WorkbenchContext workbenchContext) {
EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext);
return new MultiEnableCheck().add(checkFactory.createWindowWithLayerNamePanelMustBeActiveCheck())
.add(checkFactory.createExactlyNLayersMustBeSelectedCheck(
1));
}
private static class ConversionException extends Exception {
public ConversionException(String message) {
super(message);
}
}
public static final ImageIcon ICON = IconLoader.icon("Object.gif");
private class EditSchemaFrame extends JInternalFrame
implements LayerNamePanelProxy, LayerNamePanel, LayerManagerProxy {
private LayerManager layerManager;
private Layer layer;
private WorkbenchGuiComponent workbenchFrame;
public EditSchemaFrame(final WorkbenchGuiComponent workbenchFrame,
final Layer layer, EditingPlugIn editingPlugIn) {
this.layer = layer;
this.workbenchFrame = workbenchFrame;
layer.getBlackboard().put(KEY, this);
this.layerManager = (LayerManager)layer.getLayerManager();
addInternalFrameListener(new InternalFrameAdapter() {
public void internalFrameClosed(InternalFrameEvent e) {
layer.getBlackboard().put(KEY, null);
}
});
final SchemaPanel panel = new SchemaPanel(layer, editingPlugIn,
workbenchFrame.getContext());
setResizable(true);
setClosable(true);
setMaximizable(true);
setIconifiable(true);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(panel, BorderLayout.CENTER);
setSize(500, 300);
updateTitle(layer);
layer.getLayerManager().addLayerListener(new LayerListener() {
public void categoryChanged(CategoryEvent e) {
}
public void featuresChanged(FeatureEvent e) {
}
public void layerChanged(LayerEvent e) {
updateTitle(layer);
}
});
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
panel.add(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
commitEditsInProgress(panel);
applyChanges(layer, panel);
} catch (Exception x) {
workbenchFrame.handleThrowable(x);
}
}
});
addInternalFrameListener(new InternalFrameAdapter() {
public void internalFrameClosing(InternalFrameEvent e) {
commitEditsInProgress(panel);
if (!layer.isEditable() || !panel.isModified()) {
dispose();
return;
}
switch (JOptionPane.showConfirmDialog(EditSchemaFrame.this,
aplicacion.getI18nString("ApplyChangesToTheSchema"), aplicacion.getI18nString("ViewSchemaPlugIn.Geopista"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE)) {
case JOptionPane.YES_OPTION:
try {
applyChanges(layer, panel);
} catch (Exception x) {
workbenchFrame.handleThrowable(x);
return;
}
dispose();
return;
case JOptionPane.NO_OPTION:
dispose();
return;
case JOptionPane.CANCEL_OPTION:
return;
default:
Assert.shouldNeverReachHere();
}
}
});
}
private void updateTitle(Layer layer) {
setTitle((SchemaPanel.isEditableAndSystemLayer(layer) ? aplicacion.getI18nString("ViewSchemaPlugIn.Edit") : aplicacion.getI18nString("ViewSchemaPlugIn.View")) + " " + aplicacion.getI18nString("ViewSchemaPlugIn.Schema") + " " +
layer.getName());
}
public LayerManager getLayerManager() {
return layerManager;
}
public Layer chooseEditableLayer() {
return TreeLayerNamePanel.chooseEditableLayer(this);
}
public void surface() {
if (!workbenchFrame.hasInternalFrame(this)) {
workbenchFrame.addInternalFrame(this, false, true);
}
workbenchFrame.activateFrame( this);
moveToFront();
}
public LayerNamePanel getLayerNamePanel() {
return this;
}
public Collection getSelectedCategories() {
return new ArrayList();
}
public Layer[] getSelectedLayers() {
return new Layer[] { layer };
}
public Layerable[] getSelectedLayerables() {
return getSelectedLayers();
}
public Collection selectedNodes(Class c) {
if (!Layerable.class.isAssignableFrom(c)) {
return new ArrayList();
}
return Arrays.asList(getSelectedLayers());
}
public void addListener(LayerNamePanelListener listener) {}
public void removeListener(LayerNamePanelListener listener) {}
/* (non-Javadoc)
* @see com.vividsolutions.jump.workbench.ui.LayerNamePanel#selectLayers(com.vividsolutions.jump.workbench.model.Layer[])
*/
public void selectLayers(Layer[] layers)
{
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see com.vividsolutions.jump.workbench.ui.LayerNamePanel#selectLayers(com.vividsolutions.jump.workbench.model.Layerable[])
*/
public void selectLayerables(Layerable[] layers)
{
// TODO Auto-generated method stub
}
@Override
public void setTargetSelectedLayers(Layerable[] layers) {
// TODO Auto-generated method stub
}
}
public void initialize(PlugInContext context) throws Exception {
JPopupMenu layerNamePopupMenu = context.getWorkbenchContext().getIWorkbench()
.getGuiComponent()
.getLayerNamePopupMenu();
FeatureInstaller featureInstaller = new FeatureInstaller(context.getWorkbenchContext());
featureInstaller.addPopupMenuItem(layerNamePopupMenu,
this, AppContext.getApplicationContext().getI18nString(this.getName()), false, null,
ViewSchemaPlugIn.createEnableCheck(context.getWorkbenchContext()));
}
}
| [
"[email protected]"
] | |
46c03cd5ee1e059bfa4201ee050df4ecd248e21d | e929834e3b8d80d6171fc7858ba29479a376cfa2 | /SumoNextGen/src/net/sumo/nextgen/task/cooking/Cook.java | 3f4c4d673f5877664020b61291194fd348178e8a | [] | no_license | itggot-william-holmberg/SumoScripts | 1aa566affa5f0f606d3a486c0c51ca1caafadf5b | 525888b3928e3a2afef4edfcc6e438805eba5a45 | refs/heads/master | 2021-01-15T14:42:21.006729 | 2016-05-14T14:21:31 | 2016-05-14T14:21:31 | 55,257,137 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,560 | java | package net.sumo.nextgen.task.cooking;
import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.api.ui.Skill;
import net.sumo.nextgen.resources.Resources;
import net.sumo.nextgen.task.Task;
public class Cook extends Task {
@Override
public boolean active() {
if (shouldCook() && playerInArea(currentCookingAssignment().getCookingArea()) && readyToCook()) {
return true;
}
return false;
}
@Override
public void execute() {
Resources.CURRENT_STATE = "lets cook";
checkContinue();
while ((playerIsBusy()) || playerIsMoving()) {
updateMessage("We are already cooking, lets sleep");
checkContinue();
try {
SkillingAntiBan();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
sleep(750);
}
cook();
}
public void cook() {
String food = currentCookingAssignment().getRawFoodName();
if(widgetIsVisible(307,2)){
int amount = getAmount(currentCookingAssignment().getRawFoodName());
int xp = currentCookingAssignment().getXpGiven();
int xpLeft = s.skills.experienceToLevel(Skill.COOKING);
int minFoodToLevel = xpLeft/xp;
s.widgets.interact(307, 2, "Cook all");
if(minFoodToLevel<= amount){
s.log("sleep for " + 1500*minFoodToLevel);
sleep(1500*minFoodToLevel);
}else{
sleep(1650*amount);
}
}else{
if(inventoryContains(food)){
interactItemWithObject(food, currentCookingAssignment().getCookingObject());
sleep(3500);
}
}
}
} | [
"[email protected]"
] | |
d6787c0f593d0a0f533b19db35bf7a162e74bc2e | b3917c299d559c7f93b1fee7491ebd3dcd85f811 | /app/src/main/java/com/narij/checkv2/retrofit/model/RetrofitGroups.java | a7f75e9ec6368fa7adbaa545ee4c09c8d56bde91 | [] | no_license | kamisaberi/check-social-network-frontend-android | 0da21c69e7f91b2c54c22a4194a1a601d172a65c | 7acf5424ee9b495b22063b89bfb42a1cabb919c8 | refs/heads/master | 2022-06-20T16:18:17.186968 | 2020-05-08T09:13:41 | 2020-05-08T09:13:41 | 262,278,029 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,238 | java | package com.narij.checkv2.retrofit.model;
import com.narij.checkv2.model.Group;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
/**
* Created by kami on 8/15/2017.
*/
public class RetrofitGroups {
@SerializedName("id")
private int id;
@SerializedName("error")
private boolean error;
@SerializedName("groups")
private ArrayList<Group> groups = new ArrayList<>();
public ArrayList<Group> getGroups() {
return groups;
}
public void setGroups(ArrayList<Group> groups) {
this.groups = groups;
}
public boolean isError() {
return error;
}
public void setError(boolean error) {
this.error = error;
}
@SerializedName("message")
private String message;
public RetrofitGroups() {
}
public RetrofitGroups(int id, boolean error, String content) {
this.id = id;
this.error = error;
this.message = content;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
| [
"[email protected]"
] | |
932ffae02992860b657223bd2779aafefa8a56a1 | 72a43944b2d92b3c3d3a9d87d4c01bcdb4673b7b | /Weitu/src/main/java/com/quanjing/weitu/app/ui/category/MWTStaggeredCategoryFlowFragment.java | 49bf3c7dc2260be13a895004121f74fa53a26a33 | [] | no_license | JokeLook/QuanjingAPP | ef5d5c21284bc29d0594b45ec36ac456c24186b8 | 40b2c1c286ffcca46c88942374fdd67a14611260 | refs/heads/master | 2020-07-15T01:02:27.443815 | 2015-04-27T06:08:19 | 2015-04-27T06:08:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,767 | java | package com.quanjing.weitu.app.ui.category;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.etsy.android.grid.StaggeredGridView;
import com.quanjing.weitu.app.common.MWTCallback;
import com.quanjing.weitu.app.model.MWTCategory;
import com.quanjing.weitu.app.model.MWTCategoryManager;
import com.quanjing.weitu.app.model.MWTFeed;
import com.quanjing.weitu.app.model.MWTFeedManager;
import com.quanjing.weitu.app.ui.common.MWTDataRetriever;
import com.quanjing.weitu.app.ui.common.MWTItemClickHandler;
import com.quanjing.weitu.app.ui.common.MWTWaterFlowFragment;
import com.quanjing.weitu.app.ui.feed.MWTFeedFlowActivity;
public class MWTStaggeredCategoryFlowFragment extends MWTWaterFlowFragment implements MWTItemClickHandler
{
private static final String ARG_CATEGORY_ID = "ARG_CATEGORY_ID";
private String _categoryID;
private MWTCategory _category;
private MWTCategoriesAdapter _categoriesAdapter;
private StaggeredGridView _gridView;
private MWTItemClickHandler _extraItemClickHandler;
public static MWTStaggeredCategoryFlowFragment newInstance()
{
MWTStaggeredCategoryFlowFragment fragment = new MWTStaggeredCategoryFlowFragment();
return fragment;
}
public static MWTStaggeredCategoryFlowFragment newInstance(String categoryID)
{
MWTStaggeredCategoryFlowFragment fragment = new MWTStaggeredCategoryFlowFragment();
Bundle args = new Bundle();
args.putString(ARG_CATEGORY_ID, categoryID);
fragment.setArguments(args);
return fragment;
}
public MWTStaggeredCategoryFlowFragment()
{
super();
setPullToRefreshEnabled(true, false);
setDataRetriver(new MWTDataRetriever()
{
@Override
public void refresh(MWTCallback callback)
{
if (_categoriesAdapter != null)
{
_categoriesAdapter.refresh(callback);
}
else
{
if (callback != null)
{
callback.success();
}
}
}
@Override
public void loadMore(MWTCallback callback)
{
if (callback != null)
{
callback.success();
}
}
});
setItemClickHandler(this);
}
@Override
public void onAttach(Activity activity)
{
super.onAttach(activity);
}
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setRetainInstance(true);
if (getArguments() != null)
{
_categoryID = getArguments().getString(ARG_CATEGORY_ID);
}
if (_categoryID != null)
{
MWTCategoryManager cm = MWTCategoryManager.getInstance();
_category = cm.getCategoryByID(_categoryID);
}
else
{
_category = null;
}
_categoriesAdapter = new MWTDynamicCategoriesAdapter(getActivity(), _category);
setGridViewAdapter(_categoriesAdapter);
}
@Override
public void onResume()
{
super.onResume();
_categoriesAdapter.refreshIfNeeded();
}
public void setExtraItemClickHandler(MWTItemClickHandler extraItemClickHandler)
{
_extraItemClickHandler = extraItemClickHandler;
}
@Override
public boolean handleItemClick(Object item)
{
if (_extraItemClickHandler != null)
{
boolean handled = _extraItemClickHandler.handleItemClick(item);
if (handled)
{
return true;
}
}
if (item instanceof MWTCategory)
{
MWTCategory category = (MWTCategory) item;
if (category.isMultiLevel())
{
Intent intent = new Intent(getActivity(), MWTCategoryFlowActivity.class);
intent.putExtra(MWTCategoryFlowActivity.ARG_CATEGORY_ID, category.getFeedID());
intent.putExtra(MWTCategoryFlowActivity.ARG_IS_SINGLE_COLUMN, isSingleColumn());
startActivity(intent);
return true;
}
else
{
MWTFeed feed = MWTFeedManager.getInstance().getFeedForCategory(category);
Intent intent = new Intent(getActivity(), MWTFeedFlowActivity.class);
intent.putExtra(MWTFeedFlowActivity.ARG_FEED_ID, feed.getFeedID());
startActivity(intent);
return true;
}
}
return false;
}
}
| [
"[email protected]"
] | |
1cdbd9a6fbc609d2a2980e9edd5c5f4a99a8ee80 | 5fedb08590b97e71f65b6854cac40f4679e4ae93 | /woooqi-bpm-logic/src/main/java/com/woooqi/bpm/repository/organization/UserAndSignSpecialRepository.java | 1c5a8f219743cc61ae27b15d4b868a0f07eed99e | [] | no_license | xeon-ye/woooqi-bpm | c234156eb75420f4835800e3b25aa2b0f3df6fff | 64dc99312eb91de4bb2008d60e0cd963a2d1c683 | refs/heads/master | 2021-09-05T12:20:37.785041 | 2018-01-27T13:57:11 | 2018-01-27T13:57:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 897 | java | package com.woooqi.bpm.repository.organization;
import java.util.List;
import com.woooqi.bpm.entity.bpm.manage.ProcessNodeSignSpecial;
import com.woooqi.bpm.entity.organization.User;
import com.woooqi.bpm.entity.organization.UserAndSignSpecial;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import com.titan.entity.bpm.manage.ProcessNodeSignSpecial;
import com.titan.entity.organization.User;
import com.titan.entity.organization.UserAndSignSpecial;
public interface UserAndSignSpecialRepository extends JpaRepository<UserAndSignSpecial,String>,JpaSpecificationExecutor<UserAndSignSpecial>{
public List<UserAndSignSpecial> findBySignSpecial(ProcessNodeSignSpecial signSpecial);
public List<UserAndSignSpecial> findBySignSpecialAndUser(ProcessNodeSignSpecial signSpecial , User user);
}
| [
"[email protected]"
] | |
4218c6e5401af73d37d7c0310d90a522bece52d3 | e258c02ff7a029daa57d8db03fa71d8d0fced58b | /app/src/main/java/com/github/kingaza/aspree/bean/StockItem.java | f02fa0f8834d8e5367d41456c6121eafa832a85b | [
"MIT"
] | permissive | kingaza/aSpree | bcb7974be6b24d1014bca9a8fcca2068a945adf0 | cba8d99f202ff63abf80f48594fb5bb0ce10b021 | refs/heads/master | 2020-05-15T04:51:04.548984 | 2015-05-27T12:56:40 | 2015-05-27T12:56:40 | 34,668,459 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 252 | java | package com.github.kingaza.aspree.bean;
/**
* Created by abu on 2015/5/11.
*/
public class StockItem {
int id;
int count_on_hand;
int stock_location_id;
boolean backorderable;
boolean available;
String stock_location_name;
}
| [
"[email protected]"
] | |
3d8d07db97b5ddfe53a87e4f2aa638af71201743 | 54c57aca670ed160533175033fc67e3864a571d1 | /src/com/sundyn/service/IInteTicketService.java | b0e515d35d0716057c1637a88f3ebd1ea559009e | [] | no_license | beango/sundyn | e33ee9adc9659a73ae565f1a86f826586ab4dc59 | 0981b5b8ff1327835cf277a51de66bdc2d243555 | refs/heads/master | 2022-12-24T02:31:27.188517 | 2019-07-26T02:52:09 | 2019-07-26T02:52:09 | 83,861,523 | 0 | 1 | null | 2022-12-16T04:33:54 | 2017-03-04T03:18:14 | JavaScript | UTF-8 | Java | false | false | 265 | java | package com.sundyn.service;
import com.sundyn.entity.InteTicket;
import com.baomidou.mybatisplus.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author oKong
* @since 2018-09-13
*/
public interface IInteTicketService extends IService<InteTicket> {
}
| [
"[email protected]"
] | |
1befc6d0709c8f6aabf955d054bdefb4540412d6 | 6249a2b3928e2509b8a5d909ef9d8e18221d9637 | /revolsys-swing/src/main/java/com/revolsys/swing/undo/CannotUndoException.java | 291050cd6ccd3f82b47ec6c444a1ed851849ec2c | [
"Apache-2.0"
] | permissive | revolsys/com.revolsys.open | dbcdc3bdcee3276dc3680311948e91ec64e1264e | 7f4385c632094eb5ed67c0646ee3e2e258fba4e4 | refs/heads/main | 2023-08-22T17:18:48.499931 | 2023-05-31T01:59:22 | 2023-05-31T01:59:22 | 2,709,026 | 5 | 11 | NOASSERTION | 2023-05-31T01:59:23 | 2011-11-04T12:33:49 | Java | UTF-8 | Java | false | false | 449 | java | package com.revolsys.swing.undo;
public class CannotUndoException extends javax.swing.undo.CannotUndoException {
/**
*
*/
private static final long serialVersionUID = 1L;
private final String message;
public CannotUndoException(final String message) {
this.message = message;
}
@Override
public String getMessage() {
return this.message;
}
@Override
public String toString() {
return this.message;
}
}
| [
"[email protected]"
] | |
440dd8855bfa5b3868e86473e8accdc99f40489b | 4992e2e03d9fcd64b05c013fdcf5f7177f8b4f61 | /zuul-server2/src/main/java/pers/guzx/zuulserver2/base/ResponseData.java | 471f19f3c2ec59037409543f62eb0dab34241050 | [] | no_license | hnguzx/spring-cloud-study | d6a79d71022d994c6977dccdc975903bbbb422b3 | 9aa6fa696683c00a5749e14f27a294be30eeda00 | refs/heads/main | 2023-06-06T12:20:14.167104 | 2021-07-02T11:03:49 | 2021-07-02T11:03:49 | 353,667,787 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,276 | java | package pers.guzx.zuulserver2.base;
public class ResponseData {
private int code = 200;
private String message = "";
private Object data;
public static ResponseData ok(Object data) {
return new ResponseData(data);
}
public static ResponseData fail() {
return new ResponseData(null);
}
public static ResponseData fail(String message) {
return new ResponseData(message);
}
public static ResponseData fail(String message, int code) {
return new ResponseData(message, code);
}
public static ResponseData failByParam(String message) {
return new ResponseData(message, ResponseCode.PARAM_ERROR_CODE.getCode());
}
public ResponseData(Object data) {
super();
this.data = data;
}
public ResponseData(String message) {
super();
this.message = message;
}
public ResponseData(String message, int code) {
super();
this.message = message;
this.code = code;
}
public ResponseData() {
super();
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
}
| [
"[email protected]"
] | |
714e49fe8bfda1345a96c4d86e6282f8e9ae5c3f | 687ad64266358a8d6dba88ebb2e5431790fbe3e7 | /Structural/Bridge/GameProject.java | a7391757126ce639b78df48b17b92187ba787ee1 | [] | no_license | rmzcn/design_patterns | 4ab7cecd45ba1eeaa97d4351e1fe77df44c0623a | 8fe5f2d07718bd3a97d6464ae81d5ae8ba4b9d49 | refs/heads/master | 2023-02-11T00:05:39.459574 | 2021-01-10T20:55:21 | 2021-01-10T20:55:21 | 324,346,410 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 302 | java | package Structural.Bridge;
public class GameProject extends Project {
public GameProject(IProjectPlatform projectPlatform) {
super(projectPlatform);
}
@Override
public void publish() {
super.publish();
System.out.println("Publishing Game Project...");
}
}
| [
"[email protected]"
] | |
7439b92e24bbc877c9825c0e968e6df8aedf6b53 | 8def0c93d257cf05ed218754e3f07f6c9c363e94 | /Application/src/main/java/io/github/antijava/marjio/graphics/Viewport.java | 15195c8ac3c7c2edb2b89df4e56259f9e1fff18b | [] | no_license | NCU-Anti-Java/Marjio | 8efdf89077601a66f4e7946ac8274f4ea052b5fa | a4955f3db882e2a121b31871dd098f1e074c1d05 | refs/heads/develop | 2020-11-30T16:18:49.211743 | 2016-01-04T09:00:58 | 2016-01-04T09:00:58 | 42,847,984 | 2 | 2 | null | 2016-01-04T08:56:51 | 2015-09-21T06:30:04 | Java | UTF-8 | Java | false | false | 1,041 | java | package io.github.antijava.marjio.graphics;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Davy on 2015/12/29.
*/
public class Viewport extends io.github.antijava.marjio.common.graphics.Viewport
implements Comparable {
private final List<Sprite> mSpriteList = new ArrayList<>();
// region Sprite List
void addSprite(Sprite sprite) {
if (sprite.getViewport() == this)
return;
mSpriteList.add(sprite);
}
void removeSprite(Sprite sprite) {
if (sprite.getViewport() != this)
return;
mSpriteList.remove(sprite);
}
List<Sprite> getSprites() {
return mSpriteList;
}
@Override
public int compareTo(@NotNull Object o) {
if (!(o instanceof Viewport))
return 0;
final Viewport v = (Viewport) o;
if (v.z == this.z)
return this.y > v.y ? 1 : -1;
return this.z > v.z ? 1 : -1;
}
// endregion Sprite List
}
| [
"[email protected]"
] | |
744e40a7ad0ef89d72b9aaad814511e6ba9d7a5d | 19f62661e9862219d83dd1b2a8dc08d9161f0f8d | /testamation-core/src/main/java/nz/co/testamation/core/mock/HttpServletRequestWrapperImpl.java | 31d0e7b0bb4317ab51af4d25a52c543fe44ccf40 | [
"Apache-2.0"
] | permissive | rlon008/testamation | 5d048da19b1e6fe04802e7a738e97fdb856ede63 | da060eacc4bad1bbe677b31955854e4e6e419d41 | refs/heads/master | 2023-05-30T19:41:42.971093 | 2018-03-12T22:30:40 | 2018-03-12T22:30:40 | 76,214,500 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,433 | java | /*
* Copyright 2016 Ratha Long
*
* 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 nz.co.testamation.core.mock;
import nz.co.testamation.common.util.StringConcat;
import org.springframework.util.FileCopyUtils;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
public class HttpServletRequestWrapperImpl implements HttpServletRequestWrapper {
private final HttpServletRequest request;
private final String body;
private final Map<String, String> headers = new HashMap<>();
private final Map<String, String[]> parameterMap;
public HttpServletRequestWrapperImpl( HttpServletRequest request ) throws IOException {
this.request = request;
this.parameterMap = request.getParameterMap();
Enumeration headerNames = request.getHeaderNames();
while ( headerNames.hasMoreElements() ) {
String key = (String) headerNames.nextElement();
headers.put( key, request.getHeader( key ) );
}
this.body = FileCopyUtils.copyToString( new InputStreamReader( this.request.getInputStream() ) );
}
@Override
public String getBody() {
return body;
}
@Override
public String getMethod() {
return request.getMethod();
}
@Override
public String getRequestURI() {
return request.getRequestURI();
}
@Override
public String getHeader( String key ) {
return request.getHeader( key );
}
@Override
public String getContentType() {
return request.getContentType();
}
@Override
public String getParameter( String key ) {
return request.getParameter( key );
}
@Override
public String toString() {
StringConcat concat = new StringConcat( "\n" );
try {
concat.append( request.getRequestURL().toString() );
} catch ( Exception e ) {
concat.append( "URL NOT AVAILABLE IN REQUEST" );
}
concat.append( "\nHeaders:" );
for ( Map.Entry<String, String> entry : headers.entrySet() ) {
concat.append( entry );
}
concat.append( "Parameters: {" );
for ( Map.Entry<String, String[]> entry : parameterMap.entrySet() ) {
concat.append( String.format( "%s: %s", entry.getKey(), getValue( entry.getValue() ) ) );
}
concat.append( "}" );
concat.append( "Body: " + body );
return concat.toString();
}
private String getValue( String[] values ) {
StringConcat concat = new StringConcat( ", " );
for ( String value : values ) {
concat.append( value );
}
return concat.toString();
}
@Override
public Map<String, String[]> getParameterMap() {
return parameterMap;
}
}
| [
"[email protected]"
] | |
fe27fe79a972560c15cef7eb1bd7cf7825267eb1 | e0f6050cad4e80200ca471c4382562a75172e95c | /src/org/stevens/cs562/sql/ComparisonAndComputeOperator.java | 6cb7f82003e86f77df7c583657c63c09a8d9faf2 | [] | no_license | faireprogram/CS562 | cc2ca96a2fee4bfda3d12cf95267c1775c2ebf14 | 0c32334edf2308aa30c24e7face62bea74c574ec | refs/heads/master | 2020-05-18T16:04:26.314230 | 2015-09-13T04:32:04 | 2015-09-13T04:32:04 | 31,145,848 | 3 | 3 | null | null | null | null | UTF-8 | Java | false | false | 830 | java | package org.stevens.cs562.sql;
/**
* @author faire_000
*
*/
public enum ComparisonAndComputeOperator {
GREATER(">",">"),GREATER_EQUAL(">=",">="),LESS("<","<"),LESS_EQUAL("<=","<="),EQUAL("=","=="), NOT_EQUAL("<>","!="),
ADDITION("+", "+"), MINUS("-", "-"), MULTIPLICATION("*", "*"), DIVID("/", "/"), AND("and", "&&"), OR("or", "||");
private String java_name;
private String symbol;
private ComparisonAndComputeOperator(String symbol, String java_name) {
this.java_name = java_name;
this.symbol = symbol;
}
/**
* @return the java_name
*/
public String getJava_name() {
return java_name;
}
/**
* @return the symbol
*/
public String getSymbol() {
return symbol;
}
/* (non-Javadoc)
* @see java.lang.Enum#toString()
*/
@Override
public String toString() {
return this.symbol;
}
}
| [
"[email protected]"
] | |
d198aecede8d22603690649bd9e1095bbdc5abc4 | 9f5f40df25ff4e80b5a9f2ef91529c3aba69021a | /kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/adIfRelevant/AdIfRelevantContainer.java | 858f2d165c1d962b3147e476e56ffe733eb5e568 | [
"LicenseRef-scancode-unknown",
"OLDAP-2.8",
"ANTLR-PD",
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0",
"LicenseRef-scancode-ietf"
] | permissive | isabella232/directory-server | d5a627c2e16157f9662d388884de07e7ac7823e0 | 2ec1117fec41919a68d04ba3a51724562e3b46f8 | refs/heads/master | 2023-03-08T19:14:47.065238 | 2020-11-06T15:25:43 | 2020-11-06T15:25:43 | 311,733,075 | 0 | 0 | Apache-2.0 | 2021-02-23T13:28:34 | 2020-11-10T17:20:04 | null | UTF-8 | Java | false | false | 1,675 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.directory.shared.kerberos.codec.adIfRelevant;
import org.apache.directory.shared.kerberos.codec.authorizationData.AuthorizationDataContainer;
import org.apache.directory.shared.kerberos.components.AdIfRelevant;
/**
* The AD-IF-RELEVANT container stores the AD-IF-RELEVANT decoded by the Asn1Decoder.
*
* @author <a href="mailto:[email protected]">Apache Directory Project</a>
*/
public class AdIfRelevantContainer extends AuthorizationDataContainer
{
/**
* Creates a new AdIfRelevantContainer object.
*/
public AdIfRelevantContainer()
{
super();
setAuthorizationData( new AdIfRelevant() );
}
/**
* @return Returns the AD-IF-RELEVANT.
*/
public AdIfRelevant getAdIfRelevant()
{
return ( AdIfRelevant ) getAuthorizationData();
}
}
| [
"[email protected]"
] | |
d9395e6c7dbfc164efaccc313aaf93ed882c92fb | c89d3c27eee0f4f2fd7151f58490b98f7d9d72d9 | /src/main/java/com/sunan/model/DiscountOrderType.java | f2d68531f6ee4059ca453750d104dce452c20fcb | [] | no_license | sunan-technology/hotel-pos-api | 263acbacfc1114825080290f530859d0d3a618f7 | 6c3b675ceface2419fca20a95ac1ae9a43ddd4d1 | refs/heads/main | 2023-06-04T12:01:40.857699 | 2021-06-24T07:34:56 | 2021-06-24T07:34:56 | 343,310,928 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,866 | java | package com.sunan.model;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.UpdateTimestamp;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Entity
@Data
@EqualsAndHashCode(callSuper = false)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "discount_ordertype")
public class DiscountOrderType implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO, generator = "native")
@GenericGenerator(name = "native", strategy = "native")
private int id;
@JoinColumn(name = "ordertype_id")
@ManyToOne
private OrderType orderType;
@JoinColumn(name = "discount_id")
@ManyToOne
private Discount discount;
@Column(name = "is_active")
private String isActive;
@JoinColumn(name = "hotel_id")
@ManyToOne
public Hotel hotel;
@JsonIgnore
@Column(name = "created_at", nullable = false, updatable = false)
@CreationTimestamp
@JsonFormat(pattern = "yyyy-MM-dd")
public Timestamp createdAt;
@JsonIgnore
@Temporal(TemporalType.DATE)
@Column(name = "updated_at")
@UpdateTimestamp
@JsonFormat(pattern = "yyyy-MM-dd")
public Date updatedAt;
}
| [
"[email protected]"
] | |
75dcf6efe2d51a774c5bb201025e32bf053f985b | ee86bd8be523153f83e82e0944cd3c6a01c986d6 | /src/main/java/com/councel/service/UserManagementService.java | a9ead29b58beacd8507bb8388534f4963fe5aec7 | [] | no_license | bvshukla/councel | 00b046fb20a902fac5201b5372d69b2650ae6faf | e94062c15750601b7795d75595c80af3134e558f | refs/heads/master | 2021-01-20T17:49:56.538189 | 2017-06-13T17:31:25 | 2017-06-13T17:31:25 | 90,891,844 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,702 | java | package com.councel.service;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.ws.rs.*;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import org.apache.commons.io.IOUtils;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import com.councel.model.pojo.Client;
import com.councel.model.pojo.Lawyer;
import com.councel.model.pojo.ServiceError;
import com.councel.model.pojo.User;
import com.councel.model.pojo.User.UserType;
import com.councel.model.service.UserService;
import com.councel.model.utils.ErrorCode;
import com.councel.model.utils.ErrorMsg;
import com.councel.model.utils.ErrorUtils;
import com.councel.model.utils.FileUtils;
import com.councel.model.utils.ParseUtils;
@Path("/client")
public class UserManagementService {
public static final String UPLOAD_FILE_SERVER = "C:\\Users\\bvshukla.ORADEV\\workspace\\councelApp\\src\\main\\webapp\\ProfilePic\\";
@Path("/findUser.json")
@GET
@Produces(MediaType.APPLICATION_JSON)
public Object findUser(@QueryParam("userId") Long userId) {
User user = UserService.findUser(userId);
if (user != null && user.getUserType() == UserType.LAWYER) {
user = UserService.findLawyer(userId, user);
}
return user;
}
@Path("/createUser.json")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Object createUser(String inputJSON) {
ParseUtils pu = new ParseUtils();
try {
User user = pu.parseUser(inputJSON);
if (user instanceof Lawyer) {
Lawyer lawyer = (Lawyer) user;
UserService.createUser(lawyer);
return lawyer;
} else {
Client cl = (Client) user;
UserService.createUser(cl);
return cl;
}
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "{}";
}
@Path("/updateUser.json")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Object updateUser(String inputJSON) {
JSONParser parser = new JSONParser();
JSONObject jo;
try {
jo = (JSONObject) parser.parse(inputJSON);
Long userId = (Long) jo.getOrDefault("userId", 0L);
User u = UserService.findUser(userId);
Lawyer lawyer = null;
Client client = null;
String userTypeStr = (String) jo.getOrDefault("userType", "Client");
UserType userType = UserType.valueOf(userTypeStr.toUpperCase());
if (jo.containsKey("firstName")) {
String firstName = (String) jo.getOrDefault("firstName", "");
u.setFirstName(firstName);
}
if (jo.containsKey("lastName")) {
String lastName = (String) jo.getOrDefault("lastName", "");
u.setLastName(lastName);
}
if (jo.containsKey("address")) {
String address = (String) jo.getOrDefault("address", "");
u.setAddress(address);
}
if (jo.containsKey("mobile")) {
String mobile = (String) jo.getOrDefault("mobile", "");
u.setMobile(mobile);
}
if (jo.containsKey("email")) {
String email = (String) jo.getOrDefault("email", "");
u.setEmail(email);
}
if (jo.containsKey("gender")) {
String gender = (String) jo.getOrDefault("gender", "");
u.setGender(gender);
}
if (jo.containsKey("dob")) {
String dob = (String) jo.getOrDefault("dob", "");
u.setDob(dob);
}
if (userType == UserType.LAWYER) {
lawyer = (Lawyer) u;
if (jo.containsKey("lawFirm")) {
String lawFirm = (String) jo.getOrDefault("lawFirm", "");
lawyer.setLawFirm(lawFirm);
}
if (jo.containsKey("courtName")) {
String courtName = (String) jo.getOrDefault("courtName", "");
lawyer.setCourtName(courtName);
}
if (jo.containsKey("location")) {
String location = (String) jo.getOrDefault("location", "");
lawyer.setLocation(location);
}
if (jo.containsKey("contactFor")) {
String contactFor = (String) jo.getOrDefault("contactFor", "");
lawyer.setContactFor(contactFor);
}
if (jo.containsKey("experience")) {
String experience = (String) jo.getOrDefault("experience", "");
lawyer.setExperience(experience);
}
if (jo.containsKey("bio")) {
String bio = (String) jo.getOrDefault("bio", "");
lawyer.setBio(bio);
}
UserService.updateLawyer(lawyer);
return lawyer;
} else {
Client cl = (Client) u;
UserService.updateClient(cl);
return cl;
}
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "{}";
}
@Path("/assignClient.json")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Object assignClient(String inputJSON) {
JSONParser parser = new JSONParser();
Client clR = null;
try {
JSONObject jo = (JSONObject) parser.parse(inputJSON);
Long lawyerId = (Long) jo.getOrDefault("lawyerId", 0L);
Long clientId = (Long) jo.getOrDefault("clientId", 0L);
Lawyer lawyer = (Lawyer) UserService.findUser(lawyerId);
Client cl = (Client) UserService.findUser(clientId);
cl.setLawyer(lawyer);
UserService.updateClient(cl);
clR = (Client) UserService.findUser(clientId);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return clR;
}
@Path("/login.json")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Object login(String inputJSON) {
JSONParser parser = new JSONParser();
Client clR = null;
try {
JSONObject jo = (JSONObject) parser.parse(inputJSON);
String email = (String) jo.getOrDefault("email", null);
String mobile = (String) jo.getOrDefault("mobileNo", null);
String password = (String) jo.getOrDefault("password", null);
User user = UserService.findUserFromEmailOrPhone(email, mobile);
if (user == null) {
ServiceError error = new ServiceError();
error.setErrorCode(ErrorCode.USER_NOT_REGISTERED);
error.setErrorMsg(ErrorMsg.USER_NOT_REGISTERED);
error.setErrorId(ErrorUtils.errorIds.get(ErrorCode.USER_NOT_REGISTERED));
return error;
} else {
String passwordStr = ParseUtils.getMD5Hash(password);
if (user.getPassword().equals(passwordStr)) {
return user;
} else {
ServiceError error = new ServiceError();
error.setErrorCode(ErrorCode.USER_PASSWORD_INCORRECT);
error.setErrorMsg(ErrorMsg.USER_PASSWORD_INCORRECT);
error.setErrorId(ErrorUtils.errorIds.get(ErrorCode.USER_PASSWORD_INCORRECT));
return error;
}
}
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return clR;
}
@Path("/upload.json")
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
public Object uploadPic(@FormDataParam("file") InputStream fileInputStream,
@FormDataParam("file") FormDataContentDisposition fileFormDataContentDisposition,
@FormDataParam("userId") Long userId, @FormDataParam("fileType") String fileType) {
String fileName = null;
String uploadFilePath = null;
try {
fileName = fileType + "_" + userId + "_" + System.nanoTime() + ".jpg";
uploadFilePath = writeToFileServer(fileInputStream, fileName);
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
// release resources, if any
}
User user = UserService.findUser(userId);
user.setProfilePic(uploadFilePath);
if (user.getUserType() == UserType.LAWYER) {
UserService.updateLawyer((Lawyer) user);
} else {
UserService.updateClient((Client) user);
}
return user;
}
private String writeToFileServer(InputStream inputStream, String fileName) throws IOException {
OutputStream outputStream = null;
String qualifiedUploadFilePath = fileName;
File f = new File(qualifiedUploadFilePath);
if (!f.exists()) {
f.createNewFile();
}
try {
outputStream = new FileOutputStream(f);
IOUtils.copy(inputStream, outputStream);
qualifiedUploadFilePath = FileUtils.uploadToCloudinary(f);
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
// release resource, if any
outputStream.close();
}
return qualifiedUploadFilePath;
}
}
| [
"[email protected]"
] | |
98eccd3fb62d273cf5b8961afc4217beb8af489e | 40f29ee0776953a747d772703bd98a49fc64cd81 | /com-tensquare-article/src/main/java/com/excepiton/ArticleException.java | 7c67bd3ed1b2ffad1210e78d4ca5d6bd48897cd7 | [] | no_license | ludan2019/tensquere | b42820444753bd399b8033cf3edf46264ac50b69 | abf17f4d8959ad982aeca48fa88558b313401752 | refs/heads/master | 2020-07-05T03:28:04.506973 | 2019-09-10T09:37:48 | 2019-09-10T09:37:48 | 202,507,975 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 431 | java | package com.excepiton;
import com.excepition.CommonExcepition;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpStatus;
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum ArticleException implements CommonExcepition {
NOT_FIND_ARTICLE(HttpStatus.NOT_FOUND.value(),"未发现文章");
private Integer code;
private String message;
}
| [
"[email protected]"
] | |
1207ff8d5ac24b35265c79d24675c3c644400ad0 | 3c7b188736fbfea778c45edd7e6bb9e6789f7306 | /src/main/java/locadora/rn/VeiculoRN.java | 723b972716f83960e1617192f9bf99a2d4752de1 | [] | no_license | jhonatans01/locadora-SIN5005 | 84b48901d43b0e3b30c0914292b3fcfff5767fb2 | ea93ef323119cc2fcdbc293b20dd9d1e6b397e72 | refs/heads/master | 2021-05-01T12:11:28.931851 | 2018-02-11T04:19:57 | 2018-02-11T04:19:57 | 121,060,816 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,243 | 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 locadora.rn;
import java.util.List;
import locadora.dao.VeiculoDAO;
import locadora.entity.Aluguel;
import locadora.entity.Veiculo;
/**
*
* @author jhonatan
*/
public class VeiculoRN {
private final VeiculoDAO dao = new VeiculoDAO();
public VeiculoRN() {
}
public boolean salvar(Veiculo veiculo) {
boolean salvou = true;
if (veiculo.getId() == null) {
salvou &= dao.criar(veiculo);
} else {
salvou &= dao.alterar(veiculo);
}
return salvou;
}
public boolean excluir(Veiculo v) {
v = dao.obter(Veiculo.class, v.getId());
return dao.excluir(v);
}
public List<Veiculo> obterTodos() {
return dao.obterTodos(Veiculo.class);
}
public List<Veiculo> obterMaisAlugados() {
return dao.obterVeiculosMaisAlugados();
}
public List<Veiculo> obterPorBusca(Aluguel a) {
return dao.obterVeiculosBusca(a);
}
public Veiculo obter(Integer id) {
return dao.obter(Veiculo.class, id);
}
}
| [
"[email protected]"
] | |
33ad73d6f508b1db5f67342f06621fbf8ada0fb1 | 5561d1d98c86e345e4f3465231ba8a29bc667180 | /src/module-info.java | 7d5765dd74451be880180bd3d33a2fce83799e26 | [] | no_license | Akash2248/SeleniumBasic | 125a5441343b1f655c41b63131bde9d8a3ebfd53 | 691ad140139f1c3487c163631a2a295552e44def | refs/heads/master | 2020-05-17T20:24:18.215936 | 2019-04-28T20:34:56 | 2019-04-28T20:34:56 | 183,944,211 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 67 | java | /**
*
*/
/**
* @author mohammad
*
*/
module SeleniumBasic {
} | [
"[email protected]"
] | |
d78987253d4cc221ce62d913589d3353c4747394 | de8f0f09b3e9b06653514ffd61b74f5aa9bfeef2 | /src/main/java/com/lectureemail/protocol/implementation/Pop3ImapStoreManager.java | 941ef86997b5e7666406b3829388a91325755921 | [] | no_license | DanielSpartacus/projectLectureMail | f16fd5e043caa274b388470686ca11f963ed3331 | 9083c6cd5e01281d4234575823f56df88f0784e5 | refs/heads/master | 2020-03-18T12:04:13.088808 | 2018-05-25T17:14:37 | 2018-05-25T17:14:37 | 134,706,907 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,931 | java | package com.lectureemail.protocol.implementation;
import com.lectureemail.protocol.interfaces.IlectureEmail;
import configuration.Configuration;
import constants.ConfigurationConstants;
import exceptions.ConfigurationException;
import exceptions.MailException;
import exceptions.Pop3ImapStoreManagerException;
import filtreMail.Pop3ImapMailFilter;
import model.Mail;
import org.apache.commons.lang3.StringUtils;
import javax.mail.*;
import java.util.List;
import java.util.Properties;
public class Pop3ImapStoreManager implements IlectureEmail {
Properties props = new Properties();
private Store store;
public void init() throws Pop3ImapStoreManagerException, ConfigurationException {
// Get the configuration
String protocol = Configuration.getInstance().getProtocol();
props.setProperty(ConfigurationConstants.MAIL_STORE_PROTOCOL, protocol);
props.setProperty(ConfigurationConstants.MAIL_HOST_POP3,protocol);
props.setProperty(ConfigurationConstants.MAIL_POP3_PORT,protocol);
props.setProperty(ConfigurationConstants.MAIL_IMAP_STARTTLS_ENABLE, Boolean.TRUE.toString());
// Get The session and set the related configuration
Session session = Session.getDefaultInstance(props);
session.setDebug(Configuration.getInstance().getPropertyValueAsBoolean(ConfigurationConstants.MAIL_DEBUG_ENABLE));
// On récupère le store
try {
store = session.getStore(protocol);
}
catch (NoSuchProviderException e) {
throw new Pop3ImapStoreManagerException(e);
}
}
/**
* Opening a connection to the store
*
* @throws Pop3ImapStoreManagerException
*/
public void openConnection() throws Pop3ImapStoreManagerException, ConfigurationException {
if (store != null && !store.isConnected()) {
// Get connection specific parameters
String host = Configuration.getInstance().getPropertyValueAsString(ConfigurationConstants.MAIL_HOST);
String user = Configuration.getInstance().getPropertyValueAsString(ConfigurationConstants.MAIL_USER);
String password = Configuration.getInstance().getPropertyValueAsString(ConfigurationConstants.MAIL_PASSWORD);
if (StringUtils.isNotEmpty(host) && StringUtils.isNotEmpty(user) && StringUtils.isNotEmpty(password)) {
try {
store.connect(host, user, password);
}
catch (MessagingException e) {
throw new Pop3ImapStoreManagerException(e);
}
}
else {
throw new Pop3ImapStoreManagerException("Connection failed. " +
"It's mandatory to provide the host, user et password of the mail server");
}
}
else {
throw new Pop3ImapStoreManagerException("The store hasn't been initialized.");
}
}
/**
* Close the store connection
*
* @throws Pop3ImapStoreManagerException
*/
public void closeConnection() throws Pop3ImapStoreManagerException {
if (store != null && store.isConnected()) {
try {
store.close();
}
catch (MessagingException e) {
throw new Pop3ImapStoreManagerException("Closing the store has failed", e);
}
}
}
@Override
public List<Mail> listeMail() throws Pop3ImapStoreManagerException, ConfigurationException {
List<Mail> messageList;
if (store != null && store.isConnected()) {
Folder emailFolder;
try {
emailFolder = store.getFolder(ConfigurationConstants.MAIL_ROOT_DIRECTORY_NAME);
}
catch (MessagingException e) {
emailFolder = null;
}
if (emailFolder == null) {
// Trying to retrieve the default directory
try {
emailFolder = store.getDefaultFolder();
}
catch (MessagingException e) {
throw new Pop3ImapStoreManagerException(e);
}
}
// Opening the mail folder in read only
try {
emailFolder.open(Folder.READ_ONLY);
}
catch (MessagingException e) {
throw new Pop3ImapStoreManagerException(e);
}
try {
messageList = Pop3ImapMailFilter.filterMessages(emailFolder);
}
catch (MailException e) {
throw new Pop3ImapStoreManagerException(e);
}
}
else {
throw new Pop3ImapStoreManagerException("The store initialization failed " +
"or the connexion hasn't been established");
}
return messageList;
}
}
| [
"[email protected]"
] | |
96efbed182c0ed6eb2ef215db1fd6ee611aee207 | 830a0c753b5dd2c06d0f25f7b5c4ebf8e59341e5 | /jaxrs-hibernate-client/src/test/java/com/atomikos/jaxrshibernateclient/JaxrsHibernateClientApplicationTests.java | 55518de903ca67a72a00f75de7748007712ec9ee | [] | no_license | atomikos/transactions-over-rest-with-hybrid-jaxrs-stack | e9d31d5f812a4fc7808f6b247c3d5d9c8c0bbd07 | e44ad5711b1581025a25f93e4d7f4120e737a26c | refs/heads/master | 2023-07-09T14:53:42.982725 | 2020-03-31T12:17:37 | 2020-03-31T12:17:37 | 251,315,079 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 227 | java | package com.atomikos.jaxrshibernateclient;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class JaxrsHibernateClientApplicationTests {
@Test
void contextLoads() {
}
}
| [
"[email protected]"
] | |
ed4acb2967af97f7673bf761b225578e7795d62c | 27c060ca18ce6ad575ae8ee642c571fffd9b2b9c | /HoneycombMatchThree/src/com/handknittedapps/honeycombmatchthree/logic/moves/ConvertToBombMove.java | ef4327e859d28cf00a388952dc7afc1692ab0150 | [] | no_license | porke/HoneycombMatchThree | cfb7ba2d66f3c0cad44f36e85fcd5eeecca89291 | 3f109ba3119055e2b4d02388bf06baaa9eca3656 | refs/heads/master | 2020-12-03T09:26:53.463553 | 2018-08-06T17:19:11 | 2018-08-06T17:19:11 | 29,539,997 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,007 | java | package com.handknittedapps.honeycombmatchthree.logic.moves;
import com.handknittedapps.honeycombmatchthree.logic.Block;
import com.handknittedapps.honeycombmatchthree.logic.BlockType;
import com.handknittedapps.honeycombmatchthree.logic.DestructionSequence;
import com.handknittedapps.honeycombmatchthree.logic.Map;
import com.handknittedapps.honeycombmatchthree.logic.graph.GraphVertex;
public class ConvertToBombMove extends Move
{
ConvertToBombMove()
{
// Disable instantiation
}
@Override
public DestructionSequence perform(GraphVertex<Block> src,
GraphVertex<Block> dest, Map map)
{
src.getData().setType(BlockType.Bomb);
this.affectedBlocks.add(src.getData());
return null;
}
@Override
public boolean canMove(GraphVertex<Block> src, GraphVertex<Block> dest, int numDirections)
{
return (src != null
&& src.getData().getType() == BlockType.Normal
&& src.getData().getStrength() == 1);
}
@Override
public MoveType getType()
{
return MoveType.BombChange;
}
}
| [
"[email protected]"
] | |
32d3dafd936816c9161fe5b28711bffacfb1168d | 552fc1444b4ac6782861eaf9ec672cec6df84094 | /src/test/java/com/custom/junit/junitdemo/BasicTest.java | b52427b5b91462d459ecdfb94a24489caf588241 | [] | no_license | lotusfan/junit-demo | 61d8dc5600a0f1a0b3033d0a0a4aa7f0eb1458f0 | bfcaa02ec46e3302d65fb388245b06e678ff58a0 | refs/heads/master | 2020-03-24T16:57:24.905823 | 2018-07-30T08:00:19 | 2018-07-30T08:00:19 | 142,844,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 476 | java | package com.custom.junit.junitdemo;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringRunner;
/**
* @title: BasicTest
* @description:
* @author: zhangfan
* @data: 2018年07月16日 11:29
*/
public class BasicTest {
@Before
public void fe() {
System.out.println("before");
}
@Test
public void print() {
System.out.println("basic test");
}
}
| [
"[email protected]"
] | |
c132a394723578aefeba9605254c629b66c6b190 | 6847b658e62c314cda31a6285a3b0f412d26ad5e | /BedSurvivalGames/Event/BedBreakEvent.java | c0aa40074d6377e13a92470008ae8185ae56cb9b | [] | no_license | Apeami/BedWars-SurvivalGames | 3da92c4a088d67b086d82c6ddf13c239e6ae116d | 2dea86e09db03dff4122dc893b656b51b2b8ad81 | refs/heads/master | 2020-06-29T23:20:14.688493 | 2019-08-05T13:17:59 | 2019-08-05T13:17:59 | 200,654,164 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,755 | java | package io.github.Apeami.BedSurvivalGames.Event;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import io.github.Apeami.BedSurvivalGames.GameJoiner;
import io.github.Apeami.BedSurvivalGames.Coins.RewardReason;
import io.github.Apeami.BedSurvivalGames.Game.BedWarsTracker;
import io.github.Apeami.BedSurvivalGames.Game.Minigame;
import io.github.Apeami.BedSurvivalGames.Game.bedState;
public class BedBreakEvent implements Listener{
private GameJoiner joiner;
public BedBreakEvent(GameJoiner joiner) {
this.joiner=joiner;
}
@EventHandler
void BreakEvent(BlockBreakEvent event) {
if(event.getBlock().getType()==Material.WHITE_BED) {
Player player= event.getPlayer();
Minigame game=this.joiner.getGame(player);
BedWarsTracker tracker=game.getTracker();
Player bedowner= tracker.getPlayerBed(event.getBlock().getLocation());
if (game.timeSinceStart()>BedWarsTracker.timeToBed) {
if (bedowner!=null) {
//game.getConfig().getPlugin().getLogger().info("Bedowner:"+bedowner.getDisplayName());
//game.getConfig().getPlugin().getLogger().info("Player:"+player.getDisplayName());
if (bedowner!=null) {
//if (bedowner!=player)
tracker.breakBed(bedowner, bedState.BROKEN);
game.sendMessage(ChatColor.AQUA+bedowner.getDisplayName()+"'s bed has been broken by "+player.getDisplayName());
this.joiner.getCoinData().addCoins(player, RewardReason.BEDBREAK);
return;
//}
}
}
}
else {
event.setCancelled(true);
player.sendMessage(ChatColor.GOLD+"Bed Breaking is not Enabled Yet");
}
}
}
}
| [
"[email protected]"
] | |
00ee09d98f33c711969ed81dfb2a1cead42aed4f | e31ebd9d6aafee4d5a0c0a92e6a9e3de2a804718 | /user-service/src/main/java/com/syraven/cloud/dao/UserGeohashMapper.java | a6c3ff649d310f510f2be334f155b1c01ff3e0d2 | [] | no_license | EverettSy/Spring-Cloud | 4185c74cb515444a53238ef007f858f77100e1d5 | 01906acc334a3f248aada478821acebf2adda932 | refs/heads/master | 2023-07-17T05:07:16.778406 | 2023-03-27T14:41:45 | 2023-03-27T14:41:45 | 220,041,373 | 2 | 0 | null | 2023-06-14T22:52:12 | 2019-11-06T16:27:56 | Java | UTF-8 | Java | false | false | 330 | java | package com.syraven.cloud.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.syraven.cloud.domain.UserGeohash;
import org.apache.ibatis.annotations.Mapper;
/**
* <<功能简述>>
*
* @author Raven
* @date 2020/5/8 16:17
*/
@Mapper
public interface UserGeohashMapper extends BaseMapper<UserGeohash> {
} | [
"[email protected]"
] | |
5981f0e1ebbbb2dd764db87fbc0f3d63d6b538b1 | 8e01452d417904c95244d82639aaca40e5fb7754 | /intells-web/src/main/java/cn/edu/ujs/lp/intells/Application.java | 9893f86a000ae83b796a5cd8523190c6d916a850 | [] | no_license | SherZhai1996/GYZK | 50c173efb53139997d0e9b782324a1baa8e729e9 | 2cea32a4fc5045190e8c5952cd6b39aae4d9091a | refs/heads/master | 2022-08-16T17:11:49.705440 | 2020-03-27T11:31:53 | 2020-03-27T11:31:53 | 250,510,784 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 322 | java | package cn.edu.ujs.lp.intells;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
| [
"[email protected]"
] | |
98ebeecfa1c46e99a6ab732f3ee76bd04220b33c | 671157045a010c7d462aae25eab9b11c1c35db37 | /src/pl/polsl/triangles/model/package-info.java | a63aea48f36df16af296548be5e5994861612b21 | [] | no_license | michkwi039/Triangles | 5b713cd0eae1359db2b4e229b37cd8bef0247cfa | dce9c266ebcdf190ed86b10131b926108c41f8ca | refs/heads/master | 2020-04-08T13:54:43.602093 | 2018-11-27T23:24:35 | 2018-11-27T23:24:35 | 159,412,920 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 287 | 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 that contains model of triangle project
*/
package pl.polsl.triangles.model;
| [
"[email protected]"
] | |
038b04cd93074a32a42b4df692e2aa29def121ec | a38fc263e77639a83d82abda440abf88f4179d94 | /IF-1-10118007-Latihan28-GantiKata/src/pkgif/pkg1/pkg10118007/latihan28/gantikata/IF110118007Latihan28GantiKata.java | c475841936329ee8fe4f274acbe694ad14655185 | [] | no_license | RamaA-H/IF-1-10118007-Latihan28-Ganti-Kata | 4e2110be7654b0d7fa009a4b1a8a0a9ffec6952b | 3f30d53e1b73a5234186aaea4534fd3d9802c863 | refs/heads/master | 2020-08-06T23:25:42.994345 | 2019-10-07T13:28:14 | 2019-10-07T13:28:14 | 213,197,618 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,356 | 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 pkgif.pkg1.pkg10118007.latihan28.gantikata;
import java.util.Scanner;
/**
* Nama : Rama Al Halik
* Kelas : IF-1
* NIM : 10118007
* Deskripsi : Mengganti kata yang dipilih
* @author Rama
*/
public class IF110118007Latihan28GantiKata {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
String kalimatawal, kalimatbaru, cari, ganti;
Scanner masuk = new Scanner(System.in);
//input
System.out.println("=====Program Mengganti Kata=====");
System.out.print("Masukkan Kalimat\t: ");
kalimatawal = masuk.nextLine();
System.out.print("Ganti Kata\t\t: ");
cari = masuk.nextLine();
System.out.print("Menjadi Kata\t\t: ");
ganti = masuk.nextLine();
//output
kalimatbaru = kalimatawal.replace(cari, ganti);
System.out.println("\n======Hasil Formatting=====");
System.out.printf("Kalimat awal\t: %s%n", kalimatawal);
System.out.printf("Kalimat baru\t: %s%n", kalimatbaru);
}
}
| [
"[email protected]"
] | |
9eb9cfcdaa934d05260ca9e9d9acd89734d6ddf1 | 93c99ee9770362d2917c9494fd6b6036487e2ebd | /server/decompiled_apps/2b7122657dcb75ede8840eff964dd94a/com.bankeen.ui.transfer.account.sender/-$$Lambda$f$gynxAL_qwxqXXreFUCK6CHcmxx0.java | 331abb137c9f7d4cc162ddda2f141c8e607c6652 | [] | no_license | YashJaveri/Satic-Analysis-Tool | e644328e50167af812cb2f073e34e6b32279b9ce | d6f3be7d35ded34c6eb0e38306aec0ec21434ee4 | refs/heads/master | 2023-05-03T14:29:23.611501 | 2019-06-24T09:01:23 | 2019-06-24T09:01:23 | 192,715,309 | 0 | 1 | null | 2023-04-21T20:52:07 | 2019-06-19T11:00:47 | Smali | UTF-8 | Java | false | false | 384 | java | package com.bankeen.ui.transfer.account.sender;
/* compiled from: lambda */
public final /* synthetic */ class -$$Lambda$f$gynxAL_qwxqXXreFUCK6CHcmxx0 implements Runnable {
private final /* synthetic */ f f$0;
public /* synthetic */ -$$Lambda$f$gynxAL_qwxqXXreFUCK6CHcmxx0(f fVar) {
this.f$0 = fVar;
}
public final void run() {
this.f$0.c();
}
} | [
"[email protected]"
] | |
eb3e683710dfa62dd4d3b2de48e57de50c2ed7c0 | 973d21457baffcf7d6c82476e744fb030f4a4aa7 | /src/codigo/VentanaCalculadora.java | 4738bb03c36898b3cad57d2cc8e5b50a46c6d7a4 | [] | no_license | Geletejo/Calculadora | 419ad1dba19491a86dd5a4a1d660733ad402cf6d | 177b8f86f75b17675f33f3e3a5e2d256a92d857c | refs/heads/master | 2020-04-16T03:21:12.812738 | 2019-01-11T12:03:43 | 2019-01-11T12:03:43 | 165,229,121 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 27,552 | 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 codigo;
/**
*
* @author xp
*/
public class VentanaCalculadora extends javax.swing.JFrame {
double operando1 = 0; //Primer operando.
String operacion = ""; //Guarda que opercaion se ha pulsado
/**
* Creates new form VentanaCalculadora
*/
public VentanaCalculadora() {
initComponents();
}
private void numeroPulsado(String numero){
if (pantalla.getText() == "0"){
pantalla.setText(numero);
}
else {
pantalla.setText(pantalla.getText() + numero);
}
}
private void operacionPulsada(String _operacion){
operacion = _operacion;
//Se convierte los escrito en la pantalla (el numero pero que ahora es un String) a su equivalente double, para poder operar.
operando1 = Double.valueOf (pantalla.getText());
//borro pantalla
pantalla.setText("0");
pantalla2.setText(String.valueOf(operando1));
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
pantalla = new javax.swing.JLabel();
button7 = new javax.swing.JButton();
button8 = new javax.swing.JButton();
button9 = new javax.swing.JButton();
button4 = new javax.swing.JButton();
button5 = new javax.swing.JButton();
button6 = new javax.swing.JButton();
button1 = new javax.swing.JButton();
button2 = new javax.swing.JButton();
button3 = new javax.swing.JButton();
suma = new javax.swing.JButton();
resta = new javax.swing.JButton();
multiplicacion = new javax.swing.JButton();
button0 = new javax.swing.JButton();
igual = new javax.swing.JButton();
division = new javax.swing.JButton();
pantalla2 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
pantalla.setBackground(java.awt.Color.black);
pantalla.setFont(new java.awt.Font("Tahoma", 0, 48)); // NOI18N
pantalla.setForeground(new java.awt.Color(0, 51, 255));
pantalla.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
pantalla.setText("0");
pantalla.setOpaque(true);
button7.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button7.setText("7");
button7.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button7MousePressed(evt);
}
});
button7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button7ActionPerformed(evt);
}
});
button8.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button8.setText("8");
button8.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button8MousePressed(evt);
}
});
button8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button8ActionPerformed(evt);
}
});
button9.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button9.setText("9");
button9.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button9MousePressed(evt);
}
});
button9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button9ActionPerformed(evt);
}
});
button4.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button4.setText("4");
button4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button4MousePressed(evt);
}
});
button4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button4ActionPerformed(evt);
}
});
button5.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button5.setText("5");
button5.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button5MousePressed(evt);
}
});
button5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button5ActionPerformed(evt);
}
});
button6.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button6.setText("6");
button6.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button6MousePressed(evt);
}
});
button6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button6ActionPerformed(evt);
}
});
button1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button1.setText("1");
button1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button1MousePressed(evt);
}
});
button1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button1ActionPerformed(evt);
}
});
button2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button2.setText("2");
button2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button2MousePressed(evt);
}
});
button2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button2ActionPerformed(evt);
}
});
button3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button3.setText("3");
button3.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button3MousePressed(evt);
}
});
button3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button3ActionPerformed(evt);
}
});
suma.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
suma.setText("+");
suma.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
sumaMousePressed(evt);
}
});
suma.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
sumaActionPerformed(evt);
}
});
resta.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
resta.setText("-");
resta.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
restaMousePressed(evt);
}
});
resta.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
restaActionPerformed(evt);
}
});
multiplicacion.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
multiplicacion.setText("*");
multiplicacion.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
multiplicacionMousePressed(evt);
}
});
multiplicacion.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
multiplicacionActionPerformed(evt);
}
});
button0.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
button0.setText("0");
button0.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
button0MousePressed(evt);
}
});
button0.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button0ActionPerformed(evt);
}
});
igual.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
igual.setText("=");
igual.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
igualMousePressed(evt);
}
});
igual.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
igualActionPerformed(evt);
}
});
division.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
division.setText("/");
division.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
divisionMousePressed(evt);
}
});
division.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
divisionActionPerformed(evt);
}
});
pantalla2.setBackground(java.awt.Color.black);
pantalla2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
pantalla2.setForeground(java.awt.Color.blue);
pantalla2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
pantalla2.setText("0");
pantalla2.setOpaque(true);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(pantalla2, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(pantalla, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(button2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(button3, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(multiplicacion, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(button4, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(button5, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(button6, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(resta, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(button7, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(button8, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(button9, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(52, 52, 52)
.addComponent(suma, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(button0, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(igual, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(division, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(pantalla2, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(pantalla, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(button7, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button8, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button9, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(suma, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(button6, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button5, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button4, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(resta, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button2, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button3, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(multiplicacion, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(button0, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(igual, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(division, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void button7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button7ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_button7ActionPerformed
private void button7MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button7MousePressed
numeroPulsado("7");
}//GEN-LAST:event_button7MousePressed
private void button8MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button8MousePressed
numeroPulsado("8");
}//GEN-LAST:event_button8MousePressed
private void button8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button8ActionPerformed
}//GEN-LAST:event_button8ActionPerformed
private void button9MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button9MousePressed
numeroPulsado("9");
}//GEN-LAST:event_button9MousePressed
private void button9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button9ActionPerformed
}//GEN-LAST:event_button9ActionPerformed
private void button4MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button4MousePressed
numeroPulsado("4");
}//GEN-LAST:event_button4MousePressed
private void button4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button4ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_button4ActionPerformed
private void button5MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button5MousePressed
numeroPulsado("5");
}//GEN-LAST:event_button5MousePressed
private void button5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button5ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_button5ActionPerformed
private void button6MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button6MousePressed
numeroPulsado("6");
}//GEN-LAST:event_button6MousePressed
private void button6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button6ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_button6ActionPerformed
private void button1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button1MousePressed
numeroPulsado("1");
}//GEN-LAST:event_button1MousePressed
private void button1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_button1ActionPerformed
private void button2MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button2MousePressed
numeroPulsado("2");
}//GEN-LAST:event_button2MousePressed
private void button2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_button2ActionPerformed
private void button3MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button3MousePressed
numeroPulsado("3");
}//GEN-LAST:event_button3MousePressed
private void button3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button3ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_button3ActionPerformed
private void sumaMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_sumaMousePressed
operacionPulsada("+");
}//GEN-LAST:event_sumaMousePressed
private void sumaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sumaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_sumaActionPerformed
private void restaMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_restaMousePressed
operacionPulsada("-");
}//GEN-LAST:event_restaMousePressed
private void restaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_restaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_restaActionPerformed
private void multiplicacionMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_multiplicacionMousePressed
operacionPulsada("*");
}//GEN-LAST:event_multiplicacionMousePressed
private void multiplicacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_multiplicacionActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_multiplicacionActionPerformed
private void button0MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button0MousePressed
numeroPulsado("0");
}//GEN-LAST:event_button0MousePressed
private void button0ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button0ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_button0ActionPerformed
private void igualMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_igualMousePressed
//Leo el segundo operando que esta en la pantalla y lo convierto a un Double.
double operando2 = Double.valueOf (pantalla.getText());
if (operacion.equals("+")){
operando1= operando1 + operando2;
}
if (operacion.equals("-")){
operando1= operando1 - operando2;
}
if (operacion.equals("*")){
operando1= operando1 * operando2;
}
if (operacion.equals("/")){
operando1= operando1 / operando2;
}
//Dibujo en la pantalla el resultado convertido a string
pantalla.setText(String.valueOf (operando1));
}//GEN-LAST:event_igualMousePressed
private void igualActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_igualActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_igualActionPerformed
private void divisionMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_divisionMousePressed
operacionPulsada("/");
}//GEN-LAST:event_divisionMousePressed
private void divisionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_divisionActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_divisionActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(VentanaCalculadora.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(VentanaCalculadora.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(VentanaCalculadora.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(VentanaCalculadora.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new VentanaCalculadora().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton button0;
private javax.swing.JButton button1;
private javax.swing.JButton button2;
private javax.swing.JButton button3;
private javax.swing.JButton button4;
private javax.swing.JButton button5;
private javax.swing.JButton button6;
private javax.swing.JButton button7;
private javax.swing.JButton button8;
private javax.swing.JButton button9;
private javax.swing.JButton division;
private javax.swing.JButton igual;
private javax.swing.JButton multiplicacion;
private javax.swing.JLabel pantalla;
private javax.swing.JLabel pantalla2;
private javax.swing.JButton resta;
private javax.swing.JButton suma;
// End of variables declaration//GEN-END:variables
}
| [
"xp@CETYSDAM026"
] | xp@CETYSDAM026 |
233be61b872bfe7d711b6ab1902edc17d5e35acc | 47fd33e01ea9fe12e738b73b184509d2052a5240 | /src/main/java/com/shiftedtech/spree/Util/Locators/DriverFactoryComponents.java | 8f79022f3a15fa178a54bfb8242f0acf8451f34b | [] | no_license | BahjatKhan/spree-app-automation-project | 71c3539fca156bc4f8226de423cad14b7d4a8981 | cfb68d1be4389751b2b8e321a6ebf0bd38b0fdea | refs/heads/master | 2022-12-18T09:55:52.564502 | 2020-09-19T12:42:01 | 2020-09-19T12:42:01 | 296,866,004 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,130 | java | package com.shiftedtech.spree.Util.Locators;
import io.github.bonigarcia.wdm.ChromeDriverManager;
import io.github.bonigarcia.wdm.FirefoxDriverManager;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import java.net.MalformedURLException;
import java.net.URL;
class DriverFactoryComponents {
protected static WebDriver driver;
protected static ThreadLocal<WebDriver> driverCollection = new ThreadLocal<WebDriver>();
protected static DesiredCapabilities caps = new DesiredCapabilities();
protected static final String LOCAL_GRID_URL = "http://selenium-hub.shiftedtech.com/wd/hub";
protected static final String USERNAME = "bahjatkhan1";
protected static final String AUTOMATE_KEY = "TbVWMFj8YNcEMSkvwoqt";
protected static final String CLOUD_GRID_URL = "https://" + USERNAME + ":" + AUTOMATE_KEY + "@hub-cloud.browserstack.com/wd/hub";
protected static void getFireFox() {
FirefoxDriverManager.firefoxdriver().arch64().setup();
FirefoxOptions options = new FirefoxOptions();
options.setCapability("marionette", true);
driver = new FirefoxDriver(options);
}
protected static void getChrome() {
ChromeDriverManager.chromedriver().setup();
driver = new ChromeDriver();
}
protected static void getChromeHeadless() {
ChromeDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless")
.addArguments("--disable-gpu")
.addArguments("--window-size=1920,1080")
.addArguments("--ignore-certificate-errors");
//options.setBinary("/Path/to/specific/version/of/Google Chrome");
driver = new ChromeDriver(options);
}
protected static void getFireFoxGrid() {
caps.setPlatform(Platform.ANY);
caps.setBrowserName("firefox");
try {
driver = new RemoteWebDriver(new URL(LOCAL_GRID_URL), caps);
} catch (MalformedURLException e) {
e.printStackTrace();
}
//FirefoxOptions options = new FirefoxOptions();
//options.setCapability("marionette", true);
//driver = new FirefoxDriver(options);
}
protected static void getChromeGrid() {
caps.setPlatform(Platform.ANY);
caps.setBrowserName("chrome");
try {
driver = new RemoteWebDriver(new URL(LOCAL_GRID_URL), caps);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
protected static void getFireFoxCloud() {
caps.setCapability("browser", "Firefox");
caps.setCapability("browser_version", "70.0");
getCloudWindowsOsSetting();
}
protected static void getChromeCloud() {
caps.setCapability("browser", "Chrome");
caps.setCapability("browser_version", "77.0");
getCloudWindowsOsSetting();
}
public static WebDriver getDriver() {
return driverCollection.get();
}
public static void removeDriver() {
// Quits the driver and closes the browser
try {
driverCollection.get().close();
driverCollection.get().quit();
} catch (Exception ex) {
System.out.println(ex.getMessage());
} finally {
driverCollection.remove();
}
}
private static void getCloudWindowsOsSetting(){
caps.setCapability("os", "Windows");
caps.setCapability("os_version", "10");
caps.setCapability("resolution", "1920x1080");
caps.setCapability("name", "Cloud-Browser");
try {
driver = new RemoteWebDriver(new URL(CLOUD_GRID_URL), caps);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
d3657313656197c6d6d93a3eb485a6d004207bb1 | 37233bda502416dd07f4dee5e9ee5b17fea9e8e0 | /src/com/betcesc/game/interfaces/EquipoIF.java | 0ccf2b3d1155a899f5b09e28b775c396a02c5014 | [] | no_license | josue1497/bets | 7ca6e363ead5819e38fb6ed9443f73a330abc5fd | 36dc360daafdff19d726a022c4e860e584caac6a | refs/heads/master | 2020-12-29T12:13:39.928999 | 2019-01-31T03:06:24 | 2019-01-31T03:06:24 | 238,603,171 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 987 | java | /*
* Proyecto Betcesc.com - Sistema de Jugadas Deportivas.
* Fecha: 23/04/2010 - 08:50:23
*
* Copyright (C) Betcesc, 2010. Caracas, Venezuela. All rights
* reserved. Todos los derechos reservados.
*/
package com.betcesc.game.interfaces;
/**
* Transfiere los valores desde el objeto de Tipo Factory.
*
* @author jrivero
*
* Permite la creacion de objetos de tipo EquipoTO serializables.
*/
public interface EquipoIF {
/**
* @return Returns the idEquipo.
*/
public String getIdEquipo();
/**
* @param idEquipo
* The idEquipo to set.
*/
public void setIdEquipo(String idEquipo);
/**
* @return Returns the descEquipo.
*/
public String getDescEquipo();
/**
* @param descEquipo
* The descEquipo to set.
*/
public void setDescEquipo(String descEquipo);
public String getAbreviatura();
public void setAbreviatura(String abreviatura);
public String getDescCorta();
public void setDescCorta(String descCorta);
}
| [
"[email protected]"
] | |
a251c98b8d9976a0d230f604bae1519a459608e4 | 593e94f91a7d578aa718cc44942606ff5a368c07 | /app/src/main/java/com/gmail/hanivisushiva/aksharafinserve/Models/Login/Data.java | 105ff88e763646a84da0ea3dcbe40443604359a3 | [] | no_license | nshivaprasadreddy/akshara_customer_model | 0ce18d1950f1c6619d782ba097fd2188779c8481 | 24e2663dc5ea0b80782475043d2b76642330c268 | refs/heads/master | 2020-04-07T12:45:57.174472 | 2019-03-27T07:03:18 | 2019-03-27T07:03:46 | 158,380,262 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,289 | java | package com.gmail.hanivisushiva.aksharafinserve.Models.Login;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Data {
@SerializedName("rid")
@Expose
private String rid;
@SerializedName("serivces")
@Expose
private String serivces;
@SerializedName("others")
@Expose
private String others;
@SerializedName("image")
@Expose
private String image;
@SerializedName("client_code")
@Expose
private String clientCode;
@SerializedName("name")
@Expose
private String name;
@SerializedName("password")
@Expose
private String password;
@SerializedName("email")
@Expose
private String email;
@SerializedName("contact_person")
@Expose
private String contactPerson;
@SerializedName("phone")
@Expose
private String phone;
@SerializedName("message")
@Expose
private String message;
@SerializedName("role")
@Expose
private String role;
@SerializedName("status")
@Expose
private String status;
@SerializedName("date")
@Expose
private String date;
@SerializedName("service_agreement")
@Expose
private String serviceAgreement;
@SerializedName("motp")
@Expose
private String motp;
@SerializedName("motpver")
@Expose
private String motpver;
@SerializedName("eotp")
@Expose
private String eotp;
@SerializedName("eotpver")
@Expose
private String eotpver;
public String getRid() {
return rid;
}
public void setRid(String rid) {
this.rid = rid;
}
public String getSerivces() {
return serivces;
}
public void setSerivces(String serivces) {
this.serivces = serivces;
}
public String getOthers() {
return others;
}
public void setOthers(String others) {
this.others = others;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getClientCode() {
return clientCode;
}
public void setClientCode(String clientCode) {
this.clientCode = clientCode;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getContactPerson() {
return contactPerson;
}
public void setContactPerson(String contactPerson) {
this.contactPerson = contactPerson;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getServiceAgreement() {
return serviceAgreement;
}
public void setServiceAgreement(String serviceAgreement) {
this.serviceAgreement = serviceAgreement;
}
public String getMotp() {
return motp;
}
public void setMotp(String motp) {
this.motp = motp;
}
public String getMotpver() {
return motpver;
}
public void setMotpver(String motpver) {
this.motpver = motpver;
}
public String getEotp() {
return eotp;
}
public void setEotp(String eotp) {
this.eotp = eotp;
}
public String getEotpver() {
return eotpver;
}
public void setEotpver(String eotpver) {
this.eotpver = eotpver;
}
} | [
"[email protected]"
] | |
85994c4db7e0995387a4a449eb0ec6c70be76ebf | e6fe2361d90b02f56116e8f7fe81a2f9f0ee6e33 | /FootballLabH5/.svn/pristine/08/08842e041be46623542383199002b0a9c7a2aa5c.svn-base | 65bc1ce389f5dcb149e12ff8b850d1e1f5b9fac3 | [] | no_license | liyq92/football | 1646952712414ea4cc47143b8e3cd709cecdda6e | f6e3da8c8974357c2a5eecedbe01f0c977c552ae | refs/heads/master | 2021-01-11T11:01:26.551324 | 2017-01-23T05:45:29 | 2017-01-23T05:45:29 | 78,816,870 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,504 | package com.visolink.entity.dto;
public class OtherLeagueTwoOnOneEditDTO {
private BettingGameDTO gameInfoOne;
private BettingGameDTO gameInfoTwo;
private Integer id;
private String expertId;
private String serviceId;
private String serviceCode;
private Double winWinAmount;
private Double winDrawAmount;
private Double winLoseAmount;
private Double drawWinAmount;
private Double drawDrawAmount;
private Double drawLoseAmount;
private Double loseWinAmount;
private Double loseDrawAmount;
private Double loseLoseAmount;
private OtherLeagueOddsDTO oddsInfoOne;
private OtherLeagueOddsDTO oddsInfoTwo;
private Integer twoOnOneMatchId;
public BettingGameDTO getGameInfoOne() {
return gameInfoOne;
}
public void setGameInfoOne(BettingGameDTO gameInfoOne) {
this.gameInfoOne = gameInfoOne;
}
public BettingGameDTO getGameInfoTwo() {
return gameInfoTwo;
}
public void setGameInfoTwo(BettingGameDTO gameInfoTwo) {
this.gameInfoTwo = gameInfoTwo;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getExpertId() {
return expertId;
}
public void setExpertId(String expertId) {
this.expertId = expertId;
}
public String getServiceId() {
return serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
public String getServiceCode() {
return serviceCode;
}
public void setServiceCode(String serviceCode) {
this.serviceCode = serviceCode;
}
public Double getWinWinAmount() {
return winWinAmount;
}
public void setWinWinAmount(Double winWinAmount) {
this.winWinAmount = winWinAmount;
}
public Double getWinDrawAmount() {
return winDrawAmount;
}
public void setWinDrawAmount(Double winDrawAmount) {
this.winDrawAmount = winDrawAmount;
}
public Double getWinLoseAmount() {
return winLoseAmount;
}
public void setWinLoseAmount(Double winLoseAmount) {
this.winLoseAmount = winLoseAmount;
}
public Double getDrawWinAmount() {
return drawWinAmount;
}
public void setDrawWinAmount(Double drawWinAmount) {
this.drawWinAmount = drawWinAmount;
}
public Double getDrawDrawAmount() {
return drawDrawAmount;
}
public void setDrawDrawAmount(Double drawDrawAmount) {
this.drawDrawAmount = drawDrawAmount;
}
public Double getDrawLoseAmount() {
return drawLoseAmount;
}
public void setDrawLoseAmount(Double drawLoseAmount) {
this.drawLoseAmount = drawLoseAmount;
}
public Double getLoseWinAmount() {
return loseWinAmount;
}
public void setLoseWinAmount(Double loseWinAmount) {
this.loseWinAmount = loseWinAmount;
}
public Double getLoseDrawAmount() {
return loseDrawAmount;
}
public void setLoseDrawAmount(Double loseDrawAmount) {
this.loseDrawAmount = loseDrawAmount;
}
public Double getLoseLoseAmount() {
return loseLoseAmount;
}
public void setLoseLoseAmount(Double loseLoseAmount) {
this.loseLoseAmount = loseLoseAmount;
}
public OtherLeagueOddsDTO getOddsInfoOne() {
return oddsInfoOne;
}
public void setOddsInfoOne(OtherLeagueOddsDTO oddsInfoOne) {
this.oddsInfoOne = oddsInfoOne;
}
public OtherLeagueOddsDTO getOddsInfoTwo() {
return oddsInfoTwo;
}
public void setOddsInfoTwo(OtherLeagueOddsDTO oddsInfoTwo) {
this.oddsInfoTwo = oddsInfoTwo;
}
public Integer getTwoOnOneMatchId() {
return twoOnOneMatchId;
}
public void setTwoOnOneMatchId(Integer twoOnOneMatchId) {
this.twoOnOneMatchId = twoOnOneMatchId;
}
}
| [
"[email protected]"
] | ||
e9a7733e0d8a04340126303042109e58ceb51359 | c4a011cc435f2634d728e29ceab9ed1c3e07cab9 | /src/main/java/top/easyblog/sharding/demo/mapper/OrderItemMapper.java | c9f82dd85dc89fc653c6d5ba862a9d5ad7c09906 | [] | no_license | LoverITer/shrding-jdbc-fragmentation | 9d2bb0652fa7ec6935764d5a738bc504199e3081 | f8985e414b271fba380017a9896626805b8533c6 | refs/heads/master | 2022-06-15T22:32:13.976104 | 2020-05-05T14:03:58 | 2020-05-05T14:03:58 | 261,352,269 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 649 | java | package top.easyblog.sharding.demo.mapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.easyblog.sharding.demo.entity.OrderItem;
/**
* Description
*
* @author hujy
* @version 1.0
* @date 2019-09-19 16:46
*/
@Mapper
public interface OrderItemMapper {
@Insert("insert into t_order_item(order_id,remark) values(#{orderId},#{remark})")
Integer save(OrderItem orderItem);
@Select("select * from t_order_item where item_id=#{id}")
OrderItem selectById(@Param(value = "id") Long id);
}
| [
"[email protected]"
] | |
674a995ee5aa9ed16c213c39077e78e1aaa7229f | 2de1efd3586bb3cbce4b4053b22148ab5c448d44 | /offer/Main32.java | 7fb4a0359e28568204bec3466a955f9914c4befc | [] | no_license | ZBQ2018/Android-Advance | a27655381523da1ed952861c62e5e30558baec39 | bd07f254df097625e1d4e1caaefcd6cff4790ceb | refs/heads/master | 2020-03-31T20:22:03.397955 | 2018-04-18T03:48:09 | 2018-04-18T03:48:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 766 | java | package offer;
public class Main32 {
public int GetUglyNumber_Solution(int index) {
if (index <= 0)
return 0;
int[] result = new int[index];
int count = 0;
int i2 = 0;
int i3 = 0;
int i5 = 0;
result[0] = 1;
int tmp = 0;
while (count < index - 1) {
tmp = min(result[i2] * 2, min(result[i3] * 3, result[i5] * 5));
if (tmp == result[i2] * 2) i2++;//三条if防止值是一样的,不要改成else的
if (tmp == result[i3] * 3) i3++;
if (tmp == result[i5] * 5) i5++;
result[++count] = tmp;
}
return result[index - 1];
}
private int min(int a, int b) {
return (a > b) ? b : a;
}
}
| [
"[email protected]"
] | |
034362cef0da27d05af9abaa8c77cf93c5b186f4 | 4c31b3236bdaa459abab15f4559d84b020e5413e | /kraft-contract-invoice-server/src/main/java/com/windsoft/kraft/contract/server/invoice/feign/ProjectUserServer.java | da2bfd28d14903e07eff6a2dc01352099373d8e1 | [] | no_license | RicostTempest/kraft-contract | 1ea4214bf656d2215bfe63f7a27b9a8502c7abcb | 2aa5234c96d84d2043c1a50c8efa9576cfc94e81 | refs/heads/master | 2023-03-29T19:11:21.956755 | 2021-04-08T10:38:09 | 2021-04-08T10:38:09 | 346,213,948 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 717 | java | package com.windsoft.kraft.contract.server.invoice.feign;
import com.windsoft.kraft.contract.common.utils.JsonResult;
import com.windsoft.kraft.contract.server.invoice.feign.fallback.ProjectUserServerFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@Primary
@FeignClient(value = "kraft-contract-project-user-consumer", fallback = ProjectUserServerFallback.class)
public interface ProjectUserServer {
@GetMapping("pu/find/user/{projectId}")
public JsonResult findUserInProject(@PathVariable("projectId") Long id);
}
| [
"[email protected]"
] | |
9631adb671c464564af1784e462c8bcc307144a1 | 94da56591d22ae6f8b437e749db213131a4881c8 | /src/main/java/com/github/shyykoserhiy/gfm/toolwindow/browser/resources/Resources.java | 6404b96f0584fb69d1a3eea967f9b0f8504a3bc6 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ShyykoSerhiy/gfm-plugin | e1a4e29427e72da9389afa243c3ea47f80637160 | d3ac45d818004e8374ef08576e0c588d53d08b79 | refs/heads/master | 2021-07-06T09:46:36.920489 | 2021-05-19T18:14:30 | 2021-05-19T18:14:30 | 31,247,843 | 114 | 24 | MIT | 2019-04-25T14:45:27 | 2015-02-24T06:34:09 | C | UTF-8 | Java | false | false | 247 | java | package com.github.shyykoserhiy.gfm.toolwindow.browser.resources;
import javax.swing.*;
public class Resources {
public static ImageIcon getIcon(String fileName) {
return new ImageIcon(Resources.class.getResource(fileName));
}
}
| [
"[email protected]"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.