blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ca9f7c58c3e126f2e8e970b525f91e72f28583f1
|
0515f5333948bdd2a6ef9c0bb9888578d3b62573
|
/src/main/java/ua/com/juja/garazd/sqlcmd/controller/command/UpdateEntry.java
|
5668eeed3ad29c6fb0f0689e3901062e93e66f79
|
[] |
no_license
|
Garazd/SqlCmd
|
3bbc1ff41b79d0d1abcc35e84325bf14c5ba5f41
|
e2c8bb1e2fb972ca4eb8d9bc6bb331abcda1bdf0
|
refs/heads/master
| 2020-05-22T09:31:50.493113
| 2016-11-08T20:32:11
| 2016-11-08T20:32:11
| 59,953,771
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,538
|
java
|
package ua.com.juja.garazd.sqlcmd.controller.command;
import java.util.LinkedHashMap;
import java.util.Map;
import ua.com.juja.garazd.sqlcmd.model.DatabaseManager;
import ua.com.juja.garazd.sqlcmd.view.View;
public class UpdateEntry implements Command {
private DatabaseManager manager;
private View view;
public UpdateEntry(DatabaseManager manager, View view) {
this.manager = manager;
this.view = view;
}
@Override
public boolean canProcess(String command) {
return command.startsWith("updateEntry|");
}
@Override
public void process(String command) {
String[] data = command.split("\\|");
if (data.length % 2 == 0) {
throw new IllegalArgumentException(String.format("Must be an odd number of parameters in a format " +
"'updateEntry|tableName|idColumn|columnName1|newValue1|columnName2|newValue2|...|columnNameN|newValueN', " +
"but you sent: '%s'", command));
}
String tableName = data[1];
int id = Integer.parseInt(data[2]);
Map<String, Object> tableData = new LinkedHashMap<>();
for (int index = 1; index < (data.length / 2); index++) {
String columnName = data[index * 2 + 1];
String value = data[index * 2 + 2];
tableData.put(columnName, value);
}
manager.updateTable(tableName, id, tableData);
view.write(String.format("Recording %s in the table '%s' successfully updated.", id, tableName));
}
}
|
[
"GarazdVZ@gmail.com"
] |
GarazdVZ@gmail.com
|
d4c18f0b80858f6dce626e63df168a0114296b7b
|
ac4ff5b38e62b9f3883ab48a2b9f29403c29fdd5
|
/lsq/src/main/java/com/xpsoft/oa/service/hrm/TrainSurveyService.java
|
1f506eccc9976f8d360cc1eb697657b8c926cbae
|
[] |
no_license
|
wangscript/lsqoa
|
e571f3a0f7f01fd660730bd34779b9cfcc3c749e
|
9a1587bb7c43c23e4f6b555b582b8df89d9ac7a4
|
refs/heads/master
| 2021-01-22T08:23:12.129364
| 2013-08-05T13:54:54
| 2013-08-05T13:54:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
package com.xpsoft.oa.service.hrm;
import java.util.Map;
import com.xpsoft.core.service.BaseService;
import com.xpsoft.oa.model.hrm.TrainSurvey;
public interface TrainSurveyService extends BaseService<TrainSurvey>{
public TrainSurvey saveTrainSurvey(Map<String,Object> map);
public void removeTrainSurvey(String[]ids);
}
|
[
"loushi135@163.com"
] |
loushi135@163.com
|
127fc8fec1393d64ecd4c5ca6f495ab52a1a567e
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/16/org/jfree/data/time/Minute_next_281.java
|
995febb7dff7faf77b373bcb49aa8928d1fa305e
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 859
|
java
|
org jfree data time
repres minut immut requir
link regular time period regulartimeperiod subclass
minut regular time period regulartimeperiod serializ
return minut
minut
regular time period regulartimeperiod
minut result
minut minut hour
result minut minut hour gethour
minut hour
hour hour nexthour hour hour gethour
hour nexthour
result minut minut hour hour nexthour
result
result
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
37a699a4432640027a32f19ff40dcb3dd3db21c8
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/spring-data-rest/src/test/java/com/surya/books/projections/SpringDataProjectionLiveTest.java
|
79c3cef4c6c39ed85a084e2c0e7eb32b391de82e
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,214
|
java
|
package com.surya.books.projections;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import io.restassured.RestAssured;
import io.restassured.response.Response;
import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.context.junit4.SpringRunner;
import com.surya.books.SpringDataRestApplication;
import com.surya.books.models.Author;
import com.surya.books.models.Book;
import com.surya.books.repositories.AuthorRepository;
import com.surya.books.repositories.BookRepository;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = SpringDataRestApplication.class, webEnvironment = WebEnvironment.DEFINED_PORT)
public class SpringDataProjectionLiveTest {
private static final String BOOK_ENDPOINT = "http://localhost:8080/books";
private static final String AUTHOR_ENDPOINT = "http://localhost:8080/authors";
@Autowired
private BookRepository bookRepo;
@Autowired
private AuthorRepository authorRepo;
@Before
public void setup() {
if (!bookRepo.findById(1L).isPresent()) {
Book book = new Book("Animal Farm");
book.setIsbn("978-1943138425");
book = bookRepo.save(book);
Author author = new Author("George Orwell");
author = authorRepo.save(author);
author.setBooks(Arrays.asList(book));
author = authorRepo.save(author);
}
}
@Test
public void whenGetBook_thenOK() {
final Response response = RestAssured.get(BOOK_ENDPOINT + "/1");
assertEquals(200, response.getStatusCode());
assertTrue(response.asString().contains("isbn"));
assertFalse(response.asString().contains("authorCount"));
// System.out.println(response.asString());
}
@Test
public void whenGetBookProjection_thenOK() {
final Response response = RestAssured.get(BOOK_ENDPOINT + "/1?projection=customBook");
assertEquals(200, response.getStatusCode());
assertFalse(response.asString().contains("isbn"));
assertTrue(response.asString().contains("authorCount"));
// System.out.println(response.asString());
}
@Test
public void whenGetAllBooks_thenOK() {
final Response response = RestAssured.get(BOOK_ENDPOINT);
assertEquals(200, response.getStatusCode());
assertFalse(response.asString().contains("isbn"));
assertTrue(response.asString().contains("authorCount"));
// System.out.println(response.asString());
}
@Test
public void whenGetAuthorBooks_thenOK() {
final Response response = RestAssured.get(AUTHOR_ENDPOINT + "/1/books");
assertEquals(200, response.getStatusCode());
assertFalse(response.asString().contains("isbn"));
assertTrue(response.asString().contains("authorCount"));
System.out.println(response.asString());
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
be463fe2137612b88c6ee6d3162e847b874f64a0
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/15/15_b5a15888d5153ed836c34ba9f4bd4499c8a6a0f6/CustomerWelcomeAction/15_b5a15888d5153ed836c34ba9f4bd4499c8a6a0f6_CustomerWelcomeAction_t.java
|
8c335771384324cdf02e92784e0777840107bcfd
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,946
|
java
|
package com.action;
import java.util.ArrayList;
import java.util.Map;
import com.dao.SysuserDao;
import com.dao.TransactionDao;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.pojo.Sysuser;
import com.pojo.Transaction;
public class CustomerWelcomeAction extends ActionSupport {
private String oldPassword;
private String newPassword;
private String confirmPassword;
private Sysuser user;
private int isSuccess;
public String getOldPassword() {
return oldPassword;
}
public void setOldPassword(String oldPassword) {
this.oldPassword = oldPassword;
}
public String getNewPassword() {
return newPassword;
}
public void setNewPassword(String newPassword) {
this.newPassword = newPassword;
}
public String getConfirmPassword() {
return confirmPassword;
}
public void setConfirmPassword(String confirmPassword) {
this.confirmPassword = confirmPassword;
}
public Sysuser getUser() {
return user;
}
public void setUser(Sysuser user) {
this.user = user;
}
public int getIsSuccess() {
return isSuccess;
}
public void setIsSuccess(int isSuccess) {
this.isSuccess = isSuccess;
}
public String welcome() {
Map session = ActionContext.getContext().getSession();
user = (Sysuser) session.get(LoginAction.SYSUSER);
return SUCCESS;
}
public String changePassword() {
this.isSuccess = 0;
return SUCCESS;
}
public String submit(){
Map session = ActionContext.getContext().getSession();
user = (Sysuser) session.get(LoginAction.SYSUSER);
if (oldPassword != null && newPassword != null && confirmPassword != null) {
oldPassword.trim();
newPassword.trim();
confirmPassword.trim();
if (newPassword.equals("")) {
this.addActionError("Password can not be empty, or only space!");
this.isSuccess = -1;
return ERROR;
} else if(!newPassword.equals(confirmPassword)){
this.addActionError("Confirm password is not the same as new password!");
this.isSuccess = -1;
return ERROR;
}
Sysuser changePswUser = null;
try {
changePswUser =SysuserDao.getInstance().getByUserId(user.getId());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(!AuthorizationFilter.MD5(oldPassword).equals(changePswUser.getPassword())){
this.addActionError("Current password is Incorrect!");
this.isSuccess = -1;
return ERROR;
}else{
changePswUser.setPassword(AuthorizationFilter.MD5(newPassword));
try {
SysuserDao.getInstance().update(changePswUser);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this.isSuccess = 1;
return SUCCESS;
}
}
this.addActionError("Password shouldn't be empty.");
this.isSuccess = -1;
return ERROR;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e73d7eac83d1efd083c559503f28b1c9273475c6
|
5c14f0308673e38da9b0bdc861953e017b8651fd
|
/IU/src/external/PullToRefresh/PullToRefreshGridView.java
|
00237179b5f87b44196671732152ce017bd5c6a1
|
[] |
no_license
|
haiiv/IU
|
64dc675bde3b50683dcf35915ad138123372c190
|
8a91c507f7e63d03e6aace5c7a5b22705478a3ad
|
refs/heads/master
| 2021-01-15T15:38:18.830061
| 2015-05-09T02:09:25
| 2015-05-09T02:09:25
| 36,289,989
| 1
| 0
| null | 2015-05-26T10:54:23
| 2015-05-26T10:54:23
| null |
UTF-8
|
Java
| false
| false
| 3,583
|
java
|
/*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
*
* 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 external.PullToRefresh;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.util.AttributeSet;
import android.view.View;
import android.widget.GridView;
import com.aiyou.R;
import external.PullToRefresh.internal.EmptyViewMethodAccessor;
public class PullToRefreshGridView extends
PullToRefreshAdapterViewBase<GridView> {
public PullToRefreshGridView(Context context) {
super(context);
}
public PullToRefreshGridView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PullToRefreshGridView(Context context, Mode mode) {
super(context, mode);
}
public PullToRefreshGridView(Context context, Mode mode,
AnimationStyle style) {
super(context, mode, style);
}
@Override
public final Orientation getPullToRefreshScrollDirection() {
return Orientation.VERTICAL;
}
@Override
protected final GridView createRefreshableView(Context context,
AttributeSet attrs) {
final GridView gv;
if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
gv = new InternalGridViewSDK9(context, attrs);
} else {
gv = new InternalGridView(context, attrs);
}
// Use Generated ID (from res/values/ids.xml)
gv.setId(R.id.gridview);
return gv;
}
class InternalGridView extends GridView implements EmptyViewMethodAccessor {
public InternalGridView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void setEmptyView(View emptyView) {
PullToRefreshGridView.this.setEmptyView(emptyView);
}
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
@TargetApi(9)
final class InternalGridViewSDK9 extends InternalGridView {
public InternalGridViewSDK9(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected boolean overScrollBy(int deltaX, int deltaY, int scrollX,
int scrollY, int scrollRangeX, int scrollRangeY,
int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
final boolean returnValue = super.overScrollBy(deltaX, deltaY,
scrollX, scrollY, scrollRangeX, scrollRangeY,
maxOverScrollX, maxOverScrollY, isTouchEvent);
// Does all of the hard work...
OverscrollHelper.overScrollBy(PullToRefreshGridView.this, deltaX,
scrollX, deltaY, scrollY, isTouchEvent);
return returnValue;
}
}
}
|
[
"sollian@qq.com"
] |
sollian@qq.com
|
0acf00bb0bae389ba86abee63e0fcf6b1a82951d
|
e7861c0ed1b49224b6c4ccf6dbfc63be61a026e5
|
/FRONT/secondWebProject/src/board/controller/BoardInsertServlet.java
|
a35a4963c88527c058042d80ed4ca8979b7c463f
|
[] |
no_license
|
kdw912001/kh
|
7d7610b4ddaab286714131d1c9108373f6c920a9
|
73c511db0723e0bc49258d8d146ba6f8ee9db762
|
refs/heads/master
| 2020-04-06T10:19:58.220792
| 2019-05-03T18:41:57
| 2019-05-03T18:41:57
| 157,376,594
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,954
|
java
|
package board.controller;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Enumeration;
import javax.servlet.RequestDispatcher;
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 org.apache.commons.fileupload.servlet.ServletFileUpload;
import com.oreilly.servlet.MultipartRequest;
import com.oreilly.servlet.multipart.DefaultFileRenamePolicy;
import board.model.service.BoardService;
import board.model.vo.Board;
/**
* Servlet implementation class BoardInsertServlet
*/
@WebServlet("/binsert")
public class BoardInsertServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public BoardInsertServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// 게시글 원글 등록 처리용 컨트롤러
//enctype="multipart/form-data" 로 전송되었는지 확인
RequestDispatcher view = null;
if(!ServletFileUpload.isMultipartContent(request)) {
view = request.getRequestDispatcher("views/board/boardError.jsp");
request.setAttribute("message", "form의 enctype 속성 사용 안 되었음.");
view.forward(request, response);
}
//업로드할 파일의 용량 제한 : 10Mbyte 로 제한한다면
int maxSize = 1024 * 1024 * 10;
//파일이 저장될 폴더 지정 :
//content directory 안에 파일저장폴더를 정한 경우
//현재 웹 컨테이너에서 구동중인 웹 에플리케이션의
//루트 폴더에 대한 경로 알아냄
String root = request.getSession().getServletContext().getRealPath("/");
//업로드되는 파일의 저장 폴더를 루트와 연결함
String savePath = root + "files/board";
//request 를 MultipartRequest 객체로 변환함
MultipartRequest mrequest = new MultipartRequest(
request, savePath, maxSize, "UTF-8",
new DefaultFileRenamePolicy());
//전송 온 값 꺼내서 객체에 저장
Board board = new Board();
board.setBoardTitle(mrequest.getParameter("btitle"));
board.setBoardWriter(mrequest.getParameter("bwriter"));
board.setBoardContent(mrequest.getParameter("bcontent"));
//전송온 파일의 파일명만 추출하고, 이름바꾸기 처리
String originalFileName = mrequest.getFilesystemName("bupfile");
//전송온 파일이 있을 때만 이름바꾸기 진행함
if(originalFileName != null) {
//바꿀 파일명 만들기
//"년월일시분초.확장자"
SimpleDateFormat sdf =
new SimpleDateFormat("yyyyMMddHHmmss");
String renameFileName = sdf.format(new java.sql.Date(System.currentTimeMillis()))
+ "." + originalFileName.substring(originalFileName.lastIndexOf(".") + 1);
//java.io.File 객체의 renameTo() 메소드 사용
File originFile = new File(savePath + "\\" + originalFileName);
File renameFile = new File(savePath + "\\" + renameFileName);
if(!originFile.renameTo(renameFile)) {
//파일명 직접 바꾸기함
//원본 파일의 내용 읽어서, 리네임 파일에 복사 기록하기
//원본 파일 삭제함
int read = -1;
byte[] buf = new byte[1024];
FileInputStream fin =
new FileInputStream(originFile);
FileOutputStream fout =
new FileOutputStream(renameFile);
while((read = fin.read(buf, 0, buf.length)) != -1) {
fout.write(buf, 0, read);
}
fin.close();
fout.close();
originFile.delete();
} //renameTo
board.setBoardOriginalFileName(originalFileName);
board.setBoardRenameFileName(renameFileName);
} //첨부파일 있을 때
//서비스모델로 객체 전달하고 결과받기
int result = new BoardService().insertBoard(board);
if(result > 0) {
//글 등록이 성공하면, 게시글 목록보기가 실행되게 함
//목록에 추가된 원글이 보여져야 됨
response.sendRedirect("/second/blist?page=1");
}else {
view = request.getRequestDispatcher("views/board/boardError.jsp");
request.setAttribute("message", "개시글 원글 등록 실패!");
view.forward(request, response);
}
}
private String changeFileName(String originFileName) {
return null;
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
|
[
"kdw912001@naver.com"
] |
kdw912001@naver.com
|
384abbeae0607a706c8623adae4c0f167bba3e37
|
6e4331de3349b594ed842ee763013b34aec97286
|
/CoronaGoBackendApp/src/main/java/com/coronago/misc/webservice/ItemsServiceImpl.java
|
b4166347f26e27d6319992d9d08454179662a455
|
[
"Apache-2.0"
] |
permissive
|
VanenburgSoftware/CoronaGo
|
2c927cec76aa5e4b85d5e0b024c593d798040026
|
bcaf717f293864006103de32ddac52371c911166
|
refs/heads/master
| 2022-07-02T12:48:14.201362
| 2020-04-08T06:08:52
| 2020-04-08T06:08:52
| 252,699,233
| 0
| 1
|
Apache-2.0
| 2022-06-03T02:16:39
| 2020-04-03T10:20:56
|
TypeScript
|
UTF-8
|
Java
| false
| false
| 486
|
java
|
package com.coronago.misc.webservice;
import java.util.List;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import com.coronago.misc.logic.ItemBLImpl;
import com.coronago.misc.model.Item;
@Produces(MediaType.APPLICATION_JSON)
@Path("/items")
public class ItemsServiceImpl {
@GET
@Path("/getall")
public List<Item> getAllItems() {
ItemBLImpl itemBLImpl = new ItemBLImpl();
return itemBLImpl.getAll(null);
}
}
|
[
"vvinsu@vanenburgsoftware.com"
] |
vvinsu@vanenburgsoftware.com
|
8f50a7eecc6a71f0b032538a913bb9aac4b2ed00
|
973fccc219e22c87f2fdc60e1fcec814f7f91e89
|
/framework/webtools/src/com/ilscipio/scipio/webtools/web/AdminTurboWebSocket.java
|
385353605e63e3f79c8f89291df33ce78befcee2
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-jdom",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"MPL-1.1",
"CPL-1.0",
"GFDL-1.1-or-later",
"MPL-2.0",
"CC-BY-2.5",
"SPL-1.0",
"LicenseRef-scancode-proprietary-license",
"CDDL-1.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] |
permissive
|
ilscipio/scipio-erp
|
170462a6bd6ad428aa9810ece576765b263ea592
|
0258c890ee1824c047b9306717e3b301e63537dd
|
refs/heads/master
| 2023-03-09T11:18:18.929234
| 2023-02-14T04:58:19
| 2023-02-14T04:59:08
| 60,078,463
| 344
| 224
|
Apache-2.0
| 2023-03-04T15:28:32
| 2016-05-31T10:00:37
|
Java
|
UTF-8
|
Java
| false
| false
| 897
|
java
|
package com.ilscipio.scipio.webtools.web;
import com.ilscipio.scipio.web.BrokerSessionConfigurator;
import com.ilscipio.scipio.web.GenericWebSocket;
import com.ilscipio.scipio.web.SocketPermissionVerifier;
import com.ilscipio.scipio.web.hotwire.TurboWebSocket;
import org.ofbiz.base.util.Debug;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;
/**
* Implements Turbo.js (https://hotwire.dev) web socket for hotwire for admin webapp.
*/
@ServerEndpoint(value = "/ws-turbo/{channel}/{action}", configurator = BrokerSessionConfigurator.class)
public class AdminTurboWebSocket extends TurboWebSocket {
private static final Debug.OfbizLogger module = Debug.getOfbizLogger(java.lang.invoke.MethodHandles.lookup().lookupClass());
@Override
protected SocketPermissionVerifier getPermissionVerifier(Session session) { return GenericWebSocket.ADMIN_PERM; }
}
|
[
"pplx@ilscipio.com"
] |
pplx@ilscipio.com
|
8b0afb82e845a3eb45fab2a9cb145f44a8fba4e8
|
fffabca89318b11d316913b3b6309a929293b186
|
/elb/src/test/java/org/jclouds/elb/parse/DescribeLoadBalancersResponseTest.java
|
05cc09573e1a402d825ce36c32f63bfd12851638
|
[
"Apache-2.0"
] |
permissive
|
apache/jclouds-labs-aws
|
c7e225a4c8804343b9bb5fd1c8e032c5888c0c18
|
e57e8b7879344fdb9816a1d8c73ae06f2f056a89
|
refs/heads/master
| 2023-08-17T14:04:17.940719
| 2022-03-26T09:31:18
| 2022-03-26T09:31:18
| 164,282,119
| 4
| 6
| null | 2021-02-12T09:57:56
| 2019-01-06T06:36:59
|
Java
|
UTF-8
|
Java
| false
| false
| 3,322
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.elb.parse;
import static org.testng.Assert.assertEquals;
import java.io.InputStream;
import org.jclouds.collect.IterableWithMarker;
import org.jclouds.collect.IterableWithMarkers;
import org.jclouds.date.internal.SimpleDateFormatDateService;
import org.jclouds.elb.domain.HealthCheck;
import org.jclouds.elb.domain.ListenerWithPolicies;
import org.jclouds.elb.domain.LoadBalancer;
import org.jclouds.elb.domain.Protocol;
import org.jclouds.elb.xml.DescribeLoadBalancersResultHandler;
import org.jclouds.http.functions.BaseHandlerTest;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet;
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
@Test(groups = "unit", testName = "DescribeLoadBalancersResponseTest")
public class DescribeLoadBalancersResponseTest extends BaseHandlerTest {
public void test() {
InputStream is = getClass().getResourceAsStream("/describe_loadbalancers.xml");
IterableWithMarker<LoadBalancer> expected = expected();
DescribeLoadBalancersResultHandler handler = injector.getInstance(DescribeLoadBalancersResultHandler.class);
IterableWithMarker<LoadBalancer> result = factory.create(handler).parse(is);
assertEquals(result.toString(), expected.toString());
}
public IterableWithMarker<LoadBalancer> expected() {
return IterableWithMarkers.from(ImmutableSet.of(
LoadBalancer.builder()
.name("my-load-balancer")
.createdTime(new SimpleDateFormatDateService().iso8601DateParse("2010-03-03T20:54:45.110Z"))
.dnsName("my-load-balancer-1400212309.us-east-1.elb.amazonaws.com")
.healthCheck(HealthCheck.builder()
.interval(300)
.target("HTTP:80/index.html")
.healthyThreshold(3)
.timeout(30)
.unhealthyThreshold(5).build())
.instanceIds(ImmutableSet.of("i-5b33e630", "i-8f26d7e4", "i-5933e632"))
.listener(ListenerWithPolicies.builder().protocol(Protocol.HTTP).port(80).instancePort(80).build())
.listener(ListenerWithPolicies.builder().protocol(Protocol.TCP).port(443).instancePort(443).build())
.availabilityZone("us-east-1a")
.build()));
}
}
|
[
"adrian.f.cole@gmail.com"
] |
adrian.f.cole@gmail.com
|
376b83642c2347f55bd85321900c28d559359072
|
b34654bd96750be62556ed368ef4db1043521ff2
|
/topcoder_security_groups_frontend_part_1/trunk/src/java/tests/com/topcoder/security/groups/actions/ViewGroupActionAccTest.java
|
1886e4364429788d5c2648485cbbe625daa6c66b
|
[] |
no_license
|
topcoder-platform/tcs-cronos
|
81fed1e4f19ef60cdc5e5632084695d67275c415
|
c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6
|
refs/heads/master
| 2023-08-03T22:21:52.216762
| 2019-03-19T08:53:31
| 2019-03-19T08:53:31
| 89,589,444
| 0
| 1
| null | 2019-03-19T08:53:32
| 2017-04-27T11:19:01
| null |
UTF-8
|
Java
| false
| false
| 2,402
|
java
|
/*
* Copyright (C) 2011 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.security.groups.actions;
import junit.framework.TestCase;
import org.easymock.EasyMock;
import org.easymock.IMocksControl;
import com.opensymphony.xwork2.Action;
import com.topcoder.security.groups.actions.SecurityGroupsActionException;
import com.topcoder.security.groups.actions.ViewGroupAction;
import com.topcoder.security.groups.model.Group;
import com.topcoder.security.groups.services.GroupService;
import com.topcoder.security.groups.services.SecurityGroupException;
/**
* Accuracy test for {@link ViewGroupAction}.
* @author BlackMagic
* @version 1.0
*/
public class ViewGroupActionAccTest extends TestCase {
/**
* Represents the instance used for test.
*/
private ViewGroupAction instance;
/**
* Represents the {@link IMocksControl} instance used for test.
*/
private IMocksControl control = EasyMock.createControl();
/**
* Represents the {@link GroupService} used for test.
*/
private GroupService groupService;
/**
* Initializes the instance used for test.
*/
public void setUp() {
instance = new ViewGroupAction();
groupService = control.createMock(GroupService.class);
instance.setGroupService(groupService);
}
/**
* Accuracy test for {@link ViewGroupAction#execute()}.
* @throws Exception to JUnit.
*/
public void testExecuteAccuracy() throws Exception {
instance.setGroupId(1);
groupService.get(1);
Group group = new Group();
EasyMock.expectLastCall().andReturn(group).times(1);
control.replay();
assertEquals("The result should be correct.", Action.SUCCESS, instance.execute());
assertEquals("The result should be correct.", group, instance.getGroup());
control.verify();
}
/**
* Accuracy test for {@link ViewGroupAction#execute()}.
* @throws Exception to JUnit.
*/
public void testExecuteAccuracy2() throws Exception {
instance.setGroupId(1);
groupService.get(1);
EasyMock.expectLastCall().andThrow(new SecurityGroupException("test")).times(1);
control.replay();
try {
instance.execute();
fail();
} catch (SecurityGroupsActionException e) {
//pass
}
control.verify();
}
}
|
[
"victorsam@fb370eea-3af6-4597-97f7-f7400a59c12a"
] |
victorsam@fb370eea-3af6-4597-97f7-f7400a59c12a
|
1cf0e8329e181aed26ba5a6fced09a2ff6b21a57
|
9c6d2de9e85c679c9b9bae0c91f84fae0d410053
|
/2016-01/General Project/Grupo 11/Taller 2 Entrega 2/Gramatica Xtext SQL/org.xtext.sql/src-gen/org/xtext/example/sQL/column.java
|
1ac39b15180848c1337e38db592367dfe09ecc8c
|
[] |
no_license
|
phillipus85/ETLMetricsDataset
|
902b526900b8c91889570b15538fa92df0db980f
|
7756381f9d580911b1dff9048f3cff002b110b19
|
refs/heads/master
| 2021-06-21T12:02:38.368652
| 2017-07-12T05:13:21
| 2017-07-12T05:13:21
| 79,398,957
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,298
|
java
|
/**
* generated by Xtext 2.9.1
*/
package org.xtext.example.sQL;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>column</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.xtext.example.sQL.column#getName <em>Name</em>}</li>
* <li>{@link org.xtext.example.sQL.column#getType <em>Type</em>}</li>
* </ul>
* </p>
*
* @see org.xtext.example.sQL.SQLPackage#getcolumn()
* @model
* @generated
*/
public interface column extends EObject
{
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.xtext.example.sQL.SQLPackage#getcolumn_Name()
* @model
* @generated
*/
String getName();
/**
* Sets the value of the '{@link org.xtext.example.sQL.column#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
/**
* Returns the value of the '<em><b>Type</b></em>' attribute.
* The literals are from the enumeration {@link org.xtext.example.sQL.DataType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Type</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Type</em>' attribute.
* @see org.xtext.example.sQL.DataType
* @see #setType(DataType)
* @see org.xtext.example.sQL.SQLPackage#getcolumn_Type()
* @model
* @generated
*/
DataType getType();
/**
* Sets the value of the '{@link org.xtext.example.sQL.column#getType <em>Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Type</em>' attribute.
* @see org.xtext.example.sQL.DataType
* @see #getType()
* @generated
*/
void setType(DataType value);
} // column
|
[
"n.bonet2476@uniandes.edu.co"
] |
n.bonet2476@uniandes.edu.co
|
b26cc1f4f1243f62adf9a1bda8382a87933c8424
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE23_Relative_Path_Traversal/CWE23_Relative_Path_Traversal__connect_tcp_81a.java
|
256a10da1d0d83490dbce3293babd95bb602f628
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 3,998
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE23_Relative_Path_Traversal__connect_tcp_81a.java
Label Definition File: CWE23_Relative_Path_Traversal.label.xml
Template File: sources-sink-81a.tmpl.java
*/
/*
* @description
* CWE: 23 Relative Path Traversal
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded string
* Sinks: readFile
* BadSink : no validation
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE23_Relative_Path_Traversal;
import testcasesupport.*;
import java.io.*;
import javax.servlet.http.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE23_Relative_Path_Traversal__connect_tcp_81a extends AbstractTestCase
{
public void bad() throws Throwable
{
String data;
data = ""; /* Initialize data */
/* Read data using an outbound tcp connection */
{
Socket sock = null;
BufferedReader buffread = null;
InputStreamReader instrread = null;
try {
/* Read data using an outbound tcp connection */
sock = new Socket("host.example.org", 39544);
/* read input from socket */
instrread = new InputStreamReader(sock.getInputStream(), "UTF-8");
buffread = new BufferedReader(instrread);
/* POTENTIAL FLAW: Read data using an outbound tcp connection */
data = buffread.readLine();
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally {
/* clean up stream reading objects */
try {
if( buffread != null )
{
buffread.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", ioe);
}
try {
if( instrread != null )
{
instrread.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", ioe);
}
/* clean up socket objects */
try {
if( sock != null )
{
sock.close();
}
}
catch( IOException e )
{
IO.logger.log(Level.WARNING, "Error closing Socket", e);
}
}
}
CWE23_Relative_Path_Traversal__connect_tcp_81_base o = new CWE23_Relative_Path_Traversal__connect_tcp_81_bad();
o.action(data );
}
public void good() throws Throwable
{
goodG2B();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
String data;
/* FIX: Use a hardcoded string */
data = "foo";
CWE23_Relative_Path_Traversal__connect_tcp_81_base o = new CWE23_Relative_Path_Traversal__connect_tcp_81_goodG2B();
o.action(data );
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
b0c98400d300d5f960592282d8c1d718a07db623
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-13377-20-12-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/web/XWikiAction_ESTest_scaffolding.java
|
73c0127ac0e1880bfb179259cd8a9a2cb89b6465
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 433
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Mar 30 20:00:16 UTC 2020
*/
package com.xpn.xwiki.web;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XWikiAction_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
297f66605fb2fdcd20c8b368b1631e83f001e9de
|
791ddf4cbc563f533e7d00a9259e24fe85008877
|
/kernel/src/test/java/org/jboss/test/kernel/annotations/test/OwnDependencyTestCase.java
|
1bc54185669f78813daeff957d1839d56973deee
|
[] |
no_license
|
wolfc/microcontainer
|
7dd1fe85057c31575458ad1a22c3f74534f72bd0
|
4ef8127e690e18f54f40287b72f68dbf3541b07c
|
refs/heads/master
| 2020-04-25T23:27:30.830476
| 2013-01-09T14:15:50
| 2013-01-09T14:15:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,264
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2006, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.test.kernel.annotations.test;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.kernel.plugins.annotations.BasicBeanAnnotationAdapter;
import org.jboss.kernel.plugins.annotations.BeanAnnotationAdapter;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
import org.jboss.test.kernel.annotations.support.SecurityDomainAnnotationPlugin;
import org.jboss.test.kernel.annotations.support.MyOwnDependency;
/**
* @author <a href="mailto:ales.justin@jboss.com">Ales Justin</a>
*/
public class OwnDependencyTestCase extends AbstractBeanAnnotationAdapterTest
{
public OwnDependencyTestCase(String name)
{
super(name);
}
protected BeanAnnotationAdapter getBeanAnnotationAdapterClass()
{
BasicBeanAnnotationAdapter adapter = BasicBeanAnnotationAdapter.INSTANCE;
adapter.addAnnotationPlugin(new SecurityDomainAnnotationPlugin());
return adapter;
}
public void testCustomDependency() throws Throwable
{
runAnnotationsOnTarget(new MyOwnDependency());
}
protected void checkContextState(Class<?> clazz, KernelControllerContext context)
{
assertEquals(ControllerState.DESCRIBED, context.getState());
}
}
|
[
"ajustin@redhat.com"
] |
ajustin@redhat.com
|
327460c38f5c27c8ff7b26e1c781be8bb39b5662
|
c06b04186855e4e0fe5e771239b31983d92bbdd7
|
/T1809-Java_Architect/01_Java_Beginner/01_Java300/08_IO_stream/doc/资料/003_code/015-027/IO_study03/src/com/sxt/io/CopyTxt.java
|
34ff7fbf64b6666997c081ba4d56ca0f28695261
|
[
"MIT"
] |
permissive
|
specter01wj/ShangXueTang_Course
|
0c6b8895c684891f72ee3f42c14ac3884d1b7db4
|
1de238c3385585f07e19815f680277672d2e1b9b
|
refs/heads/master
| 2020-04-05T16:46:57.934281
| 2019-04-17T06:12:26
| 2019-04-17T06:12:26
| 157,028,215
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,084
|
java
|
package com.sxt.io;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/**
* 文件拷贝:文件字节输入、输出流
*
* @author 裴新
*
*/
public class CopyTxt {
public static void main(String[] args) {
copy("abc.txt","abc-copy.txt");
}
public static void copy(String srcPath,String destPath) {
//1、创建源
File src = new File(srcPath); //源头
File dest = new File(destPath);//目的地
//2、选择流
try( BufferedReader br=new BufferedReader(new FileReader(src));
BufferedWriter bw =new BufferedWriter( new FileWriter(dest)); ) {
//3、操作 (逐行读取)
String line =null;
while((line=br.readLine())!=null) {
bw.write(line); //逐行写出
bw.newLine();
}
bw.flush();
}catch(FileNotFoundException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
"specter01wj@gmail.com"
] |
specter01wj@gmail.com
|
0643d2d75b6591be720f04c1e1a3acf86b023a66
|
16ff4559c79df2df614836844e7783730e030939
|
/src/com/TypeIt/songs/lyrics/blank/BlankAlgorithm.java
|
f39a835388f1294273200d90b15902df64476b8f
|
[] |
no_license
|
Benkia/TypeIt
|
6e784907efe7ef3b2db80e23d9033c31bbb7d115
|
ed047614a74aedbf75387f3d5d3aa8bc5e6e6fb1
|
refs/heads/master
| 2021-06-18T07:50:12.439622
| 2017-06-10T17:25:11
| 2017-06-10T17:25:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 197
|
java
|
package com.TypeIt.songs.lyrics.blank;
/**
* Created by admin on 12/05/2017.
*/
public interface BlankAlgorithm {
BlankAlgorithmSolution run(String lyricsString, Boolean[] chosenIndexes);
}
|
[
"admin"
] |
admin
|
79b1b14883ff5e97ce3422457d054f26c63dc56f
|
962b109b22edeb6111d70c1f8caefb3f6128aefc
|
/unused-saved/src/org/apache/uima/cas/impl/FeatureArrayImpl.java
|
1934a16ce08b1bd8415157116f5c618c1ec2dc9d
|
[
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
sark245/uima-uimaj
|
072701ec9c0b2287f6d1cc03ec201e5c270caaea
|
6a8cb855f00bad0f05ba22bbc2ab1cd5aab597cb
|
refs/heads/main
| 2023-04-19T18:44:28.771075
| 2021-05-19T22:08:37
| 2021-05-19T22:08:37
| 369,012,308
| 0
| 0
|
Apache-2.0
| 2021-05-19T22:05:20
| 2021-05-19T22:05:19
| null |
UTF-8
|
Java
| false
| false
| 1,992
|
java
|
package org.apache.uima.cas.impl;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.util.List;
import org.apache.uima.cas.Feature;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.TypeSystem;
import org.apache.uima.cas.impl.SlotKinds.SlotKind;
/**
* The implementation of an array-valued feature in the type system.
* Shared by the top defining type and all of its subtypes
*
*/
public class FeatureArrayImpl extends FeatureImpl {
private Object getterArrayMethodRef;
private Object setterArrayMethodRef;
FeatureArrayImpl(TypeImpl typeImpl, String shortName, TypeImpl rangeType, TypeSystemImpl tsi, boolean isMultipleRefsAllowed, SlotKind slotKind) {
super(typeImpl, shortName, rangeType, tsi, isMultipleRefsAllowed, slotKind);
}
Object getGetterArrayMethodRef() {
return getterArrayMethodRef;
}
void setGetterArrayMethodRef(Object getterArrayMethodRef) {
this.getterArrayMethodRef = getterArrayMethodRef;
}
Object getSetterArrayMethodRef() {
return setterArrayMethodRef;
}
void setSetterArrayMethodRef(Object setterArrayMethodRef) {
this.setterArrayMethodRef = setterArrayMethodRef;
}
}
|
[
"schor@apache.org"
] |
schor@apache.org
|
d8f36b295765d3e378ec125c981db6b1fbc9e22f
|
be19d67bb67f6ebd6a21ae4284488639aa00100b
|
/JavaTi/day03/src/day03_code/TreadSafe2/TreadSafe/Demo01Ticket.java
|
dfa1a1485881633cca4ad5707d3cfdabfb97ce1d
|
[] |
no_license
|
qwd1998/repo1
|
6b614a0b4115276b345e241cca245df822afb521
|
1d43f99abe5918714f3e415195c56ba4bcdeeff1
|
refs/heads/main
| 2023-02-02T02:08:22.620660
| 2020-12-18T14:38:06
| 2020-12-18T14:38:06
| 320,998,770
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 330
|
java
|
package day03_code.TreadSafe2.TreadSafe;
public class Demo01Ticket {
public static void main(String[] args) {
Runnable r = new Runnableimpl();
Thread t = new Thread(r);
Thread t1 = new Thread(r);
Thread t2 = new Thread(r);
t1.start();
t.start();
t2.start();
}
}
|
[
"641770222@qq.com"
] |
641770222@qq.com
|
cb251ddb1cb23d8d165efaa97e189e083c2cdf50
|
e9077ac028aa23f767f26b4f8e4ec70ad8bdbfe7
|
/J4E/ch14/section_2/SelectionSortTimer.java
|
25ac86a5e674ecea0438851da493cdd519083d5e
|
[] |
no_license
|
stworo01/sp2-2014
|
7cc2a7676c96a36583cf8d90abe99bd6c1813cec
|
17a3885fd49a0b42467abcadb463a232230960ec
|
refs/heads/master
| 2021-01-12T19:42:15.702664
| 2020-05-10T14:28:08
| 2020-05-10T14:28:08
| 25,983,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 748
|
java
|
import java.util.Scanner;
/**
This program measures how long it takes to sort an
array of a user-specified size with the selection
sort algorithm.
*/
public class SelectionSortTimer
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter array size: ");
int n = in.nextInt();
// Construct random array
int[] a = ArrayUtil.randomIntArray(n, 100);
// Use stopwatch to time selection sort
StopWatch timer = new StopWatch();
timer.start();
SelectionSorter.sort(a);
timer.stop();
System.out.println("Elapsed time: "
+ timer.getElapsedTime() + " milliseconds");
}
}
|
[
"keith@dcs.bbk.ac.uk"
] |
keith@dcs.bbk.ac.uk
|
e2bd0784fb47516df317265f3306f767d445b90a
|
fb33e12379f3233ff1bcb859ce4f237b0d95a180
|
/src/main/java/net/Socket/TCP_demo08/UploadServer.java
|
e2a6111f7b213806db0d3d62c16f543d2fb338f3
|
[] |
no_license
|
abelzyp/JavaAPI
|
b2557aa84650087f22553be0aaee43c1bf5c13c3
|
82ba3b18e03141d5446c8cbadf46fe729e781a43
|
refs/heads/master
| 2020-04-06T06:59:52.416071
| 2020-01-15T07:18:05
| 2020-01-15T07:18:05
| 60,389,265
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 376
|
java
|
package net.Socket.TCP_demo08;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class UploadServer {
public static void main(String[] args) throws IOException {
// 创建服务器Socket对象
ServerSocket ss = new ServerSocket(8888);
while (true) {
Socket s = ss.accept();
new Thread(new UserThread(s)).start();
}
}
}
|
[
"abelzyp@foxmail.com"
] |
abelzyp@foxmail.com
|
bcd46aee919d804dcc65956de5e8ef7b97e7f53d
|
d28cec58c2ea2ad9ec84215b0d67ce25adc6b88a
|
/dojo-server/src/main/java/org/automation/dojo/web/model/Record.java
|
1738715603350a108409b8285fc3e0cc474c3b24
|
[] |
no_license
|
bharath431/automated-dojo
|
eec3876336ce51018c3c48b3615ae6c3b3f2b0e7
|
db31feb6092efb7b47e339d540df6d955224991e
|
refs/heads/master
| 2023-08-20T10:38:11.082890
| 2018-12-16T11:06:12
| 2018-12-16T11:06:12
| 423,474,560
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,214
|
java
|
package org.automation.dojo.web.model;
import org.apache.commons.lang.builder.EqualsBuilder;
public class Record implements Cloneable {
private String description;
private double price;
private int id;
public Record(int id, String description, double price) {
this.id = id;
this.description = description;
this.price = price;
}
public Record(Record record) {
this(record.id, record.getDescription(), record.getPrice());
}
public String getDescription() {
return description;
}
public double getPrice() {
return price;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public void setPrice(int price) {
this.price = price;
}
@Override
public String toString() {
return String.format("Record '%s' with price $%s", description, price);
}
@Override
public Record clone() {
return new Record(this);
}
@Override
public boolean equals(Object obj) {
return EqualsBuilder.reflectionEquals(this, obj);
}
public boolean itsMe(Integer id) {
return this.id == id;
}
}
|
[
"apofig@gmail.com"
] |
apofig@gmail.com
|
42211c8d595437e3c7845a8a601514e28f7ee255
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.systemux-SystemUX/sources/com/oculus/panelapp/social/SocialGroupLaunchDialogs.java
|
433541aa1672d9790fb8a6b6f8f6371122d66645
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 2,108
|
java
|
package com.oculus.panelapp.social;
import android.content.res.Resources;
import com.oculus.horizoncontent.social.SocialGroupLaunchAppDestination;
import com.oculus.systemdialog.DialogButton;
import com.oculus.systemdialog.DialogButtonText;
import com.oculus.systemdialog.DialogDefinitionBase;
import com.oculus.systemdialog.DialogDefinitionCustom;
public class SocialGroupLaunchDialogs {
public static DialogDefinitionBase getAppLaunchDialog(Resources resources, SocialGroupLaunchAppDestination socialGroupLaunchAppDestination) {
DialogDefinitionCustom dialogDefinitionCustom = new DialogDefinitionCustom("anytime_tablet_social_modal_group_launch_app_launch_dialog", resources.getString(R.string.anytime_tablet_social_modal_group_launch_app_launch_title, socialGroupLaunchAppDestination.getAppDisplayName()), "");
dialogDefinitionCustom.setSecondaryButton(new DialogButtonText("cancel", resources.getString(R.string.anytime_tablet_social_modal_group_launch_app_launch_cancel)));
dialogDefinitionCustom.setControllerBackButton(new DialogButton("cancel"));
return dialogDefinitionCustom;
}
public static DialogDefinitionBase getRiftUsersNotSupportedDialog(Resources resources) {
DialogDefinitionCustom dialogDefinitionCustom = new DialogDefinitionCustom("anytime_tablet_social_modal_group_launch__rift_users_not_supported_dialog", resources.getString(R.string.anytime_tablet_social_modal_group_launch_rift_users_not_supported_title), resources.getString(R.string.anytime_tablet_social_modal_group_launch_rift_users_not_supported_body));
dialogDefinitionCustom.setPrimaryButton(new DialogButtonText("launch", resources.getString(R.string.anytime_tablet_social_modal_group_launch_rift_users_not_supported_launch_button)));
dialogDefinitionCustom.setSecondaryButton(new DialogButtonText("cancel", resources.getString(R.string.anytime_tablet_social_modal_group_launch_rift_users_not_supported_cancel_button)));
dialogDefinitionCustom.setControllerBackButton(new DialogButton("cancel"));
return dialogDefinitionCustom;
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
dad5cf4de447f3041ad83ce3bea8815be95de316
|
7a96414d5b49603238e95a6b1e77809a77143082
|
/software/services/src/main/java/gov/nih/nci/firebird/service/messages/email/JmsEmailServiceImpl.java
|
3c0b3a97ea92098709e2b2b41e837298e11707be
|
[] |
no_license
|
NCIP/nci-ocr
|
822788379a2bf0a95ee00e1667e365766cc8c794
|
e36adffb92fdb9833bb8835f87eab4b46594019e
|
refs/heads/master
| 2016-09-05T12:40:31.309373
| 2013-08-28T14:32:45
| 2013-08-28T14:32:45
| 12,298,569
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,803
|
java
|
/**
* The software subject to this notice and license includes both human readable
* source code form and machine readable, binary, object code form. The NCI OCR
* Software was developed in conjunction with the National Cancer Institute
* (NCI) by NCI employees and 5AM Solutions, Inc. (5AM). To the extent
* government employees are authors, any rights in such works shall be subject
* to Title 17 of the United States Code, section 105.
*
* This NCI OCR Software License (the License) is between NCI and You. You (or
* Your) shall mean a person or an entity, and all other entities that control,
* are controlled by, or are under common control with the entity. Control for
* purposes of this definition means (i) the direct or indirect power to cause
* the direction or management of such entity, whether by contract or otherwise,
* or (ii) ownership of fifty percent (50%) or more of the outstanding shares,
* or (iii) beneficial ownership of such entity.
*
* This License is granted provided that You agree to the conditions described
* below. NCI grants You a non-exclusive, worldwide, perpetual, fully-paid-up,
* no-charge, irrevocable, transferable and royalty-free right and license in
* its rights in the NCI OCR Software to (i) use, install, access, operate,
* execute, copy, modify, translate, market, publicly display, publicly perform,
* and prepare derivative works of the NCI OCR Software; (ii) distribute and
* have distributed to and by third parties the NCI OCR Software and any
* modifications and derivative works thereof; and (iii) sublicense the
* foregoing rights set out in (i) and (ii) to third parties, including the
* right to license such rights to further third parties. For sake of clarity,
* and not by way of limitation, NCI shall have no right of accounting or right
* of payment from You or Your sub-licensees for the rights granted under this
* License. This License is granted at no charge to You.
*
* Your redistributions of the source code for the Software must retain the
* above copyright notice, this list of conditions and the disclaimer and
* limitation of liability of Article 6, below. Your redistributions in object
* code form must reproduce the above copyright notice, this list of conditions
* and the disclaimer of Article 6 in the documentation and/or other materials
* provided with the distribution, if any.
*
* Your end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: This product includes software
* developed by 5AM and the National Cancer Institute. If You do not include
* such end-user documentation, You shall include this acknowledgment in the
* Software itself, wherever such third-party acknowledgments normally appear.
*
* You may not use the names "The National Cancer Institute", "NCI", or "5AM"
* to endorse or promote products derived from this Software. This License does
* not authorize You to use any trademarks, service marks, trade names, logos or
* product names of either NCI or 5AM, except as required to comply with the
* terms of this License.
*
* For sake of clarity, and not by way of limitation, You may incorporate this
* Software into Your proprietary programs and into any third party proprietary
* programs. However, if You incorporate the Software into third party
* proprietary programs, You agree that You are solely responsible for obtaining
* any permission from such third parties required to incorporate the Software
* into such third party proprietary programs and for informing Your
* sub-licensees, including without limitation Your end-users, of their
* obligation to secure any required permissions from such third parties before
* incorporating the Software into such third party proprietary software
* programs. In the event that You fail to obtain such permissions, You agree
* to indemnify NCI for any claims against NCI by such third parties, except to
* the extent prohibited by law, resulting from Your failure to obtain such
* permissions.
*
* For sake of clarity, and not by way of limitation, You may add Your own
* copyright statement to Your modifications and to the derivative works, and
* You may provide additional or different license terms and conditions in Your
* sublicenses of modifications of the Software, or any derivative works of the
* Software as a whole, provided Your use, reproduction, and distribution of the
* Work otherwise complies with the conditions stated in this License.
*
* THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE) ARE DISCLAIMED. IN NO
* EVENT SHALL THE NATIONAL CANCER INSTITUTE, 5AM SOLUTIONS, INC. OR THEIR
* AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package gov.nih.nci.firebird.service.messages.email;
import gov.nih.nci.firebird.service.messages.FirebirdEmail;
import gov.nih.nci.firebird.service.messages.FirebirdMessage;
import java.util.Collection;
import java.util.Collections;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueSender;
import javax.jms.QueueSession;
import org.apache.log4j.Logger;
import com.google.inject.Inject;
/**
* A Service Bean for sending emails to the JMS queue.
*/
public class JmsEmailServiceImpl implements EmailService {
private static final Logger LOG = Logger.getLogger(JmsEmailServiceImpl.class);
private Queue emailQueue;
private QueueConnectionFactory queueConnectionFactory;
@Override
public void sendMessage(String to, Collection<String> cc, String bounce, FirebirdMessage message) {
sendMessage(Collections.singleton(to), cc, bounce, message);
}
@Override
public void sendMessage(Collection<String> to, Collection<String> cc, String bounce, FirebirdMessage message) {
QueueConnection connection = null;
try {
connection = queueConnectionFactory.createQueueConnection();
QueueSession session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
ObjectMessage msg = session.createObjectMessage(new FirebirdEmail(to, cc, bounce, message));
QueueSender sender = session.createSender(emailQueue);
sender.send(msg);
} catch (JMSException e) {
LOG.error("Error sending email to JMS queue", e);
} finally {
closeConnection(connection);
}
}
private void closeConnection(QueueConnection connection) {
if (connection != null) {
try {
connection.close();
} catch (JMSException e) {
LOG.error("Error closing JMS queue connection", e);
}
}
}
/**
* @param emailQueue the emailQueue to set
*/
@Inject
void setEmailQueue(Queue emailQueue) {
this.emailQueue = emailQueue;
}
/**
* @param queueConnectionFactory the connection factory to set
*/
@Inject
void setQueueConnectionFactory(QueueConnectionFactory queueConnectionFactory) {
this.queueConnectionFactory = queueConnectionFactory;
}
}
|
[
"mkher@fusionspan.com"
] |
mkher@fusionspan.com
|
45fc48360bd60fbf3e9849e5c3f026b8cd5baa88
|
6db0b9398aee839154557ac209d2d665cca64ce1
|
/src/com/wang/so/love/android/app/view/SlidingMenu.java
|
ba6dea160b6e22b5c8564123fb7d53f83b9bf42e
|
[] |
no_license
|
hejiawang/SoLoveAndroidApp
|
ab4449741abb0d4b021dd41571c046981db6d95a
|
b797e834a7dfbd7a205a35c88d2cbb6e34e3da78
|
refs/heads/master
| 2020-06-16T16:37:15.447442
| 2016-12-09T13:50:04
| 2016-12-09T13:50:04
| 75,082,960
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,402
|
java
|
package com.wang.so.love.android.app.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
import com.nineoldandroids.view.ViewHelper;
import com.wang.so.love.android.app.utils.LoggerUtil;
import com.wang.so.love.android.app.utils.ScreenUtils;
import com.wang.so.love.android.app.view.R;
/**
* 左侧滑动菜单
*
* @author HeJiawang
* @date 2016.12.02
*/
public class SlidingMenu extends HorizontalScrollView {
/**
* 屏幕宽度
*/
private int mScreenWidth;
/**
* dp
*/
private int mMenuRightPadding;
/**
* 菜单的宽度
*/
private int mMenuWidth;
private int mHalfMenuWidth;
private boolean isOpen;
private boolean once;
private ViewGroup mMenu;
private ViewGroup mContent;
public SlidingMenu(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public SlidingMenu(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mScreenWidth = ScreenUtils.getScreenWidth(context);
TypedArray a = context.getTheme().obtainStyledAttributes(attrs,
R.styleable.SlidingMenu, defStyle, 0);
int n = a.getIndexCount();
for (int i = 0; i < n; i++) {
int attr = a.getIndex(i);
switch (attr) {
case R.styleable.SlidingMenu_rightPadding:
// 默认50
mMenuRightPadding = a.getDimensionPixelSize(attr,
(int) TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP, 50f,
getResources().getDisplayMetrics()));// 默认为10DP
break;
}
}
a.recycle();
}
public SlidingMenu(Context context) {
this(context, null, 0);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
/**
* 显示的设置一个宽度
*/
if (!once) {
LinearLayout wrapper = (LinearLayout) getChildAt(0);
mMenu = (ViewGroup) wrapper.getChildAt(0);
mContent = (ViewGroup) wrapper.getChildAt(1);
mMenuWidth = mScreenWidth - mMenuRightPadding;
mHalfMenuWidth = mMenuWidth / 2;
mMenu.getLayoutParams().width = mMenuWidth;
mContent.getLayoutParams().width = mScreenWidth;
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
if (changed) {
// 将菜单隐藏
this.scrollTo(mMenuWidth, 0);
once = true;
}
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
int action = ev.getAction();
switch (action) {
// Up时,进行判断,如果显示区域大于菜单宽度一半则完全显示,否则隐藏
case MotionEvent.ACTION_UP:
int scrollX = getScrollX();
if (scrollX > mHalfMenuWidth) {
mHalfMenuWidth = mMenuWidth -1;//(int) (mMenuWidth / 1.5) ; //调整灵敏度
this.smoothScrollTo(mMenuWidth, 0); //关闭菜单
isOpen = false;
} else {
mHalfMenuWidth = mMenuWidth / 8;//调整灵敏度
this.smoothScrollTo(0, 0);
isOpen = true;
}
return true;
}
return super.onTouchEvent(ev);
}
/**
* 打开菜单
*/
public void openMenu() {
if (isOpen)
return;
this.smoothScrollTo(0, 0);
isOpen = true;
}
/**
* 关闭菜单
*/
public void closeMenu() {
if (isOpen) {
this.smoothScrollTo(mMenuWidth, 0);
isOpen = false;
}
}
/**
* 切换菜单状态
*/
public void toggle() {
if (isOpen) {
closeMenu();
} else {
openMenu();
}
}
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
float scale = l * 1.0f / mMenuWidth;
float leftScale = 1 - 0.3f * scale;
float rightScale = 0.8f + scale * 0.2f;
ViewHelper.setScaleX(mMenu, leftScale);
ViewHelper.setScaleY(mMenu, leftScale);
ViewHelper.setAlpha(mMenu, 0.6f + 0.4f * (1 - scale));
ViewHelper.setTranslationX(mMenu, mMenuWidth * scale * 0.7f);
ViewHelper.setPivotX(mContent, 0);
ViewHelper.setPivotY(mContent, mContent.getHeight() / 2);
ViewHelper.setScaleX(mContent, rightScale);
ViewHelper.setScaleY(mContent, rightScale);
}
}
|
[
"952327407@qq.com"
] |
952327407@qq.com
|
b9edb5e123e62635e86580f2d9f8daf80d35d464
|
e1b368d37a7be941a7468305f4e2e1fa0bdf9f67
|
/NetBeansProjects/Examen.Programacion.8_3_2017/src/examen/programacion/pkg9_3_2017/Main.java
|
5ebf18d7abdbf288cccd3f0dcfbb8bb4f9722a32
|
[] |
no_license
|
elbarbero/TrabajosJavaClase
|
a3bc1c133cd1b997b50a081327d54f29b07ce630
|
c87703768617bdf2605fce085b53fc2bb5285bbe
|
refs/heads/master
| 2020-03-17T03:14:20.378120
| 2018-05-13T10:39:43
| 2018-05-13T10:39:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 499
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package examen.programacion.pkg9_3_2017;
/**
*
* @author Mario
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Empresa miEmpresa=new Empresa(2);
miEmpresa.pedirDatos();
miEmpresa.informe();
}
}
|
[
"39236006+elbarbero@users.noreply.github.com"
] |
39236006+elbarbero@users.noreply.github.com
|
b654b92aadf4bf8de7860731fdc0c858530330a4
|
1c6d47856e1c6969ea5028b07ac23b967e42b69d
|
/advanced/javaagent/tutorial01/code/simple-agent/src/main/java/lsieun/javaagent/SimpleAgent.java
|
6aff2b6a5816decdf4af7c7ba9d81dac247176d0
|
[
"MIT"
] |
permissive
|
Silentsoul04/learn-java
|
439f82ff387ae1fc6fdd1e58a8066c313453d0c5
|
03bdac6fa970051de305db40300fae228810aaf3
|
refs/heads/master
| 2022-12-30T04:01:13.922338
| 2020-08-01T10:57:38
| 2020-08-01T10:57:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
package lsieun.javaagent;
import java.lang.instrument.Instrumentation;
public class SimpleAgent {
public static void premain(String agentArgs, Instrumentation instrumentation) {
SimpleClassFileTransformer transformer = new SimpleClassFileTransformer();
instrumentation.addTransformer(transformer);
}
}
|
[
"331505785@qq.com"
] |
331505785@qq.com
|
50c2847a3d3e7ed7c19ac62843ee6f2bd24a7465
|
6421651fe9078e0826156fb00939a5b76dabaa9c
|
/src/NumberOfDigitOne.java
|
8930856d1c0177a7aa802dc9330fe53983dfae04
|
[] |
no_license
|
lyzkhqby/LeetCode
|
46d5271554b020ee095346d17996360ecd26d725
|
23f339ad4cad43e6797e325cb302a85359effaf6
|
refs/heads/master
| 2021-05-22T09:40:30.710464
| 2018-06-04T03:07:36
| 2018-06-04T03:07:36
| 54,880,138
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 823
|
java
|
/**
* Created by rotoosoft-d04 on 2016/10/9.
*/
public class NumberOfDigitOne {
/**
* Calculate occurance on every digit, from
* least important digit to most important digit
* number = 1432
* One's digit: n/10=143 143*1+1
* Ten's digit: n/100=14 14*10+10
* Hun's digit: n/1000=1 1*100+100
* Tho's digit: 1432%1000+1=433
* Sum all occurance on digits together
*/
public int countDigitOne(int n) {
int factor = 1, count = 0, k = n;
while (n > 0) {
int m = n / 10, r = n % 10, amount = 0;
if (r == 0) amount = 0;
else if (r > 1) amount = factor;
else amount = k % factor + 1;
count += m * factor + amount;
factor *= 10;
n /= 10;
}
return count;
}
}
|
[
"lyzkhqby@sina.com"
] |
lyzkhqby@sina.com
|
a8ebdef358189dbe1fcd7fa2323b34bfda3cba85
|
84572d5d682bd7e6973b8105fb921b0c448ff1f7
|
/projects/AOSPOkHttp/src/com/squareup/okhttp/HttpsHandler.java
|
1dc3826f9611696c91b4c0bbb39484f392c3c956
|
[] |
no_license
|
liang47009/sandrop
|
806169c72a516b3191aae07c234a225db5343888
|
28045e53cec0f043d3aaf426f7055fbf8ca38a76
|
refs/heads/master
| 2020-04-13T18:24:58.767107
| 2018-12-28T09:32:53
| 2018-12-28T09:33:14
| 163,373,426
| 0
| 0
| null | 2018-12-28T06:15:22
| 2018-12-28T06:15:22
| null |
UTF-8
|
Java
| false
| false
| 1,549
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.squareup.okhttp;
import java.io.IOException;
import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
public final class HttpsHandler extends URLStreamHandler {
@Override protected URLConnection openConnection(URL url) throws IOException {
return new OkHttpClient().open(url);
}
@Override protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {
if (url == null || proxy == null) {
throw new IllegalArgumentException("url == null || proxy == null");
}
return new OkHttpClient().setProxy(proxy).open(url);
}
@Override protected int getDefaultPort() {
return 443;
}
}
|
[
"supp.sandrob@gmail.com"
] |
supp.sandrob@gmail.com
|
7fc96e4a2bdca2a4f4c364e3c789b6bb25011064
|
31b7d2067274728a252574b2452e617e45a1c8fb
|
/jpa-connector-beehive-bdk/com_V2.0.1.4/oracle/beehive/TimeZoneOnsetFixedDay.java
|
5ee50c9053358ceb2638323b37d1e384d68d75f1
|
[] |
no_license
|
ericschan/open-icom
|
c83ae2fa11dafb92c3210a32184deb5e110a5305
|
c4b15a2246d1b672a8225cbb21b75fdec7f66f22
|
refs/heads/master
| 2020-12-30T12:22:48.783144
| 2017-05-28T00:51:44
| 2017-05-28T00:51:44
| 91,422,338
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,530
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.3-hudson-jaxb-ri-2.2.3-3-
// 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: 2011.05.18 at 04:52:34 PM PDT
//
package com.oracle.beehive;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for timeZoneOnsetFixedDay complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="timeZoneOnsetFixedDay">
* <complexContent>
* <extension base="{http://www.oracle.com/beehive}timeZoneOnsetDay">
* <sequence>
* <element name="day" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "timeZoneOnsetFixedDay", propOrder = {
"day"
})
public class TimeZoneOnsetFixedDay
extends TimeZoneOnsetDay
{
protected int day;
/**
* Gets the value of the day property.
*
*/
public int getDay() {
return day;
}
/**
* Sets the value of the day property.
*
*/
public void setDay(int value) {
this.day = value;
}
}
|
[
"eric.sn.chan@gmail.com"
] |
eric.sn.chan@gmail.com
|
77d647c1ef58f9a82bc23bc4dc821c94bae3f28d
|
2175d6a417843e151d54cda309bff47be0b97da3
|
/src/main/java/demos/antiSQLInjection/org/boris/expr/function/excel/ABS.java
|
22af445eb16dd509416af3de1930d7f97a384db3
|
[] |
no_license
|
sqlparser/gsp_demo_java
|
6cf93fdf567f40ca1da86e4d9da8d19d25452e55
|
6e377789c0b36f47013449a65ea293c9495b7dcc
|
refs/heads/master
| 2023-08-18T02:02:34.857633
| 2023-06-08T02:32:26
| 2023-06-08T02:32:26
| 206,196,892
| 108
| 55
| null | 2023-04-14T18:30:08
| 2019-09-04T00:37:05
|
Java
|
UTF-8
|
Java
| false
| false
| 284
|
java
|
package org.boris.expr.function.excel;
import org.boris.expr.ExprException;
import org.boris.expr.function.DoubleInOutFunction;
public class ABS extends DoubleInOutFunction
{
protected double evaluate(double value) throws ExprException {
return Math.abs(value);
}
}
|
[
"shawn@example.com"
] |
shawn@example.com
|
3b240072f7df609d06e4c88f5044a4eeb4305610
|
8c19d5c43de7c0ad418c5233071da727622a3eda
|
/src/main/java/bdi/glue/ssh/common/SshIdentity.java
|
d1ef3d3bc92d7dd2d067588b46fb29f50490cd5e
|
[
"MIT"
] |
permissive
|
Arnauld/bidij
|
f7221762b21522be4843b10a6d5ba36dc45f58cc
|
8f764322d427e02e9bf68ac83268738e8bc7ab18
|
refs/heads/master
| 2021-01-13T01:44:06.417061
| 2014-11-06T23:35:25
| 2014-11-06T23:35:25
| 24,435,875
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 731
|
java
|
package bdi.glue.ssh.common;
/**
* @author <a href="http://twitter.com/aloyer">@aloyer</a>
*/
public class SshIdentity {
private final String privateKeyPath;
private final String passphrase;
public SshIdentity(String privateKeyPath, String passphrase) {
this.privateKeyPath = privateKeyPath;
this.passphrase = passphrase;
}
public String getPrivateKeyPath() {
return privateKeyPath;
}
public String getPassphrase() {
return passphrase;
}
@Override
public String toString() {
return "SshIdentity{" +
"privateKeyPath='" + privateKeyPath + '\'' +
", passphrase='" + passphrase + '\'' +
'}';
}
}
|
[
"arnauld.loyer@gmail.com"
] |
arnauld.loyer@gmail.com
|
7ebbaad5efd4f25569c1404b5998f059a5f7cbff
|
4d37505edab103fd2271623b85041033d225ebcc
|
/spring-beans/src/test/java/org/springframework/tests/sample/beans/Pet.java
|
4e84dbd87bdfcc7e1286c1a6413a0336afd964ab
|
[
"Apache-2.0"
] |
permissive
|
huifer/spring-framework-read
|
1799f1f073b65fed78f06993e58879571cc4548f
|
73528bd85adc306a620eedd82c218094daebe0ee
|
refs/heads/master
| 2020-12-08T08:03:17.458500
| 2020-03-02T05:51:55
| 2020-03-02T05:51:55
| 232,931,630
| 6
| 2
|
Apache-2.0
| 2020-03-02T05:51:57
| 2020-01-10T00:18:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,368
|
java
|
/*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.tests.sample.beans;
/**
* @author Rob Harrop
* @since 2.0
*/
public class Pet {
private String name;
public Pet(String name) {
this.name = name;
}
public String getName() {
return name;
}
@Override
public String toString() {
return getName();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
final Pet pet = (Pet) o;
if (name != null ? !name.equals(pet.name) : pet.name != null) return false;
return true;
}
@Override
public int hashCode() {
return (name != null ? name.hashCode() : 0);
}
}
|
[
"huifer97@163.com"
] |
huifer97@163.com
|
cdd9d528e3eafc722746f725708980d97bde5a0a
|
d6ead9a0193d4b7a8b01562d05a02126f6b8efa3
|
/JavaDesignPatterns/dp_behavior/dp_behavior_strategy_saygreeting_homework/src/main/java/com/jpassion/dp/domain/MorningGreetingStrategy.java
|
14b9149463bf1d6a29490b91cc664016c99cd341
|
[] |
no_license
|
SasirekhaPV/JPassionHomework
|
06271ad0c3f1bb99801fccc8825751b75cd6d946
|
82539522e7ccb60eda8f0c7a57837c7a2c223e8e
|
refs/heads/master
| 2021-12-15T15:48:35.746276
| 2017-08-29T18:03:13
| 2017-08-29T18:03:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 240
|
java
|
package com.jpassion.dp.domain;
public class MorningGreetingStrategy implements IGreetingStrategy {
@Override
public String greetingMessage(String string, String string2) {
return "Good Morning " + string + " " + string2 + "!";
}
}
|
[
"Henry.Fender@hennepin.us"
] |
Henry.Fender@hennepin.us
|
ec2c9f5c4cd8a66bec7bfe49638fd038408a451f
|
aa5c33bb4a45007d3f825b6f9c3fe235951535d4
|
/day1/src/day1/MethodOverloading1.java
|
1b0d00db0f58dcd7dfca5999c9e015d95308e7ae
|
[] |
no_license
|
rkdntm1/Java_practice
|
ad37ea3efc7a166ac72035ed2c65604d1ec3d60b
|
89186839756da23c74402665becc2e299da334fe
|
refs/heads/master
| 2023-01-21T23:15:39.797095
| 2020-12-01T14:44:57
| 2020-12-01T14:44:57
| 315,781,022
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,042
|
java
|
package day1;
/*
* 메서드 오버로딩
* :클래스 내에서 이름이 같은 메서드를 여러개 정의 할 수 있다.
*
* 클래스내에서 메서드 이름이 같으나
* 매개변수 타입, 순서, 갯수가 다를때 다른 메서드로 인식
* 단, 리턴 타입과는 무관하다.
*
* void prt(String name){}
=> 메서드 호출시 : obj.prt("aaa");
========================
int prt(String name){}
메서드 호출시
1. obj.prt("aaa");
2. int su= obj.prt("aaa");
*
*/
class Sample
{
//이름이 같았는데도 에러가 x : 메소드 오버로딩
public void prt() { }
public void prt(int age) { }
public void prt(String name) {}
public void prt(String name, int age) {}
public void prt(String age, String name) {}
//public void prt(String age, String addr) {} // -- 메서드 오버로딩이 안됨
}
public class MethodOverloading1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Sample ins = new Sample();
ins.prt("aaa", "bbb");
}
}
|
[
"rkdntm1@gmail.com"
] |
rkdntm1@gmail.com
|
66bff87bcfa4d5c92e9ee9dd3fef843bd0d06b41
|
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
|
/DungeonDiver3/lib/com/puttysoftware/dungeondiver3/support/descriptionmanagers/RaceDescriptionManager.java
|
606dd5b78fb0df7ad144f2ff8e9033b6cc7bd984
|
[
"Unlicense"
] |
permissive
|
retropipes/older-java-games
|
777574e222f30a1dffe7936ed08c8bfeb23a21ba
|
786b0c165d800c49ab9977a34ec17286797c4589
|
refs/heads/master
| 2023-04-12T14:28:25.525259
| 2021-05-15T13:03:54
| 2021-05-15T13:03:54
| 235,693,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,239
|
java
|
/* DungeonDiver3: An RPG
Copyright (C) 2011-2012 Eric Ahnell
Any questions should be directed to the author via email at: products@puttysoftware.com
*/
package com.puttysoftware.dungeondiver3.support.descriptionmanagers;
import com.puttysoftware.dungeondiver3.support.creatures.races.RaceConstants;
import com.puttysoftware.dungeondiver3.support.scenario.Extension;
import com.puttysoftware.fileutils.ResourceStreamReader;
public class RaceDescriptionManager {
public static String getRaceDescription(final int r) {
final String name = RaceConstants.getRaceName(r).toLowerCase();
try {
// Fetch description
final ResourceStreamReader rsr = new ResourceStreamReader(
RaceDescriptionManager.class.getResourceAsStream(
"/com/puttysoftware/dungeondiver3/support/resources/descriptions/race/"
+ name + Extension
.getDescriptionExtensionWithPeriod()));
final String desc = rsr.readString();
rsr.close();
return desc;
} catch (final Exception e) {
e.printStackTrace();
return null;
}
}
}
|
[
"eric.ahnell@puttysoftware.com"
] |
eric.ahnell@puttysoftware.com
|
dc5bc6130b58468ee336b5dbff374eb17a62096a
|
799cce351010ca320625a651fb2e5334611d2ebf
|
/Data Set/Synthetic/After/after_1952.java
|
409d2f8083f4f1b3cf5ccc910ffc64d12ae668fe
|
[] |
no_license
|
dareenkf/SQLIFIX
|
239be5e32983e5607787297d334e5a036620e8af
|
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
|
refs/heads/main
| 2023-01-29T06:44:46.737157
| 2020-11-09T18:14:24
| 2020-11-09T18:14:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 309
|
java
|
public class Dummy {
void sendRequest(Connection conn) throws SQLException {
PreparedStatement stmt = conn.prepareStatement("SELECT EMPLOYEE_ID, JOB_ID, SALARY FROM EMPLOYEES WHERE JOB_ID =? AND SALARY =?");
stmt.setObject(1 , var1);
stmt.setObject(2 , rand5);
ResultSet rs = stmt.executeQuery();
}
}
|
[
"jahin99@gmail.com"
] |
jahin99@gmail.com
|
b3db2c70e1956e18ea863be70823f64ceef75065
|
bceba483c2d1831f0262931b7fc72d5c75954e18
|
/src/qubed/corelogicextensions/ASSETS.java
|
85fe3e61c5ed0be7ca324546cf21af2e1ebac72b
|
[] |
no_license
|
Nigel-Qubed/credit-services
|
6e2acfdb936ab831a986fabeb6cefa74f03c672c
|
21402c6d4328c93387fd8baf0efd8972442d2174
|
refs/heads/master
| 2022-12-01T02:36:57.495363
| 2020-08-10T17:26:07
| 2020-08-10T17:26:07
| 285,552,565
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,491
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// 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.08.05 at 04:53:09 AM CAT
//
package qubed.corelogicextensions;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
/**
* A collection of assets that are used to determine credit worthiness of the parties.
*
* <p>Java class for ASSETS complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ASSETS">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASSET" type="{http://www.mismo.org/residential/2009/schemas}ASSET" maxOccurs="unbounded" minOccurs="0"/>
* <element name="ASSET_SUMMARY" type="{http://www.mismo.org/residential/2009/schemas}ASSET_SUMMARY" minOccurs="0"/>
* <element name="EXTENSION" type="{http://www.mismo.org/residential/2009/schemas}ASSETS_EXTENSION" minOccurs="0"/>
* </sequence>
* <attGroup ref="{http://www.mismo.org/residential/2009/schemas}AttributeExtension"/>
* <attGroup ref="{http://www.w3.org/1999/xlink}MISMOresourceLink"/>
* <anyAttribute processContents='lax'/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ASSETS", propOrder = {
"asset",
"assetsummary",
"extension"
})
public class ASSETS {
@XmlElement(name = "ASSET")
protected List<ASSET> asset;
@XmlElement(name = "ASSET_SUMMARY")
protected ASSETSUMMARY assetsummary;
@XmlElement(name = "EXTENSION")
protected ASSETSEXTENSION extension;
@XmlAttribute(name = "label", namespace = "http://www.w3.org/1999/xlink")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String label;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the asset 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 asset property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getASSET().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ASSET }
*
*
*/
public List<ASSET> getASSET() {
if (asset == null) {
asset = new ArrayList<ASSET>();
}
return this.asset;
}
/**
* Gets the value of the assetsummary property.
*
* @return
* possible object is
* {@link ASSETSUMMARY }
*
*/
public ASSETSUMMARY getASSETSUMMARY() {
return assetsummary;
}
/**
* Sets the value of the assetsummary property.
*
* @param value
* allowed object is
* {@link ASSETSUMMARY }
*
*/
public void setASSETSUMMARY(ASSETSUMMARY value) {
this.assetsummary = value;
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link ASSETSEXTENSION }
*
*/
public ASSETSEXTENSION getEXTENSION() {
return extension;
}
/**
* Sets the value of the extension property.
*
* @param value
* allowed object is
* {@link ASSETSEXTENSION }
*
*/
public void setEXTENSION(ASSETSEXTENSION value) {
this.extension = value;
}
/**
* Gets the value of the label property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLabel() {
return label;
}
/**
* Sets the value of the label property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLabel(String value) {
this.label = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
|
[
"vectorcrael@yahoo.com"
] |
vectorcrael@yahoo.com
|
cdbedec69c9e67e71e456ccc0aa06fdaf420876a
|
46d16ea3500e9d0aca1cecdd56c936b1277d72bf
|
/src/com/edu/kygroup/ui/BlacklistActivity.java
|
5015b2a0b69602eb400129f17804ee4d3066900a
|
[] |
no_license
|
tank2014gz/kaoyanqun
|
d5c3be6b6a8a023655df422ed50b3fa2ed719893
|
80c7c91f8e6efa7dd17de6b770bf7f35ee16c691
|
refs/heads/master
| 2021-01-15T10:13:46.865118
| 2015-04-06T04:49:42
| 2015-04-06T04:49:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,183
|
java
|
package com.edu.kygroup.ui;
import java.util.ArrayList;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.LinearLayout;
import com.edu.kygroup.R;
import com.edu.kygroup.adapter.UserAdapter;
import com.edu.kygroup.domin.User;
import com.edu.kygroup.iface.IBindData;
import com.edu.kygroup.net.NetworkTask;
import com.edu.kygroup.utils.TagUtils;
import com.edu.kygroup.utils.UrlUtils;
import com.edu.pullrefresh.PullToRefreshBase.OnLastItemVisibleListener;
import com.edu.pullrefresh.PullToRefreshListView;
import com.umeng.analytics.MobclickAgent;
public class BlacklistActivity extends BaseActivity implements IBindData,
OnItemClickListener {
public static int POST_PAGE = 1;
public static int POST_TOTAL = 0;
private int mCurPage = 1;
private PullToRefreshListView mBlackListView;
private UserAdapter mBlacklistAdapter;
private ArrayList<User> mBlackUsers;
private User mCancelUser;
private boolean mIsGetData = false;
private LinearLayout mMoreLayout;
// private ScrollListener mScrollListener;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
initView();
initData();
initListView();
}
private void initView() {
setTitleText(R.string.blacklist);
setLeftBtnVisibility(View.GONE);
setRightBtnVisibility(View.GONE);
mBlackListView = (PullToRefreshListView) findViewById(R.id.search_result_listview);
mMoreLayout = (LinearLayout) findViewById(R.id.search_loadmore_layout);
// mScrollListener = new ScrollListener();
// mBlackListView.setOnScrollListener(mScrollListener);
mBlackUsers = new ArrayList<User>();
mBlacklistAdapter = new UserAdapter(this, mBlackUsers, 0);
mBlackListView.setAdapter(mBlacklistAdapter);
mBlackListView.setOnItemClickListener(this);
mBlackListView.setVisibility(View.GONE);
}
private void initData() {
mUser = KygroupApplication.mUser;
getBlacklist();
}
private void getBlacklist() {
startWaitingDialog();
String url = UrlUtils.BLACKLIST_URL + "user.email=" + mUser.getEmail()
+ "&page=" + mCurPage + "&rp=" + 10;
new NetworkTask().execute(this, TagUtils.BLACKLIST_TAG, url);
}
@Override
protected View setContentView() {
// TODO Auto-generated method stub
return LayoutInflater.from(this).inflate(R.layout.viewlayout, null);
}
@Override
public Object bindData(int tag, Object obj) {
// TODO Auto-generated method stub
if (tag == TagUtils.BLACKLIST_TAG) {
showBlacklist(obj);
} else if (tag == TagUtils.CANCEL_BLACK) {
closeWaitingDialog();
if (obj instanceof Boolean && ((Boolean) obj) == true) {
mBlackUsers.remove(mCancelUser);
mBlacklistAdapter.notifyDataSetChanged();
}
}
return null;
}
private void showBlacklist(Object obj) {
closeWaitingDialog();
mMoreLayout.setVisibility(View.GONE);
if (null != obj) {
ArrayList<User> users = (ArrayList<User>) obj;
mBlackUsers.addAll(users);
mBlacklistAdapter.notifyDataSetChanged();
mBlackListView.setVisibility(View.VISIBLE);
}
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
// TODO Auto-generated method stub
mCancelUser = (User) parent.getAdapter().getItem(position);
showDialog();
}
public void cancelBlack() {
if (null != mCancelUser) {
String url = UrlUtils.CANCEL_BLACK + "?user.email="
+ mUser.getEmail() + "&friend.email="
+ mCancelUser.getEmail();
startWaitingDialog();
new NetworkTask().execute(this, TagUtils.CANCEL_BLACK, url);
}
}
public void showDialog() {
Builder builder = new Builder(this);
builder.setPositiveButton(R.string.ok, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
cancelBlack();
}
});
builder.setNegativeButton(R.string.cancel, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
dialog.dismiss();
}
});
builder.setTitle(R.string.tip);
builder.setMessage(R.string.make_sure_cancel);
builder.create().show();
}
private void initListView() {
mBlackListView
.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
@Override
public void onLastItemVisible() {
// TODO Auto-generated method stub
if (!mIsGetData && mCurPage <= POST_PAGE) {
mIsGetData = true;
getBlacklist();
mMoreLayout.setVisibility(View.VISIBLE);
}
}
});
}
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
MobclickAgent.onPageStart("BlacklistActivity"); // 统计页面
MobclickAgent.onResume(this);
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
MobclickAgent.onPageEnd("BlacklistActivity");
MobclickAgent.onPause(this);
}
}
|
[
"774663576@qq.com"
] |
774663576@qq.com
|
77379ff54fc06c1f11d36a707f506fd5f8b7040e
|
1d68f0e3655fbb687c1c008d638bc94056951cc0
|
/com.qbao.recommend.respositoy/src/main/java/com/qbao/recommend/respositoy/mysql/model/RecommendShop.java
|
9c4b4cdbf7a2191f8212072b1cd3888419fa34d3
|
[] |
no_license
|
jackandyao/com.qbao.common.parent
|
47fa5485e6763b3f04f3566153b82b3f94a790a2
|
a94595b88aacee9c66324e75ff4267001e3bb383
|
refs/heads/master
| 2021-05-09T02:55:50.583922
| 2018-01-28T03:45:06
| 2018-01-28T03:45:06
| 119,225,146
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,105
|
java
|
package com.qbao.recommend.respositoy.mysql.model;
import java.io.Serializable;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import com.google.common.collect.Lists;
/**
* @author yuandongrui
* @date 2016年6月30日
*/
public class RecommendShop implements Serializable{
private static final long serialVersionUID = "$Id: RecommendShop.java 1202 2016-09-28 08:36:29Z zhangjun $".hashCode();
private long userId;
private String shopIds;
public long getUserId() {
return userId;
}
public void setUserId(long userId) {
this.userId = userId;
}
public String getShopIds() {
return shopIds;
}
public void setShopIds(String shopIds) {
this.shopIds = shopIds;
}
public List<String> getShopList() {
List<String> shopList = Lists.newArrayList();
if (!StringUtils.isEmpty(shopIds)) {
for (String shop : shopIds.split(";")) {
if(StringUtils.isEmpty(shop)) continue;
int index = shop.indexOf("/");
if(index>=0) shop=shop.substring(++index);
shopList.add(shop);
}
}
return shopList;
}
}
|
[
"786648643@qq.com"
] |
786648643@qq.com
|
90dec394658ae10fdac8f1806fcc33d8762a05f0
|
d3a6dc37dda426d8b58f2a3c95a11496abe493d3
|
/src/main/java/com/norconex/importer/handler/transformer/impl/SubstringTransformer.java
|
6dfc8729d1ed8bb509d68202441e2ab598b44b28
|
[
"Apache-2.0"
] |
permissive
|
yi-refs/importer
|
28f4fc9761ca6a994fc1d5a3398296135908fb7a
|
bf32e2ff84bd5e94e598f307f4b4facdba45040b
|
refs/heads/master
| 2022-12-15T12:20:28.646510
| 2020-09-05T18:54:06
| 2020-09-05T18:54:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,040
|
java
|
/* Copyright 2017-2020 Norconex Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.norconex.importer.handler.transformer.impl;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.norconex.commons.lang.xml.IXMLConfigurable;
import com.norconex.commons.lang.xml.XML;
import com.norconex.importer.handler.HandlerDoc;
import com.norconex.importer.handler.ImporterHandlerException;
import com.norconex.importer.handler.transformer.AbstractCharStreamTransformer;
import com.norconex.importer.parser.ParseState;
/**
* <p>Keep a substring of the content matching a begin and end character
* indexes.
* Useful when you have to
* truncate long content, or when you know precisely where is located
* the text to extract in some files.
* </p>
* <p>
* The "begin" value is inclusive, while the "end" value
* is exclusive. Both are optional. When not specified (or a negative value),
* the index
* is assumed to be the beginning and end of the content, respectively.
* </p>
* <p>
* This class can be used as a pre-parsing (text content-types only)
* or post-parsing handlers.</p>
*
* {@nx.xml.usage
* <handler class="com.norconex.importer.handler.transformer.impl.SubstringTransformer"
* {@nx.include com.norconex.importer.handler.transformer.AbstractCharStreamTransformer#attributes}
* begin="(number)" end="(number)">
*
* {@nx.include com.norconex.importer.handler.AbstractImporterHandler#restrictTo}
* </handler>
* }
*
* {@nx.xml.example
* <handler class="com.norconex.importer.handler.transformer.impl.SubstringTransformer"
* end="10000"/>
* }
* <p>
* The above example truncates long text to be 10,000 characters maximum.
* </p>
*
* @author Pascal Essiembre
* @since 2.7.0
*/
@SuppressWarnings("javadoc")
public class SubstringTransformer extends AbstractCharStreamTransformer
implements IXMLConfigurable {
private long begin = 0;
private long end = -1;
public long getBegin() {
return begin;
}
/**
* Sets the beginning index (inclusive).
* A negative value is treated the same as zero.
* @param beginIndex beginning index
*/
public void setBegin(final long beginIndex) {
this.begin = beginIndex;
}
public long getEnd() {
return end;
}
/**
* Sets the end index (exclusive).
* A negative value is treated as the content end.
* @param endIndex end index
*/
public void setEnd(final long endIndex) {
this.end = endIndex;
}
@Override
protected void transformTextDocument(HandlerDoc doc, Reader input,
Writer output, ParseState parseState)
throws ImporterHandlerException {
long length = -1;
if (end > -1) {
if (end < begin) {
throw new ImporterHandlerException(
"\"end\" cannot be smaller than \"begin\" "
+ "(begin:" + begin + "; end:" + end);
}
length = end - Math.max(begin, 0);
}
try {
IOUtils.copyLarge(input, output, begin, length);
} catch (IOException e) {
throw new ImporterHandlerException(
"Could not get a subtring of content for "
+ doc.getReference(), e);
}
}
@Override
protected void saveCharStreamTransformerToXML(final XML xml) {
xml.setAttribute("begin", begin);
xml.setAttribute("end", end);
}
@Override
protected void loadCharStreamTransformerFromXML(final XML xml) {
setBegin(xml.getLong("@begin", begin));
setEnd(xml.getLong("@end", end));
}
@Override
public boolean equals(final Object other) {
return EqualsBuilder.reflectionEquals(this, other);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public String toString() {
return new ReflectionToStringBuilder(
this, ToStringStyle.SHORT_PREFIX_STYLE).toString();
}
}
|
[
"pascal.essiembre@norconex.com"
] |
pascal.essiembre@norconex.com
|
6c14fe4de50380760d1602344419b4fade9260b9
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes2/RegisterProxySvcPack/SvcRequestRegisterNew.java
|
cdcaba1d6e3a5d3d4f0cf828ca0a7c72765c23d3
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300
| 2016-10-08T07:33:58
| 2016-10-08T07:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,066
|
java
|
package RegisterProxySvcPack;
import MessageSvcPack.SvcRequestGetMsgV2;
import MessageSvcPack.SvcRequestPullDisMsgSeq;
import MessageSvcPack.SvcRequestPullGroupMsgSeq;
import QQService.SvcReqGet;
import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import com.tencent.msf.service.protocol.push.SvcReqRegister;
public final class SvcRequestRegisterNew
extends JceStruct
{
static SvcRequestGetMsgV2 cache_c2cmsg;
static SvcRequestPullDisMsgSeq cache_confmsg;
static SvcRequestPullDisGroupSeq cache_disgroupmsg;
static SvcRequestPullGroupMsgSeq cache_groupmsg;
static SvcReqGet cache_heartbeat;
static SvcReqRegister cache_regist;
static byte[] cache_vCookies;
static byte[] cache_vSaveTraffic;
static byte[] cache_vSig;
public long badge;
public SvcRequestGetMsgV2 c2cmsg;
public byte cDisgroupMsgFilter;
public byte cGetDisPttUrl;
public byte cGetGroupPttUrl;
public byte cGroupMask;
public byte cOptGroupMsgFlag;
public byte cSubCmd;
public SvcRequestPullDisMsgSeq confmsg;
public SvcRequestPullDisGroupSeq disgroupmsg;
public SvcRequestPullGroupMsgSeq groupmsg;
public SvcReqGet heartbeat;
public SvcReqRegister regist;
public long uEndSeq;
public long ulRequestOptional;
public long ulSyncTime;
public byte[] vCookies;
public byte[] vSaveTraffic;
public byte[] vSig;
public SvcRequestRegisterNew()
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
}
public SvcRequestRegisterNew(long paramLong1, SvcRequestGetMsgV2 paramSvcRequestGetMsgV2, SvcRequestPullGroupMsgSeq paramSvcRequestPullGroupMsgSeq, SvcRequestPullDisMsgSeq paramSvcRequestPullDisMsgSeq, SvcReqRegister paramSvcReqRegister, byte paramByte1, byte paramByte2, byte paramByte3, long paramLong2, SvcRequestPullDisGroupSeq paramSvcRequestPullDisGroupSeq, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, byte[] paramArrayOfByte3, SvcReqGet paramSvcReqGet, byte paramByte4, byte paramByte5, long paramLong3, byte paramByte6, long paramLong4)
{
this.ulRequestOptional = paramLong1;
this.c2cmsg = paramSvcRequestGetMsgV2;
this.groupmsg = paramSvcRequestPullGroupMsgSeq;
this.confmsg = paramSvcRequestPullDisMsgSeq;
this.regist = paramSvcReqRegister;
this.cSubCmd = paramByte1;
this.cGetGroupPttUrl = paramByte2;
this.cGetDisPttUrl = paramByte3;
this.badge = paramLong2;
this.disgroupmsg = paramSvcRequestPullDisGroupSeq;
this.vSaveTraffic = paramArrayOfByte1;
this.vCookies = paramArrayOfByte2;
this.vSig = paramArrayOfByte3;
this.heartbeat = paramSvcReqGet;
this.cDisgroupMsgFilter = paramByte4;
this.cGroupMask = paramByte5;
this.uEndSeq = paramLong3;
this.cOptGroupMsgFlag = paramByte6;
this.ulSyncTime = paramLong4;
}
public void readFrom(JceInputStream paramJceInputStream)
{
this.ulRequestOptional = paramJceInputStream.read(this.ulRequestOptional, 0, true);
if (cache_c2cmsg == null) {
cache_c2cmsg = new SvcRequestGetMsgV2();
}
this.c2cmsg = ((SvcRequestGetMsgV2)paramJceInputStream.read(cache_c2cmsg, 1, false));
if (cache_groupmsg == null) {
cache_groupmsg = new SvcRequestPullGroupMsgSeq();
}
this.groupmsg = ((SvcRequestPullGroupMsgSeq)paramJceInputStream.read(cache_groupmsg, 2, false));
if (cache_confmsg == null) {
cache_confmsg = new SvcRequestPullDisMsgSeq();
}
this.confmsg = ((SvcRequestPullDisMsgSeq)paramJceInputStream.read(cache_confmsg, 3, false));
if (cache_regist == null) {
cache_regist = new SvcReqRegister();
}
this.regist = ((SvcReqRegister)paramJceInputStream.read(cache_regist, 4, false));
this.cSubCmd = paramJceInputStream.read(this.cSubCmd, 5, false);
this.cGetGroupPttUrl = paramJceInputStream.read(this.cGetGroupPttUrl, 6, false);
this.cGetDisPttUrl = paramJceInputStream.read(this.cGetDisPttUrl, 7, false);
this.badge = paramJceInputStream.read(this.badge, 8, false);
if (cache_disgroupmsg == null) {
cache_disgroupmsg = new SvcRequestPullDisGroupSeq();
}
this.disgroupmsg = ((SvcRequestPullDisGroupSeq)paramJceInputStream.read(cache_disgroupmsg, 9, false));
if (cache_vSaveTraffic == null)
{
cache_vSaveTraffic = (byte[])new byte[1];
((byte[])cache_vSaveTraffic)[0] = 0;
}
this.vSaveTraffic = ((byte[])paramJceInputStream.read(cache_vSaveTraffic, 10, false));
if (cache_vCookies == null)
{
cache_vCookies = (byte[])new byte[1];
((byte[])cache_vCookies)[0] = 0;
}
this.vCookies = ((byte[])paramJceInputStream.read(cache_vCookies, 11, false));
if (cache_vSig == null)
{
cache_vSig = (byte[])new byte[1];
((byte[])cache_vSig)[0] = 0;
}
this.vSig = ((byte[])paramJceInputStream.read(cache_vSig, 12, false));
if (cache_heartbeat == null) {
cache_heartbeat = new SvcReqGet();
}
this.heartbeat = ((SvcReqGet)paramJceInputStream.read(cache_heartbeat, 13, false));
this.cDisgroupMsgFilter = paramJceInputStream.read(this.cDisgroupMsgFilter, 14, false);
this.cGroupMask = paramJceInputStream.read(this.cGroupMask, 15, false);
this.uEndSeq = paramJceInputStream.read(this.uEndSeq, 16, false);
this.cOptGroupMsgFlag = paramJceInputStream.read(this.cOptGroupMsgFlag, 17, false);
this.ulSyncTime = paramJceInputStream.read(this.ulSyncTime, 18, false);
}
public void writeTo(JceOutputStream paramJceOutputStream)
{
paramJceOutputStream.write(this.ulRequestOptional, 0);
if (this.c2cmsg != null) {
paramJceOutputStream.write(this.c2cmsg, 1);
}
if (this.groupmsg != null) {
paramJceOutputStream.write(this.groupmsg, 2);
}
if (this.confmsg != null) {
paramJceOutputStream.write(this.confmsg, 3);
}
if (this.regist != null) {
paramJceOutputStream.write(this.regist, 4);
}
paramJceOutputStream.write(this.cSubCmd, 5);
paramJceOutputStream.write(this.cGetGroupPttUrl, 6);
paramJceOutputStream.write(this.cGetDisPttUrl, 7);
paramJceOutputStream.write(this.badge, 8);
if (this.disgroupmsg != null) {
paramJceOutputStream.write(this.disgroupmsg, 9);
}
if (this.vSaveTraffic != null) {
paramJceOutputStream.write(this.vSaveTraffic, 10);
}
if (this.vCookies != null) {
paramJceOutputStream.write(this.vCookies, 11);
}
if (this.vSig != null) {
paramJceOutputStream.write(this.vSig, 12);
}
if (this.heartbeat != null) {
paramJceOutputStream.write(this.heartbeat, 13);
}
paramJceOutputStream.write(this.cDisgroupMsgFilter, 14);
paramJceOutputStream.write(this.cGroupMask, 15);
paramJceOutputStream.write(this.uEndSeq, 16);
paramJceOutputStream.write(this.cOptGroupMsgFlag, 17);
paramJceOutputStream.write(this.ulSyncTime, 18);
}
}
/* Location: E:\apk\QQ_91\classes2-dex2jar.jar!\RegisterProxySvcPack\SvcRequestRegisterNew.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
e4c3af457b369b400af7ae41571d1c06cf18d87a
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_88d9f4111f185d665b8340819bd50713a4a2caf8/TransportLocal/2_88d9f4111f185d665b8340819bd50713a4a2caf8_TransportLocal_s.java
|
961a369674b6cf72b641855db62af19e16dd967d
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,319
|
java
|
/*
* Copyright (C) 2007, Dave Watson <dwatson@mimvista.com>
* Copyright (C) 2008, Robin Rosenberg <robin.rosenberg@dewire.com>
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
* Copyright (C) 2008, Marek Zawirski <marek.zawirski@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* - Neither the name of the Git Development Community 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 OWNER 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.
*/
package org.spearce.jgit.transport;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import org.spearce.jgit.errors.NotSupportedException;
import org.spearce.jgit.errors.TransportException;
import org.spearce.jgit.lib.Repository;
import org.spearce.jgit.util.FS;
/**
* Transport that executes the Git "remote side" processes on a local directory.
* <p>
* This transport is suitable for use on the local system, where the caller has
* direct read or write access to the remote repository. This implementation
* forks a C Git process to provide the remote side access, much as the
* {@link TransportGitSsh} implementation causes the remote side to run a C Git
* process.
*/
class TransportLocal extends PackTransport {
private static final String PWD = ".";
static boolean canHandle(final URIish uri) {
if (uri.getHost() != null || uri.getPort() > 0 || uri.getUser() != null
|| uri.getPass() != null || uri.getPath() == null)
return false;
if ("file".equals(uri.getScheme()) || uri.getScheme() == null)
return FS.resolve(new File(PWD), uri.getPath()).isDirectory();
return false;
}
private final File remoteGitDir;
TransportLocal(final Repository local, final URIish uri) {
super(local, uri);
File d = FS.resolve(new File(PWD), uri.getPath()).getAbsoluteFile();
if (new File(d, ".git").isDirectory())
d = new File(d, ".git");
remoteGitDir = d;
}
@Override
public FetchConnection openFetch() throws TransportException {
return new LocalFetchConnection();
}
@Override
public PushConnection openPush() throws NotSupportedException,
TransportException {
return new LocalPushConnection();
}
protected Process startProcessWithErrStream(final String cmd)
throws TransportException {
try {
final String[] args;
final Process proc;
if (cmd.startsWith("git-")) {
args = new String[] { "git", cmd.substring(4), PWD };
} else {
final int gitspace = cmd.indexOf("git ");
if (gitspace >= 0) {
final String git = cmd.substring(0, gitspace + 3);
final String subcmd = cmd.substring(gitspace + 4);
args = new String[] { git, subcmd, PWD };
} else {
args = new String[] { cmd, PWD };
}
}
proc = Runtime.getRuntime().exec(args, null, remoteGitDir);
new StreamRewritingThread(cmd, proc.getErrorStream()).start();
return proc;
} catch (IOException err) {
throw new TransportException(uri, err.getMessage(), err);
}
}
class LocalFetchConnection extends BasePackFetchConnection {
private Process uploadPack;
LocalFetchConnection() throws TransportException {
super(TransportLocal.this);
uploadPack = startProcessWithErrStream(getOptionReceivePack());
init(uploadPack.getInputStream(), uploadPack.getOutputStream());
readAdvertisedRefs();
}
@Override
public void close() {
super.close();
if (uploadPack != null) {
try {
uploadPack.waitFor();
} catch (InterruptedException ie) {
// Stop waiting and return anyway.
} finally {
uploadPack = null;
}
}
}
}
class LocalPushConnection extends BasePackPushConnection {
private Process receivePack;
LocalPushConnection() throws TransportException {
super(TransportLocal.this);
receivePack = startProcessWithErrStream(getOptionReceivePack());
init(receivePack.getInputStream(), receivePack.getOutputStream());
readAdvertisedRefs();
}
@Override
public void close() {
super.close();
if (receivePack != null) {
try {
receivePack.waitFor();
} catch (InterruptedException ie) {
// Stop waiting and return anyway.
} finally {
receivePack = null;
}
}
}
}
class StreamRewritingThread extends Thread {
private final InputStream in;
StreamRewritingThread(final String cmd, final InputStream in) {
super("JGit " + cmd + " Errors");
this.in = in;
}
public void run() {
final byte[] tmp = new byte[512];
try {
for (;;) {
final int n = in.read(tmp);
if (n < 0)
break;
System.err.write(tmp, 0, n);
System.err.flush();
}
} catch (IOException err) {
// Ignore errors reading errors.
} finally {
try {
in.close();
} catch (IOException err2) {
// Ignore errors closing the pipe.
}
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
5d389a976928943a370576fd3ff4552b44b523db
|
128da67f3c15563a41b6adec87f62bf501d98f84
|
/com/emt/proteus/duchampopt/__tcf_312378.java
|
d07f05980acdc1ff104aec465720d44e75c78e52
|
[] |
no_license
|
Creeper20428/PRT-S
|
60ff3bea6455c705457bcfcc30823d22f08340a4
|
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
|
refs/heads/master
| 2020-03-26T03:59:25.725508
| 2018-08-12T16:05:47
| 2018-08-12T16:05:47
| 73,244,383
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,643
|
java
|
/* */ package com.emt.proteus.duchampopt;
/* */
/* */ import com.emt.proteus.runtime.api.Env;
/* */ import com.emt.proteus.runtime.api.Frame;
/* */ import com.emt.proteus.runtime.api.Function;
/* */ import com.emt.proteus.runtime.api.ImplementedFunction;
/* */ import com.emt.proteus.runtime.library.strings._ZNSsD1Ev;
/* */
/* */ public final class __tcf_312378 extends ImplementedFunction
/* */ {
/* */ public static final int FNID = 890;
/* 12 */ public static final Function _instance = new __tcf_312378();
/* 13 */ public final Function resolve() { return _instance; }
/* */
/* 15 */ public __tcf_312378() { super("__tcf_312378", 1, false); }
/* */
/* */ public int execute(int paramInt)
/* */ {
/* 19 */ call(paramInt);
/* 20 */ return 0;
/* */ }
/* */
/* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4)
/* */ {
/* 25 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 26 */ paramInt4 += 2;
/* 27 */ paramInt3--;
/* 28 */ call(i);
/* 29 */ return paramInt4;
/* */ }
/* */
/* */
/* */
/* */
/* */ public static void call(int paramInt)
/* */ {
/* */ try
/* */ {
/* 39 */ _ZNSsD1Ev.call(465560);
/* 40 */ return;
/* */ }
/* */ finally {}
/* */ }
/* */ }
/* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/__tcf_312378.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"kimjoey79@gmail.com"
] |
kimjoey79@gmail.com
|
0d937f92caf4e33610330bcc46fb0d6600e80f9c
|
11b5f3eb0d60201c4135b9ce6721a034cfbe9c0b
|
/app/src/main/java/com/rahul/jaumo_app/Suraj_Gupta.java
|
ba2ce6312f248205ddb47c8a9978b985f95b6ec3
|
[] |
no_license
|
rahul6975/Jaumo_Application
|
36bf4cd93ef13b137d30bedd9ecdd3bf63ac388f
|
373e424bde3259d93d36df4c0a2767a86cc08e52
|
refs/heads/master
| 2023-02-07T16:24:47.284105
| 2021-01-01T20:31:49
| 2021-01-01T20:31:49
| 325,253,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,137
|
java
|
package com.rahul.jaumo_app;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;
public class Suraj_Gupta extends AppCompatActivity {
private ImageView tick;
private ImageView cancel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_suraj__gupta);
tick= findViewById(R.id.ivTick);
cancel = findViewById(R.id.ivIgnore);
tick.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(Suraj_Gupta.this,"You liked this profile",Toast.LENGTH_LONG).show();
finish();
}
});
cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(Suraj_Gupta.this,"You disliked this profile",Toast.LENGTH_LONG).show();
finish();
}
});
}
}
|
[
"rahulya7569@gmail.com"
] |
rahulya7569@gmail.com
|
896a6616912792447ae46b12fdde25c590cbee96
|
3e234179c3b67296ab4b6ad828dcf2fbb5b5cc06
|
/src/main/java/br/mdfe/model/MdfeStatusServico.java
|
a275326eb8620001bbd0ed8c056471a6b47a6631
|
[] |
no_license
|
soaresMatheuss/elettro
|
0b00a76f86833b8e66973d4a15bd1fdec42b7d08
|
584f05c7a054cc50fa5cbbc3aab99f632f6b93fe
|
refs/heads/master
| 2023-05-08T13:58:35.714644
| 2019-10-17T20:31:07
| 2019-10-17T20:31:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,061
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package br.mdfe.model;
/**
*
* @author DerliRiffel
*/
public class MdfeStatusServico {
private String cStat;
private String dhRecbto;
private String tMed;
private String dhRetorno;
private String xMotivo;
public String getcStat() {
return cStat;
}
public void setcStat(String cStat) {
this.cStat = cStat;
}
public String getDhRecbto() {
return dhRecbto;
}
public void setDhRecbto(String dhRecbto) {
this.dhRecbto = dhRecbto;
}
public String getDhRetorno() {
return dhRetorno;
}
public void setDhRetorno(String dhRetorno) {
this.dhRetorno = dhRetorno;
}
public String gettMed() {
return tMed;
}
public void settMed(String tMed) {
this.tMed = tMed;
}
public String getxMotivo() {
return xMotivo;
}
public void setxMotivo(String xMotivo) {
this.xMotivo = xMotivo;
}
}
|
[
"teo@rsdata.com.br"
] |
teo@rsdata.com.br
|
7e6fa2754bec78b4903d2f9bcc52df0bf00ded9e
|
b15857cb39709dbbe4d12394ff957ea6b350a997
|
/src/Sorting/MergeSort.java
|
75cb2f0b571580ea7952de8000b5baeed3ef0578
|
[] |
no_license
|
prkg7341/AlgorithmPractice
|
5337b9803634ee22e1d9057dacbe42e6934cd797
|
a04b8df41afa40eda75d9a7ce2a46b87645ccbf8
|
refs/heads/master
| 2022-10-01T19:57:52.181014
| 2022-09-21T15:07:29
| 2022-09-21T15:07:29
| 152,734,619
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,308
|
java
|
package Sorting;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MergeSort {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int n = Integer.parseInt(br.readLine());
int[] ar = new int[n];
for(int i=0 ; i<n ; i++){
ar[i] = Integer.parseInt(br.readLine());
}
mergeSort(ar,0,ar.length-1);
for(int i : ar){
sb.append(i).append("\n");
}
sb.deleteCharAt(sb.length()-1);
System.out.print(sb.toString());
}
static void mergeSort(int[] ar, int start, int end){
if(start<end){
int mid = (start+end)/2;
mergeSort(ar, start, mid);
mergeSort(ar, mid+1, end);
merge(ar,start,end);
}
}
static void merge(int[] ar, int start, int end){
int[] ar2 = new int[end-start+1];
int mid = (start+end)/2;
int mid2 = mid+1;
int a = start;
int index = 0;
while(a<=mid && mid2<=end){
if(ar[a]<=ar[mid2]){
ar2[index++] = ar[a++];
}
else{
ar2[index++] = ar[mid2++];
}
}
while(a<=mid){
ar2[index++] = ar[a++];
}
while(mid2<=end){
ar2[index++] = ar[mid2++];
}
index = 0;
for(int i=start ; i<=end ; i++){
ar[i] = ar2[index++];
}
}
}
|
[
"40709295+prkg7341@users.noreply.github.com"
] |
40709295+prkg7341@users.noreply.github.com
|
5ac5d1481cdce3dc7414447b3fd2cd5142af4fc8
|
acb9ff1067786ab105e8522b1cf58304d023e928
|
/buzz-ads-common/src/main/java/com/buzzinate/buzzads/stats/BaseDailyStats.java
|
3ebf4d46da0ec9fd03102dfed7437aaa0780a6fe
|
[] |
no_license
|
Leibosite/buzz-ads
|
bee3661ee167e7226bd43b4cf0876daca9ed18e9
|
48d79bb075f8364f529e312f0d8a8677e797d13e
|
refs/heads/master
| 2021-01-17T15:44:32.605792
| 2014-01-24T05:43:23
| 2014-01-24T05:43:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,112
|
java
|
package com.buzzinate.buzzads.stats;
import java.io.Serializable;
import java.math.BigDecimal;
import java.text.DecimalFormat;
/**
*
* @author Harry Feng<xiaobo.feng@buzzinate.com>
*
* 2013-3-8
*/
public class BaseDailyStats implements Serializable {
protected static DecimalFormat doubleformat = new DecimalFormat("#,###,##0.00");
protected static DecimalFormat doubleNoCommaFormat = new DecimalFormat("######0.00");
protected static DecimalFormat format = new DecimalFormat("#,###,##0.00%");
private static final long serialVersionUID = -2058505115492692375L;
// 统计信息
private int views;
private int clicks;
private int cpcClicks;
private int cpcComm;
private int cpmViews;
private int cpsComm;
private BigDecimal cpmComm = new BigDecimal(0);
public int getViews() {
return views;
}
public void setViews(int views) {
this.views = views;
}
public int getClicks() {
return clicks;
}
public void setClicks(int clicks) {
this.clicks = clicks;
}
public int getCpcComm() {
return cpcComm;
}
public void setCpcComm(int cpcComm) {
this.cpcComm = cpcComm;
}
public int getCpsComm() {
return cpsComm;
}
public void setCpsComm(int cpsComm) {
this.cpsComm = cpsComm;
}
public int getCpcClicks() {
return cpcClicks;
}
public void setCpcClicks(int cpcClicks) {
this.cpcClicks = cpcClicks;
}
public int getCpmViews() {
return cpmViews;
}
public void setCpmViews(int cpmViews) {
this.cpmViews = cpmViews;
}
public BigDecimal getCpmComm() {
if (this.cpmComm == null) {
return new BigDecimal(0);
}
return cpmComm;
}
public void setCpmComm(BigDecimal cpmComm) {
this.cpmComm = cpmComm;
}
public double getCostDouble() {
return ((double) cpcComm + (double) cpsComm) / 100 + cpmComm.doubleValue();
}
/*
* 总费用
*/
public String getCost() {
return doubleformat.format(getCostDouble());
}
/*
* 平均千次展示费用(单位为¥)
*/
public String getAvgViewCost() {
if (views == 0)
return "-";
return doubleformat.format(getCostDouble() * 1000 / views);
}
/*
* 平均点击费用
*/
public String getAvgClickCost() {
if (clicks == 0)
return "-";
return doubleformat.format(getCostDouble() / clicks);
}
/*
* 点击/展示
*/
public String getClickToView() {
if (views == 0)
return "-";
return format.format((double) clicks / views);
}
/*
* 有效点击/展示
*/
public String getCpcClickToView() {
if (views == 0)
return "-";
return format.format((double) cpcClicks / views);
}
}
|
[
"gefforey520@gmail.com"
] |
gefforey520@gmail.com
|
98c5e7f38f94c2d5e1647a2a84ecd19205702308
|
13f63d6f8b5458035eccfa04eff9bdb2db9f7337
|
/src/main/java/segment/crf/XinCRFConfig.java
|
2f539e36970aaa4979fcc0d6c5e134d3938ceb82
|
[] |
no_license
|
1000-7/xinlp
|
b093ba76856f996c15919334be1462341c14ddf2
|
bdebe82fa7e3dca58e4a65f6dc594b50eb792327
|
refs/heads/master
| 2022-07-27T04:09:33.051611
| 2020-11-13T07:19:13
| 2020-11-13T07:19:13
| 159,464,556
| 24
| 11
| null | 2022-06-17T02:03:14
| 2018-11-28T07:54:40
|
Java
|
UTF-8
|
Java
| false
| false
| 579
|
java
|
package segment.crf;
import tools.PathUtils;
public class XinCRFConfig {
public static String filePath;
public static String modelPath;
public static String binModelPath;
static {
filePath = PathUtils.getDataPath() + "/segment/crf/modelc1.5.txt";
modelPath = PathUtils.getDataPath() + "/segment/crf/xincrfc1.5.model";
binModelPath = PathUtils.getDataPath() + "xincrf.model.bin";
}
public static String getFilePath() {
return filePath;
}
public static String getModelPath() {
return modelPath;
}
}
|
[
"1256656057@qq.com"
] |
1256656057@qq.com
|
03a91fcf5923e520368f416d38b12bd54c0fd163
|
4d97a8ec832633b154a03049d17f8b58233cbc5d
|
/Math/79/Math/evosuite-branch/7/org/apache/commons/math/util/MathUtilsEvoSuite_branch_Test_scaffolding.java
|
d73153d95bdd0fa58c15664a44161a1acee1afc4
|
[] |
no_license
|
4open-science/evosuite-defects4j
|
be2d172a5ce11e0de5f1272a8d00d2e1a2e5f756
|
ca7d316883a38177c9066e0290e6dcaa8b5ebd77
|
refs/heads/master
| 2021-06-16T18:43:29.227993
| 2017-06-07T10:37:26
| 2017-06-07T10:37:26
| 93,623,570
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,558
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Dec 11 20:34:06 GMT 2014
*/
package org.apache.commons.math.util;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
public class MathUtilsEvoSuite_branch_Test_scaffolding {
@org.junit.Rule
public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(6000);
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 5000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
resetClasses();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("java.vm.vendor", "Oracle Corporation");
java.lang.System.setProperty("java.specification.version", "1.7");
java.lang.System.setProperty("java.home", "/usr/local/packages6/java/jdk1.7.0_55/jre");
java.lang.System.setProperty("user.dir", "/scratch/ac1gf/Math/79/7/run_evosuite.pl_81504_1418329415");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
java.lang.System.setProperty("awt.toolkit", "sun.awt.X11.XToolkit");
java.lang.System.setProperty("file.encoding", "UTF-8");
java.lang.System.setProperty("file.separator", "/");
java.lang.System.setProperty("java.awt.graphicsenv", "sun.awt.X11GraphicsEnvironment");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.awt.printerjob", "sun.print.PSPrinterJob");
java.lang.System.setProperty("java.class.path", "/data/ac1gf/defects4j/framework/projects/lib/evosuite.jar:/scratch/ac1gf/Math/79/7/run_evosuite.pl_81504_1418329415/target/classes");
java.lang.System.setProperty("java.class.version", "51.0");
java.lang.System.setProperty("java.endorsed.dirs", "/usr/local/packages6/java/jdk1.7.0_55/jre/lib/endorsed");
java.lang.System.setProperty("java.ext.dirs", "/usr/local/packages6/java/jdk1.7.0_55/jre/lib/ext:/usr/java/packages/lib/ext");
java.lang.System.setProperty("java.library.path", "lib");
java.lang.System.setProperty("java.runtime.name", "Java(TM) SE Runtime Environment");
java.lang.System.setProperty("java.runtime.version", "1.7.0_55-b13");
java.lang.System.setProperty("java.specification.name", "Java Platform API Specification");
java.lang.System.setProperty("java.specification.vendor", "Oracle Corporation");
java.lang.System.setProperty("java.vendor", "Oracle Corporation");
java.lang.System.setProperty("java.vendor.url", "http://java.oracle.com/");
java.lang.System.setProperty("java.version", "1.7.0_55");
java.lang.System.setProperty("java.vm.info", "mixed mode");
java.lang.System.setProperty("java.vm.name", "Java HotSpot(TM) 64-Bit Server VM");
java.lang.System.setProperty("java.vm.specification.name", "Java Virtual Machine Specification");
java.lang.System.setProperty("java.vm.specification.vendor", "Oracle Corporation");
java.lang.System.setProperty("java.vm.specification.version", "1.7");
java.lang.System.setProperty("java.vm.version", "24.55-b03");
java.lang.System.setProperty("line.separator", "\n");
java.lang.System.setProperty("os.arch", "amd64");
java.lang.System.setProperty("os.name", "Linux");
java.lang.System.setProperty("os.version", "2.6.32-431.23.3.el6.x86_64");
java.lang.System.setProperty("path.separator", ":");
java.lang.System.setProperty("user.country", "GB");
java.lang.System.setProperty("user.home", "/home/ac1gf");
java.lang.System.setProperty("user.language", "en");
java.lang.System.setProperty("user.name", "ac1gf");
java.lang.System.setProperty("user.timezone", "GB-Eire");
}
private static void initializeClasses() {
org.evosuite.runtime.ClassStateSupport.initializeClasses(MathUtilsEvoSuite_branch_Test_scaffolding.class.getClassLoader() ,
"org.apache.commons.math.MathRuntimeException$7",
"org.apache.commons.math.MathRuntimeException$8",
"org.apache.commons.math.MathRuntimeException$9",
"org.apache.commons.math.MathRuntimeException$3",
"org.apache.commons.math.MathRuntimeException$10",
"org.apache.commons.math.MathRuntimeException$4",
"org.apache.commons.math.MathRuntimeException$5",
"org.apache.commons.math.util.MathUtils",
"org.apache.commons.math.MathRuntimeException$6",
"org.apache.commons.math.MathRuntimeException$1",
"org.apache.commons.math.MathRuntimeException$2",
"org.apache.commons.math.MathRuntimeException"
);
}
private static void resetClasses() {
org.evosuite.runtime.reset.ClassResetter.getInstance().setClassLoader(MathUtilsEvoSuite_branch_Test_scaffolding.class.getClassLoader());
org.evosuite.runtime.ClassStateSupport.resetClasses(
"org.apache.commons.math.util.MathUtils",
"org.apache.commons.math.MathRuntimeException",
"org.apache.commons.math.MathRuntimeException$4",
"org.apache.commons.math.MathRuntimeException$1"
);
}
}
|
[
"martin.monperrus@gnieh.org"
] |
martin.monperrus@gnieh.org
|
36eebc501d7b64001984d7a1b338891ae67e215d
|
362fcc9de89afd9921a6312d348c27628f00b149
|
/java2novice.spring.37AutoWiringByAutowired/src/main/java/com/java2novice/beans/PaymentGateway3.java
|
e40ac77bba1069d297c563c664be3ee22b58e962
|
[] |
no_license
|
aben328/java2novice.spring
|
ababe6069fa52e2639494a5f01897f8b1f3e27d6
|
7f94be32c19cf0a122afd5474fffbb1eacd3c104
|
refs/heads/master
| 2021-01-10T14:44:22.008941
| 2015-12-12T12:51:28
| 2015-12-12T12:51:28
| 47,187,153
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 794
|
java
|
package com.java2novice.beans;
import org.springframework.beans.factory.annotation.Autowired;
/**
* Dependency Check: When you use @Autowired, it will make dependency check to make sure proper auto-wiring on property.
* If spring fails to find matching bean for auto-wiring, it throws an exception. If you don't dependency check, then
* use "required" attribute of @Autowired annotation, and set it false. Here is an example:
* @author java2novice
* @date 2015年12月3日下午5:24:02
*/
public class PaymentGateway3 {
private Order order;
@Autowired(required = false)
public PaymentGateway3(Order ord) {
this.order = ord;
}
@Override
public String toString() {
return "ordering " + this.order.getItem() + " | price: " + this.order.getPrice();
}
}
|
[
"aben328@gmail.com"
] |
aben328@gmail.com
|
09e44630be3ddbefcc25aa0ba444c8e8d9097c88
|
0839f55b01520d5b32a1ed27a00c4311fe2d1494
|
/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java
|
5684f921d5753e725b6b3cea81f132243fa2594a
|
[] |
no_license
|
theseedmc/QuickShop-Reremake
|
bee7202c57f629222f2c2b52ab8dcf1754a9a45a
|
a21d8191e8725823f98544f8d88dccdb0f807ba6
|
refs/heads/master
| 2020-09-17T04:26:07.429139
| 2019-12-05T00:18:20
| 2019-12-05T00:18:20
| 213,086,687
| 0
| 0
| null | 2019-10-05T23:55:13
| 2019-10-05T23:55:13
| null |
UTF-8
|
Java
| false
| false
| 1,182
|
java
|
package org.maxgamer.quickshop.Listeners;
import lombok.AllArgsConstructor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.Util.Util;
/**
* @author Netherfoam
*/
@AllArgsConstructor
public class ChatListener implements Listener {
private QuickShop plugin;
@EventHandler(priority = EventPriority.LOWEST)
public void onChat(AsyncPlayerChatEvent e) {
if (ListenerHelper.isDisabled(e.getClass())) {
return;
}
if (e.isCancelled() && plugin.getConfig().getBoolean("shop.ignore-cancel-chat-event")) {
Util.debugLog("Ignored a chat event (Canceled by another plugin.)");
return;
}
if (!plugin.getShopManager().getActions().containsKey(e.getPlayer().getUniqueId())) {
return;
}
//Fix stupid chat plugin will add a weird space before or after the number we want.
plugin.getShopManager().handleChat(e.getPlayer(), e.getMessage().trim());
e.setCancelled(true);
}
}
|
[
"2908803755@qq.com"
] |
2908803755@qq.com
|
236954180f7c5c335fee6e5eedf869885feff647
|
ea87e7258602e16675cec3e29dd8bb102d7f90f8
|
/fest-assert/src/test/java/org/fest/assertions/ThrowableAssert_isNot_Test.java
|
76e29991a3a93ea89c9c2df1c6c108ca25e24e63
|
[
"Apache-2.0"
] |
permissive
|
codehaus/fest
|
501714cb0e6f44aa1b567df57e4f9f6586311862
|
a91c0c0585c2928e255913f1825d65fa03399bc6
|
refs/heads/master
| 2023-07-20T01:30:54.762720
| 2010-09-02T00:56:33
| 2010-09-02T00:56:33
| 36,525,844
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,219
|
java
|
/*
* Created on Oct 7, 2009
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright @2009-2010 the original author or authors.
*/
package org.fest.assertions;
import org.junit.BeforeClass;
/**
* Tests for <code>{@link ThrowableAssert#isNot(Condition)}</code>.
*
* @author Alex Ruiz
*/
public class ThrowableAssert_isNot_Test extends GenericAssert_isNot_TestCase<Throwable> {
private static Throwable notNullValue;
@BeforeClass
public static void setUpOnce() {
notNullValue = new Exception();
}
@Override protected ThrowableAssert assertionsFor(Throwable actual) {
return new ThrowableAssert(actual);
}
@Override protected Throwable notNullValue() {
return notNullValue;
}
}
|
[
"alexruiz@0e018e5f-c563-0410-a877-f7675914c6cc"
] |
alexruiz@0e018e5f-c563-0410-a877-f7675914c6cc
|
3065c0abbacc96b4c5509edc508e005b4e571bd9
|
13dfd110df6cccc7ed5ce992ba5e7eadc56a42af
|
/sm-shop-model/src/main/java/com/salesmanager/shop/admin/controller/customer/membership/ReferralCodeFacade.java
|
a7ca00afa960f1230f4d54b085a6aa8f1d0b67c7
|
[] |
no_license
|
ajaytiwari000/Habbit
|
24ca9455f0200e648640079945a04b01918dac7b
|
1ccff760c0a17515748cdc7c9d133fae71b8d937
|
refs/heads/master
| 2023-03-21T11:32:26.708784
| 2021-03-12T07:38:02
| 2021-03-12T07:38:02
| 265,888,454
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,164
|
java
|
/** */
package com.salesmanager.shop.admin.controller.customer.membership;
import com.salesmanager.core.model.merchant.MerchantStore;
import com.salesmanager.core.model.reference.language.Language;
import com.salesmanager.shop.model.customer.PersistableOwnerTypeList;
import com.salesmanager.shop.model.customer.PersistableReferralCode;
import com.salesmanager.shop.model.customer.PersistableReferralCodeList;
public interface ReferralCodeFacade {
PersistableReferralCode create(
PersistableReferralCode persistableReferralCode, MerchantStore merchantStore);
PersistableReferralCode update(
PersistableReferralCode persistableReferralCode, MerchantStore merchantStore);
void deleteById(Long id);
PersistableReferralCode getReferralCodeById(
Long id, MerchantStore merchantStore, Language language);
PersistableReferralCode getReferralCodeByCode(String referralCode);
PersistableReferralCode getReferralCodeByPhone(String phoneNumber);
PersistableReferralCodeList getAllReferralCode(MerchantStore merchantStore, Language language);
PersistableOwnerTypeList allOwnerType(MerchantStore merchantStore, Language language);
}
|
[
"ajaytiwari000@gmail.com"
] |
ajaytiwari000@gmail.com
|
afc35d1430250ebddb7aa74e887f1975b11d7a7c
|
42138a525ab9d89dfcc85c04a692fd7a13be9316
|
/src/test/java/org/scribe/up/test/profile/yahoo/TestYahooEmail.java
|
040bff28bef8a13d247e7ddc6eba717abe8d7faf
|
[
"Apache-2.0"
] |
permissive
|
t170324802/scribe-up-1
|
aa89e959f601ea77a274c5e09601e809bc99952a
|
05c5c28d7ffe448be782c1e01b38488aee30ae6d
|
refs/heads/master
| 2021-01-24T02:47:14.269186
| 2012-12-16T08:07:58
| 2012-12-16T08:07:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,436
|
java
|
/*
Copyright 2012 Jerome Leleu
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.scribe.up.test.profile.yahoo;
import junit.framework.TestCase;
import org.scribe.up.profile.JsonHelper;
import org.scribe.up.profile.yahoo.YahooEmail;
/**
* This class tests the {@link org.scribe.up.profile.yahoo.YahooEmail} class.
*
* @author Jerome Leleu
* @since 1.1.0
*/
public final class TestYahooEmail extends TestCase {
private static final int ID = 1;
private static final boolean PRIMARY = true;
private static final String HANDLE = "testscribeup@gmail.com";
private static final String TYPE = "HOME";
private static final String GOOD_JSON = "{\"id\" : " + ID + ", \"primary\" : " + PRIMARY + ", \"handle\" : \""
+ HANDLE + "\", \"type\" : \"" + TYPE + "\"}";
private static final String BAD_JSON = "{ }";
public void testNull() {
final YahooEmail yahooEmail = new YahooEmail();
yahooEmail.buildFrom(null);
assertNull(yahooEmail.getId());
assertNull(yahooEmail.getPrimary());
assertNull(yahooEmail.getHandle());
assertNull(yahooEmail.getType());
}
public void testBadJson() {
final YahooEmail yahooEmail = new YahooEmail();
yahooEmail.buildFrom(JsonHelper.getFirstNode(BAD_JSON));
assertNull(yahooEmail.getId());
assertNull(yahooEmail.getPrimary());
assertNull(yahooEmail.getHandle());
assertNull(yahooEmail.getType());
}
public void testGoodJson() {
final YahooEmail yahooEmail = new YahooEmail();
yahooEmail.buildFrom(JsonHelper.getFirstNode(GOOD_JSON));
assertEquals(ID, yahooEmail.getId().intValue());
assertTrue(yahooEmail.getPrimary());
assertEquals(HANDLE, yahooEmail.getHandle());
assertEquals(TYPE, yahooEmail.getType());
}
}
|
[
"leleuj@gmail.com"
] |
leleuj@gmail.com
|
97b53cb4910839091644fac65ebb93c5829e2ce6
|
3a0a51add2930bb96b8b6ea2cd76a4fe47cda032
|
/experiments/subjects/jaxen-1.2.0/src/java/main/org/jaxen/function/LangFunction.java
|
95dae4a66c2abd2854946975e0eb06ecf4614935
|
[
"MIT"
] |
permissive
|
soneyahossain/hcc-gap-recommender
|
d313efb6b44ade04ef02e668ee06d29ae2fbb002
|
b2c79532d5246c8b52e2234f99dc62a26b3f364b
|
refs/heads/main
| 2023-04-14T08:11:22.986933
| 2023-01-27T00:01:09
| 2023-01-27T00:01:09
| 589,493,747
| 5
| 1
|
MIT
| 2023-03-16T15:41:47
| 2023-01-16T08:53:46
|
Java
|
UTF-8
|
Java
| false
| false
| 7,136
|
java
|
/*
* $Header$
* $Revision$
* $Date$
*
* ====================================================================
*
* Copyright 2000-2002 bob mcwhirter & James Strachan.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of the Jaxen Project 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 OWNER
* 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.
*
* ====================================================================
* This software consists of voluntary contributions made by many
* individuals on behalf of the Jaxen Project and was originally
* created by bob mcwhirter <bob@werken.com> and
* James Strachan <jstrachan@apache.org>. For more information on the
* Jaxen Project, please see <http://www.jaxen.org/>.
*
* $Id$
*/
package org.jaxen.function;
import java.util.Iterator;
import java.util.List;
import org.jaxen.Context;
import org.jaxen.Function;
import org.jaxen.FunctionCallException;
import org.jaxen.Navigator;
import org.jaxen.UnsupportedAxisException;
/**
* <p>
* <b>4.3</b> <code><i>boolean</i> lang(<i>string</i>)</code>
* </p>
*
* <blockquote cite="http://www.w3.org/TR/xpath#function-lang">
* <p>
* The <b>lang</b> function returns true or false depending on whether
* the language of the context node as specified by
* <code>xml:lang</code> attributes is the same as or is a sublanguage
* of the language specified by the argument string. The language of the
* context node is determined by the value of the <code>xml:lang</code>
*
* attribute on the context node, or, if the context node has no
* <code>xml:lang</code> attribute, by the value of the
* <code>xml:lang</code> attribute on the nearest ancestor of the
* context node that has an <code>xml:lang</code> attribute. If there
* is no such attribute, then <b><a href="#function-lang">lang</a></b>
* returns false. If there is such an attribute, then <b><a
* href="#function-lang">lang</a></b> returns true if the attribute
* value is equal to the argument ignoring case, or if there is some
* suffix starting with <code>-</code> such that the attribute value
* is equal to the argument ignoring that suffix of the attribute value
* and ignoring case. For example, <code>lang("en")</code> would
* return true if the context node is any of these five elements:
* </p>
*
* <pre>
* <para xml:lang="en"/>
* <div xml:lang="en"><para/></div>
* <para xml:lang="EN"/>
* <para xml:lang="en-us"/>
* </pre>
*
* </blockquote>
*
* @author Attila Szegedi (szegedia @ freemail.hu)
* @see <a href="https://www.w3.org/TR/xpath#function-lang"
* target="_top">XPath Specification</a>
*/
public class LangFunction implements Function
{
private static final String LANG_LOCALNAME = "lang";
private static final String XMLNS_URI =
"http://www.w3.org/XML/1998/namespace";
/**
* Create a new <code>LangFunction</code> object.
*/
public LangFunction() {}
/**
* <p>
* Determines whether or not the context node is written in the language specified
* by the XPath string-value of <code>args.get(0)</code>,
* as determined by the nearest <code>xml:lang</code> attribute in scope.
* </p>
*
* @param context the context in which to evaluate the <code>lang()</code> function
* @param args the arguments to the lang function
* @return a <code>Boolean</code> indicating whether the context node is written in
* the specified language
* @throws FunctionCallException if <code>args</code> does not have length one
*
*/
public Object call(Context context,
List args) throws FunctionCallException
{
if (args.size() != 1) {
throw new FunctionCallException("lang() requires exactly one argument.");
}
Object arg = args.get(0);
try {
return evaluate(context.getNodeSet(), arg, context.getNavigator() );
}
catch(UnsupportedAxisException e) {
throw new FunctionCallException("Can't evaluate lang()",
e);
}
}
private static Boolean evaluate(List contextNodes, Object lang, Navigator nav)
throws UnsupportedAxisException
{
return evaluate(contextNodes.get(0),
StringFunction.evaluate(lang, nav), nav)
? Boolean.TRUE : Boolean.FALSE;
}
private static boolean evaluate(Object node, String lang, Navigator nav)
throws UnsupportedAxisException
{
Object element = node;
if (! nav.isElement(element)) {
element = nav.getParentNode(node);
}
while (element != null && nav.isElement(element))
{
Iterator attrs = nav.getAttributeAxisIterator(element);
while(attrs.hasNext())
{
Object attr = attrs.next();
if(LANG_LOCALNAME.equals(nav.getAttributeName(attr)) &&
XMLNS_URI.equals(nav.getAttributeNamespaceUri(attr)))
{
return
isSublang(nav.getAttributeStringValue(attr), lang);
}
}
element = nav.getParentNode(element);
}
return false;
}
private static boolean isSublang(String sublang, String lang)
{
if(sublang.equalsIgnoreCase(lang))
{
return true;
}
int ll = lang.length();
return
sublang.length() > ll &&
sublang.charAt(ll) == '-' &&
sublang.substring(0, ll).equalsIgnoreCase(lang);
}
}
|
[
"an7s@virginia.edu"
] |
an7s@virginia.edu
|
312980208ac85aa8aeab1a5f017077ad349f789f
|
09dd033f6b7e831924dd85ecf6c8a692d431db7c
|
/esb/org.wso2.developerstudio.eclipse.esb/src/org/wso2/developerstudio/eclipse/esb/mediators/EntitlementMediatorOnAcceptBranch.java
|
48308863bff39c6c2decce412e0e5c7154833280
|
[
"Apache-2.0"
] |
permissive
|
sumuditha-viraj/developer-studio
|
354c4402b3f4667344b0454f585f3aca9589b858
|
cef47b9847bed96c241b9a070bfa00ecc6716ef0
|
refs/heads/master
| 2021-01-17T23:44:15.476712
| 2018-08-22T07:34:53
| 2018-08-22T07:34:53
| 30,071,053
| 0
| 0
| null | 2015-01-30T16:10:08
| 2015-01-30T12:29:53
|
Java
|
UTF-8
|
Java
| false
| false
| 3,801
|
java
|
/**
* Copyright 2009-2010 WSO2, Inc. (http://wso2.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.wso2.developerstudio.eclipse.esb.mediators;
import org.wso2.developerstudio.eclipse.esb.MediatorBranch;
import org.wso2.developerstudio.eclipse.esb.RegistryKeyProperty;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Entitlement Mediator On Accept Branch</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.wso2.developerstudio.eclipse.esb.mediators.EntitlementMediatorOnAcceptBranch#getSequenceType <em>Sequence Type</em>}</li>
* <li>{@link org.wso2.developerstudio.eclipse.esb.mediators.EntitlementMediatorOnAcceptBranch#getSequenceKey <em>Sequence Key</em>}</li>
* </ul>
* </p>
*
* @see org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage#getEntitlementMediatorOnAcceptBranch()
* @model
* @generated
*/
public interface EntitlementMediatorOnAcceptBranch extends MediatorBranch {
/**
* Returns the value of the '<em><b>Sequence Type</b></em>' attribute.
* The literals are from the enumeration {@link org.wso2.developerstudio.eclipse.esb.mediators.EntitlementSequence}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Sequence Type</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Sequence Type</em>' attribute.
* @see org.wso2.developerstudio.eclipse.esb.mediators.EntitlementSequence
* @see #setSequenceType(EntitlementSequence)
* @see org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage#getEntitlementMediatorOnAcceptBranch_SequenceType()
* @model
* @generated
*/
EntitlementSequence getSequenceType();
/**
* Sets the value of the '{@link org.wso2.developerstudio.eclipse.esb.mediators.EntitlementMediatorOnAcceptBranch#getSequenceType <em>Sequence Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Sequence Type</em>' attribute.
* @see org.wso2.developerstudio.eclipse.esb.mediators.EntitlementSequence
* @see #getSequenceType()
* @generated
*/
void setSequenceType(EntitlementSequence value);
/**
* Returns the value of the '<em><b>Sequence Key</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Sequence Key</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Sequence Key</em>' reference.
* @see #setSequenceKey(RegistryKeyProperty)
* @see org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage#getEntitlementMediatorOnAcceptBranch_SequenceKey()
* @model
* @generated
*/
RegistryKeyProperty getSequenceKey();
/**
* Sets the value of the '{@link org.wso2.developerstudio.eclipse.esb.mediators.EntitlementMediatorOnAcceptBranch#getSequenceKey <em>Sequence Key</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Sequence Key</em>' reference.
* @see #getSequenceKey()
* @generated
*/
void setSequenceKey(RegistryKeyProperty value);
} // EntitlementMediatorOnAcceptBranch
|
[
"harshana@wso2.com"
] |
harshana@wso2.com
|
a06bc3ad110af5a4fd37f30d6b904282a871f354
|
23a210a857e1d8cda630f3ad40830e2fc8bb2876
|
/emp_7.3/emp/appwg/com/montnets/emp/appwg/wginterface/IProcPMessage.java
|
89b08ca8c8253095522f5a8581855a40c989a4e9
|
[] |
no_license
|
zengyijava/shaoguang
|
415a613b20f73cabf9ab171f3bf64a8233e994f8
|
5d8ad6fa54536e946a15b5e7e7a62eb2e110c6b0
|
refs/heads/main
| 2023-04-25T07:57:11.656001
| 2021-05-18T01:18:49
| 2021-05-18T01:18:49
| 368,159,409
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 248
|
java
|
package com.montnets.emp.appwg.wginterface;
public interface IProcPMessage
{
/**
* 个人消息接收处理接口实例
* @param json json格式字符串
* @return 处理成功返回true
*/
public boolean processPMessage(String json);
}
|
[
"2461418944@qq.com"
] |
2461418944@qq.com
|
63fd2e508dfad4682998dc885f634b4404149f1b
|
86597e88e41b767dbff78bafea24a0eaa1d3e0cb
|
/jppf/JPPF-4.0.1-full-src/node/src/java/org/jppf/classloader/ClassLoaderEvent.java
|
6371e016e8e382a253fd91c6bd5a221966a5ad89
|
[] |
no_license
|
Eduardo555/JPPF---Codigos-Exemplos
|
e2e9bde8263ae1aa8573bd98cbe2e94398723872
|
e5ffccffbb1250d20eb5366b7eb91c6b3f951f17
|
refs/heads/master
| 2021-05-15T12:46:33.598336
| 2017-10-27T01:30:16
| 2017-10-27T01:30:16
| 108,477,484
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,371
|
java
|
/*
* JPPF.
* Copyright (C) 2005-2014 JPPF Team.
* http://www.jppf.org
*
* 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.jppf.classloader;
import java.util.EventObject;
/**
* Event emitted by an {@link AbstractJPPFClassLoader} when a class is loaded or not found for the first time.
* @author Laurent Cohen
*/
public class ClassLoaderEvent extends EventObject
{
/**
* The class that was successfully loaded.
*/
private final Class<?> loadedClass;
/**
* The name of a class that could not be found by this class loader.
*/
private final String className;
/**
* Determines whether the class was loaded from the class loader's URL classpath.
*/
private final boolean foundInURLClassPath;
/**
* Initialize this event with the specified source and Class object.n
* @param classLoader the source of this event.
* @param loadedClass the class that was successfully loaded.
* @param foundInURLClassPath <code>true</code> if the class was loaded from the class loader's URL classpath,
* <code>false</code> if it was loaded from a remote JPPF driver or client.
*/
public ClassLoaderEvent(final AbstractJPPFClassLoader classLoader, final Class<?> loadedClass, final boolean foundInURLClassPath)
{
super(classLoader);
this.loadedClass = loadedClass;
this.className = loadedClass.getName();
this.foundInURLClassPath = foundInURLClassPath;
}
/**
* Initialize this event with the specified source and Class object.n
* @param classLoader the source of this event.
* @param className the name of a class that could not be found by this class loader.
*/
public ClassLoaderEvent(final AbstractJPPFClassLoader classLoader, final String className)
{
super(classLoader);
this.loadedClass = null;
this.className = className;
this.foundInURLClassPath = false;
}
/**
* Get the class that was successfully loaded.
* @return a <code>Class</code> object, or null if the class was not found.
*/
public Class<?> getLoadedClass()
{
return loadedClass;
}
/**
* Get the name of a class that was loaded or could not be found by this class loader.
* @return the class name as a string.
*/
public String getClassName()
{
return className;
}
/**
* Determine whether the class was loaded from the class loader's URL classpath.
* @return <code>true</code> if the class was loaded from the class loader's URL classpath,
* <code>false</code> if it was loaded from a remote JPPF driver or client.
*/
public boolean isFoundInURLClassPath()
{
return foundInURLClassPath;
}
/**
* Get the class laoder which emitted this event.
* @return a {@link AbstractJPPFClassLoader} instance.
*/
public AbstractJPPFClassLoader getClassLoader()
{
return (AbstractJPPFClassLoader) getSource();
}
}
|
[
"eduardospillereanzolin@gmail.com"
] |
eduardospillereanzolin@gmail.com
|
baad33ce1a6d60e7cd21ee5ebc08cfffd4f47781
|
10d77fabcbb945fe37e15ae438e360a89a24ea05
|
/graalvm/transactions/fork/narayana/qa/tests/src/org/jboss/jbossts/qa/AITResources02Clients/Client16.java
|
c902e191aa90c63d49d307fbfee3d7d5c4cb109b
|
[
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"LicenseRef-scancode-other-copyleft"
] |
permissive
|
nmcl/scratch
|
1a881605971e22aa300487d2e57660209f8450d3
|
325513ea42f4769789f126adceb091a6002209bd
|
refs/heads/master
| 2023-03-12T19:56:31.764819
| 2023-02-05T17:14:12
| 2023-02-05T17:14:12
| 48,547,106
| 2
| 1
|
Apache-2.0
| 2023-03-01T12:44:18
| 2015-12-24T15:02:58
|
Java
|
UTF-8
|
Java
| false
| false
| 4,651
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2007, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
* (C) 2005-2006,
* @author JBoss Inc.
*/
//
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
//
// Arjuna Technologies Ltd.,
// Newcastle upon Tyne,
// Tyne and Wear,
// UK.
//
package org.jboss.jbossts.qa.AITResources02Clients;
/*
* Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved.
*
* HP Arjuna Labs,
* Newcastle upon Tyne,
* Tyne and Wear,
* UK.
*
* $Id: Client16.java,v 1.2 2003/06/26 11:43:11 rbegg Exp $
*/
/*
* Try to get around the differences between Ansi CPP and
* K&R cpp with concatenation.
*/
/*
* Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved.
*
* HP Arjuna Labs,
* Newcastle upon Tyne,
* Tyne and Wear,
* UK.
*
* $Id: Client16.java,v 1.2 2003/06/26 11:43:11 rbegg Exp $
*/
import com.arjuna.ats.jts.extensions.AtomicTransaction;
import org.jboss.jbossts.qa.AITResources02.*;
import org.jboss.jbossts.qa.Utils.OAInterface;
import org.jboss.jbossts.qa.Utils.ORBInterface;
import org.jboss.jbossts.qa.Utils.OTS;
import org.jboss.jbossts.qa.Utils.ServerIORStore;
import org.omg.CORBA.IntHolder;
public class Client16
{
public static void main(String[] args)
{
try
{
ORBInterface.initORB(args, null);
OAInterface.initOA();
String counterIOR = ServerIORStore.loadIOR(args[args.length - 3]);
Counter counter = CounterHelper.narrow(ORBInterface.orb().string_to_object(counterIOR));
int numberOfWorkers = Integer.parseInt(args[args.length - 2]);
int numberOfCalls = Integer.parseInt(args[args.length - 1]);
Worker[] workers = new Worker[numberOfWorkers];
for (int index = 0; index < workers.length; index++)
{
workers[index] = new Worker(numberOfCalls, counter);
}
for (int index = 0; index < workers.length; index++)
{
workers[index].start();
}
boolean correct = true;
for (int index = 0; index < workers.length; index++)
{
workers[index].join();
correct = correct && workers[index].isCorrect();
}
IntHolder value = new IntHolder();
AtomicTransaction atomicTransaction = new AtomicTransaction();
atomicTransaction.begin();
counter.get(value, OTS.current().get_control());
atomicTransaction.commit(true);
correct = correct && (value.value == (numberOfWorkers * numberOfCalls));
if (correct)
{
System.out.println("Passed");
}
else
{
System.out.println("Failed");
}
}
catch (Exception exception)
{
System.out.println("Failed");
System.err.println("Client16.main: " + exception);
exception.printStackTrace(System.err);
}
try
{
OAInterface.shutdownOA();
ORBInterface.shutdownORB();
}
catch (Exception exception)
{
System.err.println("Client16.main: " + exception);
exception.printStackTrace(System.err);
}
}
private static class Worker extends Thread
{
public Worker(int numberOfCalls, Counter counter)
{
_numberOfCalls = numberOfCalls;
_counter = counter;
}
public void run()
{
try
{
int index = 0;
while (index < _numberOfCalls)
{
AtomicTransaction atomicTransaction = new AtomicTransaction();
atomicTransaction.begin();
try
{
_counter.increase(OTS.current().get_control());
index++;
atomicTransaction.commit(true);
}
catch (InvocationException invocationException)
{
atomicTransaction.rollback();
}
}
}
catch (Exception exception)
{
System.err.println("Client16.Worker.run: " + exception);
exception.printStackTrace(System.err);
_correct = false;
}
}
public boolean isCorrect()
{
return _correct;
}
private boolean _correct = true;
private int _numberOfCalls;
private Counter _counter = null;
}
}
|
[
"mlittle@redhat.com"
] |
mlittle@redhat.com
|
bcabfe12f9a31b011803b6da595ffd7a40966261
|
bf44677a3d1806134653acb6a3548e585028c535
|
/src/main/java/com/glacialrush/api/map/region/Scenery.java
|
2582ee7948fdaf91bb37b9493cc1150c16ca6140
|
[] |
no_license
|
cyberpwnn/GlacialAPI
|
2dd90d1d20aac7ccae157b8578b256992f1c7188
|
8202bb166be0b705cb117ddcde0dec96818381f9
|
refs/heads/master
| 2021-01-19T09:49:45.162070
| 2016-11-27T22:15:11
| 2016-11-27T22:15:11
| 74,915,598
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 339
|
java
|
package com.glacialrush.api.map.region;
import com.glacialrush.api.game.Game;
import com.glacialrush.api.map.Map;
import com.glacialrush.api.map.Region;
import com.glacialrush.api.map.RegionType;
public class Scenery extends Region
{
public Scenery(Map map, String name, Game game)
{
super(map, name, RegionType.SCENERY, game);
}
}
|
[
"danielmillst@gmail.com"
] |
danielmillst@gmail.com
|
7f61ab7f5c530edf3ea7ecf8d265a4c0d813526d
|
cc5c0cc9d04ebe2e2299c149e1a82f294ee153a5
|
/src/org/calminfotech/system/daoInterface/AllergyDao.java
|
d3880cb2f7cbb372d587a1151408282fbf7535ec
|
[] |
no_license
|
Chykay/EMR
|
1ece6d6916464031b9892bea5104159b65056e96
|
433cd4494e9103d1a6573ad6009d429d025cc49b
|
refs/heads/master
| 2020-09-14T15:02:27.934553
| 2019-08-01T15:39:22
| 2019-08-01T15:39:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 962
|
java
|
package org.calminfotech.system.daoInterface;
import java.util.List;
import org.calminfotech.system.models.Allergy;
//import org.calminfotech.system.models.AllergyCategoryOuterRecursive;
import org.calminfotech.system.models.Organisation;
import org.calminfotech.system.models.Allergy;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Transactional(propagation= Propagation.REQUIRED, readOnly=false)
public interface AllergyDao {
public List<Allergy> fetchAll(int id);
public List<Allergy> fetchAllByOgranisation(int organisationId);
//public Allergy getCategoryItemById(int itemId);
//public List<AllergyCategoryOuterRecursive> fetchAllTypesNew();
public void save(Allergy Allergy);
public void update(Allergy Allergy);
public void delete(Allergy Allergy);
public List<Allergy> fetchTop50byOrganisation(int id);
public Allergy getAllergyById(int id);
}
|
[
"rissa@calminfotech.com"
] |
rissa@calminfotech.com
|
c15da10c167ff8f7b2bf9aea6a4e6d8622811bb4
|
b1ebe7bfa00d6134949295b449d1d02371b1d3a5
|
/src/java/com/wechat/model/base/REQ_Base.java
|
01fe9b458dad8ad0a547dba261c773040016a662
|
[] |
no_license
|
water-fu/weChat_Example
|
9d152fc8c2f393aa9693878b2665449dbe5a64d3
|
f5a6a1cd965eb10878f6e01443388eb27ba7686f
|
refs/heads/master
| 2021-01-19T11:34:28.409919
| 2016-03-26T09:36:48
| 2016-03-26T09:36:48
| 82,253,580
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,032
|
java
|
package com.wechat.model.base;
/**
* 微信请求参数对象
* Created by fusj on 15/12/23.
*/
public class REQ_Base {
/**
* 来源用户
*/
private String FromUserName;
/**
* 公众号
*/
private String ToUserName;
/**
* 创建时间
*/
private String CreateTime;
/**
* 消息类型
*/
private String MsgType;
public String getFromUserName() {
return FromUserName;
}
public void setFromUserName(String fromUserName) {
FromUserName = fromUserName;
}
public String getToUserName() {
return ToUserName;
}
public void setToUserName(String toUserName) {
ToUserName = toUserName;
}
public String getCreateTime() {
return CreateTime;
}
public void setCreateTime(String createTime) {
CreateTime = createTime;
}
public String getMsgType() {
return MsgType;
}
public void setMsgType(String msgType) {
MsgType = msgType;
}
}
|
[
"fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1"
] |
fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1
|
7f1bae0e0711d6995e2c67452815acf0149f8691
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_ddbb8d1193764543437ff175c555032f95116c5b/FixedLength/2_ddbb8d1193764543437ff175c555032f95116c5b_FixedLength_s.java
|
ea9f4615135b165363076fa61005e6afc2e7a5df
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,927
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.fo.properties;
import org.apache.fop.datatypes.PercentBaseContext;
/**
* An absolute length quantity in XSL
*/
public class FixedLength extends LengthProperty {
/** cache holding all canonical FixedLength instances */
private static final PropertyCache cache = new PropertyCache();
private int millipoints;
/**
* Set the length given a number of units and a unit name.
* @param numUnits quantity of input units
* @param units input unit specifier (in, cm, etc.)
*/
private FixedLength(double numUnits, String units) {
convert(numUnits, units);
}
/**
* Return the canonical FixedLength instance corresponding
* to the computed value
* @param numUnits input units
* @param units unit specifier
* @return the canonical FixedLength instance corresponding
* to the given number of units and unit specifier
*/
public static FixedLength getInstance(double numUnits, String units) {
return (FixedLength) cache.fetch(
new FixedLength(numUnits, units));
}
/**
* @param baseUnits the length as a number of base units (millipoints)
*/
public FixedLength(int baseUnits) {
millipoints = baseUnits;
}
/**
* Convert the given length to a dimensionless integer representing
* a whole number of base units (milli-points).
* @param dvalue quantity of input units
* @param unit input unit specifier (in, cm, etc.)
*/
protected void convert(double dvalue, String unit) {
// TODO: the whole routine smells fishy.
int assumedResolution = 1; // points/pixel = 72dpi
if (unit.equals("in")) {
dvalue = dvalue * 72;
} else if (unit.equals("cm")) {
dvalue = dvalue * 28.3464567;
} else if (unit.equals("mm")) {
dvalue = dvalue * 2.83464567;
} else if (unit.equals("pt")) {
// Do nothing.
// dvalue = dvalue;
} else if (unit.equals("mpt")) { //mpt is non-standard!!! mpt=millipoints
// TODO: this seems to be wrong.
// Do nothing.
// dvalue = dvalue;
} else if (unit.equals("pc")) {
dvalue = dvalue * 12;
/*
* } else if (unit.equals("em")) {
* dvalue = dvalue * fontsize;
*/
} else if (unit.equals("px")) {
// TODO: get resolution from user agent?
dvalue = dvalue * assumedResolution;
} else {
dvalue = 0;
log.error("Unknown length unit '" + unit + "'");
}
if (unit.equals("mpt")) {
millipoints = (int)dvalue;
} else {
millipoints = (int)(dvalue * 1000);
}
}
/**
* {@inheritDoc}
*/
public int getValue() {
return millipoints;
}
/**
* {@inheritDoc}
*/
public int getValue(PercentBaseContext context) {
return millipoints;
}
/**
* {@inheritDoc}
*/
public double getNumericValue() {
return millipoints;
}
/**
* {@inheritDoc}
*/
public double getNumericValue(PercentBaseContext context) {
return millipoints;
}
/**
* Return true since FixedLength are always absolute.
* {@inheritDoc}
*/
public boolean isAbsolute() {
return true;
}
/**
* {@inheritDoc}
*/
public String toString() {
return millipoints + "mpt";
}
/**
* {@inheritDoc}
*/
public boolean equals(Object obj) {
if (obj instanceof EnumProperty) {
return (((FixedLength)obj).millipoints == this.millipoints);
} else {
return false;
}
}
/**
* {@inheritDoc}
*/
public int hashCode() {
return millipoints;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
65a708017d170612f870ef2be62105b8ccf1b076
|
489390ba13ce6b1d4edcb401c87af42805b1a7a1
|
/mic-user-center/src/main/java/com/mic/user/center/tenant/OauthAuthorizeAspect.java
|
5d09d806a573e6beb18a55fa1e940b036af0a343
|
[
"Apache-2.0"
] |
permissive
|
pf-oss/mic-frame
|
f9a0be25f9212941103740bc7f1fc6357b2e5fac
|
235a73f0ac15f385bd1d4e103c76a439997d875b
|
refs/heads/main
| 2023-03-09T08:32:35.235670
| 2021-02-03T06:11:20
| 2021-02-03T06:11:20
| 328,859,413
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,289
|
java
|
package com.mic.user.center.tenant;
import com.mic.base.util.TenantContextHolder;
import com.mic.user.api.model.vo.LoginAppUser;
import com.mic.user.api.service.UserService;
import com.mic.security.token.TenantUsernamePasswordAuthenticationToken;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.security.oauth2.common.util.OAuth2Utils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.security.Principal;
import java.util.Map;
/**
* /oauth/authorize拦截器
* 解决不同租户单点登录时角色没变化
* @author: pf
* @create: 2021/1/14 11:46
*/
@Slf4j
@Component
@Aspect
public class OauthAuthorizeAspect {
@Resource
private UserService userService;
@Around("execution(* org.springframework.security.oauth2.provider.endpoint.AuthorizationEndpoint.authorize(..))")
public Object doAroundMethod(ProceedingJoinPoint joinPoint) throws Throwable {
Object[] args = joinPoint.getArgs();
Map<String, String> parameters = (Map<String, String>) args[1];
Principal principal = (Principal) args[3];
if (principal instanceof TenantUsernamePasswordAuthenticationToken) {
TenantUsernamePasswordAuthenticationToken tenantToken = (TenantUsernamePasswordAuthenticationToken)principal;
String clientId = tenantToken.getClientId();
String requestClientId = parameters.get(OAuth2Utils.CLIENT_ID);
//判断是否不同租户单点登录
if (!requestClientId.equals(clientId)) {
try {
TenantContextHolder.setTenant(requestClientId);
//重新查询对应该租户的角色等信息
LoginAppUser user = userService.findByUsername(tenantToken.getName());
tenantToken = new TenantUsernamePasswordAuthenticationToken(user, tenantToken.getCredentials(), user.getAuthorities(), requestClientId);
args[3] = tenantToken;
} finally {
TenantContextHolder.clear();
}
}
}
return joinPoint.proceed(args);
}
}
|
[
"pengfei.yao@yunlsp.com"
] |
pengfei.yao@yunlsp.com
|
745cd5bef00fa495126068ddf1a41b8e537282bd
|
b25656a86ef7cff8ad668ea38430429b591cd4af
|
/chzzui/src/main/java/org/chzz/utils/ImageUtils.java
|
6d172e17caeb6af180915ff24512e0d4554dc95d
|
[] |
no_license
|
xiaoxinxing12/ChzzUI2.0-Android
|
4cef566dc819d19f398443481fbd32c26acd963c
|
05d69afe846049b48a759e03d7ef3bcda3bf5114
|
refs/heads/master
| 2021-01-11T10:11:39.343732
| 2016-11-19T09:35:13
| 2016-11-19T09:35:13
| 72,424,732
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,505
|
java
|
/*
* Copyright (C) 2016 android@19code.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.chzz.utils;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.media.ExifInterface;
import android.net.Uri;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/**
* Create by h4de5ing 2016/5/21 021
* https://github.com/sharinghuang/ASRabbit
* unchecked
*/
public class ImageUtils {
public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {
final int height = options.outHeight;
final int width = options.outWidth;
int inSampleSize = 1;
if (height > reqHeight || width > reqWidth) {
final int halfHeight = height / 2;
final int halfWidth = width / 2;
while ((halfHeight / inSampleSize) > reqHeight && (halfWidth / inSampleSize) > reqWidth) {
inSampleSize *= 2;
}
}
return inSampleSize;
}
public static int getPictureDegree(String imagePath) {
int i = 0;
try {
ExifInterface localExifInterface = new ExifInterface(imagePath);
int j = localExifInterface.getAttributeInt("Orientation", 1);
switch (j) {
case 6:
i = 90;
break;
case 3:
i = 180;
break;
case 8:
i = 270;
case 4:
case 5:
case 7:
default:
break;
}
} catch (IOException localIOException) {
localIOException.printStackTrace();
}
return i;
}
public static Bitmap rotaingImageView(int paramInt, Bitmap paramBitmap) {
Matrix localMatrix = new Matrix();
localMatrix.postRotate(paramInt);
return Bitmap.createBitmap(paramBitmap, 0, 0, paramBitmap.getWidth(), paramBitmap.getHeight(), localMatrix, true);
}
public static Bitmap decodeScaleImage(String imagePath, int outWidth, int outHeight) {
BitmapFactory.Options localOptions = new BitmapFactory.Options();
localOptions.inJustDecodeBounds = true;
BitmapFactory.decodeFile(imagePath, localOptions);
int i = calculateInSampleSize(localOptions, outWidth, outHeight);
localOptions.inSampleSize = i;
localOptions.inJustDecodeBounds = false;
Bitmap localBitmap1 = BitmapFactory.decodeFile(imagePath, localOptions);
int j = getPictureDegree(imagePath);
Bitmap localBitmap2 = null;
if ((localBitmap1 != null) && (j != 0)) {
localBitmap2 = rotaingImageView(j, localBitmap1);
localBitmap1.recycle();
localBitmap1 = null;
return localBitmap2;
}
return localBitmap1;
}
public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, float roundPx) {
if (bitmap == null) {
return null;
}
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
final RectF rectF = new RectF(rect);
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
return output;
}
public static Bitmap decodeUriAsBitmap(Context mContext, Uri uri) {
Bitmap bitmap;
try {
bitmap = BitmapFactory.decodeStream(mContext.getContentResolver().openInputStream(uri));
} catch (FileNotFoundException e) {
return null;
}
return bitmap;
}
public static boolean bitmap2File(Bitmap bitmap, File imageFile) {
OutputStream os;
try {
os = new FileOutputStream(imageFile);
boolean isOK = bitmap.compress(Bitmap.CompressFormat.JPEG, 100, os);
os.flush();
os.close();
return isOK;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public static Bitmap compressImage(Bitmap image) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
image.compress(Bitmap.CompressFormat.JPEG, 100, baos);
int options = 100;
while (baos.toByteArray().length / 1024 > 100) {
options -= 10;
if (options > 0) {
baos.reset();
image.compress(Bitmap.CompressFormat.JPEG, options, baos);
}
}
ByteArrayInputStream isBm = new ByteArrayInputStream(baos.toByteArray());
return BitmapFactory.decodeStream(isBm, null, null);
}
public static Bitmap compressFixBitmap(Bitmap bitMap, int outWidth, int outHeight) {
int width = bitMap.getWidth();
int height = bitMap.getHeight();
float scaleWidth = ((float) outWidth) / width;
float scaleHeight = ((float) outHeight) / height;
Matrix matrix = new Matrix();
matrix.postScale(scaleWidth, scaleHeight);
return Bitmap.createBitmap(bitMap, 0, 0, width, height, matrix, true);
}
}
|
[
"xiaoxinxing12@qq.com"
] |
xiaoxinxing12@qq.com
|
fa3b33ccc2ac0970b4e410b1a9ed2ab384c8d967
|
938976d18d6d4ccf204fb044cb8b7bc56b0f4bef
|
/cache2k-api/src/main/java/org/cache2k/configuration/CacheType.java
|
7fb9729fc1626943c4b3d46add20fdfbbc81249d
|
[
"Apache-2.0"
] |
permissive
|
wiltonlazary/cache2k
|
beb2ac3a243f4f8287ac5d94c9bbc831729990f7
|
fad983d44792f85500d3d877600820ee440896de
|
refs/heads/master
| 2021-01-12T01:28:44.982836
| 2017-01-02T14:25:49
| 2017-01-02T14:25:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,062
|
java
|
package org.cache2k.configuration;
/*
* #%L
* cache2k API
* %%
* Copyright (C) 2000 - 2017 headissue GmbH, Munich
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/**
* A data structure to retain all known type information from the key and value types, including generic
* parameters within the cache configuration. A caching application typically constructs a type descriptor
* with the use of a {@link CacheTypeCapture}.
*
* <p>While the type descriptor contains implementation classes, interface consumers must not rely on the
* implementation types.
*
* <p><b>About types:</b>
* If no type information is provided it defaults to the Object class. The provided type information
* is used inside the cache for optimizations and as well as to select appropriate default transformation
* schemes for copying objects or marshalling. The correct types are not strictly enforced at all levels by the cache
* for performance reasons. The cache application guarantees that only the specified types will be used.
* The cache will check the type compatibility at critical points, e.g. when reconnecting to an external storage.
* Generic types: An application may provide more detailed type information to the cache, which
* contains also generic type parameters by providing a {@link CacheTypeCapture} where the cache can extract
* the type information.
*
* @see CacheTypeCapture
* @see <a href="https://github.com/google/guava/wiki/ReflectionExplained">ReflectionExplained - Google Guava Documentation</a>
*/
public interface CacheType<T> {
/** The used prefix for the toString() output. {@value #DESCRIPTOR_TO_STRING_PREFIX}. */
String DESCRIPTOR_TO_STRING_PREFIX = "CacheTypeDescriptor#";
/** Class type if not an array. */
Class<T> getType();
/**
* The type has generic type parameters and the concrete types are known.
* {@link #getTypeArguments()} returns the the arguments.
*/
boolean hasTypeArguments();
/**
* This type is an array. To analyze a multi dimensional array descend to the component, for example
* {@code getComponentType().isArray()}.
*
* @see #getComponentType()
*/
boolean isArray();
/** The component type in case of an array */
CacheType getComponentType();
/** Known type arguments, if the type is a parameterized type. */
CacheType[] getTypeArguments();
/** Java language compatible type name */
String getTypeName();
/**
* Return a serializable version of this type descriptor.
*/
CacheType getBeanRepresentation();
}
|
[
"jw_github@headissue.com"
] |
jw_github@headissue.com
|
df619411bfa2cd1859a8407bb6f5ca70945b51e7
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/avito/android/job/interview/domain/InterviewParamsConverter_Factory.java
|
f85c7eb1328f8cd02144bcace24760ac4771d427
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 650
|
java
|
package com.avito.android.job.interview.domain;
import dagger.internal.Factory;
public final class InterviewParamsConverter_Factory implements Factory<InterviewParamsConverter> {
public static final class a {
public static final InterviewParamsConverter_Factory a = new InterviewParamsConverter_Factory();
}
public static InterviewParamsConverter_Factory create() {
return a.a;
}
public static InterviewParamsConverter newInstance() {
return new InterviewParamsConverter();
}
@Override // javax.inject.Provider
public InterviewParamsConverter get() {
return newInstance();
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
db4c67087060786f2983ca8acb462fc98af7c0c2
|
ff5107cf2f495b2a07329cdf7190ff6469a1a834
|
/apps/microservices/statistic/src/main/java/com/adloveyou/ms/statistic/config/ThymeleafConfiguration.java
|
d34581f8ecf541f053f7ca914c25610dda503cda
|
[] |
no_license
|
icudroid/addonf-microservice
|
596e341cf282e1190c3752f6adf5a2c210976032
|
db9e80617b206ff3c1122e56f3c6de14e555692e
|
refs/heads/master
| 2021-05-09T02:15:47.863941
| 2018-01-27T20:29:48
| 2018-01-27T20:29:48
| 119,200,152
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 995
|
java
|
package com.adloveyou.ms.statistic.config;
import org.apache.commons.lang3.CharEncoding;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.*;
import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver;
@Configuration
public class ThymeleafConfiguration {
@SuppressWarnings("unused")
private final Logger log = LoggerFactory.getLogger(ThymeleafConfiguration.class);
@Bean
@Description("Thymeleaf template resolver serving HTML 5 emails")
public ClassLoaderTemplateResolver emailTemplateResolver() {
ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
emailTemplateResolver.setPrefix("mails/");
emailTemplateResolver.setSuffix(".html");
emailTemplateResolver.setTemplateMode("HTML5");
emailTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
emailTemplateResolver.setOrder(1);
return emailTemplateResolver;
}
}
|
[
"dimitri@d-kahn.net"
] |
dimitri@d-kahn.net
|
260021acb75556c5da22e1ecfcd005fcde8ebda8
|
db673f64bcd5670ae501bd3194afb05b9cca4ba7
|
/ReplaceBlock/ReplaceBlock.java
|
34f3d1143fc0608a0a8ee90a8f30e5eb6918208c
|
[] |
no_license
|
aksource/EnchantChanger161
|
ffc5667b86bed139428194de7e793b64506ff26f
|
5bcc9a7467520f6ef8ef60cfe28672339e54afa9
|
refs/heads/master
| 2020-05-18T01:14:42.945554
| 2014-02-01T07:49:18
| 2014-02-01T07:49:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,820
|
java
|
package ReplaceBlock;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
@Mod(modid="ReplaceBlock", name="ReplaceBlock", version="1.6srg-1",dependencies="required-after:FML")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class ReplaceBlock
{
@Mod.Instance("ReplaceBlock")
public static ReplaceBlock instance;
public static int[] targetBlockID;
public static int replaceBlockID;
public static int targetYposMax;
public static int targetYposMin;
public static int chunkWidely;
private Chunk lastChunk = null;
private int chunkWide = 16;
protected ArrayList<Integer> ids = new ArrayList<Integer>();
public class LivingUpdateHook
{
@ForgeSubscribe
public void LivingUpdate(LivingUpdateEvent event)
{
if(!event.entityLiving.worldObj.isRemote)
{
int posX = (int)Math.floor(event.entityLiving.posX);
int posZ = (int)Math.floor(event.entityLiving.posZ);
int posY = (int)Math.floor(event.entityLiving.posY);
Chunk chunk = event.entityLiving.worldObj.getChunkFromBlockCoords(posX, posZ);
if(chunk != lastChunk && targetYposMax+chunkWidely >= posY && posY >= targetYposMin-chunkWidely)
{
lastChunk = chunk;
int chunkX = chunk.xPosition * chunkWide;
int chunkZ = chunk.zPosition * chunkWide;
for(int x = chunkX-chunkWidely; x < chunkX + chunkWide+chunkWidely; x++){
for(int z = chunkZ-chunkWidely; z < chunkZ + chunkWide+chunkWidely; z++)
{
for(int y = targetYposMax; y >= targetYposMin; y--)
{
if(this.isID(event.entityLiving.worldObj.getBlockId(x, y, z)))
{
//minecraft.getIntegratedServer().worldServerForDimension(minecraft.thePlayer.dimension).setBlock(x, y, z, replaceBlockID, 0, 3);
event.entityLiving.worldObj.setBlock(x, y, z, replaceBlockID, 0, 3);
}
}
}
}
}
}
}
public boolean isID(int id)
{
for(int i = 0; i < targetBlockID.length; i++)
{
if(targetBlockID[i] == id)
{
return true;
}
}
return false;
}
}
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
targetBlockID = config.get(Configuration.CATEGORY_GENERAL, "targetBlockID", new int[]{3, 7, 13}).getIntList();
replaceBlockID = config.get(Configuration.CATEGORY_GENERAL, "replaceBlockID", Block.stone.blockID, "ReplaceBlockID: Recomended 0-255,min=0,max=4095").getInt();
targetYposMax = config.get(Configuration.CATEGORY_GENERAL, "targetYposMax", 20, "targetYposMax,min=1,max=255").getInt();
targetYposMax = (targetYposMax < 1)?1:(targetYposMax > 255)?255:targetYposMax;
targetYposMin = config.get(Configuration.CATEGORY_GENERAL, "targetYposMin", 1, "targetYposMin,min=1,max=255").getInt();
targetYposMin = (targetYposMin < 1)?1:(targetYposMin > targetYposMax)?targetYposMax:targetYposMin;
chunkWidely = config.get(Configuration.CATEGORY_GENERAL, "chunkWidely", 3, "chankWidely,min=0,max=16").getInt();
chunkWidely = (chunkWidely < 0)?0:(chunkWidely > 16)?16:chunkWidely;
config.save();
}
@Mod.EventHandler
public void load(FMLInitializationEvent event)
{
MinecraftForge.EVENT_BUS.register(new LivingUpdateHook());
}
}
|
[
"akira.mew@gmail.com"
] |
akira.mew@gmail.com
|
d582c83a230cac8bb690925e5a73dc3767ebd190
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-40b-4-27-SPEA2-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver_ESTest_scaffolding.java
|
8a25c71868158d3eddd9be73e0aa32cd402663ff
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,379
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Jan 19 03:54:03 UTC 2020
*/
package org.apache.commons.math.analysis.solvers;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class BaseAbstractUnivariateRealSolver_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BaseAbstractUnivariateRealSolver_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math.exception.MathIllegalStateException",
"org.apache.commons.math.analysis.solvers.BracketingNthOrderBrentSolver",
"org.apache.commons.math.exception.NumberIsTooSmallException",
"org.apache.commons.math.util.Incrementor",
"org.apache.commons.math.exception.NullArgumentException",
"org.apache.commons.math.exception.util.ExceptionContext",
"org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils",
"org.apache.commons.math.util.Incrementor$MaxCountExceededCallback",
"org.apache.commons.math.util.FastMath",
"org.apache.commons.math.util.MathUtils",
"org.apache.commons.math.analysis.solvers.BracketingNthOrderBrentSolver$1",
"org.apache.commons.math.analysis.UnivariateFunction",
"org.apache.commons.math.analysis.solvers.AllowedSolution",
"org.apache.commons.math.analysis.solvers.UnivariateRealSolver",
"org.apache.commons.math.exception.NotStrictlyPositiveException",
"org.apache.commons.math.exception.NumberIsTooLargeException",
"org.apache.commons.math.exception.NotFiniteNumberException",
"org.apache.commons.math.exception.MathInternalError",
"org.apache.commons.math.analysis.solvers.BaseUnivariateRealSolver",
"org.apache.commons.math.exception.TooManyEvaluationsException",
"org.apache.commons.math.analysis.SincFunction",
"org.apache.commons.math.util.Precision",
"org.apache.commons.math.analysis.DifferentiableUnivariateFunction",
"org.apache.commons.math.exception.util.Localizable",
"org.apache.commons.math.exception.MathIllegalArgumentException",
"org.apache.commons.math.util.Incrementor$1",
"org.apache.commons.math.analysis.solvers.AbstractUnivariateRealSolver",
"org.apache.commons.math.exception.MaxCountExceededException",
"org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver",
"org.apache.commons.math.exception.MathArithmeticException",
"org.apache.commons.math.exception.util.LocalizedFormats",
"org.apache.commons.math.exception.MathIllegalNumberException",
"org.apache.commons.math.analysis.solvers.BracketedUnivariateRealSolver",
"org.apache.commons.math.exception.util.ExceptionContextProvider",
"org.apache.commons.math.exception.NoBracketingException",
"org.apache.commons.math.exception.util.ArgUtils"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
94d7fe1c8ec78714d94f73163258cb9598ad5318
|
d27a0d7b4f3a101eb85800af8e4d323069adf135
|
/esdk/src/main/java/de/edgelord/edgyscript/esdk/functionproviders/FileIO.java
|
04d40202dfc73e57bad3052fb598640f6e4fb743
|
[] |
no_license
|
sanj0/edgy-script
|
91a5925b64c53f36704855c9fc67dc5081270259
|
605bacc77daa5c4488e7274efe1989b7c808c7e1
|
refs/heads/master
| 2022-04-17T12:22:29.545699
| 2020-03-19T14:35:01
| 2020-03-19T14:35:01
| 201,100,679
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,737
|
java
|
package de.edgelord.edgyscript.esdk.functionproviders;
import de.edgelord.edgyscript.e80.interpreter.DirectValue;
import de.edgelord.edgyscript.e80.interpreter.NativeProvider;
import de.edgelord.edgyscript.e80.interpreter.Value;
import de.edgelord.edgyscript.e80.script.ArgumentList;
import de.edgelord.edgyscript.e80.script.ScriptLine;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.nio.file.Files;
public class FileIO implements NativeProvider {
@Override
public Value function(String function, ArgumentList args, ScriptLine line) {
switch (function.toLowerCase()) {
case "readfile":
case "read":
String fileContent = "null";
try {
fileContent = new String(Files.readAllBytes(Paths.get(args.get(0).getValue())), StandardCharsets.UTF_8);
} catch (IOException e) {
e.printStackTrace();
}
return new DirectValue(fileContent);
case "writefile":
case "write":
PrintStream stream = null;
String value = args.get(1).getValue();
try {
stream = new PrintStream(args.get(0).getValue());
stream.println(value);
} catch (FileNotFoundException e) {
e.printStackTrace();
} finally {
if (stream != null) {
stream.close();
}
}
return new DirectValue(value);
}
return null;
}
}
|
[
"malte.dostal@gmail.com"
] |
malte.dostal@gmail.com
|
1f19b397902fa2a60040369b7a6e2dc6bca1186a
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/fitlibrary_cluster/2028/tar_0.java
|
93fb8a42fd79d905f9275aa639deedf1a5056a5b
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,768
|
java
|
/*
* Copyright (c) 2006 Rick Mugridge, www.RimuResearch.com
* Released under the terms of the GNU General Public License version 2 or later.
* Written: 8/11/2006
*/
package fitlibrary.debug;
import java.io.IOException;
import fit.FitServerBridge;
import fit.exception.FitParseException;
import fitlibrary.batch.fitnesseIn.ParallelFitNesseRepository;
import fitlibrary.runResults.TableListener;
import fitlibrary.runResults.TestResults;
import fitlibrary.suite.BatchFitLibrary;
import fitlibrary.suite.ReportListener;
import fitlibrary.table.Table;
import fitlibrary.table.TableFactory;
import fitlibrary.table.Tables;
public class DebugPage {
protected int tablesFinished = 0;
protected int storytestsFinished = 0;
protected int expectedTablesFinished = 0;
private static String FITNESSE_URL = "http://localhost:8080/";
protected ReportListener reportListener = new ReportListener() {
public void tableFinished(Table table) {
tablesFinished++;
}
public void tablesFinished(TestResults testResults) {
storytestsFinished++;
}
};
BatchFitLibrary batchFitLibrary = new BatchFitLibrary(new TableListener(reportListener));
public static void main(String[] args) throws Exception {
String[] pageNames = new String[] {
"FitLibrary.BeginningTutorial.CalculatorBusinessProcessExample"
};
run(pageNames);
}
public static void run(String[] pageNames) throws Exception {
DebugPage runPage = new DebugPage();
runPage.runs(pageNames);
}
public void runs(String[] pageNames) throws FitParseException, IOException {
tablesFinished = 0;
storytestsFinished = 0;
for (int i = 0; i < pageNames.length; i++) {
run(pageNames[i]);
if (storytestsFinished != i+1)
throw new RuntimeException("Wrong # of FixtureListener events fired for "+pageNames[i]+
": "+storytestsFinished+" instead of "+(i+1));
}
if (tablesFinished != expectedTablesFinished)
throw new RuntimeException("Expected FixtureListener events for "+expectedTablesFinished+
" tables but instead got "+tablesFinished);
}
public void run(String pageName) throws IOException, FitParseException {
String html = new ParallelFitNesseRepository("fitnesse").getTest(pageName).getContent();
System.out.println("\n----------\nHTML for "+pageName+"\n----------\n"+html);
Tables tables = TableFactory.tables(html);
expectedTablesFinished += tables.size();
FitServerBridge.setFitNesseUrl(FITNESSE_URL); // Yuck passing important info through a global. See method for links.
TestResults testResults = batchFitLibrary.doStorytest(tables);
System.out.println("\n----------\nHTML Report for "+pageName+"\n----------\n"+tables.report());
System.out.println(testResults);
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
337b74f48a42bd313684de634cab6d26ea38b2a1
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/12/org/apache/commons/math3/analysis/differentiation/DerivativeStructure_ceil_405.java
|
8dd2ec35d0c76eb72330eccea2c58617cd441dc8
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,296
|
java
|
org apach common math3 analysi differenti
class repres differenti function
workhors differenti
implement extens rall'
number dan kalman' paper
href http www math american peopl kalman pdffile mmgautodiff pdf doubli
recurs multivari automat differenti mathemat magazin vol
june rall' number extens real number
mathemat express hold deriv
function dan kalman' deriv structur hold partial deriv
order respect number free paramet rall'
number deriv structur order deriv
free paramet real number deriv structur
order deriv free paramet
link deriv structur derivativestructur instanc directli
arithmet oper mathemat function provid
method sin co
implement complex express hand class
tediou error prone task advantag limit
deriv order requir user comput deriv
implement complex express develop comput
code standard primit valu link
univari function differenti univariatefunctiondifferenti differenti creat link
deriv structur derivativestructur base instanc method simpler limit
accuraci deriv order computation intens
typic link finit differ differenti finitedifferencesdifferenti finit differ
differenti
instanc guarante immut
compil dscompil
version
deriv structur derivativestructur field element fieldel deriv structur derivativestructur serializ
smallest number larger instanc
ceil
deriv structur derivativestructur ceil
deriv structur derivativestructur compil free paramet getfreeparamet
compil order getord
fast math fastmath ceil data
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
ba3c64da0c5eb5890fddd14ec84ae9aca871d978
|
d3cee18b4e2eaa34ce4587533b6916200da72fd8
|
/discrete/combinatorics/denom/DenomExample.java
|
495da345a2866fc383b8e8bae1ba4fc46135ed10
|
[] |
no_license
|
avshabanov/math
|
df4a179ee21ef2d0aff22998c484f6e99935f215
|
2e58079d678d7c626e746ed96540fb2a55c94e58
|
refs/heads/master
| 2023-03-08T00:24:47.185382
| 2023-02-19T20:30:30
| 2023-02-19T20:30:30
| 12,113,475
| 0
| 0
| null | 2022-11-16T00:40:47
| 2013-08-14T16:16:19
|
Java
|
UTF-8
|
Java
| false
| false
| 2,345
|
java
|
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static java.util.Collections.singletonList;
import static java.util.Collections.sort;
/**
* Sample run:
* <pre>
* The ways to represent sum=1 with coins=[] are: []
* The ways to represent sum=1 with coins=[2] are: []
* The ways to represent sum=1 with coins=[1] are: [[1]]
* The ways to represent sum=7 with coins=[4, 1, 5] are: []
* The ways to represent sum=8 with coins=[4, 2, 1, 5, 3] are: [[1, 3, 4], [1, 2, 5], [3, 5]]
* The ways to represent sum=10 with coins=[4, 4, 2, 5, 3] are: [[2, 4, 4], [2, 3, 5]]
* The ways to represent sum=16 with coins=[1, 3, 10, 15] are: [[1, 15]]
* </pre>
*
* @author Alexander Shabanov
*/
public final class DenomExample {
public static void main(String[] args) {
demo(1, emptyList());
demo(1, singletonList(2));
demo(1, singletonList(1));
demo(7, asList(4, 1, 5));
demo(8, asList(4, 2, 1, 5, 3));
demo(10, asList(4, 4, 2, 5, 3));
demo(16, asList(1, 3, 10, 15));
}
public static void demo(int sum, List<Integer> coins) {
System.out.println("The ways to represent sum=" + sum + " with coins=" + coins +
" are: " + represent(sum, coins));
}
public static Set<List<Integer>> represent(int sum, List<Integer> coins) {
final Finder finder = new Finder(sum, coins);
finder.find(0, 0);
return finder.result;
}
public static final class Finder {
final Set<List<Integer>> result = new HashSet<>();
final List<Integer> current = new ArrayList<>();
final int sum;
final List<Integer> coins;
public Finder(int sum, List<Integer> coins) {
this.sum = sum;
this.coins = coins;
}
public void find(int currentSum, int pos) {
if (currentSum == sum) {
final List<Integer> copyCurrent = new ArrayList<>(current);
sort(copyCurrent);
result.add(copyCurrent);
return;
} else if (currentSum > sum) {
return;
}
final int last = current.size();
for (int i = pos; i < coins.size(); ++i) {
final int coin = coins.get(i);
current.add(coin);
find(currentSum + coin, i + 1);
current.remove(last);
}
}
}
}
|
[
"avshabanov@gmail.com"
] |
avshabanov@gmail.com
|
ec51aa5b449f91273553288ad867c93a9d7a7f30
|
280d89940466e555c60f74eb24f224c1f31f0b7b
|
/net-path/src/main/java/org/xbib/net/path/spring/element/WildcardTheRestPathElement.java
|
acad1dddea372957f971defe9b32a146b09e1d64
|
[
"Apache-2.0"
] |
permissive
|
xbib/net
|
34b21593f1ad33ae3be463e0970e4cab85d06dab
|
d9c27fe7f2f1d7cc2152b397101ac200ef0715ee
|
refs/heads/main
| 2023-04-28T03:45:11.698964
| 2023-04-19T07:08:32
| 2023-04-19T07:08:32
| 98,197,412
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,122
|
java
|
package org.xbib.net.path.spring.element;
import org.xbib.net.path.spring.MatchingContext;
/**
* A path element representing wildcarding the rest of a path. In the pattern
* '/foo/**' the /** is represented as a {@link WildcardTheRestPathElement}.
*
*/
public class WildcardTheRestPathElement extends PathElement {
public WildcardTheRestPathElement(int pos, char separator) {
super(pos, separator);
}
@Override
public boolean matches(int pathIndex, MatchingContext matchingContext) {
// If there is more data, it must start with the separator
if (pathIndex < matchingContext.pathLength && !matchingContext.isSeparator(pathIndex)) {
return false;
}
if (matchingContext.determineRemainingPath) {
matchingContext.remainingPathIndex = matchingContext.pathLength;
}
return true;
}
@Override
public int getNormalizedLength() {
return 1;
}
@Override
public char[] getChars() {
return (this.separator + "**").toCharArray();
}
@Override
public int getWildcardCount() {
return 1;
}
@Override
public String toString() {
return "WildcardTheRest(" + this.separator + "**)";
}
}
|
[
"joergprante@gmail.com"
] |
joergprante@gmail.com
|
5bd9f729f6079f641c3746c46099ae2e6857bf78
|
ba005c6729aed08554c70f284599360a5b3f1174
|
/lib/selenium-server-standalone-3.4.0/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStopElement.java
|
e2ba554abbea93ee8542a6810936c796ca2cf29a
|
[] |
no_license
|
Viral-patel703/Testyourbond-aut0
|
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
|
784ab7a3df33d0efbd41f3adadeda22844965a56
|
refs/heads/master
| 2020-08-09T00:27:26.261661
| 2017-11-07T10:12:05
| 2017-11-07T10:12:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 820
|
java
|
package com.gargoylesoftware.htmlunit.javascript.host.svg;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor;
import com.gargoylesoftware.htmlunit.svg.SvgStop;
@JsxClass(domClass=SvgStop.class)
public class SVGStopElement
extends SVGElement
{
@JsxConstructor({@com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser(com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.CHROME), @com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser(com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.FF), @com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser(com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.EDGE)})
public SVGStopElement() {}
}
|
[
"VIRUS-inside@users.noreply.github.com"
] |
VIRUS-inside@users.noreply.github.com
|
bac7fc327236941766b99707f492ed688c14c3d5
|
38603de3344cefc19120be43ad1d4b692db7f385
|
/dhlk_light_plat/dhlk_light_subscribe/src/main/java/com/dhlk/light/subscribe/websocket/WebsocketServerUtil.java
|
0b420703667fc942a36158f9250c55bf1a1895b4
|
[] |
no_license
|
957001352/TestProject
|
7a5398f4d21db89fc84f05c43a00b18ecf9d24f3
|
efcb62f9067c3d1cceb979e4db69c77a0862eaff
|
refs/heads/master
| 2023-01-21T19:17:50.529648
| 2020-12-03T03:05:24
| 2020-12-03T03:05:24
| 295,264,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,985
|
java
|
package com.dhlk.light.subscribe.websocket;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.dhlk.entity.light.LedPower;
import com.dhlk.light.subscribe.service.RedisService;
import com.dhlk.light.subscribe.util.LedConst;
import com.dhlk.utils.CheckUtils;
import com.dhlk.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.stereotype.Component;
import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ThreadPoolExecutor;
/**
* @Description: websoked
* @Author: gchen
* @CreateDate: 2020/6/11 15:56
*/
@Slf4j
@Component
@ServerEndpoint("/websocket/{token}")
public class WebsocketServerUtil {
private ThreadPoolTaskScheduler executorService;
//在线连接数
private static int onlineCount = 0;
//用于存放当前Websocket对象的Set集合
private static Map<String, WebsocketServerUtil> websocketServerEndpoints = new HashMap<>();
//与客户端的会话Session
private Session session;
//会话窗口的ID标识
private String token = "";
/**
* 链接成功调用的方法
*
* @param session
* @param token
*/
@OnOpen
public void onOpen(Session session, @PathParam("token") String token) {
log.info("onOpen >> 链接成功");
this.session = session;
//将当前websocket对象存入到Set集合中
websocketServerEndpoints.put(this.session.getId(),this);
//在线人数+1
// addOnlineCount();
// log.info("有新窗口开始监听:" + token + ", 当前在线人数为:" + getOnlineCount());
this.token = token;
}
/**
* 链接关闭调用的方法
*/
@OnClose
public void onClose() {
log.info("onClose >> 链接关闭");
//移除当前Websocket对象
websocketServerEndpoints.remove(this.session.getId());
if(this.executorService!=null){
this.executorService.shutdown();
}
//在内线人数-1
// subOnLineCount();
// log.info("链接关闭,当前在线人数:" + getOnlineCount());
}
/**
* 收到客户端消息后调用的方法
*
* @param message
* @param session
*/
@OnMessage
public void onMessage(String message, Session session) {
//log.info("接收到窗口:" + token + " 的信息:" + message);
if(!CheckUtils.isNull(message)){
if(executorService != null){
executorService.shutdown();
}
executorService= this.threadPoolTaskScheduler();
RedisService redisService = SpringContextHolder.getBean("redisServiceImpl");
executorService.schedule(new WebsocketTask(redisService,message), new CronTrigger("*/2 * * * * ?"));
}
}
@OnError
public void onError(Session session, Throwable e) {
e.printStackTrace();
}
/**
* 推送消息
*
* @param message
*/
public void sendMessage(String message) throws IOException {
this.session.getBasicRemote().sendText(message);
}
/**
* 自定义推送消息
*
* @param message
* @param token
*/
public void sendInfo(String token, String message, WebsocketServerUtil endpoint) {
//log.info("推送消息到窗口:" + token + " ,推送内容:" + message);
try {
if (token.equals(endpoint.token)) {
endpoint.sendMessage(message);
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void subOnLineCount() {
WebsocketServerUtil.onlineCount--;
}
public static synchronized int getOnlineCount() {
return onlineCount;
}
private void addOnlineCount() {
WebsocketServerUtil.onlineCount++;
}
public class WebsocketTask implements Runnable {
private RedisService redisService;
private String sns;
public WebsocketTask(RedisService redisService, String sns) {
this.redisService = redisService;
this.sns = sns;
}
@Override
public void run() {
if (websocketServerEndpoints.get(session.getId()) != null) {
websocketServerEndpoints.get(session.getId()).sendInfo(token, getLedToRedis(sns), websocketServerEndpoints.get(session.getId()));
}
}
/**
* 查看redis里灯的状态
*
* @param sns
*/
public String getLedToRedis(String sns) {
if (StringUtils.isEmpty(sns)) {
return null;
}
//开关灯后3s websocket不给页面推送数据
if(redisService.hasKey(LedConst.REDIS_WEBSOCKET)){
return null;
}
Map<String, LedPower> map = new HashMap<>();
long s=System.currentTimeMillis();
for (String sn : sns.split(",")) {
LedPower ledPower = null;
//获取能耗信息 判断redis里存在该sn的灯的能耗信息,如果有直接转换,没有就初始化
Object power = redisService.get(LedConst.REDIS_POWER+sn);
if (power == null) {
ledPower = new LedPower();
ledPower.setStatus("-1");
} else {
ledPower = JSONObject.parseObject(power.toString(), LedPower.class);
}
ledPower.setLedSn(sn);
//人感状态设置 人感开启,有人感触发时上报值,无人触发不上报值。
//人感关闭时,人感开关状态从redis中获取,如果redis中为空,则主动请求,请求失败,则设置为-1,不显示人感标志
Object peopleFell = redisService.get(LedConst.REDIS_PEOPLEFELL+sn);
if (peopleFell != null) {
//获取人感触发状态 0未触发,1触发
ledPower.setPeopleStatus(Integer.parseInt(peopleFell.toString()));
}else{
//人感触发状态获取为空,说明无人触发,则从redis中被动获取人感开关状态
peopleFell = redisService.get(LedConst.REDIS_PEOPLEONOFF+sn);
if(peopleFell!=null){
if(peopleFell.toString().equals("1")){//人感开启,设置为0无人,人感关闭,不设置,则为空,前端不显示
ledPower.setPeopleStatus(0);//光感开启
}else{
ledPower.setPeopleStatus(-1);//人感关闭
}
}else{
//如果没有从redis中获取到值,则设置为-1,防止重复请求
redisService.set(LedConst.REDIS_PEOPLEONOFF+sn,-1);
ledPower.setPeopleStatus(-1);
}
}
//光感状态设置 光感开启上报 实时光感值,光感关闭不报送
Object linghtFell = redisService.get(LedConst.REDIS_LIGHTFELL+sn);
if (linghtFell != null) {
ledPower.setLinghtStatus(1);
}else{
ledPower.setLinghtStatus(0);
}
//获取故障码 判断redis里存在该sn的灯的故障信息
Object fault = redisService.get(LedConst.REDIS_FAULT + sn);
if (fault != null) {
ledPower.setFault(String.valueOf(fault));
}
map.put(ledPower.getLedSn(), ledPower);
}
long e=System.currentTimeMillis();
// log.info("websocket 推送消息耗时---------------->>>"+(e-s)+"毫秒");
return JSONObject.toJSONString(map, SerializerFeature.WriteMapNullValue);
}
}
public ThreadPoolTaskScheduler threadPoolTaskScheduler() {
ThreadPoolTaskScheduler executor = new ThreadPoolTaskScheduler();
executor.initialize();
executor.setPoolSize(10);
executor.setThreadNamePrefix("task-");
// 线程池对拒绝任务(无线程可用)的处理策略,目前只支持AbortPolicy、CallerRunsPolicy;默认为后者
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
//调度器shutdown被调用时等待当前被调度的任务完成
executor.setWaitForTasksToCompleteOnShutdown(true);
//等待时长
executor.setAwaitTerminationSeconds(60);
return executor;
}
}
|
[
"gchen@dhlk-tech.com"
] |
gchen@dhlk-tech.com
|
ab4cd7f9534914ceeaac0aa967c91be9edf578d4
|
afaa99af614a7d80d00931be25ebc5572afe7554
|
/src/com/lingxiang2014/entity/PasswordProtection.java
|
ffabe15214b29f1014cd3f8741c3b3043f8c62e8
|
[] |
no_license
|
immime/shop-2
|
fdb3b5f2bc216b7663a6cd9dabc3ee712b3f5815
|
5d1e1c81e3005cc4d3247d48c3facd42f78574f5
|
refs/heads/master
| 2021-01-14T08:47:16.944350
| 2015-04-11T12:54:45
| 2015-04-11T12:55:01
| 36,126,739
| 3
| 1
| null | 2015-05-23T14:25:49
| 2015-05-23T14:25:49
| null |
UTF-8
|
Java
| false
| false
| 1,465
|
java
|
package com.lingxiang2014.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
@Entity
@Table(name = "lx_passwordProtection")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "lx_passwordProtection_sequence")
public class PasswordProtection extends BaseEntity {
private static final long serialVersionUID = 6775876491282164595L;
private Member member;
private String question;
private String answer;
private Boolean isEnabled;
@NotNull
@Column(nullable = false)
public Boolean getIsEnabled() {
return isEnabled;
}
public void setIsEnabled(Boolean isEnabled) {
this.isEnabled = isEnabled;
}
@ManyToOne(fetch = FetchType.LAZY)
public Member getMember() {
return member;
}
public void setMember(Member member) {
this.member = member;
}
@NotNull
@Column(nullable = false)
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
@NotNull
@Column(nullable = false)
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer;
}
}
|
[
"1169794338@qq.com"
] |
1169794338@qq.com
|
adbeb6c772f6422341f3a4bfc5c9128a85c591c6
|
d0969e8811c0aeee14674813a83959e3c949e875
|
/1471/A/Main.java
|
4aced15acdc213bf28b1d8b2ef7e201eb5d6b03f
|
[] |
no_license
|
charles-wangkai/codeforces
|
738354a0c4bb0d83bb0ff431a0d1f39c5e5eab5c
|
b61ee17b1dea78c74d7ac2f31c4a1ddc230681a7
|
refs/heads/master
| 2023-09-01T09:07:31.814311
| 2023-09-01T01:34:10
| 2023-09-01T01:34:10
| 161,009,629
| 39
| 14
| null | 2020-10-01T17:43:45
| 2018-12-09T06:00:22
|
Java
|
UTF-8
|
Java
| false
| false
| 678
|
java
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int tc = 0; tc < t; ++tc) {
int n = sc.nextInt();
int x = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < a.length; ++i) {
a[i] = sc.nextInt();
}
System.out.println(solve(a, x));
}
sc.close();
}
static String solve(int[] a, int x) {
return String.format(
"%d %d",
(Arrays.stream(a).asLongStream().sum() + x - 1) / x,
Arrays.stream(a).map(ai -> (ai + x - 1) / x).asLongStream().sum());
}
}
|
[
"charles.wangkai@gmail.com"
] |
charles.wangkai@gmail.com
|
fa282abbabcc1c3f5b53c64dc100120dbae03161
|
982c6b06d72d646c809d5a12866359f720305067
|
/subprojects/language-base/src/main/java/dev/nokee/language/base/SourceView.java
|
ea340058e2009e5ed73ddfbbc2cd7d46c38498e8
|
[
"Apache-2.0"
] |
permissive
|
nokeedev/gradle-native
|
e46709a904e20183ca09ff64b92d222d3c888df2
|
6e6ee42cefa69d81fd026b2cfcb7e710dd62d569
|
refs/heads/master
| 2023-05-30T02:27:59.371101
| 2023-05-18T15:36:49
| 2023-05-23T14:43:18
| 243,841,556
| 52
| 9
|
Apache-2.0
| 2023-05-23T14:58:33
| 2020-02-28T19:42:28
|
Java
|
UTF-8
|
Java
| false
| false
| 1,443
|
java
|
/*
* Copyright 2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.nokee.language.base;
import dev.nokee.platform.base.ComponentSources;
import dev.nokee.platform.base.View;
/**
* A view of the binaries that are created and configured as they are required.
*
* @param <T> type of the elements in this view
* @since 0.3
*/
public interface SourceView<T extends LanguageSourceSet> extends View<T>, ComponentSources {
/**
* Returns a source view containing the objects in this view of the given type.
* The returned view is live, so that when matching objects are later added to this view, they are also visible in the filtered source view.
*
* @param type The type of source to find.
* @param <S> The base type of the new source view.
* @return the matching element as a {@link SourceView}, never null.
*/
<S extends T> SourceView<S> withType(Class<S> type);
}
|
[
"lacasseio@users.noreply.github.com"
] |
lacasseio@users.noreply.github.com
|
3400e97bbc3851794f6870abe8f21aca2f4bc7ce
|
c4caf5f57a3ef7be7108a7134d730a532169d47e
|
/org/jgraph/plaf/basic/.svn/text-base/BasicGraphDropTargetListener.java.svn-base
|
38c95e0b2eeada9a26e8467b23bc57e906a35a57
|
[] |
no_license
|
nrnb/gsoc2007aleksandar
|
d0c347334fd68bff5b088963c515560d4a9bba31
|
d643b2e0c9516a21791bad20f292a19cf90a6bec
|
refs/heads/master
| 2016-09-06T03:40:08.425844
| 2015-03-13T19:02:16
| 2015-03-13T19:02:16
| 32,175,179
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,409
|
/*
* @(#)BasicGraphDropTargetListener 1.0 03-JUL-04
*
* Copyright (c) 2001-2004 Gaudenz Alder
*
*/
package org.jgraph.plaf.basic;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.dnd.DropTargetContext;
import java.awt.dnd.DropTargetDragEvent;
import java.awt.dnd.DropTargetDropEvent;
import java.awt.dnd.DropTargetEvent;
import java.awt.dnd.DropTargetListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JComponent;
import javax.swing.Scrollable;
import javax.swing.SwingConstants;
import javax.swing.Timer;
import javax.swing.plaf.UIResource;
/**
*
*/
public class BasicGraphDropTargetListener implements DropTargetListener, UIResource, ActionListener {
/**
* construct a DropTargetAutoScroller
*/
public BasicGraphDropTargetListener() {
}
/**
* called to save the state of a component in case it needs to
* be restored because a drop is not performed.
*/
protected void saveComponentState(JComponent c) {
}
/**
* called to restore the state of a component in case a drop
* is not performed.
*/
protected void restoreComponentState(JComponent c) {
}
/**
* called to restore the state of a component in case a drop
* is performed.
*/
protected void restoreComponentStateForDrop(JComponent c) {
}
/**
* called to set the insertion location to match the current
* mouse pointer coordinates.
*/
protected void updateInsertionLocation(JComponent c, Point p) {
}
/**
* Update the geometry of the autoscroll region. The geometry is
* maintained as a pair of rectangles. The region can cause
* a scroll if the pointer sits inside it for the duration of the
* timer. The region that causes the timer countdown is the area
* between the two rectangles.
* <p>
* This is implemented to use the visible area of the component
* as the outer rectangle and the insets are based upon the
* Scrollable information (if any). If the Scrollable is
* scrollable along an axis, the step increment is used as
* the autoscroll inset. If the component is not scrollable,
* the insets will be zero (i.e. autoscroll will not happen).
*/
void updateAutoscrollRegion(JComponent c) {
// compute the outer
Rectangle visible = c.getVisibleRect();
outer.setBounds(visible.x, visible.y, visible.width, visible.height);
// compute the insets
// TBD - the thing with the scrollable
Insets i = new Insets(0, 0, 0, 0);
if (c instanceof Scrollable) {
Scrollable s = (Scrollable) c;
i.left = s.getScrollableUnitIncrement(visible, SwingConstants.HORIZONTAL, 1);
i.top = s.getScrollableUnitIncrement(visible, SwingConstants.VERTICAL, 1);
i.right = s.getScrollableUnitIncrement(visible, SwingConstants.HORIZONTAL, -1);
i.bottom = s.getScrollableUnitIncrement(visible, SwingConstants.VERTICAL, -1);
}
// set the inner from the insets
inner.setBounds(visible.x + i.left, visible.y + i.top, visible.width - (i.left + i.right),
visible.height - (i.top + i.bottom));
}
/**
* Perform an autoscroll operation. This is implemented to scroll by the
* unit increment of the Scrollable using scrollRectToVisible. If the
* cursor is in a corner of the autoscroll region, more than one axis will
* scroll.
*/
void autoscroll(JComponent c, Point pos) {
if (c instanceof org.jgraph.JGraph)
BasicGraphUI.autoscroll((org.jgraph.JGraph) c, pos);
}
/**
* Initializes the internal properties if they haven't been already
* inited. This is done lazily to avoid loading of desktop properties.
*/
private void initPropertiesIfNecessary() {
if (timer == null) {
Toolkit t = Toolkit.getDefaultToolkit();
Integer initial = new Integer(100);
Integer interval = new Integer(100);
try {
initial = (Integer) t.getDesktopProperty("DnD.Autoscroll.initialDelay");
} catch (Exception e) {
// ignore
}
try {
interval = (Integer) t.getDesktopProperty("DnD.Autoscroll.interval");
} catch (Exception e) {
// ignore
}
timer = new Timer(interval.intValue(), this);
timer.setCoalesce(true);
timer.setInitialDelay(initial.intValue());
try {
hysteresis = ((Integer) t.getDesktopProperty("DnD.Autoscroll.cursorHysteresis"))
.intValue();
} catch (Exception e) {
// ignore
}
}
}
static JComponent getComponent(DropTargetEvent e) {
DropTargetContext context = e.getDropTargetContext();
return (JComponent) context.getComponent();
}
// --- ActionListener methods --------------------------------------
/**
* The timer fired, perform autoscroll if the pointer is within the
* autoscroll region.
* <P>
* @param e the <code>ActionEvent</code>
*/
public synchronized void actionPerformed(ActionEvent e) {
updateAutoscrollRegion(component);
if (outer.contains(lastPosition) && !inner.contains(lastPosition)) {
autoscroll(component, lastPosition);
}
}
// --- DropTargetListener methods -----------------------------------
/**
* DOCUMENT ME!
*
* @param e DOCUMENT ME!
*/
public void dragEnter(DropTargetDragEvent e) {
component = getComponent(e);
// DO NOT REMOVE OR MODIFY THIS LINE!
javax.swing.TransferHandler // JAVA13: org.jgraph.plaf.basic.TransferHandler
th = ((JComponent) component).getTransferHandler();
canImport = th.canImport(component, e.getCurrentDataFlavors());
if (canImport) {
saveComponentState(component);
lastPosition = e.getLocation();
updateAutoscrollRegion(component);
initPropertiesIfNecessary();
}
}
/**
* DOCUMENT ME!
*
* @param e DOCUMENT ME!
*/
public void dragOver(DropTargetDragEvent e) {
if (canImport) {
Point p = e.getLocation();
updateInsertionLocation(component, p);
// check autoscroll
synchronized (this) {
if ((Math.abs(p.x - lastPosition.x) > hysteresis)
|| (Math.abs(p.y - lastPosition.y) > hysteresis)) {
// no autoscroll
if (timer.isRunning())
timer.stop();
} else {
if (!timer.isRunning())
timer.start();
}
lastPosition = p;
}
}
}
/**
* DOCUMENT ME!
*
* @param e DOCUMENT ME!
*/
public void dragExit(DropTargetEvent e) {
if (canImport) {
restoreComponentState(component);
}
cleanup();
}
/**
* DOCUMENT ME!
*
* @param e DOCUMENT ME!
*/
public void drop(DropTargetDropEvent e) {
if (canImport) {
restoreComponentStateForDrop(component);
}
cleanup();
}
/**
* DOCUMENT ME!
*
* @param e DOCUMENT ME!
*/
public void dropActionChanged(DropTargetDragEvent e) {
}
/**
* Cleans up internal state after the drop has finished (either succeeded
* or failed).
*/
private void cleanup() {
if (timer != null) {
timer.stop();
}
component = null;
lastPosition = null;
}
// --- fields --------------------------------------------------
private Timer timer;
private Point lastPosition;
private Rectangle outer = new Rectangle();
private Rectangle inner = new Rectangle();
private int hysteresis = 10;
private boolean canImport;
/**
* The current component. The value is cached from the drop events and used
* by the timer. When a drag exits or a drop occurs, this value is cleared.
*/
private JComponent component;
}
|
[
"apico@gladstone.ucsf.edu"
] |
apico@gladstone.ucsf.edu
|
|
6c80039f2e007cb1d009b096958704d14ce5aa64
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5658282861527040_1/java/savvas94/Codejam.java
|
76958cfd9c73db6a60332155da97706e6f9de38b
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,234
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import javax.naming.BinaryRefAddr;
/**
*
* @author Savvas
*/
public class Codejam {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException, IOException {
// TODO code application logic here
BufferedWriter output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("output.txt")));
BufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream("input.txt"), "cp1253"));
Scanner in = new Scanner(input);
int numOfCases = in.nextInt();
int a,b,k, winning;
for (int ppp = 0; ppp < numOfCases; ppp++) {
winning = 0;
a = in.nextInt();
b = in.nextInt();
k = in.nextInt();
StringBuilder[] aBin = new StringBuilder[a];
StringBuilder[] bBin = new StringBuilder[b];
for (int i = 0; i < a; i++) {
aBin[i] = new StringBuilder(Integer.toBinaryString(i));
while(aBin[i].length()<15){
aBin[i].insert(0, "0");
}
}
for (int i = 0; i < b; i++) {
bBin[i] = new StringBuilder(Integer.toBinaryString(i));
while(bBin[i].length()<15){
bBin[i].insert(0, "0");
}
}
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
StringBuilder and = new StringBuilder();
for (int l = 0; l < 15; l++) {
if(aBin[i].charAt(l)=='1' && bBin[j].charAt(l)=='1'){
and.append("1");
}
else{
and.append("0");
}
}
//int aaa = Integer.parseInt(and.toString(), 2);
//System.out.println(aaa);
if(Integer.parseInt(and.toString(), 2)<k){
winning++;
}
}
}
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("");
output.append("Case #"+(ppp+1)+": "+winning);
output.newLine();
}
output.close();
}
}
|
[
"eewestman@gmail.com"
] |
eewestman@gmail.com
|
7fcb5f4da147348bf36b54d28a3a5501ff189e5d
|
ff05d71d71a383d21ea8f39290a2e0a46e9b8d64
|
/src/test/java/outcomes/runtime_exit/FatalErrorRuntimeExitInGenerate.java
|
bf445a1894d11369d5b7ea690c00aadf294bd77f
|
[] |
no_license
|
msmilkshake/hs-test
|
1c87cbdf6cab7e727f49b0f13510166d3400cc5e
|
d9037e20a168c53a243f94f4da2f8742a7ab6f4b
|
refs/heads/master
| 2022-12-12T09:51:45.782599
| 2020-08-31T16:29:19
| 2020-08-31T16:29:19
| 290,304,617
| 0
| 0
| null | 2020-08-25T19:26:52
| 2020-08-25T19:26:52
| null |
UTF-8
|
Java
| false
| false
| 1,280
|
java
|
package outcomes.runtime_exit;
import org.hyperskill.hstest.stage.StageTest;
import org.hyperskill.hstest.testcase.CheckResult;
import org.hyperskill.hstest.testcase.TestCase;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
import java.util.Arrays;
import java.util.List;
class FatalErrorRuntimeExitInGenerateMain {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
public class FatalErrorRuntimeExitInGenerate extends StageTest {
public FatalErrorRuntimeExitInGenerate() {
super(FatalErrorRuntimeExitInGenerateMain.class);
}
@Rule
public final ExpectedException exception = ExpectedException.none();
@Before
public void before() {
exception.expect(AssertionError.class);
exception.expectMessage("Fatal error during testing, please send the report to support@hyperskill.org");
exception.expectMessage("CheckExitCalled: Tried to exit");
}
@Override
public List<TestCase> generate() {
Runtime.getRuntime().exit(0);
return Arrays.asList(
new TestCase()
);
}
@Override
public CheckResult check(String reply, Object attach) {
return CheckResult.correct();
}
}
|
[
"aaaaaa2493@yandex.ru"
] |
aaaaaa2493@yandex.ru
|
96c40c4a5b5a97f487613d1f0c6494d8558a6f6e
|
692c716c2aa273bec7eb7e90f67365c22b72cf43
|
/src/main/java/com/gmail/mosoft521/jmtp/ch02/project005synchronizedMethodLockObject2/Run.java
|
9a6797368beba7deb1f4e41eac64c61d81f43873
|
[] |
no_license
|
mosoft521/jmtp
|
0310a999664989ef46d723b5075c02615cf23f2b
|
2676d15137dbc08c4223fed6a10c096b29995f4d
|
refs/heads/master
| 2022-06-29T02:06:19.004504
| 2021-03-16T08:38:56
| 2021-03-16T08:38:56
| 40,029,838
| 0
| 1
| null | 2022-06-21T04:15:27
| 2015-08-01T00:17:34
|
Java
|
UTF-8
|
Java
| false
| false
| 1,272
|
java
|
package com.gmail.mosoft521.jmtp.ch02.project005synchronizedMethodLockObject2;
public class Run {
public static void main(String[] args) {
MyObject object = new MyObject();
ThreadA a = new ThreadA(object);
a.setName("A");
ThreadB b = new ThreadB(object);
b.setName("B");
a.start();
b.start();
}
}
/*
>>methodB无synchronized
第一次:
ThreadB.run(): B
ThreadA.run(): A
begin methodB threadName=B begin time=1615683075819
begin methodA threadName=A
end methodB
end methodA endTime=1615683080819
第二次:
ThreadA.run(): A
ThreadB.run(): B
begin methodA threadName=A
begin methodB threadName=B begin time=1615683101471
end methodA endTime=1615683106471
end methodB
第三次:
ThreadB.run(): B
begin methodB threadName=B begin time=1615683126419
ThreadA.run(): A
begin methodA threadName=A
end methodB
end methodA endTime=1615683131419
>>methodB有synchronized
第一次:
ThreadA.run(): A
ThreadB.run(): B
begin methodA threadName=A
end methodA endTime=1615683235764
begin methodB threadName=B begin time=1615683235764
end methodB
第二次:
ThreadA.run(): A
ThreadB.run(): B
begin methodB threadName=B begin time=1615683263147
end methodB
begin methodA threadName=A
end methodA endTime=1615683273147
*/
|
[
"mosoft521@gmail.com"
] |
mosoft521@gmail.com
|
f454db1badc0fa3bc26b7c33be69ae2baa46c8bd
|
06860f63a4af41a541fb8699ac1c8d84fef51b07
|
/app/src/main/java/com/beehapps/mitraaalondri/pojo/FCM.java
|
50a73ec626f2f951d71218097b4c6ca314374b64
|
[] |
no_license
|
pahlevikun/mitraaalondri
|
2836afdc7463eb1693f7e4c6162ada1d6918ae79
|
7b427c7bb04ca885beb4fcc2abedf39b95a53754
|
refs/heads/master
| 2021-03-22T04:33:17.792986
| 2017-08-20T12:50:02
| 2017-08-20T12:50:02
| 114,502,161
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 755
|
java
|
package com.beehapps.mitraaalondri.pojo;
/**
* Created by farhan on 5/31/16.
*/
public class FCM {
//private variables
int _id;
String _token;
// Empty constructor
public FCM() {
}
// constructor
public FCM(int id, String token) {
this._id = id;
this._token = token;
}
// constructor
public FCM(String token) {
this._token = token;
}
// getting ID
public int getID() {
return this._id;
}
// setting id
public void setID(int id) {
this._id = id;
}
// getting ID
public String getTokenFCM() {
return this._token;
}
// setting id
public void setTokenFCM(String token) {
this._token = token;
}
}
|
[
"pahlevi.kun@gmail.com"
] |
pahlevi.kun@gmail.com
|
bc01900f48faf5c151a438346e78cd5bfda5c8b0
|
84a1777986c6d3771c0bdc685ca958cd7ebc2291
|
/src/main/java/co/com/codesoftware/servicio/facturacion/SedeEntity.java
|
c7fff4f8c1eb14a67e769d8984d7ef454bb85b91
|
[
"Apache-2.0"
] |
permissive
|
codesoftware/NSIGEMCO
|
91bea6f4b87714b1582eb3f82c961f92413e1f01
|
f2dd7fe2081546edf605df14b74fc9940236452e
|
refs/heads/master
| 2021-03-27T13:05:36.940180
| 2019-03-11T21:12:31
| 2019-03-11T21:12:31
| 45,809,664
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,416
|
java
|
package co.com.codesoftware.servicio.facturacion;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Clase Java para sedeEntity complex type.
*
* <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
*
* <pre>
* <complexType name="sedeEntity">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="direccion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="resolucion" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* <element name="sedeBodega" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="telefono" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "sedeEntity", propOrder = {
"direccion",
"id",
"name",
"resolucion",
"sedeBodega",
"telefono"
})
public class SedeEntity {
protected String direccion;
protected Integer id;
protected String name;
protected Integer resolucion;
protected String sedeBodega;
protected String telefono;
/**
* Obtiene el valor de la propiedad direccion.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDireccion() {
return direccion;
}
/**
* Define el valor de la propiedad direccion.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDireccion(String value) {
this.direccion = value;
}
/**
* Obtiene el valor de la propiedad id.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getId() {
return id;
}
/**
* Define el valor de la propiedad id.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setId(Integer value) {
this.id = value;
}
/**
* Obtiene el valor de la propiedad name.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Define el valor de la propiedad name.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Obtiene el valor de la propiedad resolucion.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getResolucion() {
return resolucion;
}
/**
* Define el valor de la propiedad resolucion.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setResolucion(Integer value) {
this.resolucion = value;
}
/**
* Obtiene el valor de la propiedad sedeBodega.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSedeBodega() {
return sedeBodega;
}
/**
* Define el valor de la propiedad sedeBodega.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSedeBodega(String value) {
this.sedeBodega = value;
}
/**
* Obtiene el valor de la propiedad telefono.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTelefono() {
return telefono;
}
/**
* Define el valor de la propiedad telefono.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTelefono(String value) {
this.telefono = value;
}
}
|
[
"jnsierrac@gmail.com"
] |
jnsierrac@gmail.com
|
1c02d78610ac24fed5e834ac82d8d727240aafae
|
49ffdcc00481e0ad6178d759336e0379cc0ffd8b
|
/src/main/java/com/ezendai/credit2/after/dao/impl/TaskAllocationRuleDaoImpl.java
|
fd6ccd6b218a9cbccc9b32b31b925dd4b9adc645
|
[] |
no_license
|
InverseOfControl/car
|
5ffaffc0d37ed0476bc58e89ae975ec369b908cf
|
351962fc6378612b2127b18c33088dbff39c2dd3
|
refs/heads/master
| 2020-03-09T23:05:51.599055
| 2018-04-12T02:38:54
| 2018-04-12T02:38:54
| 129,050,850
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,089
|
java
|
package com.ezendai.credit2.after.dao.impl;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.ezendai.credit2.after.dao.TaskAllocationRuleDao;
import com.ezendai.credit2.after.model.LateDetails;
import com.ezendai.credit2.after.model.TaskAllocationRule;
import com.ezendai.credit2.after.vo.CollectionCreateCasesVO;
import com.ezendai.credit2.after.vo.TaskAllocationRuleVO;
import com.ezendai.credit2.framework.dao.impl.BaseDaoImpl;
import com.ezendai.credit2.framework.util.BeanUtil;
import com.ezendai.credit2.framework.util.Pager;
/***
* <pre>
*
*
* </pre>
*
* @author
* @version
*/
@Repository
public class TaskAllocationRuleDaoImpl extends BaseDaoImpl<TaskAllocationRule> implements TaskAllocationRuleDao {
@Override
public Pager TaskAllocationRuleWithPG(TaskAllocationRuleVO ruleVO) {
// TODO Auto-generated method stub
Object count = getSqlSession().selectOne(getIbatisMapperNameSpace() + ".taskAllocationRuleCount", ruleVO);
int totalCount = Integer.parseInt(count.toString());
Pager pg = ruleVO.getPager();
pg.setTotalCount(totalCount);
pg.calStart();
List rstList = null;
try {
rstList = getSqlSession().selectList(getIbatisMapperNameSpace() + ".taskAllocationRuleWithPG", ruleVO);
} catch (Exception ex) {
ex.printStackTrace();
}
BeanUtil.copyProperties(pg, ruleVO);
pg.setTotalCount(totalCount);
pg.setResultList(rstList);
return pg;
}
@Override
public void insertTaskAllocationRule(TaskAllocationRule rule) {
// TODO Auto-generated method stub
getSqlSession().insert(getIbatisMapperNameSpace() + ".insertTaskAllocationRule", rule);
}
@Override
public void updateTaskAllocationRule(TaskAllocationRule rule) {
// TODO Auto-generated method stub
getSqlSession().update(getIbatisMapperNameSpace() + ".updateTaskAllocationRule", rule);
}
@Override
public List<LateDetails> getLateDetailsList(
TaskAllocationRuleVO ruleVO) {
// TODO Auto-generated method stub
return getSqlSession().selectList(getIbatisMapperNameSpace() + ".getLateDetailsList", ruleVO);
}
@Override
public List<TaskAllocationRule> getTaskAllocationRuleBySalesDeptId(
TaskAllocationRuleVO ruleVO) {
// TODO Auto-generated method stub
return getSqlSession().selectList(getIbatisMapperNameSpace() + ".getTaskAllocationRuleBySalesDeptId", ruleVO);
}
@Override
public List<TaskAllocationRule> getCollectorsBySalesDeptId(
TaskAllocationRuleVO ruleVO) {
// TODO Auto-generated method stub
return getSqlSession().selectList(getIbatisMapperNameSpace() + ".getCollectorsBySalesDeptId", ruleVO);
}
@Override
public int getLateDetailsListCount(TaskAllocationRuleVO ruleVO) {
// TODO Auto-generated method stub
return getSqlSession().selectOne(getIbatisMapperNameSpace() + ".getLateDetailsListCount", ruleVO);
}
@Override
public List<TaskAllocationRule> getAllEffectiveBySalesDeptId(
TaskAllocationRuleVO ruleVO) {
// TODO Auto-generated method stub
return getSqlSession().selectList(getIbatisMapperNameSpace() + ".getAllEffectiveBySalesDeptId", ruleVO);
}
}
|
[
"gaohongxuhappy@163.com"
] |
gaohongxuhappy@163.com
|
292d9d0a341ada4eeb79e56dead8d47228177e59
|
5d88e39d3e0988eecd28682a675f363c9b3799c7
|
/app/src/main/java/com/example/kurirjualanpraktis/PenjemputanActivity.java
|
4494b3b655b8bb41acdd9a849770144e6526c84b
|
[] |
no_license
|
ranggacikal/KurirJualanPraktis
|
b9527999a990bf2c534b386f4840568490066187
|
3dbc2248286702d116899eaaa24cda4120c7ff52
|
refs/heads/master
| 2023-03-26T05:50:15.089119
| 2021-03-17T08:07:50
| 2021-03-17T08:07:50
| 345,951,438
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,731
|
java
|
package com.example.kurirjualanpraktis;
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.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.androidnetworking.AndroidNetworking;
import com.androidnetworking.common.Priority;
import com.androidnetworking.error.ANError;
import com.androidnetworking.interfaces.JSONObjectRequestListener;
import com.example.kurirjualanpraktis.adapter.PenjemputanAdapter;
import com.example.kurirjualanpraktis.sharedPreferences.SharedPrefManager;
import com.example.kurirjualanpraktis.sharedPreferences.loginuser;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
public class PenjemputanActivity extends AppCompatActivity {
ImageView imgBack;
RecyclerView recyclerPenjemputan;
TextView txtKosong;
loginuser user;
ArrayList<HashMap<String, String>> dataPenjemputan = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_penjemputan);
user = SharedPrefManager.getInstance(PenjemputanActivity.this).getUser();
AndroidNetworking.initialize(PenjemputanActivity.this.getApplicationContext());
imgBack = findViewById(R.id.img_back_penjemputan);
recyclerPenjemputan = findViewById(R.id.recycler_penjemputan);
txtKosong = findViewById(R.id.text_kosong_penjemputan);
imgBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
loadDataPenjemputan();
}
private void loadDataPenjemputan() {
ProgressDialog progressDialog = new ProgressDialog(PenjemputanActivity.this);
progressDialog.setTitle("Memuat Data");
progressDialog.setMessage("Loading");
progressDialog.show();
String url = "https://jualanpraktis.net/android/kurir/list-penjemputan.php";
OkHttpClient okHttpClient = new OkHttpClient().newBuilder()
.connectTimeout(10, TimeUnit.SECONDS)
.readTimeout(10, TimeUnit.SECONDS)
.writeTimeout(10, TimeUnit.SECONDS)
.build();
AndroidNetworking.post(url)
.addBodyParameter("id", user.getId())
.setTag(PenjemputanActivity.this)
.setPriority(Priority.MEDIUM)
.setOkHttpClient(okHttpClient)
.build()
.getAsJSONObject(new JSONObjectRequestListener() {
@Override
public void onResponse(JSONObject response) {
progressDialog.dismiss();
dataPenjemputan.clear();
try {
JSONArray array = response.getJSONArray("data");
for (int i = 0;i<array.length();i++){
JSONObject jsonObject = array.getJSONObject(i);
HashMap<String,String> data = new HashMap<>();
data.put("id_pengiriman",jsonObject.getString("id_pengiriman"));
data.put("nama_toko",jsonObject.getString("nama_company"));
data.put("provinsi",jsonObject.getString("province"));
data.put("kota",jsonObject.getString("city_name"));
data.put("kecamatan",jsonObject.getString("subdistrict_name"));
data.put("kelurahan",jsonObject.getString("kelurahan"));
data.put("alamat",jsonObject.getString("alamat"));
data.put("no_hp",jsonObject.getString("no_hp"));
data.put("nama_penerima",jsonObject.getString("nama_penerima"));
data.put("id_transaksi",jsonObject.getString("id_transaksi"));
dataPenjemputan.add(data);
}
recyclerPenjemputan.setHasFixedSize(true);
recyclerPenjemputan.setLayoutManager(new LinearLayoutManager(PenjemputanActivity.this));
PenjemputanAdapter adapter = new PenjemputanAdapter(PenjemputanActivity.this, dataPenjemputan);
recyclerPenjemputan.setAdapter(adapter);
if (dataPenjemputan.isEmpty()){
recyclerPenjemputan.setVisibility(View.GONE);
txtKosong.setVisibility(View.VISIBLE);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(ANError anError) {
progressDialog.dismiss();
dataPenjemputan.clear();
if (anError.getErrorCode() != 0) {
// received error from server
// error.getErrorCode() - the error code from server
// error.getErrorBody() - the error body from server
// error.getErrorDetail() - just an error detail
// get parsed error object (If ApiError is your class)
Toast.makeText(PenjemputanActivity.this, "Gagal mendapatkan data.", Toast.LENGTH_SHORT).show();
} else {
// error.getErrorDetail() : connectionError, parseError, requestCancelledError
if (anError.getErrorDetail().equals("connectionError")){
Toast.makeText(PenjemputanActivity.this, "Tidak ada koneksi internet.", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(PenjemputanActivity.this, "Gagal mendapatkan data.", Toast.LENGTH_SHORT).show();
}
}
}
});
}
@Override
protected void onResume() {
super.onResume();
loadDataPenjemputan();
}
}
|
[
"ranggacikal2@gmail.com"
] |
ranggacikal2@gmail.com
|
65b698dd4ccf53b7390f0bb2dd3eaeb8390bd92d
|
fc006cb35606720dfef2007ed0a3993366a48647
|
/eureka-feign-upload-server/src/main/java/com/jufeng/springcloud/upload/server/UploadController.java
|
293effd6b920ae1155c8035e70daf61173abca90
|
[] |
no_license
|
zhaojun2066/spring-cloud-test
|
0254107afc5ab05bbe67f7de0e1c4651294494cf
|
4daf30ddb669b41bc8b462ba78df5d9d04a4aa92
|
refs/heads/master
| 2020-04-04T00:37:53.011053
| 2018-11-09T03:29:10
| 2018-11-09T03:29:10
| 155,656,878
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 793
|
java
|
package com.jufeng.springcloud.upload.server;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
/**
* \* Created with IntelliJ IDEA.
* \* User: zhaojun(JUENG)
* \* Date: 2018/11/1
* \* Time: 15:01
* \* To change this template use File | Settings | File Templates.
* \* Description:
* \
*/
@RestController
public class UploadController {
@PostMapping(value = "/uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public String handleFileUpload(@RequestPart(value = "file") MultipartFile file) {
return file.getName();
}
}
|
[
"zhaojun@300.cn"
] |
zhaojun@300.cn
|
27934322198f1a62fb7e82cba59b9c7f737f4529
|
1520cf984747a1dabfda31c1bdcb79f641882314
|
/src/main/java/com/premium/studfarm/web/rest/vm/LoggerVM.java
|
393eaf2fe2952d62d60af9a0c4df580b22b2f0ee
|
[] |
no_license
|
Koen78/premiumStableManagement
|
368b0321d564d5cf9b0d75789b9a49c5cbcedf52
|
caa9b0ac994feb2b0eb7e70dcf14c19ee80a3404
|
refs/heads/master
| 2020-03-14T14:00:56.153707
| 2018-05-07T19:46:06
| 2018-05-07T19:46:06
| 131,644,642
| 0
| 0
| null | 2018-05-07T19:48:27
| 2018-04-30T20:43:33
|
Java
|
UTF-8
|
Java
| false
| false
| 888
|
java
|
package com.premium.studfarm.web.rest.vm;
import ch.qos.logback.classic.Logger;
/**
* View Model object for storing a Logback logger.
*/
public class LoggerVM {
private String name;
private String level;
public LoggerVM(Logger logger) {
this.name = logger.getName();
this.level = logger.getEffectiveLevel().toString();
}
public LoggerVM() {
// Empty public constructor used by Jackson.
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
@Override
public String toString() {
return "LoggerVM{" +
"name='" + name + '\'' +
", level='" + level + '\'' +
'}';
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
b56cb931b65c4b1ee1a4f47557c64c7635ca2174
|
4adb6ed7c6043b537cb93e5589e27f6aa22696d4
|
/src/main/java/de/edgelord/saltyengine/ui/UIElement.java
|
d9974fcbe312293958dd4ceb7a2bc139fc05fb3e
|
[
"Apache-2.0"
] |
permissive
|
faxe0603/salty-engine
|
dc1fe3002ace9a40109c1dd843af5138bc654a35
|
481c0eb34251b65077e62953f931eaa48f429731
|
refs/heads/master
| 2020-04-14T17:46:42.240254
| 2019-01-02T18:12:37
| 2019-01-02T18:12:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,798
|
java
|
/*
* Copyright 2018 Malte Dostal
*
* 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 de.edgelord.saltyengine.ui;
import de.edgelord.saltyengine.core.Component;
import de.edgelord.saltyengine.core.graphics.SaltyGraphics;
import de.edgelord.saltyengine.core.interfaces.Drawable;
import de.edgelord.saltyengine.core.interfaces.FixedTickRoutine;
import de.edgelord.saltyengine.core.interfaces.KeyboardInputHandler;
import de.edgelord.saltyengine.core.interfaces.MouseInputHandler;
import de.edgelord.saltyengine.core.stereotypes.ComponentContainer;
import de.edgelord.saltyengine.transform.Coordinates;
import de.edgelord.saltyengine.transform.Dimensions;
import de.edgelord.saltyengine.transform.Transform;
import de.edgelord.saltyengine.transform.Vector2f;
import de.edgelord.saltyengine.utils.SaltySystem;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public abstract class UIElement extends ComponentContainer implements Drawable, FixedTickRoutine, MouseInputHandler, KeyboardInputHandler {
private Font font = SaltySystem.defaultFont;
private Color backgroundColor = Color.DARK_GRAY;
private Color foregroundColor = Color.WHITE;
private Transform transform;
private boolean mouseHoversOver = false;
private List<Component> components = new CopyOnWriteArrayList<>();
private boolean suppressClipping = false;
public static final String BUTTON = "de.edgelord.saltyengine.uiElements.button";
public static final String LABEL = "de.edgelord.saltyengine.uiElements.label";
public static final String TEXT_BOX = "de.edgelord.saltyengine.uiElements.textBox";
public static final String CONTAINER = "de.edgelord.saltyengine.uiElements.container";
public UIElement(Vector2f position, float width, float height, String tag) {
super(tag);
this.transform = new Transform(position, new Dimensions(width, height));
}
public UIElement(Transform transform, String tag) {
this(transform.getPosition(), transform.getWidth(), transform.getHeight(), tag);
}
@Override
public void onFixedTick() {
}
@Override
public abstract void draw(SaltyGraphics saltyGraphics);
@Override
public void mousePressed(MouseEvent e) {
}
@Override
public void mouseReleased(MouseEvent e) {
}
@Override
public void mouseClicked(MouseEvent e) {
}
@Override
public void mouseMoved(MouseEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
}
@Override
public void keyReleased(KeyEvent e) {
}
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void mouseDragged(MouseEvent e) {
}
@Override
public void mouseExitedScreen(MouseEvent e) {
}
public void mouseExited(Transform cursor) {
}
@Override
public void mouseEnteredScreen(MouseEvent e) {
}
public void mouseEntered(Transform cursor) {
}
@Override
public void mouseWheelMoved(MouseEvent e) {
}
public void mouseHover(Transform cursor) {
}
@Override
public void addComponent(Component component) {
components.add(component);
}
@Override
public void removeComponent(String identifier) {
components.removeIf(component -> component.getName().equals(identifier));
}
@Override
public void removeComponent(Component component) {
components.remove(component);
}
@Override
public List<Component> getComponents() {
return components;
}
@Override
public Component getComponent(String identifier) {
for (Component component : components) {
if (component.getName().equals(identifier)) {
return component;
}
}
return null;
}
public void prepareGraphics(SaltyGraphics graphics) {
graphics.setColor(getBackgroundColor());
graphics.setFont(getFont());
}
public Font getFont() {
return font;
}
public void setFont(Font font) {
this.font = font;
}
public Coordinates getCoordinates() {
return getPosition().convertToCoordinates();
}
public boolean isSuppressClipping() {
return suppressClipping;
}
public void setSuppressClipping(boolean suppressClipping) {
this.suppressClipping = suppressClipping;
}
@Override
public Transform getTransform() {
return transform;
}
@Override
public void setTransform(Transform transform) {
this.transform = transform;
}
public boolean mouseHoversOver() {
return mouseHoversOver;
}
protected void setMouseHoversOver(boolean mouseHoversOver) {
this.mouseHoversOver = mouseHoversOver;
}
public Color getBackgroundColor() {
return backgroundColor;
}
public void setBackgroundColor(Color backgroundColor) {
this.backgroundColor = backgroundColor;
}
public Color getForegroundColor() {
return foregroundColor;
}
public void setForegroundColor(Color foregroundColor) {
this.foregroundColor = foregroundColor;
}
}
|
[
"malte.dostal@gmail.com"
] |
malte.dostal@gmail.com
|
a9536856f60fc6a98ded458aea3e53fc7a2de17a
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/neo4j/testing/505/ShortStringPropertyEncodeTest.java
|
08149f01fcc26cfff7e0a3fc881debdec32154c5
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,196
|
java
|
/*
* Copyright (c) 2002-2018 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.store;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.neo4j.dbms.database.DatabaseManager;
import org.neo4j.io.pagecache.tracing.cursor.context.EmptyVersionContextSupplier;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.store.id.DefaultIdGeneratorFactory;
import org.neo4j.kernel.impl.store.record.PropertyBlock;
import org.neo4j.logging.NullLogProvider;
import org.neo4j.test.rule.PageCacheAndDependenciesRule;
import org.neo4j.values.storable.TextValue;
import org.neo4j.values.storable.Value;
import org.neo4j.values.storable.Values;
import static org.junit.Assert.assertEquals;
public class ShortStringPropertyEncodeTest
{
private static final int KEY_ID = 0;
@Rule
public final PageCacheAndDependenciesRule storage = new PageCacheAndDependenciesRule();
private NeoStores neoStores;
private PropertyStore propertyStore;
@Before
public void setupStore()
{
neoStores = new StoreFactory( storage.directory().databaseLayout(), Config.defaults(), new DefaultIdGeneratorFactory( storage.fileSystem() ),
storage.pageCache(), storage.fileSystem(), NullLogProvider.getInstance(), EmptyVersionContextSupplier.EMPTY ).openNeoStores( true,
StoreType.PROPERTY, StoreType.PROPERTY_ARRAY, StoreType.PROPERTY_STRING );
propertyStore = neoStores.getPropertyStore();
}
@After
public void closeStore()
{
neoStores.close();
}
@Test
public void canEncodeEmptyString()
{
assertCanEncode( "" );
}
@Test
public void canEncodeReallyLongString()
{
assertCanEncode( " " ); // 20 spaces
assertCanEncode( " " ); // 16 spaces
}
@Test
public void canEncodeFifteenSpaces()
{
assertCanEncode( " " );
}
@Test
public void canEncodeNumericalString()
{
assertCanEncode( "0123456789+,'.-" );
assertCanEncode( " ,'.-0123456789" );
assertCanEncode( "+ '.0123456789-" );
assertCanEncode( "+, 0123456789.-" );
assertCanEncode( "+,0123456789' -" );
assertCanEncode( "+0123456789,'. " );
// IP(v4) numbers
assertCanEncode( "192.168.0.1" );
assertCanEncode( "127.0.0.1" );
assertCanEncode( "255.255.255.255" );
}
@Test
public void canEncodeTooLongStringsWithCharsInDifferentTables()
{
assertCanEncode( "____________+" );
assertCanEncode( "_____+_____" );
assertCanEncode( "____+____" );
assertCanEncode( "HELLO world" );
assertCanEncode( "Hello_World" );
}
@Test
public void canEncodeUpToNineEuropeanChars()
{
// Shorter than 10 chars
assertCanEncode( "fågel" ); // "bird" in Swedish
assertCanEncode( "påfågel" ); // "peacock" in Swedish
assertCanEncode( "påfågelö" ); // "peacock island" in Swedish
assertCanEncode( "påfågelön" ); // "the peacock island" in Swedish
// 10 chars
assertCanEncode( "påfågelöar" ); // "peacock islands" in Swedish
}
@Test
public void canEncodeEuropeanCharsWithPunctuation()
{
assertCanEncode( "qHm7 pp3" );
assertCanEncode( "UKKY3t.gk" );
}
@Test
public void canEncodeAlphanumerical()
{
assertCanEncode( "1234567890" ); // Just a sanity check
assertCanEncodeInBothCasings( "HelloWor1d" ); // There is a number there
assertCanEncode( " " ); // Alphanum is the first that can encode 10 spaces
assertCanEncode( "_ _ _ _ _ " ); // The only available punctuation
assertCanEncode( "H3Lo_ or1D" ); // Mixed case + punctuation
assertCanEncode( "q1w2e3r4t+" ); // + is not in the charset
}
@Test
public void canEncodeHighUnicode()
{
assertCanEncode( "\u02FF" );
assertCanEncode( "hello\u02FF" );
}
@Test
public void canEncodeLatin1SpecialChars()
{
assertCanEncode( "#$#$#$#" );
assertCanEncode( "$hello#" );
}
@Test
public void canEncodeTooLongLatin1String()
{
assertCanEncode( "#$#$#$#$" );
}
@Test
public void canEncodeLowercaseAndUppercaseStringsUpTo12Chars()
{
assertCanEncodeInBothCasings( "hello world" );
assertCanEncode( "hello_world" );
assertCanEncode( "_hello_world" );
assertCanEncode( "hello::world" );
assertCanEncode( "hello//world" );
assertCanEncode( "hello world" );
assertCanEncode( "http://ok" );
assertCanEncode( "::::::::" );
assertCanEncode( " _.-:/ _.-:/" );
}
private void assertCanEncodeInBothCasings( String string )
{
assertCanEncode( string.toLowerCase() );
assertCanEncode( string.toUpperCase() );
}
private void assertCanEncode( String string )
{
encode( string );
}
private void encode( String string )
{
PropertyBlock block = new PropertyBlock();
TextValue expectedValue = Values.stringValue( string );
propertyStore.encodeValue( block, KEY_ID, expectedValue );
assertEquals( 0, block.getValueRecords().size() );
Value readValue = block.getType().value( block, propertyStore );
assertEquals( expectedValue, readValue );
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
d19d625b1440746955eca1896c8dad44c2a8c053
|
f40c5613a833bc38fca6676bad8f681200cffb25
|
/kubernetes-model-generator/openshift-model-machineconfig/src/generated/java/io/fabric8/openshift/api/model/machineconfig/v1/KubeletConfigStatus.java
|
a6d8229841087505cdc4f06930cf0bbb5a5c8de5
|
[
"Apache-2.0"
] |
permissive
|
rohanKanojia/kubernetes-client
|
2d599e4ed1beedf603c79d28f49203fbce1fc8b2
|
502a14c166dce9ec07cf6adb114e9e36053baece
|
refs/heads/master
| 2023-07-25T18:31:33.982683
| 2022-04-12T13:39:06
| 2022-04-13T05:12:38
| 106,398,990
| 2
| 3
|
Apache-2.0
| 2023-04-28T16:21:03
| 2017-10-10T09:50:25
|
Java
|
UTF-8
|
Java
| false
| false
| 3,906
|
java
|
package io.fabric8.openshift.api.model.machineconfig.v1;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.fabric8.kubernetes.api.model.Container;
import io.fabric8.kubernetes.api.model.IntOrString;
import io.fabric8.kubernetes.api.model.KubernetesResource;
import io.fabric8.kubernetes.api.model.LabelSelector;
import io.fabric8.kubernetes.api.model.LocalObjectReference;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectReference;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import io.fabric8.kubernetes.api.model.PodTemplateSpec;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.BuildableReference;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"conditions",
"observedGeneration"
})
@ToString
@EqualsAndHashCode
@Setter
@Accessors(prefix = {
"_",
""
})
@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = {
@BuildableReference(ObjectMeta.class),
@BuildableReference(LabelSelector.class),
@BuildableReference(Container.class),
@BuildableReference(PodTemplateSpec.class),
@BuildableReference(ResourceRequirements.class),
@BuildableReference(IntOrString.class),
@BuildableReference(ObjectReference.class),
@BuildableReference(LocalObjectReference.class),
@BuildableReference(PersistentVolumeClaim.class)
})
public class KubeletConfigStatus implements KubernetesResource
{
@JsonProperty("conditions")
private List<KubeletConfigCondition> conditions = new ArrayList<KubeletConfigCondition>();
@JsonProperty("observedGeneration")
private Long observedGeneration;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
/**
* No args constructor for use in serialization
*
*/
public KubeletConfigStatus() {
}
/**
*
* @param conditions
* @param observedGeneration
*/
public KubeletConfigStatus(List<KubeletConfigCondition> conditions, Long observedGeneration) {
super();
this.conditions = conditions;
this.observedGeneration = observedGeneration;
}
@JsonProperty("conditions")
public List<KubeletConfigCondition> getConditions() {
return conditions;
}
@JsonProperty("conditions")
public void setConditions(List<KubeletConfigCondition> conditions) {
this.conditions = conditions;
}
@JsonProperty("observedGeneration")
public Long getObservedGeneration() {
return observedGeneration;
}
@JsonProperty("observedGeneration")
public void setObservedGeneration(Long observedGeneration) {
this.observedGeneration = observedGeneration;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
|
[
"marc@marcnuri.com"
] |
marc@marcnuri.com
|
4505d016cf3720c92ed407d54fa6e11d8407c4ae
|
cdbd85455b0de475bcf41c0e307c07503f4303a4
|
/ncalendar/src/main/java/com/necer/utils/AttrsUtil.java
|
a8100906c1c15380712dc1ed3b0568ec23571980
|
[
"Apache-2.0"
] |
permissive
|
lycsmlie/NCalendar
|
177c7fac728deb9eaf93bf31f594382ea1f93a98
|
80a4fbd9e880799a5cc87aad9f55d2dae785fc51
|
refs/heads/master
| 2020-06-17T11:56:40.425980
| 2019-07-08T12:42:21
| 2019-07-08T12:42:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,324
|
java
|
package com.necer.utils;
import android.content.Context;
import android.content.res.TypedArray;
import android.text.TextUtils;
import android.util.AttributeSet;
import com.necer.R;
/**
* Created by necer on 2018/11/28.
*/
public class AttrsUtil {
public static Attrs getAttrs(Context context,AttributeSet attributeSet) {
Attrs attrs = new Attrs();
TypedArray ta = context.obtainStyledAttributes(attributeSet, R.styleable.NCalendar);
attrs.solarTextColor = ta.getColor(R.styleable.NCalendar_solarTextColor, context.getResources().getColor(R.color.solarTextColor));
attrs.todaySolarTextColor = ta.getColor(R.styleable.NCalendar_todaySolarTextColor, context.getResources().getColor(R.color.todaySolarTextColor));
attrs.todaySolarSelectTextColor = ta.getColor(R.styleable.NCalendar_todaySolarSelectTextColor, context.getResources().getColor(R.color.white));
attrs.lunarTextColor = ta.getColor(R.styleable.NCalendar_lunarTextColor, context.getResources().getColor(R.color.lunarTextColor));
attrs.solarHolidayTextColor = ta.getColor(R.styleable.NCalendar_solarHolidayTextColor, context.getResources().getColor(R.color.solarHolidayTextColor));
attrs.lunarHolidayTextColor = ta.getColor(R.styleable.NCalendar_lunarHolidayTextColor, context.getResources().getColor(R.color.lunarHolidayTextColor));
attrs.solarTermTextColor = ta.getColor(R.styleable.NCalendar_solarTermTextColor, context.getResources().getColor(R.color.solarTermTextColor));
attrs.selectCircleColor = ta.getColor(R.styleable.NCalendar_selectCircleColor, context.getResources().getColor(R.color.selectCircleColor));
attrs.solarTextSize = ta.getDimension(R.styleable.NCalendar_solarTextSize, CalendarUtil.sp2px(context, 18));
attrs.lunarTextSize = ta.getDimension(R.styleable.NCalendar_lunarTextSize, CalendarUtil.sp2px(context, 10));
attrs.lunarDistance = ta.getDimension(R.styleable.NCalendar_lunarDistance, CalendarUtil.sp2px(context, 15));
attrs.holidayDistance = ta.getDimension(R.styleable.NCalendar_holidayDistance, CalendarUtil.sp2px(context, 15));
attrs.holidayTextSize = ta.getDimension(R.styleable.NCalendar_holidayTextSize, CalendarUtil.sp2px(context, 10));
attrs.selectCircleRadius = ta.getDimension(R.styleable.NCalendar_selectCircleRadius, CalendarUtil.dp2px(context, 22));
attrs.isShowLunar = ta.getBoolean(R.styleable.NCalendar_isShowLunar, true);
attrs.isDefaultSelect = ta.getBoolean(R.styleable.NCalendar_isDefaultSelect, true);
attrs.isMultipleSelect = ta.getBoolean(R.styleable.NCalendar_isMultipleSelect, false);
attrs.isDefaultSelectFitst = ta.getBoolean(R.styleable.NCalendar_isDefaultSelectFitst, false);
attrs.pointSize = ta.getDimension(R.styleable.NCalendar_pointSize, CalendarUtil.dp2px(context, 2));
attrs.pointDistance = ta.getDimension(R.styleable.NCalendar_pointDistance, CalendarUtil.dp2px(context, 18));
attrs.pointColor = ta.getColor(R.styleable.NCalendar_pointColor, context.getResources().getColor(R.color.pointColor));
attrs.hollowCircleColor = ta.getColor(R.styleable.NCalendar_hollowCircleColor, context.getResources().getColor(R.color.hollowCircleColor));
attrs.hollowCircleStroke = ta.getDimension(R.styleable.NCalendar_hollowCircleStroke, CalendarUtil.dp2px(context, 1));
attrs.monthCalendarHeight = (int) ta.getDimension(R.styleable.NCalendar_calendarHeight, CalendarUtil.dp2px(context, 300));
attrs.duration = ta.getInt(R.styleable.NCalendar_duration, 240);
attrs.isShowHoliday = ta.getBoolean(R.styleable.NCalendar_isShowHoliday, true);
attrs.isWeekHold = ta.getBoolean(R.styleable.NCalendar_isWeekHold, false);
attrs.holidayColor = ta.getColor(R.styleable.NCalendar_holidayColor, context.getResources().getColor(R.color.holidayColor));
attrs.workdayColor = ta.getColor(R.styleable.NCalendar_workdayColor, context.getResources().getColor(R.color.workdayColor));
attrs.todaySelectContrastColor = ta.getColor(R.styleable.NCalendar_todaySelectContrastColor, context.getResources().getColor(R.color.white));
attrs.bgCalendarColor = ta.getColor(R.styleable.NCalendar_bgCalendarColor, context.getResources().getColor(R.color.white));
attrs.firstDayOfWeek = ta.getInt(R.styleable.NCalendar_firstDayOfWeek, Attrs.SUNDAY);
attrs.pointLocation = ta.getInt(R.styleable.NCalendar_pointLocation, Attrs.UP);
attrs.defaultCalendar = ta.getInt(R.styleable.NCalendar_defaultCalendar, Attrs.MONTH);
attrs.holidayLocation = ta.getInt(R.styleable.NCalendar_holidayLocation, Attrs.TOP_RIGHT);
attrs.alphaColor = ta.getInt(R.styleable.NCalendar_alphaColor, 90);
attrs.disabledAlphaColor = ta.getInt(R.styleable.NCalendar_disabledAlphaColor, 50);
String startString = ta.getString(R.styleable.NCalendar_startDate);
String endString = ta.getString(R.styleable.NCalendar_endDate);
attrs.disabledString = ta.getString(R.styleable.NCalendar_disabledString);
attrs.startDateString = TextUtils.isEmpty(startString) ? "1901-01-01" : startString;
attrs.endDateString = TextUtils.isEmpty(endString) ? "2099-12-31" : endString;
ta.recycle();
return attrs;
}
}
|
[
"619008099@qq.com"
] |
619008099@qq.com
|
152a72c7b134ac8d6d0e61a12e2de875a601499f
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/ru/sravni/android/bankproduct/utils/adapter/BindingSwipeRefreshKt.java
|
03e5868a570d03844c61df5fa99e84de5b3664a2
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,606
|
java
|
package ru.sravni.android.bankproduct.utils.adapter;
import androidx.core.content.ContextCompat;
import androidx.databinding.BindingAdapter;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import ru.sravni.android.bankproduct.R;
import ru.sravni.android.bankproduct.utils.components.wraprefreshlayout.WrapContentableSwipeRefreshLayout;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a\u001f\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\u0007¢\u0006\u0004\b\u0005\u0010\u0006\u001a\u001f\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00072\u0006\u0010\u0003\u001a\u00020\u0002H\u0007¢\u0006\u0004\b\u0005\u0010\b¨\u0006\t"}, d2 = {"Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;", "view", "", "isLoading", "", "bindColorSchemeToSwipeRefresh", "(Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;Z)V", "Lru/sravni/android/bankproduct/utils/components/wraprefreshlayout/WrapContentableSwipeRefreshLayout;", "(Lru/sravni/android/bankproduct/utils/components/wraprefreshlayout/WrapContentableSwipeRefreshLayout;Z)V", "sravnichat_release"}, k = 2, mv = {1, 4, 0})
public final class BindingSwipeRefreshKt {
@BindingAdapter({"isLoading"})
public static final void bindColorSchemeToSwipeRefresh(@NotNull SwipeRefreshLayout swipeRefreshLayout, boolean z) {
Intrinsics.checkParameterIsNotNull(swipeRefreshLayout, "view");
swipeRefreshLayout.setRefreshing(z);
swipeRefreshLayout.setColorSchemeResources(R.color.primary, R.color.secondary, R.color.error);
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(ContextCompat.getColor(swipeRefreshLayout.getContext(), R.color.background));
}
@BindingAdapter({"isLoading"})
public static final void bindColorSchemeToSwipeRefresh(@NotNull WrapContentableSwipeRefreshLayout wrapContentableSwipeRefreshLayout, boolean z) {
Intrinsics.checkParameterIsNotNull(wrapContentableSwipeRefreshLayout, "view");
wrapContentableSwipeRefreshLayout.setRefreshing(z);
wrapContentableSwipeRefreshLayout.setColorSchemeResources(R.color.primary, R.color.secondary, R.color.error);
wrapContentableSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(ContextCompat.getColor(wrapContentableSwipeRefreshLayout.getContext(), R.color.background));
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
c27fecfd4340035f9fdc0f24948237020fd23da4
|
dd3c7b027c068317679b9544ba5d1c799b06bca7
|
/src/test/java/co/id/bankmandiri/workflow/WorkflowApplicationTests.java
|
012b425f737e7f1218c7adc4aa839446b31f6057
|
[] |
no_license
|
dickanirwansyah/workflow
|
9511750512df2eeaea9af0d05339048d3cecbb89
|
162536df8d91643e922d0c21b4db585b1efd0af5
|
refs/heads/master
| 2022-11-30T04:36:54.177802
| 2020-07-31T17:07:40
| 2020-07-31T17:07:40
| 284,050,039
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 220
|
java
|
package co.id.bankmandiri.workflow;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class WorkflowApplicationTests {
@Test
void contextLoads() {
}
}
|
[
"dickanirwansyah@gmail.com"
] |
dickanirwansyah@gmail.com
|
dd0511946e394ad2ffc7f34a13278d8b649a6cf6
|
b27bfe9db8f0c7e5ca9377397b23ef2ef27d4ddc
|
/morozov/system/gui/space2d/errors/WrongArgumentIsNotFontWeight2D.java
|
1664e0cd1d35cbf806539404c2fa5d94283b4456
|
[] |
no_license
|
Morozov2012/actor-prolog-java-library
|
85fe97eb6a37709d742f4ab06b29d0718c7269c3
|
5a7e2011ac2152278b8ebae3dfb2da4d925619a3
|
refs/heads/master
| 2021-01-20T15:39:14.173431
| 2019-12-13T13:09:01
| 2019-12-13T13:09:01
| 7,780,078
| 5
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
// (c) 2013 IRE RAS Alexei A. Morozov
package morozov.system.gui.space2d.errors;
import morozov.terms.*;
import morozov.terms.errors.*;
public class WrongArgumentIsNotFontWeight2D extends WrongArgument {
public WrongArgumentIsNotFontWeight2D(Term value) {
super(value);
}
}
|
[
"AlexeiMorozov2006@rambler.ru"
] |
AlexeiMorozov2006@rambler.ru
|
6f1c189cbda7c4ecdae3fafe481e1366d651ce10
|
7c7f86c62089741ac520f699c5efa33b46376435
|
/src/main/java/com/baidu/beidou/cprogroup/bo/CproGroupRegion.java
|
7ea618b179c23f6143bdc3cec3489105212ff53c
|
[] |
no_license
|
wang-shun/beidou-cron
|
35caeceddb0cc64ebe945fa181c099d0c2f5e732
|
d46cfa8c5bb838775ae30946d496edae76d0d34e
|
refs/heads/master
| 2020-03-29T14:05:15.550899
| 2017-04-04T04:03:27
| 2017-04-04T04:03:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,193
|
java
|
/**
* Copyright (C) 2015 Baidu, Inc. All Rights Reserved.
*/
package com.baidu.beidou.cprogroup.bo;
/**
* 推广组地域信息BO
*
* @author Wang Yu
*
*/
public class CproGroupRegion {
private int userId;
private int groupId;
private int isAllRegion;
private String regListStr;
private String sysRegListStr;
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public int getGroupId() {
return groupId;
}
public void setGroupId(int groupId) {
this.groupId = groupId;
}
public int getIsAllRegion() {
return isAllRegion;
}
public void setIsAllRegion(int isAllRegion) {
this.isAllRegion = isAllRegion;
}
public String getRegListStr() {
return regListStr;
}
public void setRegListStr(String regListStr) {
this.regListStr = regListStr;
}
public String getSysRegListStr() {
return sysRegListStr;
}
public void setSysRegListStr(String sysRegListStr) {
this.sysRegListStr = sysRegListStr;
}
}
|
[
"berryjamcoding@gmail.com"
] |
berryjamcoding@gmail.com
|
51ee3dcf31800f3cd18d833f630864af960f66b8
|
ce778e35ea72ad33d03129c43b3ddfafc3581076
|
/src/main/java/com/redhat/qe/helpers/ssh/Find.java
|
af8b1faba2f8e2f5c1e6ee77dd67d6b8e74160fc
|
[] |
no_license
|
rhscqe/rhsc-shell-rest-api-automation
|
011150559815afa155229422fa8cec1bb4c3c6d4
|
7d720a8a566fb7f7178a95d593b97e6f09ec3e91
|
refs/heads/master
| 2021-01-02T08:34:15.525146
| 2014-08-08T07:38:41
| 2014-08-08T07:38:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 162
|
java
|
package com.redhat.qe.helpers.ssh;
public class Find extends Command{
public Find(String... arguments) {
super();
_add("find");
_add(arguments);
}
}
|
[
"dtsang@redhat.com"
] |
dtsang@redhat.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.