blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
47cd7e61f815c2b1908ea0540d6bb3fe7ce5572a
|
bf9cd58ca6cc1baaf51e674a62dda4c37dc6e514
|
/src/main/java/com/github/subchen/maven/plugin/javafmt/JavaFormatter.java
|
238032e5ea24c43dd52cbdf3d2a155cfd70071a4
|
[
"Apache-2.0"
] |
permissive
|
subchen/java-formatter-maven-plugin
|
e819fa97f9c77fb5a7c308b74b3e7e7f9cbe992b
|
af3e167eb9a779cd711de84d160b1658b6f43909
|
refs/heads/master
| 2023-06-15T20:24:27.246379
| 2023-05-06T13:44:19
| 2023-05-06T13:44:19
| 188,395,039
| 0
| 0
|
NOASSERTION
| 2023-05-06T06:41:52
| 2019-05-24T09:37:23
|
Java
|
UTF-8
|
Java
| false
| false
| 3,338
|
java
|
/**
* Copyright 2018-2019 Guoqiang Chen, Shanghai, China. All rights reserved.
*
* Author: Guoqiang Chen
* Email: subchen@gmail.com
* WebURL: https://github.com/subchen
*
* 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.github.subchen.maven.plugin.javafmt;
import lombok.SneakyThrows;
import lombok.val;
import org.dom4j.io.SAXReader;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.ToolFactory;
import org.eclipse.jdt.core.formatter.CodeFormatter;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;
/**
* Format Single Java Source
*
* @author guoqiang.chen
*/
public final class JavaFormatter {
public static final String LINE_SEPARATOR = "\n";
private static final String JAVA_FORMATTER_PREFS_FILE = "java-formatter.xml";
private final CodeFormatter formatter;
public JavaFormatter(File basedir, String compilerSource) {
val options = getFormattingOptions(basedir);
// override by compile source
options.put(JavaCore.COMPILER_SOURCE, compilerSource);
options.put(JavaCore.COMPILER_COMPLIANCE, compilerSource);
options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, compilerSource);
formatter = ToolFactory.createCodeFormatter(options);
}
public String format(String code) throws Exception {
return ImportUtils.reorderAndRemoveUnusedImports(formatCode(code));
}
private String formatCode(String code) throws BadLocationException {
int options = CodeFormatter.K_COMPILATION_UNIT + CodeFormatter.F_INCLUDE_COMMENTS;
val testEdit = formatter.format(options, code, 0, code.length(), 0, LINE_SEPARATOR);
val doc = new Document(code);
testEdit.apply(doc);
return doc.get();
}
@SneakyThrows
private Properties getFormattingOptions(File basedir) {
val file = findup(basedir, JAVA_FORMATTER_PREFS_FILE);
val fileStream = (file != null)
? new FileInputStream(file)
: getClass().getResourceAsStream("/" + JAVA_FORMATTER_PREFS_FILE);
val options = new Properties();
new SAXReader().read(fileStream)
.getRootElement()
.element("profile")
.elements()
.stream()
.forEach(el -> options.setProperty(el.attributeValue("id"), el.attributeValue("value")));
return options;
}
private File findup(File basedir, String fileName) {
File file = new File(basedir, fileName);
if (file.exists()) {
return file;
}
if (basedir.getParentFile() == null) {
return null;
}
return findup(basedir.getParentFile(), fileName);
}
}
|
[
"subchen@gmail.com"
] |
subchen@gmail.com
|
d74f000859cb3e05a730d6c3ff99eeebb7be890e
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/ugc/aweme/setting/p337ui/RadioSettingItem.java
|
321ee67618d9d4d6c8a1dbd5ea93565c01402808
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,592
|
java
|
package com.p280ss.android.ugc.aweme.setting.p337ui;
import android.content.Context;
import android.content.res.TypedArray;
import android.support.p022v4.content.C0683b;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.p280ss.android.ugc.aweme.R$styleable;
import com.p280ss.android.ugc.aweme.base.p308ui.MaterialRippleLayout;
import com.p280ss.android.ugc.aweme.base.utils.C23481i;
import com.zhiliaoapp.musically.df_live_zego_link.R;
/* renamed from: com.ss.android.ugc.aweme.setting.ui.RadioSettingItem */
public class RadioSettingItem extends MaterialRippleLayout {
/* renamed from: i */
private TextView f98523i;
/* renamed from: j */
private TextView f98524j;
/* renamed from: k */
private View f98525k;
/* renamed from: l */
private ImageView f98526l;
/* renamed from: m */
private C37804a f98527m;
/* renamed from: n */
private RadioSettingGroup f98528n;
/* renamed from: com.ss.android.ugc.aweme.setting.ui.RadioSettingItem$a */
public interface C37804a {
/* renamed from: a */
boolean mo59376a(View view);
}
/* renamed from: e */
private boolean m120943e() {
return this.f98526l.isSelected();
}
/* renamed from: d */
private void m120942d() {
this.f98525k.setOnClickListener(new C37877ad(this));
}
/* renamed from: f */
private void m120944f() {
if (this.f98528n == null && (getParent() instanceof RadioSettingGroup)) {
this.f98528n = (RadioSettingGroup) getParent();
}
}
public void setOnSettingItemClickListener(C37804a aVar) {
this.f98527m = aVar;
}
public RadioSettingItem(Context context) {
this(context, null);
}
public void setStartText(String str) {
this.f98523i.setText(str);
}
public void setStartSubText(String str) {
if (this.f98524j != null) {
this.f98524j.setVisibility(0);
this.f98524j.setText(str);
}
}
public void setStartSubTextColor(int i) {
if (this.f98524j != null) {
this.f98524j.setTextColor(i);
}
}
public void setStartTextColor(int i) {
if (this.f98523i != null) {
this.f98523i.setTextColor(i);
}
}
/* access modifiers changed from: 0000 */
/* renamed from: a */
public final /* synthetic */ void mo95228a(View view) {
if (this.f98527m == null) {
setChecked(!m120943e());
return;
}
this.f98527m.mo59376a(this);
setChecked(!m120943e());
}
/* access modifiers changed from: protected */
public void setSelfChecked(boolean z) {
this.f98526l.setSelected(z);
if (z) {
this.f98526l.setImageDrawable(C23481i.m77092c(R.drawable.aax));
return;
}
this.f98526l.setImageDrawable(null);
}
/* renamed from: a */
private void m120940a(Context context) {
View inflate = View.inflate(context, R.layout.ajc, this);
this.f98525k = inflate.findViewById(R.id.cwn);
this.f98523i = (TextView) inflate.findViewById(R.id.dwq);
this.f98526l = (ImageView) inflate.findViewById(R.id.blc);
this.f98524j = (TextView) inflate.findViewById(R.id.dwp);
m120944f();
}
public void setChecked(boolean z) {
boolean z2;
if (!m120943e()) {
m120944f();
if (this.f98528n != null) {
for (int i = 0; i < this.f98528n.getChildCount(); i++) {
if (this.f98528n.getChildAt(i) instanceof RadioSettingItem) {
RadioSettingItem radioSettingItem = (RadioSettingItem) this.f98528n.getChildAt(i);
if (equals(radioSettingItem)) {
z2 = z;
} else if (!z) {
z2 = true;
} else {
z2 = false;
}
radioSettingItem.setSelfChecked(z2);
}
}
return;
}
setSelfChecked(z);
}
}
public RadioSettingItem(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
/* renamed from: a */
private void m120941a(Context context, AttributeSet attributeSet) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R$styleable.SettingItem);
int indexCount = obtainStyledAttributes.getIndexCount();
for (int i = 0; i < indexCount; i++) {
int index = obtainStyledAttributes.getIndex(i);
if (index == 6) {
this.f98523i.setText(obtainStyledAttributes.getString(index));
} else if (index == 10) {
this.f98523i.setTextSize((float) obtainStyledAttributes.getDimensionPixelSize(index, (int) TypedValue.applyDimension(2, 15.0f, getResources().getDisplayMetrics())));
} else if (index == 9) {
this.f98523i.setTextColor(obtainStyledAttributes.getColor(index, C0683b.m2912c(getContext(), R.color.ab0)));
}
}
obtainStyledAttributes.recycle();
}
public RadioSettingItem(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
m120940a(context);
m120941a(context, attributeSet);
m120942d();
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
6a16001e340ee76fd071082d8ff1a275b7e90940
|
5df955ee17df4b5cabc91c60f73d1ad8574ff892
|
/src/main/java/mutants/ACMS/mutants/SDL_13/AirlinesBaggageBillingService.java
|
919b5c50e72c156212b8c3c1114f59a4a95fb45a
|
[] |
no_license
|
phantomDai/dynamicpartitiontesting
|
172408a8bdde0a3c76098fde8b04c1d41abd70b3
|
a059bea43265391078ef9d070fd14f7ec63a7138
|
refs/heads/master
| 2022-06-30T23:44:34.464454
| 2019-12-13T12:30:05
| 2019-12-13T12:30:05
| 227,835,772
| 0
| 0
| null | 2022-06-17T02:46:54
| 2019-12-13T12:29:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,897
|
java
|
package mutants.ACMS.mutants.SDL_13;
// Author : ysma
public class AirlinesBaggageBillingService
{
int airClass = 0;
int area = 0;
double luggage = 0;
double benchmark = 0;
double takealong = 0;
double luggagefee = 0;
int tln = 0;
boolean isStudent = false;
double economicfee = 0;
public double feeCalculation( int airClass, int area, boolean isStudent, double luggage, double economicfee )
{
this.airClass = this.preairclass( airClass );
this.area = this.prearea( area );
switch (this.airClass) {
case 0 :
benchmark = 40;
break;
case 1 :
benchmark = 30;
break;
case 2 :
benchmark = 20;
break;
case 3 :
break;
}
if (this.area == 1) {
takealong = 7;
tln = 1;
if (isStudent) {
benchmark = 30;
}
}
if (this.area == 0) {
switch (this.airClass) {
case 0 :
tln = 2;
takealong = 5;
break;
case 1 :
tln = 1;
takealong = 5;
break;
case 2 :
tln = 1;
takealong = 5;
break;
case 3 :
tln = 1;
takealong = 5;
break;
}
}
if (benchmark > luggage) {
luggage = benchmark;
}
return luggagefee = (luggage - benchmark) * economicfee * 0.015;
}
public int preairclass( int airClass )
{
int result = 0;
result = airClass % 4;
return result;
}
public int prearea( int area )
{
int result = 0;
result = area % 2;
return result;
}
}
|
[
"daihepeng@sina.cn"
] |
daihepeng@sina.cn
|
a5b1b4f1a975b49dfcdd85d240ef552e841e08b8
|
629e42efa87f5539ff8731564a9cbf89190aad4a
|
/unrefactorInstances/eclipse.jdt.core/72/cloneInstance1.java
|
4e99a8968ddc22d3054cb3f6f28bec19de785386
|
[] |
no_license
|
soniapku/CREC
|
a68d0b6b02ed4ef2b120fd0c768045424069e726
|
21d43dd760f453b148134bd526d71f00ad7d3b5e
|
refs/heads/master
| 2020-03-23T04:28:06.058813
| 2018-08-17T13:17:08
| 2018-08-17T13:17:08
| 141,085,296
| 0
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 633
|
java
|
for (int i = 1; i < expressionsLength; i++) {
this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_array_initializer);
this.scribe.alignFragment(arrayInitializerAlignment, i);
if (this.preferences.insert_space_after_comma_in_array_initializer) {
this.scribe.space();
}
expressions[i].traverse(this, scope);
if (i == expressionsLength - 1) {
if (isComma()) {
this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_array_initializer);
}
}
}
|
[
"sonia@pku.edu.cn"
] |
sonia@pku.edu.cn
|
732a08b1d827e4f6c1a7d914c90bfb4b7d1991f4
|
318ac398c5095bed3ef2db2df8ba893c329de891
|
/src/com/menu/controller/OrderController.java
|
6712a3d873630a0fc7b4669877d4424bdb49038c
|
[] |
no_license
|
1579106394/menu
|
5d6b27b7590cfa94a9bb3a98440c9581e21d3077
|
1a7b7522232cf057a5e4be82080ba89aaff04b51
|
refs/heads/master
| 2020-04-05T17:17:30.802672
| 2018-11-11T06:32:04
| 2018-11-11T06:32:04
| 157,053,402
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,143
|
java
|
package com.menu.controller;
import com.menu.pojo.Orders;
import com.menu.pojo.Room;
import com.menu.pojo.User;
import com.menu.pojo.Vagetable;
import com.menu.service.OrderService;
import com.menu.service.RoomService;
import com.menu.service.VagetableService;
import com.menu.utils.OrderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpSession;
import java.util.List;
@Controller
public class OrderController {
@Autowired
private OrderService orderService;
@Autowired
private RoomService roomService;
@Autowired
private VagetableService vagetableService;
/**
* 获取订单列表
* @param session
* @param model
* @return
*/
@RequestMapping("order/orderList.html")
public String orderList(HttpSession session, Model model) {
User user = (User) session.getAttribute("user");
List<Orders> orderList = orderService.oredrList(user);
model.addAttribute("orderList", orderList);
return "jsp/order/list";
}
/**
* 查询菜品和房间信息,跳转到点餐页面并回显
* @param model
* @return
*/
@RequestMapping("order/toOrder.html")
public String toAdd(Model model) {
// 查询所有房间信息,发送到页面上
List<Room> roomList = roomService.roomList();
// 查询到所有菜品信息,发送到页面上
Vagetable vagetable = new Vagetable();
List<Vagetable> vageList = vagetableService.getVageList(vagetable);
model.addAttribute("roomList", roomList);
model.addAttribute("vageList", vageList);
return "jsp/order/add";
}
/**
* 点餐
* @param orderVo
* @param session
* @return
*/
@RequestMapping("order/addOrder.html")
public String addOrder(OrderVo orderVo, HttpSession session) {
User user = (User) session.getAttribute("user");
orderVo.setUser(user);
orderService.addOrder(orderVo);
return "redirect:/order/orderList.html";
}
/**
* 删除订单
* @param orderId
* @return
*/
@RequestMapping("order/deleteOrder{orderId}.html")
public String deleteOrder(@PathVariable String orderId) {
orderService.deleteOrder(orderId);
return "redirect:/order/orderList.html";
}
/**
* 买单
* @param orderId
* @return
*/
@RequestMapping("order/buy{orderId}.html")
public String buy(@PathVariable String orderId) {
orderService.buy(orderId);
return "redirect:/order/orderList.html";
}
@RequestMapping("order/orderInfo{orderId}.html")
public String orderInfo(Model model, @PathVariable String orderId) {
List<Vagetable> vageList = vagetableService.getVageListByOrder(orderId);
model.addAttribute("vageList", vageList);
return "jsp/order/info";
}
}
|
[
"1579106394@qq.com"
] |
1579106394@qq.com
|
477430ae64f989ce568f0e5958b4adcf2132039c
|
81819a17b92ad596e22ea851b20f307a35d18d4c
|
/java01-bit/src/step23/ex8/HttpServer.java
|
766feb15a7d228a240d8e3cfa66734b5f79af310
|
[] |
no_license
|
eomjinyoung/java93
|
cd05b4565249771a47f4ceb1f108acfb0d8004ce
|
7a71a2bedbc99a9f222564ebbfbe69ed423511ac
|
refs/heads/master
| 2021-01-22T17:47:48.636520
| 2017-10-23T10:32:14
| 2017-10-23T10:32:14
| 85,033,606
| 3
| 7
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,587
|
java
|
/* 웹 애플리케이션 실행하기
* 1) 클라이언트가 요구하는 자원의 경로를 알아내기
* 2) 클라이언트가 요청한 자원을 처리한다.
*/
package step23.ex8;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.ServerSocket;
import java.net.Socket;
public class HttpServer {
int port;
public HttpServer(int port) {
this.port = port;
}
public void listen() throws Exception {
ServerSocket serverSocket = new ServerSocket(this.port);
System.out.println("서버 실행 중...");
while (true) {
new HttpProcessor(serverSocket.accept()).start();
}
}
public static void main(String[] args) throws Exception {
HttpServer server = new HttpServer(8888);
server.listen();
}
class HttpProcessor extends Thread {
Socket socket;
public HttpProcessor(Socket socket) {
this.socket = socket;
}
public void run() {
try (
Socket socket = this.socket;
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
PrintStream out = new PrintStream(new BufferedOutputStream(socket.getOutputStream()));) {
String line = null;
boolean requestLine = true;
String url = null;
while (true) {
line = in.readLine();
if (line.isEmpty())
break;
if (requestLine) {
requestLine = false;
url = extractUrl(line);
}
}
if (url.equals("/hello")) {
hello(out);
} else if (url.equals("/ok")) {
ok(out);
} else {
error(out);
}
} catch (Exception e) {
System.out.println(e.getMessage());
}
} // run()
private String extractUrl(String requestLine) {
return requestLine.substring(requestLine.indexOf(" ") + 1, requestLine.lastIndexOf(" "));
}
private void hello(PrintStream out) {
out.println("HTTP/1.1 200 OK");
out.println("Server: BIT Server");
out.println();
out.println("<html>");
out.println("<head>");
out.println(" <meta charset='UTF-8'>");
out.println(" <title>hello</title>");
out.println("</head>");
out.println("<body>");
out.println(" <h1>안녕하세요!</h1>");
out.println("</body>");
out.println("</html>");
out.flush();
}
private void ok(PrintStream out) {
out.println("HTTP/1.1 200 OK");
out.println("Server: BIT Server");
out.println();
out.println("<html>");
out.println("<head>");
out.println(" <meta charset='UTF-8'>");
out.println(" <title>hello</title>");
out.println("</head>");
out.println("<body>");
out.println(" <h1>/ok를 요청하셨네요. ㅋㅋ</h1>");
out.println("</body>");
out.println("</html>");
out.flush();
}
private void error(PrintStream out) {
out.println("HTTP/1.1 200 OK");
out.println("Server: BIT Server");
out.println();
out.println("<html>");
out.println("<head>");
out.println(" <meta charset='UTF-8'>");
out.println(" <title>hello</title>");
out.println("</head>");
out.println("<body>");
out.println(" <h1>요청한 자원을 찾을 수 없습니다.</h1>");
out.println("</body>");
out.println("</html>");
out.flush();
}
}
}
|
[
"jinyoung.eom@gmail.com"
] |
jinyoung.eom@gmail.com
|
6222dc8ba0985c94f759eff805757dc3760bc9e6
|
77ab4c46295084f75b2b741207ee26c5a7d9f20f
|
/src/main/java/com/vonchange/jsqlparser/util/cnfexpression/MultiAndExpression.java
|
6d1100cef9f5617b8f35514570b4ac072028c747
|
[] |
no_license
|
VonChange/jsqlparser
|
63ad5e246b3d4b149c945c59f1ff1da515ddd5e2
|
e031e32b802ee9e5246435f85b436e5be78c7ede
|
refs/heads/master
| 2022-10-13T06:23:03.935147
| 2020-05-24T03:01:51
| 2020-05-24T03:01:51
| 270,620,571
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 639
|
java
|
/*-
* #%L
* JSQLParser library
* %%
* Copyright (C) 2004 - 2019 JSQLParser
* %%
* Dual licensed under GNU LGPL 2.1 or Apache License 2.0
* #L%
*/
package com.vonchange.jsqlparser.util.cnfexpression;
import java.util.List;
import com.vonchange.jsqlparser.expression.Expression;
/**
* This helper class is mainly used for handling the CNF conversion.
*
* @author messfish
*
*/
public final class MultiAndExpression extends MultipleExpression {
public MultiAndExpression(List<Expression> childlist) {
super(childlist);
}
@Override
public String getStringExpression() {
return "AND";
}
}
|
[
"80767699@yonghui.cn"
] |
80767699@yonghui.cn
|
915473837261be5e7230486ca729859251e6acb6
|
a461a351584d90e8d5e0714c77d04146520acb92
|
/locations-solution/src/test/java/locations/LocationDynamicTest.java
|
f2af85049b61d98ffde5af133ae9df2d9fdfe238
|
[] |
no_license
|
kondasg/senior-solutions
|
f2881ff07809541fd5df5fe005afe31e880f6e6b
|
6e28d04e8195a29427c8c3064a421688d62ce08a
|
refs/heads/master
| 2023-07-09T08:51:46.291709
| 2021-08-19T22:23:16
| 2021-08-19T22:23:16
| 372,624,126
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,017
|
java
|
package locations;
import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.TestFactory;
import java.util.stream.Stream;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.DynamicTest.dynamicTest;
public class LocationDynamicTest {
LocationParser locationParser = new LocationParser();
@TestFactory
Stream<DynamicTest> testIsOnEquator() {
return Stream.of(new Object[][]{
{new Location("p1", 47.497912, 19.040235), false},
{new Location("p2", 47.497912, 19.040235), false},
{new Location("p3", 0, 19.040235), true},
{new Location("p4", 47.497912, 19.040235), false},
{new Location("p5", 0, 21), true},
{new Location("p6", 47.497912, 19.040235), false}
})
.map(item -> dynamicTest("Teszt " + item[1],
() -> assertEquals(item[1], locationParser.isOnEquator((Location) item[0]))));
}
}
|
[
"gabor@kondas.hu"
] |
gabor@kondas.hu
|
4b307be314ad3027040ac2bf170df17d5f8c317f
|
2d1f125578ec412defe1a279c5e487b885e685b5
|
/src/main/java/org/xmlsoap/schemas/soap/envelope/Detail.java
|
4414ecb3372c2c2d6412293f17843486b77d7f8a
|
[] |
no_license
|
fengxiaobu/liveclient
|
3b43ee7b474026c1018a22a6a1be8c89c1c0eb42
|
a28a0129d244cd49d72b4b781157ac9f964091fa
|
refs/heads/master
| 2020-04-11T20:07:15.175695
| 2018-12-17T01:54:45
| 2018-12-17T01:54:45
| 162,060,421
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,735
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.11.02 at 07:05:14 AM EET
//
package org.xmlsoap.schemas.soap.envelope;
import org.w3c.dom.Element;
import javax.xml.bind.annotation.*;
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>Java class for detail complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="detail">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <anyAttribute processContents='lax'/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "detail", propOrder = {
"any"
})
public class Detail {
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
* <p>
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
* @return always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
|
[
"luopanfeng@benefitech.cn"
] |
luopanfeng@benefitech.cn
|
7fba52fb585609e1700037a66a68f5046150d1a7
|
eae934c843ab070b9b2c9c57e78c065c3067e746
|
/src/main/java/name/studiarbeit/hbci/impl/Callback.java
|
8b880855b9a609799e25c3afe3f86e70e66c224a
|
[] |
no_license
|
maxemmert/Studiarbeit_Backend
|
597c3f9d8dafdbfbe70607f03905ff9f1947460f
|
f9d285aa6acc468179f8e431aedaee5bd57dcff3
|
refs/heads/master
| 2021-01-10T22:11:21.697831
| 2015-03-18T10:31:20
| 2015-03-18T10:31:20
| 32,451,297
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,662
|
java
|
package name.studiarbeit.hbci.impl;
import org.kapott.hbci.callback.HBCICallbackConsole;
import org.kapott.hbci.manager.HBCIUtils;
import org.kapott.hbci.passport.HBCIPassport;
public class Callback extends HBCICallbackConsole {
private HbciSession session;
private static String PASSPHRASE = "";
public Callback(HbciSession session) {
this.session = session;
}
@Override
public synchronized void status(HBCIPassport passport, int statusTag,
Object[] o) {
// Intentionally empty
}
@Override
public void callback(HBCIPassport passport, int reason, String msg,
int datatype, StringBuffer retData) {
HBCIUtils.log("[LOG] " + msg + " / Reason: " + reason + " / datatype: "
+ datatype, HBCIUtils.LOG_DEBUG);
switch (reason) {
case NEED_BLZ:
retData.append(this.session.acct.getBankCode());
break;
case NEED_CUSTOMERID:
if (null != this.session.acct.getCredentials().getCustomerId()) {
retData.append(this.session.acct.getCredentials()
.getCustomerId());
}
break;
case NEED_USERID:
if (null != this.session.acct.getCredentials().getUserId()) {
retData.append(this.session.acct.getCredentials().getUserId());
}
break;
case NEED_PT_PIN:
retData.append(this.session.acct.getCredentials().getPin());
break;
case NEED_PASSPHRASE_SAVE:
case NEED_PASSPHRASE_LOAD:
retData.append(PASSPHRASE);
break;
case NEED_PT_SECMECH:
retData.append("mobileTAN");
break;
case NEED_COUNTRY:
case NEED_HOST:
case NEED_CONNECTION:
case CLOSE_CONNECTION:
default:
// Intentionally empty!
}
HBCIUtils.log("Returning " + retData.toString(), HBCIUtils.LOG_DEBUG);
}
}
|
[
"max_emmert@web.de"
] |
max_emmert@web.de
|
3c7624ffe8690969d95656557af0a9ccd544e99d
|
31d9110fa07ede523bb32ba1933cf364a09e5085
|
/donglan/src/main/java/com/cn/danceland/myapplication/activity/base/BaseActivity.java
|
8e405a923029f023099f2c55584bfab244b1b91b
|
[] |
no_license
|
zhizhulp/DongLan
|
eaef8bd5b1d83313be555bbd44062354f2a360ae
|
3e55a4d9113642f9fd0bb3c4f179c42396091f6d
|
refs/heads/master
| 2020-07-13T17:12:56.871702
| 2019-09-04T06:49:08
| 2019-09-04T06:49:08
| 205,121,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 990
|
java
|
package com.cn.danceland.myapplication.activity.base;
import android.app.Activity;
import android.os.Bundle;
import com.cn.danceland.myapplication.app.AppManager2;
import com.umeng.analytics.MobclickAgent;
public class BaseActivity extends Activity {
// BaseActivity中统一调用MobclickAgent 类的 onResume/onPause 接口
// 子类中无需再调用
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onResume(this); // 基础指标统计,不能遗漏
}
@Override
protected void onPause() {
super.onPause();
MobclickAgent.onPause(this); // 基础指标统计,不能遗漏
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppManager2.getAppManager().addActivity(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
AppManager2.getAppManager().finishActivity(this);
}
}
|
[
"liping@donglan.com"
] |
liping@donglan.com
|
9025f9b65a5ed19aaf0f797b0b520c4f84168866
|
9781e3f2fd9a5c99552e7c65d4931b4b38e2cda0
|
/WalletInventory/src/com/gonevertical/client/widgets/walletedititem/WalletEditItemWidget.java
|
725dd89aa3b3984f10a1cd6dc46b601dd3833332
|
[] |
no_license
|
branflake2267/Wallet-Inventory
|
de5e2dda7424679a939d1756c77482154adf01f7
|
4cdbabfcf51c96f5bc252ba128d598c6dda4866f
|
refs/heads/master
| 2016-09-06T06:20:48.146317
| 2012-05-13T16:23:28
| 2012-05-13T16:23:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,400
|
java
|
package com.gonevertical.client.widgets.walletedititem;
import org.gonevertical.core.client.dialog.bool.BooleanDialog;
import org.gonevertical.core.client.dialog.bool.BooleanEvent;
import org.gonevertical.core.client.dialog.bool.BooleanEvent.Selected;
import org.gonevertical.core.client.dialog.bool.BooleanEventHandler;
import org.gonevertical.core.client.input.WiseTextBox;
import org.gonevertical.core.client.loading.LoadingWidget;
import com.gonevertical.client.app.ClientFactory;
import com.gonevertical.client.app.requestfactory.WalletDataRequest;
import com.gonevertical.client.app.requestfactory.dto.WalletItemDataProxy;
import com.gonevertical.client.views.walletedit.WalletEditView.Presenter;
import com.gonevertical.client.widgets.walletlistitem.WalletListItemWidget.State;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.MouseOutEvent;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.event.dom.client.TouchStartEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SimpleHtmlSanitizer;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FocusPanel;
import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.Widget;
import com.google.web.bindery.requestfactory.shared.Receiver;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.ServerFailure;
public class WalletEditItemWidget extends Composite {
public static enum State {
VIEW, EDIT;
}
private State stateIs;
private Presenter presenter;
private ClientFactory clientFactory;
private static WalletEditItemWidgetUiBinder uiBinder = GWT.create(WalletEditItemWidgetUiBinder.class);
@UiField WiseTextBox tbName;
@UiField PushButton bDelete;
@UiField FocusPanel pFocus;
interface WalletEditItemWidgetUiBinder extends UiBinder<Widget, WalletEditItemWidget> {
}
private WalletItemDataProxy itemData;
private BooleanDialog wconfirm;
private int index;
private LoadingWidget wLoading;
private boolean timerRunning;
public WalletEditItemWidget() {
initWidget(uiBinder.createAndBindUi(this));
tbName.setEditHover(false);
setTitle("Enter a name for an item that is in your wallet and the contact number or email to call if its stolen. Do not enter account information.");
bDelete.setTitle("Delete this item from your wallet forever.");
}
public void setPresenter(Presenter presenter) {
this.presenter = presenter;
}
public void setClientFactory(ClientFactory clientFactory) {
this.clientFactory = clientFactory;
}
public void setLoading(LoadingWidget wLoading) {
this.wLoading = wLoading;
}
public void setData(int i, WalletItemDataProxy itemData) {
this.index = i;
// TODO set style depending on i
this.itemData = itemData;
}
public WalletItemDataProxy getData(WalletDataRequest request) {
if (itemData == null) {
itemData = request.create(WalletItemDataProxy.class);
} else {
itemData = request.edit(itemData);
}
itemData.setName(getName());
return itemData;
}
private String getName() {
String s = tbName.getText().trim();
if (s.length() == 0) {
s = null;
}
return s;
}
public void draw() {
// default
setState(State.VIEW);
drawName();
}
private void drawName() {
if (itemData == null ||
itemData.getName() == null ||
itemData.getName().trim().length() == 0) {
String s = index + ". Enter your inventory Item";
tbName.setDefaultText(s);
return;
}
String s = itemData.getName();
SafeHtml sh = SimpleHtmlSanitizer.sanitizeHtml(s);
tbName.setText(sh.asString());
}
private void delete() {
if (wconfirm == null) {
wconfirm = new BooleanDialog("Are you sure you want to delete this?");
wconfirm.addSelectionHandler(new BooleanEventHandler() {
public void onBooleanEvent(BooleanEvent event) {
if (event.getBooleanEvent() == Selected.TRUE) {
deleteIt();
} else if (event.getBooleanEvent() == Selected.FALSE) {
// do nothing
}
}
});
}
wconfirm.center();
}
private void deleteIt() {
if (itemData == null) {
removeFromParent();
fireChange();
return;
}
wLoading.showLoading(true);
Request<Boolean> req = clientFactory.getRequestFactory().getWalletItemDataRequest().deleteWalletItemData(itemData.getId());
req.fire(new Receiver<Boolean>() {
public void onSuccess(Boolean data) {
wLoading.showLoading(false);
if (data != null && data.booleanValue() == true) {
removeFromParent();
fireChange();
} else {
wLoading.showError("Oops, I couldn't delete that.");
}
}
public void onFailure(ServerFailure error) {
wLoading.showError();
super.onFailure(error);
}
});
}
/**
* on edit, lets wait a moment before moving back to view
*
* @param state
*/
private void setState(State state) {
stateIs = state;
if (timerRunning == true) {
return;
}
if (state == State.VIEW) {
setStateView();
} else {
setStateEdit();
timerRunning = true;
Timer t = new Timer() {
public void run() {
timerRunning = false;
if (stateIs == State.EDIT) {
setState(State.EDIT);
} else {
setStateView();
}
}
};
t.schedule(3000);
}
}
private void setStateView() {
tbName.setEdit(false);
bDelete.setVisible(false);
}
private void setStateEdit() {
tbName.setEdit(true);
bDelete.setVisible(true);
// b/c delete hides, it shrinks, set it
int width = pFocus.getOffsetWidth();
pFocus.setWidth(width + "px");
}
private void fireChange() {
NativeEvent nativeEvent = Document.get().createChangeEvent();
ChangeEvent.fireNativeEvent(nativeEvent, this);
}
public HandlerRegistration addChangeHandler(ChangeHandler handler) {
return addDomHandler(handler, ChangeEvent.getType());
}
@UiHandler("tbName")
public void onTbNameTouchStart(TouchStartEvent event) {
if (stateIs == State.VIEW) {
setState(State.EDIT);
} else if (stateIs == State.EDIT) {
setState(State.VIEW);
}
}
@UiHandler("tbName")
void onTbNameChange(ChangeEvent event) {
fireChange();
}
@UiHandler("bDelete")
public void onBDeleteClick(ClickEvent event) {
delete();
}
@UiHandler("pFocus")
void onPFocusMouseOver(MouseOverEvent event) {
setState(State.EDIT);
}
@UiHandler("pFocus")
void onPFocusMouseOut(MouseOutEvent event) {
setState(State.VIEW);
fireChange();
}
}
|
[
"branflake2267@gmail.com"
] |
branflake2267@gmail.com
|
65d5569b541ceec888367bceefc7a7dae9c1b5d4
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/21/21_a227fe1e2ec7161a8f5d438f5d938dfab1476262/ImageGridPanel/21_a227fe1e2ec7161a8f5d438f5d938dfab1476262_ImageGridPanel_t.java
|
f7668273b452d1df3ca335a2b6010a2cdad9f17b
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,362
|
java
|
package gui;
import images.ImageTag;
import images.TaggableImage;
import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class ImageGridPanel extends JPanel implements MouseListener{
private static final long serialVersionUID = 1L;
private static final Dimension gridPanelSize = new Dimension(100, 100);
private List<TaggableImage> images;
private List<ImageThumbPanel> imageThumbPanels;
private TaggableImage selectedImage;
private Canvas canvas;
private JPanel gridbox;
private JLabel importedLabel;
private ApplicationWindow window;
//private TaggableImage selectedImage;
public ImageGridPanel(List<TaggableImage> imageList, ApplicationWindow window) {
this.window = window;
if(imageList == null || imageList.size()==0)
selectedImage=null;
else
selectedImage = imageList.get(0);
imageThumbPanels = new ArrayList<ImageThumbPanel>();
images = imageList;
setLayout(new BorderLayout());
initialise();
}
public void setCanvas(Canvas c){
this.canvas = c;
}
public void setImageList(List<TaggableImage> newImageList) {
images = newImageList;
}
public void initialise() {
//trash the existing contents of the image panel if there
//are already images (on a reload)
removeAll();
if(images==null || images.isEmpty()){
//paint the placeholder image to fill box
//called via paintComponent jm 190812
return;
}
importedLabel = new JLabel("Imported Images: "+images.size()+" images.");
add(importedLabel,BorderLayout.NORTH);
gridbox = new JPanel();
gridbox.setLayout(new GridLayout(0, 2));
//Debug:
System.out.println("initialise imageGrid");
ImageThumbPanel itp;
if(images != null){
imageThumbPanels.clear();
for(TaggableImage timg: images){
itp = new ImageThumbPanel(timg, gridPanelSize);
imageThumbPanels.add(itp);
itp.addMouseListener(this);
itp.addMouseListener(window);
gridbox.add(itp);
}
if(images.size()<10){
for(int i = images.size();i<10;i++){
itp = new ImageThumbPanel(null, gridPanelSize);
imageThumbPanels.add(itp);
gridbox.add(itp);
}
}
}
add(gridbox, BorderLayout.CENTER);
revalidate();
repaint();
}
//jm 190912
public void paintComponent(Graphics g) {
super.paintComponent(g);
if (images == null || images.isEmpty()) {
//paint the placeholder image
Graphics2D g2d = (Graphics2D)g;
BufferedImage placeholder = ApplicationWindow.IMPORT_PLACEHOLDER;
Image scaledPlaceholder = placeholder.getScaledInstance(this.getWidth(), placeholder.getHeight(null), Image.SCALE_SMOOTH);
int x = (this.getWidth() - scaledPlaceholder.getWidth(null)) / 2;
int y = (this.getHeight() - scaledPlaceholder.getHeight(null)) / 2;
g2d.setColor(new Color(153, 157, 158)); //placeholder background
g2d.fillRect(0, 0, this.getWidth(), this.getHeight());
g2d.drawImage(scaledPlaceholder, x, y, null);
}
}
public void browse(String direction) {
if(selectedImage == null) return;
for(int i=0; i<imageThumbPanels.size(); i++) {
ImageThumbPanel current = imageThumbPanels.get(i);
if(current.getImage().equals(selectedImage)) {
if(direction.equals("previous") && i!=0) {
ImageThumbPanel previous = imageThumbPanels.get(i-1);
current.setSelected(false);
current.imageLabel().setBorder(null);
previous.setSelected(true);
setSelectedImage(previous.getImage());
previous.imageLabel().setBorder(BorderFactory.createLineBorder(Color.red, 3));
} else if(direction.equals("next") && i!=images.size()-1) {
ImageThumbPanel next = imageThumbPanels.get(i+1);
current.setSelected(false);
current.imageLabel().setBorder(null);
next.setSelected(true);
setSelectedImage(next.getImage());
next.imageLabel().setBorder(BorderFactory.createLineBorder(Color.red, 3));
}
canvas.repaint();
break;
}
}
}
public void update() {
canvas.repaint();
}
public List<ImageThumbPanel> getPanels() {
return this.imageThumbPanels;
}
public void mouseClicked(MouseEvent e) {
for(ImageThumbPanel i : imageThumbPanels){
i.setSelected(false);
i.imageLabel().setBorder(null);
}
ImageThumbPanel clickedThumb = (ImageThumbPanel)e.getSource();
clickedThumb.setSelected(true);
clickedThumb.imageLabel().setBorder(BorderFactory.createLineBorder(Color.red, 3));
setSelectedImage(clickedThumb.getImage());
window.toggleFlagButton(selectedImage.getTag()==ImageTag.UNTAGGED);
canvas.repaint();
}
private void setSelectedImage(TaggableImage image) {selectedImage = image;}
public TaggableImage getSelectedImage(){return selectedImage;}
public void mousePressed(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {}
public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7736fab38b498612bf748fcd73ab87f3fdac0aeb
|
f515f98ca40ce65a60e324b2860949d9fff668dd
|
/Source Code/new_source/Goodel_Book/abook/ajava/utilToy/date/DateDemo01.java
|
4781be9f3a491db667750e58c167c127f29e648c
|
[] |
no_license
|
Deyreudolf00/OOP
|
35e2228e49692088d72e8b974c24b4e714d9c970
|
62842082c8a344f072bbfd84e3484a6df3f0bb25
|
refs/heads/master
| 2016-08-13T00:44:44.326739
| 2016-02-27T04:11:21
| 2016-02-27T04:11:21
| 50,080,804
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 174
|
java
|
package abook.ajava.utilToy.date;
import java.util.Date;
public class DateDemo01 {
public static void demo() {
System.out.println("new Date() = " + (new Date()));
}
}
|
[
"renggarenji@gmail.com"
] |
renggarenji@gmail.com
|
616caf7548d6169cdfe815ef89962f56d4f22710
|
498a47c9206af97547bf5222a19e5387a4e8f576
|
/app/src/main/java/com/triton/myvacala/requestpojo/VehicleNameRequest.java
|
2e875a909220decc844ebc3224b40befc542754d
|
[] |
no_license
|
worksintriton/myvacala_live_santhosh
|
811fce4665f6f8849714775880f335e85a4ebe02
|
03ca1153376e6daed146b679f68c3de14edba805
|
refs/heads/main
| 2023-08-19T04:46:31.713830
| 2021-10-04T13:17:53
| 2021-10-04T13:17:53
| 413,299,756
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 386
|
java
|
package com.triton.myvacala.requestpojo;
public class VehicleNameRequest {
/**
* Vehicle_Brand_id : 5f0301e8e99a8a478f3f572a
*/
private String Vehicle_Brand_id;
public String getVehicle_Brand_id() {
return Vehicle_Brand_id;
}
public void setVehicle_Brand_id(String Vehicle_Brand_id) {
this.Vehicle_Brand_id = Vehicle_Brand_id;
}
}
|
[
"worksintriton@gmail.com"
] |
worksintriton@gmail.com
|
940887079ba4fe4042f1a31dc67e3292b64f391f
|
a66a4d91639836e97637790b28b0632ba8d0a4f9
|
/src/generators/framework/components/FontChooserComboBox.java
|
6d80811b23737c2cf805a3865320da6346b1ac5b
|
[] |
no_license
|
roessling/animal-av
|
7d0ba53dda899b052a6ed19992fbdfbbc62cf1c9
|
043110cadf91757b984747750aa61924a869819f
|
refs/heads/master
| 2021-07-13T05:31:42.223775
| 2020-02-26T14:47:31
| 2020-02-26T14:47:31
| 206,062,707
| 0
| 2
| null | 2020-10-13T15:46:14
| 2019-09-03T11:37:11
|
Java
|
UTF-8
|
Java
| false
| false
| 7,930
|
java
|
/*
* Created on 12.11.2004 by T. Ackermann
*/
package generators.framework.components;
import java.awt.Component;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;
/**
* ColorChooserComboBox is a ComboxBox that displays a list of possible styles
* for Animal Fonts. These are Serif, SansSerif and Monospaced.
*
* @author T. Ackermann
*/
public class FontChooserComboBox
extends JComboBox
implements ActionListener {
/**
* a generated serial Version UID because FontChooserComboBox is
* serializable.
*/
private static final long serialVersionUID = 1252859137529793065L;
/** stores the possible Font Styles. */
private static final String[] strFontStyles =
{"Serif", "SansSerif", "Monospaced"};
/** stores the renderer that allows us to draw a nice FontChooserComboBox. */
private FontChooserComboBoxRenderer renderer =
new FontChooserComboBoxRenderer();
/** stores the currently selected Font as String. */
private String strSelected = "Serif";
/** stores the values for the FontChooserComboBox-Items */
private Object[][] values = new Object[strFontStyles.length][2];
/** helps avoiding calling actionPerformed too often */
private boolean bChangeByComponent = false;
/**
* Constructor creates a new FontChooserComboBox-Object.
*/
public FontChooserComboBox() {
super();
init();
}
/**
* Constructor creates a new FontChooserComboBox-Object and sets the
* selected Font.
*
* @param strNew The default Font. Can be "Serif", "SansSerif" and
* "Monospaced".
*/
public FontChooserComboBox(String strNew) {
super();
init();
setFontSelected(strNew);
}
/**
* Constructor creates a new FontChooserComboBox-Object and sets the
* selected Font.
*
* @param fontNew The default Font.
*/
public FontChooserComboBox(Font fontNew) {
super();
init();
setFontSelected(fontNew.getFamily());
}
/**
* Sets the Font that should be selected.
*
* @param strNew The Font that should be selected. Can be "Serif",
* "SansSerif" and "Monospaced".
*/
public void setFontSelected(String strNew) {
if (strNew == null) {
return;
}
String newString = strNew.trim().toLowerCase();
// strNew = strNew.trim().toLowerCase();
int iNewIndex = -1;
// look for the Font-String
for (int i = 0; i < strFontStyles.length; i++) {
if (newString.equals(strFontStyles[i].toLowerCase())) {
this.strSelected = strFontStyles[i];
iNewIndex = i;
}
}
// return if nothing has been found
if (iNewIndex == -1) {
return;
}
// select the element
this.bChangeByComponent = true;
setSelectedIndex(iNewIndex);
this.bChangeByComponent = false;
// repaint the ComboBox
this.repaint();
}
/**
* Returns the selected Font as a String.
*
* @return Returns the selected Font as a String.
*/
public String getFontSelectedAsString() {
return this.strSelected;
}
/**
* Returns the selected Font as a Font-Object.
*
* @return The selected Font as a Font-Object.
*/
public Font getFontSelected() {
return new Font(this.strSelected, Font.PLAIN, 12);
}
/**
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
public void actionPerformed(ActionEvent e) {
if (e == null) {
return;
}
// do nothing if the Component made the change
if (this.bChangeByComponent) {
return;
}
int index = this.getSelectedIndex();
if ((index < 0) || (index >= strFontStyles.length)) {
return;
}
// store the selected Font
this.strSelected = strFontStyles[index];
// change the Font for the ComboBox
this.setFont(new Font(this.strSelected, Font.PLAIN, 14));
}
/**
* init initalizes the FontChooserComboBox. It fills the items, takes care
* about the drawing, sets the listeners and sets some values.
*/
private void init() {
for (int i = 0; i < strFontStyles.length; i++) {
/* we do this because later on, we can make one of these multilingual...
* the [0] is the Font-Name and should not be changed, but
* the [1] is what is displayed
*/
this.values[i][0] = strFontStyles[i];
this.values[i][1] = strFontStyles[i];
this.addItem(this.values[i]);
}
// we do the drawing...
this.setRenderer(this.renderer);
//add Action Listener
this.addActionListener(this);
// set default values
this.strSelected = strFontStyles[0];
this.setFont(new Font(this.strSelected, Font.PLAIN, 14));
}
/*
* ****************************************************
* BELOW IS A HELPER CLASSES
* ****************************************************
*/
/**
* FontChooserComboBoxRenderer draws the entries in the
* FontChooserComboBox. Therefore it uses the values passed to this
* function.
*
* @author T. Ackermann
*/
private static class FontChooserComboBoxRenderer
extends JLabel
implements ListCellRenderer {
/**
* a generated serial Version UID because FontChooserComboBoxRenderer
* is serializable.
*/
private static final long serialVersionUID = 3266835247180289721L;
/**
* Constructor creates a new FontChooserComboBoxRenderer-Object.
*/
public FontChooserComboBoxRenderer() {
setOpaque(true);
}
/**
* @see javax.swing.ListCellRenderer#getListCellRendererComponent(javax.swing.JList,
* java.lang.Object, int, boolean, boolean) This method finds the
* image and text corresponding to the selected value and returns
* the label, set up to display the text and image.
*/
public Component getListCellRendererComponent(
JList list, Object value, int index, boolean isSelected,
boolean cellHasFocus) {
if ((list == null) || (value == null)) {
this.setText("?");
return this;
}
if ((isSelected || cellHasFocus) && (index != -1)) {
setBackground(list.getSelectionBackground());
setForeground(list.getSelectionForeground());
} else {
setBackground(list.getBackground());
setForeground(list.getForeground());
}
if (!(value instanceof Object[])) {
return this;
}
Object[] itemValues = (Object[]) value;
if (
!(
(itemValues[0] instanceof String)
&& (itemValues[1] instanceof String)
)) {
return this;
}
String strDisplay = (String) itemValues[0];
this.setFont(new Font(strDisplay, Font.PLAIN, 20));
this.setText((String) itemValues[1]);
return this;
}
}
}
|
[
"guido@tk.informatik.tu-darmstadt.de"
] |
guido@tk.informatik.tu-darmstadt.de
|
0df6aa265f55bb1a70826a5dfbf92d615cd5d9c8
|
75f088469fbc88f46276d113458f9372474a50d9
|
/msyt-parent/msyt-parent-interface/src/main/java/cc/msonion/carambola/parent/interfaces/lang/serialize/MsOnionSerializeAdapter.java
|
42744b962a5331a39d7a6e1281b8914973503390
|
[] |
no_license
|
un-knower/MsOnion-yt
|
4d1055aeb314a95c856e5fd2749abb6f3a504c3d
|
0264e966ea124bfac2e58da91190f76aa998e2c1
|
refs/heads/master
| 2020-03-17T21:20:54.023071
| 2017-08-12T07:17:16
| 2017-08-12T07:17:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,152
|
java
|
/**
* 广州市两棵树网络科技有限公司版权所有
* DT Group Technology & commerce Co., LtdAll rights reserved.
* <p>
* 广州市两棵树网络科技有限公司,创立于2009年。旗下运营品牌洋葱小姐。
* 洋葱小姐(Ms.Onion) 下属三大业务模块 [洋葱海外仓] , [洋葱DSP] , [洋葱海外聚合供应链]
* [洋葱海外仓](DFS)系中国海关批准的跨境电商自营平台(Cross-border ecommerce platform),
* 合法持有海外直邮保税模式的跨境电商营运资格。是渠道拓展,平台营运,渠道营运管理,及客户服务等前端业务模块。
* [洋葱DSP](DSP)系拥有1.3亿消费者大数据分析模型。 是基于客户的消费行为,消费轨迹,及多维度云算法(MDPP)
* 沉淀而成的精准消费者模型。洋葱DSP能同时为超过36种各行业店铺 及200万个销售端口
* 进行多店铺高精度配货,并能预判消费者购物需求进行精准推送。同时为洋葱供应链提供更前瞻的商品采买需求模型 。
* [洋葱海外聚合供应链](Super Supply Chain)由中国最大的进口贸易集团共同
* 合资成立,拥有20余年的海外供应链营运经验。并已入股多家海外贸易企业,与欧美澳等9家顶级全球供应商达成战略合作伙伴关系。
* 目前拥有835个国际品牌直接采买权,12万个单品的商品供应库。并已建设6大海外直邮仓库,为国内客户提供海外商品采买集货供应,
* 跨境 物流,保税清关三合一的一体化模型。目前是中国唯一多模式聚合的海外商品供应链 。
* <p>
* 洋葱商城:http://m.msyc.cc/wx/indexView?tmn=1
* <p>
* 洋桃商城:http://www.yunyangtao.com
*/
package cc.msonion.carambola.parent.interfaces.lang.serialize;
import cc.msonion.carambola.parent.common.exception.MsOnionException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* 序列化适配器
*
* @Title: MsOnionSerializeAdapter.java
* @Package: cc.msonion.carambola.parent.interfaces.lang.serialize
* @Description: 序列化适配器
* @Company: 广州市两棵树网络科技有限公司
* @Author: HeroCao hero-cao@msyc.cc
* @Date: 2017年4月30日 下午1:48:16
* @Version: V2.0.0
* @Modify-by: HeroCao hero-cao@msyc.cc
* @Modify-date: 2017年4月30日 下午1:48:16
* @Modify-version: V2.0.0
* @Modify-description: 新增:创建
*/
/**
* 序列化适配器
*
* @ClassName: MsOnionSerializeAdapter
* @Description: 序列化适配器
* @Company: 广州市两棵树网络科技有限公司
* @Author: HeroCao hero-cao@msyc.cc
* @Date: 2017年4月30日 下午1:48:16
*/
public interface MsOnionSerializeAdapter {
/**
* 序列化
*
* @param out OutputStream实例对象
* @param object Object
* @throws MsOnionException 异常
*/
void serialize(OutputStream out, Object object) throws MsOnionException;
/**
* 反序列化
*
* @param in InputStream实例对象
* @return
* @throws MsOnionException 异常
*/
Object deserialize(InputStream in) throws MsOnionException;
}
|
[
"625816079@qq.com"
] |
625816079@qq.com
|
98f5f92223deaa3ffc5e15c416e98ccb35ffdc65
|
bcd3e4f512e4c2d380f14c74398becc6d1c64831
|
/cloud-stub/src/main/java/com/atlassian/jira/rest/client/model/PageBeanWebhook.java
|
3f1822223acdfa3a06cdfcdb9315f22365d5562b
|
[] |
no_license
|
nemaneeraj/jira-cloud-client
|
49d80a0b83ad8c498ad0956749b8d151fda223e8
|
2b31386611598f696dad3fe581527fe8c1757111
|
refs/heads/master
| 2023-07-16T22:58:08.824520
| 2021-09-05T18:41:24
| 2021-09-05T18:41:24
| 403,384,914
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,620
|
java
|
/*
* The Jira Cloud platform REST API
* Jira Cloud platform REST API documentation
*
* OpenAPI spec version: 1001.0.0-SNAPSHOT
* Contact: ecosystem@atlassian.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.atlassian.jira.rest.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.atlassian.jira.rest.client.model.Webhook;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
/**
* A page of items.
*/
@Schema(description = "A page of items.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-03-17T19:36:29.866+05:30[Asia/Kolkata]")
public class PageBeanWebhook {
@JsonProperty("self")
private String self = null;
@JsonProperty("nextPage")
private String nextPage = null;
@JsonProperty("maxResults")
private Integer maxResults = null;
@JsonProperty("startAt")
private Long startAt = null;
@JsonProperty("total")
private Long total = null;
@JsonProperty("isLast")
private Boolean isLast = null;
@JsonProperty("values")
private List<Webhook> values = null;
/**
* The URL of the page.
* @return self
**/
@Schema(description = "The URL of the page.")
public String getSelf() {
return self;
}
/**
* If there is another page of results, the URL of the next page.
* @return nextPage
**/
@Schema(description = "If there is another page of results, the URL of the next page.")
public String getNextPage() {
return nextPage;
}
/**
* The maximum number of items that could be returned.
* @return maxResults
**/
@Schema(description = "The maximum number of items that could be returned.")
public Integer getMaxResults() {
return maxResults;
}
/**
* The index of the first item returned.
* @return startAt
**/
@Schema(description = "The index of the first item returned.")
public Long getStartAt() {
return startAt;
}
/**
* The number of items returned.
* @return total
**/
@Schema(description = "The number of items returned.")
public Long getTotal() {
return total;
}
/**
* Whether this is the last page.
* @return isLast
**/
@Schema(description = "Whether this is the last page.")
public Boolean isIsLast() {
return isLast;
}
/**
* The list of items.
* @return values
**/
@Schema(description = "The list of items.")
public List<Webhook> getValues() {
return values;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PageBeanWebhook pageBeanWebhook = (PageBeanWebhook) o;
return Objects.equals(this.self, pageBeanWebhook.self) &&
Objects.equals(this.nextPage, pageBeanWebhook.nextPage) &&
Objects.equals(this.maxResults, pageBeanWebhook.maxResults) &&
Objects.equals(this.startAt, pageBeanWebhook.startAt) &&
Objects.equals(this.total, pageBeanWebhook.total) &&
Objects.equals(this.isLast, pageBeanWebhook.isLast) &&
Objects.equals(this.values, pageBeanWebhook.values);
}
@Override
public int hashCode() {
return Objects.hash(self, nextPage, maxResults, startAt, total, isLast, values);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PageBeanWebhook {\n");
sb.append(" self: ").append(toIndentedString(self)).append("\n");
sb.append(" nextPage: ").append(toIndentedString(nextPage)).append("\n");
sb.append(" maxResults: ").append(toIndentedString(maxResults)).append("\n");
sb.append(" startAt: ").append(toIndentedString(startAt)).append("\n");
sb.append(" total: ").append(toIndentedString(total)).append("\n");
sb.append(" isLast: ").append(toIndentedString(isLast)).append("\n");
sb.append(" values: ").append(toIndentedString(values)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"neeraj.nema@unthinkable.co"
] |
neeraj.nema@unthinkable.co
|
8a4566052e37cb31df208ed5e7c7aa05ea121a3d
|
4bdc2db9778a62009326a7ed1bed2729c8ff56a9
|
/kernel/impl/fabric3-fabric/src/main/java/org/fabric3/fabric/deployment/command/BuildChannelCommand.java
|
8d47e103b12cc39b72d7f9c533eaf9ac4411a423
|
[] |
no_license
|
aaronanderson/fabric3-core
|
2a66038338ac3bb8ba1ae6291f39949cb93412b2
|
44773a3e636fcfdcd6dcd43b7fb5b442310abae5
|
refs/heads/master
| 2021-01-16T21:56:29.067390
| 2014-01-09T15:44:09
| 2014-01-14T06:26:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,060
|
java
|
/*
* Fabric3
* Copyright (c) 2009-2013 Metaform Systems
*
* Fabric3 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version, with the
* following exception:
*
* Linking this software statically or dynamically with other
* modules is making a combined work based on this software.
* Thus, the terms and conditions of the GNU General Public
* License cover the whole combination.
*
* As a special exception, the copyright holders of this software
* give you permission to link this software with independent
* modules to produce an executable, regardless of the license
* terms of these independent modules, and to copy and distribute
* the resulting executable under terms of your choice, provided
* that you also meet, for each linked independent module, the
* terms and conditions of the license of that module. An
* independent module is a module which is not derived from or
* based on this software. If you modify this software, you may
* extend this exception to your version of the software, but
* you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version.
*
* Fabric3 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the
* GNU General Public License along with Fabric3.
* If not, see <http://www.gnu.org/licenses/>.
*
* ----------------------------------------------------
*
* Portions originally based on Apache Tuscany 2007
* licensed under the Apache 2.0 license.
*
*/
package org.fabric3.fabric.deployment.command;
import org.fabric3.spi.command.CompensatableCommand;
import org.fabric3.spi.model.physical.PhysicalChannelDefinition;
/**
* Instantiates a channel on a runtime.
*/
public class BuildChannelCommand implements CompensatableCommand {
private static final long serialVersionUID = -7476738011193689990L;
private PhysicalChannelDefinition definition;
public BuildChannelCommand(PhysicalChannelDefinition definition) {
this.definition = definition;
}
public DisposeChannelCommand getCompensatingCommand() {
return new DisposeChannelCommand(definition);
}
public PhysicalChannelDefinition getDefinition() {
return definition;
}
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BuildChannelCommand that = (BuildChannelCommand) o;
return !(definition != null ? !definition.equals(that.definition) : that.definition != null);
}
public int hashCode() {
return (definition != null ? definition.hashCode() : 0);
}
}
|
[
"jim.marino@gmail.com"
] |
jim.marino@gmail.com
|
502fe881875877acf139d6fceaa241f1d4ff3902
|
39187e612764b1ea0178ace9218e168d85315c77
|
/src/com/javarush/test/level07/lesson06/task02/Solution.java
|
3994dd2f722960ad4f6c91be97cacd1049263eb5
|
[] |
no_license
|
stden/JavaRush
|
b15e586f4ac64f6999d6bc18fa625fbad062cc99
|
256be9bf2cf70d07c396ad095369d5dfc8cfcbc1
|
refs/heads/master
| 2021-01-10T03:29:50.461597
| 2015-10-23T13:26:15
| 2015-10-23T13:26:15
| 43,394,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,531
|
java
|
package com.javarush.test.level07.lesson06.task02;
import java.util.ArrayList;
import java.util.Scanner;
/* Самая длинная строка
1. Создай список строк.
2. Считай с клавиатуры 5 строк и добавь в список.
3. Используя цикл, найди самую длинную строку в списке.
4. Выведи найденную строку на экран.
5. Если таких строк несколько, выведи каждую с новой строки.
*/
public class Solution {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
// 1. Создай список строк.
ArrayList<String> list = new ArrayList<String>();
// 2. Считай с клавиатуры 5 строк и добавь в список.
for (int i = 0; i < 5; i++) {
list.add(scanner.nextLine());
}
// 3. Используя цикл, найди самую длинную строку в списке.
int m = list.get(0).length();
for (String s : list)
if (s.length() > m)
m = s.length();
// 4. Выведи найденную строку на экран.
// 5. Если таких строк несколько, выведи каждую с новой строки.
for (String s : list)
if (s.length() == m)
System.out.println(s);
}
}
|
[
"super.denis@gmail.com"
] |
super.denis@gmail.com
|
8e61077fe094480d6e5862812f84383e4d98ba8a
|
03ade53b9b2a2c775b5c7d39be2d96b551f98cae
|
/app/src/main/java/com/sshy/yjy/strore/mate/submitorder/AddBankCardDelegate.java
|
e2ca73a05749452e4bcd195d8b4ffa1504b89e06
|
[] |
no_license
|
JoeyChow1989/YiShanHome-master
|
09b110728d0e2ecc50cf5ed94015717af62670ef
|
85501b2fb422e3d5c104077212c8d7db560607f4
|
refs/heads/master
| 2020-06-02T21:13:50.334139
| 2019-06-11T07:06:00
| 2019-06-11T07:06:00
| 191,311,279
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,423
|
java
|
package com.sshy.yjy.strore.mate.submitorder;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.AppCompatImageView;
import android.support.v7.widget.AppCompatTextView;
import com.sshy.yjy.strore.R;
import com.sshy.yjy.strore.mate.pay.PaySuccessDelegate;
import strore.yjy.sshy.com.mate.activities.BaseActivity;
import strore.yjy.sshy.com.mate.ActivityManager.AppManager;
import strore.yjy.sshy.com.mate.util.statusBar.StatusBarUtil;
/**
* create date:2018/9/5
* create by:周正尧
*/
public class AddBankCardDelegate extends BaseActivity {
private AppCompatTextView mAddBankCard = null;
private AppCompatImageView mBack = null;
@Override
public Object setLayout() {
return R.layout.delegate_add_bankcard;
}
@Override
public void onBindView(@Nullable Bundle savedInstanceState) {
mAddBankCard = $(R.id.tv_add_bankcard);
mAddBankCard.setOnClickListener(v -> {
Intent intent = new Intent(AddBankCardDelegate.this, PaySuccessDelegate.class);
startActivity(intent);
});
mBack = $(R.id.id_left_back);
mBack.setOnClickListener(v -> {
AppManager.getInstance().finishActivity();
});
}
@Override
public void setStatusBar() {
StatusBarUtil.setStatusBarMode(this, true, R.color.white);
}
}
|
[
"100360258@qq.com"
] |
100360258@qq.com
|
6f38255f37c04d9a76f964339747b9d9cda59413
|
e3d0f7f75e4356413d05ba78e14c484f8555b2b5
|
/azure-resourcemanager-hybrid/src/main/java/com/azure/resourcemanager/hybrid/compute/models/Operations.java
|
6ea9e535a5c7185428226e08cc0d519f77b9d2b0
|
[
"MIT"
] |
permissive
|
weidongxu-microsoft/azure-stack-java-samples
|
1df227502c367f128916f121ccc0f5bc77b045e5
|
afdfd0ed220f2f8a603c6fa5e16311a7842eb31c
|
refs/heads/main
| 2023-04-04T12:24:07.405360
| 2021-04-07T08:06:00
| 2021-04-07T08:06:00
| 337,593,216
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,297
|
java
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.hybrid.compute.models;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
/** Resource collection API of Operations. */
public interface Operations {
/**
* Gets a list of compute operations.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of compute operations.
*/
PagedIterable<ComputeOperationValue> list();
/**
* Gets a list of compute operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of compute operations.
*/
PagedIterable<ComputeOperationValue> list(Context context);
}
|
[
"weidxu@microsoft.com"
] |
weidxu@microsoft.com
|
6c51cdb65c7c899614bbc30946174813ca70ae2e
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/se/comm/rec/SE_COMM_1100_MCURLISTRecord.java
|
746401cfbedb1906fab49e139e3a904f98757afa
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,410
|
java
|
/***************************************************************************************************
* 파일명 : SE_COMM_1100_MCURLISTRecord.java
* 기능 : 지국정보 조회 팝업
* 작성일자 : 2009.03.03
* 작성자 : 김대준
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.se.comm.rec;
import java.sql.*;
import chosun.ciis.se.comm.dm.*;
import chosun.ciis.se.comm.ds.*;
/**
*
*/
public class SE_COMM_1100_MCURLISTRecord extends java.lang.Object implements java.io.Serializable{
public String cd ;
public String cdnm ;
public String cd_abrv_nm;
public SE_COMM_1100_MCURLISTRecord(){}
public String getCd() {
return cd;
}
public void setCd(String cd) {
this.cd = cd;
}
public String getCd_abrv_nm() {
return cd_abrv_nm;
}
public void setCd_abrv_nm(String cd_abrv_nm) {
this.cd_abrv_nm = cd_abrv_nm;
}
public String getCdnm() {
return cdnm;
}
public void setCdnm(String cdnm) {
this.cdnm = cdnm;
}
}
/* 작성시간 : Tue Mar 03 17:43:55 KST 2009 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
23e10ec691461c94e57a8177b0cc0e7f74d88867
|
72451944f5e57ce17f60442783229f4b05d207d7
|
/code/src/com/asiainfo/sale/common/web/ProxyAction.java
|
9dce2ca4703b711a373309befb72b3d4b7a9bb1d
|
[] |
no_license
|
amosgavin/db2app55
|
ab1d29247be16bc9bbafd020e1a234f98bac1a39
|
61be5acb3143f5035f789cd0e0fd4e01238d9d7d
|
refs/heads/master
| 2020-04-07T08:26:20.757572
| 2018-07-13T01:55:47
| 2018-07-13T01:55:47
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,812
|
java
|
package com.asiainfo.sale.common.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.ai.appframe2.common.SessionManager;
import com.ai.appframe2.service.ServiceFactory;
import com.ai.appframe2.web.CustomProperty;
import com.ai.appframe2.web.HttpUtil;
import com.ai.appframe2.web.action.BaseAction;
import com.asiainfo.sale.common.service.interfaces.IProxySV;
public class ProxyAction extends BaseAction {
private transient static Log log = LogFactory.getLog(ProxyAction.class);
public void setProxy(HttpServletRequest request,
HttpServletResponse response) throws Exception {
CustomProperty cp = CustomProperty.getInstance();
String createrId = String.valueOf(SessionManager.getUser().getID());
String proxyerId = request.getParameter("proxyerId");
String mFlag = request.getParameter("mFlag");
try {
if (null == createrId || "".equals(createrId)) {
cp.set("FLAG", "N");
cp.set("MESSAGE", "授权人为空!");
} else if (null == proxyerId || "".equals(proxyerId)) {
cp.set("FLAG", "N");
cp.set("MESSAGE", "被授权人为空!");
} else if (null == mFlag || "".equals(mFlag)) {
cp.set("FLAG", "N");
cp.set("MESSAGE", "授权类型为空!");
} else {
IProxySV iProxySV = (IProxySV) ServiceFactory.getService(IProxySV.class);
String[] rStrings = iProxySV.setProxy(createrId, proxyerId, mFlag);
if ("0000".equals(rStrings[0])) {
cp.set("FLAG", "Y");
cp.set("MESSAGE", "操作成功!");
} else {
cp.set("FLAG", "N");
cp.set("MESSAGE", rStrings[1]);
}
}
} catch (Exception e) {
log.error("授权操作出错", e);
cp.set("FLAG", "N");
cp.set("MESSAGE", "操作失败" + ":" + e.getMessage());
} finally {
HttpUtil.showInfo(response, cp);
}
}
public void delProxy(HttpServletRequest request,
HttpServletResponse response) throws Exception {
CustomProperty cp = CustomProperty.getInstance();
String createrId = String.valueOf(SessionManager.getUser().getID());
try {
if (null == createrId || "".equals(createrId)) {
cp.set("FLAG", "N");
cp.set("MESSAGE", "授权人为空!");
} else {
IProxySV iProxySV = (IProxySV) ServiceFactory.getService(IProxySV.class);
String[] rStrings = iProxySV.delProxy(createrId);
if ("0000".equals(rStrings[0])) {
cp.set("FLAG", "Y");
cp.set("MESSAGE", "操作成功!");
} else {
cp.set("FLAG", "N");
cp.set("MESSAGE", rStrings[1]);
}
}
} catch (Exception e) {
log.error("授权操作出错", e);
cp.set("FLAG", "N");
cp.set("MESSAGE", "操作失败" + ":" + e.getMessage());
} finally {
HttpUtil.showInfo(response, cp);
}
}
}
|
[
"chendb@asiainfo.com"
] |
chendb@asiainfo.com
|
56e6e9fba91f6b039c00ab9465881772172f23ab
|
e433e6f2c9a7239fef95170069bc7db26b2edba3
|
/src/main/java/org/egordorichev/lasttry/item/modifier/AccessoryModifier.java
|
39fd9dbc51fd007085485a831e9d8cbd84816a5b
|
[
"MIT"
] |
permissive
|
NigelCas/LastTry
|
e38936af5ba4cef77695074979549a18ab173926
|
a4b5c2b249b239b93eaab2b7d293d8326902320d
|
refs/heads/master
| 2021-06-14T20:10:51.661321
| 2017-03-25T05:08:23
| 2017-03-25T05:08:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,143
|
java
|
package org.egordorichev.lasttry.item.modifier;
public class AccessoryModifier extends Modifier {
public static final Modifier hard = new AccessoryModifier("Hard", 0, 0, 0, 0, 0, 0, +1);
public static final Modifier guarding = new AccessoryModifier("Guarding", 0, 0, 0, 0, 0, 0, +2);
public static final Modifier armored = new AccessoryModifier("Armored", 0, 0, 0, 0, 0, 0, +3);
public static final Modifier warding = new AccessoryModifier("Warding", 0, 0, 0, 0, 0, 0, +4);
public static final Modifier arcane = new AccessoryModifier("Arcane", 0, 0, 0, 0, +20, 0, 0);
public static final Modifier precise = new AccessoryModifier("Precise", 0, 0, +2, 0, 0, 0, 0);
public static final Modifier lucky = new AccessoryModifier("Lucky", 0, 0, +4, 0, 0, 0, 0);
public static final Modifier jagged = new AccessoryModifier("Jagged", +1, 0, 0, 0, 0, 0, 0);
public static final Modifier spiked = new AccessoryModifier("Spiked", +2, 0, 0, 0, 0, 0, 0);
public static final Modifier angry = new AccessoryModifier("Angry", +3, 0, 0, 0, 0, 0, 0);
public static final Modifier menacing = new AccessoryModifier("Menacing", +4, 0, 0, 0, 0, 0, 0);
public static final Modifier brisk = new AccessoryModifier("Brisk", 0, 0, 0, 0, 0, +1, 0);
public static final Modifier fleeting = new AccessoryModifier("Fleeting", 0, 0, 0, 0, 0, +2, 0);
public static final Modifier hasty = new AccessoryModifier("Hasty", 0, 0, 0, 0, 0, +3, 0);
public static final Modifier quick = new AccessoryModifier("Quick", 0, 0, 0, 0, 0, +4, 0);
public static final Modifier wild = new AccessoryModifier("Wild", 0, +1, 0, 0, 0, 0, 0);
public static final Modifier rash = new AccessoryModifier("Rash", 0, +2, 0, 0, 0, 0, 0);
public static final Modifier intrepid = new AccessoryModifier("Intrepid", 0, +3, 0, 0, 0, 0, 0);
public static final Modifier violent = new AccessoryModifier("Violent", 0, +4, 0, 0, 0, 0, 0);
public AccessoryModifier(String name, int damage, int speed, int criticalStrikeChance, int knockback, int mana, int movementSpeed, int defense) {
super(name, damage, speed, criticalStrikeChance, 0, 0, 0, knockback, mana, movementSpeed, defense);
}
}
|
[
"egordorichev@gmail.com"
] |
egordorichev@gmail.com
|
c185037127e5abd9203fbadf3f8e09175a384f46
|
baf90a659e8fd4cd7ed9f5c41881754d286ddbbd
|
/src/test/textAnalysisTests/SearchTest.java
|
1e065e3bbeb799a68c6b3e44475db19737f0b8d6
|
[] |
no_license
|
Linusdalin/AnalysisModule
|
3c837af034862e59ae4694b1e62aa1aeaddadf71
|
4fe0e966fb0634b83722309d321472a5fb0d0668
|
refs/heads/master
| 2021-01-10T16:57:34.162334
| 2015-10-12T19:46:06
| 2015-10-12T19:46:06
| 44,130,199
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,071
|
java
|
package test.textAnalysisTests;
import classifiers.classifierTests.AnalysisTest;
import language.English;
import language.Swedish;
import org.junit.BeforeClass;
import org.junit.Test;
import stemming.EnglishStemmer;
import stemming.StemmerInterface;
import stemming.SwedishStemmer;
import system.TextMatcher;
import java.io.*;
import java.util.List;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
/**
*
*/
public class SearchTest extends AnalysisTest {
private static TextMatcher textMatcherEN;
private static TextMatcher textMatcherSE;
@BeforeClass
public static void preamble(){
textMatcherEN = new TextMatcher().setLanguage(new English(), "TextAnalysis/models");
textMatcherSE = new TextMatcher().setLanguage(new Swedish(), "TextAnalysis/models");
}
@Test
public void stemTest(){
List<String> matches;
matches = textMatcherEN.prepareSearchString("indexing").useStemMatch().getMatch("it should match index");
System.out.println("Matches:" + matches.toString());
assertVerbose("index", matches.contains("index"), is(true));
matches = textMatcherEN.prepareSearchString("head").useStemMatch().getMatch("We headed in the direction");
System.out.println("Matches:" + matches.toString());
assertVerbose("headed", matches.contains("headed"), is(true));
matches = textMatcherEN.prepareSearchString("collect").useStemMatch().getMatch("\"GATC\" means the Google Analytics Tracking Code, which is installed on a Property for the purpose of collecting Customer Data, together with any fixes, corrections and upgrades provided to You.");
System.out.println("Matches:" + matches.toString());
assertTrue(matches.contains("collecting"));
}
@Test
public void synonymTest(){
List<String> matches;
matches = textMatcherEN.prepareSearchString("beautiful").useSynonyms().getMatch("it is a lovely weather");
System.out.println("Matches:" + matches.toString());
assertTrue(matches.contains("lovely"));
matches = textMatcherEN.prepareSearchString("beautiful").getMatch("it is a lovely weather");
assertNull(matches );
}
@Test
public void synonymTestSwedish(){
List<String> matches;
matches = textMatcherSE.prepareSearchString("övning").useSynonyms().getMatch("Det krävs träning");
System.out.println("Matches:" + matches.toString());
assertTrue(matches.contains("träning"));
}
@Test
public void specialCharacters(){
List<String> matches;
matches = textMatcherEN.prepareSearchString("Linus").getMatch("Linus,check this");
System.out.println("Matches:" + matches.toString());
assertThat(matches.size(), is( 1 ));
}
@Test
public void basicTest(){
List<String> matches;
// Find two words but one is in the ignore list
matches = textMatcherEN.prepareSearchString("this is").getMatch("this is the text from which we are to search and find");
System.out.println("Matches:" + matches.toString());
assertThat(matches.size(), is(2));
matches = textMatcherEN.prepareSearchString("annotation").caseInsensitive().getMatch("This is an annotation");
System.out.println("Matches:" + matches.toString());
assertThat(matches.size(), is(1));
matches = textMatcherEN.prepareSearchString("find text").getMatch("this is the text from which we are to search and find");
System.out.println("Matches:" + matches.toString());
assertThat(matches.size(), is(2));
// Search should be case insensitive
matches = textMatcherEN.prepareSearchString("Find TEXT").caseInsensitive().getMatch("this is the teXt from which we are to search and find");
System.out.println("Matches:" + matches.toString());
assertThat(matches.size(), is(2));
matches = textMatcherEN.prepareSearchString("search anything").getMatch("this is the text from which we are to search and find");
assertNull(matches);
matches = textMatcherEN.prepareSearchString("Definitions").caseInsensitive().getMatch("Definitions");
System.out.println("Matches:" + matches.toString());
assertThat(matches.size(), is(1));
}
@Test
public void stemSE(){
StemmerInterface stemmer = new SwedishStemmer();
stemmer.setCurrent("spelar");
stemmer.stem();
assertThat(stemmer.getCurrent(), is("spel"));
}
@Test
public void stemEN(){
StemmerInterface stemmer = new EnglishStemmer();
stemmer.setCurrent("playing");
stemmer.stem();
assertThat(stemmer.getCurrent(), is("play"));
}
}
|
[
"linus.dalin@itclarifies.com"
] |
linus.dalin@itclarifies.com
|
b633b8781aedd14d761d40b750a3daf3ddd00a14
|
0d616c0365cbadc66b0ce838ed2b019a42579a96
|
/android/src/main/java/com/dslplatform/json/ConfigureAndroid.java
|
6bc7739ed4ac48fc030547a230c4df63ff1b294b
|
[
"BSD-3-Clause"
] |
permissive
|
section42/dsl-json
|
966d0b17e01b7908a1f6f6a3a0421e1ea4a5995e
|
406a63daa1a6730da015f92cdea32fccd32e4962
|
refs/heads/master
| 2020-09-08T19:30:34.640939
| 2019-11-12T13:37:34
| 2019-11-12T13:37:34
| 221,224,896
| 0
| 0
|
BSD-3-Clause
| 2019-11-12T13:30:45
| 2019-11-12T13:30:44
| null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
package com.dslplatform.json;
import dsl_json.android.graphics.*;
import org.w3c.dom.Element;
public class ConfigureAndroid implements Configuration {
@Override
public void configure(DslJson json) {
new PointFDslJsonConverter().configure(json);
new PointDslJsonConverter().configure(json);
new RectDslJsonConverter().configure(json);
new BitmapDslJsonConverter().configure(json);
json.registerReader(Element.class, XmlConverter.Reader);
json.registerWriter(Element.class, XmlConverter.Writer);
}
}
|
[
"rikard@ngs.hr"
] |
rikard@ngs.hr
|
883eadda87ed50c0a3af44ce1bd0dbeca0632df6
|
623b8eb08aa8c4a7679cc20b0728844f801f9ce6
|
/src/main/java/com/xiaoyi/bis/user/service/ChannelService.java
|
ca784fa477ddcff3211dc1b56487a37a34a0cbc1
|
[] |
no_license
|
LiuYPGitHub/xiaoyi2
|
e8a9ef1b63161804e742d5ac08819cc2b97ed3f7
|
f713cfe91d5b6bc8102876e644e503666f028a34
|
refs/heads/master
| 2022-07-10T08:26:01.686314
| 2019-12-12T02:48:34
| 2019-12-12T02:48:34
| 227,505,173
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 278
|
java
|
package com.xiaoyi.bis.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaoyi.bis.user.domain.OrderChannel;
import java.util.List;
public interface ChannelService extends IService<OrderChannel> {
List<OrderChannel> listChannel();
}
|
[
"Philo@DESKTOP-OPRVRF1"
] |
Philo@DESKTOP-OPRVRF1
|
ce2f5997b02eba60fb6226db50b2f61bd8ea24c3
|
a4615bb8437d28f099c1e7a983095bb3db4eff86
|
/pack-jnr-fuse/src/test/java/jnrfuse/struct/StructSizeTest.java
|
4d25452c7377f310b1c2bc66fbd999f37843c738
|
[
"Apache-2.0"
] |
permissive
|
amccurry/pack
|
817c0b7a0014f8d06642572f51b0273f43995cab
|
4dda84f4512ea8d2c083d0b6cb3b7282ca912e37
|
refs/heads/master
| 2022-07-22T14:54:44.835018
| 2019-02-22T19:30:50
| 2019-02-22T19:30:50
| 75,693,744
| 1
| 0
|
Apache-2.0
| 2022-07-15T20:13:20
| 2016-12-06T04:13:48
|
Java
|
UTF-8
|
Java
| false
| false
| 4,598
|
java
|
package jnrfuse.struct;
import jnr.ffi.Runtime;
import jnr.ffi.Struct;
import jnr.posix.util.Platform;
import jnrfuse.struct.FileStat;
import jnrfuse.struct.Flock;
import jnrfuse.struct.FuseBuf;
import jnrfuse.struct.FuseBufvec;
import jnrfuse.struct.FuseContext;
import jnrfuse.struct.FuseFileInfo;
import jnrfuse.struct.FuseOperations;
import jnrfuse.struct.FusePollhandle;
import jnrfuse.struct.Statvfs;
import jnrfuse.struct.Timespec;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.Map;
import java.util.function.Function;
import static org.junit.Assert.assertEquals;
import static jnr.ffi.Platform.OS.*;
import static jnrfuse.struct.PlatformSize.platformSize;
import static jnrfuse.struct.Utils.asMap;
import static jnrfuse.struct.Utils.Pair.pair;
class PlatformSize {
public final int x32;
public final int x64;
PlatformSize(int x32, int x64) {
this.x32 = x32;
this.x64 = x64;
}
public static PlatformSize platformSize(int x32, int x64) {
return new PlatformSize(x32, x64);
}
}
/**
* Test for the right struct size
*/
public class StructSizeTest {
private static Map<Class<?>, Map<jnr.ffi.Platform.OS, PlatformSize>> sizes = asMap(
pair(Statvfs.class, asMap(
pair(LINUX, platformSize(96, 112)), //
pair(DARWIN, platformSize(64, 64)))),
pair(FileStat.class, asMap(
pair(LINUX, platformSize(96, 144)), //
pair(DARWIN, platformSize(96, 144)))),
pair(FuseFileInfo.class, asMap(
pair(LINUX, platformSize(32, 40)), //
pair(DARWIN, platformSize(32, 40)))),
pair(FuseOperations.class, asMap(
pair(LINUX, platformSize(180, 360)), //
pair(DARWIN, platformSize(232, 464)))),
pair(Timespec.class, asMap(
pair(LINUX, platformSize(8, 16)), //
pair(DARWIN, platformSize(8, 16)))),
pair(Flock.class, asMap(
pair(LINUX, platformSize(24, 32)), //
pair(DARWIN, platformSize(24, 24)))),
pair(FuseBuf.class, asMap(
pair(LINUX, platformSize(24, 40)), //
pair(DARWIN, platformSize(24, 40)))),
pair(FuseBufvec.class, asMap(
pair(LINUX, platformSize(36, 64)), //
pair(DARWIN, platformSize(36, 64)))),
pair(FusePollhandle.class, asMap(
pair(LINUX, platformSize(16, 24)), //
pair(DARWIN, platformSize(16, 24)))),
pair(FuseContext.class, asMap(
// the real x64 size is 40 because of alignment
pair(LINUX, platformSize(24, 36)), //
pair(DARWIN, platformSize(24, 34))))
);
@BeforeClass
public static void init() {
if (!Platform.IS_32_BIT && !Platform.IS_64_BIT) {
throw new IllegalStateException("Unknown platform " + System.getProperty("sun.arch.data.model"));
}
System.out.println("Running struct size test\nPlatform: " + Platform.ARCH + "\nOS: " + Platform.OS_NAME);
}
private static void assertPlatfomValue(Function<jnr.ffi.Runtime, Struct> structFunction) {
Struct struct = structFunction.apply(Runtime.getSystemRuntime());
jnr.ffi.Platform.OS os = jnr.ffi.Platform.getNativePlatform().getOS();
PlatformSize size = sizes.get(struct.getClass()).get(os);
assertEquals(Platform.IS_32_BIT ? size.x32 : size.x64, Struct.size(struct));
}
@Test
public void testStatvfs() {
assertPlatfomValue(Statvfs::new);
}
@Test
public void testFileStat() {
assertPlatfomValue(FileStat::new);
}
@Test
public void testFuseFileInfo() {
assertPlatfomValue(FuseFileInfo::new);
}
@Test
public void testFuseOperations() {
assertPlatfomValue(FuseOperations::new);
}
@Test
public void testTimeSpec() {
assertPlatfomValue(Timespec::new);
}
@Test
public void testFlock() {
assertPlatfomValue(Flock::new);
}
@Test
public void testFuseBuf() {
assertPlatfomValue(FuseBuf::new);
}
@Test
public void testFuseBufvec() {
assertPlatfomValue(FuseBufvec::new);
}
@Test
public void testFusePollhandle() {
assertPlatfomValue(FusePollhandle::new);
}
@Test
public void testFuseContext() {
assertPlatfomValue(FuseContext::new);
}
}
|
[
"amccurry@gmail.com"
] |
amccurry@gmail.com
|
29afc6f5726b9c63e83b12ca4cd18639bed34ca1
|
765b800c2b5a53f2d1a0e11ef1b3c82449f87b95
|
/vertx-platform/src/main/java/org/vertx/java/platform/impl/resolver/HttpRepoResolver.java
|
4cc704bc4087acdcf92321ad431a40ebe5543de6
|
[
"Apache-2.0"
] |
permissive
|
jmirc/vert.x
|
3c69f8b8e318a67c1720fc0f47cd890609eb4080
|
3bcf3d39f344b0c3f8895697835997b1f7e23177
|
refs/heads/master
| 2021-01-15T16:29:43.011584
| 2013-02-12T20:36:00
| 2013-02-12T20:36:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,547
|
java
|
package org.vertx.java.platform.impl.resolver;/*
* Copyright 2013 Red Hat, Inc.
*
* Red Hat 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.
*
* @author <a href="http://tfox.org">Tim Fox</a>
*/
import org.vertx.java.core.Handler;
import org.vertx.java.core.Vertx;
import org.vertx.java.core.buffer.Buffer;
import org.vertx.java.core.http.HttpClient;
import org.vertx.java.core.http.HttpClientRequest;
import org.vertx.java.core.http.HttpClientResponse;
import org.vertx.java.core.logging.Logger;
import org.vertx.java.core.logging.impl.LoggerFactory;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
public abstract class HttpRepoResolver implements RepoResolver {
private static final Logger log = LoggerFactory.getLogger(HttpRepoResolver.class);
private final Vertx vertx;
private final String proxyHost;
private final int proxyPort;
protected final String repoHost;
protected final int repoPort;
protected final String contentRoot;
public HttpRepoResolver(Vertx vertx, String proxyHost, int proxyPort, String repoID) {
this.vertx = vertx;
this.proxyHost = proxyHost;
this.proxyPort = proxyPort;
try {
URI uri = new URI(repoID);
repoHost = uri.getHost();
int port = uri.getPort();
if (port == -1) {
port = 80;
}
repoPort = port;
contentRoot = uri.getPath();
} catch (Exception e) {
throw new IllegalArgumentException(repoID + " is not a valid repository identifier");
}
}
protected abstract String getRepoURI(String moduleName);
public Buffer getModule(final String moduleName) {
String uri = getRepoURI(moduleName);
CountDownLatch latch = new CountDownLatch(1);
AtomicReference<Buffer> mod = new AtomicReference<>();
getModule(moduleName, repoHost, repoPort, uri, latch, mod);
while (true) {
try {
if (!latch.await(30, TimeUnit.SECONDS)) {
throw new IllegalStateException("Timed out waiting to download module");
}
break;
} catch (InterruptedException ignore) {
}
}
return mod.get();
}
public void getModule(final String moduleName,
final String host, final int port, String uri, final CountDownLatch latch, final AtomicReference<Buffer> mod) {
final HttpClient client = vertx.createHttpClient();
if (proxyHost != null) {
client.setHost(proxyHost);
if (proxyPort != 80) {
client.setPort(proxyPort);
} else {
client.setPort(80);
}
} else {
client.setHost(host);
client.setPort(port);
}
client.exceptionHandler(new Handler<Exception>() {
public void handle(Exception e) {
log.error("Unable to connect to repository");
end(client, latch);
}
});
if (proxyHost != null) {
// We use an absolute URI
// FIXME - check this!
uri = new StringBuilder("http://").append(host).append(":").append(port).append(uri).toString();
}
final String theURI = uri;
HttpClientRequest req = client.get(uri, new Handler<HttpClientResponse>() {
public void handle(HttpClientResponse resp) {
if (resp.statusCode == 200) {
String msg = "Downloading module " + moduleName + " from http://"
+ repoHost + ":" + repoPort + theURI;
if (proxyHost != null) {
msg += " Using proxy host " + proxyHost + ":" + proxyPort;
}
log.info(msg);
resp.bodyHandler(new Handler<Buffer>() {
public void handle(Buffer buffer) {
mod.set(buffer);
end(client, latch);
}
});
return;
} else if (resp.statusCode == 404) {
// NOOP
} else if (resp.statusCode == 302) {
// follow redirects
String location = resp.headers().get("location");
if (location == null) {
log.error("HTTP redirect with no location header");
} else {
URI redirectURI;
try {
redirectURI = new URI(location);
getModule(moduleName, redirectURI.getHost(), redirectURI.getPort() != -1 ? redirectURI.getPort() : 80, redirectURI.getPath(), latch, mod);
return;
} catch (URISyntaxException e) {
log.error("Invalid redirect URI: " + location);
} finally {
client.close();
}
}
} else {
log.error("Failed to query repository: " + resp.statusCode);
}
end(client, latch);
}
});
if (proxyHost != null){
req.putHeader("host", proxyHost);
} else {
req.putHeader("host", host);
}
req.putHeader("user-agent", "Vert.x Module Installer");
req.end();
}
private void end(HttpClient client, CountDownLatch latch) {
client.close();
latch.countDown();
}
}
|
[
"timvolpe@gmail.com"
] |
timvolpe@gmail.com
|
c42d665474d63d52e77a590ff8f1132a1906fdbd
|
db2cd2a4803e546d35d5df2a75b7deb09ffadc01
|
/nemo-tfl-common/src/main/java/com/novacroft/nemo/tfl/common/form_validator/ApprovalsRejectionValidator.java
|
bcb74ebd080a2cc6a8ba1c3f6ccbfe23feca54e4
|
[] |
no_license
|
balamurugan678/nemo
|
66d0d6f7062e340ca8c559346e163565c2628814
|
1319daafa5dc25409ae1a1872b1ba9b14e5a297e
|
refs/heads/master
| 2021-01-19T17:47:22.002884
| 2015-06-18T12:03:43
| 2015-06-18T12:03:43
| 37,656,983
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,907
|
java
|
package com.novacroft.nemo.tfl.common.form_validator;
import static com.novacroft.nemo.tfl.common.constant.ContentCode.GREATER_THAN_CHARACTER_LIMIT;
import static com.novacroft.nemo.tfl.common.constant.PageCommandAttribute.FIELD_REJECT_REASON;
import static com.novacroft.nemo.tfl.common.constant.PageCommandAttribute.FIELD_REJECT_REASON_FREE_TEXT;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import com.novacroft.nemo.common.validator.BaseValidator;
import com.novacroft.nemo.tfl.common.command.impl.WorkflowRejectCmd;
import com.novacroft.nemo.tfl.common.constant.RefundConstants;
@Component("approvalsRejectionValidator")
public class ApprovalsRejectionValidator extends BaseValidator {
protected static final int CHARACTER_LIMIT = 150;
@Override
public boolean supports(Class<?> targetClass) {
return WorkflowRejectCmd.class.equals(targetClass);
}
@Override
public void validate(Object target, Errors errors) {
WorkflowRejectCmd cmd = (WorkflowRejectCmd) target;
validateRejectReason(errors);
validateRejectionFreeText(cmd, errors);
}
private void validateRejectReason(Errors errors) {
rejectIfMandatoryFieldEmpty(errors, FIELD_REJECT_REASON);
}
private void validateRejectionFreeText(WorkflowRejectCmd cmd, Errors errors) {
if (RefundConstants.OTHER.equalsIgnoreCase(cmd.getRejectReason()) && StringUtils.isEmpty(cmd.getRejectFreeText())) {
rejectIfMandatoryFieldEmpty(errors, FIELD_REJECT_REASON_FREE_TEXT);
} else if (!StringUtils.isEmpty(cmd.getRejectFreeText()) && cmd.getRejectFreeText().length() > CHARACTER_LIMIT) {
errors.rejectValue(FIELD_REJECT_REASON_FREE_TEXT, GREATER_THAN_CHARACTER_LIMIT.errorCode());
}
}
}
|
[
"balamurugan678@yahoo.co.in"
] |
balamurugan678@yahoo.co.in
|
8e413a2575b03062ee95a2b7f0ee419b0710d1c8
|
c5c30ad08c63ec0b955b338f70518e7662357e6f
|
/org/omg/PortableServer/CurrentPackage/NoContext.java
|
df3e808b8dd99ee547e68d942b3a595889907972
|
[] |
no_license
|
shawnxjf1/jdk-src-read
|
635fef8469759b3fe7d8fd3259c2f761f061e690
|
2bcb3b80577b5ff0404acdcf1e7a39d059dd781f
|
refs/heads/master
| 2016-09-22T13:50:07.107771
| 2016-08-15T11:49:57
| 2016-08-15T11:49:57
| 65,729,824
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 609
|
java
|
package org.omg.PortableServer.CurrentPackage;
/**
* org/omg/PortableServer/CurrentPackage/NoContext.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from d:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u20/1074/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Wednesday, July 30, 2014 1:52:58 PM PDT
*/
public final class NoContext extends org.omg.CORBA.UserException
{
public NoContext ()
{
super(NoContextHelper.id());
} // ctor
public NoContext (String $reason)
{
super(NoContextHelper.id() + " " + $reason);
} // ctor
} // class NoContext
|
[
"shawn_angel@qq.com"
] |
shawn_angel@qq.com
|
adcbc5bce43f064bd8c79c53e98b1046cf6cfaf9
|
204deb2a6b142cb408aa61bd4910947f2c1f5c4c
|
/22. Combining Data Structures - Exercise/src/ShoppingCenter.java
|
d21388f9b262938cdc73f75fd3f135f1b3e1ea91
|
[] |
no_license
|
Taewii/data-structures
|
9a309aa84fb8f0347b8586c78e9ba84ceb4bf25d
|
49beeb558a815070ec2c3b46971f231db2fe31c8
|
refs/heads/master
| 2020-04-21T09:58:30.276965
| 2019-03-22T15:08:11
| 2019-03-22T15:08:11
| 169,470,985
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,399
|
java
|
import java.util.*;
public class ShoppingCenter {
//not sure how this is fast enough to work in the tests, but eh, I ain't complainin lmao
private Map<String, List<Product>> productsByName;
private Map<String, List<Product>> productsByProducer;
private Map<String, List<Product>> productsByNameAndProducer;
private TreeMap<Double, List<Product>> productsByPrice;
public ShoppingCenter() {
this.productsByName = new HashMap<>();
this.productsByProducer = new HashMap<>();
this.productsByNameAndProducer = new HashMap<>();
this.productsByPrice = new TreeMap<>();
}
public String addProduct(String name, double price, String producer) {
Product product = new Product(name, price, producer);
this.productsByName.putIfAbsent(name, new ArrayList<>());
this.productsByName.get(name).add(product);
this.productsByProducer.putIfAbsent(producer, new ArrayList<>());
this.productsByProducer.get(producer).add(product);
String key = name.concat(producer);
this.productsByNameAndProducer.putIfAbsent(key, new ArrayList<>());
this.productsByNameAndProducer.get(key).add(product);
this.productsByPrice.putIfAbsent(price, new ArrayList<>());
this.productsByPrice.get(price).add(product);
return "Product added";
}
public String deleteProducts(String producer) {
if (!this.productsByProducer.containsKey(producer)) {
return "No products found";
}
List<Product> products = this.productsByProducer.get(producer);
if (producer.isEmpty()) return "No products found";
for (Product product : products) {
this.productsByName.get(product.getName()).remove(product);
this.productsByNameAndProducer.get(product.getName() + product.getProducer()).remove(product);
this.productsByPrice.get(product.getPrice()).remove(product);
}
this.productsByProducer.remove(producer);
return String.format("%d products deleted", products.size());
}
public String deleteProducts(String name, String producer) {
String key = name.concat(producer);
if (!this.productsByNameAndProducer.containsKey(key)) {
return "No products found";
}
List<Product> products = this.productsByNameAndProducer.get(key);
if (products.isEmpty()) return "No products found";
for (Product product : products) {
this.productsByName.get(product.getName()).remove(product);
this.productsByProducer.get(product.getProducer()).remove(product);
this.productsByPrice.get(product.getPrice()).remove(product);
}
this.productsByNameAndProducer.remove(key);
return String.format("%d products deleted", products.size());
}
public List<Product> findProductsByName(String name) {
return this.productsByName.get(name);
}
public List<Product> findProductsByProducer(String producer) {
return this.productsByProducer.get(producer);
}
public List<Product> findProductsByPriceRange(Double from, Double to) {
List<Product> result = new ArrayList<>();
this.productsByPrice
.subMap(from, true, to, true)
.forEach((key, value) -> result.addAll(value));
return result;
}
}
|
[
"p3rfec7@abv.bg"
] |
p3rfec7@abv.bg
|
3f6b660517a26fb202c43fa54081c9e9f5fceec7
|
3e32df055027c751de161a9d978ad4823f46a38c
|
/character-generator/src/main/java/nz/co/fitnet/characterGenerator/core/builders/ProficiencyBuilder.java
|
09832cf120073a6832d5e26cd9972047d3eda33c
|
[] |
no_license
|
williamanzac/dnd-tools
|
11d28c7130c6cfcc3f8050085f0d7da663c192d3
|
aeb6530920a5c7aba095f1944a49a2d98bc5f9c1
|
refs/heads/master
| 2023-08-16T05:42:49.673734
| 2023-03-30T19:28:10
| 2023-03-30T19:28:10
| 123,676,485
| 0
| 0
| null | 2023-08-15T14:59:43
| 2018-03-03T09:09:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,104
|
java
|
package nz.co.fitnet.characterGenerator.core.builders;
import static java.util.stream.Collectors.toList;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import nz.co.fitnet.characterGenerator.api.equipment.Tool;
import nz.co.fitnet.numberGenerator.api.NumberService;
public class ProficiencyBuilder {
private final RandomComparator<Tool> comparator;
private final List<Tool> proficientTools = new ArrayList<>();
private int numberToolProficiencies;
@Inject
public ProficiencyBuilder(final NumberService numberService) {
comparator = new RandomComparator<>(numberService);
}
public ProficiencyBuilder withToolProficiencies(final List<Tool> tools) {
proficientTools.addAll(tools);
return this;
}
public ProficiencyBuilder withNumberToolProfifiencies(final int value) {
numberToolProficiencies = value;
return this;
}
public List<Tool> buildToolProficiencies() {
final List<Tool> list = proficientTools.stream().sorted(comparator).limit(numberToolProficiencies)
.collect(toList());
return list;
}
}
|
[
"william.anzac@gmail.com"
] |
william.anzac@gmail.com
|
0942cf1bd28eab2f990cd67823c1ae310122d548
|
9a22b89e5906db0c5ae0130f88b915dd6e0cf9e6
|
/src/main/java/org/nodex/core/http/AbstractConnection.java
|
adef48d7e9e7b97c3b5ee8fa4e5dab15950fa8a6
|
[] |
no_license
|
puneetlakhina/node.x
|
8bae7242dcb92391934350035edd81bc53e8a0a3
|
8e79a9a51cf9c2aea3efd9e6ff835db9270fb7ed
|
refs/heads/master
| 2021-01-17T23:53:44.490169
| 2011-08-15T07:09:07
| 2011-08-15T07:09:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,028
|
java
|
/*
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.nodex.core.http;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFuture;
import org.nodex.core.ConnectionBase;
public abstract class AbstractConnection extends ConnectionBase {
protected AbstractConnection(Channel channel, long contextID, Thread th) {
super(channel, contextID, th);
}
public ChannelFuture write(Object obj) {
return channel.write(obj);
}
}
|
[
"timvolpe@gmail.com"
] |
timvolpe@gmail.com
|
454a4bc9647eab45077eb10fdfe1ce24c1bc56ec
|
ffc2f92d41d936fe29c695297dbd590d96c4babb
|
/micro-application-register/src/main/java/com/aol/micro/server/application/registry/RegisterEntry.java
|
d7f1e603deb24106fe46a35abc30c3e4ab654455
|
[
"Apache-2.0"
] |
permissive
|
celeskyking/micro-server
|
7755766363097471c381648c357a3ff9631a4c5c
|
99ab9bc057b189cace7b47c385bba0334ab73725
|
refs/heads/master
| 2021-01-24T21:47:13.420494
| 2015-10-30T16:59:46
| 2015-10-30T16:59:46
| 45,366,624
| 1
| 0
| null | 2015-11-02T01:58:59
| 2015-11-02T01:58:58
| null |
UTF-8
|
Java
| false
| false
| 1,207
|
java
|
package com.aol.micro.server.application.registry;
import java.util.Date;
import java.util.UUID;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.experimental.FieldDefaults;
import lombok.experimental.Wither;
@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "register-entry")
@XmlType(name = "")
@Getter
@Wither
public class RegisterEntry {
int port;
String hostname;
String module;
String context;
Date time;
String uuid;
public RegisterEntry() {
this(-1, null, null, null, null, null);
}
public RegisterEntry(int port, String hostname, String module, String context, Date time, String uuid) {
this.port = port;
this.hostname = hostname;
this.module = module;
this.context = context;
this.time = time;
this.uuid = uuid;
}
public RegisterEntry(int port, String hostname, String module, String context, Date time) {
this(port, hostname, module, context, time, UUID.randomUUID().toString());
}
}
|
[
"john.mcclean@teamaol.com"
] |
john.mcclean@teamaol.com
|
876b98b22b8a468b13449b6948d3009e16ae98bb
|
db97ce70bd53e5c258ecda4c34a5ec641e12d488
|
/src/main/java/com/alipay/api/domain/AlipayDataDataservicePropertyBusinesspropertyCreateModel.java
|
42d1854622b878db204db6a0e58d49e802611931
|
[
"Apache-2.0"
] |
permissive
|
smitzhang/alipay-sdk-java-all
|
dccc7493c03b3c937f93e7e2be750619f9bed068
|
a835a9c91e800e7c9350d479e84f9a74b211f0c4
|
refs/heads/master
| 2022-11-23T20:32:27.041116
| 2020-08-03T13:03:02
| 2020-08-03T13:03:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,522
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 蚂蚁业务画像标签新增
*
* @author auto create
* @since 1.0, 2019-10-16 21:36:21
*/
public class AlipayDataDataservicePropertyBusinesspropertyCreateModel extends AlipayObject {
private static final long serialVersionUID = 8586157976372733516L;
/**
* 业务负责人工号
*/
@ApiField("biz_owner_id")
private String bizOwnerId;
/**
* 业务画像消费类目id
*/
@ApiField("business_profile_category_id")
private String businessProfileCategoryId;
/**
* 业务画像ID
*/
@ApiField("business_profile_id")
private String businessProfileId;
/**
* 来源字段名
*/
@ApiField("column_name")
private String columnName;
/**
* 来源字段类型
*/
@ApiField("column_type")
private String columnType;
/**
* 创建人工号
*/
@ApiField("creator_id")
private String creatorId;
/**
* 数据负责人工号
*/
@ApiField("data_owner_id")
private String dataOwnerId;
/**
* 数据类型
NUMBER("数值型"),
STRING("文本型"),
DATE("日期型"),
ENUM("枚举型"),
LBS("经纬度类");
*/
@ApiField("data_type")
private String dataType;
/**
* 当数据类型为枚举型时,要指定枚举ID
*/
@ApiField("enum_id")
private String enumId;
/**
* 个性化信息,jsonarray字符串
*/
@ApiListField("personality_info")
@ApiField("string")
private List<String> personalityInfo;
/**
* 物理数据源类型
ODPS,
HBASE,
KUDU,
ANTMETA,
XVIEW,
ANT_HBASE,
EXPLOER;
*/
@ApiField("physical_type")
private String physicalType;
/**
* 主键
*/
@ApiField("primary_key")
private String primaryKey;
/**
* 统计类型
ETL("ETL统计"),
MODEL("模型预测")
*/
@ApiField("proc_type")
private String procType;
/**
* 标签描述
*/
@ApiField("property_desc")
private String propertyDesc;
/**
* 标签名称
*/
@ApiField("propery_name")
private String properyName;
/**
* 质量负责人工号
*/
@ApiField("quality_owner_id")
private String qualityOwnerId;
/**
* 标签来源渠道
TABLE("数据表"),
FILE("文件"),
INTERFACE("接口"),
OBJECT_PROPERTY("公域标签")
*/
@ApiField("source_channel")
private String sourceChannel;
/**
* 来源表guid
*/
@ApiField("table_guid")
private String tableGuid;
public String getBizOwnerId() {
return this.bizOwnerId;
}
public void setBizOwnerId(String bizOwnerId) {
this.bizOwnerId = bizOwnerId;
}
public String getBusinessProfileCategoryId() {
return this.businessProfileCategoryId;
}
public void setBusinessProfileCategoryId(String businessProfileCategoryId) {
this.businessProfileCategoryId = businessProfileCategoryId;
}
public String getBusinessProfileId() {
return this.businessProfileId;
}
public void setBusinessProfileId(String businessProfileId) {
this.businessProfileId = businessProfileId;
}
public String getColumnName() {
return this.columnName;
}
public void setColumnName(String columnName) {
this.columnName = columnName;
}
public String getColumnType() {
return this.columnType;
}
public void setColumnType(String columnType) {
this.columnType = columnType;
}
public String getCreatorId() {
return this.creatorId;
}
public void setCreatorId(String creatorId) {
this.creatorId = creatorId;
}
public String getDataOwnerId() {
return this.dataOwnerId;
}
public void setDataOwnerId(String dataOwnerId) {
this.dataOwnerId = dataOwnerId;
}
public String getDataType() {
return this.dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getEnumId() {
return this.enumId;
}
public void setEnumId(String enumId) {
this.enumId = enumId;
}
public List<String> getPersonalityInfo() {
return this.personalityInfo;
}
public void setPersonalityInfo(List<String> personalityInfo) {
this.personalityInfo = personalityInfo;
}
public String getPhysicalType() {
return this.physicalType;
}
public void setPhysicalType(String physicalType) {
this.physicalType = physicalType;
}
public String getPrimaryKey() {
return this.primaryKey;
}
public void setPrimaryKey(String primaryKey) {
this.primaryKey = primaryKey;
}
public String getProcType() {
return this.procType;
}
public void setProcType(String procType) {
this.procType = procType;
}
public String getPropertyDesc() {
return this.propertyDesc;
}
public void setPropertyDesc(String propertyDesc) {
this.propertyDesc = propertyDesc;
}
public String getProperyName() {
return this.properyName;
}
public void setProperyName(String properyName) {
this.properyName = properyName;
}
public String getQualityOwnerId() {
return this.qualityOwnerId;
}
public void setQualityOwnerId(String qualityOwnerId) {
this.qualityOwnerId = qualityOwnerId;
}
public String getSourceChannel() {
return this.sourceChannel;
}
public void setSourceChannel(String sourceChannel) {
this.sourceChannel = sourceChannel;
}
public String getTableGuid() {
return this.tableGuid;
}
public void setTableGuid(String tableGuid) {
this.tableGuid = tableGuid;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
dca430a471abdbee8423a27eb84e1d12e8fd8e8e
|
2202442ae18bd686f6bdffadba50e6e89fe62fe7
|
/sample/src/main/java/com/rowland/onboarderwithstepperindicator/sample/view/activity/OnBoarderActivity.java
|
fedf9b083a71211e3c482782184ff0b78072738b
|
[
"Apache-2.0"
] |
permissive
|
RowlandOti/OnBoarderWithStepperIndicator
|
f1cd417fe53ad9ac551bc84295863dd442b44344
|
0e7fa7f581bb2689e1ebb7823601705e554a045f
|
refs/heads/master
| 2020-12-25T14:39:16.629700
| 2017-09-27T08:51:54
| 2017-09-27T08:51:54
| 61,832,191
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,089
|
java
|
package com.rowland.onboarderwithstepperindicator.sample.view.activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.Toast;
import com.rowland.onboarderwithstepperindicator.sample.R;
import com.rowland.onboarderwithstepperindicator.view.activity.AOnBoarderWithStepperIndicatorActivity;
import com.rowland.onboarderwithstepperindicator.view.fragment.OnBoarder;
import java.util.ArrayList;
import java.util.List;
public class OnBoarderActivity extends AOnBoarderWithStepperIndicatorActivity {
// Class log identifier
public final static String LOG_TAG = OnBoarderActivity.class.getSimpleName();
private List<OnBoarder> onBoarderPages;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStatusbarTransparent(true);
getStepperIndicatorManager().setStepperIndicatorColor(getResources().getColor(R.color.app_color_accent_orange));
getStepperIndicatorManager().setStepperLineDoneColor(getResources().getColor(R.color.app_color_accent_orange));
onBoarderPages = new ArrayList<>();
OnBoarder intro1 = new OnBoarder("Welcome", "Your Two Steps Away from Making Farming Easier", R.drawable.herdy_logo_125px);
intro1.setBackgroundColor(R.color.app_color_white);
intro1.setDescriptionColor(R.color.app_color_secondary_text_grey);
intro1.setTitleColor(R.color.app_color_accent_teal);
onBoarderPages.add(intro1);
onBoarderPages.add(intro1);
onBoarderPages.add(intro1);
onBoarderPages.add(intro1);
setOnboardPagesReady(onBoarderPages);
shouldDarkenButtonsLayout(true);
}
@Override
public void onSkipButtonPressed() {
super.onSkipButtonPressed();
loadActivity();
}
@Override
public void onFinishButtonPressed() {
loadActivity();
}
private void loadActivity() {
Toast.makeText(this, "Load Next Activity", Toast.LENGTH_SHORT).show();
}
}
|
[
"rowlandotienoo@gmail.com"
] |
rowlandotienoo@gmail.com
|
73dcb08c3547b6b2125f1361c30c8e447f57cb6e
|
62a54e9b1cfd6c27b27de69b19c4fc9abeecbdb6
|
/15_Workshop_JavaEE_ServletsJspJpa/metubeWorkshopV2/src/main/java/metube/web/servlets/admin/ApproveTubeServlet.java
|
07a97ec4d368184dbfb7f71280625d162ca8316d
|
[] |
no_license
|
warumNicht/Java-Web-Development-Basics---january-2019
|
c1d69e469503ddc412d0e47012769bd627b279aa
|
5f60a42bdfa1ef36fba13284fd27e5afdbed3a22
|
refs/heads/master
| 2020-04-20T15:16:49.016861
| 2019-02-25T08:14:37
| 2019-02-25T08:14:37
| 168,923,902
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,481
|
java
|
package metube.web.servlets.admin;
import metube.domain.enums.TubeStatus;
import metube.domain.models.service.TubeServiceModel;
import metube.domain.models.view.TubeDetailsViewModel;
import metube.services.TubeService;
import org.modelmapper.ModelMapper;
import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/admin/tube/approve/*")
public class ApproveTubeServlet extends HttpServlet {
private final TubeService tubeService;
private final ModelMapper mapper;
@Inject
public ApproveTubeServlet(TubeService tubeService, ModelMapper mapper) {
this.tubeService = tubeService;
this.mapper = mapper;
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String[] urlTokens = req.getRequestURI().split("/");
String tubeId = urlTokens[urlTokens.length - 1];
TubeServiceModel tubeServiceModel = this.tubeService.findById(tubeId);
tubeServiceModel.setStatus(TubeStatus.Approved);
TubeDetailsViewModel tubeDetailsViewModel = this.mapper.map(tubeServiceModel, TubeDetailsViewModel.class);
this.tubeService.updateTube(tubeServiceModel);
resp.sendRedirect("/admin/tube/pending");
}
}
|
[
"andrey_st_minev@yahoo.com"
] |
andrey_st_minev@yahoo.com
|
178818a5c3546e39a05cf69ecbe0ed14ae43d4b8
|
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
|
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_3518.java
|
6dade99c7345fb5bff2c4c09ca92d1040ed48746
|
[
"Apache-2.0"
] |
permissive
|
lesaint/experimenting-annotation-processing
|
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
|
1e9692ceb0d3d2cda709e06ccc13290262f51b39
|
refs/heads/master
| 2021-01-23T11:20:19.836331
| 2014-11-13T10:37:14
| 2014-11-13T10:37:14
| 26,336,984
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 151
|
java
|
package fr.javatronic.blog.massive.annotation1.sub1;
import fr.javatronic.blog.processor.Annotation_001;
@Annotation_001
public class Class_3518 {
}
|
[
"sebastien.lesaint@gmail.com"
] |
sebastien.lesaint@gmail.com
|
53a9fe1580de22ac9b5ad837823fa66d3e40366a
|
4e3c5dc1cfd033b0e7c1bea625f9ee64ae12871a
|
/com/google/android/gms/wearable/zzh.java
|
befd76f04e23ad773c9b3afe37a9499c581db229
|
[] |
no_license
|
haphan2014/idle_heroes
|
ced0f6301b7a618e470ebfa722bef3d4becdb6ba
|
5bcc66f8e26bf9273a2a8da2913c27a133b7d60a
|
refs/heads/master
| 2021-01-20T05:01:54.157508
| 2017-08-25T14:06:51
| 2017-08-25T14:06:51
| 101,409,563
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 237
|
java
|
package com.google.android.gms.wearable;
import com.google.android.gms.wearable.zza.zza;
public abstract class zzh extends WearableListenerService implements zza {
public void zza(zzb com_google_android_gms_wearable_zzb) {
}
}
|
[
"hien.bui@vietis.com.vn"
] |
hien.bui@vietis.com.vn
|
1b11c629f00c9db895848332cec030b35ac0e1c1
|
ceed8ee18ab314b40b3e5b170dceb9adedc39b1e
|
/android/vendor/fvd/package/Updater/src/com/softwinner/update/Widget/ExtendImageButton.java
|
b7a05194aa1db47ca66b122798ca5e0ddacf2e04
|
[] |
no_license
|
BPI-SINOVOIP/BPI-H3-New-Android7
|
c9906db06010ed6b86df53afb6e25f506ad3917c
|
111cb59a0770d080de7b30eb8b6398a545497080
|
refs/heads/master
| 2023-02-28T20:15:21.191551
| 2018-10-08T06:51:44
| 2018-10-08T06:51:44
| 132,708,249
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,020
|
java
|
package com.softwinner.update.Widget;
import com.softwinner.update.R;
import android.view.View;
import android.widget.ImageButton;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.ImageButton;
/**
* ExtendImageButton
* A button with text under
* @author yuguoxu
*/
public class ExtendImageButton extends ImageButton {
private static final String TAG = "ExtendImageButton";
private String _text = "";
private int _color = -1;
private float _textsize = 0f;
private Paint paint;
public ExtendImageButton(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs,
R.styleable.TextImageView);
_color = a.getColor(R.styleable.TextImageView_textColor,
0XFFFFFFFF);
_textsize = a.getDimension(R.styleable.TextImageView_textSize, 50);
_text = a.getString(R.styleable.TextImageView_text)==null?"":a.getString(R.styleable.TextImageView_text);
paint = new Paint();
a.recycle();
}
public void setText(String text){
this._text = text;
}
public void setColor(int color){
this._color = color;
}
public void setTextSize(float textsize){
this._textsize = textsize;
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
paint.setTextAlign(Align.CENTER);
paint.setColor(_color);
paint.setTextSize(_textsize);
canvas.drawText(_text, canvas.getWidth()/2, (canvas.getHeight()/2)+15, paint);
}
}
|
[
"Justin"
] |
Justin
|
29878a287867d276e60cafed403be837266f5935
|
bda27cf0d512f7e2146a6265aa46c62847a95b97
|
/plugins.henshin/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinDomainNavigatorItem.java
|
0569ff97298d863ba11c3323c5d4c016d2afae9b
|
[] |
no_license
|
repairvision/repairvision
|
330c3097b809f899908b38069afd48022e1c17f3
|
c2ada240864396cf565b8e05fc94069419c3a39f
|
refs/heads/master
| 2023-08-05T07:09:52.592134
| 2023-08-01T18:07:13
| 2023-08-01T18:07:13
| 179,548,075
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,139
|
java
|
/**
* <copyright>
* Copyright (c) 2010-2014 Henshin developers. All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* </copyright>
*/
package org.eclipse.emf.henshin.diagram.navigator;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.IPropertySourceProvider;
/**
* @generated
*/
public class HenshinDomainNavigatorItem extends PlatformObject {
/**
* @generated
*/
static {
final Class[] supportedTypes = new Class[] { EObject.class, IPropertySource.class };
Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adaptableObject instanceof org.eclipse.emf.henshin.diagram.navigator.HenshinDomainNavigatorItem) {
org.eclipse.emf.henshin.diagram.navigator.HenshinDomainNavigatorItem domainNavigatorItem = (org.eclipse.emf.henshin.diagram.navigator.HenshinDomainNavigatorItem) adaptableObject;
EObject eObject = domainNavigatorItem.getEObject();
if (adapterType == EObject.class) {
return eObject;
}
if (adapterType == IPropertySource.class) {
return domainNavigatorItem.getPropertySourceProvider().getPropertySource(eObject);
}
}
return null;
}
public Class[] getAdapterList() {
return supportedTypes;
}
}, org.eclipse.emf.henshin.diagram.navigator.HenshinDomainNavigatorItem.class);
}
/**
* @generated
*/
private Object myParent;
/**
* @generated
*/
private EObject myEObject;
/**
* @generated
*/
private IPropertySourceProvider myPropertySourceProvider;
/**
* @generated
*/
public HenshinDomainNavigatorItem(EObject eObject, Object parent, IPropertySourceProvider propertySourceProvider) {
myParent = parent;
myEObject = eObject;
myPropertySourceProvider = propertySourceProvider;
}
/**
* @generated
*/
public Object getParent() {
return myParent;
}
/**
* @generated
*/
public EObject getEObject() {
return myEObject;
}
/**
* @generated
*/
public IPropertySourceProvider getPropertySourceProvider() {
return myPropertySourceProvider;
}
/**
* @generated
*/
public boolean equals(Object obj) {
if (obj instanceof org.eclipse.emf.henshin.diagram.navigator.HenshinDomainNavigatorItem) {
return EcoreUtil.getURI(getEObject()).equals(
EcoreUtil.getURI(((org.eclipse.emf.henshin.diagram.navigator.HenshinDomainNavigatorItem) obj)
.getEObject()));
}
return super.equals(obj);
}
/**
* @generated
*/
public int hashCode() {
return EcoreUtil.getURI(getEObject()).hashCode();
}
}
|
[
"manuel.ohrndorf@gmx.net"
] |
manuel.ohrndorf@gmx.net
|
fe950cecb4278700149ee28522872d2ea87b37d5
|
225011bbc304c541f0170ef5b7ba09b967885e95
|
/com/moat/analytics/mobile/inm/ap.java
|
8823888cc60b0fc6be4e9950352c82d72b6ff6d1
|
[] |
no_license
|
sebaudracco/bubble
|
66536da5367f945ca3318fecc4a5f2e68c1df7ee
|
e282cda009dfc9422594b05c63e15f443ef093dc
|
refs/heads/master
| 2023-08-25T09:32:04.599322
| 2018-08-14T15:27:23
| 2018-08-14T15:27:23
| 140,444,001
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 150
|
java
|
package com.moat.analytics.mobile.inm;
public interface ap {
void mo6486a();
void mo6487b();
boolean mo6488c();
long mo6489d();
}
|
[
"sebaudracco@gmail.com"
] |
sebaudracco@gmail.com
|
002cb04d52e1e2cefc4db71eaa4f5eb8ff263f4c
|
da9b931be21d1f191aa062dfe47bc01fc9233c89
|
/testsuite/basic/src/test/java/io/smallrye/faulttolerance/async/noncompatible/NoncompatibleNonblockingHelloService.java
|
a0e243675f7bf287351f2032eb853ae79824e43e
|
[
"Apache-2.0"
] |
permissive
|
brunobat/smallrye-fault-tolerance
|
ece24b56d7ad40bbccb990b3ad439e9f938cc20d
|
009afb5483f63ec88545cf88ea7e7ce6440358f6
|
refs/heads/master
| 2023-01-07T13:27:00.255336
| 2022-07-07T11:29:01
| 2022-07-07T11:29:01
| 227,167,183
| 0
| 0
|
Apache-2.0
| 2022-12-29T13:12:16
| 2019-12-10T16:31:45
|
Java
|
UTF-8
|
Java
| false
| false
| 1,203
|
java
|
package io.smallrye.faulttolerance.async.noncompatible;
import static io.smallrye.faulttolerance.core.util.CompletionStages.failedFuture;
import static java.util.concurrent.CompletableFuture.completedFuture;
import java.util.concurrent.CompletionStage;
import javax.enterprise.context.ApplicationScoped;
import org.eclipse.microprofile.faulttolerance.Fallback;
@ApplicationScoped
public class NoncompatibleNonblockingHelloService {
private volatile Thread helloThread;
private volatile StackTraceElement[] helloStackTrace;
private volatile Thread fallbackThread;
@Fallback(fallbackMethod = "fallback")
public CompletionStage<String> hello() {
helloThread = Thread.currentThread();
helloStackTrace = new Throwable().getStackTrace();
return failedFuture(new RuntimeException());
}
public CompletionStage<String> fallback() {
fallbackThread = Thread.currentThread();
return completedFuture("hello");
}
Thread getHelloThread() {
return helloThread;
}
StackTraceElement[] getHelloStackTrace() {
return helloStackTrace;
}
Thread getFallbackThread() {
return fallbackThread;
}
}
|
[
"ladicek@gmail.com"
] |
ladicek@gmail.com
|
ab2bac8691829cbfa99cbed012f8c4887ddeba3f
|
172046997acc0175ff60546fea42502e99ff674c
|
/app/src/androidTest/java/com/ascend/wangfeng/udacityreviewer/ExampleInstrumentedTest.java
|
627945c0394783db33757db5018d52640122d008
|
[] |
no_license
|
wangfengye/UdacityReviewer
|
afca1f4959a35b36d62c3b9bf7cb24dffe62d54b
|
03f39955762c0c3958170c83729e887d7eecc608
|
refs/heads/master
| 2021-09-07T14:08:42.944814
| 2018-02-24T02:17:07
| 2018-02-24T02:17:07
| 115,512,417
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 771
|
java
|
package com.ascend.wangfeng.udacityreviewer;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.ascend.wangfeng.udacityreviewer", appContext.getPackageName());
}
}
|
[
"1040441325@qq.com"
] |
1040441325@qq.com
|
25dc30347ff499a43d8f8157836aa508f69c3756
|
d24de9be4c3993d9dc726e9a3c74d9662c470226
|
/reverse/Rocketbank_All_3.12.4_source_from_JADX/sources/kotlin/internal/jdk7/JDK7PlatformImplementations.java
|
12bb9d75d4df8e58fe90756b5f277071c7c6bcec
|
[] |
no_license
|
MEJIOMAH17/rocketbank-api
|
b18808ee4a2fdddd8b3045cd16655b0d82e0b13b
|
fc4eb0cbb4a8f52277fdb09a3b26b4cceef6ff79
|
refs/heads/master
| 2022-07-17T20:24:29.721131
| 2019-07-26T18:55:21
| 2019-07-26T18:55:21
| 198,698,231
| 4
| 0
| null | 2022-06-20T22:43:15
| 2019-07-24T19:31:49
|
Smali
|
UTF-8
|
Java
| false
| false
| 462
|
java
|
package kotlin.internal.jdk7;
import com.github.barteksc.pdfviewer.C1156R.drawable;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: JDK7PlatformImplementations.kt */
public class JDK7PlatformImplementations extends drawable {
public final void addSuppressed(Throwable th, Throwable th2) {
Intrinsics.checkParameterIsNotNull(th, "cause");
Intrinsics.checkParameterIsNotNull(th2, "exception");
th.addSuppressed(th2);
}
}
|
[
"mekosichkin.ru"
] |
mekosichkin.ru
|
023edd72e796c9a13f9183b92dc762705450b084
|
48ae8e24dfe5a8e099eb1ce2d14c9a24f48975cc
|
/Product/Production/Services/DocumentSubmissionCore/src/main/java/gov/hhs/fha/nhinc/docsubmission/entity/deferred/request/proxy/EntityDocSubmissionDeferredRequestProxyWebServiceUnsecuredImpl.java
|
d6157434427655e714eb7aab3d001380e28ad941
|
[
"BSD-3-Clause"
] |
permissive
|
CONNECT-Continuum/Continuum
|
f12394db3cc8b794fdfcb2cb3224e4a89f23c9d5
|
23acf3ea144c939905f82c59ffeff221efd9cc68
|
refs/heads/master
| 2022-12-16T15:04:50.675762
| 2019-09-07T16:14:08
| 2019-09-07T16:14:08
| 206,986,335
| 0
| 0
|
NOASSERTION
| 2022-12-05T23:32:14
| 2019-09-07T15:18:59
|
Java
|
UTF-8
|
Java
| false
| false
| 6,193
|
java
|
/*
* Copyright (c) 2009-2019, United States Government, as represented by the Secretary of Health and Human Services.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the United States Government nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package gov.hhs.fha.nhinc.docsubmission.entity.deferred.request.proxy;
import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType;
import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetCommunitiesType;
import gov.hhs.fha.nhinc.common.nhinccommon.UrlInfoType;
import gov.hhs.fha.nhinc.common.nhinccommonentity.RespondingGatewayProvideAndRegisterDocumentSetRequestType;
import gov.hhs.fha.nhinc.docsubmission.entity.deferred.request.proxy.service.EntityDocSubmissionDeferredRequestServicePortDescriptor;
import gov.hhs.fha.nhinc.event.error.ErrorEventException;
import gov.hhs.fha.nhinc.messaging.client.CONNECTClient;
import gov.hhs.fha.nhinc.messaging.client.CONNECTClientFactory;
import gov.hhs.fha.nhinc.messaging.service.port.ServicePortDescriptor;
import gov.hhs.fha.nhinc.nhincentityxdr.async.request.EntityXDRAsyncRequestPortType;
import gov.hhs.fha.nhinc.nhinclib.NhincConstants;
import gov.hhs.fha.nhinc.webserviceproxy.WebServiceProxyHelper;
import gov.hhs.healthit.nhin.XDRAcknowledgementType;
import ihe.iti.xds_b._2007.ProvideAndRegisterDocumentSetRequestType;
import oasis.names.tc.ebxml_regrep.xsd.rs._3.RegistryResponseType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author jhoppesc
*/
public class EntityDocSubmissionDeferredRequestProxyWebServiceUnsecuredImpl implements
EntityDocSubmissionDeferredRequestProxy {
private static final Logger LOG = LoggerFactory.getLogger(EntityDocSubmissionDeferredRequestProxyWebServiceUnsecuredImpl.class);
private WebServiceProxyHelper oProxyHelper = null;
public EntityDocSubmissionDeferredRequestProxyWebServiceUnsecuredImpl() {
oProxyHelper = createWebServiceProxyHelper();
}
protected WebServiceProxyHelper createWebServiceProxyHelper() {
return new WebServiceProxyHelper();
}
protected CONNECTClient<EntityXDRAsyncRequestPortType> getCONNECTClientUnsecured(
ServicePortDescriptor<EntityXDRAsyncRequestPortType> portDescriptor, String url, AssertionType assertion) {
return CONNECTClientFactory.getInstance().getCONNECTClientUnsecured(portDescriptor, url,
assertion);
}
@Override
public XDRAcknowledgementType provideAndRegisterDocumentSetBAsyncRequest(
ProvideAndRegisterDocumentSetRequestType request, AssertionType assertion,
NhinTargetCommunitiesType targets, UrlInfoType urlInfo) {
LOG.debug("Begin provideAndRegisterDocumentSetBAsyncRequest");
XDRAcknowledgementType response = null;
try {
String url = oProxyHelper.getUrlLocalHomeCommunity(NhincConstants.ENTITY_XDR_REQUEST_SERVICE_NAME);
if (request == null) {
throw new IllegalArgumentException("Request Message must be provided");
} else if (assertion == null) {
throw new IllegalArgumentException("Assertion must be provided");
} else if (targets == null) {
throw new IllegalArgumentException("Target Communities must be provided");
} else {
RespondingGatewayProvideAndRegisterDocumentSetRequestType msg =
new RespondingGatewayProvideAndRegisterDocumentSetRequestType();
msg.setProvideAndRegisterDocumentSetRequest(request);
msg.setAssertion(assertion);
msg.setNhinTargetCommunities(targets);
if (urlInfo != null) {
msg.setUrl(urlInfo);
}
ServicePortDescriptor<EntityXDRAsyncRequestPortType> portDescriptor =
new EntityDocSubmissionDeferredRequestServicePortDescriptor();
CONNECTClient<EntityXDRAsyncRequestPortType> client = getCONNECTClientUnsecured(portDescriptor, url,
assertion);
response = (XDRAcknowledgementType) client.invokePort(EntityXDRAsyncRequestPortType.class,
"provideAndRegisterDocumentSetBAsyncRequest", msg);
}
} catch (Exception ex) {
response = new XDRAcknowledgementType();
RegistryResponseType regResp = new RegistryResponseType();
regResp.setStatus(NhincConstants.XDR_ACK_FAILURE_STATUS_MSG);
response.setMessage(regResp);
throw new ErrorEventException(ex, response, "Unable to call Doc Submission Entity Deferred Request");
}
LOG.debug("End provideAndRegisterDocumentSetBAsyncRequest");
return response;
}
}
|
[
"minh-hai.nguyen@cgi.com"
] |
minh-hai.nguyen@cgi.com
|
47d108cf9efdcab91311cccdf6acc313be70f58f
|
8e44a9366800872e6147a027b61b9e07636da2ad
|
/l2j_datapack/dist/game/data/scripts/ai/npc/NpcBuffers/NpcBufferSkillData.java
|
9742283e21d84f45347a643f604c896524304efa
|
[
"MIT"
] |
permissive
|
RollingSoftware/L2J_HighFive_Hardcore
|
6980a5e0f8111418bdc2739dd9f8b8abbc22aeff
|
c80436c130c795c590ce454835b9323162bec52b
|
refs/heads/master
| 2022-08-18T11:14:45.674987
| 2022-07-24T09:02:38
| 2022-07-24T09:02:38
| 120,417,466
| 0
| 0
|
MIT
| 2018-02-10T17:38:27
| 2018-02-06T07:25:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,956
|
java
|
/*
* Copyright (C) 2004-2016 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack 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, see <http://www.gnu.org/licenses/>.
*/
package ai.npc.NpcBuffers;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.gameserver.model.skills.targets.AffectObject;
import com.l2jserver.gameserver.model.skills.targets.AffectScope;
/**
* @author UnAfraid
*/
public class NpcBufferSkillData
{
private final SkillHolder _skill;
private final int _initialDelay;
private final int _delay;
private final AffectScope _affectScope;
private final AffectObject _affectObject;
public NpcBufferSkillData(StatsSet set)
{
_skill = new SkillHolder(set.getInt("id"), set.getInt("level"));
_initialDelay = set.getInt("initialDelay", 0) * 1000;
_delay = set.getInt("delay") * 1000;
_affectScope = set.getEnum("affectScope", AffectScope.class);
_affectObject = set.getEnum("affectObject", AffectObject.class);
}
public Skill getSkill()
{
return _skill.getSkill();
}
public int getInitialDelay()
{
return _initialDelay;
}
public int getDelay()
{
return _delay;
}
public AffectScope getAffectScope()
{
return _affectScope;
}
public AffectObject getAffectObject()
{
return _affectObject;
}
}
|
[
"zolotaryov.v.g@gmail.com"
] |
zolotaryov.v.g@gmail.com
|
f8527aad9786aa8d22903f7d13de9a646ee9189a
|
86b105652e2add8bbf5386872ec59b23dc52d365
|
/app/src/main/java/com/technuoma/bonpizzadriver/ordersPOJO/Datum.java
|
27160279d5a4ecf0db34cf42bc2b75a123136aa6
|
[] |
no_license
|
mukulraw/bonpizzadriver
|
e62dc9b96dedb2209e57eca283e220b05f77b0f3
|
7d2b5465b8e0b6a798afeda204a9ca24875a7121
|
refs/heads/master
| 2022-12-22T22:05:04.034625
| 2020-10-04T04:05:06
| 2020-10-04T04:05:06
| 292,466,808
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,713
|
java
|
package com.technuoma.bonpizzadriver.ordersPOJO;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Datum {
@SerializedName("order_id")
@Expose
private String orderId;
@SerializedName("del_id")
@Expose
private String delId;
@SerializedName("amount")
@Expose
private String amount;
@SerializedName("txn")
@Expose
private String txn;
@SerializedName("name")
@Expose
private String name;
@SerializedName("phone")
@Expose
private String phone;
@SerializedName("address")
@Expose
private String address;
@SerializedName("status")
@Expose
private String status;
@SerializedName("pay_mode")
@Expose
private String payMode;
@SerializedName("slot")
@Expose
private String slot;
@SerializedName("created")
@Expose
private String created;
@SerializedName("delivery_date")
@Expose
private String deliveryDate;
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getDelId() {
return delId;
}
public void setDelId(String delId) {
this.delId = delId;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getTxn() {
return txn;
}
public void setTxn(String txn) {
this.txn = txn;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getPayMode() {
return payMode;
}
public void setPayMode(String payMode) {
this.payMode = payMode;
}
public String getSlot() {
return slot;
}
public void setSlot(String slot) {
this.slot = slot;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getDeliveryDate() {
return deliveryDate;
}
public void setDeliveryDate(String deliveryDate) {
this.deliveryDate = deliveryDate;
}
}
|
[
"mukulraw199517@gmail.com"
] |
mukulraw199517@gmail.com
|
1002386fd614ac91e68b91f1c1febdfb011166ca
|
6f7a67c4e872f8a80679552c008430fbe8571718
|
/src/generated/java/com/sphenon/basics/quantities/tplinst/Filter_Optional_int__.java
|
1f7c82af872b05a9167c9e794263b3812e4b7a5e
|
[
"Apache-2.0"
] |
permissive
|
616c/java-com.sphenon.components.basics.quantities
|
bc1b88e2bdf5854385b43bf91618f8a345bf36ae
|
6896b07649dfa53e492edf9418deb7688573734e
|
refs/heads/master
| 2020-03-22T12:20:29.559821
| 2018-07-06T22:27:03
| 2018-07-06T22:27:03
| 140,034,139
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,553
|
java
|
// instantiated with javainst.pl from /workspace/sphenon/projects/components/basics/retriever/v0001/origin/source/java/com/sphenon/basics/retriever/templates/Filter.javatpl
/****************************************************************************
Copyright 2001-2018 Sphenon GmbH
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.
*****************************************************************************/
// please do not modify this file directly
package com.sphenon.basics.quantities.tplinst;
import com.sphenon.basics.quantities.*;
import com.sphenon.basics.retriever.*;
import com.sphenon.basics.retriever.tplinst.*;
import com.sphenon.basics.factory.*;
import com.sphenon.basics.many.*;
import java.util.Date;
import com.sphenon.basics.validation.returncodes.*;
import com.sphenon.basics.locating.*;
import com.sphenon.basics.context.*;
import com.sphenon.basics.exception.*;
import com.sphenon.basics.retriever.*;
public interface Filter_Optional_int__
extends Filter
{
public boolean matches (CallContext context, Optional_int_ object);
}
|
[
"adev@leue.net"
] |
adev@leue.net
|
a61bd13fb5f5a028075c61aab46fdf564dbd0b5e
|
b0e21ec497802f56df884f9dee7f68cd036eb2bb
|
/scim-model/src/main/java/org/gluu/oxtrust/model/scim2/util/DateUtil.java
|
c16975b92e3d19d54d6ac7473d92b0e510b369ea
|
[
"Apache-2.0"
] |
permissive
|
GluuFederation/scim
|
ad577a9f565332c23f7d5d91536419dbae573e7b
|
d343b2f28b58c529943527fc4c1596cb5983f397
|
refs/heads/master
| 2023-08-21T06:50:47.922325
| 2023-07-25T19:15:57
| 2023-07-25T19:15:57
| 247,885,689
| 12
| 9
|
Apache-2.0
| 2023-08-09T07:03:30
| 2020-03-17T05:19:52
|
Java
|
UTF-8
|
Java
| false
| false
| 4,508
|
java
|
/*
* oxTrust is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
*
* Copyright (c) 2017, Gluu
*/
package org.gluu.oxtrust.model.scim2.util;
import com.unboundid.util.StaticUtils;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;
import java.util.Optional;
import java.util.TimeZone;
/**
* Contains helper methods to convert between dates in ISO format and LDAP generalized time syntax.
* <p>Examples of ISO-formated dates:</p>
* <ul>
* <li>2011-12-03T10:15:30</li>
* <li>2011-12-03T10:15:30.4+01:00</li>
* </ul>
* <p>Equivalent dates in generalized time format:</p>
* <ul>
* <li>20111203101530.000Z</li>
* <li>20111203111530.400Z</li>
* </ul>
*/
/*
* Created by jgomer on 2017-08-23.
*/
public class DateUtil {
private DateUtil() {
}
public static Long ISOToMillis(String strDate) {
TemporalAccessor ta;
try {
ta = ZonedDateTime.parse(strDate);
} catch (Exception e) {
try {
LocalDateTime.parse(strDate);
//Assume local zone...
String zoneId = ZoneOffset.ofTotalSeconds(TimeZone.getDefault().getRawOffset() / 1000).toString();
ta = ZonedDateTime.parse(strDate + zoneId);
} catch (Exception e1) {
return null;
}
}
try {
return Instant.from(ta).toEpochMilli();
} catch (Exception e) {
return null;
}
}
/**
* Converts a string representation of a date (expected to follow the pattern of DateTime XML schema data type) to a
* string representation of a date in LDAP generalized time syntax (see RFC 4517 section 3.3.13).
* <p><code>xsd:dateTime</code> is equivalent to ISO-8601 format, namely, <code>yyyy-MM-dd'T'HH:mm:ss.SSSZZ</code></p>
*
* @param strDate A string date in ISO format.
* @return A String representing a date in generalized time syntax. If the date passed as parameter did not adhere to
* xsd:dateTime, the returned value is null
*/
public static String ISOToGeneralizedStringDate(String strDate) {
return Optional.ofNullable(ISOToMillis(strDate)).map(StaticUtils::encodeGeneralizedTime).orElse(null);
}
/**
* Converts a string representing a date (in the LDAP generalized time syntax) to an ISO-8601 formatted string date.
*
* @param strDate A string date in generalized time syntax (see RFC 4517 section 3.3.13)
* @return A string representation of a date in ISO format. If the date passed as parameter did not adhere to generalized
* time syntax, null is returned.
*/
public static String generalizedToISOStringDate(String strDate) {
try {
return millisToISOString(StaticUtils.decodeGeneralizedTime(strDate).getTime());
} catch (Exception e) {
return null;
}
}
/**
* Returns a string representation of a date in ISO format based on a number of milliseconds elapsed from "the epoch",
* namely January 1, 1970, 00:00:00 GMT.
*
* @param millis Number of milliseconds
* @return An ISO-formatted string date
*/
public static String millisToISOString(long millis) {
//Useful for SCIM-client
return Instant.ofEpochMilli(millis).toString();
}
/**
* Takes an ISO date and converts to one in UTC+0 time zone (but he timezone suffix/offset is supressed in the result)
* @param value A string representing a date in ISO-8601, eg 2007-12-03T10:15:30+01:00
* @return A string representing the same input date (eg 2007-12-03T09:15:30)
*/
public static String gluuCouchbaseISODate(String value) {
try {
String gluuISODate = ZonedDateTime.parse(value).format(DateTimeFormatter.ISO_INSTANT);
return gluuISODate.substring(0, gluuISODate.length() - 1); // Drop Z
//What? ask yurem...
//https://github.com/GluuFederation/oxCore/commit/ed24e0d4387076b0089a86246c6ac82fcac14c4a
} catch (Exception e) {
try {
LocalDateTime.parse(value);
//already in required format
return value;
} catch (Exception e1) {
return null;
}
}
}
}
|
[
"bonustrack310@gmail.com"
] |
bonustrack310@gmail.com
|
95154f5fc3560b645bfc66be70e594a9bc278fa1
|
e5dc7ee6dccb9d83741c54b13f30f4af1e417d2c
|
/work_algo/algorithm/src/baekjoon/bj17825_주사위윷놀이/주사위윷놀이.java
|
6ae4d93108634755d8c330899aff5d6a2303747d
|
[] |
no_license
|
JeongJunHo/algorithm
|
a68d06882215f2c7328fa7a7efbd67cda02f9c18
|
182d27bd2220f063d24ed07b0852fbdbcab99fe8
|
refs/heads/master
| 2022-03-14T09:00:28.173294
| 2019-11-30T15:24:09
| 2019-11-30T15:24:09
| 197,900,634
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,483
|
java
|
package baekjoon.bj17825_주사위윷놀이;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class 주사위윷놀이 {
static int[][] map = {{},{0,13,16,19,25,30,35,40},{0,22,24,25,30,35,40},{0,28,27,26,25,30,35,40}};
static boolean[] visited;
static int[] move = new int[10];
static int ans;
static class Horse{
int mapType;
int place;
public Horse(int mapType, int idx) {
super();
this.mapType = mapType;
this.place = idx;
}
@Override
public String toString() {
return "Horse [mapType=" + mapType + ", place=" + place + "]";
}
}
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
for (int i = 0; i < move.length; i++) {
move[i] = Integer.parseInt(st.nextToken());
}
map[0] = new int[21];
for (int i = 1, num = 2; i < map[0].length; i++, num+=2) {
map[0][i] = num;
}
perm_re(new int[10], 0);
System.out.println(ans);
}
private static void perm_re(int[] sel, int idx) {
if(sel.length == idx) {
Horse[] arr = new Horse[4];
visited = new boolean[41];
int sum = 0;
for (int i = 0; i < arr.length; i++) {
arr[i] = new Horse(0, 0);
}
for (int i = 0; i < sel.length; i++) {
Horse horse = arr[sel[i]];
if(horse.place == map[horse.mapType].length-1) return;
visited[map[horse.mapType][horse.place]] = false;
if(horse.mapType == 0 && horse.place != 0 && horse.place % 5 == 0) {
horse.mapType = horse.place / 5;
horse.place = 0;
}
horse.place += move[i];
if(horse.place >= map[horse.mapType].length-1) {
horse.place = map[horse.mapType].length-1;
sum += map[horse.mapType][horse.place];
continue;
}
if(visited[map[horse.mapType][horse.place]]) {
continue;
}
visited[map[horse.mapType][horse.place]] = true;
// System.out.println(horse);
// System.out.println("바닥점수 : " + map[horse.mapType][horse.place]);
sum += map[horse.mapType][horse.place];
}
if(sum == 212) {
System.out.println(Arrays.toString(sel));
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i]);
}
}
ans = Math.max(ans, sum);
return;
}
for (int i = 0; i < 4; i++) {
sel[idx] = i;
perm_re(sel, idx+1);
}
}
}
|
[
"jjh49470826@gmail.com"
] |
jjh49470826@gmail.com
|
b28b6597c7de2c6c42f5ea7d3732eabb21fdc281
|
9fffaf3c89aac791f5cd3ea7fecbe6a5227c0749
|
/src/org/omegat/tokenizer/LuceneBasqueTokenizer.java
|
57c0359ca521264cb78ba44be3de39eeac0010ab
|
[] |
no_license
|
5t111111/omegat
|
a8e7997ac2218efa48f42533127ae7cc95c2bcd2
|
7f51955f7b9b8ef9e88a22440e99a47e59dbfba5
|
refs/heads/master
| 2021-01-13T00:38:33.319330
| 2015-12-05T07:19:09
| 2015-12-05T07:19:09
| 47,446,713
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,177
|
java
|
/**************************************************************************
OmegaT - Computer Assisted Translation (CAT) tool
with fuzzy matching, translation memory, keyword search,
glossaries, and translation leveraging into updated projects.
Copyright (C) 2013 Aaron Madlon-Kay
Home page: http://www.omegat.org/
Support center: http://groups.yahoo.com/group/OmegaT/
This file is part of OmegaT.
OmegaT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OmegaT 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, see <http://www.gnu.org/licenses/>.
**************************************************************************/
package org.omegat.tokenizer;
import java.io.StringReader;
import java.util.Collections;
import java.util.Set;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.eu.BasqueAnalyzer;
import org.apache.lucene.analysis.standard.StandardTokenizer;
/**
* @author Aaron Madlon-Kay
*/
@Tokenizer(languages = { "eu" })
public class LuceneBasqueTokenizer extends BaseTokenizer {
@Override
protected TokenStream getTokenStream(final String strOrig,
final boolean stemsAllowed, final boolean stopWordsAllowed) {
if (stemsAllowed) {
Set<?> stopWords = stopWordsAllowed ? BasqueAnalyzer.getDefaultStopSet()
: Collections.EMPTY_SET;
return new BasqueAnalyzer(getBehavior(), stopWords).tokenStream("",
new StringReader(strOrig));
} else {
return new StandardTokenizer(getBehavior(),
new StringReader(strOrig));
}
}
}
|
[
"baenej@gmail.com"
] |
baenej@gmail.com
|
b75647361ac84e45210408c6ee675ce740ae7a27
|
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
|
/src/com/inponsel/android/v2/HomeNewMainActivity$12.java
|
231d88df645af2bd513dda2cb1f1a5ca88e6e5b2
|
[] |
no_license
|
alexivaner/GadgetX-Android-App
|
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
|
26c5866be12da7b89447814c05708636483bf366
|
refs/heads/master
| 2022-06-01T09:04:32.347786
| 2020-04-30T17:43:17
| 2020-04-30T17:43:17
| 260,275,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 795
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.inponsel.android.v2;
import android.content.Intent;
import android.view.View;
// Referenced classes of package com.inponsel.android.v2:
// HomeNewMainActivity, ProfileActivity
class this._cls0
implements android.view.ctivity._cls12
{
final HomeNewMainActivity this$0;
public void onClick(View view)
{
i = new Intent(getApplicationContext(), com/inponsel/android/v2/ProfileActivity);
startActivityForResult(i, 0);
overridePendingTransition(0x7f040003, 0x7f040004);
}
()
{
this$0 = HomeNewMainActivity.this;
super();
}
}
|
[
"hutomoivan@gmail.com"
] |
hutomoivan@gmail.com
|
2b2eea863ed0baafdd9410889c93dffa8b882519
|
6e9fdce5408b7d169ce73a3b3a7df5cc00c56d94
|
/src/main/java/com/dbkj/account/dto/LogDto.java
|
48b9d28cdf50ad54b518819544991e5582302c7f
|
[] |
no_license
|
dbkjaccountsys/AccountSys
|
34a9fbbdceb935478381f7f8638c902e1aeb167e
|
6e9bfdc21293fc7c2efe479fd7dd5cc618c78860
|
refs/heads/master
| 2021-01-21T09:10:56.211755
| 2017-09-18T05:11:25
| 2017-09-18T05:11:25
| 101,965,932
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,912
|
java
|
package com.dbkj.account.dto;
public class LogDto {
private Long id;
private String userType;
private Long userId;
private String username;
private String time;
private String ip;
private String content;
private String operaType;
private String operaResult;
private String exceptionMsg;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getOperaType() {
return operaType;
}
public void setOperaType(String operaType) {
this.operaType = operaType;
}
public String getOperaResult() {
return operaResult;
}
public void setOperaResult(String operaResult) {
this.operaResult = operaResult;
}
public String getExceptionMsg() {
return exceptionMsg;
}
public void setExceptionMsg(String exceptionMsg) {
this.exceptionMsg = exceptionMsg;
}
@Override
public String toString() {
return "LogDto [id=" + id + ", userType=" + userType + ", userId=" + userId + ", username=" + username
+ ", time=" + time + ", ip=" + ip + ", content=" + content + ", operaType=" + operaType
+ ", operaResult=" + operaResult + ", exceptionMsg=" + exceptionMsg + "]";
}
}
|
[
"373413704@qq.com"
] |
373413704@qq.com
|
eb55257bed6006c6bb58c36e601900e2c7df7dff
|
f3bf4e9c33098dfc98332775881493d65349810d
|
/DesignPatterns/Chapter11_ProxyPattern/ProxyPattern/src/com/proxypattern/rmi_helloworld/MyRemote.java
|
7f44ea80df3ccde8e15900cd5f59c2c2b4138a32
|
[] |
no_license
|
tomekb82/JavaProjects
|
588ffe29e79e0999413ee9fd0d8a9596ecd6ef0b
|
88ed90da4f3bb930962002da22a46dad9b2ef6ca
|
refs/heads/master
| 2021-01-01T18:29:21.055062
| 2015-11-20T00:21:53
| 2015-11-20T00:21:53
| 20,363,504
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 159
|
java
|
package com.proxypattern.rmi_helloworld;
import java.rmi.*;
public interface MyRemote extends Remote{
public String sayHello() throws RemoteException;
}
|
[
"tomasz.belina@qualent.eu"
] |
tomasz.belina@qualent.eu
|
1320411370be9c6a33c68cd898c994809e2f0cbd
|
173a7e3c1d4b34193aaee905beceee6e34450e35
|
/kmzyc-promotion/kmzyc-promotion-web/src/main/java/com/kmzyc/promotion/app/dao/impl/ViewSkuAttrDAOImpl.java
|
664219a435b7b5995cf0ecadbfa37929fbc5ffe3
|
[] |
no_license
|
jjmnbv/km_dev
|
d4fc9ee59476248941a2bc99a42d57fe13ca1614
|
f05f4a61326957decc2fc0b8e06e7b106efc96d4
|
refs/heads/master
| 2020-03-31T20:03:47.655507
| 2017-05-26T10:01:56
| 2017-05-26T10:01:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,197
|
java
|
package com.kmzyc.promotion.app.dao.impl;
import java.sql.SQLException;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.kmzyc.promotion.app.dao.BaseDao;
import com.kmzyc.promotion.app.dao.ViewSkuAttrDAO;
import com.kmzyc.promotion.app.vobject.ViewSkuAttr;
import com.kmzyc.promotion.app.vobject.ViewSkuAttrExample;
/**
* SKU关联属性视图
*
* @author tanyunxing
*
*/
@Repository("viewSkuAttrDao")
@SuppressWarnings({"unchecked", "unused"})
public class ViewSkuAttrDAOImpl extends BaseDao implements ViewSkuAttrDAO {
/**
* This method was generated by Apache iBATIS ibator. This method corresponds to the database
* table VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
public ViewSkuAttrDAOImpl() {
super();
}
/**
* This method was generated by Apache iBATIS ibator. This method corresponds to the database
* table VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
@Override
public int countByExample(ViewSkuAttrExample example) throws SQLException {
// mkw 20150819 add
// end
Integer count =
(Integer) sqlMapClient.queryForObject("VIEW_SKU_ATTR.ibatorgenerated_countByExample",
example);
return count.intValue();
}
/**
* This method was generated by Apache iBATIS ibator. This method corresponds to the database
* table VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
@Override
public int deleteByExample(ViewSkuAttrExample example) throws SQLException {
// mkw 20150819 add
// end
int rows = sqlMapClient.delete("VIEW_SKU_ATTR.ibatorgenerated_deleteByExample", example);
return rows;
}
/**
* This method was generated by Apache iBATIS ibator. This method corresponds to the database
* table VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
@Override
public void insert(ViewSkuAttr record) throws SQLException {
// mkw 20150819 add
// end
sqlMapClient.insert("VIEW_SKU_ATTR.ibatorgenerated_insert", record);
}
/**
* This method was generated by Apache iBATIS ibator. This method corresponds to the database
* table VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
@Override
public void insertSelective(ViewSkuAttr record) throws SQLException {
// mkw 20150819 add
// end
sqlMapClient.insert("VIEW_SKU_ATTR.ibatorgenerated_insertSelective", record);
}
/**
* This method was generated by Apache iBATIS ibator. This method corresponds to the database
* table VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
@Override
public List selectByExample(ViewSkuAttrExample example) throws SQLException {
// mkw 20150819 add
// end
List list = sqlMapClient.queryForList("VIEW_SKU_ATTR.ibatorgenerated_selectByExample", example);
return list;
}
/**
* This method was generated by Apache iBATIS ibator. This method corresponds to the database
* table VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
@Override
public int updateByExampleSelective(ViewSkuAttr record, ViewSkuAttrExample example)
throws SQLException {
// mkw 20150819 add
// end
UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
int rows = sqlMapClient.update("VIEW_SKU_ATTR.ibatorgenerated_updateByExampleSelective", parms);
return rows;
}
/**
* This method was generated by Apache iBATIS ibator. This method corresponds to the database
* table VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
@Override
public int updateByExample(ViewSkuAttr record, ViewSkuAttrExample example) throws SQLException {
// mkw 20150819 add
// end
UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
int rows = sqlMapClient.update("VIEW_SKU_ATTR.ibatorgenerated_updateByExample", parms);
return rows;
}
/**
* This class was generated by Apache iBATIS ibator. This class corresponds to the database table
* VIEW_SKU_ATTR
*
* @ibatorgenerated Thu Aug 01 17:46:25 CST 2013
*/
private static class UpdateByExampleParms extends ViewSkuAttrExample {
private final Object record;
public UpdateByExampleParms(Object record, ViewSkuAttrExample example) {
super(example);
this.record = record;
}
public Object getRecord() {
return record;
}
}
@Override
public Long selectByAttrIdAndValueId(ViewSkuAttrExample example) throws SQLException {
// mkw 20150819 add
// end
Object obj = sqlMapClient.queryForObject("VIEW_SKU_ATTR.findSkuIdByAttrAndValue", example);
return (Long) obj;
}
@Override
public List<ViewSkuAttr> findProductAttrAndValueByProductId(Long productId) throws SQLException {
// mkw 20150819 add
// end
return sqlMapClient.queryForList("VIEW_SKU_ATTR.queryProductAttrAndValue", productId);
}
}
|
[
"luoxinyu@km.com"
] |
luoxinyu@km.com
|
ec050b34f7c848ef13d1e2bb639f64b994e14cc4
|
a27200e503d1604164f7cc82129433c7a07d8356
|
/Chapter3/GL RECTANGLE/src/com/apress/android/glrectangle/Main.java
|
9b450b710f4bcf35678a7015600ab1bbf7ee3294
|
[] |
no_license
|
CatDroid/learn-opengl-es
|
9a1920bf58fc1caeb88c59635ef883c20439fa41
|
9e4ba0e9e62dfd81bdbac22f9ea28ccf29dfbef3
|
refs/heads/master
| 2021-05-01T07:02:28.955892
| 2017-03-26T12:17:59
| 2017-03-26T12:17:59
| 79,638,461
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 485
|
java
|
package com.apress.android.glrectangle;
import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
public class Main extends Activity {
private GLSurfaceView _surfaceView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
_surfaceView = new GLSurfaceView(this);
_surfaceView.setEGLContextClientVersion(2);
_surfaceView.setRenderer(new GLES20Renderer());
setContentView(_surfaceView);
}
}
|
[
"1198432354@qq.com"
] |
1198432354@qq.com
|
1233f91a62b3fdd969fe9dbc55a5aa1ba8d9cd17
|
dff87e0aeab85d4e41cd7850dc2b159262a28468
|
/library/src/main/java/com/example/library/nuxom/jaxen/function/BooleanFunction.java
|
7955feaffe7b26b8eedd208ef200dd4b43ff2e67
|
[] |
no_license
|
BlueJack1984/hardware
|
1df14cfe5b105cd442ce8c2ad7810e98df705443
|
fbc2fc0d6f50baf0040275b3428f8558705194a8
|
refs/heads/master
| 2022-06-21T21:22:11.197071
| 2019-10-15T11:28:34
| 2019-10-15T11:28:34
| 211,654,177
| 0
| 0
| null | 2022-06-17T02:33:08
| 2019-09-29T11:43:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,341
|
java
|
package com.example.library.nuxom.jaxen.function;
import nu.xom.jaxen.Context;
import nu.xom.jaxen.Function;
import nu.xom.jaxen.FunctionCallException;
import nu.xom.jaxen.Navigator;
import java.util.List;
public class BooleanFunction implements Function {
public BooleanFunction() {
}
public Object call(Context var1, List var2) throws FunctionCallException {
if (var2.size() == 1) {
return evaluate(var2.get(0), var1.getNavigator());
} else {
throw new FunctionCallException("boolean() requires one argument");
}
}
public static Boolean evaluate(Object var0, Navigator var1) {
if (var0 instanceof List) {
List var2 = (List)var0;
if (var2.size() == 0) {
return Boolean.FALSE;
}
var0 = var2.get(0);
}
if (var0 instanceof Boolean) {
return (Boolean)var0;
} else if (var0 instanceof Number) {
double var3 = ((Number)var0).doubleValue();
return var3 != 0.0D && !Double.isNaN(var3) ? Boolean.TRUE : Boolean.FALSE;
} else if (var0 instanceof String) {
return ((String)var0).length() > 0 ? Boolean.TRUE : Boolean.FALSE;
} else {
return var0 != null ? Boolean.TRUE : Boolean.FALSE;
}
}
}
|
[
"lushushen8@163.com"
] |
lushushen8@163.com
|
8e16697f40383adeb9f6bf8b967320f75d163545
|
519de3b9fca2d6f905e7f3498884094546432c30
|
/kk-4.x/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/channel/RemoteAcceptThread.java
|
b9eefd98e161bd3336d184de4f33b1bd24341849
|
[
"MIT",
"BSD-3-Clause"
] |
permissive
|
hongshui3000/mt5507_android_4.4
|
2324e078190b97afbc7ceca22ec1b87b9367f52a
|
880d4424989cf91f690ca187d6f0343df047da4f
|
refs/heads/master
| 2020-03-24T10:34:21.213134
| 2016-02-24T05:57:53
| 2016-02-24T05:57:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,571
|
java
|
/*
* Copyright (c) 2006-2011 Christian Plattner. All rights reserved.
* Please refer to the LICENSE.txt for licensing details.
*/
package ch.ethz.ssh2.channel;
import java.io.IOException;
import java.net.Socket;
import ch.ethz.ssh2.log.Logger;
/**
* RemoteAcceptThread.
*
* @author Christian Plattner
* @version $Id: //DTV/MP_BR/DTV_X_IDTV0801_002298_3_001/android/kk-4.x/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/channel/RemoteAcceptThread.java#1 $
*/
public class RemoteAcceptThread extends Thread
{
private static final Logger log = Logger.getLogger(RemoteAcceptThread.class);
Channel c;
String remoteConnectedAddress;
int remoteConnectedPort;
String remoteOriginatorAddress;
int remoteOriginatorPort;
String targetAddress;
int targetPort;
Socket s;
public RemoteAcceptThread(Channel c, String remoteConnectedAddress, int remoteConnectedPort,
String remoteOriginatorAddress, int remoteOriginatorPort, String targetAddress, int targetPort)
{
this.c = c;
this.remoteConnectedAddress = remoteConnectedAddress;
this.remoteConnectedPort = remoteConnectedPort;
this.remoteOriginatorAddress = remoteOriginatorAddress;
this.remoteOriginatorPort = remoteOriginatorPort;
this.targetAddress = targetAddress;
this.targetPort = targetPort;
log.debug("RemoteAcceptThread: " + remoteConnectedAddress + "/" + remoteConnectedPort + ", R: "
+ remoteOriginatorAddress + "/" + remoteOriginatorPort);
}
@Override
public void run()
{
try
{
c.cm.sendOpenConfirmation(c);
s = new Socket(targetAddress, targetPort);
StreamForwarder r2l = new StreamForwarder(c, null, null, c.getStdoutStream(), s.getOutputStream(),
"RemoteToLocal");
StreamForwarder l2r = new StreamForwarder(c, null, null, s.getInputStream(), c.getStdinStream(),
"LocalToRemote");
/* No need to start two threads, one can be executed in the current thread */
r2l.setDaemon(true);
r2l.start();
l2r.run();
while (r2l.isAlive())
{
try
{
r2l.join();
}
catch (InterruptedException ignored)
{
}
}
/* If the channel is already closed, then this is a no-op */
c.cm.closeChannel(c, "EOF on both streams reached.", true);
s.close();
}
catch (IOException e)
{
log.warning("IOException in proxy code: " + e.getMessage());
try
{
c.cm.closeChannel(c, "IOException in proxy code (" + e.getMessage() + ")", true);
}
catch (IOException ignored)
{
}
try
{
if (s != null)
s.close();
}
catch (IOException ignored)
{
}
}
}
}
|
[
"342981011@qq.com"
] |
342981011@qq.com
|
15f33c9ffaaa1d3e2e66141d29019aef25b0b12c
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2017/12/ExplicitIndexProviderLookup.java
|
180e7e87a558f607b76e1090733fd85991c4f409
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 1,220
|
java
|
/*
* Copyright (c) 2002-2017 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.api;
import java.util.function.Function;
import org.neo4j.kernel.spi.explicitindex.IndexImplementation;
/**
* Looks up an {@link IndexImplementation} given a name.
*/
public interface ExplicitIndexProviderLookup extends Function<String,IndexImplementation>
{
/**
* @return all known {@link IndexImplementation} instances in use.
*/
Iterable<IndexImplementation> all();
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
40644c0cb4898fb2977a796c8e7fcb65febbbe75
|
b2f07f3e27b2162b5ee6896814f96c59c2c17405
|
/org/omg/CORBA/BAD_POLICY_VALUE.java
|
d1afe428c631236db21e7addb947319214837a84
|
[] |
no_license
|
weiju-xi/RT-JAR-CODE
|
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
|
d5b2590518ffb83596a3aa3849249cf871ab6d4e
|
refs/heads/master
| 2021-09-08T02:36:06.675911
| 2018-03-06T05:27:49
| 2018-03-06T05:27:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 269
|
java
|
package org.omg.CORBA;
public abstract interface BAD_POLICY_VALUE
{
public static final short value = 3;
}
/* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar
* Qualified Name: org.omg.CORBA.BAD_POLICY_VALUE
* JD-Core Version: 0.6.2
*/
|
[
"yuexiahandao@gmail.com"
] |
yuexiahandao@gmail.com
|
0322028aa931f506d3f0eace116ef66a4ee7a715
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/util/string/TelephoneTest.java
|
04c734074eeab1301b1a73cd829ccf886d84a1d3
|
[] |
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
| 947
|
java
|
package irvine.util.string;
import junit.framework.TestCase;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class TelephoneTest extends TestCase {
public void testDial() {
assertEquals(6, Telephone.dial('o'));
assertEquals(6, Telephone.dial('n'));
assertEquals(3, Telephone.dial('e'));
assertEquals(8, Telephone.dial('T'));
assertEquals(9, Telephone.dial('W'));
assertEquals(7, Telephone.dial('R'));
assertEquals(2, Telephone.dial('A'));
assertEquals(2, Telephone.dial('a'));
assertEquals(9, Telephone.dial('Z'));
assertEquals(9, Telephone.dial('z'));
assertEquals(0, Telephone.dial('0'));
assertEquals(-1, Telephone.dial(' '));
}
public void testDialString() {
assertEquals("663", Telephone.dial("O-ne"));
assertEquals("84733", Telephone.dial(" *thrEE\n"));
}
public void testDialSum() {
assertEquals(26, Telephone.dialSum("HOBBIT!"));
}
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
2206cc5401492e92e8b955f548acf78a82c95cd7
|
3a2e106de7ae82f16b69af9b52ec6b1052a5aba6
|
/Core_Java/Inheritance/MultiLevelInherSameMemory/TestMultilevelInheritence.java
|
8ea8b8b357f4030b4834b98e9b1e5246040e48db
|
[] |
no_license
|
nageshphaniraj81/BigLeapProject
|
d3b8ad03f9e76313a80bc0151eca6b63e101caf4
|
488d556dda3cba5cc4ee14cb468e22fc9e44edfc
|
refs/heads/master
| 2021-01-20T16:16:46.572634
| 2017-06-02T19:38:02
| 2017-06-02T19:38:02
| 90,828,501
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 157
|
java
|
package MultiLevelInherSameMemory;
public class TestMultilevelInheritence {
public static void main(String[] args) {
Child child = new Child();
}
}
|
[
"nageshphaniraj81@gmail.com"
] |
nageshphaniraj81@gmail.com
|
0eeb039ab63131512b32b31483d2b525424542c2
|
f15889af407de46a94fd05f6226c66182c6085d0
|
/ma/src/main/java/com/oreon/proj/onepack/CustomerBase.java
|
b89b7b978876257d772677d9759f01b064ac3a1f
|
[] |
no_license
|
oreon/sfcode-full
|
231149f07c5b0b9b77982d26096fc88116759e5b
|
bea6dba23b7824de871d2b45d2a51036b88d4720
|
refs/heads/master
| 2021-01-10T06:03:27.674236
| 2015-04-27T10:23:10
| 2015-04-27T10:23:10
| 55,370,912
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,108
|
java
|
package com.oreon.proj.onepack;
import javax.persistence.*;
import org.witchcraft.base.entity.FileAttachment;
import org.witchcraft.base.entity.BaseEntity;
import org.hibernate.annotations.Filter;
import org.hibernate.annotations.Filters;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Date;
@MappedSuperclass
public class CustomerBase extends com.oreon.proj.onepack.Person {
@NotNull
@Column(name = "firstName", unique = false)
private String firstName;
@NotNull
@Column(name = "lastName", unique = false)
private String lastName;
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getFirstName() {
return firstName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getLastName() {
return lastName;
}
@Transient
public String getDisplayName() {
try {
return firstName;
} catch (Exception e) {
return "Exception - " + e.getMessage();
}
}
}
|
[
"singhj@38423737-2f20-0410-893e-9c0ab9ae497d"
] |
singhj@38423737-2f20-0410-893e-9c0ab9ae497d
|
7f1ca887842941f9228ec08bccd0d8ea48317a66
|
b5389245f454bd8c78a8124c40fdd98fb6590a57
|
/big_variable_tree/module25/src/main/java/module25packageJava0/Foo3.java
|
6b19735175e5137fdf8fcd65619c4a711e004d84
|
[] |
no_license
|
jin/android-projects
|
3bbf2a70fcf9a220df3716b804a97b8c6bf1e6cb
|
a6d9f050388cb8af84e5eea093f4507038db588a
|
refs/heads/master
| 2021-10-09T11:01:51.677994
| 2018-12-26T23:10:24
| 2018-12-26T23:10:24
| 131,518,587
| 29
| 1
| null | 2018-12-26T23:10:25
| 2018-04-29T18:21:09
|
Java
|
UTF-8
|
Java
| false
| false
| 244
|
java
|
package module25packageJava0;
public class Foo3 {
public void foo0() {
new module25packageJava0.Foo2().foo3();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
}
|
[
"jingwen@google.com"
] |
jingwen@google.com
|
a6a61c22d56121047a5bc2d35b09c58fc18161b6
|
db2d7241afcb02a7de80503bf492fa02251f9018
|
/services/meeting/src/main/java/com/huaweicloud/sdk/meeting/v1/model/ResDetailDTO.java
|
6d119bcd5c22f13d60f6fd0a328fa0096dda56c5
|
[
"Apache-2.0"
] |
permissive
|
yasuor/huaweicloud-sdk-java-v3
|
64359e3ab599144d1dc2df08fb15f8e404295be5
|
3407632f294cdd40a62d4f9167f9708d95464cb8
|
refs/heads/master
| 2022-11-23T23:38:12.977127
| 2020-07-30T08:46:12
| 2020-07-30T08:46:12
| 286,420,644
| 1
| 0
|
NOASSERTION
| 2020-08-10T08:35:22
| 2020-08-10T08:35:21
| null |
UTF-8
|
Java
| false
| false
| 2,580
|
java
|
package com.huaweicloud.sdk.meeting.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.function.Consumer;
import java.util.Objects;
/**
* ResDetailDTO
*/
public class ResDetailDTO {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="sumCount")
private Integer sumCount;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="usedCount")
private Integer usedCount;
public ResDetailDTO withSumCount(Integer sumCount) {
this.sumCount = sumCount;
return this;
}
/**
* 总数
* @return sumCount
*/
public Integer getSumCount() {
return sumCount;
}
public void setSumCount(Integer sumCount) {
this.sumCount = sumCount;
}
public ResDetailDTO withUsedCount(Integer usedCount) {
this.usedCount = usedCount;
return this;
}
/**
* 已使用数(录播存储空间、会议并发、推流并发方数暂无法查询)。
* @return usedCount
*/
public Integer getUsedCount() {
return usedCount;
}
public void setUsedCount(Integer usedCount) {
this.usedCount = usedCount;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ResDetailDTO resDetailDTO = (ResDetailDTO) o;
return Objects.equals(this.sumCount, resDetailDTO.sumCount) &&
Objects.equals(this.usedCount, resDetailDTO.usedCount);
}
@Override
public int hashCode() {
return Objects.hash(sumCount, usedCount);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ResDetailDTO {\n");
sb.append(" sumCount: ").append(toIndentedString(sumCount)).append("\n");
sb.append(" usedCount: ").append(toIndentedString(usedCount)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
b6d991dff014ca2a171a71a301167a1f882c0b95
|
337cb92559eff5f2055d304b464a6289f64c20eb
|
/support/cas-server-support-scim/src/main/java/org/apereo/cas/config/CasScimConfiguration.java
|
6c3573577e8239b0fa9af2a9f504d67d774a4cc2
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
quibeLee/cas
|
a2b845ae390919e00a9d3ef07e2cb1c7b3889711
|
49eb3617c9a870e65faa1f3d04384000adfb9a6f
|
refs/heads/master
| 2022-12-25T18:31:39.013523
| 2020-09-25T17:02:06
| 2020-09-25T17:02:06
| 299,008,041
| 1
| 0
|
Apache-2.0
| 2020-09-27T10:33:58
| 2020-09-27T10:33:57
| null |
UTF-8
|
Java
| false
| false
| 4,291
|
java
|
package org.apereo.cas.config;
import org.apereo.cas.api.PrincipalProvisioner;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.scim.v1.ScimV1PrincipalAttributeMapper;
import org.apereo.cas.scim.v1.ScimV1PrincipalProvisioner;
import org.apereo.cas.scim.v2.ScimV2PrincipalAttributeMapper;
import org.apereo.cas.scim.v2.ScimV2PrincipalProvisioner;
import org.apereo.cas.web.flow.CasWebflowConfigurer;
import org.apereo.cas.web.flow.CasWebflowExecutionPlanConfigurer;
import org.apereo.cas.web.flow.PrincipalScimProvisionerAction;
import org.apereo.cas.web.flow.ScimWebflowConfigurer;
import lombok.val;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.webflow.definition.registry.FlowDefinitionRegistry;
import org.springframework.webflow.engine.builder.support.FlowBuilderServices;
import org.springframework.webflow.execution.Action;
/**
* This is {@link CasScimConfiguration}.
*
* @author Misagh Moayyed
* @since 5.1.0
*/
@Configuration("casScimConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
@EnableScheduling
@ConditionalOnProperty(name = "cas.scim.target")
public class CasScimConfiguration {
@Autowired
@Qualifier("loginFlowRegistry")
private ObjectProvider<FlowDefinitionRegistry> loginFlowDefinitionRegistry;
@Autowired
private ObjectProvider<FlowBuilderServices> flowBuilderServices;
@Autowired
private CasConfigurationProperties casProperties;
@Autowired
private ConfigurableApplicationContext applicationContext;
@ConditionalOnMissingBean(name = "scimWebflowConfigurer")
@Bean
@DependsOn("defaultWebflowConfigurer")
public CasWebflowConfigurer scimWebflowConfigurer() {
return new ScimWebflowConfigurer(flowBuilderServices.getObject(),
loginFlowDefinitionRegistry.getObject(), applicationContext, casProperties);
}
@RefreshScope
@Bean
@ConditionalOnMissingBean(name = "scim2PrincipalAttributeMapper")
public ScimV2PrincipalAttributeMapper scim2PrincipalAttributeMapper() {
return new ScimV2PrincipalAttributeMapper();
}
@RefreshScope
@Bean
@ConditionalOnMissingBean(name = "scim1PrincipalAttributeMapper")
public ScimV1PrincipalAttributeMapper scim1PrincipalAttributeMapper() {
return new ScimV1PrincipalAttributeMapper();
}
@RefreshScope
@Bean
@ConditionalOnMissingBean(name = "scimProvisioner")
public PrincipalProvisioner scimProvisioner() {
val scim = casProperties.getScim();
if (casProperties.getScim().getVersion() == 1) {
return new ScimV1PrincipalProvisioner(scim.getTarget(),
scim.getOauthToken(),
scim.getUsername(),
scim.getPassword(),
scim1PrincipalAttributeMapper());
}
return new ScimV2PrincipalProvisioner(scim.getTarget(),
scim.getOauthToken(), scim.getUsername(), scim.getPassword(),
scim2PrincipalAttributeMapper());
}
@ConditionalOnMissingBean(name = "principalScimProvisionerAction")
@Bean
@RefreshScope
public Action principalScimProvisionerAction() {
return new PrincipalScimProvisionerAction(scimProvisioner());
}
@Bean
@ConditionalOnMissingBean(name = "scimCasWebflowExecutionPlanConfigurer")
public CasWebflowExecutionPlanConfigurer scimCasWebflowExecutionPlanConfigurer() {
return plan -> plan.registerWebflowConfigurer(scimWebflowConfigurer());
}
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
2198656509b5a02d021f7e10698e7ba286c7a6f3
|
6a0e82d471b16a89c330eadc7778d040e60508c2
|
/src/main/java/org/joda/beans/impl/direct/DirectBean.java
|
86acd617d79148dc1c6d07b8fa7808df018d1e1f
|
[
"Apache-2.0"
] |
permissive
|
luiz158/joda-beans
|
11f880ba9242663ff0e673d4bb9584ad31cd9179
|
570b8267bebc7eae898f9c53f9d684420e0e5d0d
|
refs/heads/master
| 2021-04-09T14:00:25.587520
| 2012-12-10T19:08:54
| 2012-12-10T19:08:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,382
|
java
|
/*
* Copyright 2001-2011 Stephen Colebourne
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.joda.beans.impl.direct;
import java.util.NoSuchElementException;
import java.util.Set;
import org.joda.beans.Bean;
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.Property;
/**
* A bean implementation designed for use by the code generator.
* <p>
* This implementation uses direct access via {@link #propertyGet(String)} and
* {@link #propertySet(String, Object)} to avoid reflection.
* <p>
* For code generation, the bean must directly extend this class and have a
* no-arguments constructor.
*
* @author Stephen Colebourne
*/
public abstract class DirectBean implements Bean {
@Override
public <R> Property<R> property(String propertyName) {
return metaBean().<R>metaProperty(propertyName).createProperty(this);
}
@Override
public Set<String> propertyNames() {
return metaBean().metaPropertyMap().keySet();
}
//-------------------------------------------------------------------------
/**
* Gets the value of the property.
*
* @param propertyName the property name, not null
* @param quiet true to return null if unable to read
* @return the value of the property, may be null
* @throws NoSuchElementException if the property name is invalid
*/
protected Object propertyGet(String propertyName, boolean quiet) {
throw new NoSuchElementException("Unknown property: " + propertyName);
}
/**
* Sets the value of the property.
*
* @param propertyName the property name, not null
* @param value the value of the property, may be null
* @param quiet true to take no action if unable to write
* @throws NoSuchElementException if the property name is invalid
*/
protected void propertySet(String propertyName, Object value, boolean quiet) {
throw new NoSuchElementException("Unknown property: " + propertyName);
}
/**
* Validates the values of the properties.
*
* @throws RuntimeException if a property is invalid
*/
protected void validate() {
}
//-----------------------------------------------------------------------
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj != null && getClass() == obj.getClass()) {
DirectBean other = (DirectBean) obj;
for (String name : propertyNames()) {
Object value1 = propertyGet(name, true);
Object value2 = other.propertyGet(name, true);
if (JodaBeanUtils.equal(value1, value2) == false) {
return false;
}
}
return true;
}
return false;
}
@Override
public int hashCode() {
int hash = getClass().hashCode();
Set<String> names = propertyNames();
for (String name : names) {
Object value = propertyGet(name, true);
hash += JodaBeanUtils.hashCode(value);
}
return hash;
}
@Override
public String toString() {
Set<String> names = propertyNames();
StringBuilder buf = new StringBuilder((names.size()) * 32 + 32);
buf.append(getClass().getSimpleName());
buf.append('{');
if (names.size() > 0) {
for (String name : names) {
Object value = propertyGet(name, true);
buf.append(name).append('=').append(value).append(',').append(' ');
}
buf.setLength(buf.length() - 2);
}
buf.append('}');
return buf.toString();
}
}
|
[
"scolebourne@joda.org"
] |
scolebourne@joda.org
|
ad3911b2b67f44b8869d62dc0f9e94ae47de801b
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/22/885.java
|
fa276311cb511ac4a9af6c026b990ca797d02d02
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 974
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int a;
int b;
int c;
int t;
int t1;
int t2;
char q;
a = 0;
b = 0;
t2 = 0;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
t1 = Integer.parseInt(tempVar);
}
String tempVar2 = ConsoleInput.scanfRead(null, 1);
if (tempVar2 != null)
{
q = tempVar2.charAt(0);
}
while (q == ',')
{
a++;
String tempVar3 = ConsoleInput.scanfRead();
if (tempVar3 != null)
{
c = Integer.parseInt(tempVar3);
}
String tempVar4 = ConsoleInput.scanfRead(null, 1);
if (tempVar4 != null)
{
q = tempVar4.charAt(0);
}
if (c >= t1)
{
if (c == t1)
{
b = b + 1;
}
else
{
t = t1;
t1 = c;
t2 = t;
}
}
else if (c > t2)
{
t2 = c;
}
}
if ((a == b) || (a == 0))
{
System.out.print("No\n");
}
else
{
System.out.printf("%d",t2);
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
44be10b2aeb3d48d482399d21edcdbec46d98d7a
|
cc279a39b60cfb6c782c1ee24df0b689b49ce9cc
|
/PracticalJava/src/chapter5/p51/Demo.java
|
d809d5279f15c5639575eb6b837bd18d4e491cc2
|
[] |
no_license
|
liuchenwei2000/Books
|
8504a90a234d13894a8757068e8c97383ed3f374
|
515045aefc16679a6871011ce4f0dcf265379804
|
refs/heads/master
| 2021-01-10T08:13:22.746240
| 2017-04-27T07:49:20
| 2017-04-27T07:49:20
| 46,969,493
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,455
|
java
|
/**
*
*/
package chapter5.p51;
/**
* 示例
*
* @author 刘晨伟
*
* 创建日期:2012-12-16
*/
public class Demo {
/**
* @param args
*/
public static void main(String[] args) {
int[] a1 = { 1, 2, 3, 4, 5 };
int[] a2 = { 9, 8, 7, 6, 5 };
// 传入函数的两个数组并非是Demo对象的instance数据
Demo demo = new Demo();
demo.sumArrays(a1, a2);
}
/**
* 这个方法虽然声明为synchronized,但仍然不具有线程安全性。
*
* 这是因为synchronized锁定的是对象,而非函数或代码,本方法所操纵的两个数组对象并没有被锁定。
* 当另一个线程改变未锁定之对象的时候,本函数依然可以执行,结果就错了。
*/
public synchronized int sumArrays(int[] a1, int[] a2) {
int value = 0;
int length = a1.length;
if (length == a2.length) {
for (int i = 0; i < length; i++) {
value += a1[i] + a2[i];
}
}
return value;
}
/**
* 所以,有时候仅仅同步控制一个函数是不够的,还必须同步控制此函数所处理的对象。
* 本方法对函数中操作的每一个对象都加锁控制,保证了线程安全性。
*/
public int sumArrays2(int[] a1, int[] a2) {
int value = 0;
int length = a1.length;
if (length == a2.length) {
synchronized (a1) {
synchronized (a2) {
for (int i = 0; i < length; i++) {
value += a1[i] + a2[i];
}
}
}
}
return value;
}
}
|
[
"liuchenwei2000@163.com"
] |
liuchenwei2000@163.com
|
1a67b25050ef4d59c55dc2db896b5b289103caa9
|
e010f83b9d383a958fc73654162758bda61f8290
|
/src/main/java/com/alipay/api/domain/ArticleParagraph.java
|
2b6b7ee8dccb79a5ccd11a739ff2699d2832087c
|
[
"Apache-2.0"
] |
permissive
|
10088/alipay-sdk-java
|
3a7984dc591eaf196576e55e3ed657a88af525a6
|
e82aeac7d0239330ee173c7e393596e51e41c1cd
|
refs/heads/master
| 2022-01-03T15:52:58.509790
| 2018-04-03T15:50:35
| 2018-04-03T15:50:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 877
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 文章段落
*
* @author auto create
* @since 1.0, 2016-10-26 17:43:37
*/
public class ArticleParagraph extends AlipayObject {
private static final long serialVersionUID = 6134171734289818442L;
/**
* 图片列表
*/
@ApiListField("pictures")
@ApiField("article_picture")
private List<ArticlePicture> pictures;
/**
* 文章正文描述
*/
@ApiField("text")
private String text;
public List<ArticlePicture> getPictures() {
return this.pictures;
}
public void setPictures(List<ArticlePicture> pictures) {
this.pictures = pictures;
}
public String getText() {
return this.text;
}
public void setText(String text) {
this.text = text;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
0db65db355dfef691a6dd8c9eb0fd05d0652d5f0
|
59db133e64c4fa70fcc7a46d12c964569739b68d
|
/src/view/RipplerMaskTypeConverter.java
|
34357b91d8e01fc61161d667d8e69046bd2f427a
|
[] |
no_license
|
newPersonKing/JAVAFX
|
00c335aabd7d26370464eeedbbe03311061a4c1f
|
f1e7a0d6ca1f5cb67594fbd6c91ac9a0199fddd6
|
refs/heads/master
| 2020-03-21T10:51:38.518278
| 2018-06-24T11:07:55
| 2018-06-24T11:07:55
| 138,475,006
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,079
|
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 view;
import com.sun.javafx.css.StyleConverterImpl;
import javafx.css.ParsedValue;
import javafx.css.StyleConverter;
import javafx.scene.text.Font;
import view.button.JFXRippler;
/**
* Converts the CSS for -fx-mask-type items into RipplerMask.
* it's used in JFXRippler.
*
* @author Shadi Shaheen
* @version 1.0
* @since 2016-03-09
*/
public final class RipplerMaskTypeConverter extends StyleConverterImpl<String, JFXRippler.RipplerMask> {
// lazy, thread-safe instatiation
private static class Holder {
static final RipplerMaskTypeConverter INSTANCE = new RipplerMaskTypeConverter();
}
public static StyleConverter<String, JFXRippler.RipplerMask> getInstance() {
return Holder.INSTANCE;
}
private RipplerMaskTypeConverter() {
}
@Override
public JFXRippler.RipplerMask convert(ParsedValue<String, JFXRippler.RipplerMask> value, Font notUsed) {
String string = value.getValue();
try {
return JFXRippler.RipplerMask.valueOf(string);
} catch (IllegalArgumentException | NullPointerException exception) {
return JFXRippler.RipplerMask.RECT;
}
}
@Override
public String toString() {
return "RipplerMaskTypeConverter";
}
}
|
[
"guoyong@emcc.net.com"
] |
guoyong@emcc.net.com
|
74f43e8356071947f73776ed560f54a8f7684c3d
|
44c38865fe9fbc9b0a65a0d57a129503935d47f6
|
/api/src/main/zj/zfenlly/wifiap/WifiAP.java
|
e86452d849b2c8db7cba0cb26ca881c6385efab0
|
[] |
no_license
|
linurm/zt
|
38266f87f9ba96719c7c6547e7c8fa9095331ad7
|
4e91233fe944404eac0c981a75d5517b2eebfe49
|
refs/heads/master
| 2021-01-17T02:32:23.388711
| 2018-06-03T07:17:57
| 2018-06-03T07:17:57
| 54,465,549
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,958
|
java
|
package zj.zfenlly.wifiap;
import java.lang.reflect.Method;
import android.content.Context;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiConfiguration.AuthAlgorithm;
import android.net.wifi.WifiConfiguration.KeyMgmt;
import android.util.Log;
public class WifiAP {
public static final int OPEN_INDEX = 0;
public static final int WPA_INDEX = 1;
public static final int WPA2_INDEX = 2;
private static final int WPA2_PSK = 4;
private static Context mContext = null;
private static final int WIFI_AP_STATE_UNKNOWN = -1;
private static final int WIFI_AP_STATE_ENABLED = 13;
private final static String[] WIFI_STATE_TEXTSTATE = new String[] {
"WIFI_STATE_DISABLING", "WIFI_STATE_DISABLED",
"WIFI_STATE_ENABLING", "WIFI_STATE_ENABLED", "WIFI_STATE_UNKNOWN",
"", "", "", "", "",
"WIFI_AP_STATE_DISABLING",// 10
"WIFI_AP_STATE_DISABLED", "WIFI_AP_STATE_ENABLING",
"WIFI_AP_STATE_ENABLED", "WIFI_AP_STATE_FAILED" };
private static WifiManager mWifiManager = null;
private static WifiConfiguration mWifiConfig = null;
private static final String TAG = WifiAP.class.getSimpleName();
private static void print(String msg) {
Log.i(TAG, msg);
}
public WifiAP(Context context) {
mContext = context;
initWifiTethering();
}
public static WifiConfiguration getWifiAPConfig() {
Method method1 = null;
try {
method1 = mWifiManager.getClass().getMethod(
"getWifiApConfiguration");
mWifiConfig = (WifiConfiguration) method1.invoke(mWifiManager);
} catch (Exception e) {
print(e.getMessage());
// toastText += "ERROR " + e.getMessage();
}
return mWifiConfig;
}
public static void setWifiAPConfig(WifiConfiguration mWc) {
Method method1 = null;
WifiConfiguration wc = mWc;
if (mContext == null)
return;
try {
if (getWifiAPState() == WIFI_AP_STATE_ENABLED) {
method1 = mWifiManager.getClass().getMethod("setWifiApEnabled",
WifiConfiguration.class, boolean.class);
method1.invoke(mWifiManager, null, false); // true
method1.invoke(mWifiManager, wc, true);
print("ssid:" + wc.SSID);
} else {
method1 = mWifiManager.getClass().getMethod(
"setWifiApConfiguration", WifiConfiguration.class);
method1.invoke(mWifiManager, wc);
}
} catch (Exception e) {
print(e.getMessage());
// toastText += "ERROR " + e.getMessage();
}
}
private static int getWifiAPState() {
int state = WIFI_AP_STATE_UNKNOWN;
if (mContext == null)
return -1;
try {
Method method2 = mWifiManager.getClass()
.getMethod("getWifiApState");
state = (Integer) method2.invoke(mWifiManager);
} catch (Exception e) {
}
print("getWifiAPState.state "
+ (state == -1 ? "UNKNOWN" : WIFI_STATE_TEXTSTATE[state]));
return state;
}
private static void initWifiTethering() {
if (mContext == null)
return;
mWifiManager = (WifiManager) mContext
.getSystemService(Context.WIFI_SERVICE);
}
public static int getSecurityTypeIndex(WifiConfiguration wifiConfig) {
if (mContext == null)
return -1;
if (wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK)) {
return WPA_INDEX;
// } else if (wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA2_PSK))
// {
} else if (wifiConfig.allowedKeyManagement.get(WPA2_PSK)) {
return WPA2_INDEX;
}
return OPEN_INDEX;
}
public static void setWifiAPConfig(int index, String ssid, String passwd) {
if (mContext == null)
return;
// WifiConfiguration config = mWifiConfig;
/**
* TODO: SSID in WifiConfiguration for soft ap is being stored as a raw
* string without quotes. This is not the case on the client side. We
* need to make things consistent and clean it up
*/
mWifiConfig.SSID = ssid;
// print("ssid:" + mWifiConfig.SSID);
switch (index) {
case OPEN_INDEX:
mWifiConfig.allowedKeyManagement.set(KeyMgmt.NONE);
case WPA_INDEX:
mWifiConfig.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
mWifiConfig.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
if (passwd.length() != 0) {
String password = passwd;
mWifiConfig.preSharedKey = password;
}
case WPA2_INDEX:
// config.allowedKeyManagement.set(KeyMgmt.WPA2_PSK);
mWifiConfig.allowedKeyManagement.set(WPA2_PSK);
mWifiConfig.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
if (passwd.length() != 0) {
String password = passwd;
mWifiConfig.preSharedKey = password;
}
}
return;
}
public static void setSoftapEnabled(boolean enable) {
int state = WIFI_AP_STATE_UNKNOWN;
if (mContext == null)
return;
int wifiState = mWifiManager.getWifiState();
if (enable
&& ((wifiState == WifiManager.WIFI_STATE_ENABLING) || (wifiState == WifiManager.WIFI_STATE_ENABLED))) {
mWifiManager.setWifiEnabled(false);
// Settings.Global.putInt(cr, Settings.Global.WIFI_SAVED_STATE, 1);
}
Method method2 = null;
try {
method2 = mWifiManager.getClass().getMethod("setWifiApEnabled",
WifiConfiguration.class, boolean.class);
state = (Integer) method2.invoke(mWifiManager, mWifiConfig, enable);
} catch (Exception e) {
print(e.getMessage());
// toastText += "ERROR " + e.getMessage();
}
/**
* If needed, restore Wifi on tether disable
*/
if (!enable) {
// int wifiSavedState = 0;
// wifiSavedState = 0;
// try {
// wifiSavedState = Settings.Global.getInt(cr,
// Settings.Global.WIFI_SAVED_STATE);
// } catch (Settings.SettingNotFoundException e) {
// ;
// }
// if (wifiSavedState == 1) {
// mWifiManager.setWifiEnabled(true);
// Settings.Global.putInt(cr, Settings.Global.WIFI_SAVED_STATE, 0);
// }
}
print("state: " + state);
// if (mWifiManager.getWifiApState() ==
// WifiManager.WIFI_AP_STATE_ENABLED) {
// mWifiManager.setWifiApEnabled(null, false);
// mWifiManager.setWifiApEnabled(mWifiConfig, true);
// } else {
// mWifiManager.setWifiApConfiguration(mWifiConfig);
// }
}
}
|
[
"343600434@qq.com"
] |
343600434@qq.com
|
b5bbef6c852e34cfabe99d64d3d4459f7324f296
|
ea0fdfd66ce904fd98f21a4eee349f83b1825632
|
/src/erp/mfin/data/SDataBankLayoutType.java
|
90eb344bf96bc1ab5398016d9cd5da2d234b8e1b
|
[
"MIT"
] |
permissive
|
swaplicado/siie32
|
247560d152207228d59d2513107cac229bd391f1
|
9edd4099d69dd9e060dd64eb4a50cd91cc809c67
|
refs/heads/master
| 2023-09-01T15:42:26.706875
| 2023-07-28T15:41:54
| 2023-07-28T15:41:54
| 41,698,005
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,759
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package erp.mfin.data;
import erp.data.SDataConstants;
import erp.lib.SLibConstants;
import erp.lib.SLibUtilities;
import java.sql.CallableStatement;
import java.sql.ResultSet;
/**
*
* @author Juan Barajas
*/
public class SDataBankLayoutType extends erp.lib.data.SDataRegistry implements java.io.Serializable {
protected int mnPkBankLayoutTypeId;
protected java.lang.String msBankLayoutType;
protected int mnLayoutBank;
protected boolean mbIsCanEdit;
protected boolean mbIsCanDelete;
protected boolean mbIsDeleted;
protected int mnFkBankPaymentTypeId;
protected int mnFkBankId;
protected int mnFkUserNewId;
protected int mnFkUserEditId;
protected int mnFkUserDeleteId;
protected java.util.Date mtUserNewTs;
protected java.util.Date mtUserEditTs;
protected java.util.Date mtUserDeleteTs;
public SDataBankLayoutType() {
super(SDataConstants.FINU_TP_LAY_BANK);
reset();
}
public void setPkBankLayoutTypeId(int n) { mnPkBankLayoutTypeId = n; }
public void setBankLayoutType(java.lang.String s) { msBankLayoutType = s; }
public void setLayoutBank(int n) { mnLayoutBank = n; }
public void setIsCanEdit(boolean b) { mbIsCanEdit = b; }
public void setIsCanDelete(boolean b) { mbIsCanDelete = b; }
public void setIsDeleted(boolean b) { mbIsDeleted = b; }
public void setFkBankPaymentTypeId(int n) { mnFkBankPaymentTypeId = n; }
public void setFkBankId(int n) { mnFkBankId = n; }
public void setFkUserNewId(int n) { mnFkUserNewId = n; }
public void setFkUserEditId(int n) { mnFkUserEditId = n; }
public void setFkUserDeleteId(int n) { mnFkUserDeleteId = n; }
public void setUserNewTs(java.util.Date t) { mtUserNewTs = t; }
public void setUserEditTs(java.util.Date t) { mtUserEditTs = t; }
public void setUserDeleteTs(java.util.Date t) { mtUserDeleteTs = t; }
public int getPkBankLayoutTypeId() { return mnPkBankLayoutTypeId; }
public java.lang.String getBankLayoutType() { return msBankLayoutType; }
public int getLayoutBank() { return mnLayoutBank; }
public boolean getIsCanEdit() { return mbIsCanEdit; }
public boolean getIsCanDelete() { return mbIsCanDelete; }
public boolean getIsDeleted() { return mbIsDeleted; }
public int getFkBankPaymentTypeId() { return mnFkBankPaymentTypeId; }
public int getFkBankId() { return mnFkBankId; }
public int getFkUserNewId() { return mnFkUserNewId; }
public int getFkUserEditId() { return mnFkUserEditId; }
public int getFkUserDeleteId() { return mnFkUserDeleteId; }
public java.util.Date getUserNewTs() { return mtUserNewTs; }
public java.util.Date getUserEditTs() { return mtUserEditTs; }
public java.util.Date getUserDeleteTs() { return mtUserDeleteTs; }
@Override
public void setPrimaryKey(java.lang.Object pk) {
mnPkBankLayoutTypeId = ((int[]) pk)[0];
}
@Override
public java.lang.Object getPrimaryKey() {
return new int[] { mnPkBankLayoutTypeId };
}
@Override
public void reset() {
super.resetRegistry();
mnPkBankLayoutTypeId = 0;
msBankLayoutType = "";
mnLayoutBank = 0;
mbIsCanEdit = false;
mbIsCanDelete = false;
mbIsDeleted = false;
mnFkBankPaymentTypeId = 0;
mnFkBankId = 0;
mnFkUserNewId = 0;
mnFkUserEditId = 0;
mnFkUserDeleteId = 0;
mtUserNewTs = null;
mtUserEditTs = null;
mtUserDeleteTs = null;
}
@Override
public int read(java.lang.Object pk, java.sql.Statement statement) {
int[] key = (int[]) pk;
String sql = "";
ResultSet resultSet = null;
mnLastDbActionResult = SLibConstants.UNDEFINED;
reset();
try {
sql = "SELECT * FROM erp.finu_tp_lay_bank WHERE id_tp_lay_bank = " + key[0] + "";
resultSet = statement.executeQuery(sql);
if (!resultSet.next()) {
throw new Exception(SLibConstants.MSG_ERR_REG_FOUND_NOT);
}
else {
mnPkBankLayoutTypeId = resultSet.getInt("id_tp_lay_bank");
msBankLayoutType = resultSet.getString("tp_lay_bank");
mnLayoutBank = resultSet.getInt("lay_bank");
mbIsCanEdit = resultSet.getBoolean("b_can_edit");
mbIsCanDelete = resultSet.getBoolean("b_can_del");
mbIsDeleted = resultSet.getBoolean("b_del");
mnFkBankPaymentTypeId = resultSet.getInt("fid_tp_pay_bank");
mnFkBankId = resultSet.getInt("fid_bank");
mnFkUserNewId = resultSet.getInt("fid_usr_new");
mnFkUserEditId = resultSet.getInt("fid_usr_edit");
mnFkUserDeleteId = resultSet.getInt("fid_usr_del");
mtUserNewTs = resultSet.getTimestamp("ts_new");
mtUserEditTs = resultSet.getTimestamp("ts_edit");
mtUserDeleteTs = resultSet.getTimestamp("ts_del");
mbIsRegistryNew = false;
mnLastDbActionResult = SLibConstants.DB_ACTION_READ_OK;
}
}
catch (java.sql.SQLException e) {
mnLastDbActionResult = SLibConstants.DB_ACTION_READ_ERROR;
SLibUtilities.printOutException(this, e);
}
catch (java.lang.Exception e) {
mnLastDbActionResult = SLibConstants.DB_ACTION_READ_ERROR;
SLibUtilities.printOutException(this, e);
}
return mnLastDbActionResult;
}
@Override
public int save(java.sql.Connection connection) {
int nParam = 1;
CallableStatement callableStatement = null;
mnLastDbActionResult = SLibConstants.UNDEFINED;
try {
callableStatement = connection.prepareCall(
"{ CALL erp.finu_tp_lay_bank_save(" +
"?, ?, ?, ?, ?, ?, ?, ?, ? ) }");
callableStatement.setInt(nParam++, mnPkBankLayoutTypeId);
callableStatement.setString(nParam++, msBankLayoutType);
callableStatement.setInt(nParam++, mnLayoutBank);
callableStatement.setBoolean(nParam++, mbIsCanEdit);
callableStatement.setBoolean(nParam++, mbIsCanDelete);
callableStatement.setBoolean(nParam++, mbIsDeleted);
callableStatement.setInt(nParam++, mnFkBankPaymentTypeId);
callableStatement.setInt(nParam++, mnFkBankId);
callableStatement.setInt(nParam++, mbIsRegistryNew ? mnFkUserNewId : mnFkUserEditId);
callableStatement.registerOutParameter(nParam++, java.sql.Types.SMALLINT);
callableStatement.registerOutParameter(nParam++, java.sql.Types.CHAR);
callableStatement.execute();
mnDbmsErrorId = callableStatement.getInt(nParam - 2);
msDbmsError = callableStatement.getString(nParam - 1);
if (mnDbmsErrorId != 0) {
throw new Exception(msDbmsError);
}
else {
mbIsRegistryNew = false;
mnLastDbActionResult = SLibConstants.DB_ACTION_SAVE_OK;
}
}
catch (java.sql.SQLException e) {
mnLastDbActionResult = SLibConstants.DB_ACTION_SAVE_ERROR;
SLibUtilities.printOutException(this, e);
}
catch (java.lang.Exception e) {
mnLastDbActionResult = SLibConstants.DB_ACTION_SAVE_ERROR;
SLibUtilities.printOutException(this, e);
}
return mnLastDbActionResult;
}
@Override
public java.util.Date getLastDbUpdate() {
return mtUserEditTs;
}
}
|
[
"contacto@swaplicado.com.mx"
] |
contacto@swaplicado.com.mx
|
adb13dc3267135c847fdb83aa16acaad6a5f1640
|
0662f43b8ad4a7477347ad3891d04b8a95313847
|
/src/test/java/org/qa/javasample/EmployeeJSON.java
|
99815bc98d4780676dc284404554ed6dc1d4452e
|
[] |
no_license
|
aritraautomation/MavenDemoTest
|
4f9b2aef62470bb4a33d09c46011f7c33b3a4349
|
25ef16e03785a641d22a3167de3307f52f6317d0
|
refs/heads/master
| 2022-09-11T05:56:55.939865
| 2020-12-24T06:54:47
| 2020-12-24T06:54:47
| 228,463,833
| 0
| 0
| null | 2022-09-01T23:17:34
| 2019-12-16T19:51:45
|
Java
|
UTF-8
|
Java
| false
| false
| 487
|
java
|
package org.qa.javasample;
import com.google.gson.Gson;
public class EmployeeJSON {
private String empName;
private int empID;
private int age;
public EmployeeJSON(String empName,int empID,int age){
this.empName = empName;
this.empID = empID;
this.age = age;
}
public static void main(String[] args){
Gson gson = new Gson();
EmployeeJSON empJson = new EmployeeJSON("John",33,30);
String json = gson.toJson(gson);
System.out.println(json);
}
}
|
[
"aritras@rssoftware.co.in"
] |
aritras@rssoftware.co.in
|
d61463291646c068e92ce3b00985f8b71428c706
|
0dccef976f19741f67479f32f15d76c1e90e7f94
|
/FileUploadThread.java
|
350b105b0ec19c0fdc71e5c99ffae8897f2e9dc0
|
[] |
no_license
|
Tominous/LabyMod-1.9
|
a960959d67817b1300272d67bd942cd383dfd668
|
33e441754a0030d619358fc20ca545df98d55f71
|
refs/heads/master
| 2020-05-24T21:35:00.931507
| 2017-02-06T21:04:08
| 2017-02-06T21:04:08
| 187,478,724
| 1
| 0
| null | 2019-05-19T13:14:46
| 2019-05-19T13:14:46
| null |
UTF-8
|
Java
| false
| false
| 946
|
java
|
import java.util.Map;
public class FileUploadThread
extends Thread
{
private String urlString;
private Map headers;
private byte[] content;
private IFileUploadListener listener;
public FileUploadThread(String urlString, Map headers, byte[] content, IFileUploadListener listener)
{
this.urlString = urlString;
this.headers = headers;
this.content = content;
this.listener = listener;
}
public void run()
{
try
{
HttpUtils.post(this.urlString, this.headers, this.content);
this.listener.fileUploadFinished(this.urlString, this.content, null);
}
catch (Exception e)
{
this.listener.fileUploadFinished(this.urlString, this.content, e);
}
}
public String getUrlString()
{
return this.urlString;
}
public byte[] getContent()
{
return this.content;
}
public IFileUploadListener getListener()
{
return this.listener;
}
}
|
[
"admin@timo.de.vc"
] |
admin@timo.de.vc
|
93e01949ae97de73d42482bb4e2925a99baa6a50
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE571_Expression_Always_True/CWE571_Expression_Always_True__two_equals_two_01.java
|
31f9e196e8129a2be96da2ed7069964da36be152
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,123
|
java
|
/*
* @description statement always evaluates to true
*
* */
package testcases.CWE571_Expression_Always_True;
import testcasesupport.AbstractTestCase;
import testcasesupport.IO;
public class CWE571_Expression_Always_True__two_equals_two_01 extends AbstractTestCase
{
public void bad()
{
/* FLAW: always evaluates to true */
if( 2 == 2 )
{
IO.writeLine("always prints");
}
}
public void good()
{
good1();
}
private void good1()
{
/* FIX: may evaluate to true or false */
if( IO.static_returns_t_or_f() )
{
IO.writeLine("sometimes prints");
}
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args)
throws ClassNotFoundException, InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
1f5ce04b141e5a675da349ee8c8d3b5d6a4f8751
|
1df8d431ed70d6fb9c58f3d522be63952ed9209a
|
/src/main/java/mcjty/aquamunda/setup/ClientProxy.java
|
de9c34b68cf509fa684bc23287d87b3a34012ffd
|
[
"MIT"
] |
permissive
|
ACGaming/AquaMunda
|
2ed4914f0d93b4180816a9c6aeb9743eccfff38a
|
3e0637613f08f0bb38550744db7efe4dfb1e5329
|
refs/heads/1.12
| 2023-03-16T12:04:58.776403
| 2022-06-18T20:15:33
| 2022-06-18T20:15:33
| 504,782,920
| 2
| 0
|
MIT
| 2022-06-18T08:07:24
| 2022-06-18T08:07:24
| null |
UTF-8
|
Java
| false
| false
| 939
|
java
|
package mcjty.aquamunda.setup;
import mcjty.aquamunda.AquaMunda;
import mcjty.aquamunda.blocks.ModBlocks;
import mcjty.aquamunda.blocks.tank.TankModelLoader;
import mcjty.aquamunda.fluid.FluidSetup;
import mcjty.lib.setup.DefaultClientProxy;
import net.minecraftforge.client.model.ModelLoaderRegistry;
import net.minecraftforge.client.model.obj.OBJLoader;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
public class ClientProxy extends DefaultClientProxy {
@Override
public void preInit(FMLPreInitializationEvent e) {
super.preInit(e);
OBJLoader.INSTANCE.addDomain(AquaMunda.MODID);
ModelLoaderRegistry.registerLoader(new TankModelLoader());
FluidSetup.initRenderer();
}
@Override
public void init(FMLInitializationEvent e) {
super.init(e);
ModBlocks.initItemModels();
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
4138481550cc39b9474848800b5399ce2d27d769
|
8f322f02a54dd5e012f901874a4e34c5a70f5775
|
/src/main/java/PTUCharacterCreator/Edges/Expert_Skills_Pokemon_Edu.java
|
aeded8ff676571cd6ba41f00cec2bdeb3115851a
|
[] |
no_license
|
BMorgan460/PTUCharacterCreator
|
3514a4040eb264dec69aee90d95614cb83cb53d8
|
e55f159587f2cb8d6d7b456e706f910ba5707b14
|
refs/heads/main
| 2023-05-05T08:26:04.277356
| 2021-05-13T22:11:25
| 2021-05-13T22:11:25
| 348,419,608
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 495
|
java
|
package PTUCharacterCreator.Edges;
import PTUCharacterCreator.Trainer;
import PTUCharacterCreator.Edge;
public class Expert_Skills_Pokemon_Edu extends Edge {
{
name = "Expert Skills Pokemon Edu";
effect = "You Rank Up a Skill from Adept to Expert. You may take this Edge multiple times.";
prereqs.put("Level 6", -2);
prereqs.put("Adept Pokemon Edu", 0);
}
public Expert_Skills_Pokemon_Edu(){}
@Override
public boolean checkPrereqs(Trainer t) {
return t.aboveLevel(6) && true;
}
}
|
[
"alaskablake460@gmail.com"
] |
alaskablake460@gmail.com
|
1f01b50def58df29ebf13463f63ea5b917ddebc7
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/core3/model-api/branches/metaedge/src/main/java/org/cytoscape/model/events/RemovedEdgeListener.java
|
bd87bf560212b4e39932cfbb99044024d25fa7e9
|
[] |
no_license
|
ahdahddl/cytoscape
|
bf783d44cddda313a5b3563ea746b07f38173022
|
a3df8f63dba4ec49942027c91ecac6efa920c195
|
refs/heads/master
| 2020-06-26T16:48:19.791722
| 2013-08-28T04:08:31
| 2013-08-28T04:08:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,800
|
java
|
/*
Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
The Cytoscape Consortium is:
- Institute for Systems Biology
- University of California San Diego
- Memorial Sloan-Kettering Cancer Center
- Institut Pasteur
- Agilent Technologies
This library 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.
This library 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. The software and
documentation provided hereunder is on an "as is" basis, and the
Institute for Systems Biology and the Whitehead Institute
have no obligations to provide maintenance, support,
updates, enhancements or modifications. In no event shall the
Institute for Systems Biology and the Whitehead Institute
be liable to any party for direct, indirect, special,
incidental or consequential damages, including lost profits, arising
out of the use of this software and its documentation, even if the
Institute for Systems Biology and the Whitehead Institute
have been advised of the possibility of such damage. See
the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
package org.cytoscape.model.events;
import org.cytoscape.event.CyListener;
/**
* Listener for RemovedEgeEvents.
*/
public interface RemovedEdgeListener extends CyListener {
void handleEvent(RemovedEdgeEvent e);
}
|
[
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
2b80cc4ddc43c95f4e4625410af12a7057ba5b9d
|
1f080543b9783e4a03b99927e03a2eadace572a7
|
/SerhiiBilobrov/src/main/java/ua/artcode/utils/io/TestFlush.java
|
e9971fc10de37bb0e496847b854d300f1d9ee349
|
[] |
no_license
|
shamanovskyi/ACP7-1
|
aeef483a217c80d62cb890f7c260e263843c8529
|
6daee39566edff91856bb8749f36a1b487c2c769
|
refs/heads/master
| 2021-05-31T11:05:57.553981
| 2015-10-23T19:47:38
| 2015-10-23T19:47:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 443
|
java
|
package ua.artcode.utils.io;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Date;
public class TestFlush {
public static void main(String[] args) throws FileNotFoundException {
PrintWriter pw = new PrintWriter(new File("/home/serhii/dev/IdeaProjects/ACP7/temp/test.txt"));
pw.println(new Date());
pw.flush();
System.out.println("End");
}
}
|
[
"presly808@gmail.com"
] |
presly808@gmail.com
|
3622bdc425e521a24a07aac40a1af6994f693c25
|
efad8556fee5c9250183341d70c5ef2ecb607a73
|
/iot.batch/src/test/java/de/mq/iot/resource/support/TestResourceIdentifier.java
|
2dafd9263669fa00cbce16defb5b5f4ad597a684
|
[] |
no_license
|
mquasten/iot
|
79113a32c0407d634b2b361b283f725eab4a1cae
|
049d5a2712a346897eccd1b7cc849da883dd54b9
|
refs/heads/master
| 2022-12-22T11:33:08.730071
| 2022-08-02T09:19:22
| 2022-08-02T09:19:22
| 123,472,967
| 0
| 0
| null | 2022-12-16T04:26:58
| 2018-03-01T18:02:29
|
Java
|
UTF-8
|
Java
| false
| false
| 857
|
java
|
package de.mq.iot.resource.support;
import java.util.HashMap;
import java.util.Map;
import de.mq.iot.resource.ResourceIdentifier;
import de.mq.iot.resource.ResourceIdentifier.ResourceType;
public interface TestResourceIdentifier {
static final String HOST_KEY = "host";
static final String HOST_VALUE = "192.168.2.102";
static final String PORT_KEY = "port";
static final String PORT_VALUE = "80";
static final String URI = "http://{host}:{port}/addons/xmlapi/{resource}";
public static ResourceIdentifier resourceIdentifier() {
final ResourceIdentifier result = new ResourceIdentifierImpl(ResourceType.XmlApi,URI);
final Map<String,String> parameters = new HashMap<>();
parameters.put(HOST_KEY, HOST_VALUE);
parameters.put(PORT_KEY, PORT_VALUE);
result.assign(parameters);
return result;
}
}
|
[
"manfred.quasten@arcor.de"
] |
manfred.quasten@arcor.de
|
dab30f2cb25e20aa2c7d8b53134ad0ceccafad59
|
27ebd68f113d1fd6045d65e3475289b286c2cdc5
|
/src/minecraft_server/net/minecraft/entity/ai/attributes/IAttributeInstance.java
|
4effa99eb4ed9c121c173eadad17c95604a662de
|
[] |
no_license
|
EvilKanoa/KClient
|
1959a4b4cdcb659c356a3ee0ee2a8cb6469c9bc9
|
0003f5a8b86d6866140cc6be8d2dc6e13f7ce810
|
refs/heads/master
| 2021-01-20T23:16:47.776753
| 2014-08-19T22:10:15
| 2014-08-19T22:10:15
| 23,127,153
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 587
|
java
|
package net.minecraft.entity.ai.attributes;
import java.util.Collection;
import java.util.UUID;
public interface IAttributeInstance
{
/**
* Get the Attribute this is an instance of
*/
IAttribute getAttribute();
double getBaseValue();
void setBaseValue(double var1);
Collection func_111122_c();
/**
* Returns attribute modifier, if any, by the given UUID
*/
AttributeModifier getModifier(UUID var1);
void applyModifier(AttributeModifier var1);
void removeModifier(AttributeModifier var1);
double getAttributeValue();
}
|
[
"kanoa@kanoa.ca"
] |
kanoa@kanoa.ca
|
bb191846a1541c30a238e7199628d6ba8f80ab98
|
821ed0666d39420d2da9362d090d67915d469cc5
|
/core/api/src/test/java/org/onosproject/net/packet/PacketEventTest.java
|
2d0113fa49e7fc3e194f0b62c4c39de749758f29
|
[
"Apache-2.0"
] |
permissive
|
LenkayHuang/Onos-PNC-for-PCEP
|
03b67dcdd280565169f2543029279750da0c6540
|
bd7d201aba89a713f5ba6ffb473aacff85e4d38c
|
refs/heads/master
| 2021-01-01T05:19:31.547809
| 2016-04-12T07:25:13
| 2016-04-12T07:25:13
| 56,041,394
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,655
|
java
|
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.net.packet;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
/**
* Unit tests for PacketEvent class.
*/
public class PacketEventTest {
OutboundPacket packet;
@Test
public void testConstruction1() {
long time = System.currentTimeMillis();
PacketEvent event = new PacketEvent(PacketEvent.Type.EMIT, packet);
assertThat(event.type(), is(PacketEvent.Type.EMIT));
assertThat(event.subject(), is(packet));
assertThat(event.time(), greaterThanOrEqualTo(time));
}
@Test
public void testConstruction2() {
long time = 12345678;
PacketEvent event = new PacketEvent(PacketEvent.Type.EMIT, packet, time);
assertThat(event.type(), is(PacketEvent.Type.EMIT));
assertThat(event.subject(), is(packet));
assertThat(event.time(), is(time));
}
}
|
[
"826080529@qq.com"
] |
826080529@qq.com
|
190b0e4fa5bb6a83835de1974dad89377394314b
|
ff0322d1fcb338ee287bcbb91282b8083a2d9bb5
|
/owner/src/test/java/org/aeonbits/owner/reload/AsyncAutoReloadTest.java
|
35649c197abb4b3d67014e6d6c64a06bc6270a09
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
admizh/owner
|
e61c5e0de881eaa64fbebfe34f8b8235948d2f2b
|
d1243ccf4f5e442e0c36e6a281869c3bdd53153c
|
refs/heads/master
| 2021-01-12T20:56:10.537070
| 2014-12-03T04:14:11
| 2014-12-03T04:14:11
| 29,939,885
| 0
| 0
|
BSD-3-Clause
| 2020-12-25T07:52:34
| 2015-01-27T23:12:38
|
Java
|
UTF-8
|
Java
| false
| false
| 3,777
|
java
|
/*
* Copyright (c) 2012-2014, Luigi R. Viggiano
* All rights reserved.
*
* This software is distributable under the BSD license.
* See the terms of the BSD license in the documentation provided with this software.
*/
package org.aeonbits.owner.reload;
import org.aeonbits.owner.Config;
import org.aeonbits.owner.Config.HotReload;
import org.aeonbits.owner.Config.Sources;
import org.aeonbits.owner.ConfigFactory;
import org.aeonbits.owner.Reloadable;
import org.aeonbits.owner.TestConstants;
import org.aeonbits.owner.event.ReloadEvent;
import org.aeonbits.owner.event.ReloadListener;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
import java.net.URISyntaxException;
import java.util.Properties;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.aeonbits.owner.Config.HotReloadType.ASYNC;
import static org.aeonbits.owner.UtilTest.delete;
import static org.aeonbits.owner.UtilTest.fileFromURI;
import static org.aeonbits.owner.UtilTest.save;
import static org.junit.Assert.assertEquals;
/**
* @author Luigi R. Viggiano
*/
public class AsyncAutoReloadTest extends AsyncReloadSupport implements TestConstants {
private static final String PROPERTY_FILE_NAME = "AsyncAutoReloadConfig.properties";
private static final int DELAY = 1000;
private static final String SPEC = "file:"+ RESOURCES_DIR + "/" + PROPERTY_FILE_NAME;
private static File target;
@BeforeClass
public static void beforeClass() throws URISyntaxException {
target = fileFromURI(SPEC);
}
@Sources(SPEC)
@HotReload(value=10, unit = MILLISECONDS, type = ASYNC)
interface AsyncAutoReloadConfig extends Config, Reloadable {
@DefaultValue("5")
Integer someValue();
}
@Test
public void testReload() throws Throwable {
save(target, new Properties() {{
setProperty("someValue", "10");
}});
AsyncAutoReloadConfig cfg = ConfigFactory.create(AsyncAutoReloadConfig.class);
final int[] reloadCount = {0};
cfg.addReloadListener(new ReloadListener() {
public void reloadPerformed(ReloadEvent event) {
reloadCount[0]++;
}
});
cfg.addReloadListener(new ReloadListener() {
public void reloadPerformed(ReloadEvent event) {
notifyReload();
}
});
assertEquals(Integer.valueOf(10), cfg.someValue());
assertEquals(0, reloadCount[0]);
assertEquals(Integer.valueOf(10), cfg.someValue());
delete(target);
waitForReload(DELAY);
assertEquals(1, reloadCount[0]);
assertEquals(Integer.valueOf(5), cfg.someValue());
save(target, new Properties() {{
setProperty("someValue", "20");
}});
waitForReload(DELAY);
assertEquals(2, reloadCount[0]);
assertEquals(Integer.valueOf(20), cfg.someValue());
delete(target);
waitForReload(DELAY);
assertEquals(3, reloadCount[0]);
assertEquals(Integer.valueOf(5), cfg.someValue());
save(target, new Properties() {{
setProperty("someValue", "30");
}});
waitForReload(DELAY);
assertEquals(4, reloadCount[0]);
assertEquals(Integer.valueOf(30), cfg.someValue());
}
@HotReload(value=10, unit = MILLISECONDS, type = ASYNC)
interface OnlyHotReloadAnnotationIsSpecified extends Config, Reloadable {
@DefaultValue("5")
Integer someValue();
}
@Test
public void testShouldNotCauseNullPex() {
OnlyHotReloadAnnotationIsSpecified cfg = ConfigFactory.create(OnlyHotReloadAnnotationIsSpecified.class);
assertEquals(Integer.valueOf(5), cfg.someValue());
}
}
|
[
"luigi.viggiano@newinstance.it"
] |
luigi.viggiano@newinstance.it
|
8f174db0071e89703a0b5312ac3ef45cafa81cfb
|
f7255d2285dc0256be04fe848a914f546d361250
|
/centit-dde-console/src/main/java/com/centit/dde/datafile/ExchangeFileWriter.java
|
bc587169100f56617077e5252bb47b6cfd135b24
|
[] |
no_license
|
thankslife/centit-dde
|
78df5598b1b7d41f8365655cb844b59d1b08cd6e
|
b0fcf6911f7380015d98cf83ad6ea6f7df2241fb
|
refs/heads/master
| 2020-04-29T12:13:22.280360
| 2018-11-16T08:15:43
| 2018-11-16T08:15:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,728
|
java
|
package com.centit.dde.datafile;
import com.centit.support.algorithm.DatetimeOpt;
import com.centit.support.algorithm.ZipCompressor;
import com.centit.support.file.FileSystemOpt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.util.Date;
public class ExchangeFileWriter {
public static final Logger logger = LoggerFactory.getLogger(ExchangeFileWriter.class);
private static final int BUFSIZE = 64 * 1024;
private CharArrayWriter memoryWriter = null;
//metadata
/**
* 文件夹路径
*/
private String filePath;
/**
* 导出任务名称
*/
private String exchangeName;
/**
* 操作人员
*/
private String operator;
/**
* 导出时间
*/
private Date exportTime;
/**
* 数据交换平台ID
*/
private String ddeID;
/**
* 任务序列号
*/
private String taskID;
private BufferedWriter exchangeWriter;
public BufferedWriter getExchangeWriter() {
return exchangeWriter;
}
public void setExchangeWriter(BufferedWriter exchangeWriter) {
this.exchangeWriter = exchangeWriter;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public String getExchangeName() {
return exchangeName;
}
public void setExchangeName(String exchangeName) {
this.exchangeName = exchangeName;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
public Date getExportTime() {
return exportTime;
}
public void setExportTime(Date exportTime) {
this.exportTime = exportTime;
}
public String getDdeID() {
return ddeID;
}
public void setDdeID(String ddeID) {
this.ddeID = ddeID;
}
public String getTaskID() {
return taskID;
}
public void setTaskID(String taskID) {
this.taskID = taskID;
}
/*//data
private List<TableFileWriter> tables;
public List<TableFileWriter> getTables() {
if(tables==null)
tables = new ArrayList<TableFileWriter>();
return tables;
}
public void setTables(List<TableFileWriter> tables) {
this.tables = tables;
}
public void addTable(TableFileWriter table) {
getTables().add(table);
}
*/
public String getExchangeFilePath() {
return filePath + "/" + exchangeName + "/" + exchangeName + taskID;
}
public BufferedWriter prepareWriter() {
BufferedWriter fw = null;
FileSystemOpt.createDirect(filePath + "/" + exchangeName + "/" + exchangeName + taskID);
try {
fw = new BufferedWriter(new FileWriter(
filePath + "/" + exchangeName + "/" + exchangeName + taskID + "/exchange.xml", false));
fw.write("<?xml version=\"1.0\" encoding=\"GBK\"?>\r\n");
} catch (IOException e) {
logger.error("创建并打开输出文件:" + filePath + "/" + exchangeName + "/" + exchangeName + taskID
+ "/" + exchangeName + ".xml 错误:" + e.getMessage());
//e.printStackTrace();
}
closeWriter();
exchangeWriter = fw;
return fw;
}
public BufferedWriter prepareMemoryWriter() {
memoryWriter = new CharArrayWriter(BUFSIZE);
BufferedWriter fw = new BufferedWriter(memoryWriter);
try {
fw.write("<?xml version=\"1.0\" encoding=\"GBK\"?>\r\n");
} catch (IOException e) {
logger.error("创建CharArrayWriter:" + String.valueOf(BUFSIZE) + " 错误:" + e.getMessage());
//e.printStackTrace();
}
closeWriter();
exchangeWriter = fw;
return fw;
}
public String getMemoryDataXML() {
memoryWriter.flush();
return memoryWriter.toString();
}
public void closeWriter() {
try {
if (exchangeWriter != null)
exchangeWriter.close();
} catch (IOException e) {
logger.error("关闭文件:" + filePath + "/" + exchangeName + "/" + exchangeName + taskID
+ "/" + exchangeName + ".xml 错误:" + e.getMessage());
//e.printStackTrace();
}
}
public static void closeWriter(Writer fw) {
try {
if (fw != null)
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public void writeExchangeBegin() {
try {
exchangeWriter.write("<exchange id=\"" + exchangeName + "\" taskid=\"" + taskID
+ "\" ddeid=\"" + ddeID
+ "\" operator=\"" + operator
+ "\" exporttime=\"" + DatetimeOpt.convertDatetimeToString(exportTime) + "\">\r\n");
} catch (IOException e) {
logger.error("写入exchange信息:" + exchangeName + "-" + taskID
+ " 错误:" + e.getMessage());
//e.printStackTrace();
}
}
public void writeDataBegin() {
try {
exchangeWriter.write("<data>\r\n");
} catch (IOException e) {
e.printStackTrace();
}
}
public void writeTableInfo(String tableName) {
try {
exchangeWriter.write("<table name=\"" + tableName +
"\" store=\"infile\" >" +
tableName + ".xml</table>\r\n");
} catch (IOException e) {
logger.error("写入数据文件信息:" + tableName + " 错误:" + e.getMessage());
//e.printStackTrace();
}
}
public void writeDataEnd() {
try {
exchangeWriter.write("</data>\r\n");
} catch (IOException e) {
e.printStackTrace();
}
}
public void writerFlush() {
try {
exchangeWriter.flush();
} catch (IOException e) {
e.printStackTrace();
}
}
public void writeExchangeEnd() {
try {
exchangeWriter.write("</exchange>\r\n");
} catch (IOException e) {
e.printStackTrace();
}
}
public void compressExchangeFile() {
String exchangePath = this.getExchangeFilePath();
//zip.compress(exchangePath+".zip", exchangePath);
ZipCompressor.compressFileInDirectory(exchangePath + ".zip", exchangePath);
//删除导出的临时文件,只要保留压缩后zip文件
FileSystemOpt.deleteDirect(new File(exchangePath));
}
}
|
[
"codefan@centit.com"
] |
codefan@centit.com
|
41875de7fc0c2b0702e1efd46c5b1e24348bdce5
|
9c2b23a2d6da1e762400ae963c1f787c3121eb89
|
/core/com.hundsun.ares.studio.jres.script/src/com/hundsun/ares/studio/jres/script/wrap/IModelScriptWrapExtentionPoint.java
|
5c64f92f184ed31e499665514cc8b99d8e148471
|
[
"MIT"
] |
permissive
|
zhuyf03516/ares-studio
|
5d67757283a52e51100666c9ce35227a63656f0e
|
5648b0f606cb061d06c39ac25b7b206f3307882f
|
refs/heads/master
| 2021-01-11T11:31:51.436304
| 2016-08-11T10:56:31
| 2016-08-11T10:56:31
| 65,444,199
| 0
| 0
| null | 2016-08-11T06:24:33
| 2016-08-11T06:24:32
| null |
UTF-8
|
Java
| false
| false
| 314
|
java
|
package com.hundsun.ares.studio.jres.script.wrap;
public interface IModelScriptWrapExtentionPoint {
public static final String EP_NAME = "scriptpoxyfactory";
public static final String EP_ATTR_ID = "id";
public static final String EP_ATTR_TYPE = "type";
public static final String EP_ATTR_CLASS = "class";
}
|
[
"zhuyf@hundsun.com"
] |
zhuyf@hundsun.com
|
21cdc13ad422cae707fa687e57d867b55abfd04a
|
e237821fc34886bc460b4401897539f2eb4f82e9
|
/src/main/java/com/open/controller/WechatAutoReplyController.java
|
069ca216f07fd86f05a24159f074a3a98f1617ad
|
[] |
no_license
|
raoxiaosi/auto-tool
|
2b6e76c4a5192da35301a1f96270f8caeec3e831
|
ab75fda4ac0aede5b437c59b048b1ba891b132f4
|
refs/heads/master
| 2021-05-21T12:47:42.958493
| 2020-04-03T07:27:13
| 2020-04-03T07:27:13
| 252,659,808
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,547
|
java
|
package com.open.controller;
import com.open.service.WeChatService;
import com.open.util.WeChatUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
/**
* 微信公众号自动回复-前端控制器
*
* @author raojing
* @data 2020/4/3 14:06
*/
@Slf4j
@RestController
@RequestMapping("/wechat")
public class WechatAutoReplyController {
@Resource
private WeChatService weChatService;
@GetMapping(value = "/auto_reply")
public String validate(@RequestParam(value = "signature") String signature,
@RequestParam(value = "timestamp") String timestamp,
@RequestParam(value = "nonce") String nonce,
@RequestParam(value = "echostr") String echostr) {
log.info("微信平台校验服务器接口状态, 参数为u ---> signature:{}, timestamp:{}, nonce:{}, echostr:{}", signature, timestamp, nonce, echostr);
String content = WeChatUtil.checkSignature(signature, timestamp, nonce) ? echostr : null;
log.info("微信平台校验服务器接口状态, 结果为:{}", content);
return content;
}
@PostMapping(value = "/auto_reply")
public String processMsg(HttpServletRequest request) {
// 调用核心服务类接收处理请求
String content = weChatService.processRequest(request);
log.info("自动回复结果为:{}", content);
return content;
}
}
|
[
"1770561005@qq.com"
] |
1770561005@qq.com
|
80b85164af0639fca6d7d59aa6736e8470f592f3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/31/31_e3dee817cdb0b477073317bc5761b729606e6846/ScorePhase/31_e3dee817cdb0b477073317bc5761b729606e6846_ScorePhase_s.java
|
68c16ff6276795267866c2e38474aa4db42e1c5a
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,876
|
java
|
package com.jcloisterzone.game.phase;
import java.util.Map.Entry;
import java.util.Set;
import com.google.common.collect.Sets;
import com.jcloisterzone.Expansion;
import com.jcloisterzone.PointCategory;
import com.jcloisterzone.board.Position;
import com.jcloisterzone.board.Tile;
import com.jcloisterzone.feature.Castle;
import com.jcloisterzone.feature.Cloister;
import com.jcloisterzone.feature.Completable;
import com.jcloisterzone.feature.Feature;
import com.jcloisterzone.feature.Road;
import com.jcloisterzone.feature.visitor.score.CompletableScoreContext;
import com.jcloisterzone.figure.Builder;
import com.jcloisterzone.figure.Meeple;
import com.jcloisterzone.game.Game;
import com.jcloisterzone.game.expansion.BridgesCastlesBazaarsGame;
public class ScorePhase extends Phase {
private Set<Completable> alredyScored = Sets.newHashSet();
public ScorePhase(Game game) {
super(game);
}
private void scoreCompletedOnTile(Tile tile) {
for(Feature feature : tile.getFeatures()) {
if (feature instanceof Completable) {
scoreCompleted((Completable) feature);
}
}
}
private void scoreCompletedNearAbbey(Position pos) {
for(Position offset: Position.ADJACENT.values()) {
Tile tile = getBoard().get(pos.add(offset));
for(Feature feature : tile.getFeatures()) {
//must skip because cloister are check later
//and double trigger is not wanted
if (feature instanceof Cloister) continue;
if (feature instanceof Completable) {
scoreCompleted((Completable) feature);
}
}
}
}
@Override
public void enter() {
Position pos = getTile().getPosition();
scoreCompletedOnTile(getTile());
if (getTile().isAbbeyTile()) {
scoreCompletedNearAbbey(pos);
}
if (game.hasExpansion(Expansion.TUNNEL)) {
Road r = game.getTunnelGame().getPlacedTunnel();
if (r != null) {
scoreCompleted(r);
}
}
for(Tile neighbour : getBoard().getAdjacentAndDiagonalTiles(pos)) {
Cloister cloister = neighbour.getCloister();
if (cloister != null) {
scoreCompleted(cloister);
}
}
if (game.hasExpansion(Expansion.BRIDGES_CASTLES_AND_BAZAARS)) {
BridgesCastlesBazaarsGame bcb = game.getBridgesCastlesBazaarsGame();
for(Entry<Castle, Integer> entry : bcb.getCastleScore().entrySet()) {
scoreCastle(entry.getKey(), entry.getValue());
}
}
alredyScored.clear();
next();
}
protected void undeployMeeples(CompletableScoreContext ctx) {
for(Meeple m : ctx.getMeeples()) {
m.undeploy(false);
}
}
private void scoreCastle(Castle castle, int points) {
Meeple m = castle.getMeeple();
if (m == null) m = castle.getSecondFeature().getMeeple();
m.getPlayer().addPoints(points, PointCategory.CASTLE);
game.fireGameEvent().scored(m.getFeature(), points, points+"", m, false);
m.undeploy(false);
}
private void scoreCompleted(Completable completable) {
CompletableScoreContext ctx = completable.getScoreContext();
completable.walk(ctx);
if (game.hasExpansion(Expansion.TRADERS_AND_BUILDERS)) {
for(Meeple m : ctx.getSpecialMeeples()) {
if (m instanceof Builder && m.getPlayer().equals(game.getActivePlayer())) {
if (! m.getPosition().equals(getTile().getPosition())) {
game.getTradersAndBuildersGame().builderUsed();
}
break;
}
}
}
if (ctx.isCompleted()) {
Completable master = (Completable) ctx.getMasterFeature();
if (! alredyScored.contains(master)) {
alredyScored.add(master);
game.expansionDelegate().scoreCompleted(ctx);
game.scoreCompletableFeature(ctx);
undeployMeeples(ctx);
game.fireGameEvent().completed(master, ctx);
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7ec9fc5f9f6bec55f3722b6ebd125ef176452a64
|
dc9ed460fa10f71863f6b6984839b3110eee1022
|
/app/src/main/java/com/riding/hourseriding/adapter/DrawerAdapter.java
|
8129333362ea53d850f2c41e4e3b1fd0178281fd
|
[] |
no_license
|
raghsahu/HourseRiding
|
6337a951b9b5df16f124f66dc53abc481e1c0a70
|
3d3b96949a93705b3b1d591c893decfa17951728
|
refs/heads/master
| 2022-11-20T02:38:30.667978
| 2020-07-03T11:23:49
| 2020-07-03T11:23:49
| 263,288,341
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,107
|
java
|
package com.riding.hourseriding.adapter;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.recyclerview.widget.RecyclerView;
import com.riding.hourseriding.R;
import com.riding.hourseriding.activity.AllNewsActivity;
import com.riding.hourseriding.fragment.ViewAllNewsFragment;
import com.riding.hourseriding.model.DrawerItem;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Raghvendra Sahu on 09-May-20.
*/
public class DrawerAdapter extends RecyclerView.Adapter<DrawerAdapter.DrawerItemViewHolder>{
Context mContext;
ArrayList<DrawerItem> menuList;
public class DrawerItemViewHolder extends RecyclerView.ViewHolder{
TextView itemTitle;
RelativeLayout rel_item;
public DrawerItemViewHolder(View itemView) {
super(itemView);
itemTitle=itemView.findViewById(R.id.menu_item_title);
rel_item=itemView.findViewById(R.id.relative_item);
}
}//ViewHolder
public DrawerAdapter(Context context, ArrayList<DrawerItem> itemList){
mContext=context;
menuList=itemList;
}
@Override
public DrawerItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v=LayoutInflater.from(parent.getContext()).inflate(R.layout.drawer_list_item,parent,false);
DrawerItemViewHolder dvh=new DrawerItemViewHolder(v);
return dvh;
}
@Override
public void onBindViewHolder(DrawerItemViewHolder holder, int position) {
final DrawerItem currentItem=menuList.get(position);
holder.itemTitle.setText(currentItem.getTitle());
// holder.itemTitle.setTextColor(Color.WHITE);
// holder.itemTitle.setBackgroundColor(Color.BLACK);
holder.rel_item.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ViewAllNewsFragment fragment2 = new ViewAllNewsFragment();
Bundle bundle = new Bundle();
// bundle.putSerializable("MyAddressEdit", dataModel);
bundle.putString("NewsHeading",currentItem.getTitle());
bundle.putString("NewsId",currentItem.getNewsId());
FragmentManager manager = ((FragmentActivity)mContext).getSupportFragmentManager();
FragmentTransaction fragmentTransaction = manager.beginTransaction();
fragmentTransaction.replace(R.id.frame, fragment2);
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
fragment2.setArguments(bundle);
}
});
}
@Override
public int getItemCount() {
return menuList.size();
}
}
|
[
"raghvendra.19934@gmail.com"
] |
raghvendra.19934@gmail.com
|
9ec72350a9f0cf8eeb4e56772e6f41751fa1e606
|
ed6729c5ae1605f7980b0c33bfa96d36825b4440
|
/app/src/main/java/com/example/chatkma/LoginActivity.java
|
a9c967fc6f5a6ddb790c47529063a8fd3ee9065e
|
[] |
no_license
|
caotuan99/kmachatting
|
0c275688f8505fbc9fc04849bf5285be31af08b7
|
dffe2f4b92241a70aa931379de3014b1438d8c8e
|
refs/heads/main
| 2023-09-02T08:35:25.573476
| 2021-11-22T16:23:59
| 2021-11-22T16:23:59
| 430,764,699
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,310
|
java
|
package com.example.chatkma;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.InputType;
import android.util.Patterns;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
public class LoginActivity extends AppCompatActivity {
//Views
EditText mEmailEt, mPasswordEt;
TextView notHaveAccTv, mRecoverPassTV;
Button mLoginBtn;
// khai bao firebase
private FirebaseAuth mAuth;
// progess dialog
ProgressDialog pd;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
// Action Bar and title
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle("Đăng nhập");
// enable back return
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowHomeEnabled(true);
//firebase onCreate()
mAuth = FirebaseAuth.getInstance();
//init
mEmailEt = findViewById(R.id.emailEt);
mPasswordEt = findViewById(R.id.passwordEt);
mLoginBtn = findViewById(R.id.login_btn);
notHaveAccTv = findViewById(R.id.notHaveAccTv);
mRecoverPassTV = findViewById(R.id.RecoverPassTv);
// Xu ly Login button On Click
mLoginBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Nhập dữ liệu
String email = mEmailEt.getText().toString();
String passw=mPasswordEt.getText().toString().trim();
if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()){
// email không hợp lệ, báo lỗi
mEmailEt.setError("Email không hợp lệ");
mEmailEt.setFocusable(true);
}
else {
//Email hợp lệ
loginUser(email, passw);
}
}
});
// Xu ly khong co Account textView
notHaveAccTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, DangKyActivity.class));
finish();
}
});
//quên mật khẩu Textview
mRecoverPassTV.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showRecoverPassWordDialog();
}
});
// init progess dialog
pd = new ProgressDialog(this);
}
private void showRecoverPassWordDialog() {
//AlertDialog
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Lấy lại mật khẩu");
// set Linear layout
LinearLayout linearLayout = new LinearLayout(this);
//view to set in dialog
EditText emailEt = new EditText(this);
emailEt.setHint("Email");
emailEt.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
emailEt.setMinEms(16);
linearLayout.addView(emailEt);
linearLayout.setPadding(10,10,10,10);
builder.setView(linearLayout);
// button lấy mật khẩu
builder.setPositiveButton("Lấy mật khẩu", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//input Email
String email = emailEt.getText().toString().trim();
beginRecovery(email);
}
});
// button Cancel
builder.setNegativeButton("Thoát", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//dimiss dialog
dialog.dismiss();
}
});
//show dialog
builder.create().show();
}
private void beginRecovery(String email) {
// show progess dialog
pd.setMessage("Đang gửi Email...");
pd.show();
mAuth.sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
pd.dismiss();
if (task.isSuccessful()){
Toast.makeText(LoginActivity.this, "Đã gửi Email", Toast.LENGTH_SHORT).show();
}
else {
Toast.makeText(LoginActivity.this, "Thất bại!", Toast.LENGTH_SHORT).show();
}
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
pd.dismiss();
//show proper lỗi mess
Toast.makeText(LoginActivity.this, ""+e.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
private void loginUser(String email, String passw) {
// show progess dialog
pd.setMessage("Đang đăng nhập");
pd.show();
mAuth.signInWithEmailAndPassword(email,passw)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
//dimiss dialog
pd.dismiss();
FirebaseUser user = mAuth.getCurrentUser();
//user đăng nhập, chuyển sang LoginActibity
startActivity(new Intent(LoginActivity.this, DashboardActivity.class));
finish();
} else {
//dimiss dialog
pd.dismiss();
Toast.makeText(LoginActivity.this, "Authentication Failed.", Toast.LENGTH_SHORT).show();
}
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
//dimiss dialog
pd.dismiss();
Toast.makeText(LoginActivity.this,""+e.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
@Override
public boolean onSupportNavigateUp() {
onBackPressed(); // tới hoạt đông trước
return super.onSupportNavigateUp();
}
}
|
[
"you@example.com"
] |
you@example.com
|
abe90c9322d65d565532e0293c7493d156e42d34
|
973daca154a965fa4b0af604b602a24e338f3cc1
|
/src/main/java/br/gov/sp/fazenda/dsen/controller/BackupEmitenteController.java
|
b7555a28236d2aec406502466d5f025786404dee
|
[] |
no_license
|
rbmurussi/nfe310
|
3afdb638fce825a983d59bc7a223d58705420fcd
|
e77cd8d1c2d94e7a51c39c3968dc8f65d30d7382
|
refs/heads/master
| 2021-01-01T17:14:45.682827
| 2017-07-22T15:15:05
| 2017-07-22T15:15:05
| 98,032,550
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,931
|
java
|
/*
* Decompiled with CFR 0_122.
*
* Could not load the following classes:
* br.gov.sp.fazenda.dsen.controller.BackupEmitenteController
* br.gov.sp.fazenda.dsen.controller.BackupEmitenteController$BackupEmitenteWorker
* br.gov.sp.fazenda.dsen.controller.BackupEmitenteController$RestoreEmitenteWorker
* br.gov.sp.fazenda.dsen.model.facade.SistemaFacade
* br.gov.sp.fazenda.dsen.view.BackupEmitenteGUI
* br.gov.sp.fazenda.dsen.view.WindowManager
* br.gov.sp.fazenda.dsge.common.util.DSGEMessageConstants
* br.gov.sp.fazenda.dsge.common.util.StringHelper
* br.gov.sp.fazenda.dsge.controller.DSGEBaseController
* br.gov.sp.fazenda.dsge.view.ViewItf
* br.gov.sp.fazenda.dsge.view.util.FileChooserHelper
*/
package br.gov.sp.fazenda.dsen.controller;
import br.gov.sp.fazenda.dsen.controller.BackupEmitenteController;
import br.gov.sp.fazenda.dsen.model.facade.SistemaFacade;
import br.gov.sp.fazenda.dsen.view.BackupEmitenteGUI;
import br.gov.sp.fazenda.dsen.view.WindowManager;
import br.gov.sp.fazenda.dsge.common.util.DSGEMessageConstants;
import br.gov.sp.fazenda.dsge.common.util.StringHelper;
import br.gov.sp.fazenda.dsge.controller.DSGEBaseController;
import br.gov.sp.fazenda.dsge.view.ViewItf;
import br.gov.sp.fazenda.dsge.view.util.FileChooserHelper;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.io.File;
import java.text.MessageFormat;
import java.util.EventListener;
public class BackupEmitenteController
extends DSGEBaseController {
private BackupEmitenteGUI a;
private static final String a = "EMITENTE.BKP";
private SistemaFacade a;
public BackupEmitenteController(ViewItf view) {
this.a = (BackupEmitenteGUI)view;
this.a.addActionListener((EventListener)this);
this.a = new SistemaFacade();
}
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("procurar")) {
this.a();
} else if (e.getActionCommand().equals("executarBackup") && this.a.getOperacao() == 0) {
this.b();
} else if (e.getActionCommand().equals("executarBackup") && this.a.getOperacao() == 1) {
this.c();
} else if (e.getActionCommand().equals("voltar")) {
this.d();
}
}
private void a() {
String path;
if (0 == this.a.getOperacao()) {
String path2 = FileChooserHelper.chooseDirectory((Component)this.a, (boolean)true, (boolean)true);
if (!StringHelper.isBlankOrNull((Object)path2)) {
this.a.setCaminho(path2 + File.separator + "EMITENTE.BKP");
}
} else if (1 == this.a.getOperacao() && !StringHelper.isBlankOrNull((Object)(path = FileChooserHelper.chooseDirectory((Component)this.a, (boolean)false, (boolean)true)))) {
String fileName = path + File.separator + "EMITENTE.BKP";
File f = new File(fileName);
if (!f.exists()) {
this.a.showMessage(MessageFormat.format(DSGEMessageConstants.ARQUIVO_X_NAO_EXISTE, fileName));
this.a.setCaminho("");
} else if (!f.canRead()) {
this.a.showMessage(MessageFormat.format(DSGEMessageConstants.NAO_EXISTE_PERMISSAO_LEITURA_ARQUIVO_X, fileName));
this.a.setCaminho("");
} else {
this.a.setCaminho(path + File.separator + "EMITENTE.BKP");
}
}
}
private void b() {
new BackupEmitenteWorker(this).execute();
}
private void c() {
new RestoreEmitenteWorker(this).execute();
}
private void d() {
this.a.firePropertyChange("insertEmitente");
WindowManager.getInstance().closePanel();
}
static /* synthetic */ BackupEmitenteGUI a(BackupEmitenteController x0) {
return x0.a;
}
static /* synthetic */ SistemaFacade a(BackupEmitenteController x0) {
return x0.a;
}
}
|
[
"uesr@DESKTOP-G8E4RE1"
] |
uesr@DESKTOP-G8E4RE1
|
32e41d54029d2b81f5b324b0b2c649cc08ca0a2b
|
7d8a1c0ee5fd6a83dd7631952099b7514da268cb
|
/components/mediation-admin/org.wso2.carbon.priority.executors/src/main/java/org/wso2/carbon/priority/executors/util/ConfigHolder.java
|
c705686cf3f92bb3ffdbf2be53cb324506ee29bc
|
[] |
no_license
|
wso2/carbon-mediation
|
cd28ca49623db64dd516a4a9a06265a62c39933d
|
0198213013c724c31b692b2968ba058f4f20361b
|
refs/heads/master
| 2023-09-05T02:36:47.896325
| 2023-08-17T14:17:45
| 2023-08-17T14:17:45
| 16,429,916
| 65
| 397
| null | 2023-08-17T13:50:51
| 2014-02-01T07:01:29
|
Java
|
UTF-8
|
Java
| false
| false
| 2,437
|
java
|
/**
* Copyright (c) 2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.wso2.carbon.priority.executors.util;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.config.SynapseConfiguration;
import org.apache.synapse.core.SynapseEnvironment;
import org.wso2.carbon.registry.core.session.UserRegistry;
/**
*
*/
public class ConfigHolder {
private static ConfigHolder instance;
private static final Log log = LogFactory.getLog(ConfigHolder.class);
private SynapseConfiguration synapseConfiguration;
private SynapseEnvironment synapseEnvironment;
private AxisConfiguration axisConfiguration;
private UserRegistry registry;
private ConfigHolder() {}
public static ConfigHolder getInstance() {
if(instance == null) {
instance = new ConfigHolder();
}
return instance;
}
public SynapseConfiguration getSynapseConfiguration() {
return synapseConfiguration;
}
public void setSynapseConfiguration(SynapseConfiguration synapseConfiguration) {
this.synapseConfiguration = synapseConfiguration;
}
public SynapseEnvironment getSynapseEnvironment() {
return synapseEnvironment;
}
public void setSynapseEnvironment(SynapseEnvironment synapseEnvironment) {
this.synapseEnvironment = synapseEnvironment;
}
public AxisConfiguration getAxisConfiguration() {
return axisConfiguration;
}
public void setAxisConfiguration(AxisConfiguration axisConfiguration) {
this.axisConfiguration = axisConfiguration;
}
public UserRegistry getRegistry() {
return registry;
}
public void setRegistry(UserRegistry registry) {
this.registry = registry;
}
}
|
[
"vanjikumaran@gmail.com"
] |
vanjikumaran@gmail.com
|
80ea792d41b774fdf892877ef5fea05107ff55af
|
781e2692049e87a4256320c76e82a19be257a05d
|
/all_data/cs61bl/lab03/cs61bl-dg/Line2.java
|
98151bce34a80eb7fab947628480047ca233b31e
|
[] |
no_license
|
itsolutionscorp/AutoStyle-Clustering
|
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
|
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
|
refs/heads/master
| 2020-12-11T07:27:19.291038
| 2016-03-16T03:18:00
| 2016-03-16T03:18:42
| 59,454,921
| 4
| 0
| null | 2016-05-23T05:40:56
| 2016-05-23T05:40:56
| null |
UTF-8
|
Java
| false
| false
| 775
|
java
|
import java.awt.Point;
public class Line2 {
Point p1, p2;
void printLength() {
double length;
length = Math.sqrt (Math.pow(p1.getX() - p2.getX(), 2) + Math.pow(p1.getY() - p2.getY(), 2)) ;
System.out.println ("Line length is " + length);
}
void printAngle() {
double angleInDegrees = Math.atan2 (p2.getY() - p1.getY(), p2.getX() - p1.getX()) * 180.0 / Math.PI;
System.out.println ("Angle is " + angleInDegrees + " degrees");
}
public static void main(String[] args) {
System.out.println ("testing Line2");
Line2 myLine = new Line2();
myLine.p1 = new Point(5, 10);
myLine.p2 = new Point(45, 40);
myLine.printLength();
myLine.printAngle();
}
}
|
[
"moghadam.joseph@gmail.com"
] |
moghadam.joseph@gmail.com
|
9510a1605ad88da55ffb3c81695b1da3019cb517
|
970c66f95a1817f5fe13a0f8fb6625926c03ad03
|
/souyun/app/src/main/java/com/xrwl/owner/mysign/mydatepicker/DPMode.java
|
c04411030e754d0cd6d933dd57eb1d9807c8d923
|
[] |
no_license
|
l331258747/souyun
|
97237346f8680c4458b02d275e97a212cf203520
|
5cc45537c73bea6536869e4a130efba910bc948d
|
refs/heads/master
| 2023-04-23T08:51:30.949151
| 2021-05-15T08:42:21
| 2021-05-15T08:42:21
| 323,032,997
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 261
|
java
|
package com.xrwl.owner.mysign.mydatepicker;
/**
* 日期选择模式
* 支持单选和多选和展示
* Date select mode
* Support SINGLE or MULTIPLE or Display only.
*
* @author AigeStudio 2015-07-02
*/
public enum DPMode {
SINGLE, MULTIPLE, NONE
}
|
[
"331258747@qq.com"
] |
331258747@qq.com
|
cf31b53ad5dfe9912d47343857cd1a05d27579b8
|
32a76440a3869ca52f2ce5ee298397a5c3274045
|
/client/src/test/java/com/huayun/option/controller/PositionControllerTest.java
|
6e69da10c066fc231311215ca6d75738252ef314
|
[] |
no_license
|
yuzhihui199229/option
|
8f816e1311a94596428a312c2cd3e9372c1592c6
|
38e0e3950a8619aa985aed37536abcf2bac6b9fe
|
refs/heads/master
| 2023-08-14T12:37:59.751710
| 2021-10-12T01:44:21
| 2021-10-12T01:44:21
| 402,361,391
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,861
|
java
|
package com.huayun.option.controller;
import com.huayun.option.request.ReqOptionPosition;
import com.huayun.option.utils.JsonUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import java.nio.charset.Charset;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@AutoConfigureMockMvc
@Slf4j
class PositionControllerTest {
@Autowired
private MockMvc mockMvc;
@Test
@DisplayName("期权持仓查询")
void getOptionPositionList() throws Exception {
String token = UserControllerTest.readTokenFromTxt("token.txt");
String uuserID = UserControllerTest.readTokenFromTxt("uuserID.txt");
//封装请求的数据
ReqOptionPosition request = new ReqOptionPosition();
request.setToken(token);
MvcResult mvcResult = mockMvc.perform(
//请求的方法
post("/position/getOptionPositionList/"+uuserID)
//输入的数据类型
.contentType(MediaType.APPLICATION_JSON)
//输入的数据
.content(JsonUtil.objectToJson(request)))
//获取返回值
.andReturn();
//将返回值转化为对象打印出来
log.info(mvcResult.getResponse().getContentAsString(Charset.defaultCharset()));
}
}
|
[
"844370396@qq.com"
] |
844370396@qq.com
|
ad0ec54f777032b1441e1b400a624b639a8e5792
|
702674cd6456486025a08a9a081a41aff6fdfb09
|
/app/src/main/java/com/tsyc/tianshengyoucai/ui/fragment/selectobserver/ChangerObserver.java
|
22d369c51173f13009aeb06521062677fb9ae7a4
|
[] |
no_license
|
yufeilong92/2019-9-12
|
b9730b128e6bdf37bc7dd007559e0ec15e4c46ed
|
ac9c14467ea6e513c057062880da2b193b4eff86
|
refs/heads/master
| 2020-07-24T12:58:51.588137
| 2019-09-12T02:08:21
| 2019-09-12T02:08:21
| 207,935,624
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 437
|
java
|
package com.tsyc.tianshengyoucai.ui.fragment.selectobserver;
import com.tsyc.tianshengyoucai.vo.SelectVo;
import java.util.List;
/**
* @Author : YFL is Creating a porject in PC$
* @Email : yufeilong92@163.com
* @Time :2019/9/6 14:12
* @Purpose :
*/
public interface ChangerObserver {
public abstract void updateData(List<SelectVo> mEduList, List<SelectVo> mExpList, List<SelectVo> mMoneyList, List<SelectVo> mStatusList);
}
|
[
"931697478@qq.com"
] |
931697478@qq.com
|
ddc961ab9b6e634c19ebac35eff488b90fd59b30
|
abdd250f08896a56f8699d1e7aa731f1a67f570a
|
/android/app/src/main/java/com/danbuild210217_dev_19532/MainActivity.java
|
f0d056b065d3db43d523818e44fc23bc9556ad14
|
[] |
no_license
|
crowdbotics-apps/danbuild210217-dev-19532
|
f2f59d5d7e7c2950cb897440a6eb3542af7b3c95
|
fbe2a41d81cd96f863368035e74bf7862dc7edda
|
refs/heads/master
| 2023-03-04T11:14:04.688970
| 2021-02-17T16:23:44
| 2021-02-17T16:23:44
| 339,783,475
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 390
|
java
|
package com.danbuild210217_dev_19532;
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 "danbuild210217_dev_19532";
}
}
|
[
"team@crowdbotics.com"
] |
team@crowdbotics.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.