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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
93f0da86196219b4712b1f6a073255aaf5c6cd08
|
48a1d78dc6ea566dddd9a9fe9599b2167beab779
|
/DragPin/app/src/main/java/com/hendalqett/dragpin/GData.java
|
8288d603d0d2dda0a492b1a87b866f616928be09
|
[] |
no_license
|
HendAlQett/Drag-Pin
|
2e3e4be7b1696d5245226162f51c4d4a011ac736
|
ce924e267a8f0bbb323f14272faf969d9abc4973
|
refs/heads/master
| 2021-01-10T17:50:12.455193
| 2015-11-03T10:27:23
| 2015-11-03T10:27:23
| 44,746,419
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 740
|
java
|
package com.hendalqett.dragpin;
/**
* Created by apple on 10/22/15.
*/
public class GData {
// Milliseconds per second
public static final int MILLISECONDS_PER_SECOND = 1000;
// The update interval
public static final int UPDATE_INTERVAL_IN_SECONDS = 5;
// A fast interval ceiling
public static final int FAST_CEILING_IN_SECONDS = 1;
// Update interval in milliseconds
public static final long UPDATE_INTERVAL_IN_MILLISECONDS = MILLISECONDS_PER_SECOND
* UPDATE_INTERVAL_IN_SECONDS;
// A fast ceiling of update intervals, used when the app is visible
public static final long FAST_INTERVAL_CEILING_IN_MILLISECONDS = MILLISECONDS_PER_SECOND
* FAST_CEILING_IN_SECONDS;
}
|
[
"cathe.2007@gmail.com"
] |
cathe.2007@gmail.com
|
84ca3bbe99473f1ed53002931108efc2637c88ab
|
7e33f5cf58aa9691451afe533f2fac5c87af4fd9
|
/ENSF409FinalProject-Final-Client/views/SearchToolView.java
|
57d5413e5506e635cf1882dbcd209d5ef8cf31f9
|
[] |
no_license
|
youup99/ENSF-409-Final-Project
|
1479fa53cf090b00fcd95bf4d5bed07050e9b462
|
c47e8db616ea45ffbf3ae54a68fef023c2f55c71
|
refs/heads/master
| 2020-05-14T21:19:16.403448
| 2019-09-14T19:59:26
| 2019-09-14T19:59:26
| 181,961,075
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 990
|
java
|
package views;
import java.awt.FlowLayout;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
/**
* This is the view responsible for searching for a tool.
* @author Kiernan McGuigan
*
*/
public class SearchToolView extends JFrame {
/**
* Serial ID for the view.
*/
private static final long serialVersionUID = 1L;
private JLabel searchLabel = new JLabel("Search For Tool: ");
private JTextField searchField = new JTextField("Name or ID", 15);
private JButton search = new JButton("Search");
public SearchToolView() {
super("Search for Tool");
this.setSize(400,100);
this.setResizable(false);
this.setLayout(new FlowLayout());
this.add(searchLabel);
this.add(searchField);
this.add(search);
}
public void setSearchListener(ActionListener al) {
search.addActionListener(al);
}
public String getSearchFeild() {
return searchField.getText();
}
}
|
[
"youup99@gmail.com"
] |
youup99@gmail.com
|
9b7a14f3acf54ad4c76057e16919ad9daaad3fd9
|
ef5e32a99d0c07cf367615c347ec23600f131557
|
/QA-JC-FilesFIOGenerator/src/HumanEntity.java
|
045f87e879ae8c155f6d100138870c58cb9457aa
|
[] |
no_license
|
Dronan13/QA-JC-01
|
08b6598a862e8718d4cc76c6b94d5bd55b778b0d
|
ff50ffc5f9a3d0ef334d6b3f4921cfd78c875115
|
refs/heads/master
| 2016-08-13T00:22:48.358365
| 2016-05-04T17:23:22
| 2016-05-04T17:23:22
| 51,141,221
| 0
| 0
| null | null | null | null |
WINDOWS-1251
|
Java
| false
| false
| 1,243
|
java
|
public class HumanEntity {
//параметры класса
private String sex;
private String surname;
private String name;
private String fathersname;
private String birthday;
//пустой коструктор
HumanEntity(){
}
//параметризированный коструктор
HumanEntity(String sex,String surname,String name,String fathersname,String birthday){
this.sex = sex;
this.surname = surname;
this.name = name;
this.fathersname = fathersname;
this.birthday = birthday;
}
// Геттеры и сеттеры для параметров
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getFathersname() {
return fathersname;
}
public void setFathersname(String fathersname) {
this.fathersname = fathersname;
}
}
|
[
"Dronan13@DESKTOP-6E2GV0F"
] |
Dronan13@DESKTOP-6E2GV0F
|
b5c7a6b3a93a12e3dc19f943582b01cb5763f50a
|
69cf1cc2818b26046a8bbbf979e252105b20d523
|
/src/evilp0s/Bean/PropertyFilter.java
|
6841b1e86c3ce3f748838c1e88a4c3e8badb0400
|
[] |
no_license
|
Kuner/utils
|
0babf9d9b7cdcf1cebcd18b8c819a08279059f29
|
e537601fe3bb6fd3b07f6a4ab030cc2d61aad92c
|
refs/heads/master
| 2020-12-27T20:37:46.131671
| 2015-10-08T01:20:54
| 2015-10-08T01:20:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 139
|
java
|
package evilp0s.Bean;
/**
* 属性过滤接口
*/
public interface PropertyFilter {
public String Properties(String pro);
}
|
[
"909070781@qq.com"
] |
909070781@qq.com
|
8c652b99e7853e7a69d3ef327e116cb8a744e8cb
|
3a764e4dcc5e704a077410b3b10db460e0acf922
|
/Lab2/Lab1-redux/src/main/java/Default/MyApplication.java
|
0268fbfe41d1eb9e545c1b9b144952250030d49b
|
[] |
no_license
|
KACHANIX/SOA_Labs
|
46d1596a0d309f7357e4bbf291ef00df02b2235a
|
b01501a481243aade53386e7f9a616567b0c2395
|
refs/heads/master
| 2023-02-11T05:15:12.865544
| 2021-01-10T17:20:42
| 2021-01-10T17:20:42
| 315,382,799
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 165
|
java
|
package Default;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("/")
public class MyApplication extends Application {
}
|
[
"kochaser@gmail.com"
] |
kochaser@gmail.com
|
76025eb4635611621f044df2727f087da9a311e9
|
b2986a7916527aa3c79e768f23b8bea77b523cb6
|
/src/main/java/controller/CollectController.java
|
8d9df876bbf4efc5132bba5cea2b1577585e2626
|
[] |
no_license
|
ShawyerPeng/SharedCampus
|
ff4d42a2d7254212febc90c9e889a1539c5b8d59
|
076e95dea5451f7f152a4336bd288f484bcbd9dd
|
refs/heads/master
| 2021-08-28T21:28:30.955360
| 2017-12-13T06:04:51
| 2017-12-13T06:04:51
| 104,431,178
| 6
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,275
|
java
|
package controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import po.Collect;
import po.Order;
import po.PagedResult;
import service.CollectService;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping("/collect")
public class CollectController {
@Autowired
private CollectService collectService;
@RequestMapping("/insert")
@ResponseBody
public Map<String, Object> insert(@RequestBody Collect collect) {
Map<String, Object> map = new HashMap<>();
Map<String, Object> data = new HashMap<>();
int success = collectService.insertCollect(collect);
if (success == 1) {
map.put("data", data);
map.put("statusCode", "200");
map.put("message", "收藏添加成功");
return map;
} else {
map.put("data", data);
map.put("statusCode", "400");
map.put("message", "收藏添加失败");
return map;
}
}
@RequestMapping("/delete")
@ResponseBody
public Map<String, Object> delete(@RequestBody Collect collect) {
Map<String, Object> map = new HashMap<>();
Map<String, Object> data = new HashMap<>();
Integer collectId = collect.getCollectId();
int success = collectService.deleteCollect(collectId);
if (success == 1) {
map.put("data", data);
map.put("statusCode", "200");
map.put("message", "收藏删除成功");
return map;
} else {
map.put("data", data);
map.put("statusCode", "400");
map.put("message", "收藏删除失败");
return map;
}
}
@RequestMapping("/getAllCollects")
@ResponseBody
public PagedResult<Collect> getAllCollects(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageNo") Integer pageSize) {
return collectService.getAllCollects(pageNo, pageSize);
}
}
|
[
"patrickyateschn@gmail.com"
] |
patrickyateschn@gmail.com
|
46f4743d01246f6b615efeb659180662afb14c75
|
8f674b33da34c436336b8fd2dc9a7388b03e01b3
|
/xarql.com/src/com/xarql/auth/GoogleHandler.java
|
d1be762354254d1b98649c6bd88b9dcf3a8b0902
|
[
"MIT"
] |
permissive
|
ArnobChowdhury/xarql
|
e22601c5fbe3f4b91cc2fe938a094b71bf1420c3
|
1b42993e1c7d4de3faa29261a9ff4c0b11fca2ca
|
refs/heads/master
| 2020-04-10T21:56:26.278512
| 2019-01-06T23:29:15
| 2019-01-06T23:29:15
| 161,311,210
| 0
| 0
| null | 2018-12-11T09:41:02
| 2018-12-11T09:41:02
| null |
UTF-8
|
Java
| false
| false
| 2,073
|
java
|
/*
* MIT License http://g.xarql.com Copyright (c) 2018 Bryan Christopher Johnson
*/
package com.xarql.auth;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.xarql.main.DeveloperOptions;
/**
* Servlet implementation class GoogleHandler
*/
@WebServlet ("/GoogleHandler")
public class GoogleHandler extends HttpServlet
{
private static final long serialVersionUID = 1L;
private static final String DOMAIN = DeveloperOptions.getDomain();
/**
* @see HttpServlet#HttpServlet()
*/
public GoogleHandler()
{
super();
// TODO Auto-generated constructor stub
} // GoogleHandler()
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
* response)
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
// request.setAttribute("domain", DOMAIN);
response.sendRedirect(DOMAIN + "/auth");
} // doGet()
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
* response)
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
String idToken;
request.setAttribute("id_token", request.getParameter("id_token"));
if(request.getAttribute("id_token") == null)
idToken = "";
else
idToken = request.getAttribute("id_token").toString();
request.setAttribute("id_token", idToken);
String tomcatSession = request.getRequestedSessionId();
new AuthSession(tomcatSession, idToken, "google");
if(AuthTable.contains(tomcatSession))
response.setStatus(200);
else
response.sendError(400);
} // doPost()
} // GoogleHandler
|
[
"bryanchristopherjohnson@gmail.com"
] |
bryanchristopherjohnson@gmail.com
|
33f2fcffb58dc6c02f89f28e1184ac9d68037580
|
c712cf888376b9702a6eb2d2cd190b91b803168c
|
/src/main/java/nhom7/shopgiay/configuration/RegisterSecurityFilter.java
|
1416e17474d6320285c0d307c43853f264a172c5
|
[] |
no_license
|
FOSS-TEAM7-CNTT2-K11/ShopGiay
|
75909234205dfcb5d53b9b22d9f4f63078ec18e6
|
426c901adee8565906d41f1d27b2578bd01af9c2
|
refs/heads/master
| 2022-12-27T01:37:17.679197
| 2019-12-15T01:21:00
| 2019-12-15T01:21:00
| 219,970,107
| 0
| 0
| null | 2022-12-15T23:50:14
| 2019-11-06T10:23:40
|
HTML
|
UTF-8
|
Java
| false
| false
| 222
|
java
|
package nhom7.shopgiay.configuration;
import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;
public class RegisterSecurityFilter extends AbstractSecurityWebApplicationInitializer {
}
|
[
"giangokboy@icloud.com"
] |
giangokboy@icloud.com
|
37b47365b2b85e66e96c1344943ab9b4fd54006e
|
c53e86e923350b94b71e1dcab967a7c7239de7cf
|
/陈涵/第五周/po/ch/AddPage.java
|
5fa4bcd6635331d69de07a1169cd39eb85ba595a
|
[] |
no_license
|
Saber-Nemsis/The-Second-Practical-Training
|
114b42179650b196c11cad410a2d0984ccdd2438
|
81abd50fe9edd424470f3f922b760da2ce76a3fa
|
refs/heads/main
| 2023-05-14T23:14:44.817998
| 2021-06-09T08:42:14
| 2021-06-09T08:42:14
| 359,279,415
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,117
|
java
|
package com.uiautomator_plus.po.ch;
public class AddPage {
//导航栏添加的text和index
private String addPageText="添加";
private int addPageIndex=0;
//物品名称的text和index
private String goodsNameText="物品名称";
private int goodsNameIndex=0;
//保质期的class和index
private String EXPClassName="android.widget.EditText";
private int EXPIndex=4;
//确认添加的text和index
private String confirmAddText="确认添加";
private int confirmAddIndex=0;
public String getAddPageText() {
return addPageText;
}
public int getAddPageIndex() {
return addPageIndex;
}
public String getGoodsNameText() {
return goodsNameText;
}
public int getGoodsNameIndex() {
return goodsNameIndex;
}
public String getEXPClassName() {
return EXPClassName;
}
public int getEXPIndex() {
return EXPIndex;
}
public String getConfirmAddText() {
return confirmAddText;
}
public int getConfirmAddIndex() {
return confirmAddIndex;
}
}
|
[
"508142287@qq.com"
] |
508142287@qq.com
|
17dc63c9b754690181566070bcbd550a33d27ab7
|
2988c60069eb65977fd300470cf0ecaa2ac04e9b
|
/spring-boot-poi/src/main/java/controller/StartPoiApplication.java
|
83c90ab570c16a50c087dba4f5645144918f30dc
|
[] |
no_license
|
xiaoliutong/springbootstudy
|
f5cf149f5ef633ffc1c93b4500147b3b588fe789
|
73294573d54ec09d6229b709cf2ce4108f523fcf
|
refs/heads/master
| 2022-12-18T15:06:19.323956
| 2020-09-16T01:20:38
| 2020-09-16T01:20:38
| 285,487,886
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 317
|
java
|
package controller;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class StartPoiApplication {
public static void main(String[] args) {
SpringApplication.run(StartPoiApplication.class, args);
}
}
|
[
"741990882@qq.com"
] |
741990882@qq.com
|
c36ebc5dafd1e6412e83a9f19a6b2c3c2e1d14a0
|
026dc1e1b86e6ddab0ac0ceba5ebb7502157865c
|
/src/test/java/com/razvan/kafka/springkafkaintegration/SpringKafkaIntegrationApplicationTests.java
|
d1c1e38fa752d4b733392ded161da99cf40322b9
|
[] |
no_license
|
razvanistoica/spring-kafka-integration
|
8ae4c364916942fe43944ac1ef012cbc2464c9f4
|
9487adda1b7aa686c5089a9903bbac7c99293946
|
refs/heads/master
| 2021-05-23T13:59:39.805832
| 2020-04-05T20:23:49
| 2020-04-05T20:23:49
| 253,325,434
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 247
|
java
|
package com.razvan.kafka.springkafkaintegration;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class SpringKafkaIntegrationApplicationTests {
@Test
void contextLoads() {
}
}
|
[
"razvan.i.stoica@gmail.com"
] |
razvan.i.stoica@gmail.com
|
2b49e988c963cda99498c952ae57e763a3a2d3c8
|
d49bd87b96b80e5bfa1e269fd19639ee3e3bcc54
|
/a-bourse-societe-service/src/main/java/com/example/demo/entities/User.java
|
acdb95ad46fd4dc1dbed099b540bbbcb21ee2698
|
[] |
no_license
|
khaoulaAbdelli/springBoot-Microservice-SpringCloud
|
98d32e5830abef4703efddea3bb845fc9a6d3b34
|
7619610cbc9b2adf5adb4eeff91162410d79bb87
|
refs/heads/master
| 2020-04-05T07:41:01.962980
| 2018-11-08T11:14:01
| 2018-11-08T11:14:01
| 156,684,691
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 98
|
java
|
package com.example.demo.entities;
public class User {
private Long id ;
//private S
}
|
[
"kabd@OSBlap314.idvnet.local"
] |
kabd@OSBlap314.idvnet.local
|
20611f35795c8301442f9b836a73206bbd3c363f
|
e14813c8216dcaafe3338b571d02004ed756c803
|
/app/src/main/java/com/example/root/fragmentbackstacktask/FifthFragment.java
|
cccf866611dda65a028e38e7f9368312a6c29c9e
|
[] |
no_license
|
naveenshekar3/Fragment-backstack-task
|
90cc4e8d1dbcf385014a367036b6cbc37a53abe1
|
428a9be340c59efee7e3b95b2ba099c4fadb9bd0
|
refs/heads/master
| 2020-03-13T11:23:00.159988
| 2018-04-26T04:40:01
| 2018-04-26T04:40:01
| 131,100,585
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 657
|
java
|
package com.example.root.fragmentbackstacktask;
import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* A simple {@link Fragment} subclass.
*/
public class FifthFragment extends Fragment {
public FifthFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_fifth, container, false);
}
}
|
[
"mcnaveen0@gmail.com"
] |
mcnaveen0@gmail.com
|
85b789808bde71c2cad24cefcf89c3dc72caebdb
|
a327fc80c0967e7bdb892f05dcbd856c49863386
|
/src/main/java/net/clomie/jsonsmith/parser/PathScanners.java
|
303d861070a1b759928e1b0cd9fc0d558f38dafc
|
[
"MIT"
] |
permissive
|
clomie/jsonsmith
|
1603cc09bf562dd7e5ccc5f5b417cd436a03ee7b
|
f17c30aad03711bdab499c59cbb18a07c4700ba0
|
refs/heads/master
| 2020-03-23T03:27:15.365447
| 2018-12-24T13:43:36
| 2018-12-24T13:43:36
| 141,031,334
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,698
|
java
|
package net.clomie.jsonsmith.parser;
import static org.jparsec.Parsers.*;
import static org.jparsec.Scanners.*;
import org.jparsec.Parser;
import org.jparsec.Parser.Reference;
import org.jparsec.Scanners;
import net.clomie.jsonsmith.ast.ArrayIndex;
import net.clomie.jsonsmith.ast.ObjectKey;
import net.clomie.jsonsmith.ast.Property;
import net.clomie.jsonsmith.ast.PropertyPath;
/**
* Grammer
*
* <pre>
* ArrayIndex ::= [ INTEGER ]
* ObjectKey ::= . IDENTIFIER | [' STRING ']
* Property ::= ListIndex | ObjectKey
* Path ::= Property Path | Property
* </pre>
*/
class PathScanners {
static final Parser<Integer> INDEX = Scanners.INTEGER.map(Integer::valueOf);
static final Parser<ArrayIndex> ARRAY_NOTATION = inBrackets(INDEX).map(ArrayIndex::new);
static final Parser<String> DOT_IDENTIFIER = isChar('.').next(Scanners.IDENTIFIER);
static final Parser<String> STRING_IN_BRACKET = inBrackets(StringLiterals.SINGLE_QUOTED_STRING);
static final Parser<ObjectKey> OBJECT_NOTATION = or(DOT_IDENTIFIER, STRING_IN_BRACKET).map(ObjectKey::new);
static final Parser<Property> PROPERTY_NOTATION = or(ARRAY_NOTATION, OBJECT_NOTATION);
static <T> Parser<T> inBrackets(Parser<T> parser) {
return parser.between(isChar('['), isChar(']'));
}
static Parser<PropertyPath> propertyPath() {
Reference<PropertyPath> ref = Parser.newReference();
Parser<PropertyPath> multiple = sequence(PROPERTY_NOTATION, ref.lazy(), PropertyPath::new);
Parser<PropertyPath> single = PROPERTY_NOTATION.map(PropertyPath::new);
Parser<PropertyPath> parser = multiple.or(single);
ref.set(parser);
return parser;
}
}
|
[
"cclomie@gmail.com"
] |
cclomie@gmail.com
|
d87705a94db73432c2c934140cc2e0f6dba08d03
|
db74b7d1057976d46b473f9d947913bd37c164c8
|
/src/main/java/roguetutorial/creatures/Creature.java
|
d7aca43a34fd0214e3735b49fdb7822e3ee36028
|
[] |
no_license
|
dewshick/roguelike_tutor
|
1cb2b16d57cc64155d5f8088fe055fd2e106569e
|
253ef92da907b53b80159b8c7098c436f6620756
|
refs/heads/master
| 2021-01-10T12:03:26.111901
| 2016-02-24T13:49:45
| 2016-02-24T13:49:45
| 52,378,597
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,444
|
java
|
package roguetutorial.creatures;
import roguetutorial.Drawable;
import roguetutorial.world.Point3D;
import roguetutorial.world.Tile;
import roguetutorial.world.World;
import roguetutorial.creatures.ai.CreatureAi;
import java.awt.*;
import java.util.Optional;
/**
* Created by avyatkin on 21/02/16.
*/
public class Creature implements Drawable {
private World world;
public Point3D coords;
private char glyph;
private Color color;
private CreatureAi ai;
private int maxHp;
private int hp;
private int attackValue;
private int defenseValue;
public int getMaxHp() {
return maxHp;
}
public int getHp() {
return hp;
}
public int getAttackValue() {
return attackValue;
}
public int getDefenseValue() {
return defenseValue;
}
public Color getColor() { return color; }
public char getGlyph() { return glyph; }
public void setAi(CreatureAi ai) { this.ai = ai; }
public Creature(World world, char glyph, Color color, int maxHp, int attackValue, int defenseValue) {
this.world = world;
this.glyph = glyph;
this.color = color;
this.maxHp = maxHp;
this.hp = maxHp;
this.attackValue = attackValue;
this.defenseValue = defenseValue;
}
public void dig(Point3D point3D) {
world.dig(point3D);
}
public void moveBy(Point3D vector) {
Point3D newCoords = new Point3D(vector.x + coords.x, vector.y + coords.y, vector.z + coords.z);
Optional<Creature> enemy = world.creatureAt(newCoords);
Tile targetTile = world.getTile(newCoords);
if (vector.z == -1)
if (targetTile == Tile.STAIRS_DOWN)
logAction("walk upstairs, moved to level " + newCoords.z);
else {
logAction("fail to walk upstairs cause there's no ladder here");
return;
}
else if (vector.z == 1)
if (targetTile == Tile.STAIRS_UP)
logAction("walk downstairs, moved to level " + newCoords.z);
else {
logAction("fail to walk downstairs cause there's no ladder here");
return;
}
if (enemy.isPresent())
attack(enemy.get());
else
ai.onEnter(newCoords, targetTile);
}
private void attack(Creature enemy) {
int strikeDamage = Math.max(0, getAttackValue() - enemy.getDefenseValue());
strikeDamage = (int)(strikeDamage * Math.random()) + 1;
notify("You attack the '%s' for %d damage", enemy.getGlyph(), strikeDamage);
enemy.modifyHp(-strikeDamage);
enemy.notify("The '%s' attacks you for %d damage.", glyph, strikeDamage);
}
private void modifyHp(int i) {
hp += i;
if (hp < 1) {
world.remove(this);
logAction("die");
}
}
public void update() {
ai.onUpdate();
}
public boolean canEnter(Point3D point3D) {
return world.getTile(point3D).isGround() &&!world.creatureAt(point3D).isPresent();
}
public void notify(String message, Object ... params) {
ai.onNotify(String.format(message, params));
}
public void logAction(String message, Object ... params) {
int radius = 9;
for(int ox = -radius; ox < radius + 1; ox++)
for(int oy = -radius; oy < radius + 1; oy++) {
if(ox * ox + oy * oy > radius * radius)
continue;
Point3D recieverCoords = new Point3D(coords.x + ox, coords.y + oy, coords.z);
Optional<Creature> maybeReciever = world.creatureAt(recieverCoords);
if (!maybeReciever.isPresent())
continue;
Creature reciever = maybeReciever.get();
if (reciever == this)
reciever.notify("You " + message + ".", params);
else
reciever.notify(String.format("The '%s' %s", glyph, makeSecondPerson(message)), params);
}
}
private String makeSecondPerson(String text){
String[] words = text.split(" ");
words[0] = words[0] + "s";
StringBuilder builder = new StringBuilder();
for (String word : words){
builder.append(" ");
builder.append(word);
}
return builder.toString().trim();
}
}
|
[
"avyatkin@spbtv.com"
] |
avyatkin@spbtv.com
|
57707a8c0639ca9fa856debeb71d26c8daa5b83d
|
be521ce62870252c0145bbadd502ad8a67d2d94b
|
/SocialAppBackend/src/main/java/com/niit/dao/PersonDao.java
|
45439215a00f7e01ecac1de33e1867f9df4214bc
|
[] |
no_license
|
shweta129/Social-app
|
528906f084e25710eab61573651bc98c73de4423
|
b2da42f3781e80615ea31f38a17aaf261b0ba452
|
refs/heads/master
| 2021-09-04T09:08:34.284990
| 2018-01-17T15:09:55
| 2018-01-17T15:09:55
| 111,788,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 319
|
java
|
package com.niit.dao;
import java.util.List;
import com.niit.dto.Person;
public interface PersonDao {
public List<Person> getAllPersons();
public void savePerson(Person person);
public void deletePerson(int id);
public Person getPerson(int id);
public void updatePerson(Person person);
}
|
[
"shwetachaudhari129@gmail.com"
] |
shwetachaudhari129@gmail.com
|
2674f23a6494bad7cd2b45daac38936f45b65de4
|
ec324a8cf7da1024fb703f9d0157335df1d1b0b3
|
/src/main/java/com/crm/qa/Utils/TestUtil.java
|
4b734ceb52306ca85bd31db7cf325bc7dc002824
|
[] |
no_license
|
shivasrivastava1/SeleniumPageObjectModel
|
9363f21f2dcbefef47035ce147355313783832b5
|
927a452d142a177faf01ed12d4496c71315a8d6b
|
refs/heads/master
| 2022-07-12T11:21:14.833761
| 2019-06-05T18:49:06
| 2019-06-05T18:49:06
| 135,194,347
| 0
| 0
| null | 2022-06-29T17:25:29
| 2018-05-28T18:10:37
|
HTML
|
UTF-8
|
Java
| false
| false
| 148
|
java
|
package com.crm.qa.Utils;
public class TestUtil {
public static long PAGE_LOAD_TIMEOUT = 20;
public static long IMPLICIT_WAIT = 10;
}
|
[
"shiva.srivastva08@gmail.com"
] |
shiva.srivastva08@gmail.com
|
bf6ccb41ad8d79cafb2873eee9a6dd102ac8d430
|
1bee697871facc92afaaee16d2f793e21564590b
|
/src/main/java/io/github/externschool/planner/repository/schedule/ScheduleTemplateRepository.java
|
8d54d13cc5cace9139f45edf5e6bd9a99f7f1404
|
[
"MIT"
] |
permissive
|
Benkoff/planner
|
54c0a7fb6f6bdecf8b0f32c28fd6060d140405ea
|
fd52cd623d2016784bdf283abf8485c74d160852
|
refs/heads/develop
| 2021-06-10T20:48:58.728665
| 2019-03-19T07:47:21
| 2019-03-19T07:47:21
| 128,563,352
| 0
| 0
|
MIT
| 2018-04-07T19:58:17
| 2018-04-07T19:58:17
| null |
UTF-8
|
Java
| false
| false
| 420
|
java
|
package io.github.externschool.planner.repository.schedule;
import io.github.externschool.planner.entity.User;
import io.github.externschool.planner.entity.schedule.ScheduleTemplate;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface ScheduleTemplateRepository extends JpaRepository<ScheduleTemplate, Long> {
List<ScheduleTemplate> findAllByOwner(User owner);
}
|
[
"mailto.benkoff@gmail.com"
] |
mailto.benkoff@gmail.com
|
3596e9d502ca992e22e4a05a721b4abe9206f52b
|
4a45ba900b5849c40dbdd6dd78c3b051b7ed8836
|
/rpcserver/rpcserver-api/src/main/java/com/aladin/play/RpcRequest.java
|
05e38e5ad4dfe6db41214ec71e5a5c625ccb1ddb
|
[] |
no_license
|
shanuo0312/yangRpc
|
81102ff2c4be2b50cd3426452eda44319fd439c6
|
3c9e43f0172ef589ed1ea637ac47f509015a8d7e
|
refs/heads/master
| 2021-07-07T11:56:46.285442
| 2019-06-23T23:07:14
| 2019-06-23T23:07:14
| 193,210,095
| 0
| 0
| null | 2020-10-13T14:06:53
| 2019-06-22T08:24:55
|
Java
|
UTF-8
|
Java
| false
| false
| 698
|
java
|
package com.aladin.play;
import java.io.Serializable;
public class RpcRequest implements Serializable {
private String className;
private String methodName;
private Object[] parameters;
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public String getMethodName() {
return methodName;
}
public void setMethodName(String methodName) {
this.methodName = methodName;
}
public Object[] getParameters() {
return parameters;
}
public void setParameters(Object[] parameters) {
this.parameters = parameters;
}
}
|
[
"shanuo0312@163.com"
] |
shanuo0312@163.com
|
58abf593b00d30e4296bc4e8e5d29c94646ca574
|
88ff225a733c25dc4b10499746c2fa6657541b00
|
/cloud-alibaba-consumer-nacos-order93/src/main/java/com/jxkj/springcloud/AlibabaOrderApplication93.java
|
7e92c829a59dc7ac967ba7cf6cd937e89ef831bf
|
[] |
no_license
|
yysimple/cloud-study-gitee
|
c2a72f76ef11c7c733f63475c7e814bbf2c2e853
|
89014c98186fea369281bbffeb5dd4a57547b48d
|
refs/heads/master
| 2023-06-08T14:12:09.510405
| 2020-07-19T08:32:14
| 2020-07-19T08:32:14
| 382,404,053
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 496
|
java
|
package com.jxkj.springcloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* 功能描述:
*
* @author wcx
* @version 1.0
*/
@SpringBootApplication
@EnableDiscoveryClient
public class AlibabaOrderApplication93 {
public static void main(String[] args) {
SpringApplication.run(AlibabaOrderApplication93.class, args);
}
}
|
[
"5325809+yysimple@user.noreply.gitee.com"
] |
5325809+yysimple@user.noreply.gitee.com
|
90ee220589412aa68337d9ad0696ad1202a23973
|
1d04f6f24054aab4e3a705b275b32c5ea56c42be
|
/src/test/java/com/epam/drozdyk/consoleshop/command/impl/application/ShowLastFiveCommandTest.java
|
1b99739e4b6dfc99094d7fcb3d803f875d2323f6
|
[] |
no_license
|
YevheniiDrozdyk/Console-Shop
|
6eaa0a8d13f66cd2875520e836625b3c1dcc4781
|
9be9b274b18072eacf22386673b7f425446f5e4d
|
refs/heads/master
| 2021-01-01T15:22:25.544972
| 2017-07-18T14:07:06
| 2017-07-18T14:07:06
| 97,605,829
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,116
|
java
|
package com.epam.drozdyk.consoleshop.command.impl.application;
import com.epam.drozdyk.consoleshop.constant.GuitarType;
import com.epam.drozdyk.consoleshop.constant.ViolinCategory;
import com.epam.drozdyk.consoleshop.model.Guitar;
import com.epam.drozdyk.consoleshop.model.Instrument;
import com.epam.drozdyk.consoleshop.model.Violin;
import com.epam.drozdyk.consoleshop.service.LastFiveService;
import com.epam.drozdyk.consoleshop.view.LastFiveView;
import com.epam.drozdyk.consoleshop.view.View;
import com.epam.drozdyk.consoleshop.wrapper.LastFive;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class ShowLastFiveCommandTest {
@InjectMocks
private ShowLastFiveCommand command;
@Mock
private LastFiveService lastFiveService;
private LastFive lastFive;
@Before
public void setUp() {
Instrument guitar1 = new Guitar(1, "F-100", "ua", 100, 3, GuitarType.ACOUSTIC);
Instrument violin1 = new Violin(2, "F-200", "ru", 200, 4, ViolinCategory.ARTISANS);
Instrument guitar2 = new Guitar(3, "F-300", "usa", 300, 5, GuitarType.ACOUSTIC);
Instrument violin2 = new Violin(4, "F-400", "de", 400, 6, ViolinCategory.ARTISANS);
Instrument guitar3 = new Guitar(5, "F-500", "fr", 500, 7, GuitarType.ACOUSTIC);
lastFive = new LastFive();
lastFive.getLastFiveMap().put("F-100", guitar1);
lastFive.getLastFiveMap().put("F-200", violin1);
lastFive.getLastFiveMap().put("F-300", guitar2);
lastFive.getLastFiveMap().put("F-400", violin2);
lastFive.getLastFiveMap().put("F-500", guitar3);
}
@Test
public void execute() {
when(lastFiveService.getLastFive()).thenReturn(lastFive);
final View expected = new LastFiveView(lastFive);
final View actual = command.execute();
assertEquals(expected, actual);
}
}
|
[
"Yevhenii_Drozdyk@epam.com"
] |
Yevhenii_Drozdyk@epam.com
|
733d1edd4ab7a116631408b4a7d8ce9754a4e8d8
|
a1837b9a838352c88fdd92e9bf4181caefa50bd9
|
/interfaces/gamingconsole/ChessGame.java
|
190876c34760efd6b8df717f04436ab501242c05
|
[] |
no_license
|
Archanaprasannan/CoreJava_Programs
|
1a76cf6a1e60ee756de57e7f53399d3d8f4be3af
|
e2f71bf6edab31e3982bf7964b4f2b19d66c6dda
|
refs/heads/main
| 2023-05-30T17:44:35.112729
| 2021-06-27T17:51:42
| 2021-06-27T17:51:42
| 380,320,369
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 422
|
java
|
package com.archa.workspace.interfaces.gamingconsole;
public class ChessGame implements GamingConsole {
@Override
public void up() {
System.out.println("Move piece up");
}
@Override
public void down() {
System.out.println("Move piece down");
}
@Override
public void left() {
System.out.println("Move piece left");
}
@Override
public void right() {
System.out.println("Move piece right");
}
}
|
[
"archa@Achus_Machine"
] |
archa@Achus_Machine
|
d1ace6a9fa2141b64bbb9013cf2ccd76863e9717
|
6829a76a72e1d13e53da18d267771f44139778a9
|
/src/java/com/yz/demo/domain/Permission.java
|
7a78d71a6f55a42167e3471554ccc99d3534d65c
|
[] |
no_license
|
SuphieLiang/ssm_shiro_demo
|
936f9bb6d3413676339da2967a2f45cc730a843f
|
fe40d188f5ba361ca6a3adfdcef68c35bf9c2254
|
refs/heads/master
| 2021-01-19T14:49:29.384900
| 2017-08-23T06:12:05
| 2017-08-23T06:12:05
| 100,919,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,749
|
java
|
package com.yz.demo.domain;
import java.io.Serializable;
public class Permission implements Serializable{
private Long id;
private String permission;
private String description;
private Boolean available=Boolean.FALSE;
public Permission() {
}
public Permission(String permission, String description, Boolean available) {
this.permission = permission;
this.description = description;
this.available = available;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPermission() {
return permission;
}
public void setPermission(String permission) {
this.permission = permission;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Boolean getAvailable() {
return available;
}
public void setAvailable(Boolean available) {
this.available = available;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Permission that = (Permission) o;
return id != null ? id.equals(that.id) : that.id == null;
}
@Override
public int hashCode() {
return id != null ? id.hashCode() : 0;
}
@Override
public String toString() {
return "Permission{" +
"id=" + id +
", permission='" + permission + '\'' +
", description='" + description + '\'' +
", available=" + available +
'}';
}
}
|
[
"you@example.com"
] |
you@example.com
|
83e24824848bb2f13bb1027ecf00e479f37ae412
|
c9c4659d045c087423d67ff5870d1cce9938a913
|
/DesignPattern/src/com/training/stru/decorator/ClientDecor.java
|
f0e0cdfe545569e1df654ff19018df8de2bc8699
|
[] |
no_license
|
Shilpshikha/JavaCode
|
d7b9d8605178e9e2b3f9933e722aeff58f60e5cf
|
535bbca1e8d31a59d4159061c6b48bc9a2120b86
|
refs/heads/master
| 2021-01-10T15:43:31.606441
| 2016-03-31T09:57:10
| 2016-03-31T09:57:10
| 50,654,683
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 375
|
java
|
package com.training.stru.decorator;
public class ClientDecor {
public static void main(String[] args) {
OnlineBanking acc = new OnlineBanking(new SavingsAccount());
System.out.println(acc.balanceToMaintain());
BankAccount acc2 = new SocialNetBanking(new OnlineBanking(new SavingsAccount()));
System.out.println(acc2.balanceToMaintain());
}
}
|
[
"sshikha2@sapient.com"
] |
sshikha2@sapient.com
|
64f414a30050a8698b5a627592583f03b0af79e7
|
67efd87c6b1d334dd75110f7cabe3411802f8baf
|
/src/android/support/v7/security/impl/ViewHelper.java
|
b621124c787ffd1bdf24d61398cc1ade73f2be48
|
[] |
no_license
|
pprados/android-keychain-backport-androlib
|
2e6572ebee9c8db9354f920de2589550e773a0a9
|
03044e5421336abd4ad50a33162129ae28172948
|
refs/heads/master
| 2021-01-01T18:48:35.641530
| 2013-02-13T10:43:50
| 2013-02-13T10:43:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,685
|
java
|
/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.v7.security.impl;
import android.support.v7.security.R;
import android.view.View;
import android.widget.TextView;
/**
* A helper class for handling text views in the dialogs.
*/
@Deprecated
class ViewHelper
{
private View mView;
private boolean mHasEmptyError;
void setView(View view)
{
mView = view;
}
void showError(int msgId)
{
TextView v = (TextView) mView.findViewById(R.id.error);
v.setText(msgId);
if (v != null)
v.setVisibility(View.VISIBLE);
}
String getText(int viewId)
{
return ((TextView) mView.findViewById(viewId)).getText().toString();
}
void setText(int viewId, String text)
{
if (text == null)
return;
TextView v = (TextView) mView.findViewById(viewId);
if (v != null)
v.setText(text);
}
void setText(int viewId, int textId)
{
TextView v = (TextView) mView.findViewById(viewId);
if (v != null)
v.setText(textId);
}
void setHasEmptyError(boolean hasEmptyError)
{
mHasEmptyError = hasEmptyError;
}
boolean getHasEmptyError()
{
return mHasEmptyError;
}
}
|
[
"philippe.prados@gmail.com"
] |
philippe.prados@gmail.com
|
f7a6f8de5b6d4485a20798206069b005b5288a3c
|
f5c4836599b773e620c8de6e94172271725e59fa
|
/src/Controleurs/CtrlIncreaseUp_2.java
|
d271b5860f5e868303ee0dfbecac76a218f359b4
|
[] |
no_license
|
leooel8/LileInterdite
|
fa8ca437d59d7f4e1b7a53305621f17ef37ef330
|
3c7872487d2e31a2cbd24b90920adf4b6f6cabad
|
refs/heads/master
| 2023-03-05T04:23:10.983282
| 2021-02-12T11:44:36
| 2021-02-12T11:44:36
| 338,298,766
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 408
|
java
|
package Controleurs;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import Modele.Parametres;
public class CtrlIncreaseUp_2 implements ActionListener{
// ATTRIBUTS
Parametres param;
// CONSTRUCTEUR
public CtrlIncreaseUp_2(Parametres param) {
this.param = param;
}
// METHODES
@Override
public void actionPerformed(ActionEvent e) {
this.param.upDifficulte();
}
}
|
[
"leo.ressayre@u-psud.fr"
] |
leo.ressayre@u-psud.fr
|
67de0d89bc9eb53d493d559cf79857340c934133
|
b26c294d0691f8e1484be1feb4e437d407172c74
|
/mybatis-002/src/main/java/pojo/Customer.java
|
24f6ba42c1f19eecab9dd53fe63de109e1d655ec
|
[] |
no_license
|
BlueProtocolLXC/TheFirstMybatis
|
bbb09511ea56e23a1fa4f2df6606881ebba19771
|
0d2dfdc0c4910dd16b7db9e7a14327e6030de068
|
refs/heads/master
| 2023-06-14T02:37:08.525674
| 2021-06-23T09:43:44
| 2021-06-23T09:43:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,155
|
java
|
package pojo;
/*
*
*@Author liu
*@Creat Time 2021/6/11 13:34
*@System Data 2021 06
*
*/
import org.apache.ibatis.type.Alias;
//用注解给这个类起一个别名
@Alias("customer")
public class Customer {
private Integer id;
private String customerName;
private String customerPassword;
public Customer() {
}
public Customer(Integer id, String customerName, String customerPassword) {
this.id = id;
this.customerName = customerName;
this.customerPassword = customerPassword;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerPassword() {
return customerPassword;
}
public void setCustomerPassword(String customerPassword) {
this.customerPassword = customerPassword;
}
@Override
public String toString() {
return "Customer{" +
"id=" + id +
", customerName='" + customerName + '\'' +
", customerPassword='" + customerPassword + '\'' +
'}';
}
}
|
[
"1242859747@qq.com"
] |
1242859747@qq.com
|
ee14d84a7d1aeb57191d0dadaac5901705638c2e
|
46e326b35fcc9b8637e0faaa4bf624ec60f95326
|
/src/main/java/org/tdwg/rs/ubif/_2006/QuantitativeCharMapping.java
|
fee92485b8fbbb67d06338f98b641d6d2e7f3541
|
[] |
no_license
|
biosemantics/matrix-generation
|
f3bfaf1678672f2110beeb38813c5b0534a61aba
|
7f21c575b1656913ba7f886978a61e870634d26b
|
refs/heads/master
| 2021-01-17T15:18:16.915550
| 2019-04-24T23:33:22
| 2019-04-24T23:33:22
| 21,761,012
| 1
| 0
| null | 2017-09-26T21:31:43
| 2014-07-12T06:17:36
|
Java
|
UTF-8
|
Java
| false
| false
| 3,341
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.07.18 at 10:21:36 AM MST
//
package org.tdwg.rs.ubif._2006;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* Inner class, used only within QuantitativeCharacter
*
* <p>Java class for QuantitativeCharMapping complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="QuantitativeCharMapping">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="From" type="{http://rs.tdwg.org/UBIF/2006/}ValueRangeWithClass"/>
* <element name="ToState" type="{http://rs.tdwg.org/UBIF/2006/}CharacterStateRef" minOccurs="0"/>
* <group ref="{http://rs.tdwg.org/UBIF/2006/}SpecificExtension" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "QuantitativeCharMapping", propOrder = {
"from",
"toState",
"nextVersion"
})
public class QuantitativeCharMapping {
@XmlElement(name = "From", required = true)
protected ValueRangeWithClass from;
@XmlElement(name = "ToState")
protected CharacterStateRef toState;
@XmlElement(name = "NextVersion")
protected VersionExtension nextVersion;
/**
* Gets the value of the from property.
*
* @return
* possible object is
* {@link ValueRangeWithClass }
*
*/
public ValueRangeWithClass getFrom() {
return from;
}
/**
* Sets the value of the from property.
*
* @param value
* allowed object is
* {@link ValueRangeWithClass }
*
*/
public void setFrom(ValueRangeWithClass value) {
this.from = value;
}
/**
* Gets the value of the toState property.
*
* @return
* possible object is
* {@link CharacterStateRef }
*
*/
public CharacterStateRef getToState() {
return toState;
}
/**
* Sets the value of the toState property.
*
* @param value
* allowed object is
* {@link CharacterStateRef }
*
*/
public void setToState(CharacterStateRef value) {
this.toState = value;
}
/**
* Gets the value of the nextVersion property.
*
* @return
* possible object is
* {@link VersionExtension }
*
*/
public VersionExtension getNextVersion() {
return nextVersion;
}
/**
* Sets the value of the nextVersion property.
*
* @param value
* allowed object is
* {@link VersionExtension }
*
*/
public void setNextVersion(VersionExtension value) {
this.nextVersion = value;
}
}
|
[
"danveno@163.com"
] |
danveno@163.com
|
b4acef1d629bec925f5dd72a56bc5a868ea8ec7b
|
5f03ff781dead5207da856a78af34899520568e3
|
/src/main/java/com/gupaoedu/vip/pattern/proxy/dynamicproxy/gpproxy/proxy/GPProxy.java
|
f38b5c7c77b4891a5a68265437e2fcf6be398210
|
[] |
no_license
|
foxInfly/gupaoedu-vip-design-principle-openclose
|
311eace9c58b29ceec02c626315474c8734078da
|
9fead5270df05d1f3bcfb9e5e99fad632b46018d
|
refs/heads/master
| 2022-12-10T13:59:56.144643
| 2020-08-18T23:01:40
| 2020-08-18T23:01:40
| 288,581,674
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,734
|
java
|
package com.gupaoedu.vip.pattern.proxy.dynamicproxy.gpproxy.proxy;
import javax.tools.JavaCompiler;
import javax.tools.StandardJavaFileManager;
import javax.tools.ToolProvider;
import java.io.File;
import java.io.FileWriter;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
/**
* 用来生成源代码的工具类
* Created by Tom.
*/
public class GPProxy {
public static final String ln = "\r\n";
public static Object newProxyInstance(GPClassLoader classLoader, Class<?> [] interfaces, GPInvocationHandler h){
try {
//1、动态生成源代码.java文件
String src = generateSrc(interfaces);
// System.out.println(src);
//2、Java文件输出磁盘,保存文件$Proxy0.java
String filePath = GPProxy.class.getResource("").getPath();
// System.out.println(filePath);
File f = new File(filePath + "$Proxy0.java");
FileWriter fw = new FileWriter(f);
fw.write(src);
fw.flush();
fw.close();
//3、把生成的.java文件编译成.class文件
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager manage = compiler.getStandardFileManager(null,null,null);
Iterable iterable = manage.getJavaFileObjects(f);
JavaCompiler.CompilationTask task = compiler.getTask(null,manage,null,null,null,iterable);
task.call();
manage.close();
//4、编译生成的.class文件加载到JVM中来
Class proxyClass = classLoader.findClass("$Proxy0");
Constructor c = proxyClass.getConstructor(GPInvocationHandler.class);
f.delete();
//5、返回字节码重组以后的新的代理对象
return c.newInstance(h);
}catch (Exception e){
e.printStackTrace();
}
return null;
}
/**动态生成源代码.java文件,就是一个String
* @author lipu
* @since 2020/4/12 22:21
*/
private static String generateSrc(Class<?>[] interfaces){
StringBuffer sb = new StringBuffer();
sb.append(GPProxy.class.getPackage() + ";" + ln);
sb.append("import " + interfaces[0].getName() + ";" + ln);
sb.append("import java.lang.reflect.*;" + ln);
sb.append("public class $Proxy0 implements " + interfaces[0].getName() + "{" + ln);
sb.append("GPInvocationHandler h;" + ln);
sb.append("public $Proxy0(GPInvocationHandler h) { " + ln);
sb.append("this.h = h;");
sb.append("}" + ln);
for (Method m : interfaces[0].getMethods()){
Class<?>[] params = m.getParameterTypes();
StringBuffer paramNames = new StringBuffer();
StringBuffer paramValues = new StringBuffer();
StringBuffer paramClasses = new StringBuffer();
for (int i = 0; i < params.length; i++) {
Class clazz = params[i];
String type = clazz.getName();
String paramName = toLowerFirstCase(clazz.getSimpleName());
paramNames.append(type + " " + paramName);
paramValues.append(paramName);
paramClasses.append(clazz.getName() + ".class");
if(i > 0 && i < params.length-1){
paramNames.append(",");
paramClasses.append(",");
paramValues.append(",");
}
}
sb.append("public " + m.getReturnType().getName() + " " + m.getName() + "(" + paramNames.toString() + ") {" + ln);
sb.append("try{" + ln);
sb.append("Method m = " + interfaces[0].getName() + ".class.getMethod(\"" + m.getName() + "\",new Class[]{" + paramClasses.toString() + "});" + ln);
sb.append((hasReturnValue(m.getReturnType()) ? "return " : "") + getCaseCode("this.h.invoke(this,m,new Object[]{" + paramValues + "})",m.getReturnType()) + ";" + ln);
sb.append("}catch(Error _ex) { }");
sb.append("catch(Throwable e){" + ln);
sb.append("throw new UndeclaredThrowableException(e);" + ln);
sb.append("}");
sb.append(getReturnEmptyCode(m.getReturnType()));
sb.append("}");
}
sb.append("}" + ln);
return sb.toString();
}
private static Map<Class,Class> mappings = new HashMap<Class, Class>();
static {
mappings.put(int.class,Integer.class);
}
private static String getReturnEmptyCode(Class<?> returnClass){
if(mappings.containsKey(returnClass)){
return "return 0;";
}else if(returnClass == void.class){
return "";
}else {
return "return null;";
}
}
private static String getCaseCode(String code,Class<?> returnClass){
if(mappings.containsKey(returnClass)){
return "((" + mappings.get(returnClass).getName() + ")" + code + ")." + returnClass.getSimpleName() + "Value()";
}
return code;
}
private static boolean hasReturnValue(Class<?> clazz){
return clazz != void.class;
}
private static String toLowerFirstCase(String src){
char [] chars = src.toCharArray();
chars[0] += 32;
return String.valueOf(chars);
}
}
|
[
"123@123.com"
] |
123@123.com
|
49485203a984e6f085054f9f0c419527ec415b8a
|
5a88a7c54c382e972d0136a6393d96ac3c5f350e
|
/src/main/java/br/com/zupedu/transactions/security/SecurityConfiguration.java
|
5e727a51d8aa7a2b251f2631ff943a3dbec20c36
|
[
"Apache-2.0"
] |
permissive
|
GleydsonMS/orange-talents-05-template-transacao
|
bf7a0ca4abc2677c2c053941550d5928e00bd9a6
|
86d65d13ec6d06ecc513ffb966071e93862655b6
|
refs/heads/main
| 2023-06-05T00:12:11.311808
| 2021-06-25T12:46:15
| 2021-06-25T12:46:15
| 379,752,175
| 0
| 0
|
Apache-2.0
| 2021-06-23T23:26:06
| 2021-06-23T23:26:05
| null |
UTF-8
|
Java
| false
| false
| 1,180
|
java
|
package br.com.zupedu.transactions.security;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy;
@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests(authorizeRequests ->
authorizeRequests
.antMatchers(HttpMethod.GET, "/cards/{id}/transactions")
.hasAuthority("SCOPE_transaction-scope")
.anyRequest().authenticated()
).csrf().disable().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and().oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt);
}
}
|
[
"gleydson.m.s.1993@gmail.com"
] |
gleydson.m.s.1993@gmail.com
|
4f9d96996fb949f470f6f47713431d0bb7f6ae5a
|
de304d689b92c1049ae6a502a1dace21fbccb794
|
/movie-catalog/src/test/java/br/com/icaro/moviecatalogservice/MovieCatalogApplicationTests.java
|
0a8b7c51af517f31a089be9f32acb01fa7519c19
|
[] |
no_license
|
icaromagnago/service-discovery-springboot-eureka
|
f6da124772955d6e22171118df71de7bdaab88e9
|
15c73acaa6ee76757557a689164d2d4592de56c4
|
refs/heads/master
| 2023-06-18T22:05:09.642003
| 2021-07-23T12:07:06
| 2021-07-23T12:07:06
| 388,788,293
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 239
|
java
|
package br.com.icaro.moviecatalogservice;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MovieCatalogApplicationTests {
@Test
void contextLoads() {
}
}
|
[
"icaro.magnago@anbima.com.br"
] |
icaro.magnago@anbima.com.br
|
79f48759528b3aa7483ca47105551cb61d84c5f8
|
126b90c506a84278078510b5979fbc06d2c61a39
|
/src/ANXCamera/sources/androidx/core/graphics/drawable/d.java
|
a8804f023d94fef246a055de433f8b5ec9f3815e
|
[] |
no_license
|
XEonAX/ANXRealCamera
|
196bcbb304b8bbd3d86418cac5e82ebf1415f68a
|
1d3542f9e7f237b4ef7ca175d11086217562fad0
|
refs/heads/master
| 2022-08-02T00:24:30.864763
| 2020-05-29T14:01:41
| 2020-05-29T14:01:41
| 261,256,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,967
|
java
|
package androidx.core.graphics.drawable;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
/* compiled from: WrappedDrawableApi14 */
class d extends Drawable implements Drawable.Callback, b, c {
/* renamed from: a reason: collision with root package name */
static final PorterDuff.Mode f601a = PorterDuff.Mode.SRC_IN;
/* renamed from: b reason: collision with root package name */
f f602b;
Drawable c;
private int d;
private PorterDuff.Mode e;
private boolean f;
private boolean g;
d(Drawable drawable) {
this.f602b = c();
a(drawable);
}
d(f fVar, Resources resources) {
this.f602b = fVar;
a(resources);
}
private void a(Resources resources) {
f fVar = this.f602b;
if (fVar != null && fVar.f604b != null) {
a(this.f602b.f604b.newDrawable(resources));
}
}
private boolean a(int[] iArr) {
if (!b()) {
return false;
}
ColorStateList colorStateList = this.f602b.c;
PorterDuff.Mode mode = this.f602b.d;
if (colorStateList == null || mode == null) {
this.f = false;
clearColorFilter();
} else {
int colorForState = colorStateList.getColorForState(iArr, colorStateList.getDefaultColor());
if (!(this.f && colorForState == this.d && mode == this.e)) {
setColorFilter(colorForState, mode);
this.d = colorForState;
this.e = mode;
this.f = true;
return true;
}
}
return false;
}
private f c() {
return new f(this.f602b);
}
public final Drawable a() {
return this.c;
}
public final void a(Drawable drawable) {
Drawable drawable2 = this.c;
if (drawable2 != null) {
drawable2.setCallback((Drawable.Callback) null);
}
this.c = drawable;
if (drawable != null) {
drawable.setCallback(this);
setVisible(drawable.isVisible(), true);
setState(drawable.getState());
setLevel(drawable.getLevel());
setBounds(drawable.getBounds());
f fVar = this.f602b;
if (fVar != null) {
fVar.f604b = drawable.getConstantState();
}
}
invalidateSelf();
}
/* access modifiers changed from: protected */
public boolean b() {
return true;
}
public void draw(Canvas canvas) {
this.c.draw(canvas);
}
public int getChangingConfigurations() {
int changingConfigurations = super.getChangingConfigurations();
f fVar = this.f602b;
return changingConfigurations | (fVar != null ? fVar.getChangingConfigurations() : 0) | this.c.getChangingConfigurations();
}
public Drawable.ConstantState getConstantState() {
f fVar = this.f602b;
if (fVar == null || !fVar.a()) {
return null;
}
this.f602b.f603a = getChangingConfigurations();
return this.f602b;
}
public Drawable getCurrent() {
return this.c.getCurrent();
}
public int getIntrinsicHeight() {
return this.c.getIntrinsicHeight();
}
public int getIntrinsicWidth() {
return this.c.getIntrinsicWidth();
}
public int getMinimumHeight() {
return this.c.getMinimumHeight();
}
public int getMinimumWidth() {
return this.c.getMinimumWidth();
}
public int getOpacity() {
return this.c.getOpacity();
}
public boolean getPadding(Rect rect) {
return this.c.getPadding(rect);
}
public int[] getState() {
return this.c.getState();
}
public Region getTransparentRegion() {
return this.c.getTransparentRegion();
}
public void invalidateDrawable(Drawable drawable) {
invalidateSelf();
}
public boolean isAutoMirrored() {
return this.c.isAutoMirrored();
}
public boolean isStateful() {
ColorStateList colorStateList;
if (b()) {
f fVar = this.f602b;
if (fVar != null) {
colorStateList = fVar.c;
return (colorStateList == null && colorStateList.isStateful()) || this.c.isStateful();
}
}
colorStateList = null;
if (colorStateList == null) {
}
}
public void jumpToCurrentState() {
this.c.jumpToCurrentState();
}
public Drawable mutate() {
if (!this.g && super.mutate() == this) {
this.f602b = c();
Drawable drawable = this.c;
if (drawable != null) {
drawable.mutate();
}
f fVar = this.f602b;
if (fVar != null) {
Drawable drawable2 = this.c;
fVar.f604b = drawable2 != null ? drawable2.getConstantState() : null;
}
this.g = true;
}
return this;
}
/* access modifiers changed from: protected */
public void onBoundsChange(Rect rect) {
Drawable drawable = this.c;
if (drawable != null) {
drawable.setBounds(rect);
}
}
/* access modifiers changed from: protected */
public boolean onLevelChange(int i) {
return this.c.setLevel(i);
}
public void scheduleDrawable(Drawable drawable, Runnable runnable, long j) {
scheduleSelf(runnable, j);
}
public void setAlpha(int i) {
this.c.setAlpha(i);
}
public void setAutoMirrored(boolean z) {
this.c.setAutoMirrored(z);
}
public void setChangingConfigurations(int i) {
this.c.setChangingConfigurations(i);
}
public void setColorFilter(ColorFilter colorFilter) {
this.c.setColorFilter(colorFilter);
}
public void setDither(boolean z) {
this.c.setDither(z);
}
public void setFilterBitmap(boolean z) {
this.c.setFilterBitmap(z);
}
public boolean setState(int[] iArr) {
return a(iArr) || this.c.setState(iArr);
}
public void setTint(int i) {
setTintList(ColorStateList.valueOf(i));
}
public void setTintList(ColorStateList colorStateList) {
this.f602b.c = colorStateList;
a(getState());
}
public void setTintMode(PorterDuff.Mode mode) {
this.f602b.d = mode;
a(getState());
}
public boolean setVisible(boolean z, boolean z2) {
return super.setVisible(z, z2) || this.c.setVisible(z, z2);
}
public void unscheduleDrawable(Drawable drawable, Runnable runnable) {
unscheduleSelf(runnable);
}
}
|
[
"sv.xeon@gmail.com"
] |
sv.xeon@gmail.com
|
2cb210190db79aad506c65cd5c36922a714c0a11
|
6de926cff893e6b94ba92340450b1156a4c42b8e
|
/progmob2020/app/src/main/java/com/example/progmob2020/MahasiswaCrud/MahasiswaGetAllActivity.java
|
0eaa35af5f107948fc14331a12884d6ddf7b8701
|
[] |
no_license
|
YoseAwanaustusSalawangi1/ProgMob2020
|
e96ad17512d9f801668793a8fa306aaae67011fa
|
0aae68f5fa87af345fd546b99df357de90e9a763
|
refs/heads/master
| 2023-01-06T04:33:29.846594
| 2020-10-30T10:14:08
| 2020-10-30T10:14:08
| 295,359,826
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,195
|
java
|
package com.example.progmob2020.MahasiswaCrud;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.widget.Toast;
import com.example.progmob2020.Adapter.MahasiswaCRUDRecyclerAdapter;
import com.example.progmob2020.Model.Mahasiswa;
import com.example.progmob2020.Network.GetDataService;
import com.example.progmob2020.Network.RetrofitClientInstance;
import com.example.progmob2020.R;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class MahasiswaGetAllActivity extends AppCompatActivity {
RecyclerView rvMhs;
MahasiswaCRUDRecyclerAdapter mhsAdapter;
ProgressDialog pd;
List<Mahasiswa> mahasiswaList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mahasiswa_get_all);
rvMhs =(RecyclerView)findViewById(R.id.rvGetMhsAll);
pd = new ProgressDialog(this);
pd.setTitle("Mohon Bersabar");
pd.show();
GetDataService service = RetrofitClientInstance.getRetrofitInstance().create(GetDataService.class);
Call<List<Mahasiswa>> call = service.getMahasiswa("72180217");
call.enqueue(new Callback<List<Mahasiswa>>() {
@Override
public void onResponse(Call<List<Mahasiswa>> call, Response<List<Mahasiswa>> response) {
pd.dismiss();
mahasiswaList = response.body();
mhsAdapter = new MahasiswaCRUDRecyclerAdapter(mahasiswaList);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(MahasiswaGetAllActivity.this);
rvMhs.setLayoutManager(layoutManager);
rvMhs.setAdapter(mhsAdapter);
}
@Override
public void onFailure(Call<List<Mahasiswa>> call, Throwable t) {
pd.dismiss();
Toast.makeText(MahasiswaGetAllActivity.this, "Error",Toast.LENGTH_LONG);
}
});
}
}
|
[
"yose.awanaustus@si.ukdw.ac.id"
] |
yose.awanaustus@si.ukdw.ac.id
|
b99d70b8cc7bc76a44dae08c126adfb0bc8426ba
|
85492c8871864bb3e482d05ac148da984e9c4d3f
|
/lifangxian20190304/src/main/java/com/example/www/lifangxian20190304/HttpUtil.java
|
f9ef8440340ea5013055f9045ef16a3ed461acc8
|
[] |
no_license
|
lifangxian/work2
|
c1f4c740855ca1b6dc991d6499a5e8e88c5d90dd
|
fb6316f4b34f2918d2d6f32e0c74748ecee9ba5e
|
refs/heads/master
| 2020-04-28T10:29:58.912484
| 2019-03-12T12:09:46
| 2019-03-12T12:09:46
| 175,203,248
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,280
|
java
|
package com.example.www.lifangxian20190304;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.zip.InflaterInputStream;
public class HttpUtil {
private static ConnectivityManager manager;
public static boolean isNetworkConnected(Context context){
if(context!=null){
manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = manager.getActiveNetworkInfo();
if(networkInfo!=null){
return networkInfo.isConnected();
}
}
return false;
}
public static void httpAsyncTask (final String strURL, final Callbanck callbanck){
new AsyncTask<String, Void, String>() {
@Override
protected String doInBackground(String... strings) {
return requestString(strURL);
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
callbanck.getClass(s);
}
}.execute(strURL);
}
public interface Callbanck{
void getClass(String s);
}
//get请求
public static String requestString(String strURL){
try {
URL url = new URL(strURL);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setConnectTimeout(5000);
connection.setReadTimeout(5000);
connection.setRequestMethod("GET");
InputStream inputStream = connection.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
StringBuffer buffer=new StringBuffer();
String str="";
while ((str=reader.readLine())!=null){
buffer.append(str);
}
return buffer.toString();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
|
[
"2590658115@qq.com"
] |
2590658115@qq.com
|
a20818e7bae567553ee3ba029d1eee6ce0ddb4b5
|
1f29f7842e30d6265fb9dbb302fe9414755e7403
|
/src/main/java/com/eurodyn/okstra/FahrzeugartPropertyType.java
|
f359d6c22860ded60008282b015819a4a2a3bc54
|
[] |
no_license
|
dpapageo/okstra-2018-classes
|
b4165aea3c84ffafaa434a3a1f8cf0fff58de599
|
fb908eabc183725be01c9f93d39268bb8e630f59
|
refs/heads/master
| 2021-03-26T00:22:28.205974
| 2020-03-16T09:16:31
| 2020-03-16T09:16:31
| 247,657,881
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,746
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.03.09 at 04:49:50 PM EET
//
package com.eurodyn.okstra;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for FahrzeugartPropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="FahrzeugartPropertyType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence minOccurs="0">
* <element ref="{http://www.okstra.de/okstra/2.018.2}Fahrzeugart"/>
* </sequence>
* <attGroup ref="{http://www.opengis.net/gml/3.2}OwnershipAttributeGroup"/>
* <attGroup ref="{http://www.opengis.net/gml/3.2}AssociationAttributeGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FahrzeugartPropertyType", propOrder = {
"fahrzeugart"
})
public class FahrzeugartPropertyType {
@XmlElement(name = "Fahrzeugart")
protected FahrzeugartType fahrzeugart;
@XmlAttribute(name = "owns")
protected Boolean owns;
@XmlAttribute(name = "nilReason")
protected List<String> nilReason;
@XmlAttribute(name = "remoteSchema", namespace = "http://www.opengis.net/gml/3.2")
@XmlSchemaType(name = "anyURI")
protected String remoteSchema;
@XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink")
protected TypeType type;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink")
protected String role;
@XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink")
protected String arcrole;
@XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink")
protected String attibuteTitle;
@XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink")
protected ShowType show;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
/**
* Gets the value of the fahrzeugart property.
*
* @return
* possible object is
* {@link FahrzeugartType }
*
*/
public FahrzeugartType getFahrzeugart() {
return fahrzeugart;
}
/**
* Sets the value of the fahrzeugart property.
*
* @param value
* allowed object is
* {@link FahrzeugartType }
*
*/
public void setFahrzeugart(FahrzeugartType value) {
this.fahrzeugart = value;
}
/**
* Gets the value of the owns property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isOwns() {
if (owns == null) {
return false;
} else {
return owns;
}
}
/**
* Sets the value of the owns property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setOwns(Boolean value) {
this.owns = value;
}
/**
* Gets the value of the nilReason property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the nilReason property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getNilReason().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getNilReason() {
if (nilReason == null) {
nilReason = new ArrayList<String>();
}
return this.nilReason;
}
/**
* Gets the value of the remoteSchema property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRemoteSchema() {
return remoteSchema;
}
/**
* Sets the value of the remoteSchema property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRemoteSchema(String value) {
this.remoteSchema = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link TypeType }
*
*/
public TypeType getType() {
if (type == null) {
return TypeType.SIMPLE;
} else {
return type;
}
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link TypeType }
*
*/
public void setType(TypeType value) {
this.type = value;
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
/**
* Gets the value of the role property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRole() {
return role;
}
/**
* Sets the value of the role property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRole(String value) {
this.role = value;
}
/**
* Gets the value of the arcrole property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArcrole() {
return arcrole;
}
/**
* Sets the value of the arcrole property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArcrole(String value) {
this.arcrole = value;
}
/**
* Gets the value of the attibuteTitle property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAttibuteTitle() {
return attibuteTitle;
}
/**
* Sets the value of the attibuteTitle property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAttibuteTitle(String value) {
this.attibuteTitle = value;
}
/**
* Gets the value of the show property.
*
* @return
* possible object is
* {@link ShowType }
*
*/
public ShowType getShow() {
return show;
}
/**
* Sets the value of the show property.
*
* @param value
* allowed object is
* {@link ShowType }
*
*/
public void setShow(ShowType value) {
this.show = value;
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
return actuate;
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
}
|
[
"Dimitrios.Papageorgiou@eurodyn.com"
] |
Dimitrios.Papageorgiou@eurodyn.com
|
b2f21d6a1ebc902a8e7ef1edcce84ca49e04705f
|
f1bc2ba98c5b7c5e9fecf699b92c207c964f9d4c
|
/esb-monitor/monitor-data/monitor-data-api/src/main/java/com/winning/monitor/data/api/transaction/domain/TransactionMessage.java
|
c9d7476855dfdf8e76ffdf1dce131b889ff496ba
|
[] |
no_license
|
Lomad/esb-assistant
|
dbcba15b9d913247e1fde79f8463f8487b51d0d8
|
0a29ecb9cd08d327a27bfb2fa14f91fda753532d
|
refs/heads/master
| 2020-03-14T00:58:08.139177
| 2018-04-28T04:33:30
| 2018-04-28T04:33:30
| 131,367,759
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,271
|
java
|
package com.winning.monitor.data.api.transaction.domain;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* 事务明细记录
*/
public class TransactionMessage {
private List<TransactionMessage> children = new ArrayList<>();
//开始时间yyyy-MM-dd HH:mm:ss
private String startTime;
//17-11-09 新增long类型时间戳
private long timestamp;
//记录id
private String messageId;
//服务代码
private String transactionTypeName;
//服务名称
private String svcName;
//服务步骤名称
private String transactionName;
//服务对应的系统名称
private String serverAppName;
//服务端IP地址
private String serverIpAddress;
//客户端应用名称
private String clientAppName;
//客户端IP地址
private String clientIpAddress;
//客户端类型
private String clientType;
//耗时(毫秒)
private double useTime;
//状态,成功,失败
private String status;
//错误消息
private String errorMessage;
//记录值
private Map<String, String> datas = new LinkedHashMap<>();
private String group;
public List<TransactionMessage> getChildren() {
return children;
}
public void setChildren(List<TransactionMessage> children) {
this.children = children;
}
public String getStartTime() {
return startTime;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getTransactionTypeName() {
return transactionTypeName;
}
public void setTransactionTypeName(String transactionTypeName) {
this.transactionTypeName = transactionTypeName;
}
public String getSvcName() {
return svcName;
}
public void setSvcName(String svcName) {
this.svcName = svcName;
}
public String getTransactionName() {
return transactionName;
}
public void setTransactionName(String transactionName) {
this.transactionName = transactionName;
}
public String getServerAppName() {
return serverAppName;
}
public void setServerAppName(String serverAppName) {
this.serverAppName = serverAppName;
}
public String getServerIpAddress() {
return serverIpAddress;
}
public void setServerIpAddress(String serverIpAddress) {
this.serverIpAddress = serverIpAddress;
}
public String getClientAppName() {
return clientAppName;
}
public void setClientAppName(String clientAppName) {
this.clientAppName = clientAppName;
}
public String getClientIpAddress() {
return clientIpAddress;
}
public void setClientIpAddress(String clientIpAddress) {
this.clientIpAddress = clientIpAddress;
}
public String getClientType() {
return clientType;
}
public void setClientType(String clientType) {
this.clientType = clientType;
}
public double getUseTime() {
return useTime;
}
public void setUseTime(double useTime) {
this.useTime = useTime;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public Map<String, String> getDatas() {
return datas;
}
public void setDatas(Map<String, String> datas) {
this.datas = datas;
}
public void addTransactionMessage(TransactionMessage transactionMessage) {
this.children.add(transactionMessage);
}
public String getGroup() {
return group;
}
public void setGroup(String group) {
this.group = group;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
}
|
[
"403252077@qq.com"
] |
403252077@qq.com
|
3fa60f076682c751becc3bfe8b78ce730b744ea4
|
a255f86131cb976455569edb49ddededb299be6d
|
/src/main/java/com/example/utils/DateUtils.java
|
0401bf5ffe06fba7c0c972fa1c4715c73fe14d90
|
[] |
no_license
|
xiaoguozi218/springboot
|
e59ee8cdf7bcba52cfd80abb8c2b4c348851a435
|
37be177946b4d9629656d9310cdcc1fd2b254b5d
|
refs/heads/master
| 2022-07-19T11:50:48.355520
| 2021-03-12T08:51:06
| 2021-03-12T08:51:06
| 127,492,258
| 0
| 0
| null | 2022-06-17T01:52:54
| 2018-03-31T02:35:04
|
Java
|
UTF-8
|
Java
| false
| false
| 4,753
|
java
|
package com.example.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.MonthDay;
import java.util.Calendar;
import java.util.Date;
/**
* JDK8 时间日期库
* Instant——它代表的是时间戳
LocalDate——不包含具体时间的日期,比如2014-01-14。它可以用来存储生日,周年纪念日,入职日期等。
LocalTime——它代表的是不含日期的时间
LocalDateTime——它包含了日期及时间,不过还是没有偏移信息或者说时区。
ZonedDateTime——这是一个包含时区的完整的日期时间,偏移量是以UTC/格林威治时间为基准的。
*
*
*
*
*/
public class DateUtils {
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private static SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
private static SimpleDateFormat sdf3 = new SimpleDateFormat("yyyyMMdd");
/**
* @Author shGuo
* @Date 2017年3月13日下午3:54:16
* @return
* @return String
* @Desc 获取当前日期(20170313)
*/
public static String getCurDate(Date d){
return sdf3.format(d);
}
public static String getCurDate(){
return sdf3.format(new Date());
}
/**
* @Author shGuo
* @Date 2017年3月13日下午3:54:16
* @return
* @return String
* @Desc 获取当前日期(2017-03-13)
*/
public static String getNowDate(){
return sdf2.format(new Date());
}
public static String getDateStr(Date d){
return sdf2.format(d);
}
/**
* @Author shGuo
* @Date 2017年3月13日下午4:03:24
* @return
* @return String
* @Desc 获取昨天日期(20170312)
*/
public static String getYesterday(){
Calendar now = Calendar.getInstance();
now.setTime(new Date());
now.add(Calendar.DAY_OF_MONTH, -1);
return sdf3.format(now.getTime());
}
public static Date parse(String date, SimpleDateFormat sdf){
try{
return sdf.parse(date);
}catch (ParseException e) {
e.printStackTrace();
return null;
}
}
/**
* @Author shGuo
* @Date 2017年4月6日下午3:43:10
* @param d
* @param day
* @return
* @return Date
* @Desc 获取day天前的日期
*/
public static Date getDateBefore(Date d, int day) {
Calendar now = Calendar.getInstance();
now.setTime(d);
now.add(Calendar.DAY_OF_MONTH, 0-day);
return now.getTime();
}
public static Date getDateAfter(Date d, int day) {
Calendar now = Calendar.getInstance();
now.setTime(d);
now.add(Calendar.DAY_OF_MONTH, day);
return now.getTime();
}
public static Date resetHMS(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
return calendar.getTime();
}
/**
* @param args
*
*
*/
public static void main(String[] args) {
//示例1 如何 在Java 8中获取当天的日期 2018-06-21
// LocalDate today = LocalDate.now();
// System.out.println("Today's Local date : " + today);
//示例2 如何在Java 8中获取当前的年月日
// LocalDate today = LocalDate.now();
// int year = today.getYear();
// int month = today.getMonthValue();
// int day = today.getDayOfMonth();
// System.out.printf("Year : %d Month : %d day : %d \t %n", year, month, day);
//示例3 在Java 8中如何获取某个特定的日期
// LocalDate dateOfBirth = LocalDate.of(2010, 01, 14);
// System.out.println("Your Date of birth is : " + dateOfBirth);
//示例4 在Java 8中如何检查两个日期是否相等
// LocalDate date1 = LocalDate.of(2018, 06, 21);
// if(date1.equals(today)){
// System.out.printf("Today %s and date1 %s are same date %n", today, date1);
// }
//示例5 在Java 8中如何检查重复事件,比如说生日
// LocalDate dateOfBirth = LocalDate.of(2010, 01, 14);
// MonthDay birthday = MonthDay.of(dateOfBirth.getMonth(), dateOfBirth.getDayOfMonth());
// MonthDay currentMonthDay = MonthDay.from(today);
// if(currentMonthDay.equals(birthday)){
// System.out.println("Many Many happy returns of the day !!");
// }else{
// System.out.println("Sorry, today is not your birthday");
// }
}
}
|
[
"527768758@qq.com"
] |
527768758@qq.com
|
1688b49fb8309d82d40281b60496637d1cddb3e6
|
573c5fc6f9d9cefff8258000a3da7508f087caa5
|
/src/main/java/xyz/skycat/work/crudtool/facade/TableCrudMakeFacade.java
|
21aa935333e6b253015d3b248a37270f20d26164
|
[] |
no_license
|
sky0621/work-crudtool
|
6b308491f85b903c09e19453706e448e5917f5bf
|
5975d3348c433de8fc5b5847b452b2fa213e799a
|
refs/heads/master
| 2020-04-06T06:57:25.997877
| 2016-08-31T22:15:27
| 2016-08-31T22:15:27
| 59,757,293
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 383
|
java
|
package xyz.skycat.work.crudtool.facade;
import xyz.skycat.work.crudtool.exception.CrudMakeException;
import xyz.skycat.work.crudtool.facade.statement.resolver.TableNamesFindResolver;
/**
* Created by SS on 2016/06/10.
*/
public class TableCrudMakeFacade extends AbstractCrudMakeFacade {
public TableCrudMakeFacade() {
super(new TableNamesFindResolver());
}
}
|
[
"ss@ss.com"
] |
ss@ss.com
|
024c0e623084acc50a1823f6a5305c8f0978f2c9
|
4e35daa763a62184406034d9f13e1bee97aef484
|
/Week9 - Composite Flyweight/src/ro/ase/csie/cts/g1093/dp/composite/AbstractNode.java
|
58f84090c642da415459ecedcec02b67d52d2cc9
|
[] |
no_license
|
cristinam7/CTS_1093_Seminar
|
ac3d0436381f1b74ddc1ba64e95634fbc5a95343
|
89aeeb4b18b967d294ecd1658be6e69dad935c4b
|
refs/heads/main
| 2023-05-12T04:48:50.199689
| 2021-06-06T20:13:49
| 2021-06-06T20:13:49
| 342,572,854
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 264
|
java
|
package ro.ase.csie.cts.g1093.dp.composite;
public abstract class AbstractNode implements NPCActions {
public abstract void addNode(AbstractNode node);
public abstract AbstractNode getNode(int index);
public abstract void deleteNode(AbstractNode node);
}
|
[
"cmironn@gmail.com"
] |
cmironn@gmail.com
|
aa5be7f0b24ebf4e22527f64a4dc0c24a9128627
|
99cd86199c87482e09059cca0ace65cf41cb4c0d
|
/src/main/java/com/mbp/lqwangxg/mapper/QuestionMapper.java
|
14cfef80be08b258f477281712b0190866294a0a
|
[] |
no_license
|
lqwangxg/sqlitedemo
|
195a87624b855d104d82e3bc5033af2aa85b9b1d
|
c189e52ca2c45cf74e4e0f2d99f5b9b0b1c646a9
|
refs/heads/master
| 2023-05-25T15:56:12.416124
| 2020-04-03T10:23:07
| 2020-04-03T10:23:07
| 245,556,888
| 1
| 0
| null | 2023-05-23T20:13:34
| 2020-03-07T02:50:52
|
Java
|
UTF-8
|
Java
| false
| false
| 843
|
java
|
package com.mbp.lqwangxg.mapper;
import com.mbp.lqwangxg.model.Question;
public interface QuestionMapper {
/**
* @mbg.generated generated automatically, do not modify!
*/
int deleteByPrimaryKey(Integer id);
/**
* @mbg.generated generated automatically, do not modify!
*/
int insert(Question record);
/**
* @mbg.generated generated automatically, do not modify!
*/
int insertSelective(Question record);
/**
* @mbg.generated generated automatically, do not modify!
*/
Question selectByPrimaryKey(Integer id);
/**
* @mbg.generated generated automatically, do not modify!
*/
int updateByPrimaryKeySelective(Question record);
/**
* @mbg.generated generated automatically, do not modify!
*/
int updateByPrimaryKey(Question record);
}
|
[
"U0Bd9Oa4"
] |
U0Bd9Oa4
|
19330682d2f22611151630065cf5ca6ef8fd7b91
|
3b81e703901852799ecdf25e6c5ec62a31d2221a
|
/Module3/jsp_servlet/bai_11/thuc_hanh/p1/src/service/CustomerService.java
|
e299bf88df4ee4dd0b41811bbacafd093745a394
|
[] |
no_license
|
kienth211/C1020G1_Tran_Huu_Kien
|
1fc43325849b54d917ece4d23108ca15a5e9994d
|
4bb1e6ee957a5a43f4b534bb95b226b87020454e
|
refs/heads/main
| 2023-04-16T02:17:22.284829
| 2021-04-19T00:39:07
| 2021-04-19T00:39:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package service;
import bean.Customer;
import java.util.List;
public interface CustomerService {
List<Customer> findAll();
void save(Customer customer);
Customer findById(int id);
void update(int id, Customer customer);
void remove(int id);
}
|
[
"kienthd5h3@gmail.com"
] |
kienthd5h3@gmail.com
|
2bf012418c233c4e1db708498cbbac2997cec4e8
|
97b600effb31dea7d8f1de44960722e414b6b7ac
|
/2021.09.14/src/io/byte2.txt
|
c1b6c94185d0c22d7b46c962610e7cc77ce63c12
|
[] |
no_license
|
wpdnjsgh01/javastudy
|
1c6fcb16f93df63752b87bb3688bc31546ace315
|
1a0ab7df3d966ac7ef3fd2ed7a536c51b5fbe387
|
refs/heads/master
| 2023-08-12T07:24:59.974089
| 2021-10-07T05:50:08
| 2021-10-07T05:50:08
| 403,562,041
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 830
|
txt
|
package io;
import java.io.*;
public class ByteExam01 {
public static void main(String[] args) {
long startTime = System.currentTimeMillis();
FileInputStream fis = null;
FileOutputStream fos = null;
try {
fis = new FileInputStream("src/io/ByteExam01.java");
fos = new FileOutputStream("src/io/byte2.txt");
int readCount = -1;
byte[] buffer = new byte[1024];
while((readCount = fis.read(buffer)) != -1) {
fos.write(buffer, 0, readCount);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
fis.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
long endTime = System.currentTimeMillis();
System.out.println(endTime - startTime);
}
}
|
[
"wpdnjsgh02@naver.com"
] |
wpdnjsgh02@naver.com
|
93f371e912da3353f09ab004505522e1233d1a68
|
1b25caabc0523a16251489f43c07794b3a233eb6
|
/src/Main.java
|
0567c40e953c65a077cc5c8745d9ea2bb9f60d60
|
[] |
no_license
|
liv92/B21Project_Git
|
af8d411681673faff730d9f0abf308dd91d12d0e
|
ba56242206c7fb721523210010899a90687d39c6
|
refs/heads/master
| 2023-01-11T07:26:01.683844
| 2020-11-10T17:50:16
| 2020-11-10T17:50:16
| 311,738,297
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 207
|
java
|
public class Main {
public static void main(String[] args) {
System.out.println("Hello");
//B21 is good at IntelliJ
// another change
// MORE CHANGES TO PUSH
}
}
|
[
"livio.daljani@gmail.com"
] |
livio.daljani@gmail.com
|
d054f230fcd15f842d7a6ca4ce2ae634d1b7b618
|
b0f9ac9e79e253a51940f3ab7e1e8df9cd988f50
|
/app/src/main/java/android/example/cs496/ui/main/fragment2/file_upload/ApiInterface.java
|
c123e773ceb7dd704f1a4d41c34d83d24dc52554
|
[] |
no_license
|
dongk-97/CS496-my-application2
|
f8c079a7a497bf7112afffe03ee6db5df2854eb8
|
1bd460d8a57d197481469e2b204f2c91209ca617
|
refs/heads/master
| 2023-01-19T12:30:31.543770
| 2020-11-25T13:41:23
| 2020-11-25T13:41:23
| 195,891,558
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 582
|
java
|
//package android.example.cs496.ui.main.fragment2.file_upload;
//
//import android.example.cs496.ui.main.fragment2.file_upload.ModelClass.ResponseModel;
//
//import okhttp3.MultipartBody;
//import okhttp3.RequestBody;
//import retrofit2.Call;
//import retrofit2.http.Multipart;
//import retrofit2.http.POST;
//import retrofit2.http.Part;
//
//
//public interface ApiInterface {
//
// @Multipart
// @POST("uploadphoto")
// Call<ResponseModel> fileUpload(
// @Part("sender_information") RequestBody description,
// @Part MultipartBody.Part file);
//
//}
|
[
"rlaehdgusqwe@kaist.ac.kr"
] |
rlaehdgusqwe@kaist.ac.kr
|
85744e68c04380743c3b400059acd14f8259d223
|
0f67dcb88d6e5889b0493a8d41645677bd041e0b
|
/Percipio/src/com/percipio/simple/WritingExcelSheet.java
|
0a5e0604271a91297ab15f653f231b16a06b5dcb
|
[] |
no_license
|
cloakedsec/java-core-libs-spring-mvc
|
b80c3e98a11d41a93d494858762f4e3e61b1e298
|
7f7929845d07a142a5d8edfee777d0b44e0e6b1d
|
refs/heads/main
| 2023-03-04T03:41:08.067048
| 2021-02-16T10:27:53
| 2021-02-16T10:27:53
| 339,340,292
| 0
| 0
| null | 2021-02-16T09:06:09
| 2021-02-16T09:05:59
| null |
UTF-8
|
Java
| false
| false
| 805
|
java
|
package com.percipio.simple;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class WritingExcelSheet {
public static void main(String[] args) throws IOException {
File src = new File("D:\\workspace\\Percipio\\Files\\Data.xlsx");
FileInputStream fis = new FileInputStream(src);
XSSFWorkbook wb = new XSSFWorkbook(fis);
XSSFSheet sheet1 = wb.getSheetAt(0);
// first cell
sheet1.getRow(0).createCell(2).setCellValue("Pass");
// second cell
sheet1.getRow(1).createCell(2).setCellValue("Fail");
FileOutputStream fout = new FileOutputStream(src);
wb.write(fout);
wb.close();
fis.close();
}
}
|
[
"17729847+cloakedsec@users.noreply.github.com"
] |
17729847+cloakedsec@users.noreply.github.com
|
8d636e0f26ec17180d288727020fff577a214bff
|
86ed92d2014f5b6cc420de29d8e48662525693ed
|
/src/main/java/man10advancementplugin/man10advancementplugin/advancement/data/BlockData.java
|
98269e3ad0e9df21e6057587757139fab17f4e2a
|
[] |
no_license
|
tororo1066/Man10AdvancementPlugin
|
297044fb9d47f2f5e05c427e2058d8d5abac6ed2
|
770d0567f43df8a883419f1cdf366f917c5f435c
|
refs/heads/master
| 2023-07-13T09:26:35.314468
| 2021-08-25T15:38:29
| 2021-08-25T15:38:29
| 399,871,522
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 414
|
java
|
package man10advancementplugin.man10advancementplugin.advancement.data;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.bukkit.Material;
// TODO: Add tag/nbt/state properties
public class BlockData {
@Expose
@SerializedName("block")
private Material block;
public void setType(Material material) {
this.block = material;
}
}
|
[
"71592738+tororo1066@users.noreply.github.com"
] |
71592738+tororo1066@users.noreply.github.com
|
10e9ed0fe0e28026ea0a36d1f15bbf4e611889f7
|
65765a0ea6b8ab3b6f4bb183447633855d11d597
|
/src/main/java/com/poc/pdf/model/RowVO.java
|
8283ff2840c1a82dbb24ee860a85976a704cf879
|
[] |
no_license
|
shenjun134/pdf-random
|
37a60c5cea47349f3aea2877c2043b34709a45d2
|
1573e989c943dfed063445ed826d84be7fba1a53
|
refs/heads/master
| 2020-03-22T15:49:36.560185
| 2019-01-19T13:24:33
| 2019-01-19T13:24:33
| 140,281,674
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 456
|
java
|
package com.poc.pdf.model;
import java.util.ArrayList;
import java.util.List;
public class RowVO extends ToString {
private static final long serialVersionUID = -1896625160283007411L;
private List<CellVO> list = new ArrayList<>();
public void add(CellVO cell){
this.list.add(cell);
}
public List<CellVO> getList() {
return list;
}
public void setList(List<CellVO> list) {
this.list = list;
}
}
|
[
"shenjun134@126.com"
] |
shenjun134@126.com
|
1f079283d3e32287ba3872a5ae14c900c6fceb92
|
6b79242bf80f12126fce47951af6be150d13a372
|
/src/main/java/StudentCube/ControllerPesanAdmin.java
|
8d74a2ec96b77656dd42adb8f4596cf81944c874
|
[] |
no_license
|
erlanggal/Prototipe-Student-Cube
|
ec5ea0a54c79b17190137390fe60ebacdbd03be9
|
6cb819e67e3ce8ba3c11650a5a3aa29e621830a8
|
refs/heads/master
| 2020-03-21T10:55:47.954054
| 2018-07-10T04:14:15
| 2018-07-10T04:14:15
| 138,478,894
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package StudentCube;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class ControllerPesanAdmin {
@RequestMapping("pesan-admin")
public String getPage()
{
return "pesan-admin";
}
}
|
[
"erlanggalaimena@gmail.com"
] |
erlanggalaimena@gmail.com
|
8213c899192675545584ed674fdf353560e9651e
|
4d2fa04f00eb244100dae94edb5be52ad19a9951
|
/src/main/java/com/webproject/app/Servlet/ContentDelete.java
|
69462bdc498381ed0f9ce7192e25a9ca392c5f03
|
[] |
no_license
|
namrg/WebProject
|
3a72bc6d5527908299b64d39bca781a350d9889a
|
4e9fa8e825bd040d21583ef5dead5c1baf269c0c
|
refs/heads/master
| 2022-10-30T20:50:27.489811
| 2020-06-16T16:21:43
| 2020-06-16T16:21:43
| 268,723,947
| 0
| 0
| null | 2020-06-02T06:52:26
| 2020-06-02T06:52:25
| null |
UTF-8
|
Java
| false
| false
| 1,657
|
java
|
package com.webproject.app.Servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.webproject.app.Board.*;
/**
* Servlet implementation class ContentDelete
*/
public class ContentDelete extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public ContentDelete() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
BoardDAO boardDAO = new BoardDAO();
int boardNum;
System.out.println(request.getParameter("boardNum"));
boardNum = Integer.parseInt(request.getParameter("boardNum"));
System.out.println(boardNum);
int result = boardDAO.deleteContent(boardNum);
System.out.println(result);
out.println("<script>");
out.println("alert('게시글이 삭제되었습니다')");
out.println("</script>");
response.addHeader("REFRESH"," 0; URL=soldList.do?pg=1");
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
|
[
"wldnd1102@naver.com"
] |
wldnd1102@naver.com
|
82f8a03aa67be56b10f35b6fdf47f5b8ea999a79
|
ba2a0800f81cb79bd65213256cda5b069eae4b45
|
/src/main/java/com/muiz6/system/attendance/ui/controller/NavigationPanel.java
|
7498b81483eab15f36562e655939916ed54c3d5b
|
[
"MIT"
] |
permissive
|
muiz6/attendance-system
|
8040e9fab151698b6a696ac14f4c7c00e8868922
|
0e9a64ab24d82470084335efc42989ad52c24b15
|
refs/heads/master
| 2022-11-09T12:08:35.188188
| 2020-06-21T12:01:24
| 2020-06-21T12:01:24
| 238,363,672
| 1
| 0
|
MIT
| 2020-06-21T12:01:25
| 2020-02-05T03:57:25
|
Java
|
UTF-8
|
Java
| false
| false
| 3,077
|
java
|
package com.muiz6.system.attendance.ui.controller;
import com.muiz6.system.attendance.Constants;
import com.muiz6.system.attendance.Util;
import com.muiz6.system.attendance.ui.event.EmployeeItemEvent;
import com.muiz6.system.attendance.ui.event.NavigationContentEvent;
import com.muiz6.system.attendance.ui.control.TabButton;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.StackPane;
import java.net.URL;
import java.util.ResourceBundle;
public class NavigationPanel implements Initializable,
EventHandler<EmployeeItemEvent> {
@FXML
private TabButton _btnAttendance;
@FXML
private TabButton _btnEmployees;
@FXML
private TabButton _btnHolidays;
@FXML
private StackPane _stackPane;
@Override
public void initialize(URL location, ResourceBundle resources) {
// start by content of first tab (attendance tab)
_stackPane.getChildren().add(Util
.getFxmlNode(Constants.RES_FXML_CONTENT_ATTENDANCE));
_stackPane.addEventFilter(EmployeeItemEvent.CUSTOM, this);
_stackPane.addEventFilter(NavigationContentEvent.UPDATE_EVENT,
e -> {
if (e.getContentType() ==
NavigationContentEvent.TYPE_HOLIDAY_CONTENT) {
_stackPane.getChildren().clear();
_stackPane.getChildren().add(Util
.getFxmlNode(
Constants.RES_FXML_CONTENT_HOLIDAYS));
}
});
}
public void onTabClick(ActionEvent actionEvent) {
Object source = actionEvent.getSource();
if (source == _btnAttendance) {
_stackPane.getChildren().clear();
_stackPane.getChildren().add(Util
.getFxmlNode(Constants.RES_FXML_CONTENT_ATTENDANCE));
}
else if (source == _btnEmployees) {
_stackPane.getChildren().clear();
_stackPane.getChildren().add(Util
.getFxmlNode(Constants.RES_FXML_CONTENT_EMPLOYEES));
}
else if(source == _btnHolidays) {
_stackPane.getChildren().clear();
_stackPane.getChildren().add(Util
.getFxmlNode(Constants.RES_FXML_CONTENT_HOLIDAYS));
}
}
@Override
public void handle(EmployeeItemEvent event) {
final int employeeId = event.getEmployeeId();
switch (event.getButtonType()) {
case EmployeeItemEvent.BUTTON_TYPE_ADD_EMPLOYEE:
_stackPane.getChildren().clear();
_stackPane.getChildren().add(Util.getFxmlNode(Constants
.RES_FXML_CONTENT_ADD_EMPLOYEE));
break;
case EmployeeItemEvent.BUTTON_TYPE_VIEW_EMPLOYEE:
_stackPane.getChildren().clear();
_stackPane.getChildren().add(Util.getFxmlNode(Constants
.RES_FXML_CONTENT_VIEW_EMPLOYEE,
c -> new ViewEmployeeContent(employeeId)));
break;
case EmployeeItemEvent.BUTTON_TYPE_EDIT_EMPLOYEE:
_stackPane.getChildren().clear();
_stackPane.getChildren().add(Util.getFxmlNode(Constants
.RES_FXML_CONTENT_EDIT_EMPLOYEE,
c -> new EditEmployeeContent(employeeId)));
break;
case EmployeeItemEvent.BUTTON_TYPE_BACK:
_stackPane.getChildren().clear();
_stackPane.getChildren().add(Util.getFxmlNode(Constants
.RES_FXML_CONTENT_EMPLOYEES));
break;
}
}
}
|
[
"muizhassan83@gmail.com"
] |
muizhassan83@gmail.com
|
a3de822cae59d2da3953cf241e01d1a8e09ed2b2
|
8e7854c4511b10ce35b459b73b412ddf8c554a08
|
/src/main/java/com/company/homemaking/consumer/entity/Coupon.java
|
611110a2abd404ba0051ec57f3607465c5cb2244
|
[] |
no_license
|
DongbinHu/homemaking
|
7959e0470838af0f276540a3b58cc1a3328047cf
|
5c611d3bf0b9810a27389890c702de261d23b9d1
|
refs/heads/main
| 2023-08-16T00:45:20.623127
| 2023-08-08T09:24:19
| 2023-08-08T09:24:19
| 263,874,923
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,625
|
java
|
package com.company.homemaking.consumer.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 优惠券表
* </p>
*
* @author liubangzi
* @since 2020-05-14
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_coupon")
public class Coupon extends Model<Coupon> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 名称
*/
private String name;
/**
* 面值
*/
private BigDecimal value;
/**
* 编码
*/
private String code;
/**
* 验证码
*/
private String checkCode;
/**
* 使用说明
*/
private String description;
/**
* 0-面值代金券/1-计次劵
*/
private Integer type;
/**
* 0-不可用/1-可用/2-已使用/3-已过期/4-已注销
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createDate;
/**
* 状态修改时间
*/
private LocalDateTime updateDate;
/**
* 是否删除(0正常/1已删除)
*/
private Boolean ifDelete;
@Override
protected Serializable pkVal() {
return this.id;
}
}
|
[
"sixgodhu6@gmail.com"
] |
sixgodhu6@gmail.com
|
72342980438ae088f9ad3f1b69778dae1860b8f1
|
5eb46de06d5ade1bc4b9d49e7714367b08446351
|
/gateway-limiter/src/test/java/org/cay/springcloud/gatewaylimiter/GatewayLimiterApplicationTests.java
|
540901cde34e86eb2d93c36bc97525677e4e3f6a
|
[] |
no_license
|
zadpp1984/springclouddemo
|
280d2bc347c13abafe5cc05e0356395560bb2011
|
af1be472b72c99af192b54eafa5110d76fca8aa0
|
refs/heads/master
| 2020-06-11T18:40:26.694998
| 2019-06-27T08:02:30
| 2019-06-27T08:02:30
| 194,049,206
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 368
|
java
|
package org.cay.springcloud.gatewaylimiter;
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 GatewayLimiterApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"zadpp1984@163.com"
] |
zadpp1984@163.com
|
ebd33dcecbbb367fca11ba4045b4511b70be8be7
|
6b90ce34bebd599b62d558f2ac56f5e71e48501b
|
/src/spaceinvaders/impl/SpacesInvaders_aUnVaisseauImpl.java
|
d97642caff7ca66ba714031e31f4cf9229ea6d6c
|
[] |
no_license
|
LAVAL51/Anthony_spaceinvaders
|
2f1730ac23336fa6dae20e942e62c74837efad53
|
976553e769a0aaae75fd0f3434fa9983dc9b048a
|
refs/heads/master
| 2023-05-07T07:46:15.560785
| 2021-05-28T09:33:37
| 2021-05-28T09:33:37
| 355,587,426
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 883
|
java
|
/**
*/
package spaceinvaders.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import spaceinvaders.SpaceinvadersPackage;
import spaceinvaders.SpacesInvaders_aUnVaisseau;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Spaces Invaders aUn Vaisseau</b></em>'.
* <!-- end-user-doc -->
*
* @generated
*/
public class SpacesInvaders_aUnVaisseauImpl extends MinimalEObjectImpl.Container implements SpacesInvaders_aUnVaisseau {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SpacesInvaders_aUnVaisseauImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SpaceinvadersPackage.Literals.SPACES_INVADERS_AUN_VAISSEAU;
}
} //SpacesInvaders_aUnVaisseauImpl
|
[
"anthony.laval@etu.unilim.fr"
] |
anthony.laval@etu.unilim.fr
|
b7fb7163886b25bb2d23ac6e64a064e52e78d04a
|
7230fd8a96be77ed0a7fab54a7e33aeacdfdf524
|
/gateway/src/main/java/com/app/gateway/service/UsernameAlreadyUsedException.java
|
46d5f64232f4c621084f16965d479327ccd96478
|
[] |
no_license
|
doanxuantambk/medlatec
|
00c9b6d62d30145bcc0d21edd89eaf92a87220f9
|
6b7f0b50a8aaf063034ae60324a5b93c38772e87
|
refs/heads/master
| 2022-12-22T19:55:58.714383
| 2019-12-29T17:37:04
| 2019-12-29T17:37:04
| 228,631,005
| 0
| 0
| null | 2022-12-16T04:42:24
| 2019-12-17T14:12:07
|
Java
|
UTF-8
|
Java
| false
| false
| 200
|
java
|
package com.app.gateway.service;
public class UsernameAlreadyUsedException extends RuntimeException {
public UsernameAlreadyUsedException() {
super("Login name already used!");
}
}
|
[
"doanxuantam@gmail.com"
] |
doanxuantam@gmail.com
|
0e874aab3ef9be2b46ca427fa263e510f766d3c3
|
d66be5471ac454345de8f118ab3aa3fe55c0e1ee
|
/sandbox-apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/OfferingClientLiveTest.java
|
6c7751909e638df12cf8bdfd6ed110ca5ada4cb7
|
[
"Apache-2.0"
] |
permissive
|
adiantum/jclouds
|
3405b8daf75b8b45e95a24ff64fda6dc3eca9ed6
|
1cfbdf00f37fddf04249feedd6fc18ee122bdb72
|
refs/heads/master
| 2021-01-18T06:02:46.877904
| 2011-04-05T07:14:18
| 2011-04-05T07:14:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,966
|
java
|
/**
*
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* 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.jclouds.cloudstack.features;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import java.util.Set;
import org.jclouds.cloudstack.domain.DiskOffering;
import org.jclouds.cloudstack.domain.NetworkOffering;
import org.jclouds.cloudstack.domain.ServiceOffering;
import org.jclouds.cloudstack.domain.StorageType;
import org.jclouds.cloudstack.domain.TrafficType;
import org.jclouds.cloudstack.options.ListDiskOfferingsOptions;
import org.jclouds.cloudstack.options.ListNetworkOfferingsOptions;
import org.jclouds.cloudstack.options.ListServiceOfferingsOptions;
import org.testng.annotations.Test;
import com.google.common.collect.Iterables;
/**
* Tests behavior of {@code OfferingClient}
*
* @author Adrian Cole
*/
@Test(groups = "live", sequential = true, testName = "OfferingClientLiveTest")
public class OfferingClientLiveTest extends BaseCloudStackClientLiveTest {
public void testListDiskOfferings() throws Exception {
Set<DiskOffering> response = client.getOfferingClient().listDiskOfferings();
assert null != response;
long offeringCount = response.size();
assertTrue(offeringCount >= 0);
for (DiskOffering offering : response) {
DiskOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listDiskOfferings(
ListDiskOfferingsOptions.Builder.id(offering.getId())));
assertEquals(offering, newDetails);
assertEquals(offering, client.getOfferingClient().getDiskOffering(offering.getId()));
assert offering.getId() > 0 : offering;
assert offering.getName() != null : offering;
assert offering.getCreated() != null : offering;
assert offering.getDisplayText() != null : offering;
assert offering.getDiskSize() > 0 || (offering.getDiskSize() == 0 && offering.isCustomized()) : offering;
assert offering.getTags() != null : offering;
}
}
public void testListServiceOfferings() throws Exception {
Set<ServiceOffering> response = client.getOfferingClient().listServiceOfferings();
assert null != response;
long offeringCount = response.size();
assertTrue(offeringCount >= 0);
for (ServiceOffering offering : response) {
ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listServiceOfferings(
ListServiceOfferingsOptions.Builder.id(offering.getId())));
assertEquals(offering, newDetails);
assert offering.getId() > 0 : offering;
assert offering.getName() != null : offering;
assert offering.getCreated() != null : offering;
assert offering.getDisplayText() != null : offering;
assert offering.getCpuNumber() > 0 : offering;
assert offering.getCpuSpeed() > 0 : offering;
assert offering.getMemory() > 0 : offering;
assert offering.getStorageType() != null && StorageType.UNRECOGNIZED != offering.getStorageType() : offering;
assert offering.getTags() != null : offering;
}
}
public void testListNetworkOfferings() throws Exception {
Set<NetworkOffering> response = client.getOfferingClient().listNetworkOfferings();
assert null != response;
long offeringCount = response.size();
assertTrue(offeringCount >= 0);
for (NetworkOffering offering : response) {
NetworkOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listNetworkOfferings(
ListNetworkOfferingsOptions.Builder.id(offering.getId())));
assertEquals(offering, newDetails);
assertEquals(offering, client.getOfferingClient().getNetworkOffering(offering.getId()));
assert offering.getId() > 0 : offering;
assert offering.getName() != null : offering;
assert offering.getDisplayText() != null : offering;
assert offering.getMaxConnections() == null || offering.getMaxConnections() > 0 : offering;
assert offering.getTrafficType() != null && TrafficType.UNRECOGNIZED != offering.getTrafficType() : offering;
assert offering.getTags() != null : offering;
}
}
}
|
[
"adrian@jclouds.org"
] |
adrian@jclouds.org
|
2a6782d95a65fbc0ffb34a2b3db67790431d7f1b
|
7da2d12538ded6ba4f7c71c93a7e4aa1cafe44b1
|
/src/main/java/br/com/pedroyodasaito/softdesign/api/v1/controller/ContabilizaController.java
|
3ce9e1bee9c9a92998e511b8bd4afff5b1d87b16
|
[
"MIT"
] |
permissive
|
pysjabr77/softdesign
|
d13a91a522b4349f2cb37f5b9cd5a6c882621577
|
ab6f1ec045f6580b6b5ddef8ddf1ca1427991782
|
refs/heads/main
| 2023-06-26T18:11:00.863027
| 2021-07-26T23:58:13
| 2021-07-26T23:58:13
| 387,588,774
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 880
|
java
|
package br.com.pedroyodasaito.softdesign.api.v1.controller;
import br.com.pedroyodasaito.softdesign.api.v1.dto.contabiliza.ContabilizacaoDTO;
import br.com.pedroyodasaito.softdesign.service.ContabilizaService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/v1/contabiliza")
public class ContabilizaController {
private final ContabilizaService service;
public ContabilizaController(ContabilizaService service) {
this.service = service;
}
@GetMapping("{sessaoId}")
public ContabilizacaoDTO obterContabilizacaoDaVotacao(@PathVariable Integer sessaoId){
return service.contabilizarVotacao(sessaoId);
}
}
|
[
"pedro.saito@foton.la"
] |
pedro.saito@foton.la
|
e264847242a1cbefa74173f04fb0298c8e1e783b
|
b50cb4f1a1681ecf79c5fe6e58cc807708b1f772
|
/core/src/main/java/com/wuxp/payment/PlatformPaymentService.java
|
9c8de68789f74ea877938438631b32b6c347e5a8
|
[] |
no_license
|
fengwuxp/fengwuxp-payment-plugins
|
34d23a4c52a2aca21ab9f1eea0a38cbaf0a7e829
|
36fd73b97d6d40a2e5939167ccb35f878a40ba31
|
refs/heads/master
| 2020-12-15T14:54:19.295053
| 2020-07-15T07:03:36
| 2020-07-15T07:03:36
| 235,146,484
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 416
|
java
|
package com.wuxp.payment;
import com.wuxp.payment.model.PlatformPaymentIdentity;
/**
* 平台支付服务,不同的支付平台可以实现对应的接口
* @author wxup
*/
public interface PlatformPaymentService extends PlatformPaymentIdentity, PaymentPlugin, PaymentNotifyProcessor {
/**
* 是否启用
*
* @return
*/
default boolean isEnabled(){
return false;
};
}
|
[
"1109695647@qq.com"
] |
1109695647@qq.com
|
2120129f3d382807e59efa262ae2a7cc2d01d1e1
|
1a4770c215544028bad90c8f673ba3d9e24f03ad
|
/second/quark/src/main/java/com/bumptech/glide/b/d/a/d.java
|
39c071e0958157a7e981c1f086dbfcf34afd69b2
|
[] |
no_license
|
zhang1998/browser
|
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
|
4eee43a9d36ebb4573537eddb27061c67d84c7ba
|
refs/heads/master
| 2021-05-03T06:32:24.361277
| 2018-02-10T10:35:36
| 2018-02-10T10:35:36
| 120,590,649
| 8
| 10
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,940
|
java
|
package com.bumptech.glide.b.d.a;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.support.v4.os.e;
import android.util.Log;
import com.bumptech.glide.b.b.au;
import com.bumptech.glide.b.l;
import com.bumptech.glide.b.m;
import com.bumptech.glide.b.o;
import com.bumptech.glide.util.f;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/* compiled from: ProGuard */
public final class d implements o<Bitmap> {
public static final l<Integer> a = l.a("com.bumptech.glide.load.resource.bitmap.BitmapEncoder.CompressionQuality", Integer.valueOf(90));
public static final l<CompressFormat> b = l.a("com.bumptech.glide.load.resource.bitmap.BitmapEncoder.CompressionFormat");
private static boolean a(au<Bitmap> auVar, File file, m mVar) {
CompressFormat compressFormat;
boolean z;
Throwable th;
Bitmap bitmap = (Bitmap) auVar.b();
CompressFormat compressFormat2 = (CompressFormat) mVar.a(b);
if (compressFormat2 != null) {
compressFormat = compressFormat2;
} else if (bitmap.hasAlpha()) {
compressFormat = CompressFormat.PNG;
} else {
compressFormat = CompressFormat.JPEG;
}
e.a("encode: [" + bitmap.getWidth() + "x" + bitmap.getHeight() + "] " + compressFormat);
try {
long a = f.a();
int intValue = ((Integer) mVar.a(a)).intValue();
OutputStream fileOutputStream;
try {
fileOutputStream = new FileOutputStream(file);
try {
bitmap.compress(compressFormat, intValue, fileOutputStream);
fileOutputStream.close();
try {
fileOutputStream.close();
z = true;
} catch (IOException e) {
z = true;
}
} catch (IOException e2) {
try {
Log.isLoggable("BitmapEncoder", 3);
if (fileOutputStream == null) {
z = false;
} else {
try {
fileOutputStream.close();
z = false;
} catch (IOException e3) {
z = false;
}
}
if (Log.isLoggable("BitmapEncoder", 2)) {
new StringBuilder("Compressed with type: ").append(compressFormat).append(" of size ").append(com.bumptech.glide.util.l.a(bitmap)).append(" in ").append(f.a(a)).append(", options format: ").append(mVar.a(b)).append(", hasAlpha: ").append(bitmap.hasAlpha());
}
e.a();
return z;
} catch (Throwable th2) {
th = th2;
if (fileOutputStream != null) {
try {
fileOutputStream.close();
} catch (IOException e4) {
}
}
throw th;
}
}
} catch (IOException e5) {
fileOutputStream = null;
Log.isLoggable("BitmapEncoder", 3);
if (fileOutputStream == null) {
fileOutputStream.close();
z = false;
} else {
z = false;
}
if (Log.isLoggable("BitmapEncoder", 2)) {
new StringBuilder("Compressed with type: ").append(compressFormat).append(" of size ").append(com.bumptech.glide.util.l.a(bitmap)).append(" in ").append(f.a(a)).append(", options format: ").append(mVar.a(b)).append(", hasAlpha: ").append(bitmap.hasAlpha());
}
e.a();
return z;
} catch (Throwable th3) {
th = th3;
fileOutputStream = null;
if (fileOutputStream != null) {
fileOutputStream.close();
}
throw th;
}
if (Log.isLoggable("BitmapEncoder", 2)) {
new StringBuilder("Compressed with type: ").append(compressFormat).append(" of size ").append(com.bumptech.glide.util.l.a(bitmap)).append(" in ").append(f.a(a)).append(", options format: ").append(mVar.a(b)).append(", hasAlpha: ").append(bitmap.hasAlpha());
}
e.a();
return z;
} catch (Throwable th4) {
e.a();
}
}
public final com.bumptech.glide.b.d a(m mVar) {
return com.bumptech.glide.b.d.TRANSFORMED;
}
}
|
[
"2764207312@qq.com"
] |
2764207312@qq.com
|
f1fc9afd620a52e121ff096b5147a24cc81bb799
|
c445642bc151f20c600e742d5cbee08b40b70eb6
|
/INDICIA/app/build/generated/not_namespaced_r_class_sources/debug/r/androidx/legacy/coreui/R.java
|
8d172bf969d0b30f5b57b47ca51a3c79ceac212c
|
[] |
no_license
|
nazmulkhanliton/INDICIA_Android_Project_Update
|
5050e64e2a6fc295ae7eb29b47b9652b308f400d
|
a785732af857f5705125a429ecd1051d02b0fb05
|
refs/heads/main
| 2023-08-27T01:23:50.252895
| 2021-10-11T13:19:04
| 2021-10-11T13:19:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 12,395
|
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.coreui;
public final class R {
private R() {}
public static final class attr {
private attr() {}
public static final int alpha = 0x7f040028;
public static final int coordinatorLayoutStyle = 0x7f0400a7;
public static final int font = 0x7f0400e8;
public static final int fontProviderAuthority = 0x7f0400ea;
public static final int fontProviderCerts = 0x7f0400eb;
public static final int fontProviderFetchStrategy = 0x7f0400ec;
public static final int fontProviderFetchTimeout = 0x7f0400ed;
public static final int fontProviderPackage = 0x7f0400ee;
public static final int fontProviderQuery = 0x7f0400ef;
public static final int fontStyle = 0x7f0400f0;
public static final int fontVariationSettings = 0x7f0400f1;
public static final int fontWeight = 0x7f0400f2;
public static final int keylines = 0x7f04011f;
public static final int layout_anchor = 0x7f040125;
public static final int layout_anchorGravity = 0x7f040126;
public static final int layout_behavior = 0x7f040127;
public static final int layout_dodgeInsetEdges = 0x7f040153;
public static final int layout_insetEdge = 0x7f04015c;
public static final int layout_keyline = 0x7f04015d;
public static final int statusBarBackground = 0x7f0401c4;
public static final int ttcIndex = 0x7f040228;
}
public static final class color {
private color() {}
public static final int notification_action_color_filter = 0x7f06006f;
public static final int notification_icon_bg_color = 0x7f060070;
public static final int ripple_material_light = 0x7f06007b;
public static final int secondary_text_default_material_light = 0x7f06007d;
}
public static final class dimen {
private dimen() {}
public static final int compat_button_inset_horizontal_material = 0x7f070053;
public static final int compat_button_inset_vertical_material = 0x7f070054;
public static final int compat_button_padding_horizontal_material = 0x7f070055;
public static final int compat_button_padding_vertical_material = 0x7f070056;
public static final int compat_control_corner_material = 0x7f070057;
public static final int compat_notification_large_icon_max_height = 0x7f070058;
public static final int compat_notification_large_icon_max_width = 0x7f070059;
public static final int notification_action_icon_size = 0x7f0700c5;
public static final int notification_action_text_size = 0x7f0700c6;
public static final int notification_big_circle_margin = 0x7f0700c7;
public static final int notification_content_margin_start = 0x7f0700c8;
public static final int notification_large_icon_height = 0x7f0700c9;
public static final int notification_large_icon_width = 0x7f0700ca;
public static final int notification_main_column_padding_top = 0x7f0700cb;
public static final int notification_media_narrow_margin = 0x7f0700cc;
public static final int notification_right_icon_size = 0x7f0700cd;
public static final int notification_right_side_padding_top = 0x7f0700ce;
public static final int notification_small_icon_background_padding = 0x7f0700cf;
public static final int notification_small_icon_size_as_large = 0x7f0700d0;
public static final int notification_subtext_size = 0x7f0700d1;
public static final int notification_top_pad = 0x7f0700d2;
public static final int notification_top_pad_large_text = 0x7f0700d3;
}
public static final class drawable {
private drawable() {}
public static final int notification_action_background = 0x7f080089;
public static final int notification_bg = 0x7f08008a;
public static final int notification_bg_low = 0x7f08008b;
public static final int notification_bg_low_normal = 0x7f08008c;
public static final int notification_bg_low_pressed = 0x7f08008d;
public static final int notification_bg_normal = 0x7f08008e;
public static final int notification_bg_normal_pressed = 0x7f08008f;
public static final int notification_icon_background = 0x7f080090;
public static final int notification_template_icon_bg = 0x7f080091;
public static final int notification_template_icon_low_bg = 0x7f080092;
public static final int notification_tile_bg = 0x7f080093;
public static final int notify_panel_notification_icon_bg = 0x7f080094;
}
public static final class id {
private id() {}
public static final int action_container = 0x7f0a002f;
public static final int action_divider = 0x7f0a0031;
public static final int action_image = 0x7f0a0032;
public static final int action_text = 0x7f0a0038;
public static final int actions = 0x7f0a0039;
public static final int async = 0x7f0a003f;
public static final int blocking = 0x7f0a0043;
public static final int bottom = 0x7f0a0044;
public static final int chronometer = 0x7f0a0057;
public static final int end = 0x7f0a0073;
public static final int forever = 0x7f0a007f;
public static final int icon = 0x7f0a008b;
public static final int icon_group = 0x7f0a008c;
public static final int info = 0x7f0a0091;
public static final int italic = 0x7f0a0093;
public static final int left = 0x7f0a0097;
public static final int line1 = 0x7f0a0098;
public static final int line3 = 0x7f0a0099;
public static final int none = 0x7f0a00b6;
public static final int normal = 0x7f0a00b7;
public static final int notification_background = 0x7f0a00b8;
public static final int notification_main_column = 0x7f0a00b9;
public static final int notification_main_column_container = 0x7f0a00ba;
public static final int right = 0x7f0a00c8;
public static final int right_icon = 0x7f0a00c9;
public static final int right_side = 0x7f0a00ca;
public static final int start = 0x7f0a00f1;
public static final int tag_transition_group = 0x7f0a00fc;
public static final int tag_unhandled_key_event_manager = 0x7f0a00fd;
public static final int tag_unhandled_key_listeners = 0x7f0a00fe;
public static final int text = 0x7f0a00ff;
public static final int text2 = 0x7f0a0100;
public static final int time = 0x7f0a011a;
public static final int title = 0x7f0a011b;
public static final int top = 0x7f0a011e;
}
public static final class integer {
private integer() {}
public static final int status_bar_notification_info_maxnum = 0x7f0b000f;
}
public static final class layout {
private layout() {}
public static final int notification_action = 0x7f0d003d;
public static final int notification_action_tombstone = 0x7f0d003e;
public static final int notification_template_custom_big = 0x7f0d0045;
public static final int notification_template_icon_group = 0x7f0d0046;
public static final int notification_template_part_chronometer = 0x7f0d004a;
public static final int notification_template_part_time = 0x7f0d004b;
}
public static final class string {
private string() {}
public static final int status_bar_notification_info_overflow = 0x7f11002d;
}
public static final class style {
private style() {}
public static final int TextAppearance_Compat_Notification = 0x7f120116;
public static final int TextAppearance_Compat_Notification_Info = 0x7f120117;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f120119;
public static final int TextAppearance_Compat_Notification_Time = 0x7f12011c;
public static final int TextAppearance_Compat_Notification_Title = 0x7f12011e;
public static final int Widget_Compat_NotificationActionContainer = 0x7f1201c8;
public static final int Widget_Compat_NotificationActionText = 0x7f1201c9;
public static final int Widget_Support_CoordinatorLayout = 0x7f1201f8;
}
public static final class styleable {
private styleable() {}
public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f040028 };
public static final int ColorStateListItem_android_color = 0;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_alpha = 2;
public static final int[] CoordinatorLayout = { 0x7f04011f, 0x7f0401c4 };
public static final int CoordinatorLayout_keylines = 0;
public static final int CoordinatorLayout_statusBarBackground = 1;
public static final int[] CoordinatorLayout_Layout = { 0x10100b3, 0x7f040125, 0x7f040126, 0x7f040127, 0x7f040153, 0x7f04015c, 0x7f04015d };
public static final int CoordinatorLayout_Layout_android_layout_gravity = 0;
public static final int CoordinatorLayout_Layout_layout_anchor = 1;
public static final int CoordinatorLayout_Layout_layout_anchorGravity = 2;
public static final int CoordinatorLayout_Layout_layout_behavior = 3;
public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4;
public static final int CoordinatorLayout_Layout_layout_insetEdge = 5;
public static final int CoordinatorLayout_Layout_layout_keyline = 6;
public static final int[] FontFamily = { 0x7f0400ea, 0x7f0400eb, 0x7f0400ec, 0x7f0400ed, 0x7f0400ee, 0x7f0400ef };
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 = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f0400e8, 0x7f0400f0, 0x7f0400f1, 0x7f0400f2, 0x7f040228 };
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;
public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 };
public static final int GradientColor_android_startColor = 0;
public static final int GradientColor_android_endColor = 1;
public static final int GradientColor_android_type = 2;
public static final int GradientColor_android_centerX = 3;
public static final int GradientColor_android_centerY = 4;
public static final int GradientColor_android_gradientRadius = 5;
public static final int GradientColor_android_tileMode = 6;
public static final int GradientColor_android_centerColor = 7;
public static final int GradientColor_android_startX = 8;
public static final int GradientColor_android_startY = 9;
public static final int GradientColor_android_endX = 10;
public static final int GradientColor_android_endY = 11;
public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 };
public static final int GradientColorItem_android_color = 0;
public static final int GradientColorItem_android_offset = 1;
}
}
|
[
"liton079@gmail.com"
] |
liton079@gmail.com
|
5fb2690ce57641e3123816e0bbbe2ad5488044ab
|
e18ef8c77bb505cd3aba4b5658d75e7db94c108d
|
/real-world application/jigsaw/.svn/pristine/5f/5fb2690ce57641e3123816e0bbbe2ad5488044ab.svn-base
|
93c4e39edc27e653673a865933c4a07168d4ed72
|
[
"BSD-3-Clause",
"NCSA",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] |
permissive
|
huangshiyou/JMCR
|
54416032536d37d860f3fdb68d57b527c81fe838
|
814cc5d7684762cbe7e2ad4b4de8ec4f9f7bf5e7
|
refs/heads/master
| 2021-01-20T22:12:05.484099
| 2018-05-14T21:46:13
| 2018-05-14T21:46:13
| 101,805,192
| 1
| 0
| null | 2017-12-01T23:27:59
| 2017-08-29T20:43:15
|
Java
|
UTF-8
|
Java
| false
| false
| 10,513
|
// PushCacheFilter.java
// $Id: PushCacheFilter.java,v 1.2 2010/06/15 17:53:11 smhuang Exp $
// (c) COPYRIGHT MIT, INRIA and Keio, 2001.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.www.protocol.http.cache.push;
import java.net.URL;
import org.w3c.www.http.HTTP;
import org.w3c.www.protocol.http.Reply;
import org.w3c.www.protocol.http.Request;
import org.w3c.www.protocol.http.HttpException;
import org.w3c.www.protocol.http.HttpManager;
import org.w3c.www.protocol.http.PropRequestFilterException;
import org.w3c.www.protocol.http.cache.CacheFilter;
import org.w3c.www.protocol.http.cache.CacheSweeper;
import org.w3c.www.protocol.http.cache.CachedResource;
import org.w3c.www.protocol.http.cache.EntityCachedResource;
import org.w3c.www.protocol.http.cache.InvalidCacheException;
import org.w3c.www.protocol.http.cache.CacheState;
import org.w3c.www.protocol.http.cache.CacheValidator;
import org.w3c.www.protocol.http.cache.CacheSerializer;
import org.w3c.www.protocol.http.cache.ActiveStream;
/**
* PushCacheFilter
* Based heavily on (much code stolen from) CacheFilter
* The important differences are in the initialization where the
* PushCacheListener is started, and in ingoingFilter where if
* the requested resource is present in the cache and is a PUSH
* resource, then the resource is returned immediately without
* checking for expiry etc. This allows us to insert pages from
* "virtual" web sites such as http://www.push.data/sensor1.html
*
* @author Paul Henshaw, The Fantastic Corporation, Paul.Henshaw@fantastic.com
* @version $Revision: 1.2 $
* $Id: PushCacheFilter.java,v 1.2 2010/06/15 17:53:11 smhuang Exp $
*/
public class PushCacheFilter extends CacheFilter {
/**
* Property name used to acquire port number for {@link PushCacheListener}
* value is "org.w3c.www.protocol.http.cache.push.portnumber";
*/
public static final String PORT_NUM_P =
"org.w3c.www.protocol.http.cache.push.portnumber";
/**
* Default port number to use if property value is not supplied
* value is 9876
*/
public static final int DEFAULT_PORT_NUM=9876;
/**
* Access to PushCacheStore
*/
public PushCacheStore getPushCacheStore() {
return((PushCacheStore)super.getStore());
}
/**
* check if we can use the cache or not for this request
* It marks the request as being not cachable if false.
* @param a request, the incoming client-side request
* @return a boolean, true if we can use the cache
*/
public boolean canUseCache(Request req) {
return true;
}
/**
* The request pre-processing hook.
* Before each request is launched, all filters will be called back through
* this method. They will generally set up additional request header
* fields to enhance the request.
* @param request The request that is about to be launched.
* @return An instance of Reply if the filter could handle the request,
* or <strong>null</strong> if processing should continue normally.
* @exception HttpException If the filter is supposed to fulfill the
* request, but some error happened during that processing.
*/
public Reply ingoingFilter(Request request) throws HttpException {
// can we use the cache?
if (!canUseCache(request)) {
if (debug) {
trace(request, "*** Can't use cache");
}
// we will invalidate this resource, will do that only
// on real entity resource, not on negotiated ones
if (connected) {
CachedResource res = null;
EntityCachedResource invalidRes = null;
try {
String requrl = request.getURL().toExternalForm();
res = store.getCachedResourceReference(requrl);
if (res != null) {
invalidRes = (EntityCachedResource)
res.lookupResource(request);
}
} catch (InvalidCacheException ex) {
invalidRes = null;
}
if (invalidRes != null) {
invalidRes.setWillRevalidate(true);
}
request.setState(STATE_NOCACHE, Boolean.TRUE);
return null;
} else {
// disconnected, abort now!
Reply reply = request.makeReply(HTTP.GATEWAY_TIMEOUT);
reply.setContent("The cache cannot be use for "
+ "<p><code>"+request.getMethod()+"</code> "
+ "<strong>"+request.getURL()+"</strong>"
+ ". <p>It is disconnected.");
return reply;
}
}
// let's try to get the resource!
String requrl = request.getURL().toExternalForm();
// in the pre-cache, wait for full download
// FIXME should be better than this behaviour...
// see EntityCachedResource perform's FIXME ;)
if (precache.containsKey(requrl)) {
if (debug)
System.out.println("*** Already downloading: "+ requrl);
try {
CachedResource cr = (CachedResource)precache.get(requrl);
return cr.perform(request);
} catch (Exception ex) {
// there was a problem with the previous request,
// it may be better to do it by ourself
}
}
CachedResource res = null;
try {
res = store.getCachedResourceReference(requrl);
} catch (InvalidCacheException ex) {
res = null;
}
// Is this a push resource ?
try {
if(PushCacheManager.instance().isPushResource(res)) {
EntityCachedResource ecr=(EntityCachedResource)
res.lookupResource(request);
if(ecr!=null) {
Reply reply = ecr.perform(request);
return reply;
}
}
}
catch(Exception e) {
e.printStackTrace();
}
// /PSLH
// are we disconnected?
if (request.checkOnlyIfCached() || !connected ) {
// and no entries...
EntityCachedResource ecr = null;
if (res != null) {
ecr = (EntityCachedResource) res.lookupResource(request);
}
if ((res == null) || (ecr == null)) {
if ( debug )
trace(request, "unavailable (disconnected).");
Reply reply = request.makeReply(HTTP.GATEWAY_TIMEOUT);
reply.setContent("The cache doesn't have an entry for "
+ "<p><strong>"+request.getURL()+"</strong>"
+ ". <p>And it is disconnected.");
return reply;
}
// yeah!
if (debug) {
trace(request, (connected) ? " hit - only if cached" :
" hit while disconneced" );
}
if (!validator.isValid(ecr, request)) {
addWarning(request, WARN_STALE);
}
addWarning(request, WARN_DISCONNECTED);
Reply reply = ecr.perform(request);
// Add any warnings collected during processing to the reply:
setWarnings(request, reply);
//FIXME request.setState(STATE_HOW, HOW_HIT);
return reply;
}
// in connected mode, we should now take care of revalidation and such
if (res != null) {
// if not fully loaded, ask for a revalidation FIXME
if ((res.getLoadState() == CachedResource.STATE_LOAD_PARTIAL) ||
(res.getLoadState() == CachedResource.STATE_LOAD_ERROR)) {
setRequestRevalidation(res, request);
return null;
}
if ( validator.isValid(res, request) ) {
try {
store.updateResourceGeneration(res);
} catch (InvalidCacheException ex) {
// should be ok so...
}
//FIXME request.setState(STATE_HOW, HOW_HIT);
Reply rep = res.perform(request);
return rep;
} else {
if (debug) {
System.out.println("*** Revalidation asked for " + requrl);
}
// ask for a revalidation
setRequestRevalidation(res, request);
return null;
}
}
// lock here while we are waiting for the download
while (uritable.containsKey(requrl)) {
synchronized (uritable) {
try {
uritable.wait();
} catch (InterruptedException ex) {}
}
if (precache.containsKey(requrl)) {
if (debug)
System.out.println("*** Already downloading: "+ requrl);
CachedResource cr = (CachedResource)precache.get(requrl);
return cr.perform(request);
}
uritable.put(requrl, requrl);
}
return null;
}
/**
* Almost identical to CacheFilter.initialize, but creates a
* PushCacheStore instead of a CacheStore and additionaly
* starts the PushCacheListener
*/
public void initialize(HttpManager manager)
throws PropRequestFilterException
{
try {
String validator_c;
String sweeper_c;
String serializer_c;
props = manager.getProperties();
shared = props.getBoolean(SHARED_P, false);
connected = props.getBoolean(CACHE_CONNECTED_P, true);
debug = props.getBoolean(DEBUG_P, false);
// now create the add-on classes
validator_c = props.getString(VALIDATOR_P,
"org.w3c.www.protocol.http.cache.SimpleCacheValidator");
sweeper_c = props.getString(SWEEPER_P,
"org.w3c.www.protocol.http.cache.SimpleCacheSweeper");
serializer_c = props.getString(SERIALIZER_P,
"org.w3c.www.protocol.http.cache.SimpleCacheSerializer");
try {
Class c;
c = Class.forName(validator_c);
validator = (CacheValidator) c.newInstance();
//Added by Jeff Huang
//TODO: FIXIT
validator.initialize(this);
c = Class.forName(sweeper_c);
sweeper = (CacheSweeper) c.newInstance();
sweeper.initialize(this);
c = Class.forName(serializer_c);
serializer = (CacheSerializer) c.newInstance();
} catch (Exception ex) {
// a fatal error! The cache won't be loaded...
ex.printStackTrace();
throw new PropRequestFilterException("Unable to start cache");
}
// now create the store as we have the basic things here
store = new PushCacheStore();
try {
store.initialize(this);
} catch (InvalidCacheException ex) {
// hum no worky, should do some action there!
if (debug) {
ex.printStackTrace();
}
}
// now start the sweeper
sweeper.start();
// Start the ActiveStream handler:
ActiveStream.initialize();
// Register for property changes:
props.registerObserver(this);
// Now, we are ready, register that filter:
manager.setFilter(this);
//
// Create and start a PushCacheListener
//
int portNum=props.getInteger(PORT_NUM_P,DEFAULT_PORT_NUM);
PushCacheListener listener=new PushCacheListener(portNum);
listener.start();
//
// Register this filter with the PushCacheManager
//
PushCacheManager.instance().registerFilter(this);
}
catch(Exception e) {
e.printStackTrace();
}
}
}
|
[
"huangsy@tamu.edu"
] |
huangsy@tamu.edu
|
|
a53149e20b10c23e7d6696955cca596bb58a5d87
|
01e6d1818d905cec5e57644b791ed4d8344bd4f4
|
/app/src/main/java/com/haohao/xubei/ui/module/user/contract/UserPayContract.java
|
680ad22462f8daa1905741e715a5cb4b9fc3cfe7
|
[] |
no_license
|
tracyly/XuBei
|
672ee01ab716107893410a677f0a11c8f3ed7b14
|
a637719b9191c436a3da223f17cb7f8437de06ed
|
refs/heads/master
| 2022-10-20T18:41:31.680719
| 2020-06-15T12:08:03
| 2020-06-15T12:08:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 483
|
java
|
package com.haohao.xubei.ui.module.user.contract;
import com.haohao.xubei.ui.module.base.IABaseContract;
import java.util.ArrayList;
/**
* 订单支付
* date:2017/12/4 14:58
* author:Seraph
*
**/
public interface UserPayContract extends IABaseContract {
interface View extends IBaseView {
void selectPayType(String payType);
void initView(ArrayList<String> amountList);
}
abstract class Presenter extends ABasePresenter<View> {
}
}
|
[
"xvjun@haotang365.com.cn"
] |
xvjun@haotang365.com.cn
|
80f3ba677854cd840264f970e3ae289c818e959c
|
21a7663c063e29eb94fc08354acf300dcca801a1
|
/NorthDakota/src/org/one2team/highcharts/server/JSMLabels.java
|
b444f43ab2dccf147ee7d7fea14dbb349f131950
|
[
"Apache-2.0"
] |
permissive
|
nabind/prism_test
|
91c9279aa23708ab29c9bac45f829a84f545e612
|
9b42b56cd3c108e8d4664aad4b96ed2c7d0f8e97
|
refs/heads/master
| 2020-06-18T17:56:19.875694
| 2016-11-29T23:44:10
| 2016-11-29T23:44:10
| 75,132,070
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,490
|
java
|
package org.one2team.highcharts.server;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.one2team.highcharts.shared.Labels;
import org.one2team.highcharts.shared.Style;
import org.one2team.utils.JSMArray;
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(namespace="chart-options")
public class JSMLabels extends JSMBaseObject implements Labels {
public JSMLabels () {
}
@SuppressWarnings("unchecked")
@XmlTransient
public JSMArray<Items> getItems () {
if (items == null)
items = new JSMArray<Items> ();
return (JSMArray<Items>) items;
}
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(namespace="labels")
public static class JSMItems implements Items {
public JSMItems () {
this.style = new JSMStyle ();
}
public String getHtml () {
return this.html;
}
public Items setHtml (String html) {
this.html = html;
return this;
}
public Style getStyle () {
return style;
}
public Items center (int centerPosition, double top) {
getStyle ().setProperty ("left", centerPosition - (getHtml ().length () * 6) / 2 + "px");
getStyle ().setProperty ("top", top + "px");
return this;
}
private String html;
private Style style;
}
@XmlTransient
private Object items;
}
|
[
"amit.dhara@ctb.com"
] |
amit.dhara@ctb.com
|
9d2a2db7d08ad2b45ec6d5695614b1d8a9fa864b
|
bc6186f609e99fc22840ae2282efa45fc7257145
|
/petstore/petstore-api/src/main/java/com/demo/PetstoreApi.java
|
48534083c0c71f92981fb997157833598c24536d
|
[] |
no_license
|
tayaee/learning
|
f19052a2b4ddfa9210580ff0c3114024ac8ba935
|
c93ca384b18ace94a250e60af5f5c34f9917e747
|
refs/heads/master
| 2020-03-17T22:37:35.820204
| 2018-06-04T01:55:39
| 2018-06-04T01:55:39
| 134,011,813
| 0
| 0
| null | 2018-05-20T06:16:10
| 2018-05-18T23:06:32
| null |
UTF-8
|
Java
| false
| false
| 393
|
java
|
package com.demo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PetstoreApi {
static final String VERSION = "v2";
private static Logger LOGGER = LoggerFactory.getLogger(PetstoreApi.class);
static String getVersion() {
return VERSION;
}
public static void main(String[] args) {
LOGGER.info("Hello World " + getVersion());
}
}
|
[
"soonki.ji@gmail.com"
] |
soonki.ji@gmail.com
|
1e180f80ede2af62e4c11a5edbeb3a03ad4e554d
|
fbe57162b93d834e559f259424b79d514122fa51
|
/src/main/java/th/ac/kmitl/atm/DataSourceDB.java
|
71c47a6b3a12616676a959f3e1185750990bf508
|
[] |
no_license
|
Panida-Ths/atm-spring-annotation
|
635bd72f1b8378148a67402e91cbf3b1616d2e32
|
ac5a1b01a7d75bbf4058c65de0c85938c2431b00
|
refs/heads/master
| 2022-12-24T02:04:15.639498
| 2020-10-09T09:48:53
| 2020-10-09T09:48:53
| 302,599,795
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 577
|
java
|
package th.ac.kmitl.atm;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
@Component
public class DataSourceDB implements DataSource {
public Map<Integer,Customer> readCustomers() {
Map<Integer,Customer> customers = new HashMap<>();
customers.put(1,new Customer(1,"Peter",1234,1000));
customers.put(2,new Customer(2,"Katherine",2345,2000));
customers.put(3,new Customer(3,"Chris",3456,3000));
return customers;
}
}
|
[
"61050851@kmitl.ac.th"
] |
61050851@kmitl.ac.th
|
aa6ba71bb8b4d2f2a7d635be1a1586dcf71a6a51
|
bf475ac367e6e8948a080ddf97fe18533524f7b3
|
/app/src/main/java/com/example/android/instantloan/ContactUs.java
|
561a62d6e12ce91d3889be9ba11b31085577d6c9
|
[] |
no_license
|
munthamaduguabdulkhadeer/MoneyLending
|
209822d1d58a72e2b20817ac180acbc75dd4f323
|
1da1a712744e25f1ca5786c8a085524fb435a814
|
refs/heads/master
| 2020-11-25T23:39:07.881279
| 2019-12-18T17:41:17
| 2019-12-18T17:41:17
| 228,891,613
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 347
|
java
|
package com.example.android.instantloan;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class ContactUs extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_contact_us);
}
}
|
[
"mdakhadeer98@gmail.com"
] |
mdakhadeer98@gmail.com
|
624d572530c6033441933d2d675ecaabfc9bb623
|
6d6fe7d140bcc1841633e543e1ac70fbe4f3ef63
|
/Practica_4_EXTRA/garciavian0Extra/practicaExtra/src/icc/impresoraBinaria/ImpresoraBinaria.java
|
c7240a24debec48227ca66240cf9a3fad516b4f5
|
[] |
no_license
|
IanGarciaUnam/EndSemester
|
1d8bdb7ff2f65fa4bea15144a19897c64e17902b
|
142994e2ce0518612986f339c76e4091574a92c5
|
refs/heads/master
| 2022-04-01T18:13:41.291016
| 2020-01-12T19:04:57
| 2020-01-12T19:04:57
| 224,110,691
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 524
|
java
|
package icc.impresoraBinaria;
/**
*
* @author IanGarcia
*/
public class ImpresoraBinaria{
private ImpresoraBinaria(){}
/**
* Imprime un numero en bits
* @param i numero a imprimir.
*/
public static void imprime(int i){
System.out.println(Integer.toBinaryString(i));
}
/**
* Imprime un numero en bits
* @param d numero a imprimir.
*/
public static void imprime(double d){
System.out.println(Long.toBinaryString(Double.doubleToLongBits(d)));
}
}
|
[
"iangarcia@ciencias.unam.mx"
] |
iangarcia@ciencias.unam.mx
|
17c7ff2b052ed090ed8de3d0444b9eeae7b606cf
|
840d3b0052743882665b5a450104fdd9f3014a2f
|
/JAVA/maps/src/com/ustglobal/maps/Student.java
|
52a580bccba169b71f4ae15614f15bee2c9c4bf9
|
[] |
no_license
|
apoorva-1997/USTGlobal-16Sep19-Apoorva-N
|
8c0fcf96648df332762d6ca42174fda9f007b039
|
b3a1d7e144714df7eb08c024b009ce1ebdcc1c03
|
refs/heads/master
| 2023-01-23T16:14:51.603522
| 2019-12-21T13:21:18
| 2019-12-21T13:21:18
| 215,540,109
| 1
| 0
| null | 2023-01-07T17:57:17
| 2019-10-16T12:14:44
|
CSS
|
UTF-8
|
Java
| false
| false
| 224
|
java
|
package com.ustglobal.maps;
public class Student {
int id;
String name;
double marks;
public Student(int id, String name, double marks) {
super();
this.id = id;
this.name = name;
this.marks = marks;
}
}
|
[
"apoorvan84@gmail.com"
] |
apoorvan84@gmail.com
|
eb205c44eb18c465712440d726081edc9bb25493
|
085df6882712fe8c345fb943ce418ceb399461a1
|
/app/src/main/java/com/imagecompressor/imagecompressor/MainActivity.java
|
507e85d1081ba91c0d067c44f198ce32ffffdce9
|
[] |
no_license
|
shikha1992/ImageCompressor
|
25f30ac65d5ae5da730ee61537a2a12f439d98d7
|
e5b5ef9a5609741625049d57e0ec9ae9abc9237a
|
refs/heads/master
| 2020-08-09T15:00:31.352970
| 2019-10-10T07:05:45
| 2019-10-10T07:05:45
| 214,111,287
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 15,093
|
java
|
package com.imagecompressor.imagecompressor;
import android.Manifest;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.amazonaws.mobileconnectors.s3.transferutility.TransferListener;
import com.amazonaws.mobileconnectors.s3.transferutility.TransferObserver;
import com.amazonaws.mobileconnectors.s3.transferutility.TransferState;
import com.amazonaws.mobileconnectors.s3.transferutility.TransferUtility;
import org.json.JSONException;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import id.zelory.compressor.Compressor;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
// import id.zelory.compressor.Compressor;
// import io.reactivex.android.schedulers.AndroidSchedulers;
// import io.reactivex.schedulers.Schedulers;
public class MainActivity extends AppCompatActivity {
private static final int PICK_IMAGE_REQUEST = 1;
private ImageView actualImageView;
private ImageView compressedImageView;
private TextView actualSizeTextView;
private TextView compressedSizeTextView;
private File actualImage;
private File compressedImage;
TransferObserver observerthumb_user=null;
ProgressDialog progressDialog;
private TransferUtility transferUtility;
Util util;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
util = new Util();
transferUtility = util.getTransferUtility(this);
actualImageView = (ImageView) findViewById(R.id.actual_image);
compressedImageView = (ImageView) findViewById(R.id.compressed_image);
actualSizeTextView = (TextView) findViewById(R.id.actual_size);
compressedSizeTextView = (TextView) findViewById(R.id.compressed_size);
actualImageView.setBackgroundColor(getRandomColor());
clearImage();
}
public void chooseImage(View view) {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
//
// String messagesPermission1 = Manifest.permission.CAMERA;
//
// String messagesPermission2 = Manifest.permission.READ_EXTERNAL_STORAGE;
// String messagesPermission3 = Manifest.permission.WRITE_EXTERNAL_STORAGE;
// int hasaccesslocation4 = checkSelfPermission(messagesPermission1);
// int hasaccesslocation3 = checkSelfPermission(messagesPermission2);
// int hasaccesslocation2 =checkSelfPermission(messagesPermission3);
//
// List<String> permissions = new ArrayList<String>();
// if (hasaccesslocation4 != PackageManager.PERMISSION_GRANTED ||hasaccesslocation3 != PackageManager.PERMISSION_GRANTED ||hasaccesslocation2 != PackageManager.PERMISSION_GRANTED ) {
// requestPermissions(new String[]{Manifest.permission.CAMERA,Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
//
// return;
// }
// }
// else {
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
startActivityForResult(intent, PICK_IMAGE_REQUEST);
// }
}
public void compressImage(View view) {
if (actualImage == null) {
showError("Please choose an image!");
} else {
// Compress image in main thread
//compressedImage = new Compressor(this).compressToFile(actualImage);
//setCompressedImage();
// Compress image to bitmap in main thread
//compressedImageView.setImageBitmap(new Compressor(this).compressToBitmap(actualImage));
// Compress image using RxJava in background thread
new Compressor(this)
.compressToFileAsFlowable(actualImage)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<File>() {
@Override
public void accept(File file) {
compressedImage = file;
setCompressedImage();
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) {
throwable.printStackTrace();
showError(throwable.getMessage());
}
});
}
}
public void customCompressImage(View view) {
if (actualImage == null) {
showError("Please choose an image!");
} else {
// Compress image in main thread using custom Compressor
try {
compressedImage = new Compressor(this)
.setMaxWidth(640)
.setMaxHeight(480)
.setQuality(50)
.setCompressFormat(Bitmap.CompressFormat.WEBP)
.setDestinationDirectoryPath(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES).getAbsolutePath())
.compressToFile(actualImage);
setCompressedImage();
} catch (IOException e) {
e.printStackTrace();
showError(e.getMessage());
}
// Compress image using RxJava in background thread with custom Compressor
/*new Compressor(this)
.setMaxWidth(640)
.setMaxHeight(480)
.setQuality(75)
.setCompressFormat(Bitmap.CompressFormat.WEBP)
.setDestinationDirectoryPath(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES).getAbsolutePath())
.compressToFileAsFlowable(actualImage)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<File>() {
@Override
public void accept(File file) {
compressedImage = file;
setCompressedImage();
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) {
throwable.printStackTrace();
showError(throwable.getMessage());
}
});*/
}
}
private void setCompressedImage() {
compressedImageView.setImageBitmap(BitmapFactory.decodeFile(compressedImage.getAbsolutePath()));
compressedSizeTextView.setText(String.format("Size : %s", getReadableFileSize(compressedImage.length())));
uploadThumbUserImg(compressedImage);
Toast.makeText(this, "Compressed image save in " + compressedImage.getPath(), Toast.LENGTH_LONG).show();
Log.d("Compressor", "Compressed image save in " + compressedImage.getPath());
}
private void clearImage() {
actualImageView.setBackgroundColor(getRandomColor());
compressedImageView.setImageDrawable(null);
compressedImageView.setBackgroundColor(getRandomColor());
compressedSizeTextView.setText("Size : -");
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK) {
if (data == null) {
showError("Failed to open picture!");
return;
}
try {
actualImage = FileUtil.from(this, data.getData());
actualImageView.setImageBitmap(BitmapFactory.decodeFile(actualImage.getAbsolutePath()));
actualSizeTextView.setText(String.format("Size : %s", getReadableFileSize(actualImage.length())));
clearImage();
} catch (IOException e) {
showError("Failed to read picture data!");
e.printStackTrace();
}
}
}
private Bitmap decodeFile(File f) {
Bitmap b = null;
//Decode image size
BitmapFactory.Options o = new BitmapFactory.Options();
o.inJustDecodeBounds = true;
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
BitmapFactory.decodeStream(fis, null, o);
fis.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
int IMAGE_MAX_SIZE = 1024;
int scale = 1;
if (o.outHeight > IMAGE_MAX_SIZE || o.outWidth > IMAGE_MAX_SIZE) {
scale = (int) Math.pow(2, (int) Math.ceil(Math.log(IMAGE_MAX_SIZE /
(double) Math.max(o.outHeight, o.outWidth)) / Math.log(0.5)));
}
//Decode with inSampleSize
BitmapFactory.Options o2 = new BitmapFactory.Options();
o2.inSampleSize = scale;
try {
fis = new FileInputStream(f);
b = BitmapFactory.decodeStream(fis, null, o2);
fis.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
// Log.d(TAG, "Width :" + b.getWidth() + " Height :" + b.getHeight());
File destFile = new File(Environment.getExternalStorageDirectory(),
System.currentTimeMillis() + ".png");
try {
FileOutputStream out = new FileOutputStream(destFile);
b.compress(Bitmap.CompressFormat.PNG, 100, out);
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
return b;
}
public void uploadThumbUserImg(File compressedImage) {
if(observerthumb_user!=null){
observerthumb_user.cleanTransferListener();
}
Bitmap bmp = decodeFile(compressedImage);
ByteArrayOutputStream out = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.JPEG, 50, out);
Bitmap decoded = BitmapFactory.decodeStream(new ByteArrayInputStream(out.toByteArray()));
if(decoded.getWidth()>1200)
{
decoded.compress(Bitmap.CompressFormat.JPEG, 50, out);
}
else {
decoded.compress(Bitmap.CompressFormat.JPEG, 80, out);
}
File destination = new File(Environment.getExternalStorageDirectory(),
System.currentTimeMillis() + ".jpg");
FileOutputStream fo;
try {
destination.createNewFile();
fo = new FileOutputStream(destination);
fo.write(out.toByteArray());
fo.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
observerthumb_user = transferUtility.upload("dailydeedclient", destination.getName(),
destination);
if(progressDialog!=null){
if(progressDialog.isShowing()){
progressDialog.dismiss();
}
}
progressDialog = new ProgressDialog(this);
progressDialog.setMax(100);
progressDialog.setMessage("Picture Uploading");
progressDialog.show();
progressDialog.setCancelable(true);
String file_key = observerthumb_user.getKey();
observerthumb_user.setTransferListener(new UploadListenerThumb(file_key));
}
private class UploadListenerThumb implements TransferListener {
String file_key_name = "";
public UploadListenerThumb( String file_key ) {
this.file_key_name = file_key;
}
// Simply updates the UI list when notified.
@Override
public void onError(int id, Exception e) {
Log.e("err1:", e.toString());
if(progressDialog!=null) {
progressDialog.dismiss();
}
observerthumb_user.cleanTransferListener();
}
@Override
public void onProgressChanged(int id, long bytesCurrent, long bytesTotal) {
}
@Override
public void onStateChanged(int id, TransferState newState) {
Log.e("state1: ",newState.toString());
if(newState.toString().equals("COMPLETED")) {
if(progressDialog!=null) {
progressDialog.dismiss();
}
// Log.e("key: ",(String) transferRecordMaps.get(pos).get("key"));
// Log.e("url1: ","https://s3-ap-southeast-1.amazonaws.com/beleadr/"+file_key_name);
String imagee = "https://s3.amazonaws.com/dailydeedclient/"+file_key_name;
Log.e("imageeee",imagee);
observerthumb_user.cleanTransferListener();
// try {
// uploadimage();
// } catch (JSONException e) {
// e.printStackTrace();
// }
}
}
}
public void showError(String errorMessage) {
Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT).show();
}
private int getRandomColor() {
Random rand = new Random();
return Color.argb(100, rand.nextInt(256), rand.nextInt(256), rand.nextInt(256));
}
public String getReadableFileSize(long size) {
if (size <= 0) {
return "0";
}
final String[] units = new String[]{"B", "KB", "MB", "GB", "TB"};
int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
}
}
|
[
"abhilasha.appsmaven@gmail.com"
] |
abhilasha.appsmaven@gmail.com
|
4f5e58e3b2e8d30478553614403502290d46e27c
|
62510fa67d0ca78082109a861b6948206252c885
|
/hihope_neptune-oh_hid/00_src/v0.3/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/number/CurrencyPrecision.java
|
c3727c6fcc30376422a2b353bd58b320c76df596
|
[
"Apache-2.0",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"ICU"
] |
permissive
|
dawmlight/vendor_oh_fun
|
a869e7efb761e54a62f509b25921e019e237219b
|
bc9fb50920f06cd4c27399f60076f5793043c77d
|
refs/heads/master
| 2023-08-05T09:25:33.485332
| 2021-09-10T10:57:48
| 2021-09-10T10:57:48
| 406,236,565
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,721
|
java
|
/* GENERATED SOURCE. DO NOT MODIFY. */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html#License
package ohos.global.icu.number;
import ohos.global.icu.util.Currency;
/**
* A class that defines a rounding strategy parameterized by a currency to be used when formatting
* numbers in NumberFormatter.
*
* <p>
* To create a CurrencyPrecision, use one of the factory methods on Precision.
*
* @see NumberFormatter
* @hide exposed on OHOS
*/
public abstract class CurrencyPrecision extends Precision {
/* package-private */ CurrencyPrecision() {
}
/**
* Associates a currency with this rounding strategy.
*
* <p>
* <strong>Calling this method is <em>not required</em></strong>, because the currency specified in
* unit() or via a CurrencyAmount passed into format(Measure) is automatically applied to currency
* rounding strategies. However, this method enables you to override that automatic association.
*
* <p>
* This method also enables numbers to be formatted using currency rounding rules without explicitly
* using a currency format.
*
* @param currency
* The currency to associate with this rounding strategy.
* @return A Precision for chaining or passing to the NumberFormatter rounding() setter.
* @throws IllegalArgumentException for null Currency
* @see NumberFormatter
*/
public Precision withCurrency(Currency currency) {
if (currency != null) {
return constructFromCurrency(this, currency);
} else {
throw new IllegalArgumentException("Currency must not be null");
}
};
}
|
[
"liu_xiyao@hoperun.com"
] |
liu_xiyao@hoperun.com
|
e0c00383d234e50b70c7f59e05dcbd7ee3265afb
|
c7fe7d0e49e82b3d80023a317a6abc8a60dd7526
|
/labs/lab3-paxos/src/dslabs/paxos/PaxosLogSlotStatus.java
|
a057ffcad5d8892e7969a0bf1e52677cb169ce00
|
[] |
no_license
|
louy2/dslabs-handout
|
ed389a79ef2d4876f20fe997aea3537f89ca89fa
|
2817e1d25e00201e0cad9a9ede64f669c057b528
|
refs/heads/master
| 2020-06-12T17:28:28.001620
| 2019-06-29T06:25:32
| 2019-06-29T06:26:23
| 194,372,203
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 361
|
java
|
package dslabs.paxos;
public enum PaxosLogSlotStatus {
EMPTY, // no command is known by the server for this slot
ACCEPTED, // a command has been tentatively accepted by this server
CHOSEN, // the server knows a command to be permanently chosen for this slot
CLEARED; // the command in this slot has been garbage-collected at the server
}
|
[
"loganlyf@gmail.com"
] |
loganlyf@gmail.com
|
ab41a27bd766d6ab589a48926d7c19d65a31a7cd
|
1c58a5cd41d9a2ee25502464087ef653bcc25109
|
/jedis/src/main/java/com/yl/test/TestDemo02.java
|
6f6190590432fff29c676a8f39ef9782d237c82c
|
[] |
no_license
|
yanlele1994/testcode
|
a98675f44da462411de75f955d71502106f60455
|
30aea487466f648b7fad2699167c3fbfd12f4a5c
|
refs/heads/master
| 2023-06-26T23:31:51.782877
| 2021-07-27T13:50:07
| 2021-07-27T13:50:07
| 389,978,313
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 524
|
java
|
package com.yl.test;
import com.yl.utils.RedisUtils;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
public class TestDemo02 {
public static void main(String[] args) {
JedisPool jedisPool = RedisUtils.open("192.168.195.128", 6379);
Jedis jedis = jedisPool.getResource();
jedis.flushDB();
String str1 = jedis.set("str1", "aaa");
System.out.println(str1);
String v = jedis.get("str1");
System.out.println(v);
jedis.close();
}
}
|
[
"zhangsan@qq.com"
] |
zhangsan@qq.com
|
250ce1d115f721a831e46d84521a8cde257d2d40
|
bbdc9ef799d0069bd72ca0374585dae2cad497bd
|
/cj_test/src/com/igeek/service/impl/SpecialServiceImpl.java
|
2c0b5da436481304198626722c5343b71545968c
|
[] |
no_license
|
xiaohe1008/chenProject
|
926c0011268c7b783fab91f3d6ec81434f2d8d46
|
f0f775a2b4a78ac0a98ba198739e71f47877d11e
|
refs/heads/master
| 2020-08-18T22:12:47.055736
| 2019-10-18T03:18:29
| 2019-10-18T03:18:29
| 215,840,340
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 739
|
java
|
package com.igeek.service.impl;
import java.util.List;
import com.igeek.dao.ISpecialDao;
import com.igeek.factory.DaoFactory;
import com.igeek.pojo.Special;
import com.igeek.service.ISpecialService;
/**
* 专辑的业务层实现类
* @author Administrator
*
*/
public class SpecialServiceImpl implements ISpecialService {
private ISpecialDao specialDao = DaoFactory.getProxyDao(ISpecialDao.class);
@Override
public List<Special> findAll() {
return specialDao.findAll();
}
@Override
public Special findById(int specialId) {
return specialDao.findById(specialId);
}
@Override
public List<Special> findByName(String specialName) {
return specialDao.findByName(specialName);
}
}
|
[
"53325710+xiaohe1008@users.noreply.github.com"
] |
53325710+xiaohe1008@users.noreply.github.com
|
0acea535d15e9b65f1303971049dcf540583f0f2
|
e0f032ca16b6398d810f194eae0479438b707cb0
|
/app/src/main/java/com/example/administrator/otostore/Activity/WalletChangeActivity.java
|
9c57f4743604e12c23fcf3a49435e4bee04800b0
|
[] |
no_license
|
liang979zhang/OTOStore
|
fe9350ff9f15238ed46000a94b52ec6fb3f3e583
|
fc5970b03e640c68fc116694ee43671888c1a31e
|
refs/heads/master
| 2020-03-27T10:08:03.442791
| 2018-08-28T05:44:54
| 2018-08-28T05:44:54
| 146,397,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 24,527
|
java
|
package com.example.administrator.otostore.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.adorkable.iosdialog.ActionSheetDialog;
import com.apkfuns.logutils.LogUtils;
import com.example.administrator.otostore.Bean.BankCarSelectBean;
import com.example.administrator.otostore.Bean.CategroyBean;
import com.example.administrator.otostore.Bean.MessageEvent;
import com.example.administrator.otostore.Bean.MyEventCode;
import com.example.administrator.otostore.Bean.SelectFriendsUserIdBean;
import com.example.administrator.otostore.R;
import com.example.administrator.otostore.RxJavaUtils.RetrofitHttpUtil;
import com.example.administrator.otostore.Utils.GsonUtil;
import com.example.administrator.otostore.Utils.MD5Utils;
import com.example.administrator.otostore.Utils.SPUtils;
import com.mchsdk.paysdk.retrofitutils.rxjava.observable.SchedulerTransformer;
import com.mchsdk.paysdk.retrofitutils.rxjava.observer.BaseObserver;
import org.greenrobot.eventbus.EventBus;
import java.math.BigDecimal;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class WalletChangeActivity extends BaseActivity {
@BindView(R.id.jinfenduihuanpas)
EditText jinfenduihuanpas;
@BindView(R.id.jinfenduihuaninput)
EditText jinfenduihuaninput;
@BindView(R.id.jifenduihuanok)
Button jifenduihuanok;
@BindView(R.id.jinfenduihuan)
LinearLayout jinfenduihuan;
@BindView(R.id.jinfenzhuanzhanguser)
TextView jinfenzhuanzhanguser;
@BindView(R.id.jinfenzhuanzhangpas)
EditText jinfenzhuanzhangpas;
@BindView(R.id.jinfenzhuanzhanginput)
EditText jinfenzhuanzhanginput;
@BindView(R.id.jinfenzhuanzhangremark)
EditText jinfenzhuanzhangremark;
@BindView(R.id.jinfenzhuanzhangok)
Button jinfenzhuanzhangok;
@BindView(R.id.jinfenzhuanzhang)
LinearLayout jinfenzhuanzhang;
@BindView(R.id.yuerzhuanzhanguser)
TextView yuerzhuanzhanguser;
@BindView(R.id.yuerzhuanzhangpas)
EditText yuerzhuanzhangpas;
@BindView(R.id.yuerzhuanzhanginput)
EditText yuerzhuanzhanginput;
@BindView(R.id.yuerzhuanzhangremark)
EditText yuerzhuanzhangremark;
@BindView(R.id.yuerzhuanzhangok)
Button yuerzhuanzhangok;
@BindView(R.id.yuerzhuanzhang)
LinearLayout yuerzhuanzhang;
@BindView(R.id.yuertixianuser)
TextView yuertixianuser;
@BindView(R.id.yuertixianpas)
EditText yuertixianpas;
@BindView(R.id.yuertixianinput)
EditText yuertixianinput;
@BindView(R.id.yuertixianremark)
EditText yuertixianremark;
@BindView(R.id.yuertixianok)
Button yuertixianok;
@BindView(R.id.yuertixian)
LinearLayout yuertixian;
private Context context;
private String type;
private Long bankselectid;
private Long selectfriendsid;
@Override
public int getContentViewResId() {
context = this;
return R.layout.activity_wallet_change;
}
@Override
public void initView() {
Bundle bundle = getIntent().getExtras();
type = bundle.getString("WalletType");
if (type.equals("1")) {
setcenterTitle("积分兑换");
jinfenduihuan.setVisibility(View.VISIBLE);
} else if (type.equals("2")) {
setcenterTitle("积分转账");
jinfenzhuanzhang.setVisibility(View.VISIBLE);
} else if (type.equals("3")) {
setcenterTitle("余额转账");
yuerzhuanzhang.setVisibility(View.VISIBLE);
} else if (type.equals("4")) {
setcenterTitle("余额提现");
yuertixian.setVisibility(View.VISIBLE);
}
}
@Override
public void leftbarclick() {
super.leftbarclick();
finish();
}
@Override
public void initData() {
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
@OnClick({R.id.jifenduihuanok,
R.id.jinfenduihuan,
R.id.jinfenzhuanzhangok,
R.id.yuerzhuanzhangok,
R.id.yuertixianok,
R.id.jinfenzhuanzhanguser,
R.id.yuerzhuanzhanguser,
R.id.yuertixianuser
})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.yuerzhuanzhanguser:
GetUserFriends();
LogUtils.d("1111111111");
break;
case R.id.jinfenzhuanzhanguser:
LogUtils.d("2222222222");
GetUserFriends();
break;
case R.id.yuertixianuser:
GetUserBankCardLst();
LogUtils.d("33333333333333");
break;
case R.id.jifenduihuanok:
if (isemepty(jinfenduihuanpas)) {
showToast("请输入密码");
} else if (isemepty(jinfenduihuaninput)) {
showToast("输入积分");
} else {
DoIntegralExch(Integer.valueOf(getEdit(jinfenduihuaninput)), MD5Utils.encodeMD52(getEdit(jinfenduihuanpas)));
}
break;
case R.id.jinfenduihuan:
break;
case R.id.jinfenzhuanzhangok:
if (isemepty(jinfenzhuanzhanguser)) {
showToast("收款用户不能为空");
} else if (isemepty(jinfenzhuanzhanginput)) {
showToast("输入数值不能为空");
} else if (isemepty(jinfenzhuanzhangpas)) {
showToast("密码不能为空");
} else {
BonusTransfer(selectfriendsid, Integer.valueOf(getEdit(jinfenzhuanzhanginput)), MD5Utils.encodeMD52(getEdit(jinfenzhuanzhangpas)), getEdit(jinfenzhuanzhangremark));
}
break;
case R.id.yuerzhuanzhangok:
if (isemepty(yuerzhuanzhanguser)) {
showToast("收款用户不能为空");
} else if (isemepty(yuerzhuanzhanginput)) {
showToast("输入数值不能为空");
} else if (isemepty(yuerzhuanzhangpas)) {
showToast("密码不能为空");
} else {
BalanceTransfer(selectfriendsid, BigDecimal.valueOf(Double.valueOf(getEdit(yuerzhuanzhanginput))), MD5Utils.encodeMD52(getEdit(yuerzhuanzhangpas)), getEdit(yuerzhuanzhangremark));
}
break;
case R.id.yuertixianok:
if (isemepty(yuertixianuser)) {
showToast("收款用户不能为空");
} else if (isemepty(yuertixianinput)) {
showToast("输入数值不能为空");
} else if (isemepty(yuertixianpas)) {
showToast("密码不能为空");
} else {
DoWithDraw(bankselectid, BigDecimal.valueOf(Double.valueOf(getEdit(yuertixianinput))), MD5Utils.encodeMD52(getEdit(yuertixianpas)), getEdit(yuertixianremark));
}
break;
}
}
private boolean isemepty(TextView textView) {
return textView.getText().toString().trim().isEmpty();
}
private void DoWithDraw(Long BankCardID, BigDecimal WithDrawAmt, String PayPwd, String Remark) {
RetrofitHttpUtil.getApiService()
.DoWithDraw("", Long.valueOf(SPUtils.getUserId(context)), BankCardID, WithDrawAmt, PayPwd, Remark)
.compose(SchedulerTransformer.<String>transformer())
.subscribe(new BaseObserver<String>() {
@Override
protected void onSuccess(String s) {
LogUtils.d(s);
CategroyBean bean = GsonUtil.parseJsonWithGson(s, CategroyBean.class);
if (bean.getResult().equals("1")) {
showToast("提现成功");
EventBus.getDefault().post(new MessageEvent(MyEventCode.CODE_B, "DuiHuanSucccess"));
finish();
} else if (bean.getResult().equals("0")) {
showToast("用户钱包不存在");
} else if (bean.getResult().equals("2")) {
showToast("用户钱包尚未激活,请先激活钱包");
} else if (bean.getResult().equals("3")) {
showToast("用户钱包已冻结,暂不允许使用");
} else if (bean.getResult().equals("4")) {
showToast(",用户钱包已暂停使用,恢复之前不能使用");
} else if (bean.getResult().equals("5")) {
showToast("用户支付密码尚未设置");
} else if (bean.getResult().equals("6")) {
showToast("用户支付密码错误");
} else if (bean.getResult().equals("7")) {
showToast("提现金额须为大于0的整数");
} else if (bean.getResult().equals("8")) {
showToast("钱包余额扣除手续费后不足提现");
} else if (bean.getResult().equals("9")) {
showToast("当前用户的银行卡不存在");
} else if (bean.getResult().equals("10")) {
showToast("钱包不存在");
} else if (bean.getResult().equals("11")) {
showToast(",插入余额明细失败");
} else if (bean.getResult().equals("12")) {
showToast("变更钱包余额失败");
} else if (bean.getResult().equals("13")) {
showToast("生成提现单失败");
}
}
});
}
private void BalanceTransfer(long ToUserID, BigDecimal TransferAmt, String PayPwd, String Remark) {
RetrofitHttpUtil.getApiService()
.BalanceTransfer("", ToUserID, Long.valueOf(SPUtils.getUserId(context)), TransferAmt, PayPwd, Remark)
.compose(SchedulerTransformer.<String>transformer())
.subscribe(new BaseObserver<String>() {
@Override
protected void onSuccess(String s) {
LogUtils.d(s);
CategroyBean bean = GsonUtil.parseJsonWithGson(s, CategroyBean.class);
if (bean.getResult().equals("1")) {
showToast("转账成功");
EventBus.getDefault().post(new MessageEvent(MyEventCode.CODE_B, "DuiHuanSucccess"));
finish();
} else if (bean.getResult().equals("0")) {
showToast("转入用户和转出用户不能相同;");
} else if (bean.getResult().equals("2")) {
showToast("转入用户的钱包不存在;");
} else if (bean.getResult().equals("3")) {
showToast("转入用户钱包尚未激活,请先激活钱包");
} else if (bean.getResult().equals("4")) {
showToast("转入用户钱包已冻结,暂不允许使用");
} else if (bean.getResult().equals("5")) {
showToast("转入用户钱包已暂停使用,恢复之前不能使用");
} else if (bean.getResult().equals("6")) {
showToast("转出用户的钱包不存在");
} else if (bean.getResult().equals("7")) {
showToast("转出用户钱包尚未激活,请先激活钱包");
} else if (bean.getResult().equals("8")) {
showToast("转出用户钱包已冻结,暂不允许使用");
} else if (bean.getResult().equals("9")) {
showToast("用户钱包已暂停使用,恢复之前不能使用");
} else if (bean.getResult().equals("10")) {
showToast("用户支付密码尚未设置");
} else if (bean.getResult().equals("11")) {
showToast("用户支付密码错误");
} else if (bean.getResult().equals("12")) {
showToast("转出用户钱包余额不足");
} else if (bean.getResult().equals("13")) {
showToast("钱包不存在");
} else if (bean.getResult().equals("14")) {
showToast("插入余额明细失败");
} else if (bean.getResult().equals("15")) {
showToast("变更钱包余额失败");
} else if (bean.getResult().equals("16")) {
showToast("生成转账单失败");
}
}
});
}
private String getEdit(TextView textView) {
return textView.getText().toString().trim();
}
private void BonusTransfer(long ToUserID, int TransferBonus, String PayPwd, String Remark) {
RetrofitHttpUtil.getApiService()
.BonusTransfer("", ToUserID, Long.valueOf(SPUtils.getUserId(context)), TransferBonus, PayPwd, Remark)
.compose(SchedulerTransformer.<String>transformer())
.subscribe(new BaseObserver<String>() {
@Override
protected void onSuccess(String s) {
LogUtils.d(s);
CategroyBean bean = GsonUtil.parseJsonWithGson(s, CategroyBean.class);
if (bean.getResult().equals("1")) {
showToast("转账成功");
EventBus.getDefault().post(new MessageEvent(MyEventCode.CODE_B, "DuiHuanSucccess"));
finish();
} else if (bean.getResult().equals("0")) {
showToast("转入用户和转出用户不能相同;");
} else if (bean.getResult().equals("2")) {
showToast("转入用户的钱包不存在;");
} else if (bean.getResult().equals("3")) {
showToast("转入用户钱包尚未激活,请先激活钱包");
} else if (bean.getResult().equals("4")) {
showToast("转入用户钱包已冻结,暂不允许使用");
} else if (bean.getResult().equals("5")) {
showToast("转入用户钱包已暂停使用,恢复之前不能使用");
} else if (bean.getResult().equals("6")) {
showToast("转出用户的钱包不存在");
} else if (bean.getResult().equals("7")) {
showToast("转出用户钱包尚未激活,请先激活钱包");
} else if (bean.getResult().equals("8")) {
showToast("转出用户钱包已冻结,暂不允许使用");
} else if (bean.getResult().equals("9")) {
showToast("转出用户钱包已暂停使用,恢复之前不能使用");
} else if (bean.getResult().equals("10")) {
showToast("转出用户支付密码尚未设置");
} else if (bean.getResult().equals("11")) {
showToast("转出用户支付密码错误");
} else if (bean.getResult().equals("12")) {
showToast("转出用户钱包余额不足");
} else if (bean.getResult().equals("13")) {
showToast("钱包不存在");
} else if (bean.getResult().equals("14")) {
showToast("插入转出/转入积分明细失败");
} else if (bean.getResult().equals("15")) {
showToast("变更转出/转入钱包积分失败");
} else if (bean.getResult().equals("16")) {
showToast("生成转账单失败");
}
}
});
}
private void DoIntegralExch(int ExchAmt, String pass) {
String remark = "积分兑换";
RetrofitHttpUtil.getApiService()
.DoIntegralExch("", Long.valueOf(SPUtils.getUserId(context)), ExchAmt, pass, remark).compose(SchedulerTransformer.<String>transformer())
.subscribe(new BaseObserver<String>() {
@Override
protected void onSuccess(String s) {
LogUtils.d(s);
CategroyBean bean = GsonUtil.parseJsonWithGson(s, CategroyBean.class);
if (bean.getResult().equals("1")) {
showToast("积分兑换成功");
EventBus.getDefault().post(new MessageEvent(MyEventCode.CODE_B, "DuiHuanSucccess"));
finish();
} else if (bean.getResult().equals("0")) {
showToast("用户钱包不存在;");
} else if (bean.getResult().equals("2")) {
showToast("用户钱包尚未激活,请先激活钱包;");
} else if (bean.getResult().equals("3")) {
showToast("用户钱包已冻结,暂不允许使用");
} else if (bean.getResult().equals("4")) {
showToast("用户钱包已暂停使用,恢复之前不能使用");
} else if (bean.getResult().equals("5")) {
showToast("用户支付密码尚未设置");
} else if (bean.getResult().equals("6")) {
showToast("用户支付密码错误");
} else if (bean.getResult().equals("7")) {
showToast("兑换金额须为大于0的整数");
} else if (bean.getResult().equals("8")) {
showToast("钱包剩余积分不足兑换");
} else if (bean.getResult().equals("9")) {
showToast("钱包不存在");
} else if (bean.getResult().equals("10")) {
showToast("插入积分/余额明细失败");
} else if (bean.getResult().equals("11")) {
showToast("变更钱包积分/余额失败");
} else if (bean.getResult().equals("12")) {
showToast("生成兑换单失败");
}
}
});
}
private void GetUserFriends() {
RetrofitHttpUtil.getApiService()
.GetUserFriends("", SPUtils.getUserId(context))
.compose(SchedulerTransformer.<String>transformer())
.subscribe(new BaseObserver<String>() {
@Override
protected void onSuccess(String s) {
LogUtils.d(s);
if (!s.equals("")) {
final List<SelectFriendsUserIdBean> beans = GsonUtil.parseJsonArrayWithGson(s, SelectFriendsUserIdBean.class);
int slectnum = beans.size();
ActionSheetDialog sheetDialog = new ActionSheetDialog(context);
sheetDialog.builder().setTitle("请选择好友").setCancelable(false).setCanceledOnTouchOutside(false);
for (int i = 0; i < slectnum; i++) {
sheetDialog.builder().addSheetItem(beans.get(i).getNickName(), ActionSheetDialog.SheetItemColor.Blue, new ActionSheetDialog.OnSheetItemClickListener() {
@Override
public void onClick(int which) {
LogUtils.d("测试的" + which);
selectfriendsid = Long.valueOf(beans.get(which - 1).getFriendUserID());
if (type.equals("2")) {
jinfenzhuanzhanguser.setText(beans.get(which - 1).getNickName());
} else if (type.equals("3")) {
yuerzhuanzhanguser.setText(beans.get(which - 1).getNickName());
}
}
});
}
sheetDialog.builder().show();
}
else {
showToast("请添加好友");
}
}
});
}
private void GetUserBankCardLst() {
RetrofitHttpUtil.getApiService()
.GetUserBankCardLst("", SPUtils.getUserId(context))
.compose(SchedulerTransformer.<String>transformer())
.subscribe(new BaseObserver<String>() {
@Override
protected void onSuccess(String s) {
LogUtils.d(s);
if (!s.equals("")) {
final List<BankCarSelectBean> beans = GsonUtil.parseJsonArrayWithGson(s, BankCarSelectBean.class);
int slectnum = beans.size();
ActionSheetDialog sheetDialog = new ActionSheetDialog(context);
sheetDialog.builder().setTitle("请选择银行卡").setCancelable(false).setCanceledOnTouchOutside(false);
for (int i = 0; i < slectnum; i++) {
sheetDialog.builder().addSheetItem(beans.get(i).getBankName(), ActionSheetDialog.SheetItemColor.Blue, new ActionSheetDialog.OnSheetItemClickListener() {
@Override
public void onClick(int which) {
LogUtils.d("测试的" + which);
bankselectid = Long.valueOf(beans.get(which - 1).getBankCardID());
yuertixianuser.setText(beans.get(which - 1).getBankName());
}
});
}
sheetDialog.builder().show();
// for (int i = 0; i < beans.size(); i++) {
// sheetDialog.builder().addSheetItem(beans.get(i).getBankName(), ActionSheetDialog.SheetItemColor.Blue, new ActionSheetDialog.OnSheetItemClickListener() {
// @Override
// public void onClick(int which) {
// LogUtils.d(which+"测试");
// bankselectid=Long.valueOf(beans.get(which).getBankCardID());
// yuertixianuser.setText(beans.get(which).getBankName());
// }
// });
// sheetDialog.builder().show();
// }
}else {
showToast("请添加银行卡");
}
}
});
}
}
|
[
"896672661@qq.com"
] |
896672661@qq.com
|
967e0f5e0666f57cd18aa35b445a253f64b533f0
|
b3203715a5a988c17d2103284ad5da03f1baf8af
|
/src/main/java/org/jhipster/myapp/ApplicationWebXml.java
|
a9000508b620bf04c738de25d8600d2728b7f23c
|
[] |
no_license
|
omsab/Microservices-Demo
|
897f6d771f47c97f9420ba37afe641183ce369ae
|
07946680561600b5110d90b77a517fb6f5e1960a
|
refs/heads/master
| 2022-12-31T08:18:31.183959
| 2019-01-03T13:29:20
| 2019-01-03T13:29:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 830
|
java
|
package org.jhipster.myapp;
import org.jhipster.myapp.config.DefaultProfileUtil;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* This is a helper Java class that provides an alternative to creating a web.xml.
* This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc.
*/
public class ApplicationWebXml extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
/**
* set a default to use when no profile is configured.
*/
DefaultProfileUtil.addDefaultProfile(application.application());
return application.sources(JeeGatewayApp.class);
}
}
|
[
"alsaboma@int.infinit-services.com"
] |
alsaboma@int.infinit-services.com
|
337c7fe78f655eb4ecc3880caba2d53c937a64db
|
bdd11dcb99895d14385cb1b716091a4dd1342408
|
/eclipse-workspace/Servlet3.0Example/src/com/newpackage/MyServlet.java
|
b8b2dd558ac5cce2d4cd06a60d6c16dec4290f43
|
[] |
no_license
|
Solankinikhil/DailyWork
|
0c3b1b4f0d477b55d290de89fb7db5d8658c979d
|
9a1e261e50e1a6292e5275027e7a5ce88cde23b9
|
refs/heads/master
| 2021-01-05T13:25:45.111641
| 2020-03-13T10:56:32
| 2020-03-13T10:56:32
| 241,034,104
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 894
|
java
|
package com.newpackage;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class MyServlet
*/
@WebServlet("/MyServlet")
public class MyServlet extends HttpServlet {
public void task2() {
System.out.println("from task2");
}
public MyServlet() {
System.out.println("from constructor");
}
@Override
public void init() throws ServletException {
System.out.println("From init method");
}
@Override
protected void service(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
System.out.println("From service method");
task2();
}
@Override
public void destroy() {
System.out.println("From destroy method");
}
}
|
[
"06niksolanki@gmail.com"
] |
06niksolanki@gmail.com
|
5cbf0a6d71a8702b27341154b0d30a7ace0d5c0e
|
22562b1e394f4d9be0b9f666ce28c430ab350c32
|
/teste/src/main/java/services/JantarService.java
|
5504d7e77ac47aa81daf4d2af9d3b7c1ebea854b
|
[] |
no_license
|
polianacorreia/delivery
|
ec29e7215c097eeceda6929efbdb52f67745cd62
|
ab6a1e3447ffad8efd40b0af963568dceb378a0e
|
refs/heads/master
| 2020-03-25T11:00:15.653814
| 2018-12-11T20:13:22
| 2018-12-11T20:13:22
| 143,715,211
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,398
|
java
|
package services;
import java.io.Serializable;
import java.util.List;
import javax.inject.Inject;
import DAO.JantarDAO;
import Poo.ed.Jantar;
import util.TransacionalCdi;
public class JantarService implements Serializable, Service<Jantar> {
/**
*
*/
private static final long serialVersionUID = -7803325791425670859L;
@Inject
private JantarDAO userDAO;
/* (non-Javadoc)
* @see br.edu.ifpb.esperanca.daw2.services.Service#save(br.edu.ifpb.esperanca.daw2.ifoto.entities.Usuario)
*/
@TransacionalCdi
public void save(Jantar user) {
userDAO.save(user);
}
/* (non-Javadoc)
* @see br.edu.ifpb.esperanca.daw2.services.Service#update(br.edu.ifpb.esperanca.daw2.ifoto.entities.Usuario, boolean)
*/
@TransacionalCdi
public void update(Jantar user) {
userDAO.update(user);
}
/* (non-Javadoc)
* @see br.edu.ifpb.esperanca.daw2.services.Service#delete(br.edu.ifpb.esperanca.daw2.ifoto.entities.Usuario)
*/
@TransacionalCdi
public void remove(Jantar user) {
userDAO.remove(user);
}
/* (non-Javadoc)
* @see br.edu.ifpb.esperanca.daw2.services.Service#getByID(long)
*/
public Jantar getByID(long userId) {
return userDAO.getByID(userId);
}
/* (non-Javadoc)
* @see br.edu.ifpb.esperanca.daw2.services.Service#getAll()
*/
public List<Jantar> getAll() {
return userDAO.getAll();
}
}
|
[
"Aluno@DESKTOP-LDNVJ6K"
] |
Aluno@DESKTOP-LDNVJ6K
|
6196b084e34a5623102dbc84949b591ef8d9d070
|
f4a2e6193611874c184e89a850becc23d89e48a6
|
/src/main/java/com/jhipster/clx/domain/User.java
|
710f4f040fde783f2b2e5e12c23e3de86f418cff
|
[] |
no_license
|
mfang360/jhipster-sample-application
|
43f54858a0e1cfc420a0fbcd954dcdff2aba2891
|
37354f81c06eb24e2f9862758b69ec5cbf158502
|
refs/heads/master
| 2022-12-21T10:00:08.602231
| 2020-01-17T08:59:27
| 2020-01-17T08:59:27
| 234,510,261
| 0
| 0
| null | 2022-12-16T04:43:29
| 2020-01-17T08:59:14
|
Java
|
UTF-8
|
Java
| false
| false
| 5,500
|
java
|
package com.jhipster.clx.domain;
import com.jhipster.clx.config.Constants;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.Instant;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
/**
* A user.
*/
@Entity
@Table(name = "jhi_user")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class User extends AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
@Pattern(regexp = Constants.LOGIN_REGEX)
@Size(min = 1, max = 50)
@Column(length = 50, unique = true, nullable = false)
private String login;
@JsonIgnore
@NotNull
@Size(min = 60, max = 60)
@Column(name = "password_hash", length = 60, nullable = false)
private String password;
@Size(max = 50)
@Column(name = "first_name", length = 50)
private String firstName;
@Size(max = 50)
@Column(name = "last_name", length = 50)
private String lastName;
@Email
@Size(min = 5, max = 254)
@Column(length = 254, unique = true)
private String email;
@NotNull
@Column(nullable = false)
private boolean activated = false;
@Size(min = 2, max = 10)
@Column(name = "lang_key", length = 10)
private String langKey;
@Size(max = 256)
@Column(name = "image_url", length = 256)
private String imageUrl;
@Size(max = 20)
@Column(name = "activation_key", length = 20)
@JsonIgnore
private String activationKey;
@Size(max = 20)
@Column(name = "reset_key", length = 20)
@JsonIgnore
private String resetKey;
@Column(name = "reset_date")
private Instant resetDate = null;
@JsonIgnore
@ManyToMany
@JoinTable(
name = "jhi_user_authority",
joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")},
inverseJoinColumns = {@JoinColumn(name = "authority_name", referencedColumnName = "name")})
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@BatchSize(size = 20)
private Set<Authority> authorities = new HashSet<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getLogin() {
return login;
}
// Lowercase the login before saving it in database
public void setLogin(String login) {
this.login = StringUtils.lowerCase(login, Locale.ENGLISH);
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public boolean getActivated() {
return activated;
}
public void setActivated(boolean activated) {
this.activated = activated;
}
public String getActivationKey() {
return activationKey;
}
public void setActivationKey(String activationKey) {
this.activationKey = activationKey;
}
public String getResetKey() {
return resetKey;
}
public void setResetKey(String resetKey) {
this.resetKey = resetKey;
}
public Instant getResetDate() {
return resetDate;
}
public void setResetDate(Instant resetDate) {
this.resetDate = resetDate;
}
public String getLangKey() {
return langKey;
}
public void setLangKey(String langKey) {
this.langKey = langKey;
}
public Set<Authority> getAuthorities() {
return authorities;
}
public void setAuthorities(Set<Authority> authorities) {
this.authorities = authorities;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof User)) {
return false;
}
return id != null && id.equals(((User) o).id);
}
@Override
public int hashCode() {
return 31;
}
@Override
public String toString() {
return "User{" +
"login='" + login + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + email + '\'' +
", imageUrl='" + imageUrl + '\'' +
", activated='" + activated + '\'' +
", langKey='" + langKey + '\'' +
", activationKey='" + activationKey + '\'' +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
c052b6583dda815611b321bd6c70a933367e38cb
|
cf729a7079373dc301d83d6b15e2451c1f105a77
|
/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201509/express/KeywordGroup.java
|
c8b1e552c923564dab177aeddf38263215efceea
|
[] |
no_license
|
cvsogor/Google-AdWords
|
044a5627835b92c6535f807ea1eba60c398e5c38
|
fe7bfa2ff3104c77757a13b93c1a22f46e98337a
|
refs/heads/master
| 2023-03-23T05:49:33.827251
| 2021-03-17T14:35:13
| 2021-03-17T14:35:13
| 348,719,387
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,650
|
java
|
package com.google.api.ads.adwords.jaxws.v201509.express;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.google.api.ads.adwords.jaxws.v201509.cm.Criterion;
/**
*
* A {@link Criterion} for keyword groups.
* <span class="constraint AdxEnabled">This is disabled for AdX when it is contained within Operators: ADD, SET.</span>
*
*
* <p>Java class for KeywordGroup complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="KeywordGroup">
* <complexContent>
* <extension base="{https://adwords.google.com/api/adwords/cm/v201509}Criterion">
* <sequence>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "KeywordGroup", propOrder = {
"name"
})
public class KeywordGroup
extends Criterion
{
protected String name;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
}
|
[
"vacuum13@gmail.com"
] |
vacuum13@gmail.com
|
743fa1172739360d27955f1159eb7441426ab16a
|
8614888f18608b8474b73cf38f21d7dd4b3e58c8
|
/oauth/src/main/java/org/miage/oauth/entity/User.java
|
b9814bda19c636ec899e449c75393bd23fa8d537
|
[] |
no_license
|
AnthonyPellizzeri/SpringM2
|
dbc713c925ff1a1cc06de3bcb12a68b461cdaae6
|
f98019da3a09877b67fb378b923f0691d1ea2d78
|
refs/heads/main
| 2023-04-04T16:36:32.523368
| 2021-04-11T21:51:07
| 2021-04-11T21:51:07
| 349,227,538
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,973
|
java
|
package org.miage.oauth.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Collection;
import java.util.Set;
import static javax.persistence.EnumType.STRING;
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "user_account")
public class User implements UserDetails, Serializable {
private static final long serialVersionUID = 8765432234567L;
@Id
private String id;
@Column(unique = true)
private String username;
private String password;
private boolean enabled;
@Column(name = "account_locked")
private boolean accountNonLocked;
@Column(name = "account_expired")
private boolean accountNonExpired;
@Column(name = "credentials_expired")
private boolean credentialsNonExpired;
@Enumerated(STRING)
private Role role;
@Override
public boolean isAccountNonExpired() {
return !accountNonExpired;
}
@Override
public boolean isCredentialsNonExpired() {
return !credentialsNonExpired;
}
@Override
public boolean isAccountNonLocked() {
return !accountNonLocked;
}
public void setAccountNonExpired(boolean accountNonExpired) {
this.accountNonExpired = !accountNonExpired;
}
public void setCredentialsNonExpired(boolean credentialsNonExpired) {
this.credentialsNonExpired = !credentialsNonExpired;
}
public void setAccountNonLocked(boolean accountNonLocked) {
this.accountNonLocked = !accountNonLocked;
}
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return Set.of(new SimpleGrantedAuthority(role.getValue()));
}
}
|
[
"anthony.pellizzeri3@orange.fr"
] |
anthony.pellizzeri3@orange.fr
|
1c4153a1a4cfc9022c635a853237709fe7f9c4e0
|
bf377c647c451edeccf720d3a66157b174eb1741
|
/app/src/main/java/com/openld/roundcornerdemmo/utils/DisplayUtils.java
|
47fa5037271506db10097d8a655110c4c441e296
|
[] |
no_license
|
leidongld/RoundCornerDemmo
|
38e1273543ed565b5c6203aa4f76871bff8ce4e9
|
02ae441839b65f4ef7b8f3fa164580ef8c64fba8
|
refs/heads/master
| 2022-11-07T11:13:58.453091
| 2020-06-09T14:25:41
| 2020-06-09T14:25:41
| 271,024,496
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,319
|
java
|
package com.openld.roundcornerdemmo.utils;
import android.content.Context;
/**
* author: lllddd
* created on: 2020/6/9 10:26
* description:
*/
public class DisplayUtils {
/**
* px 转 dp
*
* @param context
* @param px
* @return
*/
public static int px2dp(Context context, float px) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (px / scale + 0.5F);
}
/**
* dp 转 px
*
* @param context
* @param dp
* @return
*/
public static int dp2px(Context context, float dp) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5F);
}
/**
* px 转 sp
* @param context
* @param px
* @return
*/
public static int px2sp(Context context, float px) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (px / fontScale + 0.5F);
}
/**
* sp 转 px
*
* @param context
* @param sp
* @return
*/
public static int sp2px(Context context, float sp) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (sp * fontScale + 0.5F);
}
}
|
[
"leidongld@sina.com"
] |
leidongld@sina.com
|
27159d3659fd4d83a7e40e1c84bc580d62473062
|
968bfcf50f8b89f889398380f1363b5b45dd717e
|
/android/app/src/main/java/com/nsu_parking_demo_26526/MainActivity.java
|
5cdd9732ed5156c7dacb379ce8d362b8ef04254c
|
[] |
no_license
|
crowdbotics-apps/nsu-parking-demo-26526
|
15993e49d5fe18a09c378e60b7f069358642dd53
|
f36082b4fad1f83f2406dea52638f59a1fdbedb5
|
refs/heads/master
| 2023-05-04T08:13:57.967590
| 2021-05-10T23:47:45
| 2021-05-10T23:47:45
| 366,203,168
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 371
|
java
|
package com.nsu_parking_demo_26526;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "nsu_parking_demo_26526";
}
}
|
[
"team@crowdbotics.com"
] |
team@crowdbotics.com
|
398d62b49a3f103423287a9966cb313b098886f0
|
c8e22f68f3b4d3ff58077e98fdc3e386edddca28
|
/Drink1.java
|
a73517216634add5f24232bd4da6bf89c353baab
|
[] |
no_license
|
jiu1209/java.sample2
|
ecf90c842bed18cec7883818ad41a926a35deca9
|
ef32dc169198372dbb53b73e89f7f51337f14d73
|
refs/heads/master
| 2023-01-04T01:50:39.232218
| 2020-11-01T07:49:12
| 2020-11-01T07:49:12
| 303,072,905
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,450
|
java
|
import java.io.*;
public class Drink1 {
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
System.out.println("飲み物は何が好きですか?");
System.out.println("1 オレンジジュース");
System.out.println("2 コーヒー");
System.out.println("3 ミルク");
System.out.println("4 どちらでもない");
System.out.println("1,2,3,4のどれかを選んでください。");
String line = reader.readLine();
int n = Integer.parseInt(line);
switch (n) {
case 1:
System.out.println("オレンジジュースです。");
break;
case 2:
System.out.println("コーヒーです。");
break;
case 3:
System.out.println("ミルクです。");
break;
default:
System.out.println("どちらでもありません。");
break;
}
} catch (IOException e) {
System.out.println(e);
} catch (NumberFormatException e) {
System.out.println("数字の形式が正しくありません。");
}
}
}
|
[
"shu.heihei1209@gmail.com"
] |
shu.heihei1209@gmail.com
|
932bac60c34b80fcf460c4fcc3db394ae7abd9cd
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/61/1522.java
|
f1b04db76a70b97a90c0751d8ce839a5ada35755
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 652
|
java
|
package <missing>;
public class GlobalMembers
{
public static int pb(int m)
{
int[] sz = new int[100000];
sz[1] = 1;
sz[2] = 1;
for (int i = 3;i <= m;i++)
{
sz[i] = sz[i - 1] + sz[i - 2];
}
return sz[m];
}
public static int Main()
{
int i;
int a;
int n;
int k;
int[] s = new int[1000];
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
k = Integer.parseInt(tempVar);
}
for (i = 0;i < k;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
n = Integer.parseInt(tempVar2);
}
s[i] = pb(n);
}
for (i = 0;i < k;i++)
{
System.out.printf("%d\n",s[i]);
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
1b6f6c5997f8af409f11d78d441c801d49d1f7ee
|
cbd205983456f11ef963db4b8bc2485e449870af
|
/app/src/main/java/yagotome/testepraticomobile/fragment/VideoFragment.java
|
89242f17404d0525d132d8bdcadc224ffe420bf0
|
[] |
no_license
|
yagotome/TestePraticoMobile
|
d00794600167ec22e361e05f2cfa1b48491956bc
|
e733f090f2b0b9812f07b0b6186738a5190f7d31
|
refs/heads/master
| 2021-01-21T12:59:23.601394
| 2016-04-13T02:56:53
| 2016-04-13T02:56:53
| 55,816,055
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,659
|
java
|
package yagotome.testepraticomobile.fragment;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.devbrackets.android.exomedia.EMVideoView;
import yagotome.testepraticomobile.R;
import yagotome.testepraticomobile.activity.BaseActivity;
import yagotome.testepraticomobile.domain.Video;
/**
*
*/
public class VideoFragment extends BaseFragment implements MediaPlayer.OnPreparedListener {
private static final String TAG = "VideoFragment";
private Video video;
private EMVideoView emVideoView;
public VideoFragment() {
}
public static VideoFragment newInstance(Video video) {
VideoFragment fragment = new VideoFragment();
fragment.video = video;
return fragment;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_video, container, false);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
setupVideoView();
}
private void setupVideoView() {
assert (getView() != null);
emVideoView = (EMVideoView)getView().findViewById(R.id.video_play_activity_video_view);
emVideoView.setOnPreparedListener(this);
emVideoView.setVideoURI(Uri.parse(video.getUri()));
}
@Override
public void onPrepared(MediaPlayer mp) {
emVideoView.start();
}
}
|
[
"yago.tome@hotmail.com"
] |
yago.tome@hotmail.com
|
d55fb1a123fd27eb5fdeb04230c5636e8a29d178
|
27e2c0a9d0e30433d1153fabcaa7ac339755b1fe
|
/Delhi-info/src/history/User.java
|
2507e5aca12852074cd7350b02bbfd23882c4fbb
|
[] |
no_license
|
SIDDIQUISAZID/Delhi-info
|
7eaa70546b1c35716f5badb097d71cbee77cff53
|
baa466b8700982e81e8db049d446f735fd89db5c
|
refs/heads/master
| 2021-01-21T13:08:26.506450
| 2017-05-21T06:27:26
| 2017-05-21T06:27:26
| 91,808,174
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 728
|
java
|
package history;
public class User {
String name,location,place,aboutplace,popularity;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getPlace() {
return place;
}
public void setPlace(String place) {
this.place = place;
}
public String getAboutplace() {
return aboutplace;
}
public void setAboutplace(String aboutplace) {
this.aboutplace = aboutplace;
}
public String getPopularity() {
return popularity;
}
public void setPopularity(String pouplarity) {
this.popularity = pouplarity;
}
}
|
[
"sidd.khan69@gmail.com"
] |
sidd.khan69@gmail.com
|
6e0db926c5d4bcadc7076b9a050d915b9e0463a6
|
d8636158357c9dc6140ea20ad723de63114567e1
|
/sms/src/main/java/sms/model/StudentService.java
|
eb5764e80947b55f278650a3f7aba99ead5bdec2
|
[] |
no_license
|
SAIF0206/SpringFrameWorkBasic
|
98b071ad08fe9e49a5506c354a4c97acb7141e01
|
98a8b0b645709e44f32ce0e394ee8446db24db3b
|
refs/heads/master
| 2020-09-25T23:12:42.306546
| 2019-12-11T05:15:51
| 2019-12-11T05:15:51
| 226,109,141
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,090
|
java
|
package sms.model;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class StudentService {
@Autowired
private StudentRepository studentRepo;
@Autowired
private StudentGradeRepository studentGardeRepo;
public List<Student> listStudent(){
return (List<Student>)studentRepo.findAll();
}
public Student getStudentName(int id) {
return studentRepo.findById(id).get();
}
public ArrayList<StudentGrade> getStudentName(Student student) {
return studentGardeRepo.findByStudent(student);
}
//@Autowired
//private StudentGradeRepository gradeRepo;
@Autowired CourseRepository courseRepo;
public ArrayList<Course> listcourse(){
return (ArrayList<Course>) courseRepo.findAll();
}
// public long queryStudentGrades(int courseID, String Course, int units, String grade) {
// String query = "SELECT sg.id , sg.course,sg.grade, c.courseName, c.courseUnit" + "From StudentGrade sg and "
// }
}
|
[
"msaif.sam@gmail.com"
] |
msaif.sam@gmail.com
|
b700085650496b0af71dc9cf61303fd68848313b
|
cb73d0ff543d8294545c09783bf3c45bced7e0c6
|
/dristhi-app/src/main/java/org/ei/drishti/view/dialog/SortOption.java
|
fa33bcdde36d76e29935068c26588cabbbc0d854
|
[
"Apache-2.0"
] |
permissive
|
nbvsrk/opensrp-client
|
ac07635dc0fd428259faa7d241e0841537917211
|
a6d1c18a21b1cdcceb8fc438ab8a8f374607c7ed
|
refs/heads/master
| 2021-01-17T23:00:36.561168
| 2015-03-25T05:40:36
| 2015-03-25T05:40:36
| 33,240,944
| 1
| 0
| null | 2015-04-01T10:13:25
| 2015-04-01T10:13:25
| null |
UTF-8
|
Java
| false
| false
| 220
|
java
|
package org.ei.drishti.view.dialog;
import org.ei.drishti.view.contract.SmartRegisterClients;
public interface SortOption extends DialogOption {
public SmartRegisterClients sort(SmartRegisterClients allClients);
}
|
[
"kirang20@gmail.com"
] |
kirang20@gmail.com
|
b0d96512b96b41198ea3a6122421280083e07c28
|
84977be791b912c6ed0c7da3c3ca0c1e7a9b1220
|
/src/main/java/com/skycloud/management/portal/admin/customer/utils/UtilCommon.java
|
ac3a1464fc13e6140a0f2c9ba6ef577b19f53b77
|
[] |
no_license
|
henrylv206/UCFCloudPortal
|
1503b9e7a66103684444b78935882973306d9744
|
0283d6c4d1ac9f3de67ea579a8f77c3331fcc897
|
refs/heads/master
| 2020-12-30T10:50:05.608675
| 2014-07-22T07:33:54
| 2014-07-22T07:33:54
| 21,964,181
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 983
|
java
|
package com.skycloud.management.portal.admin.customer.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class UtilCommon {
public static String getSerial(Date date, int index) {
long msel = date.getTime();
SimpleDateFormat fm = new SimpleDateFormat("MMddyyyyHHmmssSS");
msel += index;
date.setTime(msel);
String serials = fm.format(date);
return serials;
}
// ����Ƿ���ͼƬ��ʽ
public static boolean checkIsImage(String imgStr) {
boolean flag = false;
if (imgStr != null) {
if (imgStr.equalsIgnoreCase(".gif")
|| imgStr.equalsIgnoreCase(".jpg")
|| imgStr.equalsIgnoreCase(".jpeg")
|| imgStr.equalsIgnoreCase(".png")
|| imgStr.equalsIgnoreCase(".txt")) {
flag = true;
}
}
return flag;
}
public static Date StrToDate(String str) throws ParseException{
return new SimpleDateFormat("MM/dd/yyyy").parse(str);
}
}
|
[
"henrylv206@qq.com"
] |
henrylv206@qq.com
|
f72046227cfc374b6c4725561b96bd51a75fe0ef
|
cf1280ce698ffbc88b15725a7f352aa472485887
|
/src/com/rabitmq/chatapp/classes/User.java
|
25bdb312a0df4a531831d6c98c5f025c58924d2c
|
[] |
no_license
|
christophezei/WhatChattRabbitmq
|
29a6232d027b93d7fdc7648dbb6e4128b2c189c1
|
b8ab9090daea2c306709b5f1e1009ea08f11ef64
|
refs/heads/master
| 2021-04-13T10:21:25.174350
| 2020-03-22T19:19:54
| 2020-03-22T19:19:54
| 249,155,173
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,097
|
java
|
package com.rabitmq.chatapp.classes;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.concurrent.TimeoutException;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.DeliverCallback;
import com.rabitmq.chatapp.classes.Client.MessageType;
import com.rabitmq.interfaces.IUser;
import com.rabitmq.models.MessageModel;
public class User implements IUser {
@Override
public ConnectionFactory connectToServer(ConnectionFactory factory){
factory = new ConnectionFactory();
factory.setHost("localhost");
return factory;
}
@Override
public synchronized void produceMessage(String exchangeName, MessageModel message, String exchangeType, ConnectionFactory factory) throws IOException, TimeoutException {
try (Connection connection = factory.newConnection();
Channel channel = connection.createChannel()) {
channel.exchangeDeclare(exchangeName, exchangeType);
String messageContent;
String routingKey = null;
MessageType messageType = MessageType.NONE;
if(message.getMessageType() == messageType) {
routingKey = "NONE";
messageContent = message.getMessageSender() + message.getMessageBody();
channel.basicPublish(exchangeName,routingKey, null, messageContent.getBytes(StandardCharsets.UTF_8));
}else {
if(message.getMessageType() == MessageType.BROADCAST) {
routingKey = message.getMessageReceiver();
}else if(message.getMessageType() == MessageType.PRIVATE) {
messageContent = message.getMessageBody();
String[] parts = messageContent.split(" ");
routingKey = parts[0].substring(1);
String messageBody = parts[1];
channel.basicPublish(exchangeName,routingKey, null, messageBody.getBytes(StandardCharsets.UTF_8));
}
messageContent = "[" + message.getSentTime()+ "]" + message.getMessageSender() + ":" + message.getMessageBody();
channel.basicPublish(exchangeName,routingKey, null, messageContent.getBytes(StandardCharsets.UTF_8));
}
}
}
@Override
public void consumeMessage(ConnectionFactory factory,String exchangeName, String exchangeType,MessageModel message) throws IOException, TimeoutException {
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.exchangeDeclare(exchangeName, exchangeType);
String queueName = channel.queueDeclare().getQueue();
channel.queueBind(queueName, exchangeName, "BROADCAST");
channel.queueBind(queueName, exchangeName,"NONE");
DeliverCallback deliverCallback = (consumerTag, delivery) -> {
String messageBody = new String(delivery.getBody(), "UTF-8");
System.out.println(messageBody);
};
channel.basicConsume(queueName, true, deliverCallback, consumerTag -> { });
}
@Override
public void initMyOwenChannelBindingForPrivComunucation(ConnectionFactory factory,String exchangeName, String exchangeType,MessageModel message) throws IOException, TimeoutException {
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.exchangeDeclare(exchangeName, exchangeType);
String queueName = channel.queueDeclare().getQueue();
channel.queueBind(queueName, exchangeName, message.getMessageSender());
DeliverCallback deliverCallback = (consumerTag, delivery) -> {
String messageBody = new String(delivery.getBody(), "UTF-8");
System.out.println(messageBody);
};
channel.basicConsume(queueName, true, deliverCallback, consumerTag -> { });
}
@Override
public synchronized void writeToFile(String message) {
String userHome = createDirectory();
File log = new File(userHome + "/History.txt");
try {
PrintWriter writer = new PrintWriter(new FileWriter(log, true));
writer.println(message);
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public String retreiveHistory(String absolutePath) {
String history = null;
try {
history = new String(Files.readAllBytes(Paths.get(absolutePath)), StandardCharsets.UTF_8);
} catch (IOException e) {
// can print any error
}
return history;
}
private String createDirectory() {
boolean success = false;
String dir = System.getProperty("user.home");
String fullPath = dir + "/WhatChatMqHistory";
File directory = new File(fullPath);
if (directory.exists() && directory.isDirectory()) {
//System.out.println("Directory already exists ...");
} else {
//System.out.println("Directory not exists, creating now");
success = directory.mkdir();
}
return fullPath;
}
}
|
[
"christophezeinaty@hotmail.com"
] |
christophezeinaty@hotmail.com
|
6fbb5412539fb5dcd3eb61f5734b10e18197008a
|
124a30d827fc5dd9563e96541ce876ae66bab18b
|
/src/system/presentation/client_view/Controller.java
|
20c198b381673ea79706272a8963d26edab63839
|
[] |
no_license
|
basungo98/LoanSystem
|
f9dd1edde2316a891e4377f991a2b4c6e538fd83
|
3364a0acdb6e529c46f684ab187021528619d500
|
refs/heads/main
| 2023-08-16T14:16:02.424003
| 2021-10-01T17:10:27
| 2021-10-01T17:10:27
| 411,812,105
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,642
|
java
|
package system.presentation.client_view;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import system.Application;
import system.logic.Canton;
import system.logic.Client;
import system.logic.District;
import system.logic.Province;
import system.logic.Service;
public class Controller {
Model model;
View view;
public Controller(Model model, View view) {
this.model = model;
this.view = view;
model.setClient(new Client());
model.setClients(new ArrayList<>());
view.setModel(model);
view.setController(this);
view.baseConfiguration();
}
public Province getProvince(String provinceName) {
try {
return Service.instance().getProvince(provinceName);
} catch (Exception ex) {
return new Province();
}
}
public Canton getCanton(String provinceName, String cantonName) {
try {
List<Canton> cantons = getCantons(provinceName);
return cantons.stream().filter(c->c.getName().equals(cantonName)).findFirst().orElse(null);
} catch (Exception ex) {
return new Canton();
}
}
public District getDistrict(String provinceName, String cantonName, String districtName) {
try {
List<District> districts = getDistricts(provinceName, cantonName);
return districts.stream().filter(c->c.getName().equals(districtName)).findFirst().orElse(null);
} catch (Exception ex) {
return new District();
}
}
public List<Province> getProvinces() {
try {
return Service.instance().getProvinces();
} catch (Exception ex) {
return Arrays.asList(new Province());
}
}
public List<Canton> getCantons(String provinceName) {
try {
Province province = Service.instance().getProvince(provinceName);
return province.getCantons();
} catch (Exception ex) {
return Arrays.asList(new Canton());
}
}
public List<District> getDistricts(String provinceName, String cantonName) {
try {
Province province = Service.instance().getProvince(provinceName);
Canton canton = province.getCantons().stream().filter(c->c.getName().equals(cantonName)).findFirst().orElse(null);
return canton.getDistricts();
} catch (Exception ex) {
return Arrays.asList(new District());
}
}
public void addClient(Client cliente){
try {
Service.instance().addClient(cliente);
Service.instance().store();
model.setClient(new Client());
model.setClients(Arrays.asList(cliente));
model.commit();
} catch (Exception ex) {
}
}
public void getClient(String id){
try {
Client cliente = Service.instance().getClient(id);
model.setClient(cliente);
model.setClients(Arrays.asList(cliente));
model.commit();
} catch (Exception ex) {
model.setClient(new Client());
model.setClients(new ArrayList<>());
model.commit();
}
}
public void show(){
this.view.setVisible(true);
}
public void hide(){
this.view.setVisible(false);
}
public void exit(){
Service.instance().store();
}
public void showLoanView(){
this.hide();
Application.LOAN_VIEW.show();
}
}
|
[
"bryanalfarop@gmail.com"
] |
bryanalfarop@gmail.com
|
ac4c20db5b99815760eb04b7468a914be38fcd3e
|
cc32a64afed91f7186c009d3d1247370a904be1c
|
/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/UnknownContentCodeEnumFactory.java
|
d30bf34f13cb0b49eecc7dcfc6b087b9fd75aebc
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
rmoult01/hapi_fhir_mir_1
|
5dc5966ce06738872d8e0ddb667d513df76bb3d1
|
93270786e2d30185c41987038f878943cd736e34
|
refs/heads/master
| 2021-07-20T15:58:24.384813
| 2017-10-30T14:36:18
| 2017-10-30T14:36:18
| 106,035,744
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,796
|
java
|
package org.hl7.fhir.dstu3.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1
import org.hl7.fhir.dstu3.model.EnumFactory;
public class UnknownContentCodeEnumFactory implements EnumFactory<UnknownContentCode> {
public UnknownContentCode fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("no".equals(codeString))
return UnknownContentCode.NO;
if ("extensions".equals(codeString))
return UnknownContentCode.EXTENSIONS;
if ("elements".equals(codeString))
return UnknownContentCode.ELEMENTS;
if ("both".equals(codeString))
return UnknownContentCode.BOTH;
throw new IllegalArgumentException("Unknown UnknownContentCode code '"+codeString+"'");
}
public String toCode(UnknownContentCode code) {
if (code == UnknownContentCode.NO)
return "no";
if (code == UnknownContentCode.EXTENSIONS)
return "extensions";
if (code == UnknownContentCode.ELEMENTS)
return "elements";
if (code == UnknownContentCode.BOTH)
return "both";
return "?";
}
public String toSystem(UnknownContentCode code) {
return code.getSystem();
}
}
|
[
"moultonr@mir.wustl.edu"
] |
moultonr@mir.wustl.edu
|
1ca1009a538ef2abaab85031fc923920c4d1eacb
|
ab951ec371fc7b27fbb61283c6545b7a46fff619
|
/vaadin/Runner.java
|
2a65439562b267ccabee779dac9bb0132760913f
|
[] |
no_license
|
nmerouze/blockcampparis09
|
a79510fc24e87d2f64ae289b6fb4634c581a20ec
|
48342cbb14418a35deb7a00f0a15a732ee948b93
|
refs/heads/master
| 2016-09-06T00:07:55.978194
| 2009-11-28T20:14:49
| 2009-11-28T20:14:49
| 388,621
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 655
|
java
|
import java.util.ArrayList;
import java.util.List;
import org.jruby.embed.ScriptingContainer;
import com.vaadin.Application;
public class Runner extends Application {
@Override
public void init() {
ScriptingContainer container = new ScriptingContainer();
List<String> loadPaths = new ArrayList<String>();
loadPaths.add(this.getContext().getBaseDirectory().getAbsolutePath());
container.getProvider().setLoadPaths(loadPaths);
Object receiver = container.runScriptlet("require 'main'; Vaadin");
Object[] args = new Object[1];
args[0] = this;
container.callMethod(receiver, "application=", args, Object.class);
}
}
|
[
"nicolas.merouze@gmail.com"
] |
nicolas.merouze@gmail.com
|
e173d3ad5b2b402448c5ed9def70a979c36668a3
|
32b9d8cc999aa1e2c7b4075ed32727e772a3ae1c
|
/morning-common/src/main/java/org/pussinboots/morning/common/exception/BaseException.java
|
56ba6c94acf80850a4caba663c51ab064b723eae
|
[] |
no_license
|
HinsYang/Morning
|
33b6706901fd92bd891d260403ff551dfa68fbae
|
cd115ac3a2b0bfcadd7305abf2b520d0e7290f33
|
refs/heads/master
| 2021-05-11T23:59:28.069375
| 2019-02-19T17:53:05
| 2019-02-19T17:53:05
| 171,512,823
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 801
|
java
|
package org.pussinboots.morning.common.exception;
/**
*
* 项目名称:morning-common
* 类名称:BaseException
* 类描述:BaseException 统一异常基类
* 创建人:yeungchihang
* 创建时间:2017年3月31日 下午12:06:06
*
*/
public class BaseException extends RuntimeException {
private static final long serialVersionUID = 1L;
public BaseException() {
super();
}
public BaseException(Throwable cause) {
super(cause);
}
public BaseException(String message) {
super(message);
}
public BaseException(String message, Throwable cause) {
super(message, cause);
}
public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
|
[
"Hins@yangzhiheng.hnisi.com.cn"
] |
Hins@yangzhiheng.hnisi.com.cn
|
b3271d6f33b73a83f946360f3112d0745d205659
|
5b8337c39cea735e3817ee6f6e6e4a0115c7487c
|
/sources/p043io/reactivex/internal/operators/observable/ObservableRange.java
|
c9c1befda08d2bd15c360d815e124b7e7e602c39
|
[] |
no_license
|
karthik990/G_Farm_Application
|
0a096d334b33800e7d8b4b4c850c45b8b005ccb1
|
53d1cc82199f23517af599f5329aa4289067f4aa
|
refs/heads/master
| 2022-12-05T06:48:10.513509
| 2020-08-10T14:46:48
| 2020-08-10T14:46:48
| 286,496,946
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,687
|
java
|
package p043io.reactivex.internal.operators.observable;
import p043io.reactivex.Observable;
import p043io.reactivex.Observer;
import p043io.reactivex.internal.observers.BasicIntQueueDisposable;
/* renamed from: io.reactivex.internal.operators.observable.ObservableRange */
public final class ObservableRange extends Observable<Integer> {
private final long end;
private final int start;
/* renamed from: io.reactivex.internal.operators.observable.ObservableRange$RangeDisposable */
static final class RangeDisposable extends BasicIntQueueDisposable<Integer> {
private static final long serialVersionUID = 396518478098735504L;
final Observer<? super Integer> actual;
final long end;
boolean fused;
long index;
RangeDisposable(Observer<? super Integer> observer, long j, long j2) {
this.actual = observer;
this.index = j;
this.end = j2;
}
/* access modifiers changed from: 0000 */
public void run() {
if (!this.fused) {
Observer<? super Integer> observer = this.actual;
long j = this.end;
for (long j2 = this.index; j2 != j && get() == 0; j2++) {
observer.onNext(Integer.valueOf((int) j2));
}
if (get() == 0) {
lazySet(1);
observer.onComplete();
}
}
}
public Integer poll() throws Exception {
long j = this.index;
if (j != this.end) {
this.index = 1 + j;
return Integer.valueOf((int) j);
}
lazySet(1);
return null;
}
public boolean isEmpty() {
return this.index == this.end;
}
public void clear() {
this.index = this.end;
lazySet(1);
}
public void dispose() {
set(1);
}
public boolean isDisposed() {
return get() != 0;
}
public int requestFusion(int i) {
if ((i & 1) == 0) {
return 0;
}
this.fused = true;
return 1;
}
}
public ObservableRange(int i, int i2) {
this.start = i;
this.end = ((long) i) + ((long) i2);
}
/* access modifiers changed from: protected */
public void subscribeActual(Observer<? super Integer> observer) {
RangeDisposable rangeDisposable = new RangeDisposable(observer, (long) this.start, this.end);
observer.onSubscribe(rangeDisposable);
rangeDisposable.run();
}
}
|
[
"knag88@gmail.com"
] |
knag88@gmail.com
|
c6b89cc24445315f7ca07e9f039c93937dd8079d
|
526c41ac02d7054354d064cfca539f33ef6cd289
|
/app/src/main/java/com/bharatiyajob/bharatiyajob/User/CandidateNotification/notification_list/CandidateNotificationFragment.java
|
da03be351b3518182ed58a44b747ccf2abf30799
|
[] |
no_license
|
pankaj1920/BharatiyaJob
|
b4883904b551431f0bc0eaadfd7f0af417b231db
|
db4605ad684ff7b70c61906181d9f20376e2f62b
|
refs/heads/master
| 2023-02-06T04:31:27.870135
| 2020-12-23T01:29:57
| 2020-12-23T01:29:57
| 294,958,518
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 742
|
java
|
package com.bharatiyajob.bharatiyajob.User.CandidateNotification.notification_list;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.bharatiyajob.bharatiyajob.R;
public class CandidateNotificationFragment extends Fragment {
public CandidateNotificationFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_candidate_notification, container, false);
}
}
|
[
"bohrapankaj1920@gmail.com"
] |
bohrapankaj1920@gmail.com
|
c3c4b71553c26af82781c56d3cc73504a99540e1
|
6c581f6164eebe845a848e8c2d9f8315f7e264fd
|
/org.abchip.mimo.biz.asf.plugins/plugins/mimo/src/main/java/org/abchip/mimo/biz/asf/plugins/entity/EcoreUtils.java
|
845dbf3dfd6bd7d5f69eed32b9a7f9e4dda3dfee
|
[] |
no_license
|
abchip/mimo-biz20
|
7a0b110fd40733a7f3049d1871ef9559bc08db5c
|
a3cffeccb98d200ff2ecd629942b4279364d3373
|
refs/heads/master
| 2023-03-22T22:54:03.865399
| 2021-03-18T20:35:52
| 2021-03-18T20:35:52
| 245,134,382
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 16,219
|
java
|
/**
* Copyright (c) 2017, 2021 ABChip and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
*/
package org.abchip.mimo.biz.asf.plugins.entity;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import org.abchip.mimo.biz.BizPackage;
import org.abchip.mimo.entity.EntityPackage;
import org.abchip.mimo.entity.Frame;
import org.abchip.mimo.entity.Slot;
import org.abchip.mimo.util.Logs;
import org.abchip.mimo.util.Strings;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericEntityException;
import org.apache.ofbiz.entity.model.ModelEntity;
import org.apache.ofbiz.entity.model.ModelField;
import org.apache.ofbiz.entity.model.ModelField.EncryptMethod;
import org.apache.ofbiz.entity.model.ModelFieldType;
import org.apache.ofbiz.widget.model.FieldInfo;
import org.apache.ofbiz.widget.model.ModelForm;
import org.apache.ofbiz.widget.model.ModelFormField;
import org.apache.ofbiz.widget.model.ModelFormField.DropDownField;
import org.apache.ofbiz.widget.model.ModelFormField.OptionSource;
import org.apache.ofbiz.widget.model.ModelFormField.SingleOption;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EEnumLiteral;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EModelElement;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.osgi.service.log.Logger;
public class EcoreUtils {
private static final Logger LOGGER = Logs.getLogger(EcoreUtils.class);
public static EClass copy(EClass eClass) {
return EcoreUtil.copy(eClass);
}
public static EAnnotation copy(EAnnotation eAnnotation) {
return EcoreUtil.copy(eAnnotation);
}
public static EStructuralFeature copy(EStructuralFeature eFeature) {
return EcoreUtil.copy(eFeature);
}
public static EOperation copy(EOperation eOperation) {
return EcoreUtil.copy(eOperation);
}
public static String packageToName(EPackage ePackage) {
StringBuffer sb = new StringBuffer();
URI uri = URI.createURI(ePackage.getNsURI());
sb.append("org.abchip.mimo");
sb.append(uri.path().replaceAll("\\/", "\\."));
return sb.toString();
}
public static EPackage buildEPackage(EPackage eRootPackage, String packageName) {
EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE;
EPackage ePackage = ecoreFactory.createEPackage();
ePackage.setName(packageName);
ePackage.setNsPrefix(eRootPackage.getNsPrefix() + "-" + packageName);
ePackage.setNsPrefix("biz-" + packageName);
ePackage.setNsURI(eRootPackage.getNsURI() + "/" + packageName);
return ePackage;
}
public static EClass buildEntityTypeEClass(Delegator delegator, List<ModelForm> forms, ModelEntity modelEntity) throws GenericEntityException {
EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE;
EClass eClass = ecoreFactory.createEClass();
setEntityCommon(delegator, modelEntity, eClass);
EGenericType eGenericType = ecoreFactory.createEGenericType();
eGenericType.setEClassifier(EntityPackage.eINSTANCE.getEntityType());
eClass.getEGenericSuperTypes().add(eGenericType);
eClass.getESuperTypes().add(EntityPackage.eINSTANCE.getEntityInfo());
for (String fieldName : getOwnedAttributeNames(modelEntity)) {
ModelField modelField = modelEntity.getField(fieldName);
EAttribute eAttribute = buildAttribute(delegator, forms, modelField);
eClass.getEStructuralFeatures().add(eAttribute);
}
return eClass;
}
public static EClass buildEntityTypedEClass(Delegator delegator, List<ModelForm> forms, EClass entityType, ModelEntity modelEntity) throws GenericEntityException {
EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE;
EClass eClass = ecoreFactory.createEClass();
setEntityCommon(delegator, modelEntity, eClass);
EGenericType eGenericType = ecoreFactory.createEGenericType();
eGenericType.setEClassifier(EntityPackage.eINSTANCE.getEntityTyped());
EGenericType eGenericType2 = ecoreFactory.createEGenericType();
eGenericType2.setEClassifier(entityType);
eGenericType.getETypeArguments().add(eGenericType2);
eClass.getEGenericSuperTypes().add(eGenericType);
eClass.getESuperTypes().add(EntityPackage.eINSTANCE.getEntityInfo());
for (String fieldName : getOwnedAttributeNames(modelEntity)) {
ModelField modelField = modelEntity.getField(fieldName);
EAttribute eAttribute = buildAttribute(delegator, forms, modelField);
eClass.getEStructuralFeatures().add(eAttribute);
}
return eClass;
}
public static EClass buildEntityEClass(Delegator delegator, List<ModelForm> forms, ModelEntity modelEntity) throws GenericEntityException {
EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE;
EClass eClass = ecoreFactory.createEClass();
setEntityCommon(delegator, modelEntity, eClass);
eClass.getESuperTypes().add(EntityPackage.eINSTANCE.getEntityIdentifiable());
eClass.getESuperTypes().add(EntityPackage.eINSTANCE.getEntityInfo());
for (String fieldName : getOwnedAttributeNames(modelEntity)) {
ModelField modelField = modelEntity.getField(fieldName);
EAttribute eAttribute = buildAttribute(delegator, forms, modelField);
eClass.getEStructuralFeatures().add(eAttribute);
}
return eClass;
}
public static EClass buildEntityNoteEClass(Delegator delegator, List<ModelForm> forms, ModelEntity modelEntity) {
EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE;
EClass eClass = ecoreFactory.createEClass();
setEntityCommon(delegator, modelEntity, eClass);
eClass.getESuperTypes().add(BizPackage.eINSTANCE.getBizEntityNote());
for (String fieldName : getOwnedAttributeNames(modelEntity)) {
ModelField modelField = modelEntity.getField(fieldName);
if (modelField.getName().equals("noteId"))
continue;
if (modelField.getName().equals("note"))
continue;
EAttribute eAttribute = buildAttribute(delegator, forms, modelField);
eClass.getEStructuralFeatures().add(eAttribute);
}
return eClass;
}
public static EEnum buildEnum(EPackage ePackage, Map<String, ? extends Object> context, ModelFormField formField) {
EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE;
EEnum eEnum = ecoreFactory.createEEnum();
eEnum.setName(Strings.firstToUpper(formField.getName()));
FieldInfo fieldInfo = formField.getFieldInfo();
String resource = Strings.firstToUpper(ePackage.getName());
if (resource.equals("Humanres"))
resource = "HumanRes";
resource = resource + "UiLabels";
if (fieldInfo instanceof ModelFormField.DropDownField) {
ModelFormField.DropDownField dropDown = (DropDownField) fieldInfo;
for (OptionSource optionSource : dropDown.getOptionSources()) {
if (optionSource instanceof ModelFormField.SingleOption) {
ModelFormField.SingleOption singleOption = (SingleOption) optionSource;
EEnumLiteral literal = ecoreFactory.createEEnumLiteral();
literal.setLiteral(singleOption.getKey().getOriginal());
String description = singleOption.getDescription().getOriginal();
String name = description.split("\\.")[1];
name = name.substring(0, name.length() - 1);
try {
String message = UtilProperties.getMessage(resource, name, context, Locale.ENGLISH);
message = message.replaceAll("-", "_");
literal.setName(message);
} catch (Exception e) {
LOGGER.error(e.getMessage());
}
eEnum.getELiterals().add(literal);
}
}
}
if (eEnum.getELiterals().isEmpty())
return null;
else
return eEnum;
}
private static void setEntityCommon(Delegator delegator, ModelEntity modelEntity, EClass eClass) {
eClass.setName(modelEntity.getEntityName());
if (modelEntity.getDescription() != null && !modelEntity.getDescription().trim().isEmpty() && !modelEntity.getDescription().trim().equalsIgnoreCase("NONE"))
addAnnotationKey(eClass, Frame.NS_PREFIX_FRAME, "help", modelEntity.getDescription().trim());
if (modelEntity.getTitle() != null && !modelEntity.getTitle().trim().isEmpty() && !modelEntity.getTitle().replaceAll(" ", "").equalsIgnoreCase(modelEntity.getEntityName()))
addAnnotationKey(eClass, Frame.NS_PREFIX_FRAME, "title", modelEntity.getTitle().trim());
if (modelEntity.getDefaultResourceName() != null && !modelEntity.getDefaultResourceName().trim().isEmpty()
&& !modelEntity.getDefaultResourceName().replaceAll(" ", "").equalsIgnoreCase(modelEntity.getEntityName() + "Labels"))
addAnnotationKey(eClass, Frame.NS_PREFIX_FRAME, "dictionary", modelEntity.getDefaultResourceName().trim());
}
public static void addAnnotationKey(EModelElement modelElement, String prefix, String key, String value) {
EAnnotation eAnnotation = modelElement.getEAnnotation(prefix);
if (eAnnotation == null) {
eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
eAnnotation.setSource(prefix);
modelElement.getEAnnotations().add(eAnnotation);
}
eAnnotation.getDetails().put(key, value);
}
public static String getAnnotationValue(EModelElement modelElement, String prefix, String key) {
EAnnotation eAnnotation = modelElement.getEAnnotation(prefix);
if (eAnnotation == null)
return null;
return eAnnotation.getDetails().get(key);
}
public static Set<String> getOwnedAttributeNames(ModelEntity modelEntity) {
Set<String> atts = new TreeSet<String>();
for (String attName : modelEntity.getPkFieldNames()) {
if (EntityPackage.eINSTANCE.getEntityIdentifiable().getEStructuralFeature(attName) != null)
continue;
atts.add(attName);
}
for (String attName : modelEntity.getNoPkFieldNames()) {
if (EntityPackage.eINSTANCE.getEntityIdentifiable().getEStructuralFeature(attName) != null)
continue;
if (EntityPackage.eINSTANCE.getEntityInfo().getEStructuralFeature(attName) != null)
continue;
atts.add(attName);
}
return atts;
}
public static EAttribute buildAttribute(Delegator delegator, List<ModelForm> forms, ModelField modelField) {
EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE;
EAttribute eAttribute = ecoreFactory.createEAttribute();
eAttribute.setName(modelField.getName());
if (modelField.getIsPk()) {
if (modelField.getModelEntity().getPksSize() == 1)
eAttribute.setID(true);
else
addAnnotationKey(eAttribute, Slot.NS_PREFIX_SLOT, "key", "true");
}
if (modelField.getIsNotNull())
eAttribute.setLowerBound(1);
if (modelField.getEnableAuditLog())
addAnnotationKey(eAttribute, Slot.NS_PREFIX_SLOT, "audit", "true");
if (modelField.getEncryptMethod() != EncryptMethod.FALSE)
addAnnotationKey(eAttribute, Slot.NS_PREFIX_SLOT, "encrypt", modelField.getEncryptMethod().name());
if (modelField.getDescription() != null && !modelField.getDescription().trim().isEmpty()) {
addAnnotationKey(eAttribute, Slot.NS_PREFIX_SLOT, "help", modelField.getDescription().trim());
// TODO
if (modelField.getDescription().trim().toLowerCase().contains("calculated")) {
// System.out.println(modelField.getModelEntity().getEntityName() + "." +
// modelField.getName());
// System.out.println(modelField.getDescription());
}
}
// String description =
// UtilHelpText.getEntityFieldDescription(modelField.getModelEntity().getEntityName(),
// modelField.getName(), delegator, Locale.US);
// if (!description.isEmpty())
// addAnnotationKey(eAttribute, Slot.NS_PREFIX_SLOT, "help", description);
if (modelField.getIsAutoCreatedInternal())
"".toString();
if (modelField.getFieldSet() != null && !modelField.getFieldSet().trim().isEmpty())
"".toString();
if (modelField.getValidators() != null && !modelField.getValidators().isEmpty())
"".toString();
setClassifier(delegator, forms, eAttribute, modelField);
return eAttribute;
}
public static void setClassifier(Delegator delegator, List<ModelForm> forms, EAttribute eAttribute, ModelField modelField) {
ModelFieldType modelFieldType = delegator.getModelFieldTypeReader(modelField.getModelEntity()).getModelFieldType(modelField.getType());
switch (modelField.getType()) {
case "name":
case "description":
case "credit-card-number":
case "credit-card-date":
case "email":
case "comment":
case "tel-number":
case "url":
addAnnotationKey(eAttribute, Slot.NS_PREFIX_FORMAT, "type", modelField.getType());
eAttribute.setEType(EcorePackage.eINSTANCE.getEString());
break;
// string
case "id-ne":
case "id-long-ne":
case "id-vlong-ne":
case "id":
case "id-long":
case "id-vlong":
case "blob":
case "long-varchar":
case "short-varchar":
case "value":
case "very-short":
case "very-long":
addAnnotationLength(eAttribute, modelFieldType);
eAttribute.setEType(EcorePackage.eINSTANCE.getEString());
break;
// big decimal
case "currency-amount":
case "currency-precise":
case "fixed-point":
addAnnotationKey(eAttribute, Slot.NS_PREFIX_FORMAT, "type", modelField.getType());
addAnnotationLength(eAttribute, modelFieldType);
eAttribute.setEType(EcorePackage.eINSTANCE.getEBigDecimal());
break;
// date
case "date-time":
case "date":
case "time":
eAttribute.setEType(EcorePackage.eINSTANCE.getEDate());
break;
// long
case "numeric":
eAttribute.setEType(EcorePackage.eINSTANCE.getELong());
addAnnotationLength(eAttribute, modelFieldType);
break;
// object
case "object":
eAttribute.setEType(EcorePackage.eINSTANCE.getEJavaObject());
break;
// byte array
case "byte-array":
eAttribute.setEType(EcorePackage.eINSTANCE.getEByteArray());
break;
// double
case "floating-point":
eAttribute.setEType(EcorePackage.eINSTANCE.getEDouble());
addAnnotationLength(eAttribute, modelFieldType);
break;
// char
case "indicator": {
setClassifierIndicator(forms, eAttribute, modelField);
break;
}
default:
LOGGER.warn("Unknown field type {}", modelField);
return;
}
}
private static void addAnnotationLength(EAttribute eAttribute, ModelFieldType modelFieldType) {
if (modelFieldType == null)
return;
if (modelFieldType.getSqlType().contains("(")) {
int x = modelFieldType.getSqlType().indexOf("(");
int y = modelFieldType.getSqlType().indexOf(")");
String token = modelFieldType.getSqlType().substring(x + 1, y);
String tokens[] = token.split(",");
if (tokens.length > 1) {
addAnnotationKey(eAttribute, Slot.NS_PREFIX_FORMAT, "precision", tokens[0].trim());
addAnnotationKey(eAttribute, Slot.NS_PREFIX_FORMAT, "scale", tokens[1].trim());
} else
addAnnotationKey(eAttribute, Slot.NS_PREFIX_FORMAT, "length", tokens[0].trim());
}
}
private static void setClassifierIndicator(List<ModelForm> forms, EAttribute eAttribute, ModelField modelField) {
ModelFormField formField = null;
for (ModelForm form : FormUtils.searchForm(forms, modelField.getModelEntity().getEntityName())) {
formField = FormUtils.searchField(form, modelField.getName());
if (formField != null)
break;
}
boolean isBoolean = FormUtils.isBoolean(modelField, formField);
boolean allowEmpty = FormUtils.allowEmpty(modelField, formField);
Object defaulValue = FormUtils.getDefaultValue(modelField, formField);
if (!allowEmpty)
eAttribute.setLowerBound(1);
if (isBoolean) {
if (!allowEmpty)
eAttribute.setEType(EcorePackage.eINSTANCE.getEBoolean());
else
eAttribute.setEType(EcorePackage.eINSTANCE.getEBooleanObject());
if (defaulValue == Boolean.TRUE)
eAttribute.setDefaultValue(defaulValue);
} else {
// TODO create Enum
addAnnotationKey(eAttribute, Slot.NS_PREFIX_FORMAT, "type", modelField.getType());
eAttribute.setEType(EcorePackage.eINSTANCE.getEString());
eAttribute.setDefaultValue(defaulValue);
}
}
}
|
[
"dev@abchip.it"
] |
dev@abchip.it
|
8cc264e373507894412815c1fcaa9bfca5a37890
|
072b24fa9a8d5bae5d1c2be04322c21d3b644c40
|
/week-09/day-02/Frontend/src/main/java/com/api/frontend/models/ErrorMessage.java
|
4c50911987089f2d9d54cd1fcfa59e981db85a0f
|
[] |
no_license
|
green-fox-academy/aurelreli
|
82d78271e6eb3a839a338020ede6cb555d3f51e3
|
765baf2a305e8884b8f38245cac846d755dedd2b
|
refs/heads/master
| 2022-12-17T21:09:34.794554
| 2020-09-18T15:28:13
| 2020-09-18T15:28:13
| 279,875,920
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 279
|
java
|
package com.api.frontend.models;
public class ErrorMessage {
private String error;
public ErrorMessage(String message) {
this.error = message;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
}
|
[
"aurelreli@gmail.com"
] |
aurelreli@gmail.com
|
99e28b51008acff27a5674c47dcd6cd38a67575e
|
8a0263000145cbb73e63368eb5b137f3af57cf78
|
/src/com/fantastic/web/dao/controller/TradiaAuthenticationSuccessHandler.java
|
f655a665c3138adacffa7e8384f3a5aefd7b4616
|
[] |
no_license
|
joshua5263/Tradia
|
06fdc78205184f39162b383366d2855125549375
|
6c1ab4143cc1a6319a18e54a3864121971ba1a32
|
refs/heads/master
| 2021-01-13T16:10:09.625737
| 2015-09-01T04:59:11
| 2015-09-01T04:59:11
| 40,282,910
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,822
|
java
|
package com.fantastic.web.dao.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.DefaultRedirectStrategy;
import org.springframework.security.web.RedirectStrategy;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import com.fantastic.web.dao.MemberDao;
import com.fantastic.web.vo.Member;
public class TradiaAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
private MemberDao memberDao;
@Autowired
public void setMemberDao(MemberDao memberDao) {
this.memberDao = memberDao;
}
@Override
public void onAuthenticationSuccess(HttpServletRequest request,
HttpServletResponse response, Authentication authentication) throws IOException,
ServletException {
//로그인 한 유저 아이디 가져오기
String uid = authentication.getName();
//유저의 DefaultRole을 가져오기 위해 Member vo와 Dao import
Member m = memberDao.getMember(uid);
//유저의 DefaultRole을 type이라는 변수에 담기
String type = m.getLevels();
//일반 유저일 경우 로그인 성공 시 이동할 타겟 페이지
String targetUrl = "/selectpreferlocation/selectpreferlocation";
//역할에 따라 로그인 성공 시 이동할 타겟 페이지 조건문으로 설정
if(type.equals("ROLE_Admin")){
targetUrl = "/main/travelMain";
}
//RedirectStrategy를 통해 페이지 이동시키기
RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
redirectStrategy.sendRedirect(request, response, targetUrl);
}
}
|
[
"CEO@CEO_Park"
] |
CEO@CEO_Park
|
3c04dd9f8b7ae9c1f0adbcbb345266e5917bc5a4
|
b92fccda5916202f4a26e4da4a0ee349c9674682
|
/app/src/main/java/com/example/gridview/ThanhvienActivity.java
|
306ea342041f4bc1c78b65dfa9fb92a7c339654a
|
[] |
no_license
|
Thuan-167/baibaocao
|
e08c549521ca0409ed85404a9903b77af8c8afd9
|
8a303352aa1dd61d197cd9063f6e326590325db2
|
refs/heads/master
| 2023-02-11T23:15:17.730480
| 2020-12-30T07:50:22
| 2020-12-30T07:50:22
| 325,485,772
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 834
|
java
|
package com.example.gridview;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
public class ThanhvienActivity extends AppCompatActivity {
private Button button2;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.thanhvien);
button2=(Button) findViewById(R.id.button2);
button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(ThanhvienActivity.this, MainActivity.class);
startActivity(intent);
}
});
}
}
|
[
"thuanhuynh100@gmail.com"
] |
thuanhuynh100@gmail.com
|
7c1b4155ddc142096dc571f19753432d331bc90b
|
489ab0d1ed57f90c3c72f3e645cd64d45efa7313
|
/src/_04_popcorn/popcorn_runner.java
|
29251feb0e6fb608ff7fbf43c61f5b287fe83ca3
|
[] |
no_license
|
League-Level1-Student/level1-module1-williamyufan
|
576785300b703d05e73f35470f6b8ca9df7a262f
|
88709dcd3905e318e9e4ee10ee89224ddf7295a3
|
refs/heads/master
| 2020-07-08T13:47:12.040147
| 2019-12-12T04:00:11
| 2019-12-12T04:00:11
| 203,693,056
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 437
|
java
|
package _04_popcorn;
import javax.swing.JOptionPane;
public class popcorn_runner {
public static void main(String[] args) {
String y= JOptionPane.showInputDialog("What flavor do you want?");
String j=JOptionPane.showInputDialog("How many minutes do you want the popcorn to be cocked?");
int u=Integer.parseInt(j);
Popcorn n=new Popcorn(y);
Microwave b=new Microwave();
b.putInMicrowave(n);
b.setTime(u);
b.startMicrowave();
}
}
|
[
"league@imac-23.attlocal.net"
] |
league@imac-23.attlocal.net
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.