blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2 values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 132 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 28 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 352 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
59c226e7ab6f1b373e76275c3d1e5e2a812583d6 | f0eb60df33b891d6ced12be090efa08ca4771a71 | /speed_hd_imap/speed_admin/src/main/java/com/gjdt/modules/entity/Role.java | a6f8d0caa8810f69aeb4c97a81c5dc11f3d10285 | [] | no_license | 1912390705/speed | 0613480e498a1c0384e8cf77071f37c0d6b0306a | b2f8824ebc5f4c04f8bf7e350761257f0ad8c5af | refs/heads/master | 2022-12-10T16:11:26.396243 | 2020-09-10T02:34:56 | 2020-09-10T02:34:56 | 293,756,170 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 212 | java | package com.gjdt.modules.entity;
import lombok.Data;
@Data
public class Role {
private Integer id; //角色id
private String role_Name; //角色名称
private int role_type; //角色属性
}
| [
"1912390705@qq.com"
] | 1912390705@qq.com |
2d064f95e9251791d6e5c0579fc77847d5875509 | 73ded453d98155f9a71efb724e62e2269e89a110 | /app/src/main/java/com/example/gagyi/test/UserInterface.java | 94e1ecd1a7839bb826f560406df1aa1aa3bbfd7f | [] | no_license | gagyir/License | d8487002b8a41346c4fd7e99fb018975ae79c221 | 6592795351a2e67c44ff9eb6db13418e1993d804 | refs/heads/master | 2021-08-14T17:19:00.452583 | 2017-11-16T09:46:58 | 2017-11-16T09:46:58 | 110,508,999 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,701 | java | package com.example.gagyi.test;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageSwitcher;
import android.widget.ImageView;
import android.widget.ViewSwitcher;
public class UserInterface extends AppCompatActivity {
private ImageSwitcher imgsw;
private ImageButton prev;
private ImageButton next;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_interface);
imgsw = (ImageSwitcher) findViewById(R.id.imgsw);
imgsw.setFactory(new ViewSwitcher.ViewFactory() {
@Override
public View makeView() {
ImageView imageView = new ImageView(getApplicationContext());
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
return imageView;
}
});
imgsw.setImageResource(R.drawable.common_google_signin_btn_text_light_pressed);
prev = (ImageButton) findViewById(R.id.imageButton);
next = (ImageButton) findViewById(R.id.imageButton4);
prev.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
imgsw.setImageResource(R.drawable.common_google_signin_btn_icon_dark_normal);
}
});
next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
imgsw.setImageResource(R.drawable.common_google_signin_btn_text_light_pressed);
}
});
}
}
| [
"zalan.gagyi@gmail.com"
] | zalan.gagyi@gmail.com |
a0b9919e43b8aeeb03d28c52a8389f09f7af28e5 | 72c34665da241b3ecdb55a96002d4768bd6096c6 | /app/src/main/java/com/example/dell/booksearchapp/activities/SplashScreen.java | 0c529c1005b6e4d15d2a0671c264aee67645f80c | [] | no_license | Shehab-Alaa/BookSearchApp | 16de81e165bf4df3678d39470062a012e7494543 | d90d0c8d45f99d67e9e611062c865f36efc2e8ed | refs/heads/master | 2022-04-12T12:25:27.323999 | 2020-02-11T21:21:46 | 2020-02-11T21:21:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,914 | java | package com.example.dell.booksearchapp.activities;
import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import com.example.dell.booksearchapp.R;
public class SplashScreen extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
fullScreenApp();
setContentView(R.layout.activity_splash_screen);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent homeIntent = new Intent(SplashScreen.this , MainActivity.class);
startActivity(homeIntent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
finish();
}
} , 1000 );
}
private void fullScreenApp()
{
final int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
getWindow().getDecorView().setSystemUiVisibility(flags);
final View decorView = getWindow().getDecorView();
decorView
.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener()
{
@Override
public void onSystemUiVisibilityChange(int visibility)
{
if((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0)
{
decorView.setSystemUiVisibility(flags);
}
}
});
}
}
| [
"39988066+ShehabElmasry@users.noreply.github.com"
] | 39988066+ShehabElmasry@users.noreply.github.com |
3c03c00e5bc5b4e6526e2d11a068a2a3f89e0af1 | 9df3ad2ab79b27c02793baa0b07edad06781bf8e | /numbers/src/main/java/com/aor/numbers/ListFilterer.java | 6d8170bbc8b9a23dcb4c81a0e6f74ae43d7f2453 | [
"MIT"
] | permissive | pemesteves/LPOO_1819 | de6914b8e8a3d297c7e56d2991fa564375c2b07b | f3a272cc0176397fb8f8815275207a8f17227bc2 | refs/heads/master | 2020-04-28T05:21:24.289746 | 2020-02-13T22:32:16 | 2020-02-13T22:32:16 | 175,016,808 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 459 | java | package com.aor.numbers;
import java.util.ArrayList;
import java.util.List;
public class ListFilterer {
List<Integer> list;
ListFilterer(List<Integer> list){
this.list = list;
}
public List<Integer> filter(IListFilter filter){
List<Integer> newList = new ArrayList<>();
for(Integer number : list){
if(filter.accept(number))
newList.add(number);
}
return newList;
}
}
| [
"up201705160@fe.up.pt"
] | up201705160@fe.up.pt |
cd860f1180e4dbf684ac31d0605de2511945a1fc | 359ffdd1c72d63472d03b8fb142adfe0ac69ca80 | /DP/buy_AndSellStock_InfiniteTransactions.java | 939de597db4f18d7a6201fd94ea705cdb3ee1ab2 | [] | no_license | surajkd786/problem_solving | d00bb10d083c2cd7517bdf69a376a0c05e8dc315 | 41fd9c9b4baa8ecc5a786ce0d46406a4c90a5fe3 | refs/heads/main | 2023-07-29T21:45:59.203715 | 2021-10-01T19:11:31 | 2021-10-01T19:11:31 | 412,582,702 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,130 | java |
/*1. You are given a number n, representing the number of days.
2. You are given n numbers, where ith number represents price of stock on ith day.
3. You are required to print the maximum profit you can make if you are allowed infinite transactions.
Note - There can be no overlapping transaction. One transaction needs to be closed (a buy followed by a sell) before opening another transaction (another buy)*/
import java.io.*;
import java.util.*;
public class buy_AndSellStock_InfiniteTransactions {
public static void main(String[] args) throws Exception {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int[] arr = new int[n];
for (int i = 0; i < arr.length; i++) {
arr[i] = scn.nextInt();
}
int bd = 0;
int sd = 0;
int profit = 0;
for (int i = 1; i < n; i++) {
if (arr[i] > arr[i - 1]) {
sd++;
} else {
profit += arr[sd] - arr[bd];
bd = sd = i;
}
}
profit += arr[sd] - arr[bd];
System.out.println(profit);
}
} | [
"qqqqrrree@gmail.com"
] | qqqqrrree@gmail.com |
eb89c12259096483510961dea2eb173e9cb2c111 | d3bf4dfd7b48597f13f656a1f28eca1e79c1cb2a | /smilife/smilife_web/src/main/java/com/iskyshop/core/tools/ClientInfo.java | 599f28c325e1834ff7fc3113625d2909f07eb91d | [] | no_license | zengchi/project | 6a5b0d71ec6e7bcc8d32380509b34d9eebbe1ed7 | a72c4aabb260bca8d2e340f2262d2f6c53f98898 | refs/heads/master | 2021-04-08T14:37:56.661873 | 2017-12-23T02:42:31 | 2017-12-23T02:42:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,211 | java | package com.iskyshop.core.tools;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
* <p>
* Title: ClientInfo.java
* </p>
*
* <p>
* Description: 返回客户端信息工具类
* </p>
*
* <p>
* Copyright: Copyright (c) 2014
* </p>
*
* <p>
* Company: 沈阳网之商科技有限公司 www.iskyshop.com
* </p>
*
* @author erikzhang
*
* @date 2014-4-24
*
* @version iskyshop_b2b2c v2.0 2015版
*/
public class ClientInfo {
private String info = "";
private String explorerVer = "未知";
private String OSVer = "未知";
/*
* 构造函数 参数:String request.getHeader("user-agent")
*
* IE7:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729;
* .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C) IE8:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0;
* SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C) Maxthon:Mozilla/4.0
* (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729;
* Media Center PC 6.0; .NET4.0C; Maxthon 2.0) firefox:Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.11)
* Gecko/20101012 Firefox/3.6.11 Chrome:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like
* Gecko) Chrome/7.0.517.44 Safari/534.7 Opera:Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.6.30 Version/10.63
*
* 操作系统: Win7 : Windows NT 6.1 WinXP : Windows NT 5.1
*/
public ClientInfo(String info) {
this.info = info;
}
/*
* 获取核心浏览器名称
*/
public String getExplorerName() {
String str = "未知";
Pattern pattern = Pattern.compile("");
Matcher matcher;
if (info.indexOf("MSIE") != -1) {
str = "MSIE"; // 微软IE
pattern = Pattern.compile(str + "\\s([0-9.]+)");
} else if (info.indexOf("Firefox") != -1) {
str = "Firefox"; // 火狐
pattern = Pattern.compile(str + "\\/([0-9.]+)");
} else if (info.indexOf("Chrome") != -1) {
str = "Chrome"; // Google
pattern = Pattern.compile(str + "\\/([0-9.]+)");
} else if (info.indexOf("Opera") != -1) {
str = "Opera"; // Opera
pattern = Pattern.compile("Version\\/([0-9.]+)");
}
matcher = pattern.matcher(info);
if (matcher.find())
explorerVer = matcher.group(1);
return str;
}
/*
* 获取核心浏览器版本
*/
public String getExplorerVer() {
return this.explorerVer;
}
/*
* 获取浏览器插件名称(例如:遨游、世界之窗等)
*/
public String getExplorerPlug() {
String str = "无";
if (info.indexOf("Maxthon") != -1)
str = "Maxthon"; // 遨游
return str;
}
/*
* 获取操作系统名称
*/
public String getOSName() {
String str = "未知";
Pattern pattern = Pattern.compile("");
Matcher matcher;
if (info.indexOf("Windows") != -1) {
str = "Windows"; // Windows NT 6.1
pattern = Pattern.compile(str + "\\s([a-zA-Z0-9]+\\s[0-9.]+)");
}
matcher = pattern.matcher(info);
if (matcher.find())
OSVer = matcher.group(1);
return str;
}
/*
* 获取操作系统版本
*/
public String getOSVer() {
return this.OSVer;
}
} | [
"32216688+henry90821@users.noreply.github.com"
] | 32216688+henry90821@users.noreply.github.com |
2d21452c0e29df9cf78ec2595859ea412cb7a88f | 77fca294ace1850a66a4778f033d16281f648911 | /autosparql/src/main/java/org/dllearner/autosparql/client/widget/InteractivePanel.java | 8512a2aa729b76255b72f6dc2f1da7c674990beb | [] | no_license | mielvds/AutoSPARQL | a39915892726886c8991c54ab9b06a35c86285c6 | a780a52c3f1328111b0ceae1f36c887370d176e1 | refs/heads/master | 2020-12-25T09:38:21.985364 | 2013-02-20T11:37:17 | 2013-02-20T11:37:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,868 | java | package org.dllearner.autosparql.client.widget;
import java.util.ArrayList;
import java.util.List;
import org.dllearner.autosparql.client.AppEvents;
import org.dllearner.autosparql.client.SPARQLService;
import org.dllearner.autosparql.client.model.Example;
import com.extjs.gxt.ui.client.Style.Orientation;
import com.extjs.gxt.ui.client.core.XTemplate;
import com.extjs.gxt.ui.client.data.BaseListLoader;
import com.extjs.gxt.ui.client.data.BaseLoader;
import com.extjs.gxt.ui.client.data.BasePagingLoader;
import com.extjs.gxt.ui.client.data.ListLoadResult;
import com.extjs.gxt.ui.client.data.LoadEvent;
import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.data.PagingLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.extjs.gxt.ui.client.data.RpcProxy;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.LoadListener;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.mvc.AppEvent;
import com.extjs.gxt.ui.client.mvc.Dispatcher;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.Text;
import com.extjs.gxt.ui.client.widget.VerticalPanel;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.extjs.gxt.ui.client.widget.grid.ColumnData;
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
import com.extjs.gxt.ui.client.widget.grid.Grid;
import com.extjs.gxt.ui.client.widget.grid.GridCellRenderer;
import com.extjs.gxt.ui.client.widget.grid.RowExpander;
import com.extjs.gxt.ui.client.widget.layout.RowData;
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
import com.extjs.gxt.ui.client.widget.toolbar.PagingToolBar;
import com.google.gwt.event.dom.client.ErrorEvent;
import com.google.gwt.event.dom.client.ErrorHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Image;
public class InteractivePanel extends ContentPanel {
private static final int WIDTH = 500;
private static final int HEIGHT = 300;
private ListStore<Example> examplesStore;
private BaseListLoader<ListLoadResult<ModelData>> loader;
private List<String> posExamples;
private List<String> negExamples;
public InteractivePanel(){
setLayout(new RowLayout(Orientation.VERTICAL));
setHeading("Interactive");
setCollapsible(true);
setAnimCollapse(false);
setSize(WIDTH, HEIGHT);
// collapse();
add(new Text("<strong class=\"is-headline add-padding\">Should this belong to query result?</strong>"), new RowData(1, -1));
createExampleGrid();
}
private void createExampleGrid(){
RpcProxy<Example> proxy = new RpcProxy<Example>() {
@Override
protected void load(Object loadConfig,
AsyncCallback<Example> callback) {
SPARQLService.Util.getInstance().getSimilarExample(posExamples, negExamples, callback);
}
};
loader = new BaseListLoader<ListLoadResult<ModelData>>(proxy);
loader.addLoadListener(new LoadListener(){
@Override
public void loaderLoad(LoadEvent le) {
Dispatcher.forwardEvent(AppEvents.UpdateResultTable);
super.loaderLoad(le);
}
});
examplesStore = new ListStore<Example>(loader);
ArrayList<ColumnConfig> columns = new ArrayList<ColumnConfig>();
XTemplate tpl = XTemplate.create("<p><b>Comment:</b><br>{comment}</p><p><a href = \"{uri}\" target=\"_blank\"/>Link to resource page</a>");
RowExpander expander = new RowExpander();
expander.setTemplate(tpl);
columns.add(expander);
GridCellRenderer<Example> imageRender = new GridCellRenderer<Example>() {
@Override
public Object render(Example model, String property,
ColumnData config, int rowIndex, int colIndex,
ListStore<Example> store, Grid<Example> grid) {
String imageURL = model.getImageURL().isEmpty() ? "no_images.jpeg" : model.getImageURL();
final Image image = new Image(imageURL);
image.addErrorHandler(new ErrorHandler() {
@Override
public void onError(ErrorEvent event) {
image.setUrl("no_images.jpeg");
}
});
image.setPixelSize(40, 40);
return image;
}
};
ColumnConfig c = new ColumnConfig();
c.setId("imageURL");
columns.add(c);
c.setWidth(50);
c.setRenderer(imageRender);
c = new ColumnConfig();
c.setId("label");
columns.add(c);
GridCellRenderer<Example> buttonRender = new GridCellRenderer<Example>() {
@Override
public Object render(final Example model, String property,
ColumnData config, int rowIndex, int colIndex,
ListStore<Example> store, Grid<Example> grid) {
VerticalPanel p = new VerticalPanel();
p.setSize(25, 50);
Button addPosButton = new Button("+");
addPosButton.addStyleName("button-positive");
addPosButton.setSize(20, 20);
addPosButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
AppEvent event = new AppEvent(AppEvents.AddExample, model);
event.setData("type", Example.Type.POSITIVE);
event.setData("example", model);
Dispatcher.forwardEvent(event);
examplesStore.remove(model);
}
});
Button addNegButton = new Button("–");
addNegButton.addStyleName("button-negative");
addNegButton.setSize(20, 20);
addNegButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
AppEvent event = new AppEvent(AppEvents.AddExample, model);
event.setData("type", Example.Type.NEGATIVE);
event.setData("example", model);
Dispatcher.forwardEvent(event);
examplesStore.remove(model);
}
});
p.add(addPosButton);
p.add(addNegButton);
return p;
}
};
c = new ColumnConfig();
c.setId("");
c.setWidth(50);
c.setRenderer(buttonRender);
columns.add(c);
ColumnModel cm = new ColumnModel(columns);
Grid<Example> grid = new Grid<Example>(examplesStore, cm);
grid.setHideHeaders(true);
grid.setAutoExpandColumn("label");
grid.setLoadMask(true);
grid.addPlugin(expander);
grid.getView().setEmptyText("");
// grid.getView().setShowDirtyCells(showDirtyCells)
add(grid, new RowData(1, 1));
}
public void setExample(Example example){
examplesStore.removeAll();
examplesStore.add(example);
}
public void setExamples(List<Example> examples){
examplesStore.removeAll();
examplesStore.add(examples);
}
public void showNextSimilarExample(List<String> posExamples, List<String> negExamples){
this.posExamples = posExamples;
this.negExamples = negExamples;
loader.load();
}
}
| [
"buehmann@informatik.uni-leipzig.de"
] | buehmann@informatik.uni-leipzig.de |
50bdb1b2855e48839a98b4e340febda99bc81570 | 0b57e082ace18a2f6660b78b8bf0a5962c88ff0e | /MicroService/src/main/java/com/acc/customexception/LoginException.java | 649c6e939fe86439e7f89d0d14f4bc64b937039e | [] | no_license | Sharifahmar/BookingApp | f4927a0d7b8550e757ae98346dc2bf89e69fb822 | 701045a5f706e6b18609347a7d41110fc41a663f | refs/heads/master | 2021-09-04T05:16:04.099164 | 2018-01-16T07:48:38 | 2018-01-16T07:48:38 | 116,017,159 | 0 | 0 | null | 2018-01-03T13:20:03 | 2018-01-02T13:19:05 | Java | UTF-8 | Java | false | false | 637 | java | package com.acc.customexception;
public class LoginException extends UserInfoNotFound {
/**
*
*/
private static final long serialVersionUID = 1L;
public LoginException() {
super();
}
public LoginException(String message, Throwable cause,
boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
public LoginException(String message, Throwable cause) {
super(message, cause);
}
public LoginException(String message) {
super(message);
}
public LoginException(Throwable cause) {
super(cause);
}
}
| [
"ahmar.akhtar.sharif@P5-GKXKX52.dir.svc.accenture.com"
] | ahmar.akhtar.sharif@P5-GKXKX52.dir.svc.accenture.com |
8319431d5e19a3088f58a0de6c722065c1e73772 | 786bf11033859384ecdc6586b4e605b574e231c8 | /src/main/java/hello/HelloController.java | ae3c86eb7f97ea34159c2186ea8cbb24cc16dc85 | [] | no_license | de-silva-88/spring-boot-test | 737a537896eda15f2104c72cd0abd8b19e8044c5 | ffa251b13283261ce8a6224ca76cfe0fa09e8574 | refs/heads/master | 2021-08-23T01:43:59.147999 | 2017-12-02T07:48:03 | 2017-12-02T07:48:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 400 | java | package hello;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
@RestController
@RequestMapping("boot-ex")
public class HelloController {
@RequestMapping("/")
public String index() {
System.out.println("index service invoked after jenkins-deploy");
return "Greetings from Spring Boot!";
}
}
| [
"snjaya89@gmail.com"
] | snjaya89@gmail.com |
91093fec34633ebd3d0f0b9eca071da50c30b0f9 | f91b48f7c8156411e0126c5aae8f5fb59c8dd1ae | /atm-service/src/main/java/com/neueda/test/atm/controller/errorHandler/ATMServiceApiError.java | 6a242b64cf33472f027dd64cb4fb2bbfe780f4e9 | [] | no_license | anubhavanand/atm-system | 659da82bc112fe09f6029621755d90945685f77e | 8c6bb40605a3dbdc99c99cc54cbc67564b3dc0df | refs/heads/master | 2023-07-06T03:12:55.172022 | 2021-08-08T12:36:02 | 2021-08-08T12:36:02 | 391,132,512 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 334 | java | package com.neueda.test.atm.controller.errorHandler;
import org.springframework.http.HttpStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
*
* @author Anubhav.Anand
*
*/
@Data
@AllArgsConstructor
public class ATMServiceApiError {
private final HttpStatus status;
private final String message;
}
| [
"anubhavanand85@gmail.com"
] | anubhavanand85@gmail.com |
8f9cd2622988d170d340818a2237bfbe97872a53 | c2ae825f06676b5234fb29c277540ba177f772cc | /app/src/main/java/zd/cn/novipvideo/widget/listener/QualityValue.java | 92d33857dc679574c30eecc828caf1b44f334a67 | [] | no_license | Zandermei/NoVip | 489dc53b1410a6357394b8d18557e48c1fc83f09 | 2938f703d92f0eba8919ba78535134826826ec64 | refs/heads/master | 2022-11-19T15:11:46.635406 | 2020-06-23T09:20:51 | 2020-06-23T09:20:51 | 264,626,593 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 531 | java | package zd.cn.novipvideo.widget.listener;
public class QualityValue {
public static final String QUALITY_INVALIDATE = "";
public static final String QUALITY_FLUENT = "FD";
public static final String QUALITY_LOW = "LD";
public static final String QUALITY_STAND = "SD";
public static final String QUALITY_HIGH = "HD";
public static final String QUALITY_2K = "2K";
public static final String QUALITY_4K = "4K";
public static final String QUALITY_ORIGINAL = "OD";
public QualityValue(){
}
}
| [
"643348353@qq.com"
] | 643348353@qq.com |
f18965aebaf6cec965b78dd4c417fda1138fb940 | a11fe1dd90605b073b40a5ba2f3117040c9d3a71 | /src/com/student/servlet/AddStudentServlet.java | 4bfb801c287b8038f54666aa89bf287a60e96fd6 | [] | no_license | Tiana1user/StudentManagement | 913bfbca27792809e5c0161a0fa79471e74acc68 | 4589128230d27a144d34285a90bdd8fd012d8b46 | refs/heads/master | 2023-01-03T14:16:54.675357 | 2020-10-28T11:05:50 | 2020-10-28T11:05:50 | 308,198,275 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,422 | java | /*
@author NB
@date 2019/3/27 - 10:37
*/
package com.student.servlet;
import com.student.entity.Student;
import com.student.service.IStudentService;
import com.student.service.impl.StudentServiceImpl;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
public class AddStudentServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
int sno = Integer.parseInt(request.getParameter("sno"));
String sname = request.getParameter("sname");
int sage = Integer.parseInt(request.getParameter("sage"));
String saddress = request.getParameter("saddress");
String sclass = request.getParameter("sclass");
String smajor = request.getParameter("smajor");
Student student = new Student(sno,sname,sage,saddress,sclass,smajor);
IStudentService studentService = new StudentServiceImpl();
boolean result = studentService.addStudent(student);
/*
* out request response session application
* out: PrintWriter out = response.getWriter();
* session: request.getSession();
* application: request.getServletContext();
*/
//设置响应编码 在out响应之前设置
response.setContentType("text/html; charset=UTF-8");
response.setCharacterEncoding("utf-8");
PrintWriter out = null;
// if(result){
// //out:jsp内置对象
// out = response.getWriter();
// out.print("增加成功!");
// response.sendRedirect("QueryAllStudentServlet");
// }else{
// out.print("增加失败!");
// }
if (!result){
request.setAttribute("error","addError");//添加失败返回addError
}else {
request.setAttribute("error", "noaddError");//添加成功返回noaddError
}
request.getRequestDispatcher("QueryStudentByPageServlet").forward(request,response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request,response);
}
}
| [
"995181673@qq.com"
] | 995181673@qq.com |
d7da884150111032076586e2c50d94c2787e8095 | 1ab7ff15c3f17d03a437a68af4cc5101ae4f286c | /src/main/java/org/covid19/contactbase/model/SpatialTemporalStamp.java | 83a3cfb8aeabdaccfba460d6c2f86a88fbcdb395 | [
"MIT"
] | permissive | Covid-Response-Group/contactbase | a2d26c5da31ec7ed9b488ba093d38894195c7dd4 | ab9ef2746fe0e81b014fe44edb0ff41e93c3123e | refs/heads/master | 2021-05-17T03:12:46.064894 | 2020-04-02T14:58:12 | 2020-04-02T14:58:12 | 250,592,890 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,194 | java | package org.covid19.contactbase.model;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
public class SpatialTemporalStamp implements Serializable {
@NotBlank
private String geohash;
@NotBlank
private String dateStamp;
public SpatialTemporalStamp() {
}
public SpatialTemporalStamp(@NotBlank String geohash, @NotBlank String dateStamp) {
this.geohash = geohash;
this.dateStamp = dateStamp;
}
public static SpatialTemporalStamp fromString(String spatialTemporalStampString) {
String[] components = spatialTemporalStampString.split("/");
if (components.length != 2) {
return null;
}
return new SpatialTemporalStamp(components[0], components[1]);
}
public String getGeohash() {
return geohash;
}
public void setGeohash(String geohash) {
this.geohash = geohash;
}
public String getDateStamp() {
return dateStamp;
}
public void setDateStamp(String dateStamp) {
this.dateStamp = dateStamp;
}
@Override
public String toString() {
return this.geohash + "/" + this.dateStamp;
}
}
| [
"mail@somsubhra.com"
] | mail@somsubhra.com |
e8e7cc7cac520dafd3eb1c73742f5fdd4e4849a8 | 0ea393d2b78dd6f4c77e26f85e98205657c24fb7 | /changgou_service_api/changgou_service_order_api/src/main/java/com/changgou/order/pojo/Order.java | 7f8430dbb50822afedf4fd8fb88aaafc85ad6c85 | [] | no_license | WAYLON/changgou_parent | a53a9d5f9edbfc6cb6526a444d0d3e9f668cae9d | 41144d44a3ff4e1e5a08fc0e12933f8431fc4118 | refs/heads/master | 2022-06-23T01:12:21.320101 | 2020-05-26T03:18:11 | 2020-05-26T03:18:11 | 254,568,655 | 1 | 0 | null | 2022-06-17T03:06:14 | 2020-04-10T07:11:37 | JavaScript | UTF-8 | Java | false | false | 6,228 | java | package com.changgou.order.pojo;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/**
* order实体类
*
* @author 黑马架构师2.5
*/
@Table(name = "tb_order")
public class Order implements Serializable {
@Id
private String id;//订单id
private Integer totalNum;//数量合计
private Integer totalMoney;//金额合计
private Integer preMoney;//优惠金额
private Integer postFee;//邮费
private Integer payMoney;//实付金额
private String payType;//支付类型,1、在线支付、0 货到付款
private java.util.Date createTime;//订单创建时间
private java.util.Date updateTime;//订单更新时间
private java.util.Date payTime;//付款时间
private java.util.Date consignTime;//发货时间
private java.util.Date endTime;//交易完成时间
private java.util.Date closeTime;//交易关闭时间
private String shippingName;//物流名称
private String shippingCode;//物流单号
private String username;//用户名称
private String buyerMessage;//买家留言
private String buyerRate;//是否评价
private String receiverContact;//收货人
private String receiverMobile;//收货人手机
private String receiverAddress;//收货人地址
private String sourceType;//订单来源:1:web,2:app,3:微信公众号,4:微信小程序 5 H5手机页面
private String transactionId;//交易流水号
private String orderStatus;//订单状态
private String payStatus;//支付状态
private String consignStatus;//发货状态
private String isDelete;//是否删除
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getTotalNum() {
return totalNum;
}
public void setTotalNum(Integer totalNum) {
this.totalNum = totalNum;
}
public Integer getTotalMoney() {
return totalMoney;
}
public void setTotalMoney(Integer totalMoney) {
this.totalMoney = totalMoney;
}
public Integer getPreMoney() {
return preMoney;
}
public void setPreMoney(Integer preMoney) {
this.preMoney = preMoney;
}
public Integer getPostFee() {
return postFee;
}
public void setPostFee(Integer postFee) {
this.postFee = postFee;
}
public Integer getPayMoney() {
return payMoney;
}
public void setPayMoney(Integer payMoney) {
this.payMoney = payMoney;
}
public String getPayType() {
return payType;
}
public void setPayType(String payType) {
this.payType = payType;
}
public java.util.Date getCreateTime() {
return createTime;
}
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
public java.util.Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(java.util.Date updateTime) {
this.updateTime = updateTime;
}
public java.util.Date getPayTime() {
return payTime;
}
public void setPayTime(java.util.Date payTime) {
this.payTime = payTime;
}
public java.util.Date getConsignTime() {
return consignTime;
}
public void setConsignTime(java.util.Date consignTime) {
this.consignTime = consignTime;
}
public java.util.Date getEndTime() {
return endTime;
}
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
public java.util.Date getCloseTime() {
return closeTime;
}
public void setCloseTime(java.util.Date closeTime) {
this.closeTime = closeTime;
}
public String getShippingName() {
return shippingName;
}
public void setShippingName(String shippingName) {
this.shippingName = shippingName;
}
public String getShippingCode() {
return shippingCode;
}
public void setShippingCode(String shippingCode) {
this.shippingCode = shippingCode;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getBuyerMessage() {
return buyerMessage;
}
public void setBuyerMessage(String buyerMessage) {
this.buyerMessage = buyerMessage;
}
public String getBuyerRate() {
return buyerRate;
}
public void setBuyerRate(String buyerRate) {
this.buyerRate = buyerRate;
}
public String getReceiverContact() {
return receiverContact;
}
public void setReceiverContact(String receiverContact) {
this.receiverContact = receiverContact;
}
public String getReceiverMobile() {
return receiverMobile;
}
public void setReceiverMobile(String receiverMobile) {
this.receiverMobile = receiverMobile;
}
public String getReceiverAddress() {
return receiverAddress;
}
public void setReceiverAddress(String receiverAddress) {
this.receiverAddress = receiverAddress;
}
public String getSourceType() {
return sourceType;
}
public void setSourceType(String sourceType) {
this.sourceType = sourceType;
}
public String getTransactionId() {
return transactionId;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public String getPayStatus() {
return payStatus;
}
public void setPayStatus(String payStatus) {
this.payStatus = payStatus;
}
public String getConsignStatus() {
return consignStatus;
}
public void setConsignStatus(String consignStatus) {
this.consignStatus = consignStatus;
}
public String getIsDelete() {
return isDelete;
}
public void setIsDelete(String isDelete) {
this.isDelete = isDelete;
}
}
| [
"cn_wlei@163.com"
] | cn_wlei@163.com |
63a9225061e221be1fa4a7194c9e2706ff2585a1 | ec45f92c15fc24c9ac2a67ff2eb3647d4b934735 | /src/main/java/org/ogin/config/PersistenceContext.java | 0d47f9a05005e8ff42fc30ec4a7982351f35b8fb | [] | no_license | okgint/Spring4 | 6ab54869acc78fd0a26a1fa5c2612c88b255cc84 | 80fd20a9a106aacad4035ca979448108ccb96b56 | refs/heads/master | 2020-12-02T18:05:43.856241 | 2017-07-10T09:17:07 | 2017-07-10T09:17:07 | 96,472,675 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,328 | java | package org.ogin.config;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.env.Environment;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.annotation.Resource;
import javax.sql.DataSource;
import java.util.Properties;
/**
* @author ogin
*/
@Configuration
@EnableTransactionManagement
public class PersistenceContext {
private static final String[] PROPERTY_PACKAGES_TO_SCAN = {
"org.ogin.domain"
};
protected static final String PROPERTY_NAME_DATABASE_DRIVER = "db.driver";
protected static final String PROPERTY_NAME_DATABASE_PASSWORD = "db.password";
protected static final String PROPERTY_NAME_DATABASE_URL = "db.url";
protected static final String PROPERTY_NAME_DATABASE_USERNAME = "db.username";
private static final String PROPERTY_NAME_HIBERNATE_DIALECT = "hibernate.dialect";
private static final String PROPERTY_NAME_HIBERNATE_FORMAT_SQL = "hibernate.format_sql";
private static final String PROPERTY_NAME_HIBERNATE_HBM2DDL_AUTO = "hibernate.hbm2ddl.auto";
private static final String PROPERTY_NAME_HIBERNATE_NAMING_STRATEGY = "hibernate.ejb.naming_strategy";
private static final String PROPERTY_NAME_HIBERNATE_SHOW_SQL = "hibernate.show_sql";
@Resource
private Environment env;
@Bean
public DataSource dataSource() {
HikariConfig hikariConfig = new HikariConfig();
hikariConfig.setDriverClassName("com.mysql.jdbc.Driver");
hikariConfig.setJdbcUrl("jdbc:mysql://localhost:3306/jpa");
hikariConfig.setUsername("root");
hikariConfig.setPassword("ginting");
hikariConfig.setMaximumPoolSize(5);
hikariConfig.setConnectionTestQuery("SELECT 1");
hikariConfig.setPoolName("springHikariCP");
hikariConfig.addDataSourceProperty("dataSource.cachePrepStmts", "true");
hikariConfig.addDataSourceProperty("dataSource.prepStmtCacheSize", "250");
hikariConfig.addDataSourceProperty("dataSource.prepStmtCacheSqlLimit", "2048");
hikariConfig.addDataSourceProperty("dataSource.useServerPrepStmts", "true");
HikariDataSource dataSource = new HikariDataSource(hikariConfig);
return dataSource;
}
@Bean
public JpaTransactionManager transactionManager() {
JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(entityManagerFactory().getObject());
return transactionManager;
}
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
entityManagerFactoryBean.setDataSource(dataSource());
entityManagerFactoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
entityManagerFactoryBean.setPackagesToScan(PROPERTY_PACKAGES_TO_SCAN);
Properties jpaProperties = new Properties();
jpaProperties.put(PROPERTY_NAME_HIBERNATE_DIALECT, env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_DIALECT));
jpaProperties.put(PROPERTY_NAME_HIBERNATE_FORMAT_SQL, env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_FORMAT_SQL));
// jpaProperties.put(PROPERTY_NAME_HIBERNATE_HBM2DDL_AUTO, env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_HBM2DDL_AUTO));
// jpaProperties.put(PROPERTY_NAME_HIBERNATE_NAMING_STRATEGY, env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_NAMING_STRATEGY));
jpaProperties.put(PROPERTY_NAME_HIBERNATE_SHOW_SQL, env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_SHOW_SQL));
entityManagerFactoryBean.setJpaProperties(jpaProperties);
return entityManagerFactoryBean;
}
} | [
"okta.ginting@gmail.com"
] | okta.ginting@gmail.com |
3c94784558044a5c39a0f6a6c280836036971f17 | 0b3db39652ffe5d815f4e53c9ce9fda942022b52 | /src/main/java/com/jinguizi/bean/PortalHostModel.java | aedcd554d5aee6761ed799730a7f67572303bda7 | [] | no_license | guage1003/aaa | 345015d58d4a86da5f0fb252397cad51b9fae2f1 | 0b4a8876140503c253b8b897ba47f308e5ad7140 | refs/heads/master | 2023-02-22T02:13:31.987162 | 2021-01-19T01:49:03 | 2021-01-19T01:49:03 | 329,878,555 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,484 | java | package com.jinguizi.bean;
import cn.afterturn.easypoi.excel.annotation.Excel;
import java.util.Date;
public class PortalHostModel {
@Excel(name = "id")
private int id;
@Excel(name = "mode_id")
private String modeId;
@Excel(name = "user_id")
private int userId;
@Excel(name = "host_type")
private String hostType;
@Excel(name = "url")
private String url;
@Excel(name = "host")
private String host;
@Excel(name = "path")
private String path;
@Excel(name = "update_date",exportFormat = "yyyy-MM-dd")
private Date updateDate;
@Excel(name = "name")
private String name;
@Excel(name = "source_name")
private String sourceName;
@Excel(name = "source_type")
private String sourceType;
@Excel(name = "link_describe")
private String linkDescribe;
@Excel(name = "link_content")
private String linkContent;
@Excel(name = "class")
private String hostClass;
@Excel(name = "subclass_1")
private String subclass1;
@Excel(name = "subclass_2")
private String subclass2;
@Excel(name = "subclass_3")
private String subclass3;
@Excel(name = "subclass_4")
private String subclass4;
@Excel(name = "subclass_5")
private String subclass5;
@Excel(name = "state")
private int state;
//spring boot 自动注入的时候使用的是无参构造函数,重载构造函数必须添加默认
public PortalHostModel()
{
}
public PortalHostModel(int id, String modeId, int userId, String hostType, String url, String host, String path, Date updateDate, String name, String sourceName, String sourceType, String linkDescribe, String linkContent, String hostClass, String subclass1, String subclass2, String subclass3, String subclass4, String subclass5, int state)
{
this.id = id;
this.modeId = modeId;
this.userId = userId;
this.hostType = hostType;
this.url = url;
this.host = host;
this.path = path;
this.updateDate = updateDate;
this.name = name;
this.sourceName = sourceName;
this.sourceType = sourceType;
this.linkDescribe = linkDescribe;
this.linkContent = linkContent;
this.hostClass = hostClass;
this.subclass1 = subclass1;
this.subclass2 = subclass2;
this.subclass3 = subclass3;
this.subclass4 = subclass4;
this.subclass5 = subclass5;
this.state = state;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public void setUserId(int userId) {
this.userId = userId;
}
public int getUserId() {
return userId;
}
public void setModeId(String modeId) {
this.modeId = modeId;
}
public void setHostType(String hostType) {
this.hostType = hostType;
}
public void setUrl(String url) {
this.url = url;
}
public void setHost(String host) {
this.host = host;
}
public void setPath(String path) {
this.path = path;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public void setName(String name) {
this.name = name;
}
public void setSourceName(String sourceName) {
this.sourceName = sourceName;
}
public void setSourceType(String sourceType) {
this.sourceType = sourceType;
}
public void setLinkDescribe(String linkDescribe) {
this.linkDescribe = linkDescribe;
}
public void setLinkContent(String linkContent) {
this.linkContent = linkContent;
}
public void setHostClass(String hostClass) {
this.hostClass = hostClass;
}
public void setSubclass1(String subclass1) {
this.subclass1 = subclass1;
}
public void setSubclass2(String subclass2) {
this.subclass2 = subclass2;
}
public void setSubclass3(String subclass3) {
this.subclass3 = subclass3;
}
public void setSubclass4(String subclass4) {
this.subclass4 = subclass4;
}
public void setState(int state) {
this.state = state;
}
public String getModeId() {
return modeId;
}
public String getHostType() {
return hostType;
}
public String getUrl() {
return url;
}
public String getHost() {
return host;
}
public String getPath() {
return path;
}
public Date getUpdateDate() {
return updateDate;
}
public String getName() {
return name;
}
public String getSourceName() {
return sourceName;
}
public String getSourceType() {
return sourceType;
}
public String getLinkDescribe() {
return linkDescribe;
}
public String getLinkContent() {
return linkContent;
}
public String getHostClass() {
return hostClass;
}
public String getSubclass1() {
return subclass1;
}
public String getSubclass2() {
return subclass2;
}
public String getSubclass3() {
return subclass3;
}
public String getSubclass4() {
return subclass4;
}
public int getState() {
return state;
}
public void setSubclass5(String subclass5) {
this.subclass5 = subclass5;
}
public String getSubclass5() {
return subclass5;
}
}
| [
"RULAISZ@"
] | RULAISZ@ |
c72e52d5edc842d7425e3f25fdeff8c78cf44e43 | 0896ed8ceb1cde2cb883ca65146db23799889ce6 | /app/src/main/java/com/example/bailey/dine_in_app/TableListInfo.java | e9c7e3766a54c3e896b457f0e558933105343c0b | [] | no_license | BKDuncan/dine-in-app | e51e62e614c695a923e77bd39c49851eb728af31 | 76f2497945c88a22d41cd736ff06201ce9e113b3 | refs/heads/master | 2021-03-24T09:07:27.941969 | 2018-01-09T03:43:17 | 2018-01-09T03:43:17 | 111,635,745 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 781 | java | package com.example.bailey.dine_in_app;
/**
* Created by Anil Sood on 12/7/2017.
*/
public class TableListInfo {
private String table_number;
private String seats;
private String is_available;
/**
* Constructor
*/
public TableListInfo(String t, String s, String i)
{
table_number = t;
seats = s;
is_available = i;
}
/**
* Getters
*/
public String getTableNumber() { return table_number;}
public String getSeats() { return seats;}
public String getAvailable() { return is_available;}
/**
* Setters
*/
public void setTableNumber(String t) {table_number = t;}
public void setSeats(String s) {seats = s;}
public void setIsAvailable(String i) {is_available = i;}
}
| [
"asood11@outlook.com"
] | asood11@outlook.com |
5e8c48b05173e910b327ef21db0fe341bf314958 | d5e9d498cf546692ac611a6a8721ff01ed4f7e1b | /src/test/java/com/kaijun2004/configserver/ConfigServerApplicationTests.java | 281fced32c87287c37dafd895715e4d17dda6635 | [] | no_license | kaijun2004/config-server | 37594ced636885e24574b5e69eeb5b2ccade8338 | 6ef2c454833e457e5133f0ff7dfcfeba784375b8 | refs/heads/master | 2020-04-18T11:43:27.414112 | 2019-01-30T10:14:35 | 2019-01-30T10:14:35 | 167,510,199 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 360 | java | package com.kaijun2004.configserver;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class ConfigServerApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"17761291283@126.com"
] | 17761291283@126.com |
e3bdc0bed2fae6ab3f6e2f24f0116aa82608a1a6 | dc70ec3e8da8e2b582b65c777551c99df362f81b | /latte_ec/src/main/java/com/sukaidev/latte/ec/main/cart/ShopCartItemFields.java | 331c8f119db771af460099d5fd49383b3a7e429d | [] | no_license | sukaidev/FastEc | a94a5bc14fd6a52f7e9f2c0c0e26358eb0be5f0b | b24be86550ea748bcde5fb52bc9c5c458b745f4a | refs/heads/master | 2021-06-10T04:30:21.327483 | 2021-04-26T06:19:23 | 2021-04-26T06:19:23 | 179,037,979 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 196 | java | package com.sukaidev.latte.ec.main.cart;
/**
* Created by sukaidev on 2019/05/06.
*/
public enum ShopCartItemFields {
TITLE,
DESC,
COUNT,
PRICE,
IS_SELECTED,
POSITION
}
| [
"suhaihong88@gmail.com"
] | suhaihong88@gmail.com |
ab91e5f119c07cc59aa8a91be87f9e0d635f3e7e | cd4de35812b31cbf17bc7935cea2488658327fa9 | /src/AddEquals.java | fdbde3125a2a18ea52396df125123e780e1f958a | [] | no_license | AInvader/StuffIDon-tDo | 9f4cf9515a8616d22347a4dc6b3c726f4440b4b4 | 84b241bab6c45cc72116e666a7228609296d2035 | refs/heads/master | 2020-05-18T23:19:52.552173 | 2019-08-08T16:23:34 | 2019-08-08T16:23:34 | 184,708,184 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | import java.util.Scanner;
class AddEquals {
public static void main(String[] args) {
int sum = 0;
Scanner sc = new Scanner(System.in);
System.out.println("Enter Numbers to Add : ");
while (true) {
if (sc.hasNextInt())
sum = sum + sc.nextInt();
else {
System.out.println(sum);
break;
}
}
}
}
| [
"36476225+AInvader@users.noreply.github.com"
] | 36476225+AInvader@users.noreply.github.com |
68737d37eb886697aecdf95c4910e7b629996140 | e2452a31bb1fc4be630c58e3cbf50be934a53fdf | /src/main/java/com/research/demo/service/MailService.java | edd510ccf4b2cfc6f76bdd2d463ecc6282bdd614 | [
"MIT"
] | permissive | MarcosGgui/research-demo | f972ac013c907de4b1a7260a11a22a2cdfaf3592 | 4eff36a61ffbab36469b95352d3e2fd4c5b1431f | refs/heads/master | 2023-05-13T18:50:30.486083 | 2019-04-10T09:06:36 | 2019-04-10T09:15:59 | 199,548,406 | 0 | 0 | MIT | 2023-05-06T10:10:17 | 2019-07-30T01:02:26 | Java | UTF-8 | Java | false | false | 3,903 | java | package com.research.demo.service;
import com.research.demo.domain.User;
import io.github.jhipster.config.JHipsterProperties;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
import javax.mail.internet.MimeMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.MessageSource;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.thymeleaf.context.Context;
import org.thymeleaf.spring5.SpringTemplateEngine;
/**
* Service for sending emails.
* <p>
* We use the @Async annotation to send emails asynchronously.
*/
@Service
public class MailService {
private final Logger log = LoggerFactory.getLogger(MailService.class);
private static final String USER = "user";
private static final String BASE_URL = "baseUrl";
private final JHipsterProperties jHipsterProperties;
private final JavaMailSender javaMailSender;
private final MessageSource messageSource;
private final SpringTemplateEngine templateEngine;
public MailService(JHipsterProperties jHipsterProperties, JavaMailSender javaMailSender,
MessageSource messageSource, SpringTemplateEngine templateEngine) {
this.jHipsterProperties = jHipsterProperties;
this.javaMailSender = javaMailSender;
this.messageSource = messageSource;
this.templateEngine = templateEngine;
}
@Async
public void sendEmail(String to, String subject, String content, boolean isMultipart, boolean isHtml) {
log.debug("Send email[multipart '{}' and html '{}'] to '{}' with subject '{}' and content={}",
isMultipart, isHtml, to, subject, content);
// Prepare message using a Spring helper
MimeMessage mimeMessage = javaMailSender.createMimeMessage();
try {
MimeMessageHelper message = new MimeMessageHelper(mimeMessage, isMultipart, StandardCharsets.UTF_8.name());
message.setTo(to);
message.setFrom(jHipsterProperties.getMail().getFrom());
message.setSubject(subject);
message.setText(content, isHtml);
javaMailSender.send(mimeMessage);
log.debug("Sent email to User '{}'", to);
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.warn("Email could not be sent to user '{}'", to, e);
} else {
log.warn("Email could not be sent to user '{}': {}", to, e.getMessage());
}
}
}
@Async
public void sendEmailFromTemplate(User user, String templateName, String titleKey) {
Locale locale = Locale.forLanguageTag(user.getLangKey());
Context context = new Context(locale);
context.setVariable(USER, user);
context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl());
String content = templateEngine.process(templateName, context);
String subject = messageSource.getMessage(titleKey, null, locale);
sendEmail(user.getEmail(), subject, content, false, true);
}
@Async
public void sendActivationEmail(User user) {
log.debug("Sending activation email to '{}'", user.getEmail());
sendEmailFromTemplate(user, "mail/activationEmail", "email.activation.title");
}
@Async
public void sendCreationEmail(User user) {
log.debug("Sending creation email to '{}'", user.getEmail());
sendEmailFromTemplate(user, "mail/creationEmail", "email.activation.title");
}
@Async
public void sendPasswordResetMail(User user) {
log.debug("Sending password reset email to '{}'", user.getEmail());
sendEmailFromTemplate(user, "mail/passwordResetEmail", "email.reset.title");
}
}
| [
"marcos.gui@spsoft-cn.com"
] | marcos.gui@spsoft-cn.com |
2fd1efa66e0c6391d71764231e92aea95b276a4b | 58559042bd23a61bef620bbc0021ad9d00acc556 | /JspLibrary/src/com/action/Borrow.java | 9a7b62df357a86418f249d2066dedf5c780054c2 | [] | no_license | zhangyuu12/Course-assignments | 69f4665995999cc40df8a8da736019ea9986c95d | 44ccae0b16ff1fcbeaddf830b0a193a5bcbbadd7 | refs/heads/master | 2020-03-21T22:47:56.559154 | 2018-06-30T08:31:40 | 2018-06-30T08:31:40 | 139,147,844 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,252 | java | package com.action;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.dao.*;
import com.actionForm.*;
public class Borrow extends Action {
/******************在构造方法中实例化Borrow类中应用的持久层类的对象**************************/
private BorrowDAO borrowDAO = null;
private ReaderDAO readerDAO=null;
private BookDAO bookDAO=null;
private ReaderForm readerForm=new ReaderForm();
public Borrow() {
this.borrowDAO = new BorrowDAO();
this.readerDAO=new ReaderDAO();
this.bookDAO=new BookDAO();
}
/******************************************************************************************/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
BorrowForm borrowForm = (BorrowForm) form;
String action =request.getParameter("action");
if(action==null||"".equals(action)){
request.setAttribute("error","您的操作有误!");
return mapping.findForward("error");
}else if("bookBorrowSort".equals(action)){
return bookBorrowSort(mapping,form,request,response);
}else if("bookborrow".equals(action)){
return bookborrow(mapping,form,request,response); //图书借阅
}else if("bookrenew".equals(action)){
return bookrenew(mapping,form,request,response); //图书续借
}else if("bookback".equals(action)){
return bookback(mapping,form,request,response); //图书归还
}else if("Bremind".equals(action)){
return bremind(mapping,form,request,response); //借阅到期提醒
}else if("borrowQuery".equals(action)){
return borrowQuery(mapping,form,request,response); //借阅信息查询
}
request.setAttribute("error","操作失败!");
return mapping.findForward("error");
}
/*********************图书借阅排行***********************/
private ActionForward bookBorrowSort(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
request.setAttribute("bookBorrowSort",borrowDAO.bookBorrowSort());
return mapping.findForward("bookBorrowSort");
}
/*********************图书借阅查询***********************/
private ActionForward borrowQuery(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
String str=null;
String flag[]=request.getParameterValues("flag");
if (flag!=null){
String aa = flag[0];
if ("a".equals(aa)) {
if (request.getParameter("f") != null) {
str = request.getParameter("f") + " like '%" +
request.getParameter("key") + "%'";
}
}
if ("b".equals(aa)) {
String sdate = request.getParameter("sdate");
String edate = request.getParameter("edate");
if (sdate != null && edate != null) {
str = "borrowTime between '" + sdate + "' and '" + edate +
"'";
}
System.out.println("日期" + str);
}
//同时选择日期和条件进行查询
if (flag.length == 2) {
if (request.getParameter("f") != null) {
str = request.getParameter("f") + " like '%" +
request.getParameter("key") + "%'";
}
System.out.println("日期和条件");
String sdate = request.getParameter("sdate");
String edate = request.getParameter("edate");
String str1 = null;
if (sdate != null && edate != null) {
str1 = "borrowTime between '" + sdate + "' and '" + edate +
"'";
}
str = str + " and borr." + str1;
System.out.println("条件和日期:" + str);
}
}
request.setAttribute("borrowQuery",borrowDAO.borrowQuery(str));
System.out.print("条件查询图书借阅信息时的str:"+str);
return mapping.findForward("borrowQuery");
}
/*********************到期提醒***********************/
private ActionForward bremind(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
request.setAttribute("Bremind",borrowDAO.bremind());
return mapping.findForward("Bremind");
}
/*********************图书借阅***********************/
private ActionForward bookborrow(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
//查询读者信息
//ReaderForm readerForm=(ReaderForm)form; //此处一定不能使用该语句进行转换
readerForm.setBarcode(request.getParameter("barcode"));
ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm);
request.setAttribute("readerinfo", reader);
//查询读者的借阅信息
request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode")));
//完成借阅
String f = request.getParameter("f");
String key = request.getParameter("inputkey");
if (key != null && !key.equals("")) {
String operator = request.getParameter("operator");
BookForm bookForm=bookDAO.queryB(f, key);
if (bookForm!=null){
int ret = borrowDAO.insertBorrow(reader, bookDAO.queryB(f, key),
operator);
if (ret == 1) {
request.setAttribute("bar", request.getParameter("barcode"));
return mapping.findForward("bookborrowok");
} else {
request.setAttribute("error", "添加借阅信息失败!");
return mapping.findForward("error");
}
}else{
request.setAttribute("error", "没有该图书!");
return mapping.findForward("error");
}
}
return mapping.findForward("bookborrow");
}
/*********************图书继借***********************/
private ActionForward bookrenew(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
//查询读者信息
readerForm.setBarcode(request.getParameter("barcode"));
ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm);
request.setAttribute("readerinfo", reader);
//查询读者的借阅信息
request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode")));
if(request.getParameter("id")!=null){
int id = Integer.parseInt(request.getParameter("id"));
if (id > 0) { //执行继借操作
int ret = borrowDAO.renew(id);
if (ret == 0) {
request.setAttribute("error", "图书继借失败!");
return mapping.findForward("error");
} else {
request.setAttribute("bar", request.getParameter("barcode"));
return mapping.findForward("bookrenewok");
}
}
}
return mapping.findForward("bookrenew");
}
/*********************图书归还***********************/
private ActionForward bookback(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
//查询读者信息
readerForm.setBarcode(request.getParameter("barcode"));
ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm);
request.setAttribute("readerinfo", reader);
//查询读者的借阅信息
request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode")));
if(request.getParameter("id")!=null){
int id = Integer.parseInt(request.getParameter("id"));
String operator=request.getParameter("operator");
if (id > 0) { //执行归还操作
int ret = borrowDAO.back(id,operator);
if (ret == 0) {
request.setAttribute("error", "图书归还失败!");
return mapping.findForward("error");
} else {
request.setAttribute("bar", request.getParameter("barcode"));
return mapping.findForward("bookbackok");
}
}
}
return mapping.findForward("bookback");
}
}
| [
"1310410518@qq.com"
] | 1310410518@qq.com |
ec2d2b92ec48018acdbf533e60a5c534eaa32961 | 8095c1ad1b74e0e97a86630d878c3e8eb6edd62d | /RHN/1.6.2.1/event/HandlerEvent.java | 38803ce5df0db45d082692390e929b855d4fc9e4 | [] | no_license | BartoszKonkol/projects | 7fe2cec19a37ef2cb912fa46d740105053e253d2 | 673fd7740d027866236e88a3fbaaa5ade33fe935 | refs/heads/master | 2020-03-19T19:16:55.867533 | 2018-06-10T22:01:45 | 2018-06-10T22:01:45 | 136,848,138 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 758 | java | package net.polishgames.rhenowar.util.event;
import java.util.Map;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import net.polishgames.rhenowar.util.Util;
public abstract class HandlerEvent extends Event implements IHandlerEvent
{
@Override
public final HandlerList getHandlers()
{
return IHandlerEvent.super.getHandlers();
}
public static HandlerList getHandlerList()
{
return IHandlerEvent.getHandlerList();
}
@Override
public Map<String, Object> giveProperties(final Map<String, Object> map)
{
map.put("name", this.getEventName());
return map;
}
@Override
public String toString()
{
if(Util.hasUtil())
return Util.giveUtil().toString(this, false, true);
else
return super.toString();
}
}
| [
"bartoszkonkol.info@gmail.com"
] | bartoszkonkol.info@gmail.com |
04072de187cae88cd47a4a48b4eefe68c7755717 | 24b73c53632e2dc361ea67d51ffc11d705f5ccce | /springcloud_config/src/main/java/com/springcloud/config/SpringcloudConfigApplication.java | a6793c9345cda6c4e6c99f28f76a10a4526aafcc | [] | no_license | laifulin/SpringCloudDemo | 69cd4e23b6ec4a8254b4e83e8b91e01980a010c8 | f5fc32335a36b547a9a9c957441890101fbd1dd3 | refs/heads/master | 2021-08-06T13:53:21.107065 | 2017-11-06T05:57:43 | 2017-11-06T05:57:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 423 | java | package com.springcloud.config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
@SpringBootApplication
@EnableConfigServer
public class SpringcloudConfigApplication {
public static void main(String[] args) {
SpringApplication.run(SpringcloudConfigApplication.class, args);
}
}
| [
"laifulin@32gold.com"
] | laifulin@32gold.com |
41bc24d6642509ff012140324ba44dcee8e50e93 | 292bd357f3a14a81d7fd743453fbd52e2c3090e8 | /src/programmers/pg_67256_kakao.java | 36303794e21026b5a9518700c543b86b51101657 | [] | no_license | BangKiHyun/Algorithm | 90ea1e07924d06ab7c16a9aa6e5578c33953c705 | 065953a728227c796294ef993815a1fa50d9be31 | refs/heads/master | 2023-04-13T11:14:35.325863 | 2023-04-02T08:50:43 | 2023-04-02T08:50:43 | 190,966,256 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,573 | java | package programmers;
import java.util.Arrays;
import java.util.List;
public class pg_67256_kakao {
private static final String right = "R";
private static final String left = "L";
private static List<Pos> list = Arrays.asList(
new Pos(3, 1),
new Pos(0, 0),
new Pos(0, 1),
new Pos(0, 2),
new Pos(1, 0),
new Pos(1, 1),
new Pos(1, 2),
new Pos(2, 0),
new Pos(2, 1),
new Pos(2, 2));
public static void main(String[] args) {
int[] numbers = {1, 3, 4, 5, 8, 2, 1, 4, 5, 9, 5};
String hand = "right";
System.out.println(solution(numbers, hand));
}
private static String solution(int[] numbers, String hand) {
StringBuilder sb = new StringBuilder();
Pos rightHand = new Pos(3, 2);
Pos leftHand = new Pos(3, 0);
for (int i = 0; i < numbers.length; i++) {
int number = numbers[i];
if (isLeftHand(number)) {
leftHand = list.get(number);
sb.append(left);
} else if (isRightHand(number)) {
rightHand = list.get(number);
sb.append(right);
} else {
if (closeToRight(number, rightHand, leftHand, hand)) {
rightHand = list.get(number);
sb.append(right);
} else {
leftHand = list.get(number);
sb.append(left);
}
}
}
return String.valueOf(sb);
}
private static boolean isLeftHand(int number) {
return number == 1 || number == 4 || number == 7;
}
private static boolean isRightHand(int number) {
return number == 3 || number == 6 || number == 9;
}
private static boolean closeToRight(int number, Pos rightHand, Pos leftHand, String myHand) {
int rightDistance = getDistance(list.get(number), rightHand);
int leftDistance = getDistance(list.get(number), leftHand);
if (rightDistance < leftDistance || (rightDistance == leftDistance && myHand.equals("right"))) {
return true;
}
return false;
}
private static int getDistance(Pos cur, Pos rightHand) {
return Math.abs(cur.x - rightHand.x) + Math.abs(cur.y - rightHand.y);
}
private static class Pos {
private int x;
private int y;
public Pos(int x, int y) {
this.x = x;
this.y = y;
}
}
}
| [
"rlrlvh@naver.com"
] | rlrlvh@naver.com |
1064bded5dfeacbc534d9c95872cd1574b1ed946 | 6ee24f8f60c5a9b884e1e77b393c6ec540709975 | /src/main/java/com/buha/busdpe/base/entity/SysResource.java | c7595122176a29bbab8a6fc03d0ab130ed334e8b | [] | no_license | epigmore/busdpe | 3957881e32b487b0ba1d7a94e923c0d0da0b6257 | ce3b90017df92a633b6b5f44bc721c2639f56a26 | refs/heads/master | 2020-03-28T05:54:30.795571 | 2018-09-07T09:45:45 | 2018-09-07T09:45:45 | 147,802,625 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 969 | java | package com.buha.busdpe.base.entity;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.util.Date;
import java.util.List;
@Data
@Entity
@Table(name = "SYS_RESOURCE")
public class SysResource {
@Id
@Column(length = 32)
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
private String id;
private String name;
private String url;
private String orderIndex;
@ManyToOne(targetEntity = SysResource.class)
@JoinColumn(name = "resource_group_id")
private SysResource resourceGroup;
@OneToMany(targetEntity = SysResource.class, mappedBy = "resourceGroup", fetch = FetchType.LAZY)
private List<SysResource> children;
private boolean disabled;
@ManyToOne(targetEntity = SysUser.class)
@JoinColumn(name = "createuser_id")
private SysUser createUser;
private Date createDate;
} | [
"lee_jie1001@foxmail.com"
] | lee_jie1001@foxmail.com |
a46158bdd5d060537fb28cc91d6d4ced306de7cb | ece2979f673ef20d90fe57077c5d7c9559cd5f81 | /src/day1/question1.java | 150529950577f475cea0f6afaf5168df73520c38 | [] | no_license | DAYYALA-ANUSHA/day-1 | ac0fa62ff645e38d27bf2aa66d8e9f1af0ffc5cf | 775e69efe8dbe43a023e29cf5a685b124d2c171c | refs/heads/main | 2023-07-13T03:37:33.340558 | 2021-08-25T02:44:49 | 2021-08-25T02:44:49 | 399,667,418 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 371 | java | package day1;
import java.util.Scanner;
public class question1 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("enter the first number");
int a=scan.nextInt();
System.out.println("enter the second number");
int b=scan.nextInt();
System.out.println(a+b);
System.out.println(a-b);
}
}
| [
"kokabalapraveen@gmail.com"
] | kokabalapraveen@gmail.com |
123b493d75c583cd804cb7bc3b3bd8474609f002 | f63d54141a9fc777ae4a62be78ff51349a028f03 | /cocmore-utils/src/main/java/com/yunzo/cocmore/utils/base/StringChangeCharset.java | 43b916891eb85d55d87be0f69b38b0565d4f3fc0 | [] | no_license | ailierke/cocmore | 3de7cb2352aad4ef4f1f161be261f2a4e7c498a1 | bcfd6fd806a834cc6f931f6610bb52759ae23360 | refs/heads/master | 2020-05-28T08:26:08.259795 | 2015-05-22T10:12:28 | 2015-05-22T10:12:28 | 35,592,278 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,217 | java | package com.yunzo.cocmore.utils.base;
import java.io.UnsupportedEncodingException;
/**
* 转换字符串的编码
*/
public class StringChangeCharset {
/** 7位ASCII字符,也叫作ISO646-US、Unicode字符集的基本拉丁块 */
public static final String US_ASCII = "US-ASCII";
/** ISO 拉丁字母表 No.1,也叫作 ISO-LATIN-1 */
public static final String ISO_8859_1 = "ISO-8859-1";
/** 8 位 UCS 转换格式 */
public static final String UTF_8 = "UTF-8";
/** 16 位 UCS 转换格式,Big Endian(最低地址存放高位字节)字节顺序 */
public static final String UTF_16BE = "UTF-16BE";
/** 16 位 UCS 转换格式,Little-endian(最高地址存放低位字节)字节顺序 */
public static final String UTF_16LE = "UTF-16LE";
/** 16 位 UCS 转换格式,字节顺序由可选的字节顺序标记来标识 */
public static final String UTF_16 = "UTF-16";
/** 中文超大字符集 */
public static final String GBK = "GBK";
/**
* 将字符编码转换成US-ASCII码
*/
public String toASCII(String str) throws UnsupportedEncodingException {
return this.changeCharset(str, US_ASCII);
}
/**
* 将字符编码转换成ISO-8859-1码
*/
public String toISO_8859_1(String str) throws UnsupportedEncodingException {
return this.changeCharset(str, ISO_8859_1);
}
/**
* 将字符编码转换成UTF-8码
*/
public String toUTF_8(String str) throws UnsupportedEncodingException {
return this.changeCharset(str, UTF_8);
}
/**
* 将字符编码转换成UTF-16BE码
*/
public String toUTF_16BE(String str) throws UnsupportedEncodingException {
return this.changeCharset(str, UTF_16BE);
}
/**
* 将字符编码转换成UTF-16LE码
*/
public String toUTF_16LE(String str) throws UnsupportedEncodingException {
return this.changeCharset(str, UTF_16LE);
}
/**
* 将字符编码转换成UTF-16码
*/
public String toUTF_16(String str) throws UnsupportedEncodingException {
return this.changeCharset(str, UTF_16);
}
/**
* 将字符编码转换成GBK码
*/
public String toGBK(String str) throws UnsupportedEncodingException {
return this.changeCharset(str, GBK);
}
/**
* 字符串编码转换的实现方法
*
* @param str
* 待转换编码的字符串
* @param newCharset
* 目标编码
* @return
* @throws UnsupportedEncodingException
*/
public String changeCharset(String str, String newCharset)
throws UnsupportedEncodingException {
if (str != null) {
// 用默认字符编码解码字符串。
byte[] bs = str.getBytes();
// 用新的字符编码生成字符串
return new String(bs, newCharset);
}
return null;
}
/**
* 字符串编码转换的实现方法
*
* @param str
* 待转换编码的字符串
* @param oldCharset
* 原编码
* @param newCharset
* 目标编码
* @return
* @throws UnsupportedEncodingException
*/
public String changeCharset(String str, String oldCharset, String newCharset)
throws UnsupportedEncodingException {
if (str != null) {
// 用旧的字符编码解码字符串。解码可能会出现异常。
byte[] bs = str.getBytes(oldCharset);
// 用新的字符编码生成字符串
return new String(bs, newCharset);
}
return null;
}
/**
*
* unicode 转换成 中文
*
* @param theString
* @return
*/
public static String decodeUnicode(String theString) {
char aChar;
int len = theString.length();
StringBuffer outBuffer = new StringBuffer(len);
for (int x = 0; x < len;) {
aChar = theString.charAt(x++);
if (aChar == '\\') {
aChar = theString.charAt(x++);
if (aChar == 'u') {
// Read the xxxx
int value = 0;
for (int i = 0; i < 4; i++) {
aChar = theString.charAt(x++);
switch (aChar) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
value = (value << 4) + aChar - '0';
break;
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
value = (value << 4) + 10 + aChar - 'a';
break;
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
value = (value << 4) + 10 + aChar - 'A';
break;
default:
throw new IllegalArgumentException(
"Malformed \\uxxxx encoding.");
}
}
outBuffer.append((char) value);
} else {
if (aChar == 't')
aChar = '\t';
else if (aChar == 'r')
aChar = '\r';
else if (aChar == 'n')
aChar = '\n';
else if (aChar == 'f')
aChar = '\f';
outBuffer.append(aChar);
}
} else
outBuffer.append(aChar);
}
return outBuffer.toString();
}
public static void main(String[] args) throws UnsupportedEncodingException {
StringChangeCharset test = new StringChangeCharset();
String str = "This is a 中文的 String!";
System.out.println("str: " + str);
String gbk = test.toGBK(str);
System.out.println("转换成GBK码: " + gbk);
System.out.println();
String ascii = test.toASCII(str);
System.out.println("转换成US-ASCII码: " + ascii);
gbk = test.changeCharset(ascii, StringChangeCharset.US_ASCII,
StringChangeCharset.GBK);
System.out.println("再把ASCII码的字符串转换成GBK码: " + gbk);
System.out.println();
String iso88591 = test.toISO_8859_1(str);
System.out.println("转换成ISO-8859-1码: " + iso88591);
gbk = test.changeCharset(iso88591, StringChangeCharset.ISO_8859_1,
StringChangeCharset.GBK);
System.out.println("再把ISO-8859-1码的字符串转换成GBK码: " + gbk);
System.out.println();
String utf8 = test.toUTF_8(str);
System.out.println("转换成UTF-8码: " + utf8);
gbk = test.changeCharset(utf8, StringChangeCharset.UTF_8,
StringChangeCharset.GBK);
System.out.println("再把UTF-8码的字符串转换成GBK码: " + gbk);
System.out.println();
String utf16be = test.toUTF_16BE(str);
System.out.println("转换成UTF-16BE码:" + utf16be);
gbk = test.changeCharset(utf16be, StringChangeCharset.UTF_16BE,
StringChangeCharset.GBK);
System.out.println("再把UTF-16BE码的字符串转换成GBK码: " + gbk);
System.out.println();
String utf16le = test.toUTF_16LE(str);
System.out.println("转换成UTF-16LE码:" + utf16le);
gbk = test.changeCharset(utf16le, StringChangeCharset.UTF_16LE,
StringChangeCharset.GBK);
System.out.println("再把UTF-16LE码的字符串转换成GBK码: " + gbk);
System.out.println();
String utf16 = test.toUTF_16(str);
System.out.println("转换成UTF-16码:" + utf16);
gbk = test.changeCharset(utf16, StringChangeCharset.UTF_16LE,
StringChangeCharset.GBK);
System.out.println("再把UTF-16码的字符串转换成GBK码: " + gbk);
String s = new String("中文".getBytes("UTF-8"), "UTF-8");
System.out.println(s);
}
}
| [
"724941972@qq.com"
] | 724941972@qq.com |
c6f0ae0fa3a90bd0edf9ffcf132d0a541c904a8b | 62294c949dc754ce054dfb3ade4591ecb081baf5 | /src/main/java/com/evisible/os/controlcenter/model/vo/SDicDate.java | 1ba9bca787ba88c4095c38e766fdd998b90ae8d9 | [] | no_license | tengd/controlcenter | 847d612587b59a5451623d0c93e48f80c56ef565 | d06b5ee536e6083d321c5871fcdd175906b061d7 | refs/heads/master | 2020-07-17T08:55:39.535282 | 2019-09-03T05:52:15 | 2019-09-03T05:52:15 | 205,988,763 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 726 | java | package com.evisible.os.controlcenter.model.vo;
public class SDicDate {
private String dicid;
private String typecode;
private String dname;
private String dvalue;
public SDicDate(){}
public String getDicid() {
return dicid;
}
public void setDicid(String dicid) {
this.dicid = dicid;
}
public String getTypecode() {
return typecode;
}
public void setTypecode(String typecode) {
this.typecode = typecode;
}
public String getDname() {
return dname;
}
public void setDname(String dname) {
this.dname = dname;
}
public String getDvalue() {
return dvalue;
}
public void setDvalue(String dvalue) {
this.dvalue = dvalue;
}
}
| [
"td2005hyyd@163.com"
] | td2005hyyd@163.com |
060431061bd87a52c9be697956105799c447faee | cbea23d5e087a862edcf2383678d5df7b0caab67 | /aws-java-sdk-appconfigdata/src/main/java/com/amazonaws/services/appconfigdata/model/InvalidParameterDetail.java | 80140c0235e48a8c75d2639a1ea1399483b4b6ac | [
"Apache-2.0"
] | permissive | phambryan/aws-sdk-for-java | 66a614a8bfe4176bf57e2bd69f898eee5222bb59 | 0f75a8096efdb4831da8c6793390759d97a25019 | refs/heads/master | 2021-12-14T21:26:52.580137 | 2021-12-03T22:50:27 | 2021-12-03T22:50:27 | 4,263,342 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,243 | java | /*
* Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.appconfigdata.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
* <p>
* Contains details about an invalid parameter.
* </p>
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/appconfigdata-2021-11-11/InvalidParameterDetail"
* target="_top">AWS API Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class InvalidParameterDetail implements Serializable, Cloneable, StructuredPojo {
/**
* <p>
* Detail describing why an individual parameter did not satisfy the constraints specified by the service
* </p>
*/
private String problem;
/**
* <p>
* Detail describing why an individual parameter did not satisfy the constraints specified by the service
* </p>
*
* @param problem
* Detail describing why an individual parameter did not satisfy the constraints specified by the service
* @see InvalidParameterProblem
*/
public void setProblem(String problem) {
this.problem = problem;
}
/**
* <p>
* Detail describing why an individual parameter did not satisfy the constraints specified by the service
* </p>
*
* @return Detail describing why an individual parameter did not satisfy the constraints specified by the service
* @see InvalidParameterProblem
*/
public String getProblem() {
return this.problem;
}
/**
* <p>
* Detail describing why an individual parameter did not satisfy the constraints specified by the service
* </p>
*
* @param problem
* Detail describing why an individual parameter did not satisfy the constraints specified by the service
* @return Returns a reference to this object so that method calls can be chained together.
* @see InvalidParameterProblem
*/
public InvalidParameterDetail withProblem(String problem) {
setProblem(problem);
return this;
}
/**
* <p>
* Detail describing why an individual parameter did not satisfy the constraints specified by the service
* </p>
*
* @param problem
* Detail describing why an individual parameter did not satisfy the constraints specified by the service
* @return Returns a reference to this object so that method calls can be chained together.
* @see InvalidParameterProblem
*/
public InvalidParameterDetail withProblem(InvalidParameterProblem problem) {
this.problem = problem.toString();
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getProblem() != null)
sb.append("Problem: ").append(getProblem());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof InvalidParameterDetail == false)
return false;
InvalidParameterDetail other = (InvalidParameterDetail) obj;
if (other.getProblem() == null ^ this.getProblem() == null)
return false;
if (other.getProblem() != null && other.getProblem().equals(this.getProblem()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getProblem() == null) ? 0 : getProblem().hashCode());
return hashCode;
}
@Override
public InvalidParameterDetail clone() {
try {
return (InvalidParameterDetail) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.appconfigdata.model.transform.InvalidParameterDetailMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}
| [
""
] | |
2641e5f8e6e324e615e5477fb180ee7aca765a1c | 2982bffbf8de861a2e2e909335a87ac63b005ce7 | /src/main/java/com/aayush/Hash.java | 0e22ac1ebbcc13b3b09f23a531bec14a8599c055 | [] | no_license | Aayushjshah/cricit | ca9a7eea13c73e01f6a3c1b8ef8c4f6a1d4d060b | 88064b0bf665d2d3bb8801398511354114e7633e | refs/heads/main | 2023-08-25T18:13:25.757249 | 2021-10-31T16:56:30 | 2021-10-31T16:56:30 | 421,467,321 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 782 | java | package com.aayush;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class Hash {
// public static void main(String[] args){
// System.out.println(doHashing("12345678"));
// }
public String doHashing(String password ){
try{
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
messageDigest.update(password.getBytes());
byte[] resultArr = messageDigest.digest();
StringBuilder s = new StringBuilder();
for(byte b : resultArr){
s.append(String.format("%02x", b));
}
return s.toString();
}catch(NoSuchAlgorithmException e){
e.printStackTrace();
}
return "";
}
}
| [
"2001aayushshah@gmail.com"
] | 2001aayushshah@gmail.com |
53410a7827d5c68c43afe241b4c0ac7432f7462e | 4b50d04e5e797a4622d4b12ad71a50f61303f7c3 | /app/src/main/java/com/gravitydestroyer/aavishkar/activities/odesc5.java | 55265c917884bd966cd912b4efee498a749799e6 | [] | no_license | JayjeetAtGithub/Avishkar-app | 19b36ec7d0f478da9f25c1d05cae2c693153bae2 | 4b8e0143e478e9068642b5ec748424a21a3a540a | refs/heads/master | 2021-01-25T14:10:41.120098 | 2018-03-05T01:21:28 | 2018-03-05T01:21:28 | 123,662,940 | 0 | 0 | null | 2018-03-03T05:36:09 | 2018-03-03T05:36:08 | null | UTF-8 | Java | false | false | 1,322 | java | package com.gravitydestroyer.aavishkar.activities;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.gravitydestroyer.aavishkar.R;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
public class odesc5 extends AppCompatActivity {
public void phoneopen(View view){
String phone = "+918240129567";
Intent intent = new Intent(Intent.ACTION_DIAL, Uri.fromParts("tel", phone, null));
startActivity(intent);
}
public void urlopen(View v) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_BROWSABLE);
intent.setData(Uri.parse("https://freemex.nitdgplug.org/"));
startActivity(intent);
}
public void fbopen(View v) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_BROWSABLE);
intent.setData(Uri.parse("https://www.facebook.com/aavishkar.nitd/"));
startActivity(intent);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_odesc5);
}
}
| [
"aritra240@gmail.com"
] | aritra240@gmail.com |
dc0e051359bc7d6a2cb6ada6528bba0d725d0b73 | 40883ab424fcd3acca2df99188f5daeb5163175f | /src/main/java/com/afkl/service/OAuthTokenService.java | e505b99b2369a91499ea5016271898f5718f5ec6 | [] | no_license | sandeep-s/lounge | c631428a4601bfcce6c8ea48ea4b0e4f8c9034a5 | 09a8519b4d54a9b3925564393a5aa264c4361a92 | refs/heads/master | 2021-01-11T13:42:06.675972 | 2017-06-27T02:38:40 | 2017-06-27T02:38:40 | 95,091,387 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,349 | java | package com.afkl.service;
import java.util.Map;
import java.util.Properties;
import org.apache.commons.codec.binary.Base64;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import com.afkl.utils.Constants;
import com.afkl.utils.Utils;
import com.google.common.base.Splitter;
@Service
public class OAuthTokenService {
Properties config = Utils.getAllProperties(Constants.CONFIG_FILE_PATH);
public String getOAuth2Token() {
String tokenUri = config.getProperty(Constants.TOKEN_URI);
String responseBody = getAccessToken(tokenUri);
String oAuthToken = extractAccessToken(responseBody);
return oAuthToken;
}
private String getAccessToken(String tokenUri) {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add(config.getProperty(Constants.AUTHORIZATION), config.getProperty(Constants.BASIC) + " " + Base64.encodeBase64String((config.getProperty(Constants.CLIENT_ID)
+ config.getProperty(Constants.SEMI_COLON) + config.getProperty(Constants.CLIENT_KEY)).getBytes()));
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();
map.add(config.getProperty(Constants.GRANT_TYPE), config.getProperty(Constants.CLIENT_CREDENTIALS));
HttpEntity<MultiValueMap<String, String>> entity = new HttpEntity<MultiValueMap<String, String>>(map, headers);
ResponseEntity<String> response = restTemplate.postForEntity(tokenUri, entity, String.class);
return response.getBody();
}
private String extractAccessToken(String responseBody) {
Map<String, String> values = Splitter.on(config.getProperty(Constants.COMMA))
.withKeyValueSeparator(config.getProperty(Constants.SEMI_COLON)).split(responseBody);
if (values.containsKey(config.getProperty(Constants.ACCESS_TOKEN))) {
String accessToken = ((String) values.get(config.getProperty(Constants.ACCESS_TOKEN))).replace("\"","");
return accessToken;
}
else
return null;
}
}
| [
"sandeepswaminathan@gmail.com"
] | sandeepswaminathan@gmail.com |
aebe53a96ef70fb8a2ec19b24bc3c5d3147bbe16 | 3f4d50ac6cc4c84b6e5af83ca785d1630f730a07 | /app/src/main/java/cn/poco/home/home4/introAnimation/ArchAnimator.java | de543e7013e625f020740193051373288403c92f | [] | no_license | FranklinNEO/BeautyCamera2016 | 5ceb02047750b54d3be44f07ba08a8d84516bdc2 | c0aa17fefa283b43187396ba35073fdef2b541f5 | refs/heads/master | 2022-09-08T08:37:30.260238 | 2020-06-01T10:12:02 | 2020-06-01T10:12:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,531 | java | package cn.poco.home.home4.introAnimation;
import android.animation.ValueAnimator;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;
import android.view.animation.DecelerateInterpolator;
/**
* Created by lgd on 2016/11/12.
*/
public class ArchAnimator extends ValueAnimator
{
public final static int DURATION = Config.DURATION_ARCH;
private final int archMaxHeight;
private View mView;
private int archHeight;
private int archWidth;
private float ratio;
private int centerX;
private int centerY;
private int alpha;
private Paint mPaint;
private int mCurRadius;
private final int mOriginRadius;
public ArchAnimator(View view)
{
mView = view;
alpha = 255;
archHeight = Config.ARCH_HEIGHT;
archMaxHeight = Config.ARCH_MAX_HEIGHT;
archWidth = Config.ARCH_WIDTH;
//(x-B长度)平方 +(A长度的一半)平方 = x平方
int radius = (archWidth * archWidth + archHeight * archHeight) / (archHeight*2);
mOriginRadius = radius - archHeight;
centerY = Config.ARCH_CENTER_Y + mOriginRadius;
centerX = Config.ARCH_CENTER_X;
ratio = archWidth / archHeight;
initAnim();
}
boolean isReBound = false;
private void initAnim()
{
this.setDuration(DURATION);
this.setInterpolator(new DecelerateInterpolator());
mCurRadius = mOriginRadius;
this.setIntValues(mOriginRadius, mOriginRadius + archMaxHeight, mOriginRadius + archHeight);
this.addUpdateListener(new AnimatorUpdateListener()
{
int curRadius;
int lastRadius;
float scale;
@Override
public void onAnimationUpdate(ValueAnimator animation)
{
lastRadius = curRadius;
curRadius = (int)animation.getAnimatedValue();
mCurRadius = curRadius;
if(curRadius < lastRadius || curRadius == mOriginRadius + archMaxHeight)
{
//回弹
alpha = (curRadius - mOriginRadius - archHeight) * 255 / (archMaxHeight - archHeight);
scale = ((curRadius-mOriginRadius)*1.0f / archHeight);
if(fadeInCallBack != null)
{
fadeInCallBack.fadeIn(alpha*1.0f/255,scale);
}
}
mView.postInvalidate();
}
});
}
public void draw(Canvas canvas, Paint paint)
{
if(mPaint == null)
{
mPaint = new Paint(paint);
}
mPaint.setAlpha(alpha);
canvas.drawCircle(centerX, centerY, mCurRadius, mPaint);
}
private FadeInCallBack fadeInCallBack;
interface FadeInCallBack
{
void fadeIn(float alpha, float scale);
}
public void setFadeInCallBack(FadeInCallBack fadeInCallBack)
{
this.fadeInCallBack = fadeInCallBack;
}
}
| [
"18218125994@163.com"
] | 18218125994@163.com |
536f1cd12dc9511e9cd576021f2d5f7ba8627f7f | ee30dbb400823dcb3dc07ae8ec1d1a83d73c4848 | /app/src/main/java/cn/xie/myandroidchart/views/MyCustomMarkerView.java | af1cce6d1aa0584f937bd3d80c215c5a60446e78 | [] | no_license | Thanks-xie/MyAndroidChart | 0083e9322edf73d96aa0e58964fa125329c188b6 | f01211d3efc40314c5b4a1d68911f33d50ec9c3e | refs/heads/master | 2020-09-03T10:14:10.596740 | 2019-11-08T03:15:32 | 2019-11-08T03:15:32 | 219,442,842 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,799 | java | package cn.xie.myandroidchart.views;
import android.content.Context;
import android.widget.TextView;
import com.github.mikephil.charting.components.MarkerView;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.highlight.Highlight;
import com.github.mikephil.charting.utils.MPPointF;
import java.text.DecimalFormat;
import cn.xie.myandroidchart.R;
/**
* 椭圆形弹出框
* @author xiejinbo
* @date 2019/10/31 0031 9:50
*/
public class MyCustomMarkerView extends MarkerView {
private TextView tvContent;
private DecimalFormat mFormat;
private MPPointF mOffset;
private static String[] SUFFIX = new String[]{
"元", "万元"
};
/**
* Constructor. Sets up the MarkerView with a custom layout resource.
*
* @param context
* @param layoutResource the layout resource to use for the MarkerView
*/
public MyCustomMarkerView(Context context, int layoutResource) {
super(context, layoutResource);
tvContent = findViewById(R.id.tvContent);
}
@Override
public void refreshContent(Entry e, Highlight highlight) {
mFormat = new DecimalFormat("####E0");
String r = mFormat.format(e.getY());
r = r.replaceAll("E[0-9]",
SUFFIX[Character.getNumericValue(r.charAt(r.length() - 1)) / 4]);
tvContent.setText(""+r);
tvContent.setTextColor(getResources().getColor(R.color.colorAccent));
tvContent.setTextSize(12f);
super.refreshContent(e, highlight);
}
@Override
public MPPointF getOffset() {
if(mOffset == null) {
// center the marker horizontally and vertically
mOffset = new MPPointF(-(getWidth() / 2), -getHeight());
}
return mOffset;
}
}
| [
"2820150172@qq.com"
] | 2820150172@qq.com |
6f4732226a5b453ea03e30d0435f30a26404fe0a | 8aeae1fd40c14f8f8175d17ed3420bc789bdc19e | /src/net/ion/radon/upgrade/AntCommand.java | d887dd7ef7e8384e00314bffdc79fd65908bac19 | [] | no_license | bleujin/aradon | 15aa37a5fd479b0e84428095fabdf7d7eed022d4 | 589881dff83cb37d7798a286e5553be1f68fc9d6 | refs/heads/master | 2016-09-10T20:09:15.806224 | 2014-09-24T01:28:31 | 2014-09-24T01:28:31 | 2,208,277 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,344 | java | package net.ion.radon.upgrade;
import java.io.File;
import java.io.IOException;
import net.ion.framework.parse.html.HTag;
import net.ion.framework.util.ObjectUtil;
import net.ion.framework.util.UTF8FileUtils;
import org.apache.tools.ant.BuildLogger;
import org.apache.tools.ant.DefaultLogger;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.ProjectHelper;
public class AntCommand extends ICommand{
@Override
public void run() throws IOException {
HTag config = getConfig() ;
File file = File.createTempFile("ws", "script") ;
file.deleteOnExit() ;
UTF8FileUtils.writeStringToFile(file, config.getOnlyText(), "UTF-8") ;
runTarget(file, null) ;
}
public void runTarget(File configFile, String target) throws IOException{
BuildLogger logger = new DefaultLogger() ;
logger.setMessageOutputLevel(Project.MSG_INFO) ;
logger.setOutputPrintStream(System.out) ;
logger.setErrorPrintStream(System.out) ;
logger.setEmacsMode(true) ;
ProjectHelper ph = ProjectHelper.getProjectHelper() ;
Project p = new Project() ;
p.setBaseDir(new File("./")) ;
p.addBuildListener(logger) ;
p.init() ;
p.addReference("ant.projectHelper", ph) ;
ph.parse(p, configFile) ;
p.executeTarget(ObjectUtil.coalesce(target, p.getDefaultTarget())) ;
}
}
| [
"bleujin@gmail.com"
] | bleujin@gmail.com |
92d2183d66f969bc200951dd5863257ed5fe2f29 | 8b6856b3ec10fb77c8af5980bd9beb6aa2e2d4a3 | /common/util/src/test/java/com/alibaba/citrus/util/regex/WildcardCompilerTests.java | c2f2fec1859913066bf9a64f4b4fc249bcbac684 | [
"Apache-2.0"
] | permissive | huxiaohang/citrus | 400a528895cd051ccd24b1ec690817c70aa067a5 | f915cc1bb0389899adaaabb2eaf4e301517dbfa1 | refs/heads/master | 2020-12-25T12:27:43.092996 | 2011-11-05T09:18:10 | 2011-11-05T09:18:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,215 | java | /*
* Copyright 2010 Alibaba Group Holding Limited.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.citrus.util.regex;
import static com.alibaba.citrus.util.ArrayUtil.*;
import static org.junit.Assert.*;
import java.text.MessageFormat;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.junit.Test;
public class WildcardCompilerTests {
@Test
public void pathNameWildcard() throws Exception {
Pattern pattern = PathNameWildcardCompiler.compilePathName("/ab?/def/**/ghi/*.jsp");
assertTrue(contains("/abc/def/ghi/test.jsp", pattern, "c", "", "test"));
assertTrue(contains("/abd/def/xxx/ghi/test.jsp", pattern, "d", "xxx", "test"));
assertTrue(contains("/abe/def/xxx/yyy/ghi/test.jsp", pattern, "e", "xxx/yyy", "test"));
assertTrue(contains("/abf/def/ghi/.jsp", pattern, "f", "", ""));
assertTrue(contains("/abg/def/ghi/.jsp", pattern, "g", "", ""));
assertFalse(contains("/ab/def/ghi/test.jsp", pattern));
assertFalse(contains("/abcd/def/ghi/test.jsp", pattern));
assertFalse(contains("/abc/def/xxxghi/test.jsp", pattern));
assertFalse(contains("/abc/defxxx/ghi/test.jsp", pattern));
assertFalse(contains("/abc/def/ghi/jsp", pattern));
pattern = PathNameWildcardCompiler.compilePathName("/xxx/yyy/**");
assertTrue(contains("/xxx/yyy/", pattern, ""));
assertTrue(contains("/xxx/yyy/zzz", pattern, "zzz"));
assertTrue(contains("/xxx/yyy/zzz/aaa", pattern, "zzz/aaa"));
assertTrue(contains("/xxx/yyy/zzz/aaa/", pattern, "zzz/aaa/"));
assertFalse(contains("/xxx/yyy", pattern));
assertFalse(contains("xxx/yyy", pattern));
assertFalse(contains("xxx/yyy/zzz", pattern));
assertFalse(contains("xxx/yyy/zzz/aaa", pattern));
assertFalse(contains("xxx/yyy/zzz/aaa/", pattern));
pattern = PathNameWildcardCompiler.compilePathName("/xxx/yyy");
assertTrue(contains("/xxx/yyy", pattern));
assertFalse(contains("/xxx/yyyzzz", pattern));
pattern = PathNameWildcardCompiler.compilePathName("/xxx/yyy*");
assertTrue(contains("/xxx/yyy", pattern, ""));
assertTrue(contains("/xxx/yyyzzz", pattern, "zzz"));
// 特殊处理
pattern = PathNameWildcardCompiler.compilePathName("/");
assertTrue(contains("", pattern));
assertTrue(contains("/xxx/yyy", pattern));
pattern = PathNameWildcardCompiler.compilePathName("");
assertTrue(contains("", pattern));
assertTrue(contains("/xxx/yyy", pattern));
}
@Test
public void pathNameRelevant() {
assertEquals(0, PathNameWildcardCompiler.getPathNameRelevancy(null));
assertEquals(0, PathNameWildcardCompiler.getPathNameRelevancy(" "));
assertEquals(0, PathNameWildcardCompiler.getPathNameRelevancy(""));
assertEquals(0, PathNameWildcardCompiler.getPathNameRelevancy("/*/**"));
assertEquals(1, PathNameWildcardCompiler.getPathNameRelevancy("/a?/**"));
assertEquals(3, PathNameWildcardCompiler.getPathNameRelevancy("/a?/**/bc"));
}
@Test
public void classNameWildcard() throws Exception {
Pattern pattern = ClassNameWildcardCompiler.compileClassName("ab?.def.**.ghi.*.jsp");
assertTrue(contains("abc.def.ghi.test.jsp", pattern, "c", "", "test"));
assertTrue(contains("abd.def.xxx.ghi.test.jsp", pattern, "d", "xxx", "test"));
assertTrue(contains("abe.def.xxx.yyy.ghi.test.jsp", pattern, "e", "xxx.yyy", "test"));
assertFalse(contains("abf.def.ghi..jsp", pattern));
assertFalse(contains("abg.def.ghi..jsp", pattern));
assertFalse(contains("ab.def.ghi.test.jsp", pattern));
assertFalse(contains("abcd.def.ghi.test.jsp", pattern));
assertFalse(contains("abc.def.xxxghi.test.jsp", pattern));
assertFalse(contains("abc.defxxx.ghi.test.jsp", pattern));
assertFalse(contains("abc.def.ghi.jsp", pattern));
pattern = ClassNameWildcardCompiler.compileClassName("xxx.yyy.**");
assertTrue(contains("xxx.yyy.", pattern, ""));
assertTrue(contains("xxx.yyy.zzz", pattern, "zzz"));
assertTrue(contains("xxx.yyy.zzz.aaa", pattern, "zzz.aaa"));
assertTrue(contains("xxx.yyy.zzz.aaa.", pattern, "zzz.aaa."));
assertFalse(contains("xxx.yyy", pattern));
assertFalse(contains("xxx.yyy", pattern));
pattern = ClassNameWildcardCompiler.compileClassName("xxx.yyy");
assertTrue(contains("xxx.yyy", pattern));
assertFalse(contains("xxx.yyyzzz", pattern));
pattern = ClassNameWildcardCompiler.compileClassName("xxx.yyy*");
assertTrue(contains("xxx.yyy", pattern, ""));
assertTrue(contains("xxx.yyyzzz", pattern, "zzz"));
pattern = ClassNameWildcardCompiler.compileClassName("");
assertTrue(contains("", pattern));
assertTrue(contains("xxx.yyy", pattern));
}
@Test
public void classNameRelevant() {
assertEquals(0, ClassNameWildcardCompiler.getClassNameRelevancy(null));
assertEquals(0, ClassNameWildcardCompiler.getClassNameRelevancy(" "));
assertEquals(0, ClassNameWildcardCompiler.getClassNameRelevancy(""));
assertEquals(0, ClassNameWildcardCompiler.getClassNameRelevancy("*.**"));
assertEquals(1, ClassNameWildcardCompiler.getClassNameRelevancy("a?.**"));
assertEquals(3, ClassNameWildcardCompiler.getClassNameRelevancy("a?.**.bc"));
}
@Test
public void normalizePathName() {
assertEquals(null, PathNameWildcardCompiler.normalizePathName(null));
assertEquals("", PathNameWildcardCompiler.normalizePathName(" "));
assertEquals("/a/b/c/", PathNameWildcardCompiler.normalizePathName(" /a\\\\b//c// "));
assertEquals("a/b/c", PathNameWildcardCompiler.normalizePathName(" a\\\\b\\/c "));
assertEquals("/*/**/?/", PathNameWildcardCompiler.normalizePathName(" /*\\\\**//?// "));
assertEquals("*/**/?", PathNameWildcardCompiler.normalizePathName(" *\\\\**\\/? "));
}
@Test
public void normalizeClassName() {
assertEquals(null, ClassNameWildcardCompiler.normalizeClassName(null));
assertEquals("", ClassNameWildcardCompiler.normalizeClassName(" "));
assertEquals("a.b.c", ClassNameWildcardCompiler.normalizeClassName(" .a..b//c.. "));
assertEquals("a.b.c", ClassNameWildcardCompiler.normalizeClassName(" .a..b\\/c.. "));
assertEquals("*.**.?", ClassNameWildcardCompiler.normalizeClassName(" .*..**//?.. "));
assertEquals("*.**.?", ClassNameWildcardCompiler.normalizeClassName(" .*..**\\/?.. "));
}
@Test
public void classNameToPathName() {
assertEquals(null, ClassNameWildcardCompiler.classNameToPathName(null));
assertEquals("", ClassNameWildcardCompiler.classNameToPathName(" "));
assertEquals("a/b/c", ClassNameWildcardCompiler.classNameToPathName(" .a..b//c.. "));
assertEquals("a/b/c", ClassNameWildcardCompiler.classNameToPathName(" .a..b\\/c.. "));
assertEquals("*/**/?", ClassNameWildcardCompiler.classNameToPathName(" .*..**//?.. "));
assertEquals("*/**/?", ClassNameWildcardCompiler.classNameToPathName(" .*..**\\/?.. "));
}
@Test
public void stress() throws Exception {
final int concurrency = 10;
final int loops = 10000; // 100000;
final Pattern pattern = PathNameWildcardCompiler.compilePathName("/abc/def/**/ghi/*.jsp");
Runnable runnable = new Runnable() {
public void run() {
long start = System.currentTimeMillis();
for (int i = 0; i < loops; i++) {
assertTrue(contains("/abc/def/xyz/uvw/ghi/test.jsp", pattern, "xyz/uvw", "test"));
}
long duration = System.currentTimeMillis() - start;
System.out.println(Thread.currentThread().getName() + " takes " + getDuration(duration));
}
};
Thread[] threads = new Thread[concurrency];
for (int i = 0; i < threads.length; i++) {
threads[i] = new Thread(runnable, "Thread_" + i);
}
long start = System.currentTimeMillis();
for (Thread thread : threads) {
thread.start();
}
for (Thread thread : threads) {
thread.join();
}
long duration = System.currentTimeMillis() - start;
System.out.println("Total time: " + getDuration(duration));
}
private static String getDuration(long duration) {
long ms = duration % 1000;
long secs = duration / 1000 % 60;
long min = duration / 1000 / 60;
return MessageFormat.format("{0,choice,0#|.1#{0,number,integer}m}" + " {1,choice,0#|.1#{1,number,integer}s}"
+ " {2,number,integer}ms", min, secs, ms);
}
private boolean contains(String input, Pattern pattern, String... matches) {
Matcher matcher = pattern.matcher(input);
if (matcher.find()) {
assertEquals(matches.length, matcher.groupCount());
for (int i = 0; i < matches.length; i++) {
assertEquals(matches[i], matcher.group(i + 1));
}
return true;
} else {
assertTrue(isEmptyArray(matches));
return false;
}
}
}
| [
"yizhi@taobao.com"
] | yizhi@taobao.com |
57eb3bfff46bd24dab09207dccea646324c66311 | ecfed9a7c0f592007b0c8233e672bdc9c2d89a8b | /plane-domain/src/main/java/com/chen/plane/domain/pojo/PlaneFirst.java | b8916ffae756fd93e4f318f87ec50e09bc729e97 | [] | no_license | 378220358/plane-parent | 706cecb95856121b3b908cfdf81068bf13f2c43a | dce985503509b0548af86a6031e512fd40ee3129 | refs/heads/master | 2021-01-13T00:37:43.463010 | 2016-04-30T09:54:21 | 2016-04-30T09:54:21 | 50,812,504 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,883 | java | package com.chen.plane.domain.pojo;
public class PlaneFirst {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column plane_first.CABIN_ID
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
private Integer cabinId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column plane_first.CABIN_FIRST_SUM
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
private Integer cabinFirstSum;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column plane_first.CABIN_ONE_SUM
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
private Integer cabinOneSum;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column plane_first.CABIN_PARTICULAR_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
private String cabinParticularSeat;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column plane_first.CABIN_CLOSE_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
private String cabinCloseSeat;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column plane_first.CABIN_ALEARDY_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
private String cabinAleardySeat;
/**
* 身份证号码
*/
private String ticketCard;
/**
* 总票价
*/
private Double ticketMoney;
/**
* 订票人姓名
*/
private String ticketName;
/**
* 用户ID
*/
private Integer userId;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
@Override public String toString() {
return "PlaneFirst{" +
"cabinId=" + cabinId +
", cabinFirstSum=" + cabinFirstSum +
", cabinOneSum=" + cabinOneSum +
", cabinParticularSeat='" + cabinParticularSeat + '\'' +
", cabinCloseSeat='" + cabinCloseSeat + '\'' +
", cabinAleardySeat='" + cabinAleardySeat + '\'' +
", ticketCard='" + ticketCard + '\'' +
", ticketMoney=" + ticketMoney +
", ticketName='" + ticketName + '\'' +
", userId=" + userId +
'}';
}
public String getTicketName() {
return ticketName;
}
public void setTicketName(String ticketName) {
this.ticketName = ticketName;
}
public String getTicketCard() {
return ticketCard;
}
public void setTicketCard(String ticketCard) {
this.ticketCard = ticketCard;
}
public Double getTicketMoney() {
return ticketMoney;
}
public void setTicketMoney(Double ticketMoney) {
this.ticketMoney = ticketMoney;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column plane_first.CABIN_ID
*
* @return the value of plane_first.CABIN_ID
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public Integer getCabinId() {
return cabinId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column plane_first.CABIN_ID
*
* @param cabinId the value for plane_first.CABIN_ID
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public void setCabinId(Integer cabinId) {
this.cabinId = cabinId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column plane_first.CABIN_FIRST_SUM
*
* @return the value of plane_first.CABIN_FIRST_SUM
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public Integer getCabinFirstSum() {
return cabinFirstSum;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column plane_first.CABIN_FIRST_SUM
*
* @param cabinFirstSum the value for plane_first.CABIN_FIRST_SUM
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public void setCabinFirstSum(Integer cabinFirstSum) {
this.cabinFirstSum = cabinFirstSum;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column plane_first.CABIN_ONE_SUM
*
* @return the value of plane_first.CABIN_ONE_SUM
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public Integer getCabinOneSum() {
return cabinOneSum;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column plane_first.CABIN_ONE_SUM
*
* @param cabinOneSum the value for plane_first.CABIN_ONE_SUM
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public void setCabinOneSum(Integer cabinOneSum) {
this.cabinOneSum = cabinOneSum;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column plane_first.CABIN_PARTICULAR_SEAT
*
* @return the value of plane_first.CABIN_PARTICULAR_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public String getCabinParticularSeat() {
return cabinParticularSeat;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column plane_first.CABIN_PARTICULAR_SEAT
*
* @param cabinParticularSeat the value for plane_first.CABIN_PARTICULAR_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public void setCabinParticularSeat(String cabinParticularSeat) {
this.cabinParticularSeat = cabinParticularSeat;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column plane_first.CABIN_CLOSE_SEAT
*
* @return the value of plane_first.CABIN_CLOSE_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public String getCabinCloseSeat() {
return cabinCloseSeat;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column plane_first.CABIN_CLOSE_SEAT
*
* @param cabinCloseSeat the value for plane_first.CABIN_CLOSE_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public void setCabinCloseSeat(String cabinCloseSeat) {
this.cabinCloseSeat = cabinCloseSeat;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column plane_first.CABIN_ALEARDY_SEAT
*
* @return the value of plane_first.CABIN_ALEARDY_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public String getCabinAleardySeat() {
return cabinAleardySeat;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column plane_first.CABIN_ALEARDY_SEAT
*
* @param cabinAleardySeat the value for plane_first.CABIN_ALEARDY_SEAT
*
* @mbggenerated Thu Jan 28 15:38:52 CST 2016
*/
public void setCabinAleardySeat(String cabinAleardySeat) {
this.cabinAleardySeat = cabinAleardySeat;
}
} | [
"378220358@qq.com"
] | 378220358@qq.com |
85d867822588cec895b531bd14a0d3d880b59a91 | ef3632a70d37cfa967dffb3ddfda37ec556d731c | /aws-java-sdk-iottwinmaker/src/main/java/com/amazonaws/services/iottwinmaker/model/transform/GetSceneResultJsonUnmarshaller.java | fef3710bf09366bdc3b507077a67ddc93a26c866 | [
"Apache-2.0"
] | permissive | ShermanMarshall/aws-sdk-java | 5f564b45523d7f71948599e8e19b5119f9a0c464 | 482e4efb50586e72190f1de4e495d0fc69d9816a | refs/heads/master | 2023-01-23T16:35:51.543774 | 2023-01-19T03:21:46 | 2023-01-19T03:21:46 | 134,658,521 | 0 | 0 | Apache-2.0 | 2019-06-12T21:46:58 | 2018-05-24T03:54:38 | Java | UTF-8 | Java | false | false | 4,543 | java | /*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.iottwinmaker.model.transform;
import java.math.*;
import javax.annotation.Generated;
import com.amazonaws.services.iottwinmaker.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* GetSceneResult JSON Unmarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetSceneResultJsonUnmarshaller implements Unmarshaller<GetSceneResult, JsonUnmarshallerContext> {
public GetSceneResult unmarshall(JsonUnmarshallerContext context) throws Exception {
GetSceneResult getSceneResult = new GetSceneResult();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL) {
return getSceneResult;
}
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("workspaceId", targetDepth)) {
context.nextToken();
getSceneResult.setWorkspaceId(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("sceneId", targetDepth)) {
context.nextToken();
getSceneResult.setSceneId(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("contentLocation", targetDepth)) {
context.nextToken();
getSceneResult.setContentLocation(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("arn", targetDepth)) {
context.nextToken();
getSceneResult.setArn(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("creationDateTime", targetDepth)) {
context.nextToken();
getSceneResult.setCreationDateTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
}
if (context.testExpression("updateDateTime", targetDepth)) {
context.nextToken();
getSceneResult.setUpdateDateTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
}
if (context.testExpression("description", targetDepth)) {
context.nextToken();
getSceneResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("capabilities", targetDepth)) {
context.nextToken();
getSceneResult.setCapabilities(new ListUnmarshaller<String>(context.getUnmarshaller(String.class))
.unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return getSceneResult;
}
private static GetSceneResultJsonUnmarshaller instance;
public static GetSceneResultJsonUnmarshaller getInstance() {
if (instance == null)
instance = new GetSceneResultJsonUnmarshaller();
return instance;
}
}
| [
""
] | |
92358f8118881fffb422a0c327226bc5ca23b930 | 7369e7aeb7c0e96dc56281d8f8d0ebc0a6c9dcfd | /src/Lessons/Lesson9Collections/Task1/Damage.java | 3c26643f04806e84d3171399f0b8b158afeb585c | [] | no_license | armashkaise/TrainingTasks | 8b293235b35b72ef8d4f48b1de2dc07f1d20f783 | 9484793ffecbb23a9b6492f3eeef028fb2710914 | refs/heads/master | 2021-01-01T07:52:27.142822 | 2020-03-06T11:07:32 | 2020-03-06T11:07:32 | 239,181,737 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,252 | java | package Lessons.Lesson9Collections.Task1;
import java.util.Objects;
public class Damage {
private String name;
private double lenght;
private double width;
public Damage next;
// private int countDamage;
public Damage(String name, double lenght, double width) {
this.name = name;
this.lenght = lenght;
this.width = width;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getLenght() {
return lenght;
}
public void setLenght(double lenght) {
this.lenght = lenght;
}
public double getWidth() {
return width;
}
public void setWidth(double width) {
this.width = width;
}
public Damage getNext() {
return next;
}
public void setNext(Damage next) {
this.next = next;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Damage damage = (Damage) o;
return Objects.equals(name, damage.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
}
| [
"HT52JJu7bv"
] | HT52JJu7bv |
56096590ba84b88eddaec31e23aaaee1f8efc2c5 | 5d284b052da9e119d50ef28ee8185e3bad3b4dc6 | /app/build/generated/source/r/debug/androidx/legacy/coreutils/R.java | 65a60d466b6f2c1aa0f9e13588915c2a2e703f40 | [
"Apache-2.0"
] | permissive | latestalexey/Timer-App | b0bea605a23a364265d6c9ab1e166692957d1c58 | e2eaf0b07c4db6e7a5df624bd06ab0246f4c3db5 | refs/heads/master | 2020-05-02T20:25:55.751375 | 2018-11-21T17:42:54 | 2018-11-21T17:42:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,439 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package androidx.legacy.coreutils;
public final class R {
public static final class attr {
public static final int font = 0x7f020091;
public static final int fontProviderAuthority = 0x7f020093;
public static final int fontProviderCerts = 0x7f020094;
public static final int fontProviderFetchStrategy = 0x7f020095;
public static final int fontProviderFetchTimeout = 0x7f020096;
public static final int fontProviderPackage = 0x7f020097;
public static final int fontProviderQuery = 0x7f020098;
public static final int fontStyle = 0x7f020099;
public static final int fontVariationSettings = 0x7f02009a;
public static final int fontWeight = 0x7f02009b;
public static final int ttcIndex = 0x7f020180;
}
public static final class color {
public static final int notification_action_color_filter = 0x7f04003f;
public static final int notification_icon_bg_color = 0x7f040040;
public static final int ripple_material_light = 0x7f04004b;
public static final int secondary_text_default_material_light = 0x7f04004d;
}
public static final class dimen {
public static final int compat_button_inset_horizontal_material = 0x7f05004b;
public static final int compat_button_inset_vertical_material = 0x7f05004c;
public static final int compat_button_padding_horizontal_material = 0x7f05004d;
public static final int compat_button_padding_vertical_material = 0x7f05004e;
public static final int compat_control_corner_material = 0x7f05004f;
public static final int compat_notification_large_icon_max_height = 0x7f050050;
public static final int compat_notification_large_icon_max_width = 0x7f050051;
public static final int notification_action_icon_size = 0x7f050061;
public static final int notification_action_text_size = 0x7f050062;
public static final int notification_big_circle_margin = 0x7f050063;
public static final int notification_content_margin_start = 0x7f050064;
public static final int notification_large_icon_height = 0x7f050065;
public static final int notification_large_icon_width = 0x7f050066;
public static final int notification_main_column_padding_top = 0x7f050067;
public static final int notification_media_narrow_margin = 0x7f050068;
public static final int notification_right_icon_size = 0x7f050069;
public static final int notification_right_side_padding_top = 0x7f05006a;
public static final int notification_small_icon_background_padding = 0x7f05006b;
public static final int notification_small_icon_size_as_large = 0x7f05006c;
public static final int notification_subtext_size = 0x7f05006d;
public static final int notification_top_pad = 0x7f05006e;
public static final int notification_top_pad_large_text = 0x7f05006f;
}
public static final class drawable {
public static final int notification_action_background = 0x7f06005c;
public static final int notification_bg = 0x7f06005d;
public static final int notification_bg_low = 0x7f06005e;
public static final int notification_bg_low_normal = 0x7f06005f;
public static final int notification_bg_low_pressed = 0x7f060060;
public static final int notification_bg_normal = 0x7f060061;
public static final int notification_bg_normal_pressed = 0x7f060062;
public static final int notification_icon_background = 0x7f060063;
public static final int notification_template_icon_bg = 0x7f060064;
public static final int notification_template_icon_low_bg = 0x7f060065;
public static final int notification_tile_bg = 0x7f060066;
public static final int notify_panel_notification_icon_bg = 0x7f060067;
}
public static final class id {
public static final int action_container = 0x7f07000d;
public static final int action_divider = 0x7f07000f;
public static final int action_image = 0x7f070010;
public static final int action_text = 0x7f070016;
public static final int actions = 0x7f070017;
public static final int async = 0x7f07001d;
public static final int blocking = 0x7f070020;
public static final int chronometer = 0x7f070028;
public static final int forever = 0x7f07003c;
public static final int icon = 0x7f070041;
public static final int icon_group = 0x7f070043;
public static final int info = 0x7f070046;
public static final int italic = 0x7f070049;
public static final int line1 = 0x7f07004c;
public static final int line3 = 0x7f07004d;
public static final int normal = 0x7f070056;
public static final int notification_background = 0x7f070057;
public static final int notification_main_column = 0x7f070058;
public static final int notification_main_column_container = 0x7f070059;
public static final int right_icon = 0x7f070063;
public static final int right_side = 0x7f070064;
public static final int tag_transition_group = 0x7f07008d;
public static final int text = 0x7f07008e;
public static final int text2 = 0x7f07008f;
public static final int time = 0x7f070092;
public static final int title = 0x7f070094;
}
public static final class integer {
public static final int status_bar_notification_info_maxnum = 0x7f080004;
}
public static final class layout {
public static final int notification_action = 0x7f09001e;
public static final int notification_action_tombstone = 0x7f09001f;
public static final int notification_template_custom_big = 0x7f090020;
public static final int notification_template_icon_group = 0x7f090021;
public static final int notification_template_part_chronometer = 0x7f090022;
public static final int notification_template_part_time = 0x7f090023;
}
public static final class string {
public static final int status_bar_notification_info_overflow = 0x7f0b002a;
}
public static final class style {
public static final int TextAppearance_Compat_Notification = 0x7f0c010b;
public static final int TextAppearance_Compat_Notification_Info = 0x7f0c010c;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c010d;
public static final int TextAppearance_Compat_Notification_Time = 0x7f0c010e;
public static final int TextAppearance_Compat_Notification_Title = 0x7f0c010f;
public static final int Widget_Compat_NotificationActionContainer = 0x7f0c0177;
public static final int Widget_Compat_NotificationActionText = 0x7f0c0178;
}
public static final class styleable {
public static final int[] FontFamily = { 0x7f020093, 0x7f020094, 0x7f020095, 0x7f020096, 0x7f020097, 0x7f020098 };
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] FontFamilyFont = { 0x01010532, 0x01010533, 0x0101053f, 0x0101056f, 0x01010570, 0x7f020091, 0x7f020099, 0x7f02009a, 0x7f02009b, 0x7f020180 };
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_ttcIndex = 3;
public static final int FontFamilyFont_android_fontVariationSettings = 4;
public static final int FontFamilyFont_font = 5;
public static final int FontFamilyFont_fontStyle = 6;
public static final int FontFamilyFont_fontVariationSettings = 7;
public static final int FontFamilyFont_fontWeight = 8;
public static final int FontFamilyFont_ttcIndex = 9;
}
}
| [
"gabrieltanner.code@gmail.com"
] | gabrieltanner.code@gmail.com |
9a5917ab4d539f2460a6aa359bbc48ad0f114bb8 | 54d52fbdbff86001574f7e25863307a763317df5 | /src/main/java/learn/springboot/exception/AuthenticationException.java | 4f2796df3063be910902475b367785e826cc61fe | [] | no_license | RaghuKumar10/play-around-spring-boot | ac515ea5d684d4bad41da9f067e24f7e555b5844 | 0458a11a0b49fc1963cc49becce9052ac5fc51d5 | refs/heads/master | 2020-04-04T01:08:27.886393 | 2018-12-11T01:59:35 | 2018-12-11T01:59:35 | 155,669,282 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 284 | java | package learn.springboot.exception;
public class AuthenticationException extends Exception{
/**
*
*/
private static final long serialVersionUID = -3893540221285034773L;
public AuthenticationException(String message, Throwable cause) {
super(message, cause);
}
}
| [
"raghukumar10.m@gmail.com"
] | raghukumar10.m@gmail.com |
2e7cede4e07d60d3970b507adcb2570e18fdfcc9 | d4261417db59c92bb118cb7ec12c0bc43c85d62f | /src/de/uni/bielefeld/sc/hterhors/psink/obie/projects/soccerplayer/ontology/interfaces/IFreemantleFC.java | dc42afb284a6f1dd559d2d99f7de7c70bcbf67ab | [
"Apache-2.0"
] | permissive | berezovskyi/SoccerPlayerOntology | ed3a24a7ace88ba209f5439a49b04c11a8e6034a | c7dafee008911b45a2b9e8c55ffd43c1e69c3660 | refs/heads/master | 2022-06-20T02:17:21.385038 | 2018-09-21T17:09:38 | 2018-09-21T17:09:38 | 149,870,122 | 0 | 0 | Apache-2.0 | 2022-05-20T22:00:24 | 2018-09-22T11:19:31 | Java | UTF-8 | Java | false | false | 579 | java | package de.uni.bielefeld.sc.hterhors.psink.obie.projects.soccerplayer.ontology.interfaces;
import de.uni.bielefeld.sc.hterhors.psink.obie.core.ontology.annotations.AssignableSubInterfaces;
import de.uni.bielefeld.sc.hterhors.psink.obie.core.ontology.annotations.ImplementationClass;
import de.uni.bielefeld.sc.hterhors.psink.obie.projects.soccerplayer.ontology.classes.FreemantleFC;
/**
*
* @author hterhors
*
*
* Sep 6, 2018
*/
@AssignableSubInterfaces(get = {})
@ImplementationClass(get = FreemantleFC.class)
public interface IFreemantleFC extends ITeam {
}
| [
"hterhors@techfak.uni-bielefeld.de"
] | hterhors@techfak.uni-bielefeld.de |
e18951f8f24957f5b812f0a239d4df2125182843 | 3ac6d6d35cf92af182a24aabfc9b4e3bb8d1ae1b | /src/test/java/test/example/single/TestDtoInnerNonStatic.java | b8ca55126dfcd52a7882f718de8d49c69f943813 | [] | no_license | newyear-ly/GenSetterCalls-example | 20cffe293daf71cd34b879fbd1b0ecc5ccfce68d | 30673b90605b71d0f1cb0acf772e6335c773d0da | refs/heads/master | 2022-12-29T01:59:41.079827 | 2020-01-16T14:26:18 | 2020-01-16T14:26:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 401 | java | package test.example.single;
import dto.DtoInnerNonStatic;
import org.junit.Assert;
import org.junit.Test;
import test.example.base.TestBase;
public class TestDtoInnerNonStatic extends TestBase {
@Test
public void test() {
String result = testBase(DtoInnerNonStatic.class);
Assert.assertTrue(result.contains("dtoInnerNonStatic.new TestInnerNS()"));
}
}
| [
"Adrninistrator"
] | Adrninistrator |
7f3fd23770f56397171035c17de0a5a8f439c738 | 6230acd07faa3f70a1276176eff6166e984b738b | /src/test/java/com/nickmlanglois/wfp3/api/document/CursorUnitTests.java | 69adf3aecc394621b85b3f41c40586e8b6db05a5 | [
"Apache-2.0"
] | permissive | heathen00/wfparser3 | f9c5b4bb5d09c42f3bccbc4badd3069798257879 | 4419398ebf724fcd7208719a64d56c5a99ba662b | refs/heads/master | 2022-02-16T13:50:20.725867 | 2019-09-19T20:51:23 | 2019-09-19T20:51:23 | 175,873,981 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,460 | java | package com.nickmlanglois.wfp3.api.document;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
public class CursorUnitTests {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Mock
private VisibleDocumentImp mockDocument;
@InjectMocks
private VisibleCursorImp cursor;
private static VisibleCursorImp createVisibleCursorImp(VisibleDocumentImp mockDocument) {
return new VisibleCursorImp(mockDocument);
}
@Before
public void setUp() throws Exception {
cursor = createVisibleCursorImp(mockDocument);
}
@Test
public void Cursor_cursorEqualsWithNull_NotEqual() {
assertNotEquals(null, cursor);
}
@Test
public void Cursor_cursorEqualsWithNonCursor_NotEqual() {
Object object = new Object();
assertNotEquals(object, cursor);
}
@Test
public void Cursor_cursorEqualsWithSelf_Equal() {
assertEquals(cursor, cursor);
}
@Test
public void Cursor_createCursorImpWithNullDocument_NullPointerExceptionIsThrown() {
thrown.expect(NullPointerException.class);
thrown.expectMessage("document cannot be null");
new VisibleCursorImp(null);
}
}
| [
"nickmlanglois@gmail.com"
] | nickmlanglois@gmail.com |
a443e17278f4dbef952db1846d02d7d4041973bf | 5abee1741374c1aabac900717137af81dd4e448c | /src/main/java/com/jojoldu/book/springboot/web/HelloController.java | c2fc693991a05e2a35541b46bdabc259c455309b | [] | no_license | dudwk814/freelec-springboot2-webservice | 40bda6e2dba8af8f0432db599812bfca1ef0cde8 | 3b1acc915ebb665a2b127fa66bd3ebafe722ebee | refs/heads/master | 2022-12-06T15:31:22.462164 | 2020-09-07T14:38:05 | 2020-09-07T14:38:05 | 291,555,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 619 | java | package com.jojoldu.book.springboot.web;
import com.jojoldu.book.springboot.web.dto.HelloResponseDto;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/hello")
public String hello() {
return "hello";
}
@GetMapping("/hello/dto")
public HelloResponseDto helloDto(@RequestParam("name") String name, @RequestParam("amount") int amount) {
return new HelloResponseDto(name, amount);
}
}
| [
"kj99658103@gmail.com"
] | kj99658103@gmail.com |
4e1247235423e554daba82bdc2a8c5aa082b0339 | 92192642c41611dc70d1886b2dcfb6a6203882af | /jwszpt_zj_v1.0/src/org/xiaojl/service/system/dictionaries/DictionariesService.java | 48f60b3a4df28c91d4fac9422891ce5e70989fee | [] | no_license | xiaojilong/smea | 5458c932401c390fd7a0325670d2cb119cc8a24c | f7a1147638dbd28069d84b15979060edffa2b806 | refs/heads/master | 2020-06-24T18:20:00.935084 | 2016-11-26T01:47:48 | 2016-11-26T01:47:48 | 74,627,205 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,450 | java | package org.xiaojl.service.system.dictionaries;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.xiaojl.dao.DaoSupport;
import org.xiaojl.entity.Page;
import org.xiaojl.util.PageData;
@Service("dictionariesService")
public class DictionariesService{
@Resource(name = "daoSupport")
private DaoSupport dao;
//新增
public void save(PageData pd)throws Exception{
dao.save("DictionariesMapper.save", pd);
}
//修改
public void edit(PageData pd)throws Exception{
dao.update("DictionariesMapper.edit", pd);
}
//通过id获取数据
public PageData findById(PageData pd) throws Exception {
return (PageData) dao.findForObject("DictionariesMapper.findById", pd);
}
//查询总数
public PageData findCount(PageData pd) throws Exception {
return (PageData) dao.findForObject("DictionariesMapper.findCount", pd);
}
//查询某编码
public PageData findBmCount(PageData pd) throws Exception {
return (PageData) dao.findForObject("DictionariesMapper.findBmCount", pd);
}
//列出同一父类id下的数据
public List<PageData> dictlistPage(Page page) throws Exception {
return (List<PageData>) dao.findForList("DictionariesMapper.dictlistPage", page);
}
//删除
public void delete(PageData pd) throws Exception {
dao.delete("DictionariesMapper.delete", pd);
}
}
| [
"xiaojl@home"
] | xiaojl@home |
bd1aa3461392e3722d50e51ce6a8909fb7848e9d | e6dc9cfdd4d883dc346630a8ace0dcabeb581f9b | /Downloads/FoodThree/app/src/main/java/com/example/katiechen/foodthree/MainActivity.java | f1f9be10872d9ae1a65f9cd6e623d45b8bc5c5d8 | [] | no_license | mengdanchen1994/Test | 7168426e94ce813cde9ea8298e5ce3ea9ee9cb16 | 304f035c57e88b136de128404450fd441f0aeb66 | refs/heads/master | 2021-08-20T02:54:40.061066 | 2017-11-28T02:29:27 | 2017-11-28T02:29:27 | 109,869,754 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,362 | java | package com.example.katiechen.foodthree;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.content.Intent;
import com.example.katiechen.foodthree.Model.BasicInfo;
public class MainActivity extends AppCompatActivity {
private BasicInfo basicInfo;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
basicInfo = new BasicInfo();
Button startButton = findViewById(R.id.start);
startButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(MainActivity.this,"LET'S START!",Toast.LENGTH_LONG).show();
Intent intent = new Intent(MainActivity.this, Main2Activity.class);
startActivity(intent);
}
});
Button howtouse = findViewById(R.id.howtouse);
howtouse.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent2 = new Intent(MainActivity.this, Main11Activity.class);
startActivity(intent2);
}
});
}
}
| [
"mengdanchen1994@berkeley.edu"
] | mengdanchen1994@berkeley.edu |
18a7fed92d6bee4810df3e5afb4dc1fbe87922ec | 2d36f11c819007c27f02c8f9916818dfb35e05a1 | /app/src/main/java/com/example/finalproject/ui/home/HomeFragment.java | b3308e6275432be1b50b5804ed8b045c33630ae0 | [
"MIT"
] | permissive | AfonsoTaborda/DocScanner | bead201460cd846c7974eda2f56ba1f0c165eb43 | 5daa84355b5210b03c75001c876b85db50c6ade6 | refs/heads/master | 2023-01-08T11:15:01.966803 | 2020-11-06T04:34:02 | 2020-11-06T04:34:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,201 | java | package com.example.finalproject.ui.home;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import com.example.finalproject.R;
import com.example.finalproject.api.ChuckNorrisApi;
import com.example.finalproject.api.ChuckNorrisQuote;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class HomeFragment extends Fragment {
private TextView textView;
private ImageView imageView;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_home, container, false);
textView = root.findViewById(R.id.chuck_norris_quote);
imageView = root.findViewById(R.id.chuck_norris_image);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Retrofit retrofit = new Retrofit.Builder().baseUrl("https://api.chucknorris.io/")
.addConverterFactory(GsonConverterFactory.create())
.build();
ChuckNorrisApi chuckNorrisApi = retrofit.create(ChuckNorrisApi.class);
chuckNorrisApi.getQuote().enqueue(new Callback<ChuckNorrisQuote>() {
@Override
public void onResponse(Call<ChuckNorrisQuote> call, Response<ChuckNorrisQuote> response) {
if (response.code() == 200) {
textView.setText(response.body().getValue());
}
}
@Override
public void onFailure(Call<ChuckNorrisQuote> call, Throwable t) {
Log.i("Retrofit", "Something went wrong :(");
}
});
}
});
return root;
}
} | [
"254017@via.dk"
] | 254017@via.dk |
84dbf0158ebe89b214f2f01a815f4574a292bc94 | 0dc1e071ca0641e21f9290a2f6f5f746966c8566 | /app/src/main/java/muaraenimkab/bps/go/id/bps/models/Value.java | c1307268df31731bdbfa79a57622ce52c84738fb | [] | no_license | sepridrm23/BPS | e3edeee9cba79e29e98e6953dc97e1cb08418160 | 9f58ce737c33fa86e51715a29354059f0753c241 | refs/heads/master | 2020-04-12T13:02:42.940822 | 2019-05-10T10:45:39 | 2019-05-10T10:45:39 | 162,510,118 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | package muaraenimkab.bps.go.id.bps.models;
import java.util.List;
public class Value<T> {
private int success;
private String message;
private List<T> data;
public int getSuccess() {
return success;
}
public String getMessage() {
return message;
}
public List<T> getData() {
return data;
}
}
| [
"sutrisno.maret@gmail.com"
] | sutrisno.maret@gmail.com |
cb72be96cf1faa47931ee3805ebeb49b5736df21 | a80ecdb6c68f5cac68580f87ebf0ca0e9f77c456 | /src/main/java/org/wecancoeit/reviews/Review.java | cd7f824fa69d22128f792c8710dde8926c1fe556 | [] | no_license | 2021-Spring-Part-Time/reviews-mvc-ChelsMarea1 | 3d89e6a7fe0f7831606c212b78913ad83b3750e8 | a15e241766dfc48a341bd26824b1542a36ada3db | refs/heads/main | 2023-06-04T05:07:12.802171 | 2021-06-16T01:23:38 | 2021-06-16T01:23:38 | 374,007,718 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 865 | java | package org.wecancoeit.reviews;
public class Review {
private Long id;
private String title;
private String artist;
private String image;
private String category;
private String content;
public Long getId() {
return id;
}
public String getArtist() {
return artist;
}
public String getTitle() {
return title;
}
public String getImage() {
return image;
}
public String getCategory() {
return category;
}
public String getContent() {
return content;
}
public Review(long id, String title, String artist, String image, String category, String content) {
this.id = id;
this.title = title;
this.artist = artist;
this.image = image;
this.category = category;
this.content = content;
}
}
| [
"chelsea.james0@yahoo.com"
] | chelsea.james0@yahoo.com |
0ee7c2dfce58ac134751e3ecc7eb9c49fcb483f4 | 9cebef9b994740e787f7974011689429b2dda24f | /src/main/java/com/chengcainiao/utils/UserThreadLocal.java | d63594e51ede8e84b30603d30066b4fbcb846659 | [] | no_license | cheng-cainiao/student_job | 4b0ce000e4cf7db6c347e7b5d0b22653897ec96b | 7bfa2037dc2e1c1a2612ffc8c038aeacd7cd69b7 | refs/heads/main | 2023-05-14T18:55:36.395982 | 2021-06-05T03:20:04 | 2021-06-05T03:20:04 | 373,859,936 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java | package com.chengcainiao.utils;
import com.chengcainiao.vo.UserData;
public class UserThreadLocal {
//存放本地线程变量
private static ThreadLocal<String> useThreadLocal = new ThreadLocal<>();
public static void set(String token){
useThreadLocal.set(token);
}
public static String get(){
String token = useThreadLocal.get();
return token;
}
public static void remove(){
useThreadLocal.remove();
}
}
| [
"980745064@qq.com"
] | 980745064@qq.com |
2ebe6c12c50bbf259f64cc9c2b22febb53317788 | f2c5ebedfc19ab2c88522fa3eb13fe939bd09ae1 | /backend/src/main/java/com/hacka/data/repository/PlaceRepository.java | 1e654e98b59a9afa5154498f8ccd8cc7fb4d5c24 | [] | no_license | coding-competition-2019/sniveri | d45490213082e7cba0d9865932fe8de8730d60f8 | 4858da0827e14686456eabe8d44950d9d748d1a6 | refs/heads/master | 2020-09-22T05:55:47.313217 | 2019-12-04T17:13:33 | 2019-12-04T17:13:33 | 225,076,121 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 282 | java | package com.hacka.data.repository;
import com.hacka.data.entity.PlaceEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface PlaceRepository extends JpaRepository<PlaceEntity, Long> {
}
| [
"frantisek.zavazal@beit.io"
] | frantisek.zavazal@beit.io |
01ee98ee5f12570f8db5b22869bfbc717617c7b3 | 222e466deb74350467df59b569f94414dc7a6255 | /src/RDPCrystalEDILibrary/HTTP.java | 8de09915aba29a3adb2666f551607bae6974a972 | [] | no_license | Javonet-io-user/c6f6df0f-ce34-4cbd-90f7-393c140c6294 | 71a3718e0230ec015c609d5ad39dc600d40296dc | 4daa009a57625ae4df80bc48f000698a00a49f9e | refs/heads/master | 2020-04-05T08:14:17.564868 | 2018-11-08T12:54:57 | 2018-11-08T12:54:57 | 156,706,967 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 16,302 | java | package RDPCrystalEDILibrary;import Common.Activation;import static Common.Helper.Convert;import static Common.Helper.getGetObjectName;import static Common.Helper.getReturnObjectName;import static Common.Helper.ConvertToConcreteInterfaceImplementation;import Common.Helper;import com.javonet.Javonet;
import com.javonet.JavonetException;
import com.javonet.JavonetFramework;
import com.javonet.api.NObject;
import com.javonet.api.NEnum;
import com.javonet.api.keywords.NRef;
import com.javonet.api.keywords.NOut;
import com.javonet.api.NControlContainer;import java.util.concurrent.atomic.AtomicReference;import jio.System.ComponentModel.*;
import RDPCrystalEDILibrary.*;
import jio.System.*;
import jio.System.Net.*;public class HTTP extends Component {protected NObject javonetHandle; /**
* SetProperty
*/
public void setUsername (java.lang.String value){ try { javonetHandle.set("Username",value);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* GetProperty
*/
public java.lang.String getUsername (){ try { return (java.lang.String) javonetHandle.get("Username");} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return "";} }/**
* SetProperty
*/
public void setPassword (java.lang.String value){ try { javonetHandle.set("Password",value);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* GetProperty
*/
public java.lang.String getPassword (){ try { return (java.lang.String) javonetHandle.get("Password");} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return "";} }/**
* SetProperty
*/
public void setHostname (java.lang.String value){ try { javonetHandle.set("Hostname",value);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* GetProperty
*/
public java.lang.String getHostname (){ try { return (java.lang.String) javonetHandle.get("Hostname");} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return "";} }/**
* SetProperty
*/
public void setCommand (java.lang.String value){ try { javonetHandle.set("Command",value);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* GetProperty
*/
public java.lang.String getCommand (){ try { return (java.lang.String) javonetHandle.get("Command");} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return "";} }public HTTP (){ super((NObject) null); try { javonetHandle = Javonet.New("HTTP"); super.setJavonetHandle(javonetHandle); javonetHandle.addEventListener("FileUploadCompleted", new com.javonet.api.INEventListener() {
@Override
public void eventOccurred(Object[] objects)
{
for (HTTP.UploadFileCompletedDelegate handler : _FileUploadCompletedListeners) {handler.Invoke(Convert(objects[0], NObject.class),Convert(objects[1], UploadFileCompletedEventArgs.class));}}});javonetHandle.addEventListener("DownloadFileCompleted", new com.javonet.api.INEventListener() {
@Override
public void eventOccurred(Object[] objects)
{
for (HTTP.DownloadFileCompletedDelegate handler : _DownloadFileCompletedListeners) {handler.Invoke(Convert(objects[0], NObject.class),Convert(objects[1], AsyncCompletedEventArgs.class));}}});javonetHandle.addEventListener("DownloadFileProgressChanged", new com.javonet.api.INEventListener() {
@Override
public void eventOccurred(Object[] objects)
{
for (HTTP.DownloadFileProgressChangedDelegate handler : _DownloadFileProgressChangedListeners) {handler.Invoke(Convert(objects[0], NObject.class),Convert(objects[1], DownloadProgressChangedEventArgs.class));}}});javonetHandle.addEventListener("FileUploadProgressChanged", new com.javonet.api.INEventListener() {
@Override
public void eventOccurred(Object[] objects)
{
for (HTTP.UploadFileProgressChangedDelegate handler : _FileUploadProgressChangedListeners) {handler.Invoke(Convert(objects[0], NObject.class),Convert(objects[1], UploadProgressChangedEventArgs.class));}}});} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }public HTTP (IContainer container){ super((NObject) null); try { javonetHandle = Javonet.New("HTTP",container); super.setJavonetHandle(javonetHandle); javonetHandle.addEventListener("FileUploadCompleted", new com.javonet.api.INEventListener() {
@Override
public void eventOccurred(Object[] objects)
{
for (HTTP.UploadFileCompletedDelegate handler : _FileUploadCompletedListeners) {handler.Invoke(Convert(objects[0], NObject.class),Convert(objects[1], UploadFileCompletedEventArgs.class));}}});javonetHandle.addEventListener("DownloadFileCompleted", new com.javonet.api.INEventListener() {
@Override
public void eventOccurred(Object[] objects)
{
for (HTTP.DownloadFileCompletedDelegate handler : _DownloadFileCompletedListeners) {handler.Invoke(Convert(objects[0], NObject.class),Convert(objects[1], AsyncCompletedEventArgs.class));}}});javonetHandle.addEventListener("DownloadFileProgressChanged", new com.javonet.api.INEventListener() {
@Override
public void eventOccurred(Object[] objects)
{
for (HTTP.DownloadFileProgressChangedDelegate handler : _DownloadFileProgressChangedListeners) {handler.Invoke(Convert(objects[0], NObject.class),Convert(objects[1], DownloadProgressChangedEventArgs.class));}}});javonetHandle.addEventListener("FileUploadProgressChanged", new com.javonet.api.INEventListener() {
@Override
public void eventOccurred(Object[] objects)
{
for (HTTP.UploadFileProgressChangedDelegate handler : _FileUploadProgressChangedListeners) {handler.Invoke(Convert(objects[0], NObject.class),Convert(objects[1], UploadProgressChangedEventArgs.class));}}});} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }public HTTP(NObject handle) {super(handle);this.javonetHandle=handle;}public void setJavonetHandle(NObject handle) {
this.javonetHandle = handle;
}/**
* Method
*/
public void UploadFile (java.lang.String path){ try { javonetHandle.invoke("UploadFile",path);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* Method
*/
public void UploadFileAsync (java.lang.String path){ try { javonetHandle.invoke("UploadFileAsync",path);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* Method
*/
public void DownloadFile (java.lang.String downloadedFilePath){ try { javonetHandle.invoke("DownloadFile",downloadedFilePath);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* Method
*/
public void DownloadFileAsync (java.lang.String downloadedFilePath){ try { javonetHandle.invoke("DownloadFileAsync",downloadedFilePath);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* Event
*/
private java.util.ArrayList< HTTP.UploadFileCompletedDelegate> _FileUploadCompletedListeners = new java.util.ArrayList<HTTP.UploadFileCompletedDelegate>();
public void addFileUploadCompleted(HTTP.UploadFileCompletedDelegate toAdd)
{
_FileUploadCompletedListeners.add(toAdd);
}
public void removeFileUploadCompleted(HTTP.UploadFileCompletedDelegate toRemove)
{
_FileUploadCompletedListeners.remove(toRemove);
}/**
* Event
*/
private java.util.ArrayList< HTTP.DownloadFileCompletedDelegate> _DownloadFileCompletedListeners = new java.util.ArrayList<HTTP.DownloadFileCompletedDelegate>();
public void addDownloadFileCompleted(HTTP.DownloadFileCompletedDelegate toAdd)
{
_DownloadFileCompletedListeners.add(toAdd);
}
public void removeDownloadFileCompleted(HTTP.DownloadFileCompletedDelegate toRemove)
{
_DownloadFileCompletedListeners.remove(toRemove);
}/**
* Event
*/
private java.util.ArrayList< HTTP.DownloadFileProgressChangedDelegate> _DownloadFileProgressChangedListeners = new java.util.ArrayList<HTTP.DownloadFileProgressChangedDelegate>();
public void addDownloadFileProgressChanged(HTTP.DownloadFileProgressChangedDelegate toAdd)
{
_DownloadFileProgressChangedListeners.add(toAdd);
}
public void removeDownloadFileProgressChanged(HTTP.DownloadFileProgressChangedDelegate toRemove)
{
_DownloadFileProgressChangedListeners.remove(toRemove);
}/**
* Event
*/
private java.util.ArrayList< HTTP.UploadFileProgressChangedDelegate> _FileUploadProgressChangedListeners = new java.util.ArrayList<HTTP.UploadFileProgressChangedDelegate>();
public void addFileUploadProgressChanged(HTTP.UploadFileProgressChangedDelegate toAdd)
{
_FileUploadProgressChangedListeners.add(toAdd);
}
public void removeFileUploadProgressChanged(HTTP.UploadFileProgressChangedDelegate toRemove)
{
_FileUploadProgressChangedListeners.remove(toRemove);
}public static class UploadFileCompletedDelegate extends MulticastDelegate {protected NObject javonetHandle; public UploadFileCompletedDelegate (NObject object,java.lang.Integer method){ super((NObject) null); try { javonetHandle = Javonet.New("UploadFileCompletedDelegate",object,method); super.setJavonetHandle(javonetHandle); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }public UploadFileCompletedDelegate(NObject handle) {super(handle);this.javonetHandle=handle;}public void setJavonetHandle(NObject handle) {
this.javonetHandle = handle;
}/**
* Method
*/
public void Invoke (NObject sender,UploadFileCompletedEventArgs e){ try { javonetHandle.invoke("Invoke",sender,e);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* Method
*/
public IAsyncResult BeginInvoke (NObject sender,UploadFileCompletedEventArgs e,AsyncCallback callback,NObject object){ try { return ConvertToConcreteInterfaceImplementation((NObject) javonetHandle.invoke("BeginInvoke",sender,e,callback,object));} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return null;} }/**
* Method
*/
public void EndInvoke (IAsyncResult result){ try { javonetHandle.invoke("EndInvoke",result);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }}public static class UploadFileProgressChangedDelegate extends MulticastDelegate {protected NObject javonetHandle; public UploadFileProgressChangedDelegate (NObject object,java.lang.Integer method){ super((NObject) null); try { javonetHandle = Javonet.New("UploadFileProgressChangedDelegate",object,method); super.setJavonetHandle(javonetHandle); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }public UploadFileProgressChangedDelegate(NObject handle) {super(handle);this.javonetHandle=handle;}public void setJavonetHandle(NObject handle) {
this.javonetHandle = handle;
}/**
* Method
*/
public void Invoke (NObject sender,UploadProgressChangedEventArgs e){ try { javonetHandle.invoke("Invoke",sender,e);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* Method
*/
public IAsyncResult BeginInvoke (NObject sender,UploadProgressChangedEventArgs e,AsyncCallback callback,NObject object){ try { return ConvertToConcreteInterfaceImplementation((NObject) javonetHandle.invoke("BeginInvoke",sender,e,callback,object));} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return null;} }/**
* Method
*/
public void EndInvoke (IAsyncResult result){ try { javonetHandle.invoke("EndInvoke",result);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }}public static class DownloadFileCompletedDelegate extends MulticastDelegate {protected NObject javonetHandle; public DownloadFileCompletedDelegate (NObject object,java.lang.Integer method){ super((NObject) null); try { javonetHandle = Javonet.New("DownloadFileCompletedDelegate",object,method); super.setJavonetHandle(javonetHandle); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }public DownloadFileCompletedDelegate(NObject handle) {super(handle);this.javonetHandle=handle;}public void setJavonetHandle(NObject handle) {
this.javonetHandle = handle;
}/**
* Method
*/
public void Invoke (NObject sender,AsyncCompletedEventArgs e){ try { javonetHandle.invoke("Invoke",sender,e);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* Method
*/
public IAsyncResult BeginInvoke (NObject sender,AsyncCompletedEventArgs e,AsyncCallback callback,NObject object){ try { return ConvertToConcreteInterfaceImplementation((NObject) javonetHandle.invoke("BeginInvoke",sender,e,callback,object));} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return null;} }/**
* Method
*/
public void EndInvoke (IAsyncResult result){ try { javonetHandle.invoke("EndInvoke",result);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }}public static class DownloadFileProgressChangedDelegate extends MulticastDelegate {protected NObject javonetHandle; public DownloadFileProgressChangedDelegate (NObject object,java.lang.Integer method){ super((NObject) null); try { javonetHandle = Javonet.New("DownloadFileProgressChangedDelegate",object,method); super.setJavonetHandle(javonetHandle); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }public DownloadFileProgressChangedDelegate(NObject handle) {super(handle);this.javonetHandle=handle;}public void setJavonetHandle(NObject handle) {
this.javonetHandle = handle;
}/**
* Method
*/
public void Invoke (NObject sender,DownloadProgressChangedEventArgs e){ try { javonetHandle.invoke("Invoke",sender,e);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }/**
* Method
*/
public IAsyncResult BeginInvoke (NObject sender,DownloadProgressChangedEventArgs e,AsyncCallback callback,NObject object){ try { return ConvertToConcreteInterfaceImplementation((NObject) javonetHandle.invoke("BeginInvoke",sender,e,callback,object));} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return null;} }/**
* Method
*/
public void EndInvoke (IAsyncResult result){ try { javonetHandle.invoke("EndInvoke",result);} catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } }} static {
try {
Activation.initializeJavonet();
} catch (java.lang.Exception e) {
e.printStackTrace();
}
}} | [
"support@javonet.com"
] | support@javonet.com |
8adcc8011cba6ad65092271d6e8d5837c4d6d4f0 | 3196a5ded46a683683a547b61adbe67a1c3ede38 | /web/src/main/java/cz/inovatika/vdk/xml/VDKNamespaceContext.java | 1a78cf34e9a2d1eb3c2712e9d357565942e73205 | [] | no_license | NKCR-INPROVE/Virtualni-Antikvariat | 9ede17e02e90c3da0d0e069c329ee7b72e4b6d00 | 721d0d2e2ac5fcf45c55c1630c4e0c7e0e5e2cca | refs/heads/master | 2023-01-08T02:21:01.510456 | 2020-12-16T10:23:55 | 2020-12-16T10:23:55 | 221,639,618 | 0 | 0 | null | 2023-01-07T11:44:41 | 2019-11-14T07:42:41 | Java | UTF-8 | Java | false | false | 2,588 | java | /*
* Copyright (C) 2012 Pavel Stastny
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 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 cz.inovatika.vdk.xml;
import java.util.Arrays;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.Map;
import static cz.inovatika.vdk.xml.VDKNamespaces.*;
import javax.xml.namespace.NamespaceContext;
/**
* Fedora XML namespaces
* @author pavels
*/
public class VDKNamespaceContext implements NamespaceContext {
private static final Map<String, String> MAP_PREFIX2URI = new IdentityHashMap<String, String>();
private static final Map<String, String> MAP_URI2PREFIX = new IdentityHashMap<String, String>();
static {
MAP_PREFIX2URI.put("mods", BIBILO_MODS_URI);
MAP_PREFIX2URI.put("dc", DC_NAMESPACE_URI);
MAP_PREFIX2URI.put("fedora-models", FEDORA_MODELS_URI);
MAP_PREFIX2URI.put("kramerius", KRAMERIUS_URI);
MAP_PREFIX2URI.put("rdf", RDF_NAMESPACE_URI);
MAP_PREFIX2URI.put("oai", OAI_NAMESPACE_URI);
MAP_PREFIX2URI.put("sparql", SPARQL_NAMESPACE_URI);
MAP_PREFIX2URI.put("apia", FEDORA_ACCESS_NAMESPACE_URI);
MAP_PREFIX2URI.put("apim", FEDORA_MANAGEMENT_NAMESPACE_URI);
MAP_PREFIX2URI.put("marc", MARC_NAMESPACE_URI);
for (Map.Entry<String, String> entry : MAP_PREFIX2URI.entrySet()) {
MAP_URI2PREFIX.put(entry.getValue(), entry.getKey());
}
}
@Override
public String getNamespaceURI(String arg0) {
return MAP_PREFIX2URI.get(arg0.intern());
}
@Override
public String getPrefix(String arg0) {
return MAP_URI2PREFIX.get(arg0.intern());
}
@Override
public Iterator getPrefixes(String arg0) {
String prefixInternal = MAP_URI2PREFIX.get(arg0.intern());
if (prefixInternal != null) {
return Arrays.asList(prefixInternal).iterator();
} else {
return Collections.emptyList().iterator();
}
}
}
| [
"alberto.hernandez@inovatika.cz"
] | alberto.hernandez@inovatika.cz |
e5931d38beda2c2d8d3d120d12cf9fedbd5a34d1 | 34be9a1037eff1284e9eaac6e782f564da640178 | /Lesson1/Solution4.java | fc56bda7da1141f5c4f8f05f3b33549e43fba118 | [] | no_license | cfahjyjdf/Automation-QA | 486981eccde96aacd739f16c264d97e1ca82beef | b683621791e0ec41cd8f860cfec8836ba482aa5d | refs/heads/master | 2020-03-23T03:58:17.337584 | 2018-07-18T19:16:08 | 2018-07-18T19:16:08 | 141,058,832 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 355 | java | public class Solution4 {
public static void main(String[] args) {
int n = 128;
String s = String.format("%s", n);
char[] strToArray = s.toCharArray();
int sum=0;
for(int i = 0; i < strToArray.length; i++) {
char b = strToArray[i];
int bi = Character.getNumericValue(b);
sum = sum + bi;
}
System.out.printf( "%d\n", sum );
}
}
| [
"safronova.inna2016@yandex.ru"
] | safronova.inna2016@yandex.ru |
5d2fc4b464f3f115b7ea917c106297069862d199 | aea9767b852885610ce6b09367d4664a8bdb8869 | /lib_rec/src/main/java/com/lee/helper/recycler/beans/SpaceItem.java | babcef5470bd3ee312832033ac63d01e6eb6474b | [
"Apache-2.0"
] | permissive | larrySmile02/AdvancedAndroid | d50ce06a5291033f9628145b4875ade9edbceef2 | 82f2dea263d2958259def466c854f274684df989 | refs/heads/master | 2020-04-15T02:12:06.847424 | 2019-12-18T03:38:57 | 2019-12-18T03:38:57 | 164,305,996 | 6 | 0 | null | null | null | null | UTF-8 | Java | false | false | 145 | java | package com.lee.helper.recycler.beans;
import com.lee.helper.recycler.model.IDevItemModel;
public class SpaceItem implements IDevItemModel {
}
| [
"liyue@tuya.com"
] | liyue@tuya.com |
523e2b4ac1f09cd6150c17605d81e24f12d600cb | 132b78268e152d6fb9e27d494b653bda8f5187fb | /app/src/main/java/com/atguigu/shijiazhuangnews/newscenter/model/OnRequestListener.java | 07a0bb592eab5ac8da1fe271c5304510f0044762 | [] | no_license | zhangyongwei/ShiJiaZhuangNews | c9aa64ad968ca811bfe1448dc4a2fbfa4baf2dea | ca99d8daeff1210a10bf75a21fa4dbc28356d9d8 | refs/heads/master | 2021-01-13T01:07:59.783061 | 2017-04-04T04:59:08 | 2017-04-04T04:59:35 | 81,410,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 437 | java | package com.atguigu.shijiazhuangnews.newscenter.model;
import com.atguigu.shijiazhuangnews.bean.NewsCenterBean;
/**
* Created by 张永卫on 2017/4/3.
*/
public interface OnRequestListener {
/**
* 当请求成功的时候回调
* @param newsCenterBean
*/
void onSuccess(NewsCenterBean newsCenterBean);
/**
* 当请求失败的时候回调
* @param ex
*/
void onFailed(Exception ex);
}
| [
"694498731@qq.com"
] | 694498731@qq.com |
b6d21304c706029ba854289d1f05dc3696997bf1 | cdaf162c96720e893bc025dd6e8e9992d7768d86 | /exception1.java | 5fa25332d3d204a64d5791cfb0ffa025ab7f2556 | [] | no_license | Neeraj2001/Java_Solutions | a22d70894d95035206e06121604b5eec066a6d48 | 76fe625cf7151b2e353fbdcdc865157472d46e10 | refs/heads/master | 2022-11-30T02:00:42.192022 | 2020-08-14T00:04:42 | 2020-08-14T00:04:42 | 287,452,437 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 387 | java | class exception1
{
public static void main(String args[])
{
int z = 0;
try
{
int x =Integer.parseInt(args[1]);
int y =Integer.parseInt(args[0]);
z=x/y;
}
catch(Exception e)
{
e.printStackTrace();
System.out.println(e.getMessage());
System.out.println(e.toString());
System.out.println(e);
}
finally
{
System.out.println("result" + z);
}
}
} | [
"ylakshmineeraj@gmail.com"
] | ylakshmineeraj@gmail.com |
7b364a1b435403870eb150f1b15bfb88bf4b07bb | 93cf2135772f78c6fb09661cbaec2d8d3d51eccd | /app/src/main/java/com/cm/xingyu/shareapp/xiaoyu/adapter/ContentFragment.java | fc756c56f7cda7f288052782a3b3f745dd2f77d6 | [] | no_license | Google-Danny/OrgDown | 2dc4aafec43181fcfffadb58827be59f4012d4e3 | ca0e652f1a396497ded7d1a679212dbf7b5eee96 | refs/heads/master | 2021-01-21T10:41:50.007449 | 2017-09-06T01:57:02 | 2017-09-06T01:57:02 | 101,980,949 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 130 | java | package com.cm.xingyu.shareapp.xiaoyu.adapter;
/**
* Created by Administrator on 2017/9/5.
*/
public class ContentFragment {
}
| [
"489280926@qq.com"
] | 489280926@qq.com |
09c3858c8bd2edcacde08b85a4e79b04b0541e77 | bc2854e43e1dcb0e2b0d882ee393e54e4d739437 | /src/main/java/com/insurance/domain/enumeration/RiskType.java | 7b59c94dd13fe544b817b0c4ac69a6ebc83bf0dc | [] | no_license | YenyGa/insurance-company | e06d0875d81e6278f8d25eca9fb6fe05601894e0 | e0e59bb6a233540bb1bf9dbfd557f2d447f33fc8 | refs/heads/master | 2022-12-26T23:37:19.191468 | 2019-10-08T01:33:11 | 2019-10-08T01:33:11 | 213,055,663 | 0 | 0 | null | 2019-10-05T19:35:29 | 2019-10-05T19:02:50 | Java | UTF-8 | Java | false | false | 132 | java | package com.insurance.domain.enumeration;
/**
* The RiskType enumeration.
*/
public enum RiskType {
LOW, MID, MIDLOW, HIGH
}
| [
"garcia.yeny@hotmail.com"
] | garcia.yeny@hotmail.com |
0023717a921739cfa2293a0aa360b54b92feb969 | 47a1618c7f1e8e197d35746639e4480c6e37492e | /src/oracle/retail/stores/pos/services/customer/main/CustomerLookupFailedSite.java | 2e2c0c4ce9f49379eb6aa15d865f58d8937815ad | [] | no_license | dharmendrams84/POSBaseCode | 41f39039df6a882110adb26f1225218d5dcd8730 | c588c0aa2a2144aa99fa2bbe1bca867e008f47ee | refs/heads/master | 2020-12-31T07:42:29.748967 | 2017-03-29T08:12:34 | 2017-03-29T08:12:34 | 86,555,051 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 9,031 | java | /* ===========================================================================
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
* ===========================================================================
* $Header: rgbustores/applications/pos/src/oracle/retail/stores/pos/services/customer/main/CustomerLookupFailedSite.java /rgbustores_13.4x_generic_branch/1 2011/05/05 14:06:27 mszekely Exp $
* ===========================================================================
* NOTES
* <other useful comments, qualifications, etc.>
*
* MODIFIED (MM/DD/YY)
* cgreene 05/26/10 - convert to oracle packaging
* abondala 01/03/10 - update header date
* asinton 06/01/09 - Removed class deprecation since class is still in
* use.
*
* ===========================================================================
* $Log:
* 3 360Commerce 1.2 3/31/2005 4:27:37 PM Robert Pearse
* 2 360Commerce 1.1 3/10/2005 10:20:40 AM Robert Pearse
* 1 360Commerce 1.0 2/11/2005 12:10:23 PM Robert Pearse
*
* Revision 1.5 2004/07/16 16:22:55 aachinfiev
* @scr 1752 - Wrong error was showing up during Layaway Offline find by Customer
*
* Revision 1.4 2004/06/21 22:46:15 mweis
* @scr 5643 Returning when database is offline displays wrong error dialog
*
* Revision 1.3 2004/02/12 16:49:33 mcs
* Forcing head revision
*
* Revision 1.2 2004/02/11 21:45:00 rhafernik
* @scr 0 Log4J conversion and code cleanup
*
* Revision 1.1.1.1 2004/02/11 01:04:15 cschellenger
* updating to pvcs 360store-current
*
*
*
* Rev 1.0 Aug 29 2003 15:56:04 CSchellenger
* Initial revision.
*
* Rev 1.4 May 27 2003 12:28:50 baa
* rework offline flow for customer
* Resolution for 2455: Layaway Customer screen, blank customer name is accepted
*
* Rev 1.3 May 27 2003 08:48:06 baa
* rework customer offline flow
* Resolution for 2387: Deleteing Busn Customer Lock APP- & Inc. Customer.
*
* Rev 1.2 Mar 03 2003 16:48:00 RSachdeva
* Clean Up Code Conversion
* Resolution for POS SCR-1740: Code base Conversions
*
* Rev 1.1 Oct 09 2002 16:01:32 RSachdeva
* Code Conversion
* Resolution for POS SCR-1740: Code base Conversions
*
* Rev 1.0 Apr 29 2002 15:32:02 msg
* Initial revision.
*
* Rev 1.2 26 Mar 2002 10:45:32 baa
* fix flow on customer offline
* Resolution for POS SCR-199: Cust Offline screen returns to Sell Item instead of Cust Opt's
*
* Rev 1.1 Mar 18 2002 23:13:04 msg
* - updated copyright
*
* Rev 1.0 Mar 18 2002 11:25:48 msg
* Initial revision.
*
* Rev 1.0 Sep 21 2001 11:16:06 msg
* Initial revision.
*
* Rev 1.1 Sep 17 2001 13:07:14 msg
* header update
* ===========================================================================
*/
package oracle.retail.stores.pos.services.customer.main;
// foundation imports
import oracle.retail.stores.pos.services.common.CommonLetterIfc;
import oracle.retail.stores.foundation.manager.data.DataException;
import oracle.retail.stores.foundation.manager.ifc.UIManagerIfc;
import oracle.retail.stores.foundation.tour.application.Letter;
import oracle.retail.stores.foundation.tour.ifc.BusIfc;
import oracle.retail.stores.pos.manager.ifc.UtilityManagerIfc;
import oracle.retail.stores.pos.services.PosSiteActionAdapter;
import oracle.retail.stores.pos.services.customer.common.CustomerCargo;
import oracle.retail.stores.pos.ui.DialogScreensIfc;
import oracle.retail.stores.pos.ui.POSUIManagerIfc;
import oracle.retail.stores.pos.ui.beans.DialogBeanModel;
//--------------------------------------------------------------------------
/**
Determines how to handle a database error when looking up a customer.
<p>
@version $Revision: /rgbustores_13.4x_generic_branch/1 $
**/
//--------------------------------------------------------------------------
public class CustomerLookupFailedSite extends PosSiteActionAdapter
{
/**
* serialVersionUID
*/
private static final long serialVersionUID = 414160667445486478L;
/**
revision number
**/
public static final String revisionNumber = "$Revision: /rgbustores_13.4x_generic_branch/1 $";
//----------------------------------------------------------------------
/**
Determines how to handle a database error when looking up a customer.
<p>
@param bus Service Bus
**/
//----------------------------------------------------------------------
public void arrive(BusIfc bus)
{
CustomerMainCargo cargo = (CustomerMainCargo)bus.getCargo();
int errorCode = cargo.getDataExceptionErrorCode();
DialogBeanModel dialogModel = new DialogBeanModel();
boolean showScreen = true;
// Remember if we are a "Returns" transaction, as those get kinder dialogs.
boolean isReturn = false;
if (errorCode == DataException.NO_DATA)
{
// build the dialog screen
dialogModel.setResourceID("INFO_NOT_FOUND_ERROR");
dialogModel.setType(DialogScreensIfc.ERROR);
dialogModel.setButtonLetter(DialogScreensIfc.BUTTON_OK,"Retry");
}
else if (errorCode == DataException.CONNECTION_ERROR)
{
//The database is offline select the configured action
switch (cargo.getOfflineIndicator())
{
case CustomerCargo.OFFLINE_ADD:
dialogModel.setResourceID("AddCustOffline");
dialogModel.setType(DialogScreensIfc.CONFIRMATION);
dialogModel.setButtonLetter(DialogScreensIfc.BUTTON_YES,"Add");
dialogModel.setButtonLetter(DialogScreensIfc.BUTTON_NO,"Exit");
break;
case CustomerCargo.OFFLINE_LINK:
dialogModel.setResourceID("LinkCustOffline");
dialogModel.setType(DialogScreensIfc.CONFIRMATION);
dialogModel.setButtonLetter(DialogScreensIfc.BUTTON_YES,"Link");
dialogModel.setButtonLetter(DialogScreensIfc.BUTTON_NO,"Exit");
break;
case CustomerCargo.OFFLINE_EXIT:
case CustomerCargo.OFFLINE_DELETE:
case CustomerCargo.OFFLINE_UNKNOWN:
isReturn = isReturn(cargo);
if (isReturn)
{
dialogModel.setResourceID("DatabaseErrorForReturns");
}
else
{
dialogModel.setResourceID("DatabaseError");
}
dialogModel.setType(DialogScreensIfc.ERROR);
dialogModel.setButtonLetter(DialogScreensIfc.BUTTON_OK,"Exit");
break;
case CustomerCargo.OFFLINE_LAYAWAY:
// Skip error dialog if came from layaway
// Layaway will show appropriate dialog
showScreen = false;
break;
}
// If not using "Returns" kinder dialog, set the correct argument
if (!isReturn)
{
String args[] = new String[1];
UtilityManagerIfc utility =
(UtilityManagerIfc) bus.getManager(UtilityManagerIfc.TYPE);
args[0] = utility.getErrorCodeString(errorCode);
dialogModel.setArgs(args);
}
}
else // generic database error
{
// Set the correct argument
String args[] = new String[1];
UtilityManagerIfc utility =
(UtilityManagerIfc) bus.getManager(UtilityManagerIfc.TYPE);
args[0] = utility.getErrorCodeString(errorCode);
// build the dialog screen
dialogModel.setResourceID("DatabaseError");
dialogModel.setType(DialogScreensIfc.ERROR);
dialogModel.setArgs(args);
dialogModel.setButtonLetter(DialogScreensIfc.BUTTON_OK,"Exit");
}
if (showScreen)
{
// show the screen
POSUIManagerIfc ui = (POSUIManagerIfc)bus.getManager(UIManagerIfc.TYPE);
ui.showScreen(POSUIManagerIfc.DIALOG_TEMPLATE, dialogModel);
}
else
{
cargo.setCustomer(null);
cargo.setLink(false);
bus.mail(new Letter(CommonLetterIfc.OFFLINE), BusIfc.CURRENT);
}
}
/**
* Returns whether this cargo is a "Returns" type one.
* @param cargo the cargo
* @return Whether this cargo is a "Returns" type one.
*/
protected boolean isReturn(CustomerMainCargo cargo)
{
return (cargo.isReturn());
}
}
| [
"Ignitiv021@Ignitiv021-PC"
] | Ignitiv021@Ignitiv021-PC |
4837582508beb396818e76f7cab25eab6fcbee20 | 922d3730d4a5dab2e1de73f0922d56d78762ff7b | /Adocao/src/main/java/br/com/animais/adocao/util/JPAUtil.java | 0954eaf65a7d106d3475097c9548831586809041 | [] | no_license | Bruno-Waiego/TCS-AdoteAqui | 4f0664f5e3f6309aff2b0110119cd30e80d4a4b9 | d7e0705078b648a01f187ed276aab79f723d1481 | refs/heads/master | 2022-06-30T05:59:11.156257 | 2019-11-19T15:52:30 | 2019-11-19T15:52:30 | 222,727,780 | 0 | 0 | null | 2022-06-21T02:16:33 | 2019-11-19T15:26:07 | Java | UTF-8 | Java | false | false | 418 | java | package br.com.animais.adocao.util;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
public class JPAUtil {
private static EntityManagerFactory factory;
static {
factory = Persistence.createEntityManagerFactory("AdocaoAnimaisPU");
}
public static EntityManager getEntityManager() {
return factory.createEntityManager();
}
}
| [
"brunow.gamer@gmail.com"
] | brunow.gamer@gmail.com |
b335bee74e04581b6703df5138ab112fbe184b44 | 73e8275f78c60b09747e49aa055dc53f34c34bd7 | /katana-web/src/main/java/by/sazonenka/katana/web/client/events/ValidationRuleSave.java | d90dcd131fa2ec5dc6d9299349e469049f8d4a4d | [] | no_license | sazonenka/katana | 8ec6cd79ca13beac277a83c406992837fed4bb6d | 95c7a0117940110a38821b2ec9bcb7f51f37790f | refs/heads/master | 2016-09-11T02:02:45.276095 | 2012-07-18T18:23:16 | 2012-07-18T18:23:16 | 3,570,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,073 | java | package by.sazonenka.katana.web.client.events;
import by.sazonenka.katana.web.model.ValidationRuleModel;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Aliaksandr Sazonenka
*/
public final class ValidationRuleSave {
public static final class Event extends GwtEvent<Handler> {
private static Type<Handler> type;
public static Type<Handler> getType() {
if (type == null) {
type = new Type<Handler>();
}
return type;
}
private final ValidationRuleModel model;
public Event(ValidationRuleModel model) {
this.model = model;
}
public ValidationRuleModel getModel() {
return model;
}
@Override
public Type<Handler> getAssociatedType() {
return type;
}
@Override
protected void dispatch(Handler handler) {
handler.onSave(this);
}
}
public interface Handler extends EventHandler {
void onSave(Event event);
}
private ValidationRuleSave() {
/* Ensure non-instanciability. */
}
}
| [
"aliaksandr.sazonenka@gmail.com"
] | aliaksandr.sazonenka@gmail.com |
096c47e6035a3117e9b3804ff02e835a70a05a10 | 57cbe1f891df4ec38c90a5ba65e6a3e705901dae | /src/main/java/UIFarmeWork/BrowserUtils.java | 84cabb00aed97571c0e673b11a07b141edc3ca19 | [] | no_license | czf0122/czf | 600975532c1efb1adb2d0572a0557f9cd2b97311 | b343ddaace5da286c73434bce7b665a91d7d7cab | refs/heads/master | 2021-01-20T01:50:52.023568 | 2017-04-25T08:36:54 | 2017-04-25T08:36:54 | 89,332,939 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,392 | java | package UIFarmeWork;
import Utils.ReportUtils;
import org.openqa.selenium.WebDriver;
/**
* Created by MrChen on 2017/4/23.
*/
/*
浏览器操作行为
*/
public class BrowserUtils {
WebDriver driver;
// ReportUtils report = new ReportUtils();
//获取driver
public WebDriver getdriver(){
return driver;
}
//打开网页
public void openWeb(String url){
if(url.equals("") || url == null){
System.out.println("url为空");
}else{
driver.get(url);
System.out.println("打开"+url+"页面");
}
}
//关闭网页
public void closeWeb(){
driver.close();
}
//暂停操作
public void pause(long milliseconds){
if(milliseconds <= 0){
return;
}try{
Thread.sleep(milliseconds);
System.out.println("暂停"+milliseconds+"结束");
}catch (InterruptedException e){
e.printStackTrace();
}
}
//退出
public void quit(){
driver.quit();
}
//获取当前页的URL
public String getCurrentUrl(){
String CurrentUrl = driver.getCurrentUrl();
System.out.println("当前页面Url为:"+CurrentUrl);
return CurrentUrl;
}
//刷新
public void refresh(){
driver.navigate().refresh();
}
//返回上一页
public void back(){
driver.navigate().back();
}
//前进
public void forword(){
driver.navigate().forward();
}
//切换窗口
public WebDriver switchTo_window(String windowHandle){
WebDriver driver1 = driver.switchTo().window(windowHandle);
return driver1;
}
//根据页面名称orID切换窗口
public WebDriver switch_Frame(String frame){
WebDriver driver1 = driver.switchTo().frame(frame);
System.out.println("切换到"+frame+"页面");
return driver1;
}
//根据索引位置切换窗口
public WebDriver switch_Frame(int index){
WebDriver driver1 = driver.switchTo().frame(index);
System.out.println("切换到"+index+"页面");
return driver1;
}
//根据元素切换窗口
public WebDriver switch_Frame(WebDriver element){
return null;
}
//截图
public void screenShot(String aa){}
public void screenShot(){}
public void sshot(){}
}
| [
"zhenzhaofeng@163.com"
] | zhenzhaofeng@163.com |
0cb6e427477bc4800a5371ad5ab4a634ea305968 | 43d3b3bd2e1ad89b0b323dc262d0cb59c450155e | /L1/TPs/0201-POO-JAVA/tp8/src/TestVector.java | 9a2725d1b32a33c797b96a77f94486710ffb0425 | [
"MIT"
] | permissive | Tehcam/Studies | bdb5c23c4a65cd66c39a19ea6b2e67284eaab11d | 69477a211d8c686473b171ad2fa4298ead2ee60d | refs/heads/master | 2023-08-14T20:45:28.090962 | 2021-10-02T14:28:31 | 2021-10-02T14:28:31 | 411,800,074 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 575 | java | import etoilecraft.*;
import java.util.Vector;
public class TestVector
{
public static void main(String[] args)
{
Vector<IUnite> unites = new Vector<IUnite>();
unites.add(new Marine(10));
unites.add(new Flammeur(10));
unites.add(new Cuirasse(10));
for(IUnite u : unites)
{
System.out.println(u);
}
unites.remove(1);
System.out.println();
for (IUnite u : unites)
{
System.out.println(u);
}
System.out.println("\n" + unites.get(1));
}
} | [
"tehcam42@gmail.com"
] | tehcam42@gmail.com |
f2ddbe29f5b46cffbf19890e549bd290d15899c3 | 484ae52cc9fb33083e6e1424abad7ce56a987956 | /src/br/ufpe/cin/tests/DeletionsHandlerTest.java | 7f597b309221736cfafc8bae399c2d2c518922c8 | [] | no_license | lilingrowup/jFSTMerge | 5bff033eec5d91a07a229d169216893906d5dbc9 | f4e39910e2bef88e24730739e8fd1eaaf83ef2e9 | refs/heads/master | 2020-03-26T20:52:16.290937 | 2018-08-18T17:37:40 | 2018-08-18T17:37:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,075 | java | package br.ufpe.cin.tests;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.OutputStream;
import java.io.PrintStream;
import org.junit.BeforeClass;
import org.junit.Test;
import br.ufpe.cin.app.JFSTMerge;
import br.ufpe.cin.files.FilesManager;
import br.ufpe.cin.mergers.util.MergeContext;
public class DeletionsHandlerTest {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
//hidding sysout output
@SuppressWarnings("unused")
PrintStream originalStream = System.out;
PrintStream hideStream = new PrintStream(new OutputStream(){
public void write(int b) {}
});
System.setOut(hideStream);
}
@Test
public void testFileDeletion() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninner/left.java"),
new File("testfiles/deletioninner/base.java"),
null,
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("<<<<<<<MINEpackagecom.example;publicclassTest{voidm(){}}=======>>>>>>>YOURS")
);
}
@Test
public void testInnerDeletion() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninner/left.java"),
new File("testfiles/deletioninner/base.java"),
new File("testfiles/deletioninner/right.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{voidm(){}intb;}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionReversed() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninner/left.java"),
new File("testfiles/deletioninner/base.java"),
new File("testfiles/deletioninner/right.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{voidm(){}intb;}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionWithNewInstanceOfOriginal() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernewinstanceoforiginal/left.java"),
new File("testfiles/deletioninnernewinstanceoforiginal/base.java"),
new File("testfiles/deletioninnernewinstanceoforiginal/right.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{classA{doublea;doubleb;}classB{doublea;}publicstaticvoidmain(String[]args){newA();}}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionWithNoNewInstanceOfOriginal() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernoinstanceoforiginal/left.java"),
new File("testfiles/deletioninnernoinstanceoforiginal/base.java"),
new File("testfiles/deletioninnernoinstanceoforiginal/right.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{classB{doublea;doubleb;}}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionWithNewInstanceOfRenamed() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernewinstanceofrenamed/left.java"),
new File("testfiles/deletioninnernewinstanceofrenamed/base.java"),
new File("testfiles/deletioninnernewinstanceofrenamed/right.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{<<<<<<<MINE=======classA{doublea;doubleb;}>>>>>>>YOURSclassB{doublea;}publicstaticvoidmain(String[]args){newB();}}")
);
assertTrue(ctx.innerDeletionConflicts==1);
}
@Test
public void testInnerDeletionWithNoEditionOfOriginal() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernoeditionoforiginal/left.java"),
new File("testfiles/deletioninnernoeditionoforiginal/base.java"),
new File("testfiles/deletioninnernoeditionoforiginal/right.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{classB{doublea;}inta;}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionNotRefactoring() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernotrefactoring/left.java"),
new File("testfiles/deletioninnernotrefactoring/base.java"),
new File("testfiles/deletioninnernotrefactoring/right.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{classB{doublea;doubleb;}inta;}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionWithNewInstanceOfOriginalReversed() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernewinstanceoforiginal/right.java"),
new File("testfiles/deletioninnernewinstanceoforiginal/base.java"),
new File("testfiles/deletioninnernewinstanceoforiginal/left.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{classA{doublea;doubleb;}publicstaticvoidmain(String[]args){newA();}classB{doublea;}}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionWithNoNewInstanceOfOriginalReversed() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernoinstanceoforiginal/right.java"),
new File("testfiles/deletioninnernoinstanceoforiginal/base.java"),
new File("testfiles/deletioninnernoinstanceoforiginal/left.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{classB{doublea;doubleb;}}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionWithNewInstanceOfRenamedReversed() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernewinstanceofrenamed/right.java"),
new File("testfiles/deletioninnernewinstanceofrenamed/base.java"),
new File("testfiles/deletioninnernewinstanceofrenamed/left.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{<<<<<<<MINEclassA{doublea;doubleb;}=======>>>>>>>YOURSclassB{doublea;}publicstaticvoidmain(String[]args){newB();}}")
);
assertTrue(ctx.innerDeletionConflicts==1);
}
@Test
public void testInnerDeletionWithNoEditionOfOriginalReversed() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernoeditionoforiginal/right.java"),
new File("testfiles/deletioninnernoeditionoforiginal/base.java"),
new File("testfiles/deletioninnernoeditionoforiginal/left.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{inta;classB{doublea;}}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
@Test
public void testInnerDeletionNotRefactoringReversed() {
MergeContext ctx = new JFSTMerge().mergeFiles(
new File("testfiles/deletioninnernotrefactoring/right.java"),
new File("testfiles/deletioninnernotrefactoring/base.java"),
new File("testfiles/deletioninnernotrefactoring/left.java"),
null);
assertTrue(
FilesManager.getStringContentIntoSingleLineNoSpacing(ctx.semistructuredOutput)
.equals("packagecom.example;publicclassTest{inta;classB{doublea;doubleb;}}")
);
assertTrue(ctx.innerDeletionConflicts==0);
}
}
| [
"gjcc@cin.ufpe.br"
] | gjcc@cin.ufpe.br |
578f079c4746d62088cac610f55286e582cc8d59 | 511489c328acb870643ae4baf2a748d4724e4760 | /src/main/java/com/bs/music/service/impl/SongServiceImpl.java | e458747162353e049d24effaa9000536fca9787d | [] | no_license | ChangfuDev/Music | 734986f4a29e3ac65c2c041d1df67b313e45ef65 | 87a6ee8aeaef056c2e9fd7e5924a8106f903d124 | refs/heads/master | 2020-05-05T11:03:13.602348 | 2018-01-03T06:52:56 | 2018-01-03T06:52:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,343 | java | package com.bs.music.service.impl;
import com.bs.music.mapper.SongMapper;
import com.bs.music.model.SongInfo;
import com.bs.music.model.SongVo;
import com.bs.music.service.SongService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Maps;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.util.StringUtil;
import java.util.List;
import java.util.Map;
/**
* 歌曲操作实现
* Created by shangpanpan on 2016/4/7.
*/
@Service("songService")
public class SongServiceImpl extends BaseService<SongInfo> implements SongService {
@Autowired
private SongMapper songMapper;
@Override
public List<SongInfo> getOrder(String orderBy, int page, int rows) {
Example example = new Example(SongInfo.class);
PageHelper.orderBy(orderBy + " desc");
PageHelper.startPage(page, rows);
return selectByExample(example);
}
@Override
public List<SongInfo> selectBySong(SongInfo songInfo, int page, int rows) {
Example example = new Example(SongInfo.class);
Example.Criteria criteria = example.createCriteria();
if (StringUtil.isNotEmpty(songInfo.getName())) {
criteria.andLike("name", "%" + songInfo.getName() + "%");
}
//分页查询
PageHelper.startPage(page, rows);
return selectByExample(example);
}
@Override
public PageInfo<SongVo> selectSongInfo(int page, int rows, String sort) {
if ((sort == null)) {
PageHelper.orderBy("id desc");
}
PageHelper.orderBy(sort + " desc");
PageHelper.startPage(page, rows);
List<SongVo> songVos = songMapper.showSongInfo();
return new PageInfo<SongVo>(songVos);
}
@Override
public SongInfo selectOne(SongInfo songInfo) {
return songMapper.selectOne(songInfo);
}
@Override
public int getLastOne() {
return songMapper.getLastOne();
}
@Override
public PageInfo<SongVo> selectAny(String search, int page, int rows) {
PageHelper.startPage(page, rows);
List<SongVo> songVos = songMapper.selectAlls(search);
return new PageInfo<SongVo>(songVos);
}
}
| [
"cosycoder@foxmail.com"
] | cosycoder@foxmail.com |
8ad558a89924488316547bc74e18b78dfac67222 | 697c45ffbb747cd2c6ae7351488971459edb9e65 | /_NoticeBoard_FC-mybatis/src/kr/or/kosta/model/service/impl/NoticeBoardServiceImpl.java | aaa1918d6f9f62dff027866c5163abbac0009ca9 | [] | no_license | bmbmm1114/test | 4d2f0c21da0bbf51856784a9d0283ab953d31892 | 0d434239c71d6b5509355be260b4f5ed0189b530 | refs/heads/master | 2022-12-22T13:48:12.386215 | 2020-06-23T08:28:57 | 2020-06-23T08:28:57 | 74,799,712 | 0 | 0 | null | 2022-12-16T10:06:18 | 2016-11-26T02:23:55 | Java | UTF-8 | Java | false | false | 6,120 | java | package kr.or.kosta.model.service.impl;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import kr.or.kosta.model.dao.CodeDao;
import kr.or.kosta.model.dao.NoticeBoardDao;
import kr.or.kosta.model.dao.impl.CodeDaoImpl;
import kr.or.kosta.model.dao.impl.NoticeBoardDaoImpl;
import kr.or.kosta.model.service.NoticeBoardService;
import kr.or.kosta.util.Constants;
import kr.or.kosta.util.PagingBean;
import kr.or.kosta.util.SqlSessionFactoryManager;
import kr.or.kosta.util.TextUtil;
import kr.or.kosta.vo.Code;
import kr.or.kosta.vo.Notice;
public class NoticeBoardServiceImpl implements NoticeBoardService {
private SqlSessionFactory factory;
private NoticeBoardDao dao;
private static NoticeBoardService instance;
private NoticeBoardServiceImpl() throws IOException {
factory = SqlSessionFactoryManager.getInstance().getSqlSessionFactory();
dao = NoticeBoardDaoImpl.getInstance();
}
public static NoticeBoardService getInstance() throws IOException {
if (instance == null) {
instance = new NoticeBoardServiceImpl();
}
return instance;
}
@Override
/*
* code테이블에서 말머리 조회 후 리턴 - CodeDao.selectCodeByCodeCategory()
*/
public List<Code> getWriteFormPrefix(){
CodeDao codeDao = CodeDaoImpl.getInstance();
SqlSession session = null;
try {
session = factory.openSession();
return codeDao.selectCodeByCodeCategory(session, Constants.NOTICE_BOARD_PREFIX);
} finally {
session.close();
}
}
@Override
/*
* 1. 매개변수로 받은 등록할 공지사항 정보의 title과 글내용(content)을 html로 보여줄 형식으로 변경 - TextUtil.textToHtml()
* 2. DB에 글 등록 - NoticeDao.insertNoticeBoard()
* 3. commit 처리
*/
public void writeNotice(Notice notice){
SqlSession session = null;
try {
session = factory.openSession();
//제목과 내용을 HTML에 맞게 변환
notice.setTitle(TextUtil.textToHtml(notice.getTitle()));
notice.setContent(TextUtil.textToHtml(notice.getContent()));
//insert작업처리
dao.insertNoticeBoard(session, notice);
session.commit();
} finally {
session.close();
}
}
@Override
/*
* 1. 조회수 1 증가 : NoticeDao.updateViewCount()
* 2. 글 조회 : NoticeDao.selectNoticeBoardByNo()
* 3. commit()
* 4. 조회한 결과 리턴
*/
public Notice getNotice(int no){
SqlSession session = null;
try {
session = factory.openSession();
//조회수 증가
dao.updateViewCount(session, no);
//게시물 조회
Notice notice = dao.selectNoticeBoardByNo(session, no);
session.commit();
return notice;
} finally {
session.close();
}
}
@Override
/*
* 글번호로 글 조회 후 리턴 : NoticeDao.selectNoticeBoardByNo()
*/
public Notice getNoticeAsResult(int no){
SqlSession session = null;
try {
session = factory.openSession();
//게시물 조회
Notice notice = dao.selectNoticeBoardByNo(session, no);
return notice;
} finally {
session.close();
}
}
@Override
/*
* 1. 페이지에 보여줄 공지사항 게시물들 조회 - NoticeDao.selectNoticeBoardList()
* 2. 전체 게시물수 조회해서 PagingBean 생성 - NoticeDao.selectCountNoticeBoard()
* 3. 둘을 Map에 묶어 리턴
*/
public Map<String, Object> list(int page){
SqlSession session = null;
//목록을 만드는데 필요한 List와 PagingBean객체를 담을 Map
Map<String, Object> result = new HashMap<String, Object>();
try {
session = factory.openSession();
//목록에 보여줄 게시물들 조회
result.put("list", dao.selectNoticeBoardList(session, page));
//PagingBean 생성 - 총게시물수 조회
result.put("pageBean", new PagingBean(dao.selectCountNoticeBoard(session), page));
return result;
} finally {
session.close();
}
}
@Override
/*
* 1. 공지사항 글번호로 DB에서 게시물 삭제 : NoticeDao.deleteNoticeByNo()
* 2. commit 처리
*/
public void removeByNo(int no){
SqlSession session = null;
try {
session = factory.openSession();
dao.deleteNoticeBoardByNo(session, no);
session.commit();
} finally {
session.close();
}
}
@Override
/*
* 1. 수정할 공지사항 게시물 글번호로 조회 - NoticeDao.selectNoticeBoardByNo()
* 2. 조회한 게시글의 title과 내용을 <textarea>에 보여질 방식으로 변환 : TextUtil.htmlToText()
* 3. 말머리에 보여줄 Code들 조회 : CodeDao.selectCodeByCodeCategory()
* 4.조회한 공지사항과 Code들을 Map으로 묶어 리턴
*/
public Map<String, Object> getModifyNotice(int no){
//처리 결과로 수정할 게시물 정보(no로 조회) 와 prefix들을 조회해서 리턴.
HashMap<String, Object> map = new HashMap<String, Object>();
SqlSession session = null;
try {
session = factory.openSession();
Notice notice = dao.selectNoticeBoardByNo(session, no);
notice.setTitle(TextUtil.htmlToText(notice.getTitle()));
notice.setContent(TextUtil.htmlToText(notice.getContent()));
map.put("notice", notice);
//코드테이블에서 Prefix조회
List<Code> codeList = CodeDaoImpl.getInstance().selectCodeByCodeCategory(session, Constants.NOTICE_BOARD_PREFIX);
map.put("codeList", codeList);
return map;
} finally {
session.close();
}
}
@Override
/*
* 1. 매개변수로 받은 수정 처리할 공지사항 정보의 title과 글내용(content)을 html로 보여줄 형식으로 변경 - TextUtil.textToHtml()
* 2. DB에 수정처리 : NoticeDao.updateNoticeBoard()
* 3. commit처리
*/
public void modifyNotice(Notice notice){
SqlSession session = null;
try {
session = factory.openSession();
//제목과 내용을 HTML에 맞게 변환
notice.setTitle(TextUtil.textToHtml(notice.getTitle()));
notice.setContent(TextUtil.textToHtml(notice.getContent()));
//DB 수정처리
dao.updateNoticeBoard(session, notice);
session.commit();
} finally {
session.close();
}
}
}
| [
"kosta@192.168.0.117"
] | kosta@192.168.0.117 |
666151f1382607dd53fe93bdc18f5d7b086127c6 | 50eeacf730c67bfc5f989281e19d52f865a294c9 | /trunk/myfaces-impl-2021override/src/main/java/org/apache/myfaces/ov2021/context/servlet/RequestMap.java | a7d1290be80b04c5d9563d568d27c08e8e5cac1a | [
"Apache-2.0"
] | permissive | lu4242/ext-myfaces-2.0.2-patch | 4dc5c2b49ce4a3cfc1261b78848bb3cea3b6d597 | 703d0dcf45469dbc69e84d8a607b913dd6be712a | refs/heads/master | 2021-01-10T19:09:03.293299 | 2014-04-04T13:03:06 | 2014-04-04T13:03:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,259 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.ov2021.context.servlet;
import java.util.Enumeration;
import java.util.Map;
import javax.servlet.ServletRequest;
import org.apache.myfaces.ov2021.util.AbstractAttributeMap;
/**
* ServletRequest attributes Map.
*
* @author Anton Koinov (latest modification by $Author: bommel $)
* @version $Revision: 1187700 $ $Date: 2011-10-22 14:19:37 +0200 (Sa, 22 Okt 2011) $
*/
public final class RequestMap extends AbstractAttributeMap<Object>
{
final ServletRequest _servletRequest;
RequestMap(final ServletRequest servletRequest)
{
_servletRequest = servletRequest;
}
@Override
protected Object getAttribute(final String key)
{
return _servletRequest.getAttribute(key);
}
@Override
protected void setAttribute(final String key, final Object value)
{
_servletRequest.setAttribute(key, value);
}
@Override
protected void removeAttribute(final String key)
{
_servletRequest.removeAttribute(key);
}
@Override
@SuppressWarnings("unchecked")
protected Enumeration<String> getAttributeNames()
{
return _servletRequest.getAttributeNames();
}
@Override
public void putAll(final Map<? extends String, ? extends Object> t)
{
throw new UnsupportedOperationException();
}
@Override
public void clear()
{
throw new UnsupportedOperationException();
}
}
| [
"lu4242@gmail.com"
] | lu4242@gmail.com |
28f0b0fbdc760552e9df0a4ef5f77137cae4f5b9 | 56af0cc1defbca9c4359d66033ffea501f2d95ae | /src/main/java/spring_blog/demo/Model/Comment.java | 1b4070bdfc764ece24d74d6a39de6952b71d6fff | [] | no_license | Panandy23/spring_blog | 0d9a0512016236c99a2df2224b90c6467d12896f | d05d430c64313df6226184bae1c8711c3302ed55 | refs/heads/master | 2020-06-02T00:30:17.442253 | 2019-09-08T12:18:24 | 2019-09-08T12:18:24 | 190,978,725 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 633 | java | package spring_blog.demo.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
public class Comment {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String message;
@ManyToOne
@JoinColumn(name = "user_id")
private User user;
@ManyToOne
@JoinColumn(name = "post_id")
private Post post;
public Comment(String message, User user, Post post) {
this.message = message;
this.user = user;
this.post = post;
}
}
| [
"panandy@poczta.onet.pl"
] | panandy@poczta.onet.pl |
14cbc528f2391325e835c388718450c5360fd198 | ea53c32c5ea4c67c1ec967e021923d15bafbfcd0 | /My Java Project/src/com/methodoverriding/Employee.java | 46f8ca60f392bcb3ff56d4e8d64f8040bd91a14a | [] | no_license | indhulekha/Test-Project | 1235c681d66f64e6c9d0a2b06038c315a82f6d25 | 8af38e65c1639afda82f048c6822fe1c077efce1 | refs/heads/master | 2020-07-04T04:10:58.677366 | 2019-09-03T13:32:11 | 2019-09-03T13:32:11 | 202,150,805 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 131 | java | package com.methodoverriding;
public class Employee {
void works()
{
System.out.println("employee should work");
}
}
| [
"indhulekhagaekwade@gmail.com"
] | indhulekhagaekwade@gmail.com |
98ff092d4c2cc4f0ac4b7161bff4d0bfc25faa62 | 58da62dfc6e145a3c836a6be8ee11e4b69ff1878 | /src/main/java/com/alipay/api/domain/ValidDateInfo.java | 585b12403b8ed5a1d0688ddc3829a002e4cd3de0 | [
"Apache-2.0"
] | permissive | zhoujiangzi/alipay-sdk-java-all | 00ef60ed9501c74d337eb582cdc9606159a49837 | 560d30b6817a590fd9d2c53c3cecac0dca4449b3 | refs/heads/master | 2022-12-26T00:27:31.553428 | 2020-09-07T03:39:05 | 2020-09-07T03:39:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,345 | java | package com.alipay.api.domain;
import java.util.Date;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 有效期
*
* @author auto create
* @since 1.0, 2016-06-23 17:38:07
*/
public class ValidDateInfo extends AlipayObject {
private static final long serialVersionUID = 4713928566885146866L;
/**
* 截至时间
*/
@ApiField("end_time")
private Date endTime;
/**
* 相对有效期
*/
@ApiField("relative_time")
private PeriodInfo relativeTime;
/**
* 开始时间
*/
@ApiField("start_time")
private Date startTime;
/**
* 时间模式,RELATIVE=相对时间,RELATIVE=绝对模式
*/
@ApiField("time_mode")
private String timeMode;
public Date getEndTime() {
return this.endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public PeriodInfo getRelativeTime() {
return this.relativeTime;
}
public void setRelativeTime(PeriodInfo relativeTime) {
this.relativeTime = relativeTime;
}
public Date getStartTime() {
return this.startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public String getTimeMode() {
return this.timeMode;
}
public void setTimeMode(String timeMode) {
this.timeMode = timeMode;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
3986ea0e224805ab776fb6873a2e5b91525060ff | 774d36285e48bd429017b6901a59b8e3a51d6add | /sources/com/google/android/gms/internal/ads/zzbk.java | 8abd768ebd622fa7e49ec73306e7cfb9060ee380 | [] | no_license | jorge-luque/hb | 83c086851a409e7e476298ffdf6ba0c8d06911db | b467a9af24164f7561057e5bcd19cdbc8647d2e5 | refs/heads/master | 2023-08-25T09:32:18.793176 | 2020-10-02T11:02:01 | 2020-10-02T11:02:01 | 300,586,541 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,282 | java | package com.google.android.gms.internal.ads;
import java.nio.ByteBuffer;
import java.util.Date;
/* compiled from: com.google.android.gms:play-services-ads@@19.1.0 */
public final class zzbk extends zzegk {
private Date zzct;
private Date zzcu;
private long zzcv;
private long zzcw;
private double zzcx = 1.0d;
private float zzcy = 1.0f;
private zzegu zzcz = zzegu.zziix;
private long zzda;
private int zzdb;
private int zzdc;
private int zzdd;
private int zzde;
private int zzdf;
private int zzdg;
public zzbk() {
super("mvhd");
}
public final long getDuration() {
return this.zzcw;
}
public final String toString() {
return "MovieHeaderBox[" + "creationTime=" + this.zzct + ";" + "modificationTime=" + this.zzcu + ";" + "timescale=" + this.zzcv + ";" + "duration=" + this.zzcw + ";" + "rate=" + this.zzcx + ";" + "volume=" + this.zzcy + ";" + "matrix=" + this.zzcz + ";" + "nextTrackId=" + this.zzda + "]";
}
public final void zzg(ByteBuffer byteBuffer) {
zzm(byteBuffer);
if (getVersion() == 1) {
this.zzct = zzegn.zzfv(zzbg.zzc(byteBuffer));
this.zzcu = zzegn.zzfv(zzbg.zzc(byteBuffer));
this.zzcv = zzbg.zza(byteBuffer);
this.zzcw = zzbg.zzc(byteBuffer);
} else {
this.zzct = zzegn.zzfv(zzbg.zza(byteBuffer));
this.zzcu = zzegn.zzfv(zzbg.zza(byteBuffer));
this.zzcv = zzbg.zza(byteBuffer);
this.zzcw = zzbg.zza(byteBuffer);
}
this.zzcx = zzbg.zzd(byteBuffer);
byte[] bArr = new byte[2];
byteBuffer.get(bArr);
this.zzcy = ((float) ((short) ((bArr[1] & 255) | ((short) (0 | ((bArr[0] << 8) & 65280)))))) / 256.0f;
zzbg.zzb(byteBuffer);
zzbg.zza(byteBuffer);
zzbg.zza(byteBuffer);
this.zzcz = zzegu.zzn(byteBuffer);
this.zzdb = byteBuffer.getInt();
this.zzdc = byteBuffer.getInt();
this.zzdd = byteBuffer.getInt();
this.zzde = byteBuffer.getInt();
this.zzdf = byteBuffer.getInt();
this.zzdg = byteBuffer.getInt();
this.zzda = zzbg.zza(byteBuffer);
}
public final long zzs() {
return this.zzcv;
}
}
| [
"jorge.luque@taiger.com"
] | jorge.luque@taiger.com |
b4202fa3d92a5c617cb07e88b5f85f0ebad7e7e2 | 9dd0cc645f7719e5352e43a1bdde83833407fbbc | /projektni/TouristInfo/src/turisticke_atrakcije/TuristickaAtrakcija.java | 1e968619b07de05765099a35172edab15bedbb10 | [] | no_license | marija-ra/TouristInfo | 77a652fc70479da2da0e8d014d53d3dbb94cda42 | 4eb8105962caad7a53993728bcbf86e30e703171 | refs/heads/master | 2022-12-13T09:36:19.928265 | 2020-08-10T10:39:06 | 2020-08-10T10:39:06 | 286,444,178 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,521 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package turisticke_atrakcije;
import java.io.Serializable;
/**
*
* @author Dell
*/
public class TuristickaAtrakcija implements Serializable {
private String naziv;
private String lokacija;
private String tipAtrakcije;
private NacinPlacanja placanje;
public TuristickaAtrakcija(String naziv, String lokacija, String tipAtrakcije, NacinPlacanja placanje) {
this.naziv = naziv;
this.lokacija = lokacija;
this.tipAtrakcije = tipAtrakcije;
this.placanje = placanje;
}
public String getNaziv() {
return naziv;
}
public String getLokacija() {
return lokacija;
}
public String getTipAtrakcije() {
return tipAtrakcije;
}
public NacinPlacanja getPlacanje() {
return placanje;
}
public void setNaziv(String naziv) {
this.naziv = naziv;
}
public void setLokacija(String lokacija) {
this.lokacija = lokacija;
}
public void setTipAtrakcije(String tipAtrakcije) {
this.tipAtrakcije = tipAtrakcije;
}
public void setPlacanje(NacinPlacanja placanje) {
this.placanje = placanje;
}
@Override
public String toString() {
return tipAtrakcije + " > naziv: " + naziv + " lokacija: " + lokacija ;
}
}
| [
"marija.racic.08@outlook.com"
] | marija.racic.08@outlook.com |
9e93435bb3e2df0b445f2281933b476c629b0f0c | 52c6c2bce54e03d69fcd321177b75fc0330f6ddf | /src/main/java/com/gkhn/issuemanagement/service/IssueHistoryService.java | 871c7fa41a235ca49468e21f05be41682096a48f | [] | no_license | gokhangokcinar/Spring-Boot-Workshop | c73a2a5ea7108dc0ddd3e92537deaea8d4342540 | d6d307b5fd2f6b9e00c3ce3c3b897d1c69662a92 | refs/heads/main | 2023-06-02T19:04:08.530322 | 2021-06-16T19:04:26 | 2021-06-16T19:04:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 559 | java | package com.gkhn.issuemanagement.service;
import com.gkhn.issuemanagement.entity.Issue;
import com.gkhn.issuemanagement.entity.IssueHistory;
import com.gkhn.issuemanagement.repository.IssueRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.math.BigInteger;
public interface IssueHistoryService {
IssueHistory save(IssueHistory issueHistory);
IssueHistory getById(Long id);
Page<IssueHistory> getAllPageable(Pageable pageable);
Boolean delete(IssueHistory issueHistory);
}
| [
"gkhngkcnr@gmail.com"
] | gkhngkcnr@gmail.com |
257088f25919a26c547faf111331dadbc21d85c8 | bed4cd3d6e3c43e737d38e3e2726803aca02035f | /web/src/main/java/com/icode/web/validator/ShopValidator.java | 8bb55a4c5e0df621f1da2af28f87d34256cf1cb4 | [] | no_license | ZhongGang/OnlineShop | 13db5f55c8fb9f711d46c24cbc7ed4a3f5cba054 | 7c094b3f3e66c8d1ff77995991fe0283ba75cf54 | refs/heads/master | 2020-04-06T07:07:46.283109 | 2013-06-21T07:46:19 | 2013-06-21T07:46:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 569 | java | package com.icode.web.validator;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
/**
* Created with IntelliJ IDEA.
* User: ZhongGang
* Date: 13-6-18
* Time: 上午12:40
*/
public class ShopValidator implements Validator {
@Override
public boolean supports(Class<?> clazz) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void validate(Object target, Errors errors) {
throw new UnsupportedOperationException("Not yet implemented!");
}
}
| [
"120859274@qq.com"
] | 120859274@qq.com |
10870d92306c4c20e5d26889a8254571e118f13c | 53b75ffcbfa2aa9059040f23e56288964bc7505c | /Class-Demo/app/src/main/java/com/mani/cs5540/githubapp/MainActivity.java | f2cb215f169c17c13b3f12bf83642944c6cd4ac0 | [] | no_license | aswath80/CS5540-Android-Summer17 | b262be1b64a6fa1e1e37d98c3a2f363aba11f817 | 5f384f16004b268c7aa66fadf7e9165edcd0ca4b | refs/heads/master | 2021-01-25T04:35:55.388470 | 2017-07-26T22:38:47 | 2017-07-26T22:38:47 | 93,453,675 | 0 | 2 | null | 2017-07-22T16:10:52 | 2017-06-05T22:45:53 | Java | UTF-8 | Java | false | false | 1,460 | java | package com.mani.cs5540.githubapp;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
ProgressBar progressBar;
EditText searchEditText;
TextView textView;
GithubQueryTask githubQueryTask;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
progressBar = (ProgressBar) findViewById(R.id.progressBar);
searchEditText = (EditText)findViewById(R.id.searchQuery);
textView = (TextView) findViewById(R.id.displayJSON);
githubQueryTask = new GithubQueryTask(progressBar, textView);
progressBar.setVisibility(View.INVISIBLE);
textView.setVisibility(View.VISIBLE);
searchEditText.setVisibility(View.VISIBLE);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemNo = item.getItemId();
if(itemNo == R.id.search) {
githubQueryTask.execute(searchEditText.getText().toString());
}
return true;
}
}
| [
"e.manikandan@gmail.com"
] | e.manikandan@gmail.com |
8a0e037c05277612a67cf9b87c2de1c857367d71 | aef20e00a1712435f53592ddcd4f3dc9e5901f3e | /app/src/main/java/com/limitless/setnews/PortalActivity.java | f0cdde81945cabc3bb5a7cc4e34c22a4098df0fd | [] | no_license | Charlyco/SETNews | 288239611fcf192eecb160099ae880da26720414 | 22b17a80df88606cda5ab13c3d28bc0989c063a0 | refs/heads/master | 2020-09-22T12:07:52.001310 | 2019-12-01T16:05:33 | 2019-12-01T16:05:33 | 206,180,181 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,207 | java | package com.limitless.setnews;
import androidx.appcompat.app.AppCompatActivity;
import android.net.http.SslError;
import android.os.Bundle;
import android.webkit.SslErrorHandler;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class PortalActivity extends AppCompatActivity {
private WebView portal_page;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_portal);
portal_page = findViewById(R.id.portal_view);
portal_page.setWebViewClient(new WebViewClient(){
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();
}
});
portal_page.loadUrl("https://portal.fpno.edu.ng/nekede/");
WebSettings webSettings = portal_page.getSettings();
webSettings.setJavaScriptEnabled(true);
}
@Override
public void onBackPressed() {
if(portal_page.canGoBack()){
portal_page.goBack();
}else {
super.onBackPressed();
}
}
}
| [
"theyoungeng@gmail.com"
] | theyoungeng@gmail.com |
b33432c9dffec584d8302e422ccccd1f0420f431 | d30d80f75ec48dce29284d25b684e9bf53e5277c | /nange_cloud/nange-api/src/main/java/com/github/nange/security/api/vo/authority/PermissionInfo.java | 3a48de14f2f509c76c8ef98d82e991609eb1dbb7 | [] | no_license | nangegithub/springcloud- | 826428e2a021d6be728d130362db62459721fd62 | aea10244be8170e3d8cdda8923e13b97adfa01c7 | refs/heads/master | 2023-02-26T02:02:32.874213 | 2021-02-02T12:52:34 | 2021-02-02T12:52:34 | 335,282,997 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,079 | java | package com.github.nange.security.api.vo.authority;
import java.io.Serializable;
public class PermissionInfo implements Serializable {
private String code;
private String type;
private String uri;
private String method;
private String name;
private String menu;
public String getMenu() {
return menu;
}
public void setMenu(String menu) {
this.menu = menu;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
}
| [
"1967847170@qq.com"
] | 1967847170@qq.com |
ec8abae924093d96de7a181c42abafd2d4691495 | 4a8c69bb63e19d525abe3e9253c1560d6043fb74 | /anychart/src/main/java/com/anychart/anychart/HatchFills.java | 970e1f9ae4f0e8c08dab032bf1f305f161782285 | [] | no_license | SeppPenner/AnyChart-Android | 180e120edbc5e0120f73b71fc6d6bd99ed0b4498 | e657ae1b30ff8f9d982e18bf9a5a7aa71e3488a5 | refs/heads/master | 2020-03-13T21:37:02.890929 | 2018-04-23T03:18:42 | 2018-04-23T03:18:42 | 131,300,064 | 2 | 0 | null | 2018-04-27T13:28:22 | 2018-04-27T13:28:22 | null | UTF-8 | Java | false | false | 18,176 | java | package com.anychart.anychart;
import java.util.Locale;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import android.text.TextUtils;
// class
/**
* HatchFills palette class.
*/
public class HatchFills extends CoreBase {
public HatchFills() {
js.setLength(0);
js.append("var hatchFills").append(++variableIndex).append(" = anychart.palettes.hatchFills();");
jsBase = "hatchFills" + variableIndex;
}
protected HatchFills(String jsBase) {
js.setLength(0);
this.jsBase = jsBase;
}
protected HatchFills(StringBuilder js, String jsBase, boolean isChain) {
this.js = js;
this.jsBase = jsBase;
this.isChain = isChain;
}
protected String getJsBase() {
return jsBase;
}
private List<HatchFill> getItemAt = new ArrayList<>();
/**
* Getter for type palette HatchFills from list by index.
*/
public HatchFill getItemAt(Number index) {
HatchFill item = new HatchFill(jsBase + ".itemAt(" + index + ")");
getItemAt.add(item);
return item;
}
private Number index;
private HatchFillType type;
private String type1;
private String color;
private Number thickness;
private Number size;
/**
* Setter for type palette HatchFills from list by index.
*/
public HatchFills setItemAt(Number index, HatchFillType type, String color, Number thickness, Number size) {
if (jsBase == null) {
this.index = index;
this.type = null;
this.type1 = null;
this.type = type;
this.color = color;
this.thickness = thickness;
this.size = size;
} else {
this.index = index;
this.type = type;
this.color = color;
this.thickness = thickness;
this.size = size;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".itemAt(%s, %s, %s, %s, %s)", index, ((type != null) ? type.generateJs() : "null"), wrapQuotes(color), thickness, size));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".itemAt(%s, %s, %s, %s, %s);", index, ((type != null) ? type.generateJs() : "null"), wrapQuotes(color), thickness, size));
js.setLength(0);
}
}
return this;
}
/**
* Setter for type palette HatchFills from list by index.
*/
public HatchFills setItemAt(Number index, String type1, String color, Number thickness, Number size) {
if (jsBase == null) {
this.index = index;
this.type = null;
this.type1 = null;
this.type1 = type1;
this.color = color;
this.thickness = thickness;
this.size = size;
} else {
this.index = index;
this.type1 = type1;
this.color = color;
this.thickness = thickness;
this.size = size;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".itemAt(%s, %s, %s, %s, %s)", index, wrapQuotes(type1), wrapQuotes(color), thickness, size));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".itemAt(%s, %s, %s, %s, %s);", index, wrapQuotes(type1), wrapQuotes(color), thickness, size));
js.setLength(0);
}
}
return this;
}
private Number index1;
private PatternFill patternFill;
/**
* Setter for type palette HatchFills from list by index using patternFill.
*/
public HatchFills setItemAt(Number index1, PatternFill patternFill) {
if (jsBase == null) {
this.index = null;
this.index1 = null;
this.index1 = index1;
this.patternFill = patternFill;
} else {
this.index1 = index1;
this.patternFill = patternFill;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(patternFill.generateJs());
js.append(String.format(Locale.US, ".itemAt(%s, %s)", index1, ((patternFill != null) ? patternFill.getJsBase() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".itemAt(%s, %s);", index1, ((patternFill != null) ? patternFill.getJsBase() : "null")));
js.setLength(0);
}
}
return this;
}
private Number index2;
private HatchFill instance;
/**
* Setter for type palette HatchFills from list by index using instance.
*/
public HatchFills setItemAt(Number index2, HatchFill instance) {
if (jsBase == null) {
this.index = null;
this.index1 = null;
this.index2 = null;
this.index2 = index2;
this.instance = instance;
} else {
this.index2 = index2;
this.instance = instance;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(instance.generateJs());
js.append(String.format(Locale.US, ".itemAt(%s, %s)", index2, ((instance != null) ? instance.getJsBase() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".itemAt(%s, %s);", index2, ((instance != null) ? instance.getJsBase() : "null")));
js.setLength(0);
}
}
return this;
}
private Number index3;
private Boolean state;
/**
* Enables/disables type palette HatchFills from list by index.
*/
public HatchFills itemAt(Number index3, Boolean state) {
if (jsBase == null) {
this.index = null;
this.index1 = null;
this.index2 = null;
this.index3 = null;
this.index3 = index3;
this.state = state;
} else {
this.index3 = index3;
this.state = state;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".itemAt(%s, %b)", index3, state));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".itemAt(%s, %b);", index3, state));
js.setLength(0);
}
}
return this;
}
private HatchFill[] items;
private HatchFillType[] items1;
private PatternFill[] items2;
private HatchFill var_args;
private HatchFillType var_args1;
private PatternFill var_args2;
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(HatchFill[] items, HatchFill var_args) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items = items;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args = var_args;
} else {
this.items = items;
this.var_args = var_args;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(var_args.generateJs());
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items), ((var_args != null) ? var_args.getJsBase() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items), ((var_args != null) ? var_args.getJsBase() : "null")));
js.setLength(0);
}
}
return this;
}
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(HatchFill[] items, HatchFillType var_args1) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items = items;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args1 = var_args1;
} else {
this.items = items;
this.var_args1 = var_args1;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items), ((var_args1 != null) ? var_args1.generateJs() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items), ((var_args1 != null) ? var_args1.generateJs() : "null")));
js.setLength(0);
}
}
return this;
}
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(HatchFill[] items, PatternFill var_args2) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items = items;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args2 = var_args2;
} else {
this.items = items;
this.var_args2 = var_args2;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(var_args2.generateJs());
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items), ((var_args2 != null) ? var_args2.getJsBase() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items), ((var_args2 != null) ? var_args2.getJsBase() : "null")));
js.setLength(0);
}
}
return this;
}
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(HatchFillType[] items1, HatchFill var_args) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items1 = items1;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args = var_args;
} else {
this.items1 = items1;
this.var_args = var_args;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(var_args.generateJs());
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items1), ((var_args != null) ? var_args.getJsBase() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items1), ((var_args != null) ? var_args.getJsBase() : "null")));
js.setLength(0);
}
}
return this;
}
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(HatchFillType[] items1, HatchFillType var_args1) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items1 = items1;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args1 = var_args1;
} else {
this.items1 = items1;
this.var_args1 = var_args1;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items1), ((var_args1 != null) ? var_args1.generateJs() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items1), ((var_args1 != null) ? var_args1.generateJs() : "null")));
js.setLength(0);
}
}
return this;
}
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(HatchFillType[] items1, PatternFill var_args2) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items1 = items1;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args2 = var_args2;
} else {
this.items1 = items1;
this.var_args2 = var_args2;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(var_args2.generateJs());
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items1), ((var_args2 != null) ? var_args2.getJsBase() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items1), ((var_args2 != null) ? var_args2.getJsBase() : "null")));
js.setLength(0);
}
}
return this;
}
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(PatternFill[] items2, HatchFill var_args) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items2 = items2;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args = var_args;
} else {
this.items2 = items2;
this.var_args = var_args;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(var_args.generateJs());
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items2), ((var_args != null) ? var_args.getJsBase() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items2), ((var_args != null) ? var_args.getJsBase() : "null")));
js.setLength(0);
}
}
return this;
}
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(PatternFill[] items2, HatchFillType var_args1) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items2 = items2;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args1 = var_args1;
} else {
this.items2 = items2;
this.var_args1 = var_args1;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items2), ((var_args1 != null) ? var_args1.generateJs() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items2), ((var_args1 != null) ? var_args1.generateJs() : "null")));
js.setLength(0);
}
}
return this;
}
/**
* Setter for HatchFills list of palette.
*/
public HatchFills setItems(PatternFill[] items2, PatternFill var_args2) {
if (jsBase == null) {
this.items = null;
this.items1 = null;
this.items2 = null;
this.items2 = items2;
this.var_args = null;
this.var_args1 = null;
this.var_args2 = null;
this.var_args2 = var_args2;
} else {
this.items2 = items2;
this.var_args2 = var_args2;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(var_args2.generateJs());
js.append(String.format(Locale.US, ".items(%s, %s)", arrayToString(items2), ((var_args2 != null) ? var_args2.getJsBase() : "null")));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".items(%s, %s);", arrayToString(items2), ((var_args2 != null) ? var_args2.getJsBase() : "null")));
js.setLength(0);
}
}
return this;
}
private String generateJSgetItemAt() {
if (!getItemAt.isEmpty()) {
StringBuilder resultJs = new StringBuilder();
for (HatchFill item : getItemAt) {
resultJs.append(item.generateJs());
}
return resultJs.toString();
}
return "";
}
protected String generateJsGetters() {
StringBuilder jsGetters = new StringBuilder();
jsGetters.append(super.generateJsGetters());
jsGetters.append(generateJSgetItemAt());
return jsGetters.toString();
}
@Override
protected String generateJs() {
if (isChain) {
js.append(";");
isChain = false;
}
js.append(generateJsGetters());
String result = js.toString();
js.setLength(0);
return result;
}
} | [
"arsenymalkov@gmail.com"
] | arsenymalkov@gmail.com |
70b534a334a658a4457c84fc0ac0a3ca8bf37dd0 | 7de39c2224ddc20291ea8f2232322b70d8532e66 | /src/main/java/com/example/demo/exception/VehicleNofBelongToClient.java | d00da935e5d46c91fdc1bac160a5ac38eebf6d71 | [] | no_license | Advocatee/demoModelForASimplisticInsuranceDomain | eb2a6a33a2df6b2a81e9fc36a51c287a8dee3d27 | f824e5aa0be79d6a7ba034754174d6c82da2a989 | refs/heads/master | 2023-02-13T12:03:40.480188 | 2021-01-12T09:22:15 | 2021-01-12T09:22:15 | 324,581,794 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 104 | java | package com.example.demo.exception;
public class VehicleNofBelongToClient extends RuntimeException {
}
| [
"All.Under.Control@mail.ru"
] | All.Under.Control@mail.ru |
c090657b826bd5541580c20ff05a8f2bde57be85 | b5d4db45a7a61a2cb18ab92b11e61dc5577f619f | /Leap year/Main.java | e81e3f4da333e3fdc94202d8ccee679a48b1a7eb | [] | no_license | ashishanand30597/Playground | dbe27e4bd7e29be65ee73185160fa14c25f7f2f1 | 87f33098534605cce2b760f7a55f800fc3c49ac7 | refs/heads/master | 2020-06-05T02:15:04.930656 | 2019-07-27T10:04:06 | 2019-07-27T10:04:06 | 192,278,025 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 142 | java | #include<stdio.h>
int main()
{int n ;
scanf("%d",&n);
if(n%4==0)
{printf("Leap year");
}
else
{printf("Not Leap year");
}
return 0;
} | [
"49234606+ashishanand30597@users.noreply.github.com"
] | 49234606+ashishanand30597@users.noreply.github.com |
82e4808f62d6d26164bce56d5fd269cc385da6b2 | be5c46ad32c1163b90aea8460110db308b5b8baf | /app/src/main/java/felipe/com/database/converter/ConversorCalendar.java | eb367842b2a3546c6a295303b21520f28bf36cf5 | [
"MIT"
] | permissive | felipefariasdasilva/agenda-android | 91430170109ab8b5a17bafd47560138315a1b946 | ca8f0070ba39fe382ded3369cf43abcf8a7b507d | refs/heads/master | 2022-11-09T21:11:19.116827 | 2020-07-02T11:12:32 | 2020-07-02T11:12:32 | 260,033,854 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 583 | java | package felipe.com.database.converter;
import androidx.room.TypeConverter;
import java.util.Calendar;
public class ConversorCalendar {
@TypeConverter
public Long paraLong(Calendar calendar){
if(calendar != null){
return calendar.getTimeInMillis();
}
return null;
}
@TypeConverter
public Calendar paraCalendar(Long timeInMillis){
Calendar momentoAtual = Calendar.getInstance();
if(timeInMillis != null){
momentoAtual.setTimeInMillis(timeInMillis);
}
return momentoAtual;
}
}
| [
"feliipefarias@outlook.com"
] | feliipefarias@outlook.com |
9f7a89eab70ea6520cd1d34b050bdb74518faa68 | 2f2a0f8bc858cf897ea7ecd9e0f7b01752155718 | /IDE/Sodbeans/Quorum/src/org/quorum/actions/Debug.java | 7aa76d7c46d48238d4e9c7b1ee913ff3972783c0 | [] | no_license | lineCode/quorum-ci | 7178f83e6e12ed34c83f9c8228c83638986faf44 | cb9966b3dce79cb8fa826d5862417250da5e1730 | refs/heads/master | 2022-01-23T02:30:27.210617 | 2015-02-22T00:06:39 | 2015-02-22T00:06:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 670 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.quorum.actions;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import org.quorum.projects.QuorumProject;
/**
*
* @author stefika
*/
public class Debug extends QuorumAction implements ActionListener{
public Debug(QuorumProject project) {
super(project);
}
@Override
public void actionPerformed(ActionEvent e) {
}
@Override
protected String getDisplayName() {
return "Debug";
}
}
| [
"stefika@192.168.17.4"
] | stefika@192.168.17.4 |
fc75e3a38694eb4cbdeb308421ad233823b227d2 | 3e71e9b07357f95a72dcc5d8f4ebc0ddfb072ae8 | /RestWS_Client/src/restCall/FindStateDetails_restCallPost.java | aeb211603defcf919c94bdda58294a6945980346 | [] | no_license | chetansharma04/TestCode | 8a7f5a35f05fa0b728cf7939dbba5ddc0aa22907 | 0c7140eb4197a9605f5097303044633aa211d3d1 | refs/heads/master | 2020-03-18T08:54:11.262704 | 2018-05-23T07:51:52 | 2018-05-23T11:54:56 | 98,531,547 | 0 | 1 | null | 2017-07-27T13:06:20 | 2017-07-27T12:10:51 | Java | UTF-8 | Java | false | false | 2,231 | java | package restCall;
import java.awt.PageAttributes.MediaType;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Iterator;
public class FindStateDetails_restCallPost {
public static String main(String[] args) {
return callWS(args);
}
public static String callWS(String[] value){
String result = "Not Found" ;
try {
URL url = new URL("http://services.groupkt.com/state/get/USA/all");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("Accept", "application/json");
if (conn.getResponseCode() != 200) {
throw new RuntimeException("Failed : HTTP error code : "
+ conn.getResponseCode());
}
Client client=Client.create();
WebResource webRessource=client.resource("http://services.groupkt.com/state/get/USA/all");
ClientResponse entityListResponse=webRessource.type(MediaType.APPLICATION_JSON_TYPE)
.header("Content-Type", "application/json")
.header("Accept", "application/vnd.ucf.v1+json").get(ClientResponse.class);
String entityListResponseData=entityListResponse.getEntity(String.class);
JSONObject object = new JSONObject(entityListResponseData);
Iterator<String> keys= object.keys();
while (keys.hasNext())
{
String keyValue = (String)keys.next();
JSONObject jsonObjectRestResponse = object.getJSONObject(keyValue);
JSONArray resultObjArr = jsonObjectRestResponse.getJSONArray("result");
for(int i=0; i<resultObjArr.length(); i++){
JSONObject jsonObject = (JSONObject) resultObjArr.get(i);
if(jsonObject.get("name").toString().equalsIgnoreCase(value[0]) || jsonObject.get("abbr").toString().equalsIgnoreCase(value[0])){
result = "Largest City = "+jsonObject.get("largest_city") +
" - Capital = "+jsonObject.get("capital");
System.out.println("result = "+result);
}
}
}
conn.disconnect();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
catch (JSONException e) {
e.printStackTrace();
}
return result;
}
}
| [
"chetanstudysharma04@gmail.com"
] | chetanstudysharma04@gmail.com |
ed9aa6b91af03dc257216aad660ee9dc4cba7084 | 7bce66cbdbe594c85f990ddc65a1366a7b96a4bc | /src/starvationevasion/client/Game.java | 0878c1064e2c0f88d816205a4e389a7b4896b1db | [] | no_license | ChrisQWu/StarvationEvasion | 5fb06c88702f2b83401b4b7ed9ff4a21ec00fe18 | 8842d9a99c332aaeba5b0a85206407a148cd121c | refs/heads/master | 2021-05-30T04:50:36.231982 | 2016-01-10T23:09:59 | 2016-01-10T23:09:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 95 | java | package starvationevasion.client;
/**
* Created by c on 1/10/2016.
*/
public class Game
{
}
| [
"cwu@unm.edu"
] | cwu@unm.edu |
5b4a512f178b2978077d741e92994c2226bba79e | 6dbae30c806f661bcdcbc5f5f6a366ad702b1eea | /Corpus/eclipse.jdt.ui/9074.java | ed5cb0d7d52ca827da077585a54b814bf4f3aa0b | [
"MIT"
] | permissive | SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018 | d3fd21745dfddb2979e8ac262588cfdfe471899f | 0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0 | refs/heads/master | 2020-03-31T15:52:01.005505 | 2018-10-01T23:38:50 | 2018-10-01T23:38:50 | 152,354,327 | 1 | 0 | MIT | 2018-10-10T02:57:02 | 2018-10-10T02:57:02 | null | UTF-8 | Java | false | false | 299 | java | package p;
import static java.util.Arrays.asList;
import q.B;
public class A {
public static class X {
void m(B.C c) {
n();
A.m();
asList("a", "b");
}
public static void n() {
}
}
public static void m() {
}
}
| [
"masudcseku@gmail.com"
] | masudcseku@gmail.com |
b59dc368e3a3fc4ff71da970472f6a4d26d2a4a2 | e987a73f03922beb66dd339e6760b7323ce54383 | /concurrency/src/main/java/com/pilicon/concurrency/example/atomic/AtomicExample2.java | 532acf88bd4b017a7176b185af99b10b3207939f | [
"MIT"
] | permissive | revene/pilicon | d413437f3322795ea6145c76cf667e159d389b53 | b95c80fe5929564b07cf510492f82205878485f5 | refs/heads/master | 2020-03-22T20:07:18.949210 | 2018-09-18T02:55:18 | 2018-09-18T02:55:18 | 140,573,985 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,713 | java | package com.pilicon.concurrency.example.atomic;
import com.pilicon.concurrency.annotations.ThreadSafe;
import lombok.extern.slf4j.Slf4j;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
@ThreadSafe
@Slf4j
public class AtomicExample2 {
//请求总数
public static int clientTotal = 5000;
//同时并发执行的线程数
public static int threadTotal = 200;
public static AtomicLong count = new AtomicLong(0);
public static void main(String[] args) throws InterruptedException {
ExecutorService executorService = Executors.newCachedThreadPool();
final Semaphore semaphore = new Semaphore(threadTotal);
final CountDownLatch countDownLatch = new CountDownLatch(clientTotal);
for (int i = 0;i< clientTotal; i++){
executorService.execute(()->{
try {
semaphore.acquire();
add();
semaphore.release();
} catch (Exception e) {
log.error("exception",e);
}
countDownLatch.countDown();
});
}
countDownLatch.await();
executorService.shutdown();
log.info("count:{}",count.get());
}
private static void add(){
//todo 跟代码,这个是重中之重 靠的是unsafe类
//此时的count相当于工作内存中的备份,而这个里面的方法的var5 相当于真正的主存里的值
count.incrementAndGet();
}
}
| [
"1479930060@qq.com"
] | 1479930060@qq.com |
7b8993970a5ff3475fcdf174ff9716839928323d | 4975c8c5452c23ee58902b577088ca59ab7c7d79 | /part05-Part05_11.ComparingApartments/src/main/java/Main.java | 96ee42f5afc92509889c513751eaf4c8993c96e8 | [] | no_license | andy6809/Moocfi | 190b3fb31ebc1301a29a5acd6c4d8ce1e280c360 | f4cfc33e97e2047d5efb4593c0de9b421d99b5ce | refs/heads/master | 2023-02-01T09:34:18.954753 | 2020-12-13T10:32:49 | 2020-12-13T10:32:49 | 321,037,409 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 940 | java |
public class Main {
public static void main(String[] args) {
// you can write code here to try out your program
Apartment manhattanStudioApt = new Apartment(1, 16, 5500);
Apartment atlantaTwoBedroomApt = new Apartment(2, 38, 4200);
Apartment bangorThreeBedroomApt = new Apartment(3, 78, 2500);
System.out.println(manhattanStudioApt.largerThan(atlantaTwoBedroomApt)); // false
System.out.println(bangorThreeBedroomApt.largerThan(atlantaTwoBedroomApt)); // true
System.out.println(manhattanStudioApt.priceDifference(atlantaTwoBedroomApt)); // 71600
System.out.println(bangorThreeBedroomApt.priceDifference(atlantaTwoBedroomApt)); // 35400
System.out.println(manhattanStudioApt.moreExpensiveThan(atlantaTwoBedroomApt)); // false
System.out.println(bangorThreeBedroomApt.moreExpensiveThan(atlantaTwoBedroomApt)); // true
}
}
| [
"andy6809@gmail.com"
] | andy6809@gmail.com |
8a0f293fa4a0fb435318675a1499ff1fe38f8c48 | 9fb5f62e0295aea322a438dea07e0d4de2fbbb13 | /src/main/java/com/sg/powerball/Service/Result.java | a663f60fb0833db2508429f8b21b4c9b7733ae11 | [] | no_license | MarkScherr/PowerBall | 592078f68d8549800289ac1704c12fa9d2db338f | 3c68fc7178ddb2b466b6acbeef3ecb5ca46aa7f3 | refs/heads/master | 2020-03-20T21:49:28.918993 | 2018-06-18T14:30:18 | 2018-06-18T14:30:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 861 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.sg.powerball.Service;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author mrsch
*/
public class Result<T>{
private boolean success = true;
private List<String> messages = new ArrayList<>();
private T payload;
public boolean isSuccess() {
return success;
}
public List<String> getMessages() {
return messages;
}
public void addMessage(String message) {
this.success = false;
messages.add(message);
}
public T getPayload() {
return payload;
}
public void setPayload(T payload) {
this.payload = payload;
}
}
| [
"mrscherr@gmail.com"
] | mrscherr@gmail.com |
0c04a4758cf0ff73728a40472c29d0ac91a2db5a | 141be6a0ffea92aa0196f8928340a16638b210ed | /毕业设计/code/android/YYFramework/src/android/support/v4/view/BetterViewPager.java | 36c50341115964dee898ccd3c2f9cb7618939b23 | [
"Apache-2.0"
] | permissive | pexcn-todo/GraduationPro | 16dc5978d502c0fd5e599def7b61439005d4a8ec | 0f5565a4a522c4524d1e296d8e6fd9f637ee8660 | refs/heads/master | 2021-06-17T17:07:38.132229 | 2017-05-09T15:51:23 | 2017-05-09T15:51:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 682 | java | package android.support.v4.view;
import android.content.Context;
import android.util.AttributeSet;
/**
* {@linkplain #setChildrenDrawingOrderEnabledCompat(boolean)} does some reflection that isn't needed.
* And was making view creation time rather large. So lets override it and make it better!
*/
public class BetterViewPager extends NoCacheViewPager {
public BetterViewPager(Context context) {
super(context);
}
public BetterViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void setChildrenDrawingOrderEnabledCompat(boolean enable) {
setChildrenDrawingOrderEnabled(enable);
}
}
| [
"2964287498@qq.com"
] | 2964287498@qq.com |
a735e73743f11b914a9f1db900e68b428804953b | 5c8413b3910b011783f7cd2587b8b67102e2ba04 | /src/main/java/myservice/mynamespace/database/dao/SflightDAO.java | 7dd8ea9aa6706b81db5c69f8ee1f19d14626845f | [] | no_license | 91bruhn/OData-Flugdatenverwaltungsserver | 3c97d067786c5bf45f397bd1de60a8b2ecf4910b | ae18dd574939716d260017b1f60d692df76e7a89 | refs/heads/master | 2021-04-26T22:49:06.775149 | 2018-03-07T12:40:07 | 2018-03-07T12:40:07 | 124,150,745 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 506 | java | ////////////////////////////////////////////////////////////////////////////////
//
// Created by bruhn on 30.12.2017.
//
// Copyright (c) 2006 - 2017 FORCAM GmbH. All rights reserved.
////////////////////////////////////////////////////////////////////////////////
package myservice.mynamespace.database.dao;
import myservice.mynamespace.database.data.Sflight;
import org.bson.types.ObjectId;
import org.mongodb.morphia.dao.DAO;
/**
*
*/
public interface SflightDAO extends DAO<Sflight, ObjectId> {}
| [
"lisa.miller@hs-weingarten.de"
] | lisa.miller@hs-weingarten.de |
225e6bddea0856c3e64ec1f66edd66aee130bd44 | 86e9d01c4621c27e3953937ece3c0e4c51ea8c10 | /app/src/main/java/com/cinread/rss/adapter/RssFeedAdapter.java | 266085c7c7fee6b7152b3446ee050800cd1b519f | [] | no_license | pengjfcn/RssReaderJ | 90584deee10b4f0c7759b39bc5f233b230c5de70 | d35ea0f83b4b6c59be9ffa5fc27f5d52a3756755 | refs/heads/master | 2020-12-24T21:01:31.301681 | 2016-05-13T09:03:55 | 2016-05-13T09:03:55 | 58,721,010 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,562 | java | package com.cinread.rss.adapter;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.cinread.rss.R;
import com.cinread.rss.base.MyBaseAdapter;
import com.cinread.rss.base.UIUtils;
import com.cinread.rss.bean.CollectInfo;
import com.cinread.rss.bean.RssFeed;
import com.cinread.rss.utils.FileUtils;
import com.cinread.rss.utils.SPUtils;
import com.lidroid.xutils.BitmapUtils;
import com.lidroid.xutils.DbUtils;
import com.lidroid.xutils.exception.DbException;
import java.util.List;
/**
* @project:Rss
* @package:com.cinread.rss.rss
* @author:pengjf
* @update:2016/4/13
* @desc: TODO
*/
// Created by pengjf on 2016/4/13.
public class RssFeedAdapter extends MyBaseAdapter<RssFeed> {
private List<RssFeed> mDatas;
public static boolean flag;
private DbUtils db;
public RssFeedAdapter(List<RssFeed> data, DbUtils db) {
super(data);
this.mDatas = data;
this.db = db;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final ViewHolder holder;
if (convertView == null) {
holder = new ViewHolder();
convertView = View.inflate(UIUtils.getContext(), R.layout.item_rss, null);
holder.ivCover = (ImageView) convertView.findViewById(R.id.rss_iv_logo);
holder.ivCollect = (ImageView) convertView.findViewById(R.id.rss_iv_collect);
holder.tvTitle = (TextView) convertView.findViewById(R.id.rss_tv_title);
holder.tvRssname = (TextView) convertView.findViewById(R.id.rss_tv_rssname);
holder.tvDesc = (TextView) convertView.findViewById(R.id.rss_tv_desc);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
RssFeed info = mDatas.get(position);
final CollectInfo ci = new CollectInfo();
ci.setRssname(info.getRssname());
ci.setTime(FileUtils.getTime(System.currentTimeMillis()));
String pubdate = info.getPubdate();
String time = FileUtils.getTime3(pubdate);
ci.setCover(info.getCover());
ci.setDesc(time);
ci.setTitle(info.getTitle());
boolean c = SPUtils.getBoolean(UIUtils.getContext(), "collect" + info.getTitle(), false);
holder.ivCollect.setImageResource(c ? R.mipmap.ic_collect_selected : R.mipmap.ic_collect_normal);
holder.ivCollect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
holder.ivCollect.setImageResource(flag ? R.mipmap.ic_collect_normal : R.mipmap.ic_collect_selected);
//添加到我的收藏
try {
db.replace(ci);
SPUtils.setBoolean(UIUtils.getContext(), "collect" + ci.getTitle(), true);
flag = false;
} catch (DbException e) {
e.printStackTrace();
}
}
});
BitmapUtils utils = new BitmapUtils(UIUtils.getContext());
utils.display(holder.ivCover, info.getCover());
holder.tvTitle.setText(info.getTitle());
holder.tvRssname.setText(info.getRssname());
holder.tvDesc.setText(time);
return convertView;
}
private class ViewHolder {
ImageView ivCover;
ImageView ivCollect;
TextView tvTitle;
TextView tvRssname;
TextView tvDesc;
}
} | [
"343520123@qq.com"
] | 343520123@qq.com |
2a61c2448609071ee7c06b2d6b8045554bb49a01 | 73fa76024a055ec8c72ded7b15775eef9fbb8bfe | /src/main/java/org/twuni/money/common/Treasury.java | 427c251dc769dad1ab551b2708fae5bd2d78c7c2 | [
"Apache-2.0"
] | permissive | twuni/money-common | f5641d964d4aad8dcd1ab0ade326cfea22712e6c | 7aa3ee2a4f81fe1e415f8daad66d61ba5cd9fc62 | refs/heads/master | 2021-01-13T01:54:00.210608 | 2011-08-12T03:15:40 | 2011-08-12T03:15:40 | 1,897,215 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 299 | java | package org.twuni.money.common;
import java.util.Set;
public interface Treasury {
public Token refresh( Token token );
public Token create( int amount );
public Set<Token> split( Token token, int amount );
public Token merge( Token a, Token b );
public int getValue( Token token );
}
| [
"github.aeonic@spamgourmet.com"
] | github.aeonic@spamgourmet.com |
edb65c48027d5d98f33dc98d64c24ea4b393e73d | cf77384b56599c201eba57d4450b0d2782b5007e | /cosmo-api/src/main/java/org/unitedinternet/cosmo/model/MessageStamp.java | 7132c2a2ea4fac5be15414f3f54c439291edd46f | [
"Apache-2.0"
] | permissive | 1and1/cosmo | 76e1864ca50713e63a8fb67d26eb99f15aa83913 | e6c9ae8593a36a14c0cc50c3f29137df2736bccb | refs/heads/master | 2023-08-29T16:44:25.959228 | 2023-07-05T06:18:19 | 2023-07-05T06:18:19 | 35,554,985 | 79 | 50 | Apache-2.0 | 2023-06-29T12:50:17 | 2015-05-13T14:48:26 | Java | UTF-8 | Java | false | false | 1,783 | java | /*
* Copyright 2007 Open Source Applications Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.unitedinternet.cosmo.model;
import java.io.Reader;
/**
* Stamp that associates message-specific attributes to an item.
*/
public interface MessageStamp extends Stamp{
public static final String FORMAT_DATE_SENT = "EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'Z";
// Property accessors
public String getMessageId();
public void setMessageId(String id);
public String getHeaders();
public void setHeaders(String headers);
public void setHeaders(Reader headers);
public String getFrom();
public void setFrom(String from);
public String getTo();
public void setTo(String to);
public String getBcc();
public void setBcc(String bcc);
public String getCc();
public void setCc(String cc);
public String getOriginators();
public void setOriginators(String originators);
public String getDateSent();
public void setDateSent(String dateSent);
public String getInReplyTo();
public void setInReplyTo(String inReplyTo);
public String getReferences();
public void setReferences(String references);
public void setReferences(Reader references);
} | [
"corneliu.dobrota@gmail.com"
] | corneliu.dobrota@gmail.com |
abf9c55a2494c837e1a48bd71c7192655fae8407 | d8d8f5c2bcf1a390bb79ae9021c1d8c2a2ee9e31 | /src/main/gen/com/javampire/openscad/psi/OpenSCADOrExpr.java | 5ff7635080c007db334d25a604e387f77b7abb96 | [
"Apache-2.0"
] | permissive | ncsaba/idea-openscad | 73d293d1b1328b0eb400760ad689b3818fe063ac | 5dbd3aa36cd19c9df45933f76c38757bb9c166e6 | refs/heads/master | 2022-09-11T03:56:59.574778 | 2022-07-25T13:13:23 | 2022-07-25T13:13:23 | 151,431,195 | 30 | 19 | Apache-2.0 | 2022-07-25T13:17:46 | 2018-10-03T15:02:28 | Java | UTF-8 | Java | false | true | 301 | java | // This is a generated file. Not intended for manual editing.
package com.javampire.openscad.psi;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;
public interface OpenSCADOrExpr extends OpenSCADExpr {
@NotNull
List<OpenSCADExpr> getExprList();
}
| [
"csaba.nagy@mapp.com"
] | csaba.nagy@mapp.com |
2527db329162ab1c78323f9655a44dba4bc958a2 | 6e5e4f8e132b58895d7a7a948b5ad32aa097c5a8 | /app/src/main/java/br/eti/softlog/Fragments/TimePickerFragment.java | 6fc4929633c23fd0aa527875931f889c024eabab | [] | no_license | softlog/softlogtmsentregas | 2f32596f14fb1dfd4304b827d5c3d52668dba2a7 | 5f8819044fc186578bd0a5786e1cb5e437cf57ca | refs/heads/master | 2021-06-29T19:05:31.572807 | 2021-01-18T19:31:58 | 2021-01-18T19:31:58 | 211,103,053 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,770 | java | package br.eti.softlog.Fragments;
import android.app.TimePickerDialog;
import android.os.Bundle;
import android.app.Fragment;
import android.text.format.DateFormat;
import android.widget.EditText;
import android.widget.TextView;
import android.app.DialogFragment;
import android.app.Dialog;
import java.util.Calendar;
import android.widget.TimePicker;
import br.eti.softlog.softlogtmsentregas.R;
/**
* A simple {@link Fragment} subclass.
*/
public class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener{
@Override
public Dialog onCreateDialog(Bundle savedInstanceState){
//Use the current time as the default values for the time picker
final Calendar c = Calendar.getInstance();
int hour = c.get(Calendar.HOUR_OF_DAY);
int minute = c.get(Calendar.MINUTE);
//Create and return a new instance of TimePickerDialog
return new TimePickerDialog(getActivity(),this, hour, minute,
DateFormat.is24HourFormat(getActivity()));
}
//onTimeSet() callback method
public void onTimeSet(TimePicker view, int hourOfDay, int minute){
//Do something with the user chosen time
//Get reference of host activity (XML Layout File) TextView widget
EditText et = (EditText) getActivity().findViewById(R.id.editHora);
//Display the user changed time on TextView
String cHora;
String cMinuto;
if (hourOfDay<10)
cHora = '0'+ String.valueOf(hourOfDay);
else
cHora = String.valueOf(hourOfDay);
if (minute<10)
cMinuto = '0' + String.valueOf(minute);
else
cMinuto = String.valueOf(minute);
et.setText(cHora + ":" + cMinuto);
}
} | [
"paulo.sergio.softlog@gmail.com"
] | paulo.sergio.softlog@gmail.com |
0160508fd3988e3f1222f768d1e29a757648e8b5 | 702a85dcd23203c5f04ca82910258bb94ae1ec24 | /app/src/main/java/com/bawei/carbuydome1/net/HttpUtile.java | 4d345b8add8f6a6d03f3350f41c60d8a0379b31f | [] | no_license | hidethatbug/CarBuy | 237bc9f6a18b2345008adb40c6f60535d95f664c | de5d13787c36a07a44c72b160249be8c824c3c2c | refs/heads/master | 2020-06-04T21:01:31.492428 | 2019-06-16T12:49:44 | 2019-06-16T12:49:44 | 192,190,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,319 | java | package com.bawei.carbuydome1.net;
import android.provider.Telephony;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Author:程金柱
* Date:2019/6/15 8:59
* Description:
*/
public class HttpUtile {
private static HttpUtile utile;
private final Retrofit retrofit;
private HttpUtile(){
OkHttpClient okHttpClient=new OkHttpClient.Builder()
.addInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
.build();
retrofit = new Retrofit.Builder()
.client(okHttpClient)
.baseUrl(Api.BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.build();
}
public static HttpUtile getInstance(){
if (utile==null){
synchronized (HttpUtile.class){
if (utile==null){
utile=new HttpUtile();
}
}
}
return utile;
}
public <T> T getData(Class<T> t){
return retrofit.create(t);
}
}
| [
"1790076682@qq.com"
] | 1790076682@qq.com |
d1a796272efc1cacbb661d7d8717100f29e36add | 528ce60ff9ec5b12d405d9016832e8b47f9e9779 | /HelloNDK2/src/com/example/hellondk/MainActivity.java | f55335832604716135ac5bf5132c5f07d6446a87 | [] | no_license | 1107979819/Android-Demo | 38f9320ac14fb15596e47e3f3b65751f7002d919 | e578368ae09e928cc54f2f9c5fdc975057ab43e1 | refs/heads/master | 2021-01-15T11:12:24.688363 | 2015-04-14T07:50:28 | 2015-04-14T07:50:28 | 31,700,032 | 2 | 0 | null | null | null | null | GB18030 | Java | false | false | 952 | java | package com.example.hellondk;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
public class MainActivity extends Activity {
TextView textView;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = (TextView) findViewById(R.id.tv);
String str = getText();// 调用native方法
textView.setText(str + "\n" + getText2() + "\n" + getText3() + "\n"
+ AddInt(1, 2) + "\n" + getInt() + "\n" + calc());
}
static {
System.loadLibrary("mylib");// 导入链接库
}
public native String getText();// 声明native方法
public native String getText2();// 声明native方法
public native String getText3();// 声明native方法
public native int getInt();
public native int AddInt(int a, int b);// 声明native方法
public native int calc();
}
| [
"1101534564@qq.com"
] | 1101534564@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.