blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2
values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82
values | src_encoding stringclasses 28
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 7 5.41M | extension stringclasses 11
values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c9adcb341ea263219d298c6c314ef9b4906b2750 | 1d70857aa55fbee0d6ed1fde5ded0ad875d3ae5f | /src/com/penner/action/PlanAction.java | 4f06e3754fd06ad8ba9e55b44770754a22b1d621 | [] | no_license | sdanfy/Penner | 4123ac0c4ce670d0bfefdb1bcb70621597a77ac9 | d419eeea235ca96fce6f00ba9b54c24e5d206338 | refs/heads/master | 2020-05-19T17:40:39.587326 | 2015-04-23T16:54:35 | 2015-04-23T16:54:35 | 34,468,864 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | package com.penner.action;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.penner.exception.ServiceException;
import com.penner.model.Plan;
import com.penner.model.PlanClass;
import com.penner.service.PlanClassService;
import com.penner.service.PlanService;
@Controller
public class PlanAction extends BaseAction{
@Autowired
private PlanService planService;
@Autowired
private PlanClassService planClassService;
@ResponseBody
@RequestMapping(value="/plan/q",method=RequestMethod.POST)
public String findPlansByUserAndClass(int userId,int classId){
try {
// TODO userId from Session .
Collection<Plan> plans = planService.findPlansByUserAndClass(userId, classId);
String jsonString = JSON.toJSONString(plans);
this.writeJSON(jsonString);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
@ResponseBody
@RequestMapping(value="/plan/cs/q",method=RequestMethod.POST)
public String findClassesByUser(int userId){
try {
// TODO userId from Session
Collection<PlanClass> planClasses = planClassService.findPlanClassesByUser(userId);
this.writeJSON(JSON.toJSONString(planClasses));
} catch (ServiceException e) {
e.printStackTrace();
}
return null;
}
}
| [
"CK@192.168.9.111"
] | CK@192.168.9.111 |
62aae8cb30a6bb8a29541c677b87737f355b408f | f9fb0f9588686bbf758232fa0bbb8ae7006ffd84 | /app/src/main/java/com/yomi/sweat/ui/VerticalSpaceItemDecoration.java | 8a4369a91cc63e9077aa1cb463aafe2b75265a69 | [] | no_license | yomiyusuf/Sweat | 74cb149b4c57f701c3bca512e6786d44403fde24 | c18c7313d976d9bc5a13a1d810544d11891784b0 | refs/heads/master | 2020-07-14T09:29:11.363875 | 2019-09-05T02:01:47 | 2019-09-05T02:01:47 | 205,292,130 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | package com.yomi.sweat.ui;
import android.graphics.Rect;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
public class VerticalSpaceItemDecoration extends RecyclerView.ItemDecoration {
private final int verticalSpaceHeight;
public VerticalSpaceItemDecoration(int verticalSpaceHeight) {
this.verticalSpaceHeight = verticalSpaceHeight;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent,
RecyclerView.State state) {
outRect.bottom = verticalSpaceHeight;
}
} | [
"yomi.joseph@target.com.au"
] | yomi.joseph@target.com.au |
7bff4064c05c0f63429d851143736c86d4df2d46 | 75f1cf146badcefdcb77f4416bf1d5b6703bd6c1 | /app/src/main/java/com/pixcat/warehouseproductscanner/data/auth/UserRoles.java | e656b6edb9d960431fa3c1f847651cd66d208bbf | [
"MIT"
] | permissive | PixelCatalyst/WarehouseProductScanner | e6b9393dfa76d4cb12848ca6ea1a230572b2b60b | 8c7edd7b8581a0cb022c07bcbf0f5ec456ed1db3 | refs/heads/master | 2023-07-25T21:31:39.748661 | 2021-09-04T13:29:13 | 2021-09-04T13:29:13 | 373,327,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 302 | java | package com.pixcat.warehouseproductscanner.data.auth;
public class UserRoles {
public static final String READ_PRODUCTS = "ROLE_READ_PRODUCTS";
public static final String READ_BULK_PRODUCTS = "ROLE_READ_BULK_PRODUCTS";
public static final String WRITE_PRODUCTS = "ROLE_WRITE_PRODUCTS";
}
| [
"kienastmarcin@gmail.com"
] | kienastmarcin@gmail.com |
a460bc4b1a36a6da507ad2f64d05b727101c4e08 | b19dfaa972369a28ca79dd95ff2358190a725c18 | /src/main/java/com/Hills30/controller/UserController.java | c639018dc2a665604d68eb4232ce0c2cc508a6c6 | [] | no_license | nsinfoPRO/Hills30SocialNet | 2c65c65ad4cb2dc01f01e82d1fb8cf56e5c45cdc | 84337a0c9ff2e85a9e92e0351392bf1ec7c4b5b7 | refs/heads/master | 2020-03-30T04:31:19.826466 | 2018-09-28T13:54:34 | 2018-09-28T13:54:34 | 150,747,527 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,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 com.Hills30.controller;
import com.Hills30.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
/**
*
* @author Nenad
*/
@Controller
@RequestMapping("/users")
public class UserController {
private UserService userService;
@Autowired
public UserController(UserService userService) {
this.userService = userService;
}
@RequestMapping("/list")
public String list(Model model) {
model.addAttribute("users", userService.list());
return "users/listOfUsers";
}
@RequestMapping("/list/{id}")
public String byAuthor(@PathVariable(value = "id") Long id, Model model, Model model2, Model model3, Model model4) {
model.addAttribute("user", userService.findUserbyID(id));
model2.addAttribute("friends", userService.findUserFriendsById(id));
model3.addAttribute("friendss", userService.findFriendsFriendsById(id));
model4.addAttribute("sugfriends", userService.findSuggestedFriendsById(id));
return "users/user";
}
}
| [
"Nenad@TrendSonic11"
] | Nenad@TrendSonic11 |
05c98bdc7a601f25ae198bd360b671bd092ed52d | c54ab7d7d7e0161af315d7cbae669b4c52029951 | /JavaAssignment/src/com/techchefs/javaapp/firstassignment/PatternSecond.java | 6ff527933f3bbeac8f0e9ccc20220000aaac6c92 | [] | no_license | deekshitr/ELF-06June19-TechChefs-DeekshitR | 82c6796ad0ec142896e17971f2d9fd73aeb0d1c4 | 5296cbdddb89b3ef4a529f04f6aba500d474a327 | refs/heads/master | 2023-01-13T12:33:11.550703 | 2019-08-22T14:33:09 | 2019-08-22T14:33:09 | 192,527,129 | 0 | 0 | null | 2023-01-04T06:58:16 | 2019-06-18T11:31:00 | Rich Text Format | UTF-8 | Java | false | false | 386 | java | package com.techchefs.javaapp.firstassignment;
/* USE CASE :
* PatternSecond is a main test class
* to print a pattern
*/
//SOLUTION :
public class PatternSecond {
public static void main(String[] args) {
int r=5;
for(int i=0 ; i<5 ; i++)
{
for(int j=5 ; j>i ; j--)
{
System.out.print("*");
}
System.out.println();
}
}//end of main
}//end of class
| [
"deekshitr456@gmai.com"
] | deekshitr456@gmai.com |
b3de036ffe0aaa26224c0ccc68c5164a304f321d | a52cea97b4d0b94eac788825d22e0202c1629bd3 | /EC/src/ec/UserData.java | ab875d79a80d9f8d2c6423f8e6a2e86dc244e6ab | [] | no_license | KagaRaymond/ProgramRetouch | 0da0b13460f0ed6d5c9adea36796198cf1bc1ef6 | f32212a821bf6039189b56de863511a587f25456 | refs/heads/master | 2020-04-17T17:07:02.433360 | 2019-01-28T03:39:53 | 2019-01-28T03:39:53 | 166,770,085 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,095 | java | package ec;
import java.io.IOException;
import java.util.ArrayList;
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 javax.servlet.http.HttpSession;
import beans.BuyDataBeans;
import beans.UserDataBeans;
import dao.BuyDAO;
import dao.BuyDetailDAO;
import dao.UserDAO;
/**
* ユーザー情報画面
*
* @author d-yamaguchi
*
*/
@WebServlet("/UserData")
public class UserData extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// セッション開始
HttpSession session = request.getSession();
try {
// ログイン時に取得したユーザーIDをセッションから取得
int userId = (int) session.getAttribute("userId");
// 更新確認画面から戻ってきた場合Sessionから取得。それ以外はuserIdでユーザーを取得
UserDataBeans udb = session.getAttribute("returnUDB") == null ? UserDAO.getUserDataBeansByUserId(userId) : (UserDataBeans) EcHelper.cutSessionAttribute(session, "returnUDB");
// 入力された内容に誤りがあったとき等に表示するエラーメッセージを格納する
String validationMessage = (String) EcHelper.cutSessionAttribute(session, "validationMessage");
BuyDataBeans bdb = BuyDAO.getBuyDataBeansByBuyId(userId);
request.setAttribute("validationMessage", validationMessage);
request.setAttribute("udb", udb);
request.setAttribute("bdb", bdb);
//購入IDによる購入情報をセット
ArrayList<BuyDataBeans> userbdb = BuyDetailDAO.getBuyDataBeansByUserId(userId);
request.setAttribute("userbdb", userbdb);
request.getRequestDispatcher(EcHelper.USER_DATA_PAGE).forward(request, response);
} catch (Exception e) {
e.printStackTrace();
session.setAttribute("errorMessage", e.toString());
response.sendRedirect("Error");
}
}
}
| [
"45344998+KagaRaymond@users.noreply.github.com"
] | 45344998+KagaRaymond@users.noreply.github.com |
72772fa192e6afc0dbab4b313c3af25d45dfec0f | d95e8545244f55434d61815151d6859d107ec320 | /Course3/Week1/Assignment3/TestCaesarCipherTwo.java | cc29e3dae6a93982e3420046ca8013d0bf5d642c | [] | no_license | nbwuzhe/CourseraJavaFundamentals | eb32b818b9376919b73e82a5d293498036e0264f | 666e0713825167277fb9d0f1c6df207adb3db8b7 | refs/heads/master | 2023-02-11T17:13:49.282994 | 2021-01-03T19:07:05 | 2021-01-03T19:07:05 | 326,468,754 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,895 | java |
/**
* Write a description of TestCaesarCipherTwo here.
*
* @author Tim Wu
* @version 0.1
*/
import edu.duke.*;
public class TestCaesarCipherTwo {
private String halfOfString(String message, int start) {
StringBuilder sb = new StringBuilder();
for (int m = start; m < message.length(); m = m+2) {
sb.append(message.charAt(m));
}
return sb.toString();
}
private int [] countLetters(String input) {
String alph = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int [] counts = new int[26];
for (int m = 0; m < input.length(); m++) {
char ch = input.charAt(m);
if (Character.isLowerCase(ch)) {
ch = Character.toUpperCase(ch);
}
int index = alph.indexOf(ch);
if (index != -1) {
counts[index] ++;
}
}
return counts;
}
private int maxIndex(int[] values) {
int val = values[0];
int index = 0;
for (int m = 1; m < values.length; m++) {
if (values[m] > val) {
val = values[m];
index = m;
}
}
return index;
}
private int getKey(String input) {
int [] counts = countLetters(input);
int indexOfMaxCount = maxIndex(counts);
int keyDecrypt = indexOfMaxCount - 4; // 4 is the index of E in original alphabetic order
if (keyDecrypt < 0) {
keyDecrypt = 26 + keyDecrypt;
}
return keyDecrypt;
}
public void simpleTests() {
// FileResource fr = new FileResource();
// String message = fr.asString();
String message = "Can you imagine life WITHOUT the internet AND computers in your pocket?";
int key1 = 21;
int key2 = 8;
CaesarCipherTwo cct = new CaesarCipherTwo(key1, key2);
String encryptedMessage = cct.encrypt(message);
String decryptedMessage = cct.decrypt(encryptedMessage);
// String decryptedMessage = breakCaesarCipher(encryptedMessage);
System.out.println("Original Message is:\n" + message + "\n");
System.out.println("Encrypted Message is:\n" + encryptedMessage + "\n");
System.out.println("Decrypted message is: \n" + decryptedMessage + "\n");
}
public String breakCaesarCipher(String input) {
String partEven = halfOfString(input, 0);
String partOdd = halfOfString(input, 1);
int keyEven = getKey(partEven);
int keyOdd = getKey(partOdd);
System.out.println("Two keys are " + keyEven + " (for even index) and " + keyOdd + " (for odd index).");
CaesarCipherTwo cct = new CaesarCipherTwo(keyEven, keyOdd);
return cct.decrypt(input);
}
}
| [
"tim.wuzhe@gmail.com"
] | tim.wuzhe@gmail.com |
2758c1317dada3d18fd912c489767e0c1df36f18 | 4d5441d2ac546b417ed289249e9e7f43de616de6 | /src/main/java/orm/integ/eao/model/Entity.java | 465184e9b04bb7a7a0658f539f2d3c5f54b33342 | [
"MIT"
] | permissive | cdc39/Integ | b2df81b2206e41014ab23bcd361d27d1cf43799a | 49a1df93bdbfa38b7f1e99b00e9859150c8710fb | refs/heads/master | 2020-04-26T14:20:47.794049 | 2019-05-19T07:35:41 | 2019-05-19T07:35:41 | 173,610,085 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 282 | java | package orm.integ.eao.model;
import orm.integ.dao.annotation.Key;
public class Entity extends RecordObject implements HasId {
@Key
protected String id;
public String getId() {
return id;
}
public void setId(Object id) {
this.id = id==null?null:id.toString();
}
}
| [
"5582213@qq.com"
] | 5582213@qq.com |
28817b052a5e117983ee36ff50cb36c8b345dbeb | 77b7dfa321982cda85ffaab6d607ef0367af703b | /src/main/java/Helper.java | a34600b5c9e1cc4bcc8dd22ca204d18ac393230f | [] | no_license | kyledevpax/PAXStoreOpenAPIDemo | a20cfdb06e97378026bd1bc534f691d82f43f58d | 47f2e844421a95129b0fcfc5cdfb681d3fcea1d3 | refs/heads/master | 2022-06-03T03:45:07.490410 | 2019-08-30T19:34:00 | 2019-08-30T19:34:00 | 158,461,873 | 1 | 0 | null | 2022-05-20T20:54:01 | 2018-11-20T22:58:07 | Java | UTF-8 | Java | false | false | 5,672 | java | import com.pax.market.api.sdk.java.api.base.dto.Result;
import com.pax.market.api.sdk.java.api.merchant.dto.MerchantDTO;
import com.pax.market.api.sdk.java.api.reseller.dto.ResellerDTO;
import com.pax.market.api.sdk.java.api.terminal.dto.TerminalDTO;
public class Helper {
static boolean debug=false;
static String systemAccessKey="AUJIL2QYP63CKY2AF501";
static String systemAccessSecret="V4XTQ5DADRRC88GMZ97ETH5E47E5AHIUGH1LCPPL";
static String url="https://www.paxstores.com/p-market-api";
static void printResellerResult(Result<ResellerDTO> result){
ResellerDTO data=result.getData();
System.out.println("\n\n\n\nHere is the information for "+data.getName());
System.out.println( "ID: "+data.getId()+
"\nName: "+data.getName()+
"\nEmail: "+data.getEmail()+
"\nCountry: "+data.getCountry()+
"\nContact: "+data.getContact()+
"\nPhone: "+data.getPhone()+
"\nPostCode: "+data.getPostcode()+
"\nAddress: "+data.getAddress()+
"\nCompany: "+data.getCompany()+
"\nStatus: "+data.getStatus()+
"\nEntity Attribute Values: "+data.getEntityAttributeValues());
}
static void printMerchantResult(Result<MerchantDTO> result){
MerchantDTO data=result.getData();
System.out.println("\n\n\n\nHere is the information for "+data.getName());
System.out.println( "ID: "+data.getId()+
"\nName: "+data.getName()+
"\nEmail: "+data.getEmail()+
"\nReseller: "+data.getReseller().getName()+
"\nContact: "+data.getContact()+
"\nCountry: "+data.getCountry()+
"\nPhone: "+data.getPhone()+
"\nPost Code: "+data.getPostcode()+
"\nAddress: "+data.getAddress()+
"\nDescription: "+data.getDescription()+
"\nStatus: "+data.getStatus()+
"\nMerchantCategory: "+data.getMerchantCategory()+
"\nEntityAttributeValues: "+data.getEntityAttributeValues());
}
static void printTerminalResult(Result<TerminalDTO> result){
TerminalDTO data=result.getData();
System.out.println("\n\n\n\nHere is the information for "+data.getName());
System.out.println( "ID: "+data.getId()+
"\nName: "+data.getName()+
"\nTID: "+data.getTid()+
"\nSerial Number: "+data.getSerialNo()+
"\nMerchant Name: "+data.getMerchantName()+
"\nReseller Name: "+data.getResellerName()+
"\nModel Name: "+data.getModelName()+
"\nLocation: (can't be returned)"+
"\nTerminal Status: "+data.getStatus());
}
//for java ui
static String printResellerResultString(Result<ResellerDTO> result){
if(result.getData()!=null) {
ResellerDTO data = result.getData();
String s = "ID: " + data.getId() +
"\nName: " + data.getName() +
"\nEmail: " + data.getEmail() +
"\nCountry: " + data.getCountry() +
"\nContact: " + data.getContact() +
"\nPhone: " + data.getPhone() +
"\nPostCode: " + data.getPostcode() +
"\nAddress: " + data.getAddress() +
"\nCompany: " + data.getCompany() +
"\nStatus: " + data.getStatus() +
"\nEntity Attribute Values: " + data.getEntityAttributeValues();
return s;
}
return "";
}
static String printMerchantResultString(Result<MerchantDTO> result){
if(result.getData()!=null) {
MerchantDTO data = result.getData();
String s = "ID: " + data.getId() +
"\nName: " + data.getName() +
"\nEmail: " + data.getEmail() +
"\nReseller: " + data.getReseller().getName() +
"\nContact: " + data.getContact() +
"\nCountry: " + data.getCountry() +
"\nPhone: " + data.getPhone() +
"\nPost Code: " + data.getPostcode() +
"\nAddress: " + data.getAddress() +
"\nDescription: " + data.getDescription() +
"\nStatus: " + data.getStatus() +
"\nMerchantCategory: " + data.getMerchantCategory() +
"\nEntityAttributeValues: " + data.getEntityAttributeValues();
return s;
}
return "";
}
static String printTerminalResultString(Result<TerminalDTO> result){
if(result.getData()!=null) {
TerminalDTO data = result.getData();
String s = "ID: " + data.getId() +
"\nName: " + data.getName() +
"\nTID: " + data.getTid() +
"\nSerial Number: " + data.getSerialNo() +
"\nMerchant Name: " + data.getMerchantName() +
"\nReseller Name: " + data.getResellerName() +
"\nModel Name: " + data.getModelName() +
"\nLocation: (can't be returned)" +
"\nTerminal Status: " + data.getStatus();
return s;
}
return "";
}
}
| [
"michael.tellmann@pax.us"
] | michael.tellmann@pax.us |
126af8a641eb579c60573568edcba70cd49c1601 | f4568bfa25766b0c71bff835c52305f81f3bd271 | /thesis/src/main/java/hu/elte/thesis/view/service/FileHandleService.java | 6d12937f47e946216e57b850b2b47fd19c608f5d | [] | no_license | kelecs08/thesis | 479ed8e94311d8ad0d660761dfae5b52c51b4f47 | 9aa2ea4ce9105127511e48fe05478d6d7828241d | refs/heads/master | 2021-04-26T22:16:02.711219 | 2018-05-15T04:54:50 | 2018-05-15T04:54:50 | 124,056,698 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,220 | java | package hu.elte.thesis.view.service;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import hu.elte.thesis.controller.MainControllerInterface;
import hu.elte.thesis.model.ComputerPlayerDifficulty;
import hu.elte.thesis.model.GameType;
import hu.elte.thesis.model.Player;
import hu.elte.thesis.model.Position;
/**
* Service class for the game menu item.
*
* @author kelecs08
*/
public class FileHandleService {
private MainControllerInterface mainController;
public FileHandleService(MainControllerInterface mainController) {
this.mainController = mainController;
}
/**
* Writing game informations to the given file.
* @param fileName
* the name of the file, in which the informations are written
* @param actualPlayer
* the current player of the game
* @param playerOne
* the first player of the game
* @param playerTwo
* the second player of the game
* @param tableBoardPositions
* the game's table board positions
* @param gameType
* the type of the game
* @param computerPlayerDifficulty
* the difficulty level of the computer player
* @throws IOException
*/
public void writeToFile(String fileName, Player actualPlayer, Player playerOne, Player playerTwo, Position[][] tableBoardPositions, GameType gameType, ComputerPlayerDifficulty computerPlayerDifficulty) throws IOException {
PrintWriter printWriter = new PrintWriter(new FileWriter(fileName));
String difficulty = "";
if(gameType.equals(GameType.ONE_PLAYER)) difficulty = ";" + computerPlayerDifficulty.name();
printWriter.print(gameType.name() + difficulty + "\n");
printWriter.printf("%s;%d\n", playerOne.getName(), playerOne.getReservedSpots());
printWriter.printf("%s;%d;%b\n", playerTwo.getName(), playerTwo.getReservedSpots(), playerTwo.isComputerPlayer());
printWriter.printf("%s\n", actualPlayer.getName());
printWriter.printf("%d\n", tableBoardPositions.length);
for(int i = 0; i < tableBoardPositions.length; i++) {
for(int j = 0; j < tableBoardPositions.length; j++) {
Position act = tableBoardPositions[i][j];
String playerName = " ";
if(act.getPlayer() != null) {
if(act.getPlayer().equals(playerOne)) playerName = "ONE";
else playerName = "TWO";
}
printWriter.printf("%d;%d;%s;%b\n", act.getRow(), act.getColumn(), playerName, act.isValidSpace());
}
}
printWriter.flush();
printWriter.close();
}
/**
* Loading game informations from the given file.
* @param file
* the file from which the informations are being read
* @throws IOException
*/
public void loadFromFile(File file) throws IOException {
FileReader fileReader = null;
try {
fileReader = new FileReader(file);
} catch(FileNotFoundException e) {
return;
}
BufferedReader bufferedReader = new BufferedReader(fileReader);
String line = bufferedReader.readLine();
setGameDetails(line);
line = bufferedReader.readLine();
setPlayerOneFromFile(line);
line = bufferedReader.readLine();
setPlayerTwoFromFile(line);
line = bufferedReader.readLine();
setActualPlayerFromFile(line);
line = bufferedReader.readLine();
int tableSize = Integer.parseInt(line)-4;
Position[][] tableBoardPositions = new Position[tableSize+4][tableSize+4];
while((line = bufferedReader.readLine()) != null) {
String[] tokens = line.split(";");
int row = Integer.parseInt(tokens[0]);
int column = Integer.parseInt(tokens[1]);
Player player = getPlayerByName(tokens[2]);
boolean isValidSpace = true;
if("false".equals(tokens[3])) isValidSpace = false;
tableBoardPositions[row][column] = new Position(row, column, player, isValidSpace);
}
mainController.changeTableSize(tableSize, tableBoardPositions);
mainController.getMainWindow().getGamePanel().updateCenter();
String size = getSizeString(tableSize);
mainController.getMainWindow().setFrameSettings(size);
mainController.getMainWindow().getGamePanel().updateFields();
mainController.updateGameTypeLabel();
mainController.getMainWindow().getGamePanel().setPlayerTwoNameButtonText(mainController.getPlayerTwo().getName());
bufferedReader.close();
}
private String getSizeString(int tableSize) {
if(tableSize == 4) return "small";
if(tableSize == 6) return "medium";
return "large";
}
private void setGameDetails(String line) {
String[] tokens = line.split(";");
if(GameType.ONE_PLAYER.name().equals(tokens[0])) mainController.setGameType(GameType.ONE_PLAYER);
else mainController.setGameType(GameType.TWO_PLAYER);
if(mainController.getGameType().equals(GameType.ONE_PLAYER)) {
if(ComputerPlayerDifficulty.EASY.name().equals(tokens[1])) mainController.setComputerPlayerDifficulty(ComputerPlayerDifficulty.EASY);
else if(ComputerPlayerDifficulty.MEDIUM.name().equals(tokens[1])) mainController.setComputerPlayerDifficulty(ComputerPlayerDifficulty.MEDIUM);
}
}
private void setPlayerOneFromFile(String line) {
String[] tokens = line.split(";");
Player player = new Player(tokens[0], false);
player.setReservedSpots(Integer.parseInt(tokens[1]));
mainController.setPlayerOne(player);
}
private void setPlayerTwoFromFile(String line) {
String[] tokens = line.split(";");
boolean isComputerPlayer = false;
if(tokens[2].equals("true")) isComputerPlayer = true;
Player player = new Player(tokens[0], isComputerPlayer);
player.setReservedSpots(Integer.parseInt(tokens[1]));
mainController.setPlayerTwo(player);
}
private void setActualPlayerFromFile(String name) {
if(mainController.getPlayerOne().getName().equals(name)) mainController.setActualPlayer(mainController.getPlayerOne());
else mainController.setActualPlayer(mainController.getPlayerTwo());
}
private Player getPlayerByName(String name) {
if("ONE".equals(name)) return mainController.getPlayerOne();
else if("TWO".equals(name)) return mainController.getPlayerTwo();
return null;
}
}
| [
"Anna_Kelecsenyi@epam.com"
] | Anna_Kelecsenyi@epam.com |
491278b026f42e99dbddf5c3d73f727aef80fbde | caa28264d1cac97c224e140ded885fc0523fae4e | /src/main/java/ma/kriauto/rest/domain/Location.java | e2af02e5cf33bc15060e6fae7db39e85e11cc8dd | [] | no_license | kriauto/kriauto-web | c0d787681f28c337dc8002ca9f32180790c59a56 | 77090fce12f5ae4627c8e6d374aef549e6df65d7 | refs/heads/master | 2020-03-15T17:29:49.008755 | 2018-12-22T11:40:02 | 2018-12-22T11:40:02 | 132,262,690 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,740 | java | package ma.kriauto.rest.domain;
public class Location {
private double longitude;
private double latitude;
private double speed;
private double course;
private String address;
private String servertime;
private String fixtime;
private String attributes;
private String immatriculation;
private String vin;
private String mark;
private String model;
private String photo;
private String color;
private String deviceid;
private String colorCode;
public Location() {
super();
}
public Location(double longitude, double latitude, double speed,
double course, String address, String servertime, String fixtime,
String attributes, String immatriculation, String vin, String mark,
String model, String photo, String color, String deviceid,
String colorCode) {
super();
this.longitude = longitude;
this.latitude = latitude;
this.speed = speed;
this.course = course;
this.address = address;
this.servertime = servertime;
this.fixtime = fixtime;
this.attributes = attributes;
this.immatriculation = immatriculation;
this.vin = vin;
this.mark = mark;
this.model = model;
this.photo = photo;
this.color = color;
this.deviceid = deviceid;
this.colorCode = colorCode;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getSpeed() {
return speed;
}
public void setSpeed(double speed) {
this.speed = speed;
}
public double getCourse() {
return course;
}
public void setCourse(double course) {
this.course = course;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getServertime() {
return servertime;
}
public void setServertime(String servertime) {
this.servertime = servertime;
}
public String getFixtime() {
return fixtime;
}
public void setFixtime(String fixtime) {
this.fixtime = fixtime;
}
public String getAttributes() {
return attributes;
}
public void setAttributes(String attributes) {
this.attributes = attributes;
}
public String getImmatriculation() {
return immatriculation;
}
public void setImmatriculation(String immatriculation) {
this.immatriculation = immatriculation;
}
public String getVin() {
return vin;
}
public void setVin(String vin) {
this.vin = vin;
}
public String getMark() {
return mark;
}
public void setMark(String mark) {
this.mark = mark;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public String getDeviceid() {
return deviceid;
}
public void setDeviceid(String deviceid) {
this.deviceid = deviceid;
}
public String getColorCode() {
return colorCode;
}
public void setColorCode(String colorCode) {
this.colorCode = colorCode;
}
@Override
public String toString() {
return "Location [longitude=" + longitude + ", latitude=" + latitude
+ ", speed=" + speed + ", course=" + course + ", address="
+ address + ", servertime=" + servertime + ", fixtime="
+ fixtime + ", attributes=" + attributes + ", immatriculation="
+ immatriculation + ", vin=" + vin + ", mark=" + mark
+ ", model=" + model + ", photo=" + photo + ", color=" + color
+ ", deviceid=" + deviceid + ", colorCode=" + colorCode + "]";
}
}
| [
"contact@kriauto.ma"
] | contact@kriauto.ma |
80dbc75eefc480cf928a5df38361d8a8cecb7940 | 3fec741d47edc1afa72524ebb44886dbbee19890 | /Codelearn/Traning/String Evolution.java | f3b35575129d0fba336a5eb68e21609f5dd72d84 | [] | no_license | minhpvtfx00930/Algorithm-Training | cf830b4aa6cbf7d58220b3bd0c2d4b2024690f49 | 52960eb4035e9f60678fc08716445f6a98345e9e | refs/heads/main | 2023-04-13T22:47:36.938941 | 2021-04-24T17:12:33 | 2021-04-24T17:12:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 440 | java | String findSE(String str)
{
StringBuilder out = new StringBuilder();
String pattern = "(.)\\1*";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(str);
while(m.find())
{
String s = str.substring(m.start(), m.end());
out.append(s.charAt(0) + "" + s.length());
}
return out.toString();
}
| [
"dinhanh300229@gmail.com"
] | dinhanh300229@gmail.com |
4398e8a54b8d0ea193571b8254a098596635600e | 7c77de45dc61903eb8c176488f83d72612e4a683 | /WebView/TechPaliyal/app/src/main/java/com/example/rajesh/techpaliyal/MainActivity.java | 70258346b570a29b6f214ba36b883cc499a3a4ca | [] | no_license | rajeshbishnoi/android_apps_basic | f515ea61d6e76d71a58c6cd7fb883142f5378892 | e9bd8268953f99c99f93c74e7733ed053eda6d67 | refs/heads/master | 2021-08-15T20:49:04.225992 | 2017-11-18T08:39:41 | 2017-11-18T08:39:41 | 111,189,634 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,985 | java | package com.example.rajesh.techpaliyal;
import android.graphics.Bitmap;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
public class MainActivity extends AppCompatActivity {
WebView web;
ProgressBar pg;
@Override
protected void onCreate(Bundle savedInstanceState) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
web=(WebView)findViewById(R.id.web1);
pg=(ProgressBar)findViewById(R.id.progressBar);
web.loadUrl(getIntent().getExtras().getString("blue"));
// web.loadUrl("http://techpaliyal.blogspot.in/");
web.getSettings().setJavaScriptEnabled(true);
web.setWebViewClient(new WebViewClient()
{
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon)
{
super.onPageStarted(view, url, favicon);
pg.setVisibility(View.VISIBLE);
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
pg.setVisibility(View.INVISIBLE);
}
}
);
}
public void onBackPressed(){
super.onBackPressed();
if (web.canGoBack())web.goBack();
else finish();
}
}
| [
"bishnoirajesh209@gmail.com"
] | bishnoirajesh209@gmail.com |
f5ef1b4358967bc2d9ed58d1c297e2e1d4de7db4 | 4484ee91ab7b0f13b425d696d6d8d5182a76b709 | /app/src/test/java/com/example/dclone/myvocabapps/ExampleUnitTest.java | c6bb10e21b2ff5cda533b396ca0bf5d241e4f6e0 | [] | no_license | fbessb/MyVocabApps | 04adf50f4794ac8ad4cceb2134423ca02343883d | 8e03144d8bebb8e30258b7ad25bc5a35da7cf814 | refs/heads/master | 2021-01-01T15:31:58.113714 | 2017-07-23T14:25:38 | 2017-07-23T14:25:38 | 97,632,553 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 323 | java | package com.example.dclone.myvocabapps;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"francois.bessaguet@gmail.com"
] | francois.bessaguet@gmail.com |
a0be336f0cbf63660038f481bc47d0979511be1c | f4e41ba0a93c32cee33b3bffc1de2052eaa92edc | /src/main/java/by/htp/accountant/controller/command/MakeAdminCommand.java | ad76c8b08354e373dc66ff14ac149b32cc55f099 | [] | no_license | Stky20/home-accountant | 143564f67fd31880e6b912c31291fa7f029fcbaf | 76c92b1e5a6eca776bc0d0caa4cbba32c1e2ac86 | refs/heads/master | 2020-03-25T14:22:07.336436 | 2018-10-12T05:17:40 | 2018-10-12T05:17:40 | 143,857,068 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 664 | java | package by.htp.accountant.controller.command;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import by.htp.accountant.controller.Command;
import by.htp.accountant.service.ServiceFactory;
import by.htp.accountant.service.UserService;
public class MakeAdminCommand implements Command{
@Override
public void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
UserService userService = ServiceFactory.getInstance().getUserService();
userService.makeAdmin(request, response);
}
}
| [
"stky20@gmail.com"
] | stky20@gmail.com |
c55018aad97d47e61620bc48a0c7bd033b6ceba2 | 5d74b7f684fbea4b848349a0fb455c856bec676b | /src/main/java/storage/Storage.java | 1157a31400000e043406a41af35e6b940531c2b2 | [] | no_license | e0260237/duke | 062ddc9f5beca85a4c942c411a385435b8461968 | 557ac77993aaedc62413e3e14aa04e1647996520 | refs/heads/master | 2020-07-12T03:03:17.746458 | 2019-11-16T08:10:35 | 2019-11-16T08:10:35 | 204,700,516 | 0 | 0 | null | 2019-08-27T20:40:40 | 2019-08-27T12:40:39 | null | UTF-8 | Java | false | false | 5,279 | java | package storage;
import task.Deadline;
import command.DeadlineCommand;
import task.ToDo;
import task.Task;
import task.Event;
import command.EventCommand;
import exception.DukeException;
import ui.Ui;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;
/**
*Represents the storage for list of task.
* */
public class Storage {
/**
*Creation of variable path.
* */
private String path;
/**
*return path according to input.
* */
public Storage(String s){
this.path=s;
}
/**
*Retrieval of line for loading up saved files.
* */
private List<String> getLine() throws FileNotFoundException {
List<String> lines = new ArrayList<>();
File f = new File(path);
Scanner s = new Scanner(f);
while(s.hasNext()){
lines.add(s.nextLine());
}
return lines;
}
/**
*Loading up task according to the saved files.
* */
private static Task createTask(String line) throws DukeException {
String type=line.split("]")[0];
String isDone=line.split("]")[1];
String detail=line.split("]")[2];
if(type.contains("T")){
if(isDone.contains("✘")){
return new ToDo(detail.substring(1),false);
}else if(isDone.contains("✓")){
return new ToDo(detail.substring(1),true);
}
}
if(type.contains("D")) {
if (isDone.contains("✘")) {
int dividerPosition = detail.indexOf("do by:");
String itemName = detail.substring(0, dividerPosition);
String itemName1 = detail.substring(dividerPosition,detail.length());
String itemName2 = itemName1.replace("do by:", "");
return new Deadline(itemName, DeadlineCommand.convertDeadline(itemName2));
} else if (isDone.contains("✓")) {
int dividerPosition = detail.indexOf("do by:");
String itemName = detail.substring(0, dividerPosition);
String itemName1 = detail.substring(dividerPosition,detail.length());
String itemName2 = itemName1.replace("do by:", "");
return new Deadline(itemName, DeadlineCommand.convertDeadline(itemName2));
}
}
if(type.contains("E")){
if (isDone.contains("✘")) {
int dividerPosition = detail.indexOf("at:");
String itemName = detail.substring(0, dividerPosition);
String itemName1 = detail.substring(dividerPosition,detail.length());
String itemName2 = itemName1.replace("at:", "");
return new Event(itemName, EventCommand.convertEvent(itemName2));
} else if (isDone.contains("✓")) {
int dividerPosition = detail.indexOf("at:");
String itemName = detail.substring(0, dividerPosition);
String itemName1 = detail.substring(dividerPosition,detail.length());
String itemName2 = itemName1.replace("at:", "");
return new Event(itemName, EventCommand.convertEvent(itemName2));
}
}
else{
throw new DukeException("☹ OOPS!!! Missing type element for CREATE TASK");
}
return new ToDo();
}
/**
*Reading and loading up file stated in Duke.
* */
private List<Task> getTasksFromFile() throws FileNotFoundException{
List<Task> loadedTasks = new ArrayList<>();
Ui a=new Ui();
try {
List<String> lines = getLine() ;
for (String line : lines) {
if (line.trim().isEmpty()) { //ignore empty lines
continue;
}
loadedTasks.add(createTask(line)); //convert the line to a task and add to the list
}
System.out.println("File successfully loaded");
} catch (DukeException e1) {
System.out.println("☹ OOPS!!! Problem encountered while loading data: " +e1.getMessage());
}
return loadedTasks;
}
/**
*Checking if there is any file in the stated path.
* */
public List<Task> load(){
try {
List<Task> tasks = getTasksFromFile();
return tasks;
}catch (FileNotFoundException e) {
System.out.println("☹ OOPS!!! There is no file in the path: "+e.getMessage());
List<Task> tasks = new ArrayList();
return tasks;
}
}
/**
*Saving any changes to task list.
* */
public void save(List<Task> changed){
try {
FileWriter fw = new FileWriter(path);
for (int i = 0; i < changed.size(); i++) {
String temp = (i+1) + "." + changed.get(i).list() + System.lineSeparator();
fw.write(temp);
}
fw.close();
}catch(IOException e){
e.printStackTrace();
}
}
/**
*Returns new path indicated.
* */
public void changePath(String newPath){
this.path=newPath;
}
}
| [
"e0260237@u.nus.edu"
] | e0260237@u.nus.edu |
cd77d22775cb65d7a761eb88217cf79de659d532 | 4c3763b4428e02e67ba060c0eddab5b6f59142ed | /projects-for-testing/struts/apps/examples/src/main/java/org/apache/struts/webapp/examples/CustomActionForward.java | 757f1fa549962fabd3b1e1d2b26016ef6d8356be | [] | no_license | FUNCATE/visuwall | f9e1adbd53f93a125b88b825c82b8ef76ef688b9 | f2a43786f6325727ade859e7b038041eebccb32a | refs/heads/master | 2021-01-16T21:57:38.550811 | 2015-06-09T13:58:43 | 2015-06-09T13:58:43 | 37,091,563 | 0 | 0 | null | 2015-06-08T20:40:32 | 2015-06-08T20:40:32 | null | UTF-8 | Java | false | false | 1,725 | java | /*
* $Id: CustomActionForward.java 471754 2006-11-06 14:55:09Z husted $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts.webapp.examples;
import org.apache.struts.action.*;
/**
* Custom ActionForward to demonstrate usage.
*
* @version $Rev: 471754 $ $Date: 2006-11-06 15:55:09 +0100 (Lun, 06 nov 2006) $
*/
public final class CustomActionForward extends ActionForward {
// --------------------------------------------------- Instance Variables
/**
* An example String property.
*/
private String example = "";
// ----------------------------------------------------------- Properties
/**
* Return the example String.
*/
public String getExample() {
return (this.example);
}
/**
* Set the example String.
*
* @param example The new example String.
*/
public void setExample(String example) {
this.example = example;
}
}
| [
"alemaire@norad.fr"
] | alemaire@norad.fr |
6a9006bb0281606305fe641318028824d920db30 | ca51628178f178d7a50a0b62476c771d013d6891 | /src/main/java/com/okada/movie/model/Role.java | 554a776fcc8519f68deb5c32020762d44272bd65 | [] | no_license | ikutarian/ssm-movie | 8fc9b946a349c49998f05061a5bd3e8b299c658c | a601bc67d747022c89c0c7e9f715b48074a574f9 | refs/heads/master | 2020-03-22T03:54:26.807211 | 2018-07-03T13:21:51 | 2018-07-03T13:21:51 | 139,459,477 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 253 | java | package com.okada.movie.model;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;
@Getter
@Setter
public class Role {
private int id;
private String name;
private String auths;
private Date addTime;
}
| [
"saitou0217@outlook.com"
] | saitou0217@outlook.com |
215ed63c69e65f745b4e07cc61ee552e225e738f | 19f7e40c448029530d191a262e5215571382bf9f | /decompiled/instagram/sources/p000X/C20160ue.java | e2ac97c42e5463b29135eb256df556e74ed9f1bb | [] | no_license | stanvanrooy/decompiled-instagram | c1fb553c52e98fd82784a3a8a17abab43b0f52eb | 3091a40af7accf6c0a80b9dda608471d503c4d78 | refs/heads/master | 2022-12-07T22:31:43.155086 | 2020-08-26T03:42:04 | 2020-08-26T03:42:04 | 283,347,288 | 18 | 1 | null | null | null | null | UTF-8 | Java | false | false | 245 | java | package p000X;
/* renamed from: X.0ue reason: invalid class name and case insensitive filesystem */
public final class C20160ue implements C05110Id {
public final Object AF7(AnonymousClass0C1 r2) {
return new C20150ud(r2);
}
}
| [
"stan@rooy.works"
] | stan@rooy.works |
84ac3926ace863eb52fff2d7d1192233d522ef7b | d88c98a13bac735a0319ad9028d9d2e4f2ea511a | /src/main/java/jxl/read/biff/SharedBooleanFormulaRecord.java | 48a78fc1911a73b04640d7be5a5c859b3c961228 | [] | no_license | minishow/wechat | a1c482fddfc90030e26499016ab974de9eaf3e8a | db915c7db525b924a0647f72f38aa3c74ca208b5 | refs/heads/master | 2021-08-08T10:03:36.438672 | 2017-11-07T13:58:17 | 2017-11-07T13:58:17 | 110,126,944 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,653 | java | /*********************************************************************
*
* Copyright (C) 2005 Andrew Khan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.read.biff;
import jxl.BooleanCell;
import jxl.BooleanFormulaCell;
import jxl.CellType;
import jxl.biff.FormattingRecords;
import jxl.biff.FormulaData;
import jxl.biff.IntegerHelper;
import jxl.biff.WorkbookMethods;
import jxl.biff.formula.ExternalSheet;
import jxl.biff.formula.FormulaException;
import jxl.biff.formula.FormulaParser;
import jxl.common.Logger;
/**
* A shared boolean formula record
*/
public class SharedBooleanFormulaRecord extends BaseSharedFormulaRecord
implements BooleanCell, FormulaData, BooleanFormulaCell
{
/**
* The logger
*/
private static Logger logger =
Logger.getLogger(SharedBooleanFormulaRecord.class);
/**
* The boolean value of this cell. If this cell represents an error,
* this will be false
*/
private boolean value;
/**
* Constructs this number
*
* @param t the data
* @param excelFile the excel biff data
* @param v the value
* @param fr the formatting records
* @param es the external sheet
* @param nt the name table
* @param si the sheet
*/
public SharedBooleanFormulaRecord(Record t,
File excelFile,
boolean v,
FormattingRecords fr,
ExternalSheet es,
WorkbookMethods nt,
SheetImpl si)
{
super(t, fr, es, nt, si, excelFile.getPos());
value = v;
}
/**
* Interface method which Gets the boolean value stored in this cell. If
* this cell contains an error, then returns FALSE. Always query this cell
* type using the accessor method isError() prior to calling this method
*
* @return TRUE if this cell contains TRUE, FALSE if it contains FALSE or
* an error code
*/
public boolean getValue()
{
return value;
}
/**
* Returns the numerical value as a string
*
* @return The numerical value of the formula as a string
*/
public String getContents()
{
// return Boolean.toString(value) - only available in 1.4 or later
return (new Boolean(value)).toString();
}
/**
* Returns the cell type
*
* @return The cell type
*/
public CellType getType()
{
return CellType.BOOLEAN_FORMULA;
}
/**
* Gets the raw bytes for the formula. This will include the
* parsed tokens array. Used when copying spreadsheets
*
* @return the raw record data
* @exception FormulaException
*/
public byte[] getFormulaData() throws FormulaException
{
if (!getSheet().getWorkbookBof().isBiff8())
{
throw new FormulaException(FormulaException.BIFF8_SUPPORTED);
}
// Get the tokens, taking into account the mapping from shared
// formula specific values into normal values
FormulaParser fp = new FormulaParser
(getTokens(), this,
getExternalSheet(), getNameTable(),
getSheet().getWorkbook().getSettings());
fp.parse();
byte[] rpnTokens = fp.getBytes();
byte[] data = new byte[rpnTokens.length + 22];
// Set the standard info for this cell
IntegerHelper.getTwoBytes(getRow(), data, 0);
IntegerHelper.getTwoBytes(getColumn(), data, 2);
IntegerHelper.getTwoBytes(getXFIndex(), data, 4);
data[6] = (byte) 1;
data[8] = (byte) (value == true ? 1 : 0);
data[12] = (byte) 0xff;
data[13] = (byte) 0xff;
// Now copy in the parsed tokens
System.arraycopy(rpnTokens, 0, data, 22, rpnTokens.length);
IntegerHelper.getTwoBytes(rpnTokens.length, data, 20);
// Lop off the standard information
byte[] d = new byte[data.length - 6];
System.arraycopy(data, 6, d, 0, data.length - 6);
return d;
}
}
| [
"admin@hao123.com"
] | admin@hao123.com |
3c61127d2b5870fccccb899fdf83f89e56104f63 | d576eec7a44f71f81cc73962a3f1d2608137887f | /fm-framework/src/main/java/com/fmarslan/framework/model/ResponseModel.java | d13b821f0c31e6d6a227c9c428c3cfe7f6b85e8b | [
"Apache-2.0"
] | permissive | fmarslan/fm-framework | 08e2af42b7c6a408f795546e4674ff9681e140e2 | cce7c22ce5096c478b7ea4ce92bdf25e0002d7d5 | refs/heads/master | 2020-03-30T09:57:16.934145 | 2019-03-15T21:09:17 | 2019-03-15T21:09:17 | 151,099,446 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,307 | java | package com.fmarslan.framework.model;
import java.io.PrintWriter;
import java.io.Serializable;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
public class ResponseModel<RESULT> implements Serializable {
private static final long serialVersionUID = 3078620160805824308L;
private Throwable exception;
private RESULT data;
private String message;
private Map<String,Object> params;
public RESULT getData() {
return data;
}
public void setData(RESULT data) {
this.data = data;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public void setException(Throwable exception) {
this.exception = exception;
}
public Map<String, String> getException() {
if (exception == null)
return null;
Map<String, String> map = new HashMap<>();
map.put("Message", exception.getMessage());
map.put("Type", exception.getClass().getName());
StringWriter writer = new StringWriter();
PrintWriter printWriter= new PrintWriter(writer);
exception.printStackTrace(printWriter);
map.put("StackTrace", writer.toString());
return map;
}
public Map<String, Object> getParams() {
return params;
}
public void setParams(Map<String, Object> params) {
this.params = params;
}
}
| [
"iletisim@fmarslan.com"
] | iletisim@fmarslan.com |
26c6e277abfb4fa38e47b163423261c4ba7d4a1a | f46216c830f69d30fd43a84011ffdd5eeace9913 | /src/main/java/com/jongsuny/monitor/hostChecker/config/HostControllerAdvice.java | f5a6b3ab35b20ff92dc4dfab758254b81fcb264d | [] | no_license | 666lucy999/hostChecker-1 | 8b73e2cba5f91a8eff924a908a74bbe48396d463 | bb7888f45c59df6aff27aad7008c42abe41073f2 | refs/heads/master | 2022-01-20T07:18:40.456122 | 2018-02-01T02:33:15 | 2018-02-01T02:33:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 652 | java | package com.jongsuny.monitor.hostChecker.config;
import com.jongsuny.monitor.hostChecker.domain.ServiceConfig;
import com.jongsuny.monitor.hostChecker.service.ConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;
import java.util.List;
@ControllerAdvice
public class HostControllerAdvice {
@Autowired
private ConfigService configService;
@ModelAttribute("serviceConfigList")
public List<ServiceConfig> getBuildNumber() {
return configService.listServiceConfig();
}
}
| [
"jinjinzhe@jd.com"
] | jinjinzhe@jd.com |
78441e186688fa878beb8c9b2f6b573f92e303cb | c29fe44abc78482ca4c297162d2ba2fa8d531036 | /src/main/java/web/CategoryDeleteServlet.java | df96d6367ab11fe4044b14fbb573da3e9164627b | [] | no_license | Saw6Bdx/BankAppWeb1.0 | 13564908d802acdabd9f15c863b6fe32a4f15c49 | 2b0b7cece6630c549c73d80d7cdf1a2631f3eb13 | refs/heads/master | 2021-01-23T05:04:31.741620 | 2017-06-14T14:40:35 | 2017-06-14T14:40:35 | 92,954,088 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,578 | 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 web;
import biz.manager.CategoryMgr;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author Guest
*/
@WebServlet("/deleteCategory")
public class CategoryDeleteServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@EJB
CategoryMgr categoryManager;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
req.getRequestDispatcher("/WEB-INF/jsp/deleteCategory.jsp").forward(req, resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
try {
this.categoryManager.delete(req.getParameter("categoryId"));
} catch (IllegalStateException ex) {
Logger.getLogger(CategoryDeleteServlet.class.getName()).log(Level.SEVERE, null, ex);
}
resp.sendRedirect(req.getContextPath() + "/displayCategories?holderId=" + Integer.parseInt(req.getParameter("holderId")) + "&accountId=" + Integer.parseInt(req.getParameter("accountId")));
}
}
| [
"mary.mondn@gmail.com"
] | mary.mondn@gmail.com |
b8944edb1c02ceffa869ddc5d2bf0cc924bea1e7 | a91e96955e85c8cd94a93045911887e7c9ea21ab | /modules/mall/mall-service/src/main/java/com/lebaoxun/modules/mall/controller/MallProductSpecificationController.java | e33945bac7986477c6c4ab3187d6f70bfc04d103 | [] | no_license | caiqianyi/yashua | 89d17300580b74108643d2b770510ad484131a6a | 4f0a35101ca7d973d5de392a3a64f34f70bbb704 | refs/heads/master | 2021-06-08T02:13:24.967350 | 2019-08-09T08:14:39 | 2019-08-09T08:14:39 | 137,161,884 | 0 | 1 | null | 2021-04-22T16:52:56 | 2018-06-13T04:18:36 | JavaScript | UTF-8 | Java | false | false | 3,191 | java | package com.lebaoxun.modules.mall.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.lebaoxun.modules.mall.entity.MallProductSpecificationEntity;
import com.lebaoxun.modules.mall.service.MallProductSpecificationService;
import com.lebaoxun.commons.utils.PageUtils;
import com.lebaoxun.commons.exception.ResponseMessage;
import com.lebaoxun.soa.core.redis.lock.RedisLock;
/**
* 商品规格表
*
* @author caiqianyi
* @email 270852221@qq.com
* @date 2018-07-12 19:57:12
*/
@RestController
public class MallProductSpecificationController {
@Autowired
private MallProductSpecificationService mallProductSpecificationService;
/**
* 列表
*/
@RequestMapping("/mall/mallproductspecification/list")
ResponseMessage list(@RequestParam Map<String, Object> params){
PageUtils page = mallProductSpecificationService.queryPage(params);
return ResponseMessage.ok(page);
}
@RequestMapping("/mall/mallproductspecification/queryByProductId")
List<MallProductSpecificationEntity> queryByProductId(@RequestParam("productId")Long productId){
return mallProductSpecificationService.queryByProductId(productId);
}
/**
* 信息
*/
@RequestMapping("/mall/mallproductspecification/info/{productSpecId}")
ResponseMessage info(@PathVariable("productSpecId") Long productSpecId){
MallProductSpecificationEntity mallProductSpecification = mallProductSpecificationService.selectById(productSpecId);
return ResponseMessage.ok().put("mallProductSpecification", mallProductSpecification);
}
/**
* 保存
*/
@RequestMapping("/mall/mallproductspecification/save")
@RedisLock(value="mall:mallproductspecification:save:lock:#arg0")
ResponseMessage save(@RequestParam("adminId")Long adminId,@RequestBody MallProductSpecificationEntity mallProductSpecification){
mallProductSpecificationService.save(mallProductSpecification);
return ResponseMessage.ok();
}
/**
* 修改
*/
@RequestMapping("/mall/mallproductspecification/update")
@RedisLock(value="mall:mallproductspecification:update:lock:#arg0")
ResponseMessage update(@RequestParam("adminId")Long adminId,@RequestBody MallProductSpecificationEntity mallProductSpecification){
mallProductSpecificationService.update(mallProductSpecification);
return ResponseMessage.ok();
}
/**
* 删除
*/
@RequestMapping("/mall/mallproductspecification/delete")
@RedisLock(value="mall:mallproductspecification:delete:lock:#arg0")
ResponseMessage delete(@RequestParam("adminId")Long adminId,@RequestBody Long[] productSpecIds){
mallProductSpecificationService.deleteBatchIds(Arrays.asList(productSpecIds));
return ResponseMessage.ok();
}
}
| [
"270852221@qq.com"
] | 270852221@qq.com |
dd053cc6c7e9675b5565f43ff0a51ec231a11bc9 | d59ffa0745f4f940dcce64121044f15d76d14785 | /core/src/main/java/me/retrodaredevil/solarthing/packets/handling/implementations/StringPacketHandler.java | f618d66dfe3347e4f10c76872ad00ee415ac6dd1 | [
"MIT"
] | permissive | CapnJackOff/solarthing | d9990318d5c76fc9a2afb98a91b9b3d2ab86d7a7 | c77bc800bf0bc47d520d7d4886b3c0502cc278bc | refs/heads/master | 2021-04-22T20:41:50.765486 | 2020-12-25T22:33:30 | 2020-12-25T22:33:30 | 268,702,374 | 0 | 0 | MIT | 2020-06-02T04:40:32 | 2020-06-02T04:40:31 | null | UTF-8 | Java | false | false | 241 | java | package me.retrodaredevil.solarthing.packets.handling.implementations;
import me.retrodaredevil.solarthing.packets.collection.PacketCollection;
public interface StringPacketHandler {
String getString(PacketCollection packetCollection);
}
| [
"retrodaredevil@gmail.com"
] | retrodaredevil@gmail.com |
ff5ba79cf3e5ce503c64a678db48f41b5673423f | a589ba1c533c9aa17332c522007788e9d2b795c7 | /mard-ws/src/main/java/com/vnsw/ws/p14/message/DNYeuCauSuaHS.java | 3818828b1daf36df47e8ac55073fb1e7cf8225ab | [] | no_license | tandaica0612/MARDJAVA | b241aa9e1000feb81c25533d73336960f2e286da | f709dc5f02ecc82474bad09ca25f8110860d57bb | refs/heads/master | 2023-03-22T15:36:58.721471 | 2020-10-17T06:32:07 | 2020-10-17T06:32:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,389 | java | package com.vnsw.ws.p14.message;
import com.vnsw.ws.annotations.DateSerialization;
import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/***
*
*
* @Model
* @class DNYeuCauSuaHS
* Created by Nguyen Van Quang
* 05/12/2018 17:45:19
*
*/
@XmlRootElement(name = "MedicinePPRequestEdit")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(propOrder = { "fiRequestDate", "fiReason", "fiApplicationNo", "fiNameOfRegistration", "fiAddressOfRegistration", "fiPhone", "fiEmail", "fiFax", "fiTaxCode", "fiGoods", "fiPurposes", "fiPurposeOtherNote", "fiToxicityUsed", "fiTestingUsed", "fiGates", "fiImportTimeFrom", "fiImportTimeTo", "fiAttachment"})
public class DNYeuCauSuaHS {
public DNYeuCauSuaHS() {}
@XmlJavaTypeAdapter(DateSerialization.class)
@XmlElement(name = "RequestDate", required = true)
private Date fiRequestDate;
@XmlElement(name = "Reason", required = true)
private String fiReason;
@XmlElement(name = "ApplicationNo", required = true)
private String fiApplicationNo;
@XmlElement(name = "NameOfRegistration", required = true)
private String fiNameOfRegistration;
@XmlElement(name = "AddressOfRegistration", required = true)
private String fiAddressOfRegistration;
@XmlElement(name = "Phone")
private String fiPhone;
@XmlElement(name = "Email")
private String fiEmail;
@XmlElement(name = "Fax")
private String fiFax;
@XmlElement(name = "TaxCode", required = true)
private String fiTaxCode;
@XmlElementWrapper(name = "GoodsList")
@XmlElement(name = "Goods", required = true)
private List<Goods> fiGoods;
@XmlElement(name = "Purposes", required = true)
private String fiPurposes;
@XmlElement(name = "PurposeOtherNote")
private String fiPurposeOtherNote;
@XmlElement(name = "ToxicityUsed")
private String fiToxicityUsed;
@XmlElement(name = "TestingUsed")
private String fiTestingUsed;
@XmlElement(name = "Gates", required = true)
private String fiGates;
@XmlJavaTypeAdapter(DateSerialization.class)
@XmlElement(name = "ImportTimeFrom")
private Date fiImportTimeFrom;
@XmlJavaTypeAdapter(DateSerialization.class)
@XmlElement(name = "ImportTimeTo", required = true)
private Date fiImportTimeTo;
@XmlElementWrapper(name = "AttachmentList")
@XmlElement(name = "Attachment", required = true)
private List<Attachment> fiAttachment;
public Date getFiRequestDate() {
return this.fiRequestDate;
}
public void setFiRequestDate(Date fiRequestDate) {
this.fiRequestDate = fiRequestDate;
}
public String getFiReason() {
return this.fiReason;
}
public void setFiReason(String fiReason) {
this.fiReason = fiReason;
}
public String getFiApplicationNo() {
return this.fiApplicationNo;
}
public void setFiApplicationNo(String fiApplicationNo) {
this.fiApplicationNo = fiApplicationNo;
}
public String getFiNameOfRegistration() {
return this.fiNameOfRegistration;
}
public void setFiNameOfRegistration(String fiNameOfRegistration) {
this.fiNameOfRegistration = fiNameOfRegistration;
}
public String getFiAddressOfRegistration() {
return this.fiAddressOfRegistration;
}
public void setFiAddressOfRegistration(String fiAddressOfRegistration) {
this.fiAddressOfRegistration = fiAddressOfRegistration;
}
public String getFiPhone() {
return this.fiPhone;
}
public void setFiPhone(String fiPhone) {
this.fiPhone = fiPhone;
}
public String getFiEmail() {
return this.fiEmail;
}
public void setFiEmail(String fiEmail) {
this.fiEmail = fiEmail;
}
public String getFiFax() {
return this.fiFax;
}
public void setFiFax(String fiFax) {
this.fiFax = fiFax;
}
public String getFiTaxCode() {
return this.fiTaxCode;
}
public void setFiTaxCode(String fiTaxCode) {
this.fiTaxCode = fiTaxCode;
}
public List<Goods> getFiGoods() {
return this.fiGoods;
}
public void setFiGoods(List<Goods> fiGoods) {
this.fiGoods = fiGoods;
}
public String getFiPurposes() {
return this.fiPurposes;
}
public void setFiPurposes(String fiPurposes) {
this.fiPurposes = fiPurposes;
}
public String getFiPurposeOtherNote() {
return this.fiPurposeOtherNote;
}
public void setFiPurposeOtherNote(String fiPurposeOtherNote) {
this.fiPurposeOtherNote = fiPurposeOtherNote;
}
public String getFiToxicityUsed() {
return this.fiToxicityUsed;
}
public void setFiToxicityUsed(String fiToxicityUsed) {
this.fiToxicityUsed = fiToxicityUsed;
}
public String getFiTestingUsed() {
return this.fiTestingUsed;
}
public void setFiTestingUsed(String fiTestingUsed) {
this.fiTestingUsed = fiTestingUsed;
}
public String getFiGates() {
return this.fiGates;
}
public void setFiGates(String fiGates) {
this.fiGates = fiGates;
}
public Date getFiImportTimeFrom() {
return this.fiImportTimeFrom;
}
public void setFiImportTimeFrom(Date fiImportTimeFrom) {
this.fiImportTimeFrom = fiImportTimeFrom;
}
public Date getFiImportTimeTo() {
return this.fiImportTimeTo;
}
public void setFiImportTimeTo(Date fiImportTimeTo) {
this.fiImportTimeTo = fiImportTimeTo;
}
public List<Attachment> getFiAttachment() {
return this.fiAttachment;
}
public void setFiAttachment(List<Attachment> fiAttachment) {
this.fiAttachment = fiAttachment;
}
@Override
public String toString() {
return "DNYeuCauSuaHS [" +
"fiRequestDate=" + fiRequestDate + "," +
"fiReason=" + fiReason + "," +
"fiApplicationNo=" + fiApplicationNo + "," +
"fiNameOfRegistration=" + fiNameOfRegistration + "," +
"fiAddressOfRegistration=" + fiAddressOfRegistration + "," +
"fiPhone=" + fiPhone + "," +
"fiEmail=" + fiEmail + "," +
"fiFax=" + fiFax + "," +
"fiTaxCode=" + fiTaxCode + "," +
"fiGoods=" + fiGoods + "," +
"fiPurposes=" + fiPurposes + "," +
"fiPurposeOtherNote=" + fiPurposeOtherNote + "," +
"fiToxicityUsed=" + fiToxicityUsed + "," +
"fiTestingUsed=" + fiTestingUsed + "," +
"fiGates=" + fiGates + "," +
"fiImportTimeFrom=" + fiImportTimeFrom + "," +
"fiImportTimeTo=" + fiImportTimeTo + "," +
"fiAttachment=" + fiAttachment + "]";
}
} | [
"phongpv2@vnpt.vn"
] | phongpv2@vnpt.vn |
2acf3b51f57194923cd1bc2fcf88ff0ba7c9ac61 | 6c2a5ed29e6e1aac1e07584cd7aea4af290ce66b | /src/it/uniroma1/textadv/luoghi/Room.java | c90d3e19238b00d7b0bfed4cbffae1528bca0a69 | [] | no_license | AP71/ZakGame | 930c36d07f4a02352aec94bc16a47f121928b583 | 16c6e2ea5c17bbaca23cf3f585714de8dd378eee | refs/heads/main | 2023-07-19T03:01:43.838265 | 2021-09-20T19:53:25 | 2021-09-20T19:53:25 | 408,580,399 | 0 | 0 | null | null | null | null | IBM852 | Java | false | false | 7,625 | java | package it.uniroma1.textadv.luoghi;
import java.util.ArrayList;
import java.lang.reflect.InvocationTargetException;
import it.uniroma1.textadv.links.*;
import it.uniroma1.textadv.entity.*;
import it.uniroma1.textadv.errors.*;
import it.uniroma1.textadv.gameEngine.*;
import it.uniroma1.textadv.gameEngine.Movimento.Direzione;
import it.uniroma1.textadv.objects.*;
import it.uniroma1.textadv.luoghi.Room;
/**
* Rappresenta la classe della stanza.
*
* @param <T> tipo dei link/stanze comunicanti.
*/
public class Room<T> {
/**
* Nome della stanza.
*/
private final String nome;
/**
* Descrizione della stanza.
*/
private final String descrizione;
/**
* Oggetti presenti nella stanza.
*/
private final ArrayList<Oggetto> oggetti = new ArrayList<>();
/**
* EntitÓ presenti nella stanza.
*/
private final ArrayList<Entita> entita = new ArrayList<>();
/**
* Riga di testo con i nomi delle istanze comunicanti.
*/
private String link;
/**
* Istanza comunicante a nord.
*/
private T nord = null;
/**
* Istanza comunicante a sud.
*/
private T sud = null;
/**
* Istanza comunicante ad est.
*/
private T est = null;
/**
* Istanza comunicante ad ovest.
*/
private T ovest = null;
/**
* Istanzia una stanza con il nome e la descrizione passati in input.
* @param nome nome della stanza.
* @param descrizione descrizione della stanza.
*/
public Room(String nome, String descrizione) { this.nome = nome; this.descrizione = descrizione; }
/**
* Aggiunge un'istanza alla stanza.
* @param t istanza da aggiungere.
*/
public void add(T t)
{
if (t.getClass().getPackageName().equals("it.uniroma1.textadv.objects")) oggetti.add((Oggetto) t);
else if (t.getClass().getPackageName().equals("it.uniroma1.textadv.entity")) entita.add((Entita) t);
}
/**
* Memorizza la riga del file contenente i nomi delle istanze comunicanti.
* @param link riga di testo.
*/
public void setLink(String link) { this.link = link; }
/**
* Restituisce la riga di testo con i nomi delle istanze comunicanti.
* @return riga di testo.
*/
public String getLink() { return link; }
/**
* Imposta la comunicazione con il nord.
* @param l Link/Room.
*/
public void setNord(T l) { nord = l; }
/**
* Imposta la comunicazione con il sud.
* @param l Link/Room.
*/
public void setSud(T l) { sud = l; }
/**
* Imposta la comunicazione con l'est.
* @param l Link/Room.
*/
public void setEst(T l) { est = l; }
/**
* Imposta la comunicazione con l'ovest.
* @param l Link/Room.
*/
public void setOvest(T l) { ovest = l; }
/**
* Restituisce la comunicazione con il nord.
* @return Link/Room.
*/
public T getNord() { return nord; }
/**
* Restituisce la comunicazione con il sud.
* @return Link/Room.
*/
public T getSud() { return sud; }
/**
* Restituisce la comunicazione con l'est.
* @return Link/Room.
*/
public T getEst() { return est; }
/**
* Restituisce la comunicazione con l'ovest.
* @return Link/Room.
*/
public T getOvest() { return ovest; }
/**
* Rimuove un'istanza dalla stanza se presente, altrimenti lancia un'eccezione.
* @param instance istanza da rimuovere.
* @throws EntityNotFoundException eccezione istanza non trovata.
*/
public void deleteFromRoom(T instance) throws EntityNotFoundException
{
if (oggetti.contains(instance)) oggetti.remove(instance);
else if (entita.contains(instance)) entita.remove(instance);
else throw new EntityNotFoundException();
}
/**
* Stampa a video la descrizione della stanza.
*/
public void descrivi()
{
System.out.println(Traduttore.get("[descrivi1]") + nome);
System.out.println(Traduttore.get("[descrivi2]") + descrizione);
System.out.println(Traduttore.get("[descrivi3]"));
oggetti.stream().forEach(s -> System.out.println("\t"+s));
System.out.println(Traduttore.get("[descrivi4]"));
entita.stream().forEach(s -> System.out.println("\t"+s));
System.out.println(Traduttore.get("[descrivi5]"));
if (nord!=null) System.out.println("\t"+Traduttore.get("[direzione1]")+"\t"+nord.toString());
if (sud!=null) System.out.println("\t"+Traduttore.get("[direzione2]")+"\t"+sud.toString());
if (est!=null) System.out.println("\t"+Traduttore.get("[direzione3]")+"\t"+est.toString());
if (ovest!=null) System.out.println("\t"+Traduttore.get("[direzione4]")+"\t"+ovest.toString());
}
/**
* Restituisce true se l'istanza Ŕ presente nella stanza come oggetto/entita/link/stanza.
* @param t istanza da cercare.
* @return true o false.
*/
public boolean contains(T t)
{
if (t==null) return false;
if (t.getClass().getPackageName().equals("it.uniroma1.textadv.objects"))
for(Oggetto oggetto:oggetti)
if (oggetto.equals(t)) return true;
if (t.getClass().getPackageName().equals("it.uniroma1.textadv.entity"))
for(Entita entita:entita)
if (entita.equals(t)) return true;
if (nord!=null && checkCollegamento(nord, t)) return true;
if (sud!=null && checkCollegamento(sud, t)) return true;
if (est!=null && checkCollegamento(est, t)) return true;
if (ovest!=null && checkCollegamento(ovest, t)) return true;
return false;
}
/**
* Prende in input l'istanza corrispondente alla direzione e un'istanza. Restituisce true se i valori corrispondono.
* @param direzione direzione(nord/sud/est/ovest).
* @param instance istanza da cercare.
* @return true o false.
*/
private boolean checkCollegamento(T direzione,T instance)
{
return direzione.equals(instance);
}
/**
* Restituisce true se la stanza contiene un'istanza del tipo passato in input.
* @param c tipo da cercare.
* @return true o false.
*/
public boolean containsClass(Class c)
{
for(Entita obj:entita) if (obj.getClass().equals(c)) return true;
for(Oggetto obj:oggetti) if (obj.getClass().equals(c)) return true;
return false;
}
/**
* Prende in input un'altra stanza, rimuove il giocatore dall'istanza e lo aggiunge alla nuova stanza.
* @param nuovaStanza stanza in cui spostare il giocatore.
*/
public void muovi(Room nuovaStanza)
{
this.entita.remove(Giocatore.getInstance());
nuovaStanza.add(Giocatore.getInstance());
Giocatore.getInstance().muoviEntita(nuovaStanza);
System.out.println(Traduttore.get("[muovi]")+Giocatore.getInstance().getRoom().toString());
}
/**
* Restituisce l'istanza corrispondente al tipo della classe passato in input.
* @param classe tipo della classe da cercare.
* @return istanza corrispondente alla classe.
*/
public Entita getEntityFromClass(Class classe)
{
for(Entita e:entita)
if (e.getClass().equals(classe))
return e;
return null;
}
/**
* Restituisce il nome della stanza.
*/
@Override
public String toString()
{
return nome;
}
/**
* Restituisce il valore hashCode dell'istanza.
* @return hashCode dell'oggetto.
*/
@Override
public int hashCode() {
int result = 17;
result = 31 * result + nome.hashCode();
result = 31 * result + descrizione.hashCode();
result = 31 * result + link.hashCode();
return result;
}
/**
* Restituisce true se l'oggetto passato in input Ŕ uguale all'istanza che ha invocato il metodo.
* @param obj oggetto da controllare.
* @return true se l'istanza e l'oggetto sono uguale, false altrimenti.
*/
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (this.hashCode() == obj.hashCode()) return true;
if (!getClass().equals(obj.getClass())) return false;
if (!this.toString().equals(obj.toString())) return false;
return false;
}
}
| [
"flypilot.51@gmail.com"
] | flypilot.51@gmail.com |
eed500b1f078a8d11e2ed338199bf769838dbda7 | 5a132ee9a1c2cc935e7fe280ada4518ea41ff156 | /app/src/main/java/com/github/vasiliz/vkclient/login/ILoginView.java | 8be218a1ef6c43f0631fbe774c9ea093863302c9 | [] | no_license | VasiliZ/VKClient | 1654fa47a1d6db08dabd27e006c6c1e54d329fc6 | 32a0a56e75156430a448fd4dd1ad0710c0e0229e | refs/heads/master | 2020-04-23T21:14:05.670904 | 2019-06-17T09:41:53 | 2019-06-17T09:41:53 | 171,446,339 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 252 | java | package com.github.vasiliz.vkclient.login;
import com.github.vasiliz.vkclient.mymvp.VkBaseView;
public interface ILoginView extends VkBaseView {
void saveToken(String pUrl);
void checkLogin();
String getToken();
void reAuth();
}
| [
"zaicev.vasili@gmail.com"
] | zaicev.vasili@gmail.com |
78f06bca1aa7b33eee5f37ea837fd8b9248e9679 | 046185cd525bc07c974988fa1d0a0d555f60132c | /app/src/main/java/com/willowtree/notahitlist/presenter/BasePresenter.java | be289d516cebe8bdde7c783df4f5c0993ae8e35b | [] | no_license | Richie97/Protobuf-Android-Demo | 111b154b1d4cec0fc2f4d3f4aaa6bb565079b3c9 | 8363be91f9063256024ec29fb3440967260dbdb8 | refs/heads/master | 2021-01-17T16:56:24.207564 | 2016-06-08T21:38:23 | 2016-06-08T21:38:23 | 60,732,480 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 835 | java | package com.willowtree.notahitlist.presenter;
import android.os.Bundle;
import android.support.annotation.NonNull;
public interface BasePresenter {
/**
* Should be called by the view when the state of a previous view restores
*
* @param savedInstanceState the saved state
*/
void onRestoreState(@NonNull Bundle savedInstanceState);
/**
* Should be called by the view every time it starts
*
* @param firstStart is it the first start?
*/
void onStart(boolean firstStart);
/**
* Should be called by the view every time it stops
*/
void onStop();
/**
* Should be called by the view before being destroyed to save its current state
*
* @param outState bundle to put data into
*/
void onSaveInstanceState(@NonNull Bundle outState);
}
| [
"eric.richardson97@gmail.com"
] | eric.richardson97@gmail.com |
11dcaf8488407ef12b851b0594aae88645ff2844 | e8e3eae0cfe4a8ef9e808c885c863470ba51ca1b | /src/main/java/com/example/demo/model/ClientDTO.java | 77a161e2b9c804d62c2dca03ddca0b424d1bf409 | [] | no_license | Nguyenphuc0406/demo-deploy-jenkins | aa804d75dd6250e373d6f28b13f978ac415cdda1 | bf93391c731d9f33e7ccf72dce64a668a817ac3e | refs/heads/master | 2023-02-24T12:52:43.342456 | 2021-01-22T02:46:43 | 2021-01-22T02:46:43 | 329,786,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 237 | java | package com.example.demo.model;
import lombok.Data;
@Data
public class ClientDTO {
private int clientId;
private String clientName;
private String clientAmount;
private String clientPhone;
private int partnerId;
}
| [
"thuctap@ViettelGroup.ViettelAD.com"
] | thuctap@ViettelGroup.ViettelAD.com |
c5e9b89a4b68c799e2eace8fbf08c4e56c6232e9 | 6101fc52d3230a1174f25725c77764b582caafb7 | /src/main/java/io/jboot/web/attachment/LocalAttachmentContainer.java | 6c83862b630fda1c390ed9e5f86a3441555d8820 | [
"Apache-2.0"
] | permissive | 280455936/jboot | dcb35906e17c14a087c6f39f515293efda12036d | 5ef3f41e5b38b880111dd6bdd1a7111abea614a2 | refs/heads/master | 2023-02-18T06:06:51.871112 | 2021-01-11T07:35:19 | 2021-01-11T07:35:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,061 | java | /**
* Copyright (c) 2015-2021, Michael Yang 杨福海 (fuhai999@gmail.com).
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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 io.jboot.web.attachment;
import com.jfinal.ext.kit.DateKit;
import com.jfinal.kit.LogKit;
import io.jboot.utils.FileUtil;
import io.jboot.utils.StrUtil;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
/**
* @author michael yang (fuhai999@gmail.com)
*/
public class LocalAttachmentContainer implements AttachmentContainer {
private String rootPath;
private String targetPrefix;
public LocalAttachmentContainer() {
LocalAttachmentContainerConfig config = LocalAttachmentContainerConfig.getInstance();
this.rootPath = config.getRootPath();
this.targetPrefix = config.getTargetPrefix();
}
/**
* @param rootPath
* @param targetPrefix 不能以 / 开头
*/
public LocalAttachmentContainer(String rootPath, String targetPrefix) {
this.rootPath = rootPath;
this.targetPrefix = targetPrefix;
}
@Override
public String saveFile(File file) {
File newfile = newRandomFile(FileUtil.getSuffix(file.getName()));
if (!newfile.getParentFile().exists()) {
newfile.getParentFile().mkdirs();
}
try {
org.apache.commons.io.FileUtils.moveFile(file, newfile);
newfile.setReadable(true, false);
} catch (IOException e) {
LogKit.error(e.toString(), e);
}
String attachmentRoot = getRootPath();
return FileUtil.removePrefix(newfile.getAbsolutePath(), attachmentRoot);
}
@Override
public String saveFile(File file, String toRelativePath) {
File toFile = new File(getRootPath(), toRelativePath);
try {
//相同的文件,不需要做任何处理
if (file.getCanonicalPath().equals(toFile.getCanonicalPath())){
return toRelativePath;
}
if (!toFile.getParentFile().exists()) {
toFile.getParentFile().mkdirs();
}
org.apache.commons.io.FileUtils.moveFile(file, toFile);
toFile.setReadable(true, false);
} catch (IOException e) {
LogKit.error(e.toString(), e);
}
return toRelativePath;
}
@Override
public String saveFile(InputStream inputStream, String toRelativePath) {
File toFile = new File(getRootPath(), toRelativePath);
if (toFile.exists()){
toFile.delete();
}
if (!toFile.getParentFile().exists()) {
toFile.getParentFile().mkdirs();
}
FileOutputStream fOutStream = null;
try {
fOutStream = new FileOutputStream(toFile);
byte[] buffer = new byte[1024];
int len;
while ((len = inputStream.read(buffer)) > -1) {
fOutStream.write(buffer, 0, len);
}
} catch (IOException e) {
LogKit.error(e.toString(), e);
} finally {
FileUtil.close(fOutStream, inputStream);
}
return toRelativePath;
}
@Override
public boolean deleteFile(String relativePath) {
File file = getFile(relativePath);
return file != null && file.delete();
}
public File newRandomFile(String suffix) {
String rootPath = getRootPath();
StringBuilder newFileName = new StringBuilder(rootPath).append(targetPrefix)
.append(File.separator).append(DateKit.toStr(new Date(), "yyyyMMdd"))
.append(File.separator).append(StrUtil.uuid())
.append(suffix);
return new File(newFileName.toString());
}
@Override
public File getFile(String relativePath) {
return new File(getRootPath(), relativePath);
}
@Override
public String getRelativePath(File file) {
String rootPath = getRootPath();
String filePath = file.getAbsolutePath();
return filePath.startsWith(rootPath)
? filePath.substring(rootPath.length())
: filePath;
}
public String getRootPath() {
return rootPath;
}
public void setRootPath(String rootPath) {
this.rootPath = rootPath;
}
public String getTargetPrefix() {
return targetPrefix;
}
public void setTargetPrefix(String targetPrefix) {
this.targetPrefix = targetPrefix;
}
}
| [
"fuhai999@gmail.com"
] | fuhai999@gmail.com |
e274ad0460595b6abe9b62e5633a470d738c8474 | 1edf8412fae3c3f47959aa8a8c858a170d790b1d | /src/main/java/photographer/Main.java | 9a1fde586a8c9aa775f440c7e9955222ebc9f375 | [] | no_license | LittleSaya/photographer | 7171b4c9fb0dcc88683e95d422d27fb0bfb6d58b | f3dcb19abbff0e78b0a7ef5ee49368113ab5df22 | refs/heads/master | 2022-07-10T16:42:02.484379 | 2019-07-07T15:16:37 | 2019-07-07T15:16:37 | 195,665,588 | 0 | 0 | null | 2022-06-17T02:18:31 | 2019-07-07T15:12:08 | Java | UTF-8 | Java | false | false | 3,864 | java | package photographer;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
public class Main {
public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS");
System.out.println("===produce frame, time: " + sdf.format(new Date()));
// 生成视频图片
// 读取配置文件
JSONObject conf = JSONObject.parseObject(SysHelper.readFile(args[0], "UTF-8"));
// 随机选择一个番剧,再随机选择番剧中的一集
String videoBaseDir = conf.getString("videoBaseDir");
JSONArray animeList = conf.getJSONArray("animeList");
int animeIndex = new Double(Math.floor(Math.random() * animeList.size())).intValue();
JSONObject anime = animeList.getJSONObject(animeIndex);
String animeDir = anime.getString("animeDir");
String animeName = anime.getString("animeName");
JSONArray episodeList = anime.getJSONArray("episodeList");
int episodeIndex = new Double(Math.floor(Math.random() * episodeList.size())).intValue();
JSONObject episode = episodeList.getJSONObject(episodeIndex);
String episodeFile = episode.getString("episodeFile");
String episodeName = episode.getString("episodeName");
String videoLocation = videoBaseDir + animeDir + episodeFile;
System.out.println("video location: " + videoLocation);
// 使用 ffprobe 获取该视频的开始时间与长度
String ffprobeLocation = conf.getString("ffprobeLocation");
String ffprobeCmd = ffprobeLocation + " -print_format ini -show_format " + videoLocation;
String ffprobeResult = SysHelper.execCmd(ffprobeCmd);
int startTimeIndex = ffprobeResult.indexOf("start_time=") + "start_time=".length();
String startTimeStr = ffprobeResult.substring(startTimeIndex, ffprobeResult.indexOf('\n', startTimeIndex));
double startTime = Double.valueOf(startTimeStr);
int durationIndex = ffprobeResult.indexOf("duration=") + "duration=".length();
String durationStr = ffprobeResult.substring(durationIndex, ffprobeResult.indexOf('\n', durationIndex));
double duration = Double.valueOf(durationStr);
System.out.println("start time: " + startTime);
System.out.println("duration: " + duration);
// 使用 ffmpeg 截取视频中的随机帧
double frameTime = Math.random() * duration + startTime;
String ffmpegLocation = conf.getString("ffmpegLocation");
String outputPicName = conf.getString("outputDir") + "out.png";
String ffmpegCmd = ffmpegLocation + " -ss " + frameTime + " -i " + videoLocation + " -frames 1 -pix_fmt rgb24 -y " + outputPicName;
SysHelper.execCmd(ffmpegCmd);
System.out.println("anime name: " + animeName);
System.out.println("episode name: " + episodeName);
System.out.println("frame time: " + frameTime);
System.out.println("===post to QQZone, time: " + sdf.format(new Date()));
// 将图片po到QQ空间
String albumName = conf.getJSONArray("animeList").getJSONObject(animeIndex).getString("remoteAlbumName");
if (conf.getString("browser").equals("chrome")) {
photographer.poster.chrome.QZone.postToQZone(
animeName, episodeName, formatSec(frameTime),
outputPicName,
conf,
albumName);
} else if (conf.getString("browser").equals("firefox")) {
photographer.poster.firefox.QZone.postToQZone(
animeName, episodeName, formatSec(frameTime),
outputPicName,
conf,
albumName);
}
}
public static String formatSec(double sec) {
Integer m = new Double(Math.floor(sec / 60)).intValue();
Integer s = new Double(Math.floor(sec - 60 * m)).intValue();
//Integer S = new Double((sec - 60 * m - s) * 1000).intValue();
return pad(m.toString()) + "分" + pad(s.toString()) + "秒";
}
public static String pad(String s) {
return (s.length() == 1 ? "0" + s : s);
}
}
| [
"littlesaya@outlook.com"
] | littlesaya@outlook.com |
ec934ebe9a668b755fae4a6c14bd48058adc3e92 | b13bdd48969152a04bc477392baa21b2638b9a8a | /src/main/java/seedu/address/logic/parser/ChangeThemeCommandParser.java | 1e4eb08d77f249fc31795858505de365e0db8a8e | [
"MIT"
] | permissive | TomatoCream/main | 67b6f8592d3dd3aafae19dd81b316332efd6cf30 | f4fa00729a144f44087855c78da46e9edce3cb6e | refs/heads/master | 2021-04-06T06:40:54.820250 | 2018-04-15T12:12:34 | 2018-04-15T12:12:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,842 | java | package seedu.address.logic.parser;
import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_THEME;
import java.util.stream.Stream;
import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.logic.commands.ChangeThemeCommand;
import seedu.address.logic.parser.exceptions.ParseException;
//@@author yong-jie
/**
* Parses input arguments and returns a new ChangeThemeCommand object
*/
public class ChangeThemeCommandParser implements Parser<ChangeThemeCommand> {
/**
* Parses the given {@code String} of arguments in the context of the ChangeThemeCommand
* and returns an ChangeThemeCommand object for execution.
* @throws ParseException if the user input does not conform the expected format
*/
@Override
public ChangeThemeCommand parse(String userInput) throws ParseException {
ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(userInput, PREFIX_THEME);
if (!arePrefixesPresent(argMultimap, PREFIX_THEME)) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangeThemeCommand.MESSAGE_USAGE));
}
try {
Integer theme = ParserUtil.parseTheme(argMultimap.getValue(PREFIX_THEME));
return new ChangeThemeCommand(theme);
} catch (IllegalValueException ive) {
throw new ParseException(ive.getMessage(), ive);
}
}
/**
* Returns true if none of the prefixes contains empty {@code Optional} values in the given
* {@code ArgumentMultimap}.
*/
private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {
return Stream.of(prefixes).allMatch(prefix -> argumentMultimap.getValue(prefix).isPresent());
}
}
| [
"jethrokuan95@gmail.com"
] | jethrokuan95@gmail.com |
d74d6ddc4f6181736f296a54d1321350318e853b | 6625818ee691e98c8f565ac694ae6d30b029c809 | /src/main/java/ru/net/arh/utils/validation/annotation/CheckForNullResult.java | d930b96a5676349a642d6cb628fd983fd2571e0a | [] | no_license | anpotashev/restaurant | 3be6d3c5ed9c37079172434095ec8bc719376fc4 | 54a9186360a47cb183367cb9ba1670b5bcfbe437 | refs/heads/master | 2021-09-05T03:14:49.032023 | 2018-01-23T22:17:19 | 2018-01-23T22:17:19 | 112,100,019 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 450 | java | package ru.net.arh.utils.validation.annotation;
import org.springframework.http.HttpStatus;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface CheckForNullResult {
String message() default "Not found entity with this key";
HttpStatus status();
}
| [
"anpotashev@hotmail.com"
] | anpotashev@hotmail.com |
27c3d704e64c06754641c0a446a5076c4079a028 | da4432b0d6d3c5e72635437e46d3d8caba1459ee | /src/com/atginfo/Main.java | 1c13eeb25a54b046ea9995097a5bdab46f1d41b8 | [] | no_license | paustint/error_handling_example | e2a0e5d0237bce38cade2d788ee2198b2fc858e3 | 41508eed5636cf3ccce4c0b80010da9c28dbc3b8 | refs/heads/master | 2021-01-10T05:29:19.163161 | 2016-01-03T17:49:21 | 2016-01-03T17:49:21 | 48,955,101 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,751 | java | package com.atginfo;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.Session;
import com.jcraft.jsch.SftpException;
import java.io.*;
public class Main {
public static void main(String[] args) {
// Try block to attempt to connect to server
try {
// Get connection to server, { Address, username, password, port }
Session session = FtpUtility.getSftpSession("ftp.myserver.com", "username", "password", 22);
//Download file from server and save locally { session, server_filename, local_filename }
FtpUtility.getSftpFile(session, "20151101_daily_amount_file.csv", "temp_local_file.csv");
} catch (JSchException e) {
// ERROR CONNECTING TO SERVER
// TAKE SOME ACTION
} catch (SftpException e) {
// ERROR DOWNLOADING FILE
// TAKE SOME ACTION
}
//// Read File
try {
BufferedReader fileReader = FileUtility.getFileReader("temp_local_file.csv");
String line = null;
while((line = fileReader.readLine()) != null) {
String[] values = line.split(",");
try {
// Parse integer value from amount field
Double amount = Double.parseDouble(values[5]);
// Option 1 - Force Exception
if (amount < 0 ) {
// FORCE BUSINESS RULE
throw new AmountLessThanZeroBusinessRuleFailure();
}
//Option 2 - Take action within if block
if (amount < 0 ) {
// FORCE BUSINESS RULE
// Send email with line information
// Create log entry
// Do fun stuff!
}
// TODO
// Calculate new amount
//Add amount to Line
// Save file to server
/////////////////////// EXCEPTIONS //////////////////////////////////////////////
} catch (NumberFormatException e) {
//AMOUNT IS NOT AN DECIMAL NUMBER
//TAKE SOME ACTION
} catch (AmountLessThanZeroBusinessRuleFailure amountLessThanZeroBusinessRuleFailure) {
// Send email with line information
// Create log entry
// Do fun stuff!
}
}
} catch (FileNotFoundException e) {
// FILE NOT FOUND
// TAKE SOME ACTION
} catch (IOException e) {
// FILE COULD NOT BE READ
// TAKE SOME ACTION
}
}
}
| [
"austin.turner@atginfo.com"
] | austin.turner@atginfo.com |
1af7fd4c3215f211124aab72e3ecf44b7132a434 | ca4c5c903e56dfd8226da3266aa437a0eec65b82 | /app/src/main/java/com/luiztorres/desafio_mobile_android/presentation/ui/listrepositories/di/modules/ListRepositoriesModule.java | b7a5833c50b1e1cbbdc907586e69da915dc2960c | [] | no_license | luizgtorres/desafio-mobile-android | 2166873a5670313735771080c75e8cd143eafe88 | 048754b62f27b255187ac96f91436f659ba30c6e | refs/heads/master | 2020-04-19T04:32:42.625236 | 2019-01-28T13:21:37 | 2019-01-28T13:21:37 | 167,965,555 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,071 | java | package com.luiztorres.desafio_mobile_android.presentation.ui.listrepositories.di.modules;
import com.luiztorres.desafio_mobile_android.domain.usecase.ListRepositoriesUseCase;
import com.luiztorres.desafio_mobile_android.presentation.di.scopes.PerView;
import com.luiztorres.desafio_mobile_android.presentation.ui.listrepositories.ListRepositoriesContract;
import com.luiztorres.desafio_mobile_android.presentation.ui.listrepositories.ListRepositoriesPresenter;
import dagger.Module;
import dagger.Provides;
/**
* Created by Dindal on 10-Nov-17.
*/
@Module
public class ListRepositoriesModule {
ListRepositoriesContract.View view;
public ListRepositoriesModule(ListRepositoriesContract.View view) {
this.view = view;
}
@Provides
@PerView
public ListRepositoriesContract.Presenter providesPresenter(ListRepositoriesUseCase listRepositoriesUseCase) {
ListRepositoriesContract.Presenter presenter = new ListRepositoriesPresenter(listRepositoriesUseCase);
presenter.attachView(view);
return presenter;
}
}
| [
"luiz.gustavo@fulllab.com.br"
] | luiz.gustavo@fulllab.com.br |
432bc3ea7de11bc662182e61547d282bb0e28631 | 327d615dbf9e4dd902193b5cd7684dfd789a76b1 | /base_source_from_JADX/sources/com/google/android/gms/internal/ads/zzdnj.java | 8aee65fec21ee5155db8fcb113ab157a74da04c5 | [] | no_license | dnosauro/singcie | e53ce4c124cfb311e0ffafd55b58c840d462e96f | 34d09c2e2b3497dd452246b76646b3571a18a100 | refs/heads/main | 2023-01-13T23:17:49.094499 | 2020-11-20T10:46:19 | 2020-11-20T10:46:19 | 314,513,307 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 243 | java | package com.google.android.gms.internal.ads;
public final class zzdnj {
public final zzdne zzhij;
public final zzdnh zzhik;
public zzdnj(zzdne zzdne, zzdnh zzdnh) {
this.zzhij = zzdne;
this.zzhik = zzdnh;
}
}
| [
"dno_sauro@yahoo.it"
] | dno_sauro@yahoo.it |
43e310f62513d12fc099fc78407e82a88d2fea03 | 155a7ac9fe0a8b6297427b6e1b236929d023de4d | /SQLTable/src/main/java/com/yasya/sqltable/MainActivity.java | 87297932afddee85193686eb6d9536f65acabc66 | [] | no_license | Vishnya91/SQLTable | f5526e2193ab44b2725adb2f1db39a394581c0ed | 2b97681293030ec46c175e53ee7f5ee0c5fa05ca | refs/heads/master | 2016-09-03T02:10:28.176692 | 2013-10-30T13:53:55 | 2013-10-30T13:53:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,283 | java | package com.yasya.sqltable;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.database.Cursor;
import android.graphics.Color;
import android.os.Bundle;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.Toast;
import java.util.ArrayList;
public class MainActivity extends Activity {
DBAdapter adapter;
private static final int ACTIVITY_CREATE = 0;
private static final int ACTIVITY_EDIT = 1;
protected Object mActionMode;
private ArrayList<MyTableRow> rows = new ArrayList<MyTableRow>();
private ArrayList<View> divider = new ArrayList<View>();
TableLayout table;
MyTableRow row;
private static final int DIVIDER_SIZE = 1;
View dividerRow2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setOrientation();
adapter = new DBAdapter(this);
adapter.open();
adapter.deleteAll();
}
private void setOrientation() {
int orientation = this.getResources().getConfiguration().orientation;
switch (orientation) {
case Configuration.ORIENTATION_PORTRAIT:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
break;
case Configuration.ORIENTATION_LANDSCAPE:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
break;
}
}
private void addRow() {
table = (TableLayout) findViewById(R.id.table);
row = new MyTableRow(this);
dividerRow2 = new View(this);
dividerRow2.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT,
DIVIDER_SIZE));
dividerRow2.setBackgroundColor(Color.BLACK);
table.addView(row, new TableLayout.LayoutParams(
TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
table.addView(dividerRow2);
Toast.makeText(this, "Table has " + table.getChildCount(),
Toast.LENGTH_SHORT).show();
row.setOnLongClickListener(new View.OnLongClickListener() {
// Called when the user long-clicks on someView
public boolean onLongClick(View view) {
if (mActionMode != null) {
return false;
}
// Start the CAB using the ActionMode.Callback defined above
mActionMode = MainActivity.this.startActionMode(mActionModeCallback);
view.setSelected(true);
return true;
}
});
rows.add(row);
divider.add(dividerRow2);
Intent i = new Intent(this, DialogActivity.class);
startActivityForResult(i, ACTIVITY_CREATE);
}
private void editRow() {
for (TableRow r : rows) {
MyTableRow row = (MyTableRow) r;
if (row.isSelected()) {
int id = row.getID();
Intent i = new Intent(this, DialogActivity.class);
i.putExtra(DBAdapter.KEY_ROWID, id);
startActivityForResult(i, ACTIVITY_EDIT);
}
}
}
private void deleteRow() {
for (TableRow r : rows) {
MyTableRow row = (MyTableRow) r;
if (row.isSelected()) {
int rowID = row.getID();
adapter.deleteRow(rowID);
table.removeView(row);
// table.removeViewAt(row.getId());
table.removeView(dividerRow2);
}
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_add:
addRow();
return true;
case R.id.action_read:
readFromDB();
return true;
case R.id.action_clear:
adapter.deleteAll();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private ActionMode.Callback mActionModeCallback = new ActionMode.Callback() {
// Called when the action mode is created; startActionMode() was called
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
// Inflate a menu resource providing context menu items
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.context_menu, menu);
return true;
}
// Called each time the action mode is shown. Always called after onCreateActionMode, but
// may be called multiple times if the mode is invalidated.
@Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
return false; // Return false if nothing is done
}
// Called when the user selects a contextual menu item
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
switch (item.getItemId()) {
case R.id.action_delete:
deleteRow();
mode.finish(); // Action picked, so close the CAB
return true;
case R.id.action_edit:
editRow();
mode.finish(); // Action picked, so close the CAB
return true;
default:
return false;
}
}
// Called when the user exits the action mode
@Override
public void onDestroyActionMode(ActionMode mode) {
mActionMode = null;
}
};
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (resultCode == RESULT_OK) {
int rowId = 0;
int id = intent.getIntExtra("id", rowId);
MyTableRow currentRow = rows.get(rows.size() - 1);
String last = intent.getStringExtra("last");
String first = intent.getStringExtra("first");
String age = intent.getStringExtra("age");
String street = intent.getStringExtra("street");
currentRow.setID(String.valueOf(id));
currentRow.setLast(last);
currentRow.setFirst(first);
currentRow.setAge(age);
currentRow.setStreet(street);
}
if (resultCode == RESULT_CANCELED) {
table.removeView(rows.get(rows.size() - 1));
table.removeView(divider.get(divider.size() - 1));
}
}
private void readFromDB() {
clearTable();
Cursor cursor = adapter.fetchAll();
if (cursor.moveToFirst()) {
do {
table = (TableLayout) findViewById(R.id.table);
row = new MyTableRow(this);
dividerRow2 = new View(this);
dividerRow2.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT,
DIVIDER_SIZE));
dividerRow2.setBackgroundColor(Color.BLACK);
table.addView(row, new TableLayout.LayoutParams(
TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
table.addView(dividerRow2);
Toast.makeText(this, "Table has " + table.getChildCount(),
Toast.LENGTH_SHORT).show();
row.setOnLongClickListener(new View.OnLongClickListener() {
// Called when the user long-clicks on someView
public boolean onLongClick(View view) {
if (mActionMode != null) {
return false;
}
// Start the CAB using the ActionMode.Callback defined above
mActionMode = MainActivity.this.startActionMode(mActionModeCallback);
view.setSelected(true);
return true;
}
});
rows.add(row);
String id = cursor.getString(cursor
.getColumnIndexOrThrow(DBAdapter.KEY_ROWID));
String last = cursor.getString(cursor
.getColumnIndexOrThrow(DBAdapter.KEY_LAST));
String first = cursor.getString(cursor
.getColumnIndexOrThrow(DBAdapter.KEY_FIRST));
String age = cursor.getString(cursor
.getColumnIndexOrThrow(DBAdapter.KEY_AGE));
String street = cursor.getString(cursor
.getColumnIndexOrThrow(DBAdapter.KEY_STREET));
row.setID(id);
row.setLast(last);
row.setFirst(first);
row.setAge(age);
row.setStreet(street);
} while (cursor.moveToNext());
} else
cursor.close();
}
private void clearTable() {
if (rows.size() > 0) {
for (int i = 0; i < rows.size(); i++)
table.removeView(rows.get(i));
}
if (divider.size() > 0) {
for (int i = 0; i < divider.size(); i++)
table.removeView(divider.get(i));
}
// View child = table.getChildAt(i);
// if (child instanceof TableRow) ((ViewGroup) child).removeAllViews();
rows.clear();
divider.clear();
}
@Override
protected void onDestroy() {
super.onDestroy();
if (adapter != null) {
adapter.close();
}
}
}
| [
"yasyaklio@gmail.com"
] | yasyaklio@gmail.com |
103e0da98f2794d1ca045484484477ef79c3f6b8 | 7cd3bc854f2ac99d12d880284a5db7b771ead6a6 | /clown-common/src/main/java/cn/clown/common/bean/Val.java | 7172fbccc695ca25a31a98a85f166ca20d28ba9f | [] | no_license | zrzrzrzrzr/GraduationProject | bdb92317e538c3d1bb38586b7b21a30a5aa4db37 | b9a4c1b07c565420d54ab8392eb2fca9b06dd212 | refs/heads/master | 2023-01-30T12:54:41.073998 | 2020-12-07T14:50:29 | 2020-12-07T14:50:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 360 | java | package cn.clown.common.bean;
/**
* 值对象接口
* 实现值接口可以设置值和获取值
*
* @author clown
*/
public interface Val {
/**
* 设置值
*
* @param val 值属性
*/
public void setValue(Object val);
/**
* 获取值
*
* @return 返回Object的值
*/
public Object getValue();
}
| [
"3406869297@qq.com"
] | 3406869297@qq.com |
9be79a05b0fd5665119570aa61c8ce2cbf5d37d1 | 06be741a3f063aae45f47a48cac9ca4025c9b20c | /Picture.java | 2800b5afa7cf64e80ebe77a5586f3d870f38d072 | [] | no_license | makuta2/CSE8A-PSA5 | f50940f846be326ce24ba6532d594d2288cae4a3 | 6a791b33a3616fb2a16338c02adbed7c74114ba7 | refs/heads/master | 2020-07-04T10:55:31.475422 | 2016-11-17T22:01:26 | 2016-11-17T22:01:26 | 74,071,323 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,662 | java | /* Filename: Picture.java
* Created by: Nick Lin, cs8a and Robert Tso, cs8a
* Date: 11/3/16
*/
/*----------- Program Description: ------------
* chromakeyBackgroundChange: changes the background greenscreen to a picture we choose.
* chromakeyShirtChange: changes the shirt(or a box) to a picture we choose.
*/
import java.awt.*;
import java.awt.font.*;
import java.awt.geom.*;
import java.awt.image.BufferedImage;
import java.text.*;
import java.util.*;
import java.util.List;
import java.lang.*;
import java.awt.Color;// resolves problem with java.awt.List and java.util.List
/**
* A class that represents a picture. This class inherits from
* SimplePicture and allows the student to add functionality to
* the Picture class.
*
* Copyright Georgia Institute of Technology 2004-2005
* @author Barbara Ericson ericson@cc.gatech.edu
*/
public class Picture extends SimplePicture
{
///////////////////// constructors //////////////////////////////////
/**
* Constructor that takes no arguments
*/
public Picture ()
{
/* not needed but use it to show students the implicit call to super()
* child constructors always call a parent constructor
*/
super();
}
/**
* Constructor that takes a file name and creates the picture
* @param fileName the name of the file to create the picture from
*/
public Picture(String fileName)
{
// let the parent class handle this fileName
super(fileName);
}
/**
* Constructor that takes the width and height
* @param width the width of the desired picture
* @param height the height of the desired picture
*/
public Picture(int width, int height)
{
// let the parent class handle this width and height
super(width,height);
}
/**
* Constructor that takes a picture and creates a
* copy of that picture
*/
public Picture(Picture copyPicture)
{
// let the parent class do the copy
super(copyPicture);
}
/**
* Constructor that takes a buffered image
* @param image the buffered image to use
*/
public Picture(BufferedImage image)
{
super(image);
}
////////////////////// methods ///////////////////////////////////////
/**
* Method to return a string with information about this picture.
* @return a string with information about the picture such as fileName,
* height and width.
*/
public String toString()
{
String output = "Picture, filename " + getFileName() +
" height " + getHeight()
+ " width " + getWidth();
return output;
}
/**
* Replaces the monocolored background of the original picture with the sample picture
*/
public Picture chromakeyBackgroundChange(Picture background, Color replaceColor)
{
Picture modified = this;
Pixel sourcePixel = null;
Pixel targetPixel = null;
int targetx=0;
int targety=0;
sourcePixel = background.getPixel(targetx, targety);
for(targetx = 0; targetx < this.getWidth(); targetx++)
{
for(targety = 0; targety < this.getHeight(); targety++)
{
targetPixel = this.getPixel(targetx, targety);
if(Math.abs(targetPixel.getRed()-replaceColor.getRed())<65)
{
if(Math.abs(targetPixel.getGreen()-replaceColor.getGreen())<60)
{
if(Math.abs(targetPixel.getBlue()-replaceColor.getBlue())<90)
sourcePixel = background.getPixel(targetx, targety);
targetPixel.setColor(sourcePixel.getColor());
}
}
}
}
return modified;
}
/**
* changes the given shirt color into the given sample
*/
public Picture chromakeyShirtChange(Picture shirt, Picture original, Color oldShirtColor, int startX, int startY, int width, int height)
{
Picture modified = this;
Pixel sourcePixel = null;
Pixel targetPixel = null;
Pixel referencePixel = null;
for(int targetx = startX; targetx < startX+width; targetx++)
{
for(int targety = startY; targety < startY+height; targety++)
{
targetPixel = this.getPixel(targetx, targety);
referencePixel = original.getPixel(targetx, targety);
sourcePixel = shirt.getPixel(targetx, targety);
if (targetPixel.colorDistance(oldShirtColor)<100)
{
if(referencePixel.getRed() == targetPixel.getRed())
{
if(referencePixel.getGreen() == targetPixel.getGreen())
{
if(referencePixel.getBlue() == targetPixel.getBlue())
sourcePixel = shirt.getPixel(targetx, targety);
targetPixel.setColor(sourcePixel.getColor());
}
}
}
}
}
return modified;
}
}
// this } is the end of class Picture, put all new methods before this
| [
"noreply@github.com"
] | noreply@github.com |
bccc9e6e25ec28c710cc34156eb899c9d493fb9b | acd0b996a73769b319a93075f7debf92e2988f00 | /src/main/java/com/una/muni/controllers/Control_Department.java | 37b14bf9f217134d193c41fb93b10c6436e332a4 | [] | no_license | ness24931/DocTrack | 9176a979431b5e228ae7a52057688e8bfe9dda55 | 762412c4cec0cd593173b8f9819964f86bd63529 | refs/heads/master | 2023-01-21T15:33:22.452900 | 2020-11-27T10:51:31 | 2020-11-27T10:51:31 | 294,990,278 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,576 | java | package com.una.muni.controllers;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.una.muni.entitys.t_departments;
import com.una.muni.model.TDepartment;
import com.una.muni.repository.t_departmentsRepository;
@CrossOrigin(origins = "http://localhost:3000", maxAge = 3600)
@RestController
@RequestMapping(value = "t_departments/", consumes = MediaType.ALL_VALUE)
public class Control_Department {
@Autowired
private t_departmentsRepository repo;
//
// @PostMapping(value = "validate")
// public ResponseEntity<t_departments> validate(@ModelAttribute t_departments t_departments) {
// Optional<t_departments> d = repo.findById(t_departments.getDepartment_id());
// if (d.isPresent()) {
// return new ResponseEntity<t_departments>(repo.findById(t_departments.getDepartment_id()).get(), HttpStatus.OK);
// } else {
// return new ResponseEntity<>(HttpStatus.NOT_FOUND);
// }
// }
//
@RequestMapping(value = "listar",method = RequestMethod.POST)
public List<TDepartment> listar() {
List<TDepartment> list = new ArrayList<>();
var ite = repo.findAll();
ite.forEach(e -> list.add(e));
return list;
}
//
// @PostMapping(value = "delete")
// public ResponseEntity<Object> delete(@ModelAttribute t_departments department) {
// repo.deleteById(department.getDepartment_id());
// if (repo.findById(department.getDepartment_id()).isEmpty()) {
// return new ResponseEntity<>(HttpStatus.OK);
// } else {
// return new ResponseEntity<>(HttpStatus.NOT_FOUND);
// }
// }
//
// @PostMapping(value = "insert")
// public ResponseEntity<Object> insert(@ModelAttribute t_departments t_departments) {
// repo.save(t_departments);
// if (repo.findById(t_departments.getDepartment_id()).isPresent()) {
// return new ResponseEntity<>(HttpStatus.OK);
// } else {
// return new ResponseEntity<>(HttpStatus.NOT_FOUND);
// }
// }
//
// @PostMapping(value = "update")
// public ResponseEntity<Object> update(@ModelAttribute t_departments t_departments) {
// repo.save(t_departments);
// if (repo.findById(t_departments.getDepartment_id()).isPresent()) {
// return new ResponseEntity<>(HttpStatus.OK);
// } else {
// return new ResponseEntity<>(HttpStatus.NOT_FOUND);
// }
// }
}
| [
"ness_199348@hotmail.com"
] | ness_199348@hotmail.com |
251834bdfb073b224b6d3c3e397d7e716a64fd2b | a221d479bc7bf70536ba2f8e40c497f3f7506e9b | /spring-boot-reactive-web/src/main/java/com/thepracticaldeveloper/reactiveweb/domain/OpportunityDetails.java | f116eb62f54c1472ae0f1a338e66ca86703a23a0 | [] | no_license | jaglinsub/SpringBootMongoDBDemo | 83fac88bac79104ec4b8a6515292db4b236a0a13 | 5c09ff4f044f261f0d035b1512ad9f321bf3ce60 | refs/heads/master | 2022-01-27T10:50:55.146317 | 2020-02-17T21:44:29 | 2020-02-17T21:44:29 | 209,205,993 | 0 | 0 | null | 2022-01-06T20:36:35 | 2019-09-18T03:08:27 | Java | UTF-8 | Java | false | false | 4,312 | java | package com.thepracticaldeveloper.reactiveweb.domain;
import org.bson.types.Binary;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Arrays;
@Document(collection = "OpportunityDetails")
public final class OpportunityDetails {
private String id;
private String opportunityDtlsName;
private String organizationImage;
private String organizationURL;
private String typeofProfOppurtunity;
private String workLength;
private String workHours;
private String recommendations;
private String schoolAttendance;
private String gpaScore;
private String oppurtunityLongDescription;
// private QualificationDetails[] qualificationDetails;
private String[] qualificationDetails;
// Empty constructor is needed for Jackson to deserialize JSON
public OpportunityDetails() {
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getOpportunityDtlsName() {
return opportunityDtlsName;
}
public void setOpportunityDtlsName(String opportunityDtlsName) {
this.opportunityDtlsName = opportunityDtlsName;
}
public String getOrganizationImage() {
return organizationImage;
}
public void setOrganizationImage(String organizationImage) {
this.organizationImage = organizationImage;
}
public String getOrganizationURL() {
return organizationURL;
}
public void setOrganizationURL(String organizationURL) {
this.organizationURL = organizationURL;
}
public String getTypeofProfOppurtunity() {
return typeofProfOppurtunity;
}
public void setTypeofProfOppurtunity(String typeofProfOppurtunity) {
this.typeofProfOppurtunity = typeofProfOppurtunity;
}
public String getWorkLength() {
return workLength;
}
public void setWorkLength(String workLength) {
this.workLength = workLength;
}
public String getWorkHours() {
return workHours;
}
public void setWorkHours(String workHours) {
this.workHours = workHours;
}
public String getRecommendations() {
return recommendations;
}
public void setRecommendations(String recommendations) {
this.recommendations = recommendations;
}
public String getSchoolAttendance() {
return schoolAttendance;
}
public void setSchoolAttendance(String schoolAttendance) {
this.schoolAttendance = schoolAttendance;
}
public String getGpaScore() {
return gpaScore;
}
public void setGpaScore(String gpaScore) {
this.gpaScore = gpaScore;
}
public String getOppurtunityLongDescription() {
return oppurtunityLongDescription;
}
public void setOppurtunityLongDescription(String oppurtunityLongDescription) {
this.oppurtunityLongDescription = oppurtunityLongDescription;
}
public String[] getQualificationDetails() {
return qualificationDetails;
}
public void setQualificationDetails(String[] qualificationDetails) {
this.qualificationDetails = qualificationDetails;
}
@Override
public String toString() {
String retStr = null;
try {
retStr = "OpportunityDetails{" +
"id='" + id + '\'' +
", opportunityDtlsName='" + opportunityDtlsName + '\'' +
", organizationImage='" + organizationImage + '\'' +
", organizationURL='" + organizationURL + '\'' +
", typeofProfOppurtunity='" + typeofProfOppurtunity + '\'' +
", workLength='" + workLength + '\'' +
", workHours='" + workHours + '\'' +
", recommendations='" + recommendations + '\'' +
", schoolAttendance='" + schoolAttendance + '\'' +
", gpaScore='" + gpaScore + '\'' +
", oppurtunityLongDescription='" + oppurtunityLongDescription + '\'' +
// ", qualificationDetails=" + Arrays.toString(qualificationDetails) +
'}';
}
catch (Exception e) {
e.printStackTrace();
}
return retStr;
}
}
| [
"jaglinsub@gmail.com"
] | jaglinsub@gmail.com |
83aac40e5da0182c2a99229e06f50f4481916fc1 | 5827ad79b820defdf5ea2b3cc979c98e8c898145 | /app/src/main/java/edu/quinnipiac/gadacy/ch15_starbuzz/TopLevelActivity.java | 830d28c67e9eadf6849f172ff0836036031df1df | [] | no_license | SER210-SP21/headfirst-ch15-tom-1313 | cf745b12c487f24e8670d12b1fdb3de86a8c1567 | de6ecc48ca1c53e6e6f837e052c1dfd372897cbe | refs/heads/master | 2023-04-02T01:34:43.926136 | 2023-03-30T16:08:55 | 2023-03-30T16:08:55 | 356,751,436 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,277 | java | package edu.quinnipiac.gadacy.ch15_starbuzz;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
public class TopLevelActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_top_level);
AdapterView.OnItemClickListener itemClickListener =
new AdapterView.OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> listView,
View itemView,
int position,
long id) {
if (position == 0) {
Intent intent = new Intent(TopLevelActivity.this,
DrinkCategoryActivity.class);
startActivity(intent);
}
}
};
ListView listView = (ListView) findViewById(R.id.list_options);
listView.setOnItemClickListener(itemClickListener);
}
}
| [
"trgadacy@quinnipiac.edu"
] | trgadacy@quinnipiac.edu |
783f9bc710652287f21708c55d0ab2f3b2739260 | 5c20d9cf0083392a71071a4f7810e33747687f3c | /src/com/damytech/patient/FeedbackDetailActivity.java | 7b7961ba520b86ba246838409af581fecd81ba79 | [] | no_license | ruifeng2357/CockEyeDiagnosis | c4f7e60a0df8033328a6f710c4bdfe27cf60b0ff | e058e6b5f1467dadadb41145129ceab5695474b5 | refs/heads/master | 2016-09-06T04:31:16.107242 | 2015-01-18T07:30:04 | 2015-01-18T07:30:04 | 29,418,939 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,146 | java | package com.damytech.patient;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.*;
import com.damytech.HttpConn.JsonHttpResponseHandler;
import com.damytech.STData.STDiagnDetail;
import com.damytech.commservice.CommMgr;
import com.damytech.utils.GlobalData;
import com.damytech.utils.ResolutionSet;
import com.damytech.utils.SmartImageView.SmartImageView;
import org.json.JSONObject;
public class FeedbackDetailActivity extends Activity {
RelativeLayout mainLayout;
boolean bInitialized = false;
private ImageView imgBack;
private SmartImageView imgPhoto1;
private SmartImageView imgPhoto2;
private TextView lblName;
private TextView lblDate;
private EditText txtFeeback;
private long nID = 0;
private JsonHttpResponseHandler handler = null;
private ProgressDialog dialog;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_feedbackdetail);
nID = getIntent().getLongExtra("UID", 0);
mainLayout = (RelativeLayout)findViewById(R.id.rlFeedbackDetailBack);
mainLayout.getViewTreeObserver().addOnGlobalLayoutListener(
new ViewTreeObserver.OnGlobalLayoutListener() {
public void onGlobalLayout() {
if (bInitialized == false)
{
Rect r = new Rect();
mainLayout.getLocalVisibleRect(r);
ResolutionSet._instance.setResolution(r.width(), r.height());
ResolutionSet._instance.iterateChild(findViewById(R.id.rlFeedbackDetailBack));
bInitialized = true;
}
}
}
);
initComponent();
initHandler();
Runbackground();
}
private void Runbackground()
{
if (nID == 0)
finish();
dialog = ProgressDialog.show(
FeedbackDetailActivity.this,
"",
getString(R.string.waiting),
true,
false,
null);
CommMgr.commService.GetDiagnDetail(handler, (int)GlobalData.GetUID(FeedbackDetailActivity.this), (int)nID);
return;
}
private void initComponent ()
{
imgBack = (ImageView) findViewById(R.id.imgFeedbackDetail_Back);
imgBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
imgPhoto1 = (SmartImageView) findViewById(R.id.imgFeedbackDeatil_Photo1);
imgPhoto2 = (SmartImageView) findViewById(R.id.imgFeedbackDeatil_Photo2);
lblName = (TextView) findViewById(R.id.lblFeedbackDetail_NameValue);
lblDate = (TextView) findViewById(R.id.lblFeedbackDetail_DateValue);
txtFeeback = (EditText) findViewById(R.id.txtFeedbackDetail_ResValue);
return;
}
private void initHandler()
{
handler = new JsonHttpResponseHandler()
{
int result = 0;
@Override
public void onSuccess(JSONObject jsonData)
{
result = 1;
dialog.dismiss();
STDiagnDetail detailInfo = new STDiagnDetail();
long nRet = CommMgr.commService.parseGetDiagnDetail(jsonData, detailInfo);
if (nRet == 0)
{
imgPhoto1.setImageUrl(detailInfo.imgpath1, R.drawable.defaultimgback);
imgPhoto2.setImageUrl(detailInfo.imgpath2, R.drawable.defaultimgback);
lblName.setText(detailInfo.name);
lblDate.setText(detailInfo.diagndate);
txtFeeback.setText(detailInfo.feedback);
}
else if (nRet == 110)
result = -1;
else
result = 2;
}
@Override
public void onFailure(Throwable ex, String exception)
{
}
@Override
public void onFinish()
{
dialog.dismiss();
if (result == 2)
GlobalData.showToast(FeedbackDetailActivity.this, getString(R.string.service_error));
else if (result == -1)
GlobalData.showToast(FeedbackDetailActivity.this, getString(R.string.noexistuser));
else if (result == 0)
GlobalData.showToast(FeedbackDetailActivity.this, getString(R.string.network_error));
if (result != 1)
finish();
}
};
return;
}
}
| [
"ruifeng2357@hotmail.com"
] | ruifeng2357@hotmail.com |
4f8285a52cc11a58a75f65abdfbed4226969ac99 | a389c5615d8c6c0e339348c6a47b83a228bc62df | /loja/src/main/java/br/gama/loja/model/Usuario.java | 5011bf45836ea3d3cd54957b263fe159416244ef | [] | no_license | FabricioGardin/aula10 | 233fbfa761c6158c1d4c51545637de8ee413bc76 | da503bba6940faac9fa95250b68f497733c02035 | refs/heads/master | 2022-12-21T01:01:26.407774 | 2020-08-28T20:34:06 | 2020-08-28T20:34:06 | 291,052,230 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,927 | java | package br.gama.loja.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@Entity
@Table(name= "usuario")
public class Usuario {
@Id // chave primaria
@GeneratedValue(strategy = GenerationType.IDENTITY) //auto-numeração
@Column(name = "id")
private int id;
@Column(name = "nome", length = 100, nullable = false)
private String nome;
@Column(name = "email", length = 100, nullable = false, unique = true)
private String email;
@Column(name = "cpf", length = 20, nullable = false, unique = true)
private String cpf;
@Column(name = "senha", length = 20, nullable = false)
private String senha;
@OneToMany(cascade= CascadeType.ALL, mappedBy = "solicitante")
@JsonIgnoreProperties("solicitante")
private List<Pedido> pedidos;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getCpf() {
return cpf;
}
public void setCpf(String cpf) {
this.cpf = cpf;
}
public String getSenha() {
return senha;
}
public void setSenha(String senha) {
this.senha = senha;
}
public List<Pedido> getPedidos() {
return pedidos;
}
public void setPedidos(List<Pedido> pedidos) {
this.pedidos = pedidos;
}
} | [
"briciolg13@gmail.com"
] | briciolg13@gmail.com |
9ab6b343391bc26fd92eee9cbe8fc63f82dc5abc | 49359f499b7ed1a82a2c8ffca5e4531ff99b4448 | /app/src/test/java/pro/games_box/weatherviewer/ExampleUnitTest.java | 0b563dfc37a9bf857504937b63ced8203fff9146 | [] | no_license | Jokaerro/WeatherViewer | a590653c7564396933fa0c1543a0e5efea2b0b1b | cc80eb029d9cde98bbf6aecaef9c525472b819d5 | refs/heads/master | 2021-01-19T06:22:11.983633 | 2017-04-20T12:02:06 | 2017-04-20T12:02:06 | 87,457,145 | 0 | 0 | null | 2017-04-13T20:39:15 | 2017-04-06T17:35:16 | Java | UTF-8 | Java | false | false | 405 | java | package pro.games_box.weatherviewer;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"korvin7.64@gmail.com"
] | korvin7.64@gmail.com |
b7b408a19d971996c87b2d4dbc3bd36fae6371de | 872d361b39af24b1786ad254a29fad0d028151bf | /src/main/java/mx/pliis/empresas_sindicatos/persistencia/hibernate/dao/empresa/EmpresaHDAO.java | 0a7d2ec8f2eec4fde67cd144da115e67a39f9c2b | [] | no_license | daniel-gc/Proyect_sindic_emp | 6303b1a8034e30d58eb4542c279922fba13ab910 | 577c599acaa4f565c5f7160dbde65be3cd24009d | refs/heads/main | 2023-03-13T17:29:19.603633 | 2021-03-09T07:07:18 | 2021-03-09T07:07:18 | 331,510,953 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 260 | java | package mx.pliis.empresas_sindicatos.persistencia.hibernate.dao.empresa;
import java.util.List;
import mx.pliis.empresas_sindicatos.persistencia.hibernate.entity.EmpresaEntity;
public interface EmpresaHDAO {
public List<EmpresaEntity> getAllEmpresas();
}
| [
"daniel.garciaca-at-967664872311"
] | daniel.garciaca-at-967664872311 |
37c9a8ae9df6476d5976d619cd91cae206a030c5 | 6ac4a44bd3e2891452aa931e143e4dee1f4c4ab0 | /src/main/java/gerrymandering/controller/WhatIfController.java | a810438958a0cc2daebe4d02c5efb25f609610d5 | [
"MIT"
] | permissive | JohnsonLu3/Gerrymandering-Analysis | 2afe0a82dc29db8785037a6b7e855c88687a4eb2 | 760a3c159c443056a9fd8f82102f02251aee5fc0 | refs/heads/master | 2021-08-31T20:39:47.280616 | 2017-12-22T20:08:21 | 2017-12-22T20:08:21 | 115,145,206 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,057 | java | package gerrymandering.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import gerrymandering.api.ApiResponse;
import gerrymandering.model.District;
import gerrymandering.model.GeoJson;
import gerrymandering.model.State;
import gerrymandering.model.SuperDistrict;
import gerrymandering.service.GeoRenderingService;
import gerrymandering.service.WhatIfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.wololo.geojson.Feature;
import org.wololo.geojson.FeatureCollection;
import org.wololo.geojson.GeoJSONFactory;
import org.wololo.jts2geojson.GeoJSONReader;
import java.io.File;
import java.io.IOException;
import java.util.List;
/**
* Created by yisuo on 11/12/17.
*/
@Controller
public class WhatIfController {
@Autowired
WhatIfService whatIfService;
@Autowired
GeoRenderingService geoRenderingService;
GeoJSONReader reader = new GeoJSONReader();
@RequestMapping(value = "/whatif", method = RequestMethod.GET)
public String whatif(){
return "whatif";
}
@RequestMapping(value = "/superdistrict/validate", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public ApiResponse validateSuperdistrict(
@RequestParam("state") String state,
@RequestParam("year") Integer year,
@RequestBody Feature superdistrict)
{
SuperDistrict sd = geoRenderingService.buildSuperdistrict(superdistrict);
List<District> districts = whatIfService.selectDistricts(superdistrict, state, year);
sd.setDistricts(districts);
return new ApiResponse(true, whatIfService.runHR3057Measures(sd, year));
}
@RequestMapping(value = "/combineDistrictsAuto", method = RequestMethod.POST)
@ResponseBody
public GeoJson combineDistrictsAuto(@RequestParam String stateName){
return null;
}
@RequestMapping(value = "/combineDistrictsManual", method = RequestMethod.POST)
@ResponseBody
public GeoJson combineDistrictsManual(@RequestParam String stateName,
@RequestParam List<String> districts){
return null;
}
@RequestMapping(value = "/saveCompletedWork", method = RequestMethod.POST)
@ResponseBody
public GeoJson saveCompletedWork(@RequestParam String stateName,
@RequestParam Integer year,
@RequestBody FeatureCollection features){
return null;
}
@RequestMapping(value = "/loadCompletedWorks", method = RequestMethod.GET)
@ResponseBody
public List<GeoJson> loadCompletedWorks(@RequestParam Integer numItems){
return null;
}
@RequestMapping(value = "/downloadWork", method = RequestMethod.GET)
@ResponseBody
public File downloadWork(@RequestParam State state){
return null;
}
}
| [
"yi.suo@stonybrook.edu"
] | yi.suo@stonybrook.edu |
cfff80fdbbe481fd5074da0e637fdbf1c3811b42 | ed7a04cb88209796941ae2feb0fdb213fc29da71 | /src/main/java/org/laukvik/trainer/exercise/ExerciseTree.java | a34f6fc7a4509fb9cff796d468e8c6d891c0d90d | [] | no_license | laukvik/Trainer | 1fd483e170a683bb5c5cbde15aaf38945aa61d23 | 591cbd22c65c55d75065a4d350dff78e96c739ba | refs/heads/master | 2020-06-30T01:19:10.000951 | 2014-04-26T15:45:27 | 2014-04-26T15:45:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,934 | java | package org.laukvik.trainer.exercise;
import java.util.Locale;
import javax.swing.JTree;
import javax.swing.event.TreeModelEvent;
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
import org.laukvik.swing.locale.LocaleListener;
import org.laukvik.trainer.anatomy.Part;
import org.laukvik.trainer.anatomy.muscle.Muscle;
import org.laukvik.trainer.journal.Journal;
public class ExerciseTree extends JTree implements ExerciseListener, LocaleListener {
private static final long serialVersionUID = 1L;
private ExerciseTreeModel model;
private Journal journal;
private ExerciseTreeRenderer renderer;
public ExerciseTree(){
super();
this.journal = new Journal();
this.renderer = new ExerciseTreeRenderer();
setRootVisible( false );
setCellRenderer( renderer );
getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION );
}
public void setJournal( Journal journal ){
this.journal = journal;
renderer.loadJournal( journal );
model = new ExerciseTreeModel( journal );
setCellRenderer( renderer );
setModel( model );
}
public void log( Object message ){
// System.out.println( ExerciseTree.class.getName() + ": " + message );
}
public void exerciseAdded( Exercise exercise ) {
log( "exerciseAdded" );
TreePath pathMuscle = new TreePath( new Object[]{ journal, exercise.getMuscle() });
model.treeStructureChanged( new TreeModelEvent( journal, pathMuscle ) );
TreePath pathExercise = new TreePath( new Object[]{ journal, exercise.getMuscle(), exercise });
getSelectionModel().setSelectionPath( pathExercise );
makeVisible( pathExercise );
}
public void exerciseChanged( Exercise exercise ) {
Muscle muskel = exercise.getMuscle();
Part underGruppe = muskel.getPart();
Part hovedGruppe = underGruppe.getParent();
TreePath path = new TreePath( new Object[]{ journal, hovedGruppe, underGruppe, muskel });
int [] childIndices = { childIndex };
Object [] children = { exercise };
/* Update exercise node */
model.treeNodesChanged( new TreeModelEvent( this, path, childIndices, children ) );
}
/**
* Fires when an exercise was removed
*
*/
public void exerciseRemoved( Exercise exercise, Muscle muscle ) {
Muscle muskel = exercise.getMuscle();
Part underGruppe = muskel.getPart();
Part hovedGruppe = underGruppe.getParent();
TreePath path = new TreePath( new Object[]{ journal, hovedGruppe, underGruppe, muskel });
int [] childIndices = { childIndex };
Object [] children = { exercise };
model.treeNodesRemoved( new TreeModelEvent( this, path, childIndices, children ) );
int [] childIndices2 = { 0 };
Object [] children2 = { underGruppe };
/* Update Muscle node (the parent) */
model.treeNodesChanged( new TreeModelEvent( this, path.getParentPath(), childIndices2, children2 ) );
}
int childIndex = -1;
public void setChildIndice( int index ){
log( "Setting child indices: " + index );
this.childIndex = index;
}
public void exercisesRemoved( Exercise[] exercises ) {
}
public void exerciseChangedMuscle( Exercise exercise, Muscle fromMuscle, Muscle toMusle) {
log( "exerciseChangedMuscle" );
TreePath pathFrom = new TreePath( new Object[]{ journal, fromMuscle });
model.treeStructureChanged( new TreeModelEvent( journal, pathFrom ) );
TreePath pathTo = new TreePath( new Object[]{ journal, toMusle });
model.treeStructureChanged( new TreeModelEvent( journal, pathTo ) );
TreePath path = new TreePath( new Object[]{ journal, toMusle, exercise });
model.treeStructureChanged( new TreeModelEvent( journal, path ) );
getSelectionModel().setSelectionPath( path );
makeVisible( pathTo );
}
public void exerciseDisabled(Exercise exercise) {
}
public void exerciseEnabled(Exercise exercise) {
}
public void localeChanged(Locale locale) {
setLocale( locale );
model = new ExerciseTreeModel( journal );
setModel( model );
}
} | [
"morten@laukvik.no"
] | morten@laukvik.no |
9c027c28aa8bd476a20656d65a1849fcd0b367c0 | d273f603cd6205de1ad25ffb127faf4307a3bc4b | /sln-contracts/src/main/java/ru/elementlab/sln/contracts/MessageKind.java | dd0690479e917582621d373b3626f92f64d8889b | [
"MIT"
] | permissive | elementlab-llc/sln-java | 7aa9fab9b9d7d4c44f061bc2f98d4c0a50ca0e4a | f8656b64b94cdd84e0e529ba7f5067e66b09d43d | refs/heads/master | 2021-04-18T21:22:45.831159 | 2018-05-30T13:10:58 | 2018-05-30T13:10:58 | 126,820,435 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 684 | java | /*
*
* Module Name: sln-contracts
* Project: sln
*
* Copyright (c) Element Lab LLC
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
*
*/
package ru.elementlab.sln.contracts;
/**
* Тип сообщения
*/
public enum MessageKind {
/**
* Информация
*/
Information,
/**
* Предупреждение
*/
Warning,
/**
* Ошибка
*/
Error,
/**
* Критическая ошибка
*/
Critical,
}
| [
"oralzb@yahoo.com"
] | oralzb@yahoo.com |
ea35777f624b433019ad71c18b343d1f9926ca2e | 94ea5566f2c9eb9e035122ade94a004b125bc755 | /src/main/java/com/dongdongxia/myfastjson/asm/MethodWriter.java | a291a555b89fb0102af24814eeb93d8934c85582 | [
"Apache-2.0"
] | permissive | liuzedong/myfastjson | b41e942f47989a059a478342129c6bc1a381f9ed | cdd69fe6071fcbd3c7a12bc3dd4c0ceb15ec15ba | refs/heads/master | 2021-01-20T01:36:06.910507 | 2017-07-03T07:36:25 | 2017-07-03T07:36:25 | 89,304,565 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,968 | java | /***
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2007 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the copyright holders 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 com.dongdongxia.myfastjson.asm;
/**
* @author Eric Bruneton
* @author Eugene Kuleshov
*/
public class MethodWriter implements MethodVisitor {
/**
* Next method writer (see {@link ClassWriter#firstMethod firstMethod}).
*/
MethodWriter next;
/**
* The class writer to which this method must be added.
*/
final ClassWriter cw;
/**
* Access flags of this method.
*/
private int access;
/**
* The index of the constant pool item that contains the name of this method.
*/
private final int name;
/**
* The index of the constant pool item that contains the descriptor of this method.
*/
private final int desc;
/**
* Number of exceptions that can be thrown by this method.
*/
int exceptionCount;
/**
* The exceptions that can be thrown by this method. More precisely, this array contains the indexes of the constant
* pool items that contain the internal names of these exception classes.
*/
int[] exceptions;
/**
* The bytecode of this method.
*/
private ByteVector code = new ByteVector();
/**
* Maximum stack size of this method.
*/
private int maxStack;
/**
* Maximum number of local variables for this method.
*/
private int maxLocals;
// ------------------------------------------------------------------------
/*
* Fields for the control flow graph analysis algorithm (used to compute the maximum stack size). A control flow
* graph contains one node per "basic block", and one edge per "jump" from one basic block to another. Each node
* (i.e., each basic block) is represented by the Label object that corresponds to the first instruction of this
* basic block. Each node also stores the list of its successors in the graph, as a linked list of Edge objects.
*/
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
public MethodWriter(final ClassWriter cw, final int access, final String name, final String desc, final String signature, final String[] exceptions){
if (cw.firstMethod == null) {
cw.firstMethod = this;
} else {
cw.lastMethod.next = this;
}
cw.lastMethod = this;
this.cw = cw;
this.access = access;
this.name = cw.newUTF8(name);
this.desc = cw.newUTF8(desc);
if (exceptions != null && exceptions.length > 0) {
exceptionCount = exceptions.length;
this.exceptions = new int[exceptionCount];
for (int i = 0; i < exceptionCount; ++i) {
this.exceptions[i] = cw.newClassItem(exceptions[i]).index;
}
}
}
// ------------------------------------------------------------------------
// Implementation of the MethodVisitor interface
// ------------------------------------------------------------------------
public void visitInsn(final int opcode) {
// adds the instruction to the bytecode of the method
code.putByte(opcode);
// update currentBlock
// Label currentBlock = this.currentBlock;
}
public void visitIntInsn(final int opcode, final int operand) {
// Label currentBlock = this.currentBlock;
// adds the instruction to the bytecode of the method
// if (opcode == Opcodes.SIPUSH) {
// code.put12(opcode, operand);
// } else { // BIPUSH or NEWARRAY
code.put11(opcode, operand);
// }
}
public void visitVarInsn(final int opcode, final int var) {
// Label currentBlock = this.currentBlock;
// adds the instruction to the bytecode of the method
if (var < 4 && opcode != Opcodes.RET) {
int opt;
if (opcode < Opcodes.ISTORE) {
/* ILOAD_0 */
opt = 26 + ((opcode - Opcodes.ILOAD) << 2) + var;
} else {
/* ISTORE_0 */
opt = 59 + ((opcode - Opcodes.ISTORE) << 2) + var;
}
code.putByte(opt);
} else if (var >= 256) {
code.putByte(196 /* WIDE */).put12(opcode, var);
} else {
code.put11(opcode, var);
}
}
public void visitTypeInsn(final int opcode, final String type) {
Item i = cw.newClassItem(type);
// Label currentBlock = this.currentBlock;
// adds the instruction to the bytecode of the method
code.put12(opcode, i.index);
}
public void visitFieldInsn(final int opcode, final String owner, final String name, final String desc) {
Item i = cw.newFieldItem(owner, name, desc);
// Label currentBlock = this.currentBlock;
// adds the instruction to the bytecode of the method
code.put12(opcode, i.index);
}
public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
boolean itf = opcode == Opcodes.INVOKEINTERFACE;
Item i = cw.newMethodItem(owner, name, desc, itf);
int argSize = i.intVal;
// Label currentBlock = this.currentBlock;
// adds the instruction to the bytecode of the method
if (itf) {
if (argSize == 0) {
argSize = Type.getArgumentsAndReturnSizes(desc);
i.intVal = argSize;
}
code.put12(Opcodes.INVOKEINTERFACE, i.index).put11(argSize >> 2, 0);
} else {
code.put12(opcode, i.index);
}
}
public void visitJumpInsn(final int opcode, final Label label) {
// Label currentBlock = this.currentBlock;
// adds the instruction to the bytecode of the method
if ((label.status & 2 /* Label.RESOLVED */ ) != 0 && label.position - code.length < Short.MIN_VALUE) {
throw new UnsupportedOperationException();
} else {
/*
* case of a backward jump with an offset >= -32768, or of a forward jump with, of course, an unknown
* offset. In these cases we store the offset in 2 bytes (which will be increased in resizeInstructions, if
* needed).
*/
code.putByte(opcode);
label.put(this, code, code.length - 1);
}
}
public void visitLabel(final Label label) {
// resolves previous forward references to label, if any
label.resolve(this, code.length, code.data);
}
public void visitLdcInsn(final Object cst) {
Item i = cw.newConstItem(cst);
// Label currentBlock = this.currentBlock;
// adds the instruction to the bytecode of the method
int index = i.index;
if (i.type == 5 /* ClassWriter.LONG */ || i.type == 6 /* ClassWriter.DOUBLE */) {
code.put12(20 /* LDC2_W */, index);
} else if (index >= 256) {
code.put12(19 /* LDC_W */, index);
} else {
code.put11(18 /*Opcodes.LDC*/, index);
}
}
public void visitIincInsn(final int var, final int increment) {
// adds the instruction to the bytecode of the method
// if ((var > 255) || (increment > 127) || (increment < -128)) {
// code.putByte(196 /* WIDE */).put12(Opcodes.IINC, var).putShort(increment);
// } else {
code.putByte(132 /* Opcodes.IINC*/ ).put11(var, increment);
// }
}
public void visitMaxs(final int maxStack, final int maxLocals) {
this.maxStack = maxStack;
this.maxLocals = maxLocals;
}
public void visitEnd() {
}
// ------------------------------------------------------------------------
// Utility methods: control flow analysis algorithm
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Utility methods: stack map frames
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Utility methods: dump bytecode array
// ------------------------------------------------------------------------
/**
* Returns the size of the bytecode of this method.
*
* @return the size of the bytecode of this method.
*/
final int getSize() {
int size = 8;
if (code.length > 0) {
cw.newUTF8("Code");
size += 18 + code.length + 8 * 0;
}
if (exceptionCount > 0) {
cw.newUTF8("Exceptions");
size += 8 + 2 * exceptionCount;
}
return size;
}
/**
* Puts the bytecode of this method in the given byte vector.
*
* @param out the byte vector into which the bytecode of this method must be copied.
*/
final void put(final ByteVector out) {
final int mask = 393216; //Opcodes.ACC_DEPRECATED | ClassWriter.ACC_SYNTHETIC_ATTRIBUTE | ((access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) / (ClassWriter.ACC_SYNTHETIC_ATTRIBUTE / Opcodes.ACC_SYNTHETIC));
out.putShort(access & ~mask).putShort(name).putShort(desc);
int attributeCount = 0;
if (code.length > 0) {
++attributeCount;
}
if (exceptionCount > 0) {
++attributeCount;
}
out.putShort(attributeCount);
if (code.length > 0) {
int size = 12 + code.length + 8 * 0; // handlerCount
out.putShort(cw.newUTF8("Code")).putInt(size);
out.putShort(maxStack).putShort(maxLocals);
out.putInt(code.length).putByteArray(code.data, 0, code.length);
out.putShort(0); // handlerCount
attributeCount = 0;
out.putShort(attributeCount);
}
if (exceptionCount > 0) {
out.putShort(cw.newUTF8("Exceptions")).putInt(2 * exceptionCount + 2);
out.putShort(exceptionCount);
for (int i = 0; i < exceptionCount; ++i) {
out.putShort(exceptions[i]);
}
}
}
}
| [
"java_liudong@163.com"
] | java_liudong@163.com |
afd70dd55f348461ed94f2c1fb291b8508e5df7f | fc351062851764d7aa7ed34ad81f0fc981e2fb97 | /src/main/java/com/taihwa/tutorial/repository/UserRepository.java | 1247e897675cc78db3b14486ad0024ba9c45e141 | [] | no_license | taihwa/jwt-tutorial | 4e8ff4434ed2549cc88379eb46eadf244e77aba0 | 50bfce08ddd01c296a1d99cf2f45123fc35fa4eb | refs/heads/master | 2023-06-15T23:20:30.197041 | 2021-07-12T11:41:21 | 2021-07-12T11:41:21 | 383,626,375 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 421 | java | package com.taihwa.tutorial.repository;
import com.taihwa.tutorial.entity.User;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional;
public interface UserRepository extends JpaRepository<User, Long> {
@EntityGraph(attributePaths = "authorities")
Optional<User> findOneWithAuthoritiesByUsername(String username);
}
| [
"dlxoghk1@nate.com"
] | dlxoghk1@nate.com |
9c1bd96a2e460a36c46fd5eb2e053d5b6e11d685 | 7cdee16bd9fe9827f7460b2834d71ed684f01cb3 | /docroot/WEB-INF/src/com/codeengine/studentmanagement/model/impl/StudentCacheModel.java | 811d5882d1a21f56365580624712ee0bc5a4249f | [] | no_license | haubuicodeengine/demoliferay | 2a0ec6f6372498157a175d425628287a311afe49 | a1696b81ded877369320ff28336c1136b8a6116b | refs/heads/master | 2020-05-16T08:20:10.473113 | 2019-05-07T10:01:27 | 2019-05-07T10:01:27 | 182,904,933 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,670 | java | /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.codeengine.studentmanagement.model.impl;
import com.codeengine.studentmanagement.model.Student;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Date;
/**
* The cache model class for representing Student in entity cache.
*
* @author ces
* @see Student
* @generated
*/
public class StudentCacheModel implements CacheModel<Student>, Externalizable {
@Override
public String toString() {
StringBundler sb = new StringBundler(17);
sb.append("{uuid=");
sb.append(uuid);
sb.append(", userId=");
sb.append(userId);
sb.append(", name=");
sb.append(name);
sb.append(", email=");
sb.append(email);
sb.append(", createDate=");
sb.append(createDate);
sb.append(", schoolId=");
sb.append(schoolId);
sb.append(", clazzId=");
sb.append(clazzId);
sb.append(", companyId=");
sb.append(companyId);
sb.append("}");
return sb.toString();
}
@Override
public Student toEntityModel() {
StudentImpl studentImpl = new StudentImpl();
if (uuid == null) {
studentImpl.setUuid(StringPool.BLANK);
}
else {
studentImpl.setUuid(uuid);
}
studentImpl.setUserId(userId);
if (name == null) {
studentImpl.setName(StringPool.BLANK);
}
else {
studentImpl.setName(name);
}
if (email == null) {
studentImpl.setEmail(StringPool.BLANK);
}
else {
studentImpl.setEmail(email);
}
if (createDate == Long.MIN_VALUE) {
studentImpl.setCreateDate(null);
}
else {
studentImpl.setCreateDate(new Date(createDate));
}
studentImpl.setSchoolId(schoolId);
studentImpl.setClazzId(clazzId);
studentImpl.setCompanyId(companyId);
studentImpl.resetOriginalValues();
return studentImpl;
}
@Override
public void readExternal(ObjectInput objectInput) throws IOException {
uuid = objectInput.readUTF();
userId = objectInput.readLong();
name = objectInput.readUTF();
email = objectInput.readUTF();
createDate = objectInput.readLong();
schoolId = objectInput.readLong();
clazzId = objectInput.readLong();
companyId = objectInput.readLong();
}
@Override
public void writeExternal(ObjectOutput objectOutput)
throws IOException {
if (uuid == null) {
objectOutput.writeUTF(StringPool.BLANK);
}
else {
objectOutput.writeUTF(uuid);
}
objectOutput.writeLong(userId);
if (name == null) {
objectOutput.writeUTF(StringPool.BLANK);
}
else {
objectOutput.writeUTF(name);
}
if (email == null) {
objectOutput.writeUTF(StringPool.BLANK);
}
else {
objectOutput.writeUTF(email);
}
objectOutput.writeLong(createDate);
objectOutput.writeLong(schoolId);
objectOutput.writeLong(clazzId);
objectOutput.writeLong(companyId);
}
public String uuid;
public long userId;
public String name;
public String email;
public long createDate;
public long schoolId;
public long clazzId;
public long companyId;
} | [
"hau.bui@codenginestudio.com"
] | hau.bui@codenginestudio.com |
1b8d238cc29535b02e2fcc7b6977918ef595c2c4 | 4df4b1cfac2b9375ca805c22cddc61977fdae3d6 | /src/test/java/com/astrebel/sonarslack/SeverityTest.java | ccc5c521cb6768f07000239e1d4e7d25dffec6c8 | [
"MIT"
] | permissive | astrebel/sonar-slack-notifier-plugin | 1acdb5b0b7b06b8b389416e10a42a99465a29915 | c9e5a67c5be702595ce307009b96a2ae0e6e5c1f | refs/heads/master | 2021-01-10T13:57:15.523008 | 2017-10-13T06:02:41 | 2017-10-13T06:02:41 | 52,726,357 | 18 | 7 | null | 2017-10-13T06:02:42 | 2016-02-28T14:54:32 | Java | UTF-8 | Java | false | false | 1,941 | java | package com.astrebel.sonarslack;
import static org.junit.Assert.*;
import org.junit.Test;
public class SeverityTest {
@Test
public void ValueOrDefault_KnownOptionIgnoreCase_Value() {
assertEquals(Severity.NONE, Severity.valueOrDefault("NonE"));
assertEquals(Severity.BLOCKER, Severity.valueOrDefault("blOcKer"));
assertEquals(Severity.CRITICAL, Severity.valueOrDefault("CrIticAL"));
assertEquals(Severity.MAJOR, Severity.valueOrDefault("mAJOr"));
assertEquals(Severity.MINOR, Severity.valueOrDefault("MiNoR"));
assertEquals(Severity.INFO, Severity.valueOrDefault("InFO"));
}
@Test
public void ValueOrDefault_UnknownOption_DefaultInfo() {
assertEquals(Severity.INFO, Severity.valueOrDefault("Unknown"));
}
@Test
public void Ordinal_AssertOrder() {
assertTrue(Severity.NONE.compareTo(Severity.BLOCKER) > 0);
assertTrue(Severity.BLOCKER.compareTo(Severity.CRITICAL) > 0);
assertTrue(Severity.CRITICAL.compareTo(Severity.MAJOR) > 0);
assertTrue(Severity.MAJOR.compareTo(Severity.MINOR) > 0);
assertTrue(Severity.MINOR.compareTo(Severity.INFO) > 0);
}
@Test
public void MessageSeverity_NoIssues_None() {
assertEquals(Severity.NONE, Severity.messageSeverity(0, 0, 0, 0, 0));
}
@Test
public void MessageSeverity_OnlyInfos_Info() {
assertEquals(Severity.INFO, Severity.messageSeverity(0, 0, 0, 0, 1));
}
@Test
public void MessageSeverity_MinorsAndInfos_Minors() {
assertEquals(Severity.MINOR, Severity.messageSeverity(0, 0, 0, 1, 1));
}
@Test
public void MessageSeverity_MajorsAndSomeSmaller_Major() {
assertEquals(Severity.MAJOR, Severity.messageSeverity(0, 0, 1, 0, 1));
}
@Test
public void MessageSeverity_CriticalsAndSomeSmaller_Critical() {
assertEquals(Severity.CRITICAL, Severity.messageSeverity(0, 1, 1, 1, 0));
}
@Test
public void MessageSeverity_BlockerAndSomeSmaller_Blocker() {
assertEquals(Severity.BLOCKER, Severity.messageSeverity(1, 0, 1, 0, 1));
}
}
| [
"damian.hofmann@kwsoft.ch"
] | damian.hofmann@kwsoft.ch |
f6076a89afc429b4d82a780920f9f2ba1d77b685 | 9dbf5bc145e0110d019db1ae9f3350a8bd0f1d72 | /src/java/jums/Myupdateresult.java | 255cb5437f0c320053be7e71e4aca9d003591118 | [] | no_license | Kashiwagithub/kagoyume | 23153968d8b73ba9bc815b1beb784eefc025a597 | d90c750a906e76ba0cac5a448ab1573de2b2979d | refs/heads/master | 2021-04-12T07:49:15.277111 | 2016-06-20T06:01:28 | 2016-06-20T06:01:28 | 61,011,993 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,706 | 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 jums;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
*
* @author Wataru
*/
public class Myupdateresult extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
/* TODO output your page here. You may use following sample code. */
HttpSession session = request.getSession();
request.setCharacterEncoding("UTF-8");
UserData ud = (UserData)session.getAttribute("ud");
ud.setUsername(request.getParameter("username"));
ud.setPassword(request.getParameter("password"));
ud.setMail(request.getParameter("email"));
ud.setAddress(request.getParameter("address"));
session.setAttribute("ud",ud);
//引数をuddとしてDTO型にUserDataをマッピング
UserDataDTO udd = new UserDataDTO();
ud.UD2DTOMapping(udd);
//UserDataDAOを介してSQLを実行
UserDataDAO.getInstance().update(udd);
//Foward
request.getRequestDispatcher("/myupdateresult.jsp").forward(request, response);
}catch(Exception e){
//何らかの理由で失敗したらエラーページにエラー文を渡して表示。想定は不正なアクセスとDBエラー
request.setAttribute("error", e.getMessage());
request.getRequestDispatcher("/error.jsp").forward(request, response);
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
| [
"qwertyuiop.w.k@gmail.com"
] | qwertyuiop.w.k@gmail.com |
23a44bfcd889fbceaac106065b612eb166afa94d | 1282b072097712891cb01f8a166c8792bc345d2e | /src/main/java/misc_items/Item.java | 0d08cc26b5c7b85b23230dbb91f43de2388ef81d | [] | no_license | bellvelo/RaysMusicExchange | f4e4791d97ab097078003c5e264e6a87c1ff6cff | d3db2e2b5ef8426bc2abd1ccf45da61c37220b37 | refs/heads/master | 2020-04-08T05:50:50.357329 | 2018-11-25T21:23:15 | 2018-11-25T21:23:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 957 | java | package misc_items;
import Instruments.Guitar;
import interfaces.ISell;
public abstract class Item implements ISell{
private String description;
private int buyPrice;
private int sellPrice;
public Item(String description, int buyPrice, int sellPrice) {
this.description = description;
this.buyPrice = buyPrice;
this.sellPrice = sellPrice;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getBuyPrice() {
return buyPrice;
}
public void setBuyPrice(int buyPrice) {
this.buyPrice = buyPrice;
}
public int getSellPrice() {
return sellPrice;
}
public void setSellPrice(int sellPrice) {
this.sellPrice = sellPrice;
}
public double calculateMarkUp() {
return getSellPrice() - getBuyPrice();
}
}
| [
"dbelldev@icloud.com"
] | dbelldev@icloud.com |
7274df4bc7d36ad4f6b4df253fdab0a4db9902f7 | 3491865bd350e5084a820ea271039ac9b48807de | /src/elements/LightSource.java | 7a31298bc2ec40bcdefb326c8109a4f083914b54 | [] | no_license | eden012/MavoSE5781 | 0c0e12e9853f7d4d983da861c19ed0e8376a3f49 | abe501f6386b78b6646f9df18ff49675414f390b | refs/heads/master | 2023-02-13T01:55:35.906629 | 2021-01-18T16:32:22 | 2021-01-18T16:32:22 | 330,725,022 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 741 | java | package elements;
import primitives.*;
import java.util.List;
/**
* Interface for common actions of light sources
*
* @author Dan Zilberstein
*/
public interface LightSource {
/**
* Get light source intensity as it reaches a point I<sub>P</sub>
*
* @param p the illuminated point
* @return intensity I<sub>P</sub>
*/
Color getIntensity(Point3D p);
/**
* Get normalized vector in the direction from light source
* towards the lighted point
*
* @param p the lighted point
* @return light to point vector
*/
Vector getL(Point3D p);
List<Vector> getBeamL(Point3D p, double radius, int amount);
double getDistance(Point3D point);
Point3D getPoint();
}
| [
"edencohen012@gmail.com"
] | edencohen012@gmail.com |
cb59d31cd04eedc196079db0a4662d06dbb3301d | bf2966abae57885c29e70852243a22abc8ba8eb0 | /aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/transform/StopContactRecordingResultJsonUnmarshaller.java | 982ad35b0441b37dd600affed983ccc6c4eee217 | [
"Apache-2.0"
] | permissive | kmbotts/aws-sdk-java | ae20b3244131d52b9687eb026b9c620da8b49935 | 388f6427e00fb1c2f211abda5bad3a75d29eef62 | refs/heads/master | 2021-12-23T14:39:26.369661 | 2021-07-26T20:09:07 | 2021-07-26T20:09:07 | 246,296,939 | 0 | 0 | Apache-2.0 | 2020-03-10T12:37:34 | 2020-03-10T12:37:33 | null | UTF-8 | Java | false | false | 1,678 | java | /*
* Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.connect.model.transform;
import java.math.*;
import javax.annotation.Generated;
import com.amazonaws.services.connect.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* StopContactRecordingResult JSON Unmarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StopContactRecordingResultJsonUnmarshaller implements Unmarshaller<StopContactRecordingResult, JsonUnmarshallerContext> {
public StopContactRecordingResult unmarshall(JsonUnmarshallerContext context) throws Exception {
StopContactRecordingResult stopContactRecordingResult = new StopContactRecordingResult();
return stopContactRecordingResult;
}
private static StopContactRecordingResultJsonUnmarshaller instance;
public static StopContactRecordingResultJsonUnmarshaller getInstance() {
if (instance == null)
instance = new StopContactRecordingResultJsonUnmarshaller();
return instance;
}
}
| [
""
] | |
1804ab3e5655b8ff5e5fef84f169d61430482c0b | 4f8dae9201da32745663a9b5356377cf1a14128f | /src/main/java/practice/leetcode/oj341to350/OJ343_others.java | a0f80a60567ee5204b503c3cc96ebe9384eb4805 | [] | no_license | xiaoyue26/july | 09805465e2c2a4432876bb45e85780ba9330940f | a388405d31e1a6cd3d09424d9ce8c3aef8632712 | refs/heads/master | 2021-06-02T02:32:49.672546 | 2020-03-09T07:04:11 | 2020-03-09T07:04:25 | 133,506,411 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 719 | java | package practice.leetcode.oj341to350;
/*
* 2*(f-2) = 2f-4 >= f
* 直接优先用3做因子.
* 其次用2。
* */
public class OJ343_others {
public int integerBreak(int n) {
if (n == 2) return 1;
if (n == 3) return 2;
int product = 1;
while (n > 4) {
product *= 3;
n -= 3;
}
product *= n;
return product;
}
public static void main(String[] args) {
OJ343_others obj = new OJ343_others();
System.out.println(obj.integerBreak(2)); // 1 // 1+1
System.out.println(obj.integerBreak(8)); // 18 // 2*2*3
System.out.println(obj.integerBreak(10)); // 36 // 3+3+4
}
} | [
"296671657@qq.com"
] | 296671657@qq.com |
78c22a58209054d0661c786ded875c475a3f45a1 | f5049214ff99cdd7c37da74619b60ac4a26fc6ba | /runtime/update/eu.agno3.runtime.update/src/main/java/eu/agno3/runtime/update/LicensingException.java | f4094ba84bb3f83bb3e1dac6e80e4380b84efda3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | AgNO3/code | d17313709ee5db1eac38e5811244cecfdfc23f93 | b40a4559a10b3e84840994c3fd15d5f53b89168f | refs/heads/main | 2023-07-28T17:27:53.045940 | 2021-09-17T14:25:01 | 2021-09-17T14:31:41 | 407,567,058 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 806 | java | /**
* © 2016 AgNO3 Gmbh & Co. KG
* All right reserved.
*
* Created: 22.02.2016 by mbechler
*/
package eu.agno3.runtime.update;
/**
* @author mbechler
*
*/
public class LicensingException extends Exception {
/**
*
*/
private static final long serialVersionUID = 7445152841346719096L;
/**
*
*/
public LicensingException () {
super();
}
/**
* @param message
* @param cause
*/
public LicensingException ( String message, Throwable cause ) {
super(message, cause);
}
/**
* @param message
*/
public LicensingException ( String message ) {
super(message);
}
/**
* @param cause
*/
public LicensingException ( Throwable cause ) {
super(cause);
}
}
| [
"bechler@agno3.eu"
] | bechler@agno3.eu |
ec7af8d0317c94c1084418791146e1bdd621828e | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/live/core/view/TRTCVideoLayoutManager.java | cc12ee45d0b871792699c941a563e2ffcb5fe18a | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 17,839 | java | package com.tencent.mm.live.core.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.Toast;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.crash.CrashReportFactory;
import com.tencent.mm.sdk.platformtools.BuildInfo;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.ui.base.aa;
import com.tencent.rtmp.ui.TXCloudVideoView;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
public class TRTCVideoLayoutManager
extends RelativeLayout
implements b.b
{
static final String TAG;
int mCount;
int mMode;
public WeakReference<a> mSv;
public List<TRTCVideoLayoutManager.b> mXo;
private ArrayList<RelativeLayout.LayoutParams> mXp;
private ArrayList<RelativeLayout.LayoutParams> mXq;
private ArrayList<RelativeLayout.LayoutParams> mXr;
private String mXs;
private String mXt;
public boolean mXu;
static
{
AppMethodBeat.i(247585);
TAG = TRTCVideoLayoutManager.class.getSimpleName();
AppMethodBeat.o(247585);
}
public TRTCVideoLayoutManager(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
AppMethodBeat.i(247517);
this.mCount = 0;
this.mXu = false;
ci(paramContext);
AppMethodBeat.o(247517);
}
public TRTCVideoLayoutManager(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
AppMethodBeat.i(247524);
this.mCount = 0;
this.mXu = false;
ci(paramContext);
AppMethodBeat.o(247524);
}
private void bhd()
{
AppMethodBeat.i(247563);
StringBuffer localStringBuffer = new StringBuffer();
Iterator localIterator = this.mXo.iterator();
while (localIterator.hasNext())
{
TRTCVideoLayoutManager.b localb = (TRTCVideoLayoutManager.b)localIterator.next();
localStringBuffer.append(localb.userId).append("-").append(localb.streamType).append("\n");
}
Log.i(TAG, localStringBuffer.toString());
AppMethodBeat.o(247563);
}
private void ci(Context paramContext)
{
AppMethodBeat.i(247539);
Log.i(TAG, "initView: ");
this.mXo = Collections.synchronizedList(new ArrayList());
Object localObject = new b(paramContext, false);
((b)localObject).setVisibility(8);
((b)localObject).setBackgroundColor(-16777216);
((b)localObject).mXh = false;
((b)localObject).a(this);
((b)localObject).bhb();
TRTCVideoLayoutManager.b localb = new TRTCVideoLayoutManager.b((byte)0);
localb.mXw = ((b)localObject);
localb.index = 0;
this.mXo.add(localb);
localObject = new b(paramContext, true);
((b)localObject).setVisibility(8);
((b)localObject).setBackgroundColor(-16777216);
((b)localObject).mXh = false;
((b)localObject).a(this);
((b)localObject).bhb();
localb = new TRTCVideoLayoutManager.b((byte)0);
localb.mXw = ((b)localObject);
localb.index = 1;
this.mXo.add(localb);
localObject = new b(paramContext, true);
((b)localObject).setVisibility(8);
((b)localObject).setBackgroundColor(-16777216);
((b)localObject).mXh = false;
((b)localObject).a(this);
((b)localObject).bhb();
localb = new TRTCVideoLayoutManager.b((byte)0);
localb.mXw = ((b)localObject);
localb.index = 2;
this.mXo.add(localb);
localObject = new b(paramContext, true);
((b)localObject).setVisibility(8);
((b)localObject).setBackgroundColor(-16777216);
((b)localObject).mXh = false;
((b)localObject).a(this);
((b)localObject).bhb();
localb = new TRTCVideoLayoutManager.b((byte)0);
localb.mXw = ((b)localObject);
localb.index = 3;
this.mXo.add(localb);
localObject = new b(paramContext, true);
((b)localObject).setVisibility(8);
((b)localObject).setBackgroundColor(-16777216);
((b)localObject).mXh = false;
((b)localObject).a(this);
((b)localObject).bhb();
localb = new TRTCVideoLayoutManager.b((byte)0);
localb.mXw = ((b)localObject);
localb.index = 4;
this.mXo.add(localb);
paramContext = new b(paramContext, true);
paramContext.setVisibility(8);
paramContext.setBackgroundColor(-16777216);
paramContext.mXh = false;
paramContext.a(this);
paramContext.bhb();
localObject = new TRTCVideoLayoutManager.b((byte)0);
((TRTCVideoLayoutManager.b)localObject).mXw = paramContext;
((TRTCVideoLayoutManager.b)localObject).index = 5;
this.mXo.add(localObject);
this.mMode = 1;
post(new Runnable()
{
public final void run()
{
AppMethodBeat.i(247547);
TRTCVideoLayoutManager.a(TRTCVideoLayoutManager.this);
AppMethodBeat.o(247547);
}
});
AppMethodBeat.o(247539);
}
private TRTCVideoLayoutManager.b k(b paramb)
{
AppMethodBeat.i(247551);
Iterator localIterator = this.mXo.iterator();
while (localIterator.hasNext())
{
TRTCVideoLayoutManager.b localb = (TRTCVideoLayoutManager.b)localIterator.next();
if (localb.mXw == paramb)
{
AppMethodBeat.o(247551);
return localb;
}
}
AppMethodBeat.o(247551);
return null;
}
public final void Gg(String paramString)
{
AppMethodBeat.i(247703);
Log.i(TAG, "recyclerCloudViewView userId:" + paramString + " streamType:0");
if (paramString == null)
{
AppMethodBeat.o(247703);
return;
}
bhd();
if (this.mMode == 1)
{
localObject = (TRTCVideoLayoutManager.b)this.mXo.get(0);
if ((paramString.equals(((TRTCVideoLayoutManager.b)localObject).userId)) && (((TRTCVideoLayoutManager.b)localObject).streamType == 0)) {
tz(1);
}
}
Object localObject = this.mXo.iterator();
while (((Iterator)localObject).hasNext())
{
TRTCVideoLayoutManager.b localb = (TRTCVideoLayoutManager.b)((Iterator)localObject).next();
Log.i(TAG, "recyclerCloudViewView entity.userId: " + localb.userId + ", entity.streamType: " + localb.streamType);
if ((localb.streamType == 0) && (paramString.equals(localb.userId)))
{
this.mCount -= 1;
if ((this.mMode == 2) && (this.mCount == 4)) {
bhc();
}
b localb1 = localb.mXw;
Context localContext = getContext();
int i = getWidth();
getHeight();
localb1.setLayoutParams(c.O(localContext, i));
localb.mXw.setVisibility(8);
localb.userId = "";
localb.streamType = -1;
}
}
AppMethodBeat.o(247703);
}
final TRTCVideoLayoutManager.b Gi(String paramString)
{
AppMethodBeat.i(247714);
Log.i(TAG, "findEntity userId:".concat(String.valueOf(paramString)));
Iterator localIterator = this.mXo.iterator();
while (localIterator.hasNext())
{
TRTCVideoLayoutManager.b localb = (TRTCVideoLayoutManager.b)localIterator.next();
if (localb.userId.equals(paramString))
{
AppMethodBeat.o(247714);
return localb;
}
}
AppMethodBeat.o(247714);
return null;
}
public final TXCloudVideoView aA(String paramString, int paramInt)
{
Iterator localIterator = null;
AppMethodBeat.i(247655);
Log.i(TAG, "allocCloudVideoView userId:" + paramString + " streamType:" + paramInt);
bhd();
if (paramString == null)
{
AppMethodBeat.o(247655);
return null;
}
Object localObject2 = this.mXo.iterator();
do
{
localObject1 = localIterator;
if (!((Iterator)localObject2).hasNext()) {
break;
}
localObject1 = (TRTCVideoLayoutManager.b)((Iterator)localObject2).next();
} while ((((TRTCVideoLayoutManager.b)localObject1).mXw.mVideoView == null) || (!Util.isEqual(paramString, ((TRTCVideoLayoutManager.b)localObject1).userId)) || (((TRTCVideoLayoutManager.b)localObject1).streamType != paramInt));
((TRTCVideoLayoutManager.b)localObject1).userId = paramString;
((TRTCVideoLayoutManager.b)localObject1).streamType = paramInt;
((TRTCVideoLayoutManager.b)localObject1).mXw.setVisibility(0);
this.mCount += 1;
if ((this.mMode == 2) && (this.mCount == 5)) {
bhc();
}
((TRTCVideoLayoutManager.b)localObject1).mXw.Gh("");
Object localObject1 = ((TRTCVideoLayoutManager.b)localObject1).mXw.mVideoView;
if (localObject1 == null)
{
localIterator = this.mXo.iterator();
while (localIterator.hasNext())
{
localObject2 = (TRTCVideoLayoutManager.b)localIterator.next();
if ((((TRTCVideoLayoutManager.b)localObject2).mXw.mVideoView != null) && ("".equals(((TRTCVideoLayoutManager.b)localObject2).userId)) && (((TRTCVideoLayoutManager.b)localObject2).streamType == -1))
{
((TRTCVideoLayoutManager.b)localObject2).userId = paramString;
((TRTCVideoLayoutManager.b)localObject2).streamType = paramInt;
((TRTCVideoLayoutManager.b)localObject2).mXw.setVisibility(0);
this.mCount += 1;
if ((this.mMode == 2) && (this.mCount == 5)) {
bhc();
}
((TRTCVideoLayoutManager.b)localObject2).mXw.Gh("");
localObject1 = ((TRTCVideoLayoutManager.b)localObject2).mXw.mVideoView;
}
}
}
for (;;)
{
if ((BuildInfo.IS_FLAVOR_PURPLE) || (BuildInfo.IS_FLAVOR_RED) || (CrashReportFactory.hasDebuger()))
{
Log.printInfoStack(TAG, "allocCloudVideoView fail, userId ".concat(String.valueOf(paramString)), new Object[0]);
aa.makeText(MMApplicationContext.getContext(), "allocCloudVideoView fail, userId ".concat(String.valueOf(paramString)), 0).show();
}
Log.e(TAG, "allocCloudVideoView userId ".concat(String.valueOf(paramString)));
AppMethodBeat.o(247655);
return localObject1;
}
}
final void bE(List<String> paramList)
{
AppMethodBeat.i(247762);
int i = 0;
while (i < paramList.size())
{
String str = (String)paramList.get(i);
if ((i != 0) && (Gi(str) == null)) {
aA(str, 0);
}
Log.i(TAG, "checkAnchorRemoteView userId:" + str + " i:" + i);
i += 1;
}
AppMethodBeat.o(247762);
}
final void bhc()
{
AppMethodBeat.i(247733);
if ((this.mXq == null) || (this.mXq.size() == 0) || (this.mXr == null) || (this.mXr.size() == 0))
{
this.mXq = c.b(getContext(), getWidth(), getHeight());
this.mXr = c.c(getContext(), getWidth(), getHeight());
}
ArrayList localArrayList;
int i;
int j;
label96:
TRTCVideoLayoutManager.b localb;
int k;
if (this.mCount <= 4)
{
localArrayList = this.mXq;
i = 0;
j = 1;
if (i >= this.mXo.size()) {
break label229;
}
localb = (TRTCVideoLayoutManager.b)this.mXo.get(i);
localb.mXw.mXh = false;
localb.mXw.setOnClickListener(null);
if (!localb.userId.equals(this.mXs)) {
break label194;
}
localb.mXw.setLayoutParams((ViewGroup.LayoutParams)localArrayList.get(0));
k = j;
}
for (;;)
{
i += 1;
j = k;
break label96;
localArrayList = this.mXr;
break;
label194:
k = j;
if (j < localArrayList.size())
{
localb.mXw.setLayoutParams((ViewGroup.LayoutParams)localArrayList.get(j));
k = j + 1;
}
}
label229:
AppMethodBeat.o(247733);
}
final void d(String paramString, List<String> paramList)
{
AppMethodBeat.i(247747);
paramList = paramList.iterator();
while (paramList.hasNext())
{
String str = (String)paramList.next();
if ((!Util.isEqual(str, paramString)) && (Gi(str) == null)) {
aA(str, 0);
}
Log.i(TAG, "checkVisitorRemoteView userId:".concat(String.valueOf(str)));
}
AppMethodBeat.o(247747);
}
public final void g(b paramb)
{
AppMethodBeat.i(247592);
if (this.mSv != null) {}
for (a locala = (a)this.mSv.get();; locala = null)
{
if (locala != null) {
k(paramb);
}
AppMethodBeat.o(247592);
return;
}
}
public RelativeLayout getCameraContentView()
{
AppMethodBeat.i(247792);
int i = 0;
while (i < this.mXo.size())
{
Object localObject = (TRTCVideoLayoutManager.b)this.mXo.get(i);
if (((TRTCVideoLayoutManager.b)localObject).mXw.mWV != null)
{
localObject = ((TRTCVideoLayoutManager.b)localObject).mXw;
AppMethodBeat.o(247792);
return localObject;
}
i += 1;
}
AppMethodBeat.o(247792);
return null;
}
public int getCameraViewHeight()
{
AppMethodBeat.i(247687);
Iterator localIterator = this.mXo.iterator();
while (localIterator.hasNext())
{
TRTCVideoLayoutManager.b localb = (TRTCVideoLayoutManager.b)localIterator.next();
if (localb.mXw.mWV != null)
{
if (localb.mXw.getLayoutParams() == null)
{
AppMethodBeat.o(247687);
return -1;
}
int i = localb.mXw.getLayoutParams().height;
AppMethodBeat.o(247687);
return i;
}
}
AppMethodBeat.o(247687);
return -1;
}
public int getCameraViewWidth()
{
AppMethodBeat.i(247668);
Iterator localIterator = this.mXo.iterator();
while (localIterator.hasNext())
{
TRTCVideoLayoutManager.b localb = (TRTCVideoLayoutManager.b)localIterator.next();
if (localb.mXw.mWV != null)
{
if (localb.mXw.getLayoutParams() == null)
{
AppMethodBeat.o(247668);
return -1;
}
int i = localb.mXw.getLayoutParams().width;
AppMethodBeat.o(247668);
return i;
}
}
AppMethodBeat.o(247668);
return -1;
}
public int getRemoteViewIndex()
{
AppMethodBeat.i(247802);
int i = 0;
while (i < this.mXo.size())
{
if (((TRTCVideoLayoutManager.b)this.mXo.get(i)).mXw.mVideoView != null)
{
AppMethodBeat.o(247802);
return i;
}
i += 1;
}
AppMethodBeat.o(247802);
return 0;
}
public final void h(b paramb)
{
AppMethodBeat.i(247599);
if (this.mSv != null) {}
for (a locala = (a)this.mSv.get();; locala = null)
{
if (locala != null) {
k(paramb);
}
AppMethodBeat.o(247599);
return;
}
}
public final void i(b paramb)
{
AppMethodBeat.i(247604);
if (this.mSv != null) {}
for (a locala = (a)this.mSv.get();; locala = null)
{
if (locala != null) {
k(paramb);
}
AppMethodBeat.o(247604);
return;
}
}
public final void j(b paramb)
{
AppMethodBeat.i(247612);
if (this.mSv != null) {}
for (a locala = (a)this.mSv.get();; locala = null)
{
if (locala != null) {
k(paramb);
}
AppMethodBeat.o(247612);
return;
}
}
public void setGestureListener(b.a parama)
{
AppMethodBeat.i(247817);
int i = 0;
while (i < this.mXo.size())
{
((TRTCVideoLayoutManager.b)this.mXo.get(i)).mXw.mXk = parama;
i += 1;
}
AppMethodBeat.o(247817);
}
public void setIVideoLayoutListener(a parama)
{
AppMethodBeat.i(247617);
if (parama == null)
{
this.mSv = null;
AppMethodBeat.o(247617);
return;
}
this.mSv = new WeakReference(parama);
AppMethodBeat.o(247617);
}
public void setMySelfUserId(String paramString)
{
this.mXs = paramString;
}
public void setPkUserId(String paramString)
{
this.mXt = paramString;
}
public final void tz(int paramInt)
{
AppMethodBeat.i(247779);
if ((paramInt <= 0) || (this.mXo.size() <= paramInt))
{
AppMethodBeat.o(247779);
return;
}
Log.i(TAG, "makeFullVideoView: from = ".concat(String.valueOf(paramInt)));
TRTCVideoLayoutManager.b localb1 = (TRTCVideoLayoutManager.b)this.mXo.get(paramInt);
ViewGroup.LayoutParams localLayoutParams1 = localb1.mXw.getLayoutParams();
TRTCVideoLayoutManager.b localb2 = (TRTCVideoLayoutManager.b)this.mXo.get(0);
ViewGroup.LayoutParams localLayoutParams2 = localb2.mXw.getLayoutParams();
localb1.mXw.setLayoutParams(localLayoutParams2);
localb1.index = 0;
localb2.mXw.setLayoutParams(localLayoutParams1);
localb2.index = paramInt;
localb1.mXw.mXh = false;
localb1.mXw.setOnClickListener(null);
localb2.mXw.mXh = true;
this.mXo.set(0, localb1);
this.mXo.set(paramInt, localb2);
paramInt = 0;
while (paramInt < this.mXo.size())
{
bringChildToFront(((TRTCVideoLayoutManager.b)this.mXo.get(paramInt)).mXw);
paramInt += 1;
}
AppMethodBeat.o(247779);
}
public static abstract interface a {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes10.jar
* Qualified Name: com.tencent.mm.live.core.view.TRTCVideoLayoutManager
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
9914b26e6d1392ae8ca9e280f7a06992d49d90fb | e5c98ecca9e175840a5a9f76932e3ce55354e959 | /openpdf/src/main/java/com/github/text/pdf/Pfm2afm.java | a1d8f19a45c3758cd737993fb3a2cafcb3e839b5 | [] | no_license | danschmidt1/OpenPDFBetterTiffSupport | cb5b81cbbfd96880ff8ec628e46e76e76571045e | c5f0215624e6d12eccf3e130d68527f686e79f45 | refs/heads/master | 2021-09-12T14:51:25.313563 | 2018-04-17T21:05:20 | 2018-04-17T21:05:20 | 114,408,290 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 34,034 | java | /*
* $Id: Pfm2afm.java 4065 2009-09-16 23:09:11Z psoares33 $
*
* Copyright 1991 Ken Borgendale
*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the License.
*
* The Original Code is 'iText, a free JAVA-PDF library'.
*
* The Initial Developer of the Original Code is Bruno lowagie. Portions created by
* the Initial Developer are Copyright (C) 1999-2007 by Bruno lowagie.
* All Rights Reserved.
* Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
* are Copyright (C) 2000-2007 by Paulo Soares. All Rights Reserved.
*
* Contributor(s): all the names of the contributors are added in the source code
* where applicable.
*
* Alternatively, the contents of this file may be used under the terms of the
* LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
* provisions of LGPL are applicable instead of those above. If you wish to
* allow use of your version of this file only under the terms of the LGPL
* License and not to allow others to use your version of this file under
* the MPL, indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by the LGPL.
* If you do not delete the provisions above, a recipient may use your version
* of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the MPL as stated above or under the terms of the GNU
* Library General Public License as published by the Free Software Foundation;
* either version 2 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
* details.
*
* If you didn't download this code from the following link, you should check if
* you aren't using an obsolete version:
* http://www.lowagie.com/iText/
*/
/********************************************************************
* *
* Title: pfm2afm - Convert Windows .pfm files to .afm files *
* *
* Author: Ken Borgendale 10/9/91 Version 1.0 *
* *
* Function: *
* Convert a Windows .pfm (Printer Font Metrics) file to a *
* .afm (Adobe Font Metrics) file. The purpose of this is *
* to allow fonts put out for Windows to be used with OS/2. *
* *
* Syntax: *
* pfm2afm infile [outfile] -a *
* *
* Copyright: *
* pfm2afm - Copyright (C) IBM Corp., 1991 *
* *
* This code is released for public use as long as the *
* copyright remains intact. This code is provided asis *
* without any warrenties, express or implied. *
* *
* Notes: *
* 1. Much of the information in the original .afm file is *
* lost when the .pfm file is created, and thus cannot be *
* reconstructed by this utility. This is especially true *
* of data for characters not in the Windows character set. *
* *
* 2. This module is coded to be compiled by the MSC 6.0. *
* For other compilers, be careful of the packing of the *
* PFM structure. *
* *
********************************************************************/
/********************************************************************
* *
* Modifications by Rod Smith, 5/22/96 *
* *
* These changes look for the strings "italic", "bold", "black", *
* and "light" in the font's name and set the weight accordingly *
* and adds an ItalicAngle line with a value of "0" or "-12.00". *
* This allows OS/2 programs such as DeScribe to handle the bold *
* and italic attributes appropriately, which was not the case *
* when I used the original version on fonts from the KeyFonts *
* Pro 2002 font CD. *
* *
* I've also increased the size of the buffer used to load the *
* .PFM file; the old size was inadequate for most of the fonts *
* from the SoftKey collection. *
* *
* Compiled with Watcom C 10.6 *
* *
********************************************************************/
/********************************************************************
* *
* Further modifications, 4/21/98, by Rod Smith *
* *
* Minor changes to get the program to compile with gcc under *
* Linux (Red Hat 5.0, to be precise). I had to add an itoa *
* function from the net (the function was buggy, so I had to fix *
* it, too!). I also made the program more friendly towards *
* files with mixed-case filenames. *
* *
********************************************************************/
/********************************************************************
* *
* 1/31/2005, by Paulo Soares *
* *
* This code was integrated into iText. *
* Note that the itoa function mentioned in the comment by Rod *
* Smith is no longer in the code because Java has native support *
* in PrintWriter to convert integers to strings *
* *
********************************************************************/
/********************************************************************
* *
* 7/16/2005, by Bruno lowagie *
* *
* I solved an Eclipse Warning. *
* *
********************************************************************/
/********************************************************************
* *
* 9/14/2006, by Xavier Le Vourch *
* *
* expand import clauses (import java.io.*) *
* the removal of an exception in readString was restored on 9/16 *
* *
********************************************************************/
package com.github.text.pdf;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import com.github.text.error_messages.MessageLocalization;
/**
* Converts a PFM file into an AFM file.
*/
public final class Pfm2afm {
private RandomAccessFileOrArray in;
private PrintWriter out;
/** Creates a new instance of Pfm2afm */
private Pfm2afm(RandomAccessFileOrArray in, OutputStream out) throws IOException {
this.in = in;
this.out = new PrintWriter(new OutputStreamWriter(out, "ISO-8859-1"));
}
/**
* Converts a PFM file into an AFM file.
* @param in the PFM file
* @param out the AFM file
* @throws IOException on error
*/
public static void convert(RandomAccessFileOrArray in, OutputStream out) throws IOException {
Pfm2afm p = new Pfm2afm(in, out);
p.openpfm();
p.putheader();
p.putchartab();
p.putkerntab();
p.puttrailer();
p.out.flush();
}
public static void main(String[] args) {
try {
RandomAccessFileOrArray in = new RandomAccessFileOrArray(args[0]);
OutputStream out = new FileOutputStream(args[1]);
convert(in, out);
in.close();
out.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
private String readString(int n) throws IOException {
byte b[] = new byte[n];
in.readFully(b);
int k;
for (k = 0; k < b.length; ++k) {
if (b[k] == 0)
break;
}
return new String(b, 0, k, "ISO-8859-1");
}
private String readString() throws IOException {
StringBuffer buf = new StringBuffer();
while (true) {
int c = in.read();
if (c <= 0)
break;
buf.append((char)c);
}
return buf.toString();
}
private void outval(int n) {
out.print(' ');
out.print(n);
}
/*
* Output a character entry
*/
private void outchar(int code, int width, String name) {
out.print("C ");
outval(code);
out.print(" ; WX ");
outval(width);
if (name != null) {
out.print(" ; N ");
out.print(name);
}
out.print(" ;\n");
}
private void openpfm() throws IOException {
in.seek(0);
vers = in.readShortLE();
h_len = in.readIntLE();
copyright = readString(60);
type = in.readShortLE();
points = in.readShortLE();
verres = in.readShortLE();
horres = in.readShortLE();
ascent = in.readShortLE();
intleading = in.readShortLE();
extleading = in.readShortLE();
italic = (byte)in.read();
uline = (byte)in.read();
overs = (byte)in.read();
weight = in.readShortLE();
charset = (byte)in.read();
pixwidth = in.readShortLE();
pixheight = in.readShortLE();
kind = (byte)in.read();
avgwidth = in.readShortLE();
maxwidth = in.readShortLE();
firstchar = in.read();
lastchar = in.read();
defchar = (byte)in.read();
brkchar = (byte)in.read();
widthby = in.readShortLE();
device = in.readIntLE();
face = in.readIntLE();
bits = in.readIntLE();
bitoff = in.readIntLE();
extlen = in.readShortLE();
psext = in.readIntLE();
chartab = in.readIntLE();
res1 = in.readIntLE();
kernpairs = in.readIntLE();
res2 = in.readIntLE();
fontname = in.readIntLE();
if (h_len != in.length() || extlen != 30 || fontname < 75 || fontname > 512)
throw new IOException(MessageLocalization.getComposedMessage("not.a.valid.pfm.file"));
in.seek(psext + 14);
capheight = in.readShortLE();
xheight = in.readShortLE();
ascender = in.readShortLE();
descender = in.readShortLE();
}
private void putheader() throws IOException {
out.print("StartFontMetrics 2.0\n");
if (copyright.length() > 0)
out.print("Comment " + copyright + '\n');
out.print("FontName ");
in.seek(fontname);
String fname = readString();
out.print(fname);
out.print("\nEncodingScheme ");
if (charset != 0)
out.print("FontSpecific\n");
else
out.print("AdobeStandardEncoding\n");
/*
* The .pfm is missing full name, so construct from font name by
* changing the hyphen to a space. This actually works in a lot
* of cases.
*/
out.print("FullName " + fname.replace('-', ' '));
if (face != 0) {
in.seek(face);
out.print("\nFamilyName " + readString());
}
out.print("\nWeight ");
if (weight > 475 || fname.toLowerCase().indexOf("bold") >= 0)
out.print("Bold");
else if ((weight < 325 && weight != 0) || fname.toLowerCase().indexOf("light") >= 0)
out.print("Light");
else if (fname.toLowerCase().indexOf("black") >= 0)
out.print("Black");
else
out.print("Medium");
out.print("\nItalicAngle ");
if (italic != 0 || fname.toLowerCase().indexOf("italic") >= 0)
out.print("-12.00");
/* this is a typical value; something else may work better for a
specific font */
else
out.print("0");
/*
* The mono flag in the pfm actually indicates whether there is a
* table of font widths, not if they are all the same.
*/
out.print("\nIsFixedPitch ");
if ((kind & 1) == 0 || /* Flag for mono */
avgwidth == maxwidth ) { /* Avg width = max width */
out.print("true");
isMono = true;
}
else {
out.print("false");
isMono = false;
}
/*
* The font bounding box is lost, but try to reconstruct it.
* Much of this is just guess work. The bounding box is required in
* the .afm, but is not used by the PM font installer.
*/
out.print("\nFontBBox");
if (isMono)
outval(-20); /* Just guess at left bounds */
else
outval(-100);
outval(-(descender+5)); /* Descender is given as positive value */
outval(maxwidth+10);
outval(ascent+5);
/*
* Give other metrics that were kept
*/
out.print("\nCapHeight");
outval(capheight);
out.print("\nXHeight");
outval(xheight);
out.print("\nDescender");
outval(descender);
out.print("\nAscender");
outval(ascender);
out.print('\n');
}
private void putchartab() throws IOException {
int count = lastchar - firstchar + 1;
int ctabs[] = new int[count];
in.seek(chartab);
for (int k = 0; k < count; ++k)
ctabs[k] = in.readUnsignedShortLE();
int back[] = new int[256];
if (charset == 0) {
for (int i = firstchar; i <= lastchar; ++i) {
if (Win2PSStd[i] != 0)
back[Win2PSStd[i]] = i;
}
}
/* Put out the header */
out.print("StartCharMetrics");
outval(count);
out.print('\n');
/* Put out all encoded chars */
if (charset != 0) {
/*
* If the charset is not the Windows standard, just put out
* unnamed entries.
*/
for (int i = firstchar; i <= lastchar; i++) {
if (ctabs[i - firstchar] != 0) {
outchar(i, ctabs[i - firstchar], null);
}
}
}
else {
for (int i = 0; i < 256; i++) {
int j = back[i];
if (j != 0) {
outchar(i, ctabs[j - firstchar], WinChars[j]);
ctabs[j - firstchar] = 0;
}
}
/* Put out all non-encoded chars */
for (int i = firstchar; i <= lastchar; i++) {
if (ctabs[i - firstchar] != 0) {
outchar(-1, ctabs[i - firstchar], WinChars[i]);
}
}
}
/* Put out the trailer */
out.print("EndCharMetrics\n");
}
private void putkerntab() throws IOException {
if (kernpairs == 0)
return;
in.seek(kernpairs);
int count = in.readUnsignedShortLE();
int nzero = 0;
int kerns[] = new int[count * 3];
for (int k = 0; k < kerns.length;) {
kerns[k++] = in.read();
kerns[k++] = in.read();
if ((kerns[k++] = in.readShortLE()) != 0)
++nzero;
}
if (nzero == 0)
return;
out.print("StartKernData\nStartKernPairs");
outval(nzero);
out.print('\n');
for (int k = 0; k < kerns.length; k += 3) {
if (kerns[k + 2] != 0) {
out.print("KPX ");
out.print(WinChars[kerns[k]]);
out.print(' ');
out.print(WinChars[kerns[k + 1]]);
outval(kerns[k + 2]);
out.print('\n');
}
}
/* Put out trailer */
out.print("EndKernPairs\nEndKernData\n");
}
private void puttrailer() {
out.print("EndFontMetrics\n");
}
private short vers;
private int h_len; /* Total length of .pfm file */
private String copyright; /* Copyright string [60]*/
private short type;
private short points;
private short verres;
private short horres;
private short ascent;
private short intleading;
private short extleading;
private byte italic;
private byte uline;
private byte overs;
private short weight;
private byte charset; /* 0=windows, otherwise nomap */
private short pixwidth; /* Width for mono fonts */
private short pixheight;
private byte kind; /* Lower bit off in mono */
private short avgwidth; /* Mono if avg=max width */
private short maxwidth; /* Use to compute bounding box */
private int firstchar; /* First char in table */
private int lastchar; /* Last char in table */
private byte defchar;
private byte brkchar;
private short widthby;
private int device;
private int face; /* Face name */
private int bits;
private int bitoff;
private short extlen;
private int psext; /* PostScript extension */
private int chartab; /* Character width tables */
private int res1;
private int kernpairs; /* Kerning pairs */
private int res2;
private int fontname; /* Font name */
/*
* Some metrics from the PostScript extension
*/
private short capheight; /* Cap height */
private short xheight; /* X height */
private short ascender; /* Ascender */
private short descender; /* Descender (positive) */
private boolean isMono;
/**
* Translate table from 1004 to psstd. 1004 is an extension of the
* Windows translate table used in PM.
*/
private int Win2PSStd[] = {
0, 0, 0, 0, 197, 198, 199, 0, 202, 0, 205, 206, 207, 0, 0, 0, // 00
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10
32, 33, 34, 35, 36, 37, 38, 169, 40, 41, 42, 43, 44, 45, 46, 47, // 20
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, // 30
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 40
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, // 50
193, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, // 60
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, // 70
0, 0, 184, 166, 185, 188, 178, 179, 195, 189, 0, 172, 234, 0, 0, 0, // 80
0, 96, 0, 170, 186, 183, 177, 208, 196, 0, 0, 173, 250, 0, 0, 0, // 90
0, 161, 162, 163, 168, 165, 0, 167, 200, 0, 227, 171, 0, 0, 0, 197, // A0
0, 0, 0, 0, 194, 0, 182, 180, 203, 0, 235, 187, 0, 0, 0, 191, // B0
0, 0, 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, // C0
0, 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, 0, 0, 0, 0, 251, // D0
0, 0, 0, 0, 0, 0, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, // E0
0, 0, 0, 0, 0, 0, 0, 0, 249, 0, 0, 0, 0, 0, 0, 0 // F0
};
/**
* Character class. This is a minor attempt to overcome the problem that
* in the pfm file, all unused characters are given the width of space.
* Note that this array isn't used in iText.
*/
private int WinClass[] = {
0, 0, 0, 0, 2, 2, 2, 0, 2, 0, 2, 2, 2, 0, 0, 0, /* 00 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 20 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, /* 70 */
0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, /* 80 */
0, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, /* 90 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* a0 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* b0 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* c0 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* d0 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* e0 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 /* f0 */
};
/**
* Windows character names. Give a name to the used locations
* for when the all flag is specified.
*/
private String WinChars[] = {
"W00", /* 00 */
"W01", /* 01 */
"W02", /* 02 */
"W03", /* 03 */
"macron", /* 04 */
"breve", /* 05 */
"dotaccent", /* 06 */
"W07", /* 07 */
"ring", /* 08 */
"W09", /* 09 */
"W0a", /* 0a */
"W0b", /* 0b */
"W0c", /* 0c */
"W0d", /* 0d */
"W0e", /* 0e */
"W0f", /* 0f */
"hungarumlaut", /* 10 */
"ogonek", /* 11 */
"caron", /* 12 */
"W13", /* 13 */
"W14", /* 14 */
"W15", /* 15 */
"W16", /* 16 */
"W17", /* 17 */
"W18", /* 18 */
"W19", /* 19 */
"W1a", /* 1a */
"W1b", /* 1b */
"W1c", /* 1c */
"W1d", /* 1d */
"W1e", /* 1e */
"W1f", /* 1f */
"space", /* 20 */
"exclam", /* 21 */
"quotedbl", /* 22 */
"numbersign", /* 23 */
"dollar", /* 24 */
"percent", /* 25 */
"ampersand", /* 26 */
"quotesingle", /* 27 */
"parenleft", /* 28 */
"parenright", /* 29 */
"asterisk", /* 2A */
"plus", /* 2B */
"comma", /* 2C */
"hyphen", /* 2D */
"period", /* 2E */
"slash", /* 2F */
"zero", /* 30 */
"one", /* 31 */
"two", /* 32 */
"three", /* 33 */
"four", /* 34 */
"five", /* 35 */
"six", /* 36 */
"seven", /* 37 */
"eight", /* 38 */
"nine", /* 39 */
"colon", /* 3A */
"semicolon", /* 3B */
"less", /* 3C */
"equal", /* 3D */
"greater", /* 3E */
"question", /* 3F */
"at", /* 40 */
"A", /* 41 */
"B", /* 42 */
"C", /* 43 */
"D", /* 44 */
"E", /* 45 */
"F", /* 46 */
"G", /* 47 */
"H", /* 48 */
"I", /* 49 */
"J", /* 4A */
"K", /* 4B */
"L", /* 4C */
"M", /* 4D */
"N", /* 4E */
"O", /* 4F */
"P", /* 50 */
"Q", /* 51 */
"R", /* 52 */
"S", /* 53 */
"T", /* 54 */
"U", /* 55 */
"V", /* 56 */
"W", /* 57 */
"X", /* 58 */
"Y", /* 59 */
"Z", /* 5A */
"bracketleft", /* 5B */
"backslash", /* 5C */
"bracketright", /* 5D */
"asciicircum", /* 5E */
"underscore", /* 5F */
"grave", /* 60 */
"a", /* 61 */
"b", /* 62 */
"c", /* 63 */
"d", /* 64 */
"e", /* 65 */
"f", /* 66 */
"g", /* 67 */
"h", /* 68 */
"i", /* 69 */
"j", /* 6A */
"k", /* 6B */
"l", /* 6C */
"m", /* 6D */
"n", /* 6E */
"o", /* 6F */
"p", /* 70 */
"q", /* 71 */
"r", /* 72 */
"s", /* 73 */
"t", /* 74 */
"u", /* 75 */
"v", /* 76 */
"w", /* 77 */
"x", /* 78 */
"y", /* 79 */
"z", /* 7A */
"braceleft", /* 7B */
"bar", /* 7C */
"braceright", /* 7D */
"asciitilde", /* 7E */
"W7f", /* 7F */
"euro", /* 80 */
"W81", /* 81 */
"quotesinglbase", /* 82 */
"florin", /* 83 */
"quotedblbase", /* 84 */
"ellipsis", /* 85 */
"dagger", /* 86 */
"daggerdbl", /* 87 */
"circumflex", /* 88 */
"perthousand", /* 89 */
"Scaron", /* 8A */
"guilsinglleft", /* 8B */
"OE", /* 8C */
"W8d", /* 8D */
"Zcaron", /* 8E */
"W8f", /* 8F */
"W90", /* 90 */
"quoteleft", /* 91 */
"quoteright", /* 92 */
"quotedblleft", /* 93 */
"quotedblright", /* 94 */
"bullet", /* 95 */
"endash", /* 96 */
"emdash", /* 97 */
"tilde", /* 98 */
"trademark", /* 99 */
"scaron", /* 9A */
"guilsinglright", /* 9B */
"oe", /* 9C */
"W9d", /* 9D */
"zcaron", /* 9E */
"Ydieresis", /* 9F */
"reqspace", /* A0 */
"exclamdown", /* A1 */
"cent", /* A2 */
"sterling", /* A3 */
"currency", /* A4 */
"yen", /* A5 */
"brokenbar", /* A6 */
"section", /* A7 */
"dieresis", /* A8 */
"copyright", /* A9 */
"ordfeminine", /* AA */
"guillemotleft", /* AB */
"logicalnot", /* AC */
"syllable", /* AD */
"registered", /* AE */
"macron", /* AF */
"degree", /* B0 */
"plusminus", /* B1 */
"twosuperior", /* B2 */
"threesuperior", /* B3 */
"acute", /* B4 */
"mu", /* B5 */
"paragraph", /* B6 */
"periodcentered", /* B7 */
"cedilla", /* B8 */
"onesuperior", /* B9 */
"ordmasculine", /* BA */
"guillemotright", /* BB */
"onequarter", /* BC */
"onehalf", /* BD */
"threequarters", /* BE */
"questiondown", /* BF */
"Agrave", /* C0 */
"Aacute", /* C1 */
"Acircumflex", /* C2 */
"Atilde", /* C3 */
"Adieresis", /* C4 */
"Aring", /* C5 */
"AE", /* C6 */
"Ccedilla", /* C7 */
"Egrave", /* C8 */
"Eacute", /* C9 */
"Ecircumflex", /* CA */
"Edieresis", /* CB */
"Igrave", /* CC */
"Iacute", /* CD */
"Icircumflex", /* CE */
"Idieresis", /* CF */
"Eth", /* D0 */
"Ntilde", /* D1 */
"Ograve", /* D2 */
"Oacute", /* D3 */
"Ocircumflex", /* D4 */
"Otilde", /* D5 */
"Odieresis", /* D6 */
"multiply", /* D7 */
"Oslash", /* D8 */
"Ugrave", /* D9 */
"Uacute", /* DA */
"Ucircumflex", /* DB */
"Udieresis", /* DC */
"Yacute", /* DD */
"Thorn", /* DE */
"germandbls", /* DF */
"agrave", /* E0 */
"aacute", /* E1 */
"acircumflex", /* E2 */
"atilde", /* E3 */
"adieresis", /* E4 */
"aring", /* E5 */
"ae", /* E6 */
"ccedilla", /* E7 */
"egrave", /* E8 */
"eacute", /* E9 */
"ecircumflex", /* EA */
"edieresis", /* EB */
"igrave", /* EC */
"iacute", /* ED */
"icircumflex", /* EE */
"idieresis", /* EF */
"eth", /* F0 */
"ntilde", /* F1 */
"ograve", /* F2 */
"oacute", /* F3 */
"ocircumflex", /* F4 */
"otilde", /* F5 */
"odieresis", /* F6 */
"divide", /* F7 */
"oslash", /* F8 */
"ugrave", /* F9 */
"uacute", /* FA */
"ucircumflex", /* FB */
"udieresis", /* FC */
"yacute", /* FD */
"thorn", /* FE */
"ydieresis" /* FF */
};
}
| [
"dan.schmidt1@gmail.com"
] | dan.schmidt1@gmail.com |
f2846b06db0ad0f750726f425962d87cbed285e5 | 1660922fd00c28e4bf3f3cfd292bc49768d1bbb0 | /app/src/main/java/ds/fragtofragviaviewmodel/SharedViewModel.java | 2ca4f2e4f9aa603e7426754f709385aa04aff27c | [] | no_license | developersancho/FragToFragviaViewModel | ffed553c9f5d1ace04b14b8a6899901b6d3f2979 | 468dcb6f35011696f06ed7cf454f687fabe8818d | refs/heads/master | 2020-04-05T08:47:51.879192 | 2018-11-08T15:43:20 | 2018-11-08T15:43:20 | 156,729,930 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 448 | java | package ds.fragtofragviaviewmodel;
import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.MutableLiveData;
import android.arch.lifecycle.ViewModel;
public class SharedViewModel extends ViewModel {
private MutableLiveData<CharSequence> text = new MutableLiveData<>();
public void setText(CharSequence input) {
text.setValue(input);
}
public LiveData<CharSequence> getText() {
return text;
}
}
| [
"developersancho@gmail.com"
] | developersancho@gmail.com |
eaca315b3d007cd70aaa84bd364bf0161ba08f6f | 0b58c13d5485d2a042ef77769aad51465faeaa92 | /SupervisorM30/monmon/src/main/java/com/boha/supervisor/m35/PhotoUploadToFbService.java | deb0a897a77d115129dab1835e56cdbbb5f8afe9 | [] | no_license | bohatmx/MonitorAppsRepo | 5718a610a0d8eebf2e402454ecaf13c5f7990fef | 0fb1cce3188da4c9bcedc8fad56aafd48f3a6e5f | refs/heads/master | 2021-03-16T09:42:29.025641 | 2016-08-11T17:57:14 | 2016-08-11T17:57:14 | 27,969,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,740 | java | package com.boha.supervisor.m35;
import android.app.IntentService;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
/**
* An {@link IntentService} subclass for handling asynchronous task requests in
* a service on a separate handler thread.
* <p>
* TODO: Customize class - update intent actions, extra parameters and static
* helper methods.
*/
public class PhotoUploadToFbService extends IntentService {
static final String TAG = PhotoUploadToFbService.class.getSimpleName();
public PhotoUploadToFbService() {
super("PhotoUploadToFbService");
}
@Override
protected void onHandleIntent(Intent intent) {
if (intent != null) {
}
}
private void uploadFromUri(Uri fileUri) {
Log.d(TAG, "uploadFromUri:src:" + fileUri.toString());
StorageReference mStorageRef = FirebaseStorage.getInstance().getReference();
// [START get_child_ref]
// Get a reference to store file at photos/<FILENAME>.jpg
final StorageReference photoRef = mStorageRef.child("photos")
.child(fileUri.getLastPathSegment());
// [END get_child_ref]
// Upload file to Firebase Storage
// [START_EXCLUDE]
// [END_EXCLUDE]
Log.d(TAG, "uploadFromUri:dst:" + photoRef.getPath());
// photoRef.putFile(fileUri)
// .addOnSuccessListener(this, new OnSuccessListener<UploadTask.TaskSnapshot>() {
// @Override
// public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
// // Upload succeeded
// Log.d(TAG, "uploadFromUri:onSuccess");
//
// // Get the public download URL
// Uri mDownloadUrl = taskSnapshot.getMetadata().getDownloadUrl();
//
//
// }
// })
// .addOnFailureListener(this, new OnFailureListener() {
// @Override
// public void onFailure(@NonNull Exception exception) {
// // Upload failed
// Log.w(TAG, "uploadFromUri:onFailure", exception);
//
// mDownloadUrl = null;
//
// // [START_EXCLUDE]
// hideProgressDialog();
// Toast.makeText(MainActivity.this, "Error: upload failed",
// Toast.LENGTH_SHORT).show();
// updateUI(mAuth.getCurrentUser());
// // [END_EXCLUDE]
// }
// });
}
}
| [
"malengatiger@gmail.com"
] | malengatiger@gmail.com |
fec639285c2e6f20e0f2afeb664a07c8aa1ccb65 | d593ad37a82a6396effceaf11679e70fddcabc06 | /game/7/StarWars/src/com/StarWars/StartGame.java | 9c99e8e7af2104e2b816aaa284f4264bf437311c | [] | no_license | psh667/android | 8a18ea22c8c977852ba2cd9361a8489586e06f05 | 8f7394de8e26ce5106d9828cf95eb1617afca757 | refs/heads/master | 2018-12-27T23:30:46.988404 | 2013-09-09T13:16:46 | 2013-09-09T13:16:46 | 12,700,292 | 3 | 5 | null | null | null | null | UHC | Java | false | false | 2,060 | java | package com.StarWars;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
public class StartGame extends Activity {
MediaPlayer mPlayer;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.startgame);
mPlayer = MediaPlayer.create(this, R.raw.rondo); // 파일 읽기 green은 파일명
mPlayer.setVolume(0.7f, 0.7f); // 볼륨 설정
mPlayer.setLooping(true); // 반복 연주
mPlayer.start();
findViewById(R.id.imgStart).setOnClickListener(OnMyClick);
findViewById(R.id.imgQuit).setOnClickListener(OnMyClick);
findViewById(R.id.imgOpts).setOnClickListener(OnMyClick);
findViewById(R.id.imgHelp).setOnClickListener(OnMyClick);
findViewById(R.id.imgAbout).setOnClickListener(OnMyClick);
}
//---------------------------------
// OnClick Listener
//---------------------------------
Button.OnClickListener OnMyClick = new Button.OnClickListener() {
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.imgStart:
startActivity(new Intent(StartGame.this, MainActivity.class));
mPlayer.stop();
finish();
break;
case R.id.imgQuit:
mPlayer.stop();
finish();
break;
case R.id.imgOpts:
startActivity(new Intent(StartGame.this, Options.class));
break;
case R.id.imgHelp:
startActivity(new Intent(StartGame.this, Help.class));
break;
case R.id.imgAbout:
startActivity(new Intent(StartGame.this, About.class));
}
}
};
}
| [
"paksan@daum.net"
] | paksan@daum.net |
6223e5a53fb5c15eab0bd536908efbcf8a0211f1 | 3f835e2852647e3ce3d8e7092fdd8b912ceaa023 | /extras/crouton-library/src/de/keyboardsurfer/android/widget/crouton/Crouton.java | ffa9a51e61cffde5cb26ed4fd061bd34a596b019 | [] | no_license | tinyao/boocle | 32a4713134c6611a7dc2ed56f3120c4c4c343121 | 02345cddc963524f3673a2139c91f227bc11650d | refs/heads/master | 2020-06-08T08:47:00.839364 | 2015-08-08T15:34:41 | 2015-08-08T15:34:41 | 11,716,332 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 32,415 | java | /*
* Copyright 2012 - 2013 Benjamin Weiss
* Copyright 2012 Neofonie Mobile GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.keyboardsurfer.android.widget.crouton;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Shader;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.util.TypedValue;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
/*
* Based on an article by Cyril Mottier (http://android.cyrilmottier.com/?p=773) <br>
*/
/**
* Displays information in a non-invasive context related manner. Like
* {@link android.widget.Toast}, but better.
* <p/>
* <b>Important: </b>
* Call {@link Crouton#clearCroutonsForActivity(Activity)} within
* {@link android.app.Activity#onDestroy()} to avoid {@link Context} leaks.
*/
public final class Crouton {
private static final int IMAGE_ID = 0x100;
private static final int TEXT_ID = 0x101;
private final CharSequence text;
private final Style style;
private Configuration configuration = null;
private final View customView;
private boolean isOverlay = false;
private OnClickListener onClickListener;
private Activity activity;
private ViewGroup viewGroup;
private FrameLayout croutonView;
private Animation inAnimation;
private Animation outAnimation;
private LifecycleCallback lifecycleCallback = null;
/**
* Creates the {@link Crouton}.
*
* @param activity
* The {@link Activity} that the {@link Crouton} should be attached
* to.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
*/
private Crouton(Activity activity, CharSequence text, Style style) {
if ((activity == null) || (text == null) || (style == null)) {
throw new IllegalArgumentException("Null parameters are not accepted");
}
this.activity = activity;
this.viewGroup = null;
this.text = text;
this.style = style;
this.customView = null;
}
private Crouton(Activity activity, CharSequence text, Style style, boolean isOverlay) {
if ((activity == null) || (text == null) || (style == null)) {
throw new IllegalArgumentException("Null parameters are not accepted");
}
this.activity = activity;
this.viewGroup = null;
this.text = text;
this.style = style;
this.customView = null;
this.isOverlay = isOverlay;
}
/**
* Creates the {@link Crouton}.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
*/
private Crouton(Activity activity, CharSequence text, Style style, ViewGroup viewGroup) {
if ((activity == null) || (text == null) || (style == null)) {
throw new IllegalArgumentException("Null parameters are not accepted");
}
this.activity = activity;
this.text = text;
this.style = style;
this.viewGroup = viewGroup;
this.customView = null;
}
/**
* Creates the {@link Crouton}.
*
* @param activity
* The {@link Activity} that the {@link Crouton} should be attached
* to.
* @param customView
* The custom {@link View} to display
*/
private Crouton(Activity activity, View customView) {
if ((activity == null) || (customView == null)) {
throw new IllegalArgumentException("Null parameters are not accepted");
}
this.activity = activity;
this.viewGroup = null;
this.customView = customView;
this.style = new Style.Builder().build();
this.text = null;
}
/**
* Creates the {@link Crouton}.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param customView
* The custom {@link View} to display
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
*/
private Crouton(Activity activity, View customView, ViewGroup viewGroup) {
this(activity, customView, viewGroup, Configuration.DEFAULT);
}
/**
* Creates the {@link Crouton}.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param customView
* The custom {@link View} to display
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
* @param configuration
* The {@link Configuration} for this {@link Crouton}.
*/
private Crouton(final Activity activity, final View customView, final ViewGroup viewGroup,
final Configuration configuration) {
if ((activity == null) || (customView == null)) {
throw new IllegalArgumentException("Null parameters are not accepted");
}
this.activity = activity;
this.customView = customView;
this.viewGroup = viewGroup;
this.style = new Style.Builder().build();
this.text = null;
this.configuration = configuration;
}
/**
* Creates a {@link Crouton} with provided text and style for a given
* activity.
*
* @param activity
* The {@link Activity} that the {@link Crouton} should be attached
* to.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
*
* @return The created {@link Crouton}.
*/
public static Crouton makeText(Activity activity, CharSequence text, Style style) {
return new Crouton(activity, text, style);
}
public static Crouton makeText(Activity activity, CharSequence text, Style style, boolean overlay) {
return new Crouton(activity, text, style, overlay);
}
/**
* Creates a {@link Crouton} with provided text and style for a given
* activity.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
*
* @return The created {@link Crouton}.
*/
public static Crouton makeText(Activity activity, CharSequence text, Style style, ViewGroup viewGroup) {
return new Crouton(activity, text, style, viewGroup);
}
/**
* Creates a {@link Crouton} with provided text and style for a given
* activity.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroupResId
* The resource id of the {@link ViewGroup} that this {@link Crouton} should be added to.
*
* @return The created {@link Crouton}.
*/
public static Crouton makeText(Activity activity, CharSequence text, Style style, int viewGroupResId) {
return new Crouton(activity, text, style, (ViewGroup) activity.findViewById(viewGroupResId));
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity.
*
* @param activity
* The {@link Activity} that the {@link Crouton} should be attached
* to.
* @param textResourceId
* The resource id of the text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
*
* @return The created {@link Crouton}.
*/
public static Crouton makeText(Activity activity, int textResourceId, Style style) {
return makeText(activity, activity.getString(textResourceId), style);
}
public static Crouton makeText(Activity activity, int textResourceId, Style style, boolean overlay) {
return makeText(activity, activity.getString(textResourceId), style, overlay);
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param textResourceId
* The resource id of the text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
*
* @return The created {@link Crouton}.
*/
public static Crouton makeText(Activity activity, int textResourceId, Style style, ViewGroup viewGroup) {
return makeText(activity, activity.getString(textResourceId), style, viewGroup);
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param textResourceId
* The resource id of the text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroupResId
* The resource id of the {@link ViewGroup} that this {@link Crouton} should be added to.
*
* @return The created {@link Crouton}.
*/
public static Crouton makeText(Activity activity, int textResourceId, Style style, int viewGroupResId) {
return makeText(activity, activity.getString(textResourceId), style,
(ViewGroup) activity.findViewById(viewGroupResId));
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity.
*
* @param activity
* The {@link Activity} that the {@link Crouton} should be attached
* to.
* @param customView
* The custom {@link View} to display
*
* @return The created {@link Crouton}.
*/
public static Crouton make(Activity activity, View customView) {
return new Crouton(activity, customView);
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param customView
* The custom {@link View} to display
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
*
* @return The created {@link Crouton}.
*/
public static Crouton make(Activity activity, View customView, ViewGroup viewGroup) {
return new Crouton(activity, customView, viewGroup);
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param customView
* The custom {@link View} to display
* @param viewGroupResId
* The resource id of the {@link ViewGroup} that this {@link Crouton} should be added to.
*
* @return The created {@link Crouton}.
*/
public static Crouton make(Activity activity, View customView, int viewGroupResId) {
return new Crouton(activity, customView, (ViewGroup) activity.findViewById(viewGroupResId));
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param customView
* The custom {@link View} to display
* @param viewGroupResId
* The resource id of the {@link ViewGroup} that this {@link Crouton} should be added to.
* @param configuration
* The configuration for this crouton.
*
* @return The created {@link Crouton}.
*/
public static Crouton make(Activity activity, View customView, int viewGroupResId,
final Configuration configuration) {
return new Crouton(activity, customView, (ViewGroup) activity.findViewById(viewGroupResId), configuration);
}
/**
* Creates a {@link Crouton} with provided text and style for a given activity
* and displays it directly.
*
* @param activity
* The {@link android.app.Activity} that the {@link Crouton} should
* be attached to.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
*/
public static void showText(Activity activity, CharSequence text, Style style) {
makeText(activity, text, style).show();
}
/**
* Creates a {@link Crouton} with provided text and style for a given activity
* and displays it directly.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
*/
public static void showText(Activity activity, CharSequence text, Style style, ViewGroup viewGroup) {
makeText(activity, text, style, viewGroup).show();
}
/**
* Creates a {@link Crouton} with provided text and style for a given activity
* and displays it directly.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroupResId
* The resource id of the {@link ViewGroup} that this {@link Crouton} should be added to.
*/
public static void showText(Activity activity, CharSequence text, Style style, int viewGroupResId) {
makeText(activity, text, style, (ViewGroup) activity.findViewById(viewGroupResId)).show();
}
/**
* Creates a {@link Crouton} with provided text and style for a given activity
* and displays it directly.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param text
* The text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroupResId
* The resource id of the {@link ViewGroup} that this {@link Crouton} should be added to.
* @param configuration
* The configuration for this Crouton.
*/
public static void showText(Activity activity, CharSequence text, Style style, int viewGroupResId,
final Configuration configuration) {
makeText(activity, text, style, (ViewGroup) activity.findViewById(viewGroupResId)).setConfiguration(configuration)
.show();
}
/**
* Creates a {@link Crouton} with provided text and style for a given activity
* and displays it directly.
*
* @param activity
* The {@link android.app.Activity} that the {@link Crouton} should
* be attached to.
* @param customView
* The custom {@link View} to display
*/
public static void show(Activity activity, View customView) {
make(activity, customView).show();
}
/**
* Creates a {@link Crouton} with provided text and style for a given activity
* and displays it directly.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param customView
* The custom {@link View} to display
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
*/
public static void show(Activity activity, View customView, ViewGroup viewGroup) {
make(activity, customView, viewGroup).show();
}
/**
* Creates a {@link Crouton} with provided text and style for a given activity
* and displays it directly.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param customView
* The custom {@link View} to display
* @param viewGroupResId
* The resource id of the {@link ViewGroup} that this {@link Crouton} should be added to.
*/
public static void show(Activity activity, View customView, int viewGroupResId) {
make(activity, customView, viewGroupResId).show();
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity and displays it directly.
*
* @param activity
* The {@link Activity} that the {@link Crouton} should be attached
* to.
* @param textResourceId
* The resource id of the text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
*/
public static void showText(Activity activity, int textResourceId, Style style) {
showText(activity, activity.getString(textResourceId), style);
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity and displays it directly.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param textResourceId
* The resource id of the text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroup
* The {@link ViewGroup} that this {@link Crouton} should be added to.
*/
public static void showText(Activity activity, int textResourceId, Style style, ViewGroup viewGroup) {
showText(activity, activity.getString(textResourceId), style, viewGroup);
}
/**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity and displays it directly.
*
* @param activity
* The {@link Activity} that represents the context in which the Crouton should exist.
* @param textResourceId
* The resource id of the text you want to display.
* @param style
* The style that this {@link Crouton} should be created with.
* @param viewGroupResId
* The resource id of the {@link ViewGroup} that this {@link Crouton} should be added to.
*/
public static void showText(Activity activity, int textResourceId, Style style, int viewGroupResId) {
showText(activity, activity.getString(textResourceId), style, viewGroupResId);
}
/**
* Allows hiding of a previously displayed {@link Crouton}.
*
* @param crouton
* The {@link Crouton} you want to hide.
*/
public static void hide(Crouton crouton) {
Manager.getInstance().removeCrouton(crouton);
}
/**
* Cancels all queued {@link Crouton}s. If there is a {@link Crouton}
* displayed currently, it will be the last one displayed.
*/
public static void cancelAllCroutons() {
Manager.getInstance().clearCroutonQueue();
}
/**
* Clears (and removes from {@link Activity}'s content view, if necessary) all
* croutons for the provided activity
*
* @param activity
* - The {@link Activity} to clear the croutons for.
*/
public static void clearCroutonsForActivity(Activity activity) {
Manager.getInstance().clearCroutonsForActivity(activity);
}
/** Cancels a {@link Crouton} immediately. */
public void cancel() {
Manager manager = Manager.getInstance();
manager.removeCroutonImmediately(this);
}
/**
* Displays the {@link Crouton}. If there's another {@link Crouton} visible at
* the time, this {@link Crouton} will be displayed afterwards.
*/
public void show() {
Manager.getInstance().add(this);
}
public Animation getInAnimation() {
if ((null == this.inAnimation) && (null != this.activity)) {
if (getConfiguration().inAnimationResId > 0) {
this.inAnimation = AnimationUtils.loadAnimation(getActivity(), getConfiguration().inAnimationResId);
} else {
measureCroutonView();
if(isOverlay)
this.inAnimation = DefaultAnimationsBuilder.buildDefaultSlideInDownOverlayAnimation(getView());
else
this.inAnimation = DefaultAnimationsBuilder.buildDefaultSlideInDownAnimation(getView());
}
}
return inAnimation;
}
public Animation getOutAnimation() {
if ((null == this.outAnimation) && (null != this.activity)) {
if (getConfiguration().outAnimationResId > 0) {
this.outAnimation = AnimationUtils.loadAnimation(getActivity(), getConfiguration().outAnimationResId);
} else {
if(isOverlay){
this.outAnimation = DefaultAnimationsBuilder.buildDefaultSlideOutUpOverlayAnimation(getView());
}else{
this.outAnimation = DefaultAnimationsBuilder.buildDefaultSlideOutUpAnimation(getView());
}
}
}
return outAnimation;
}
/**
* @param lifecycleCallback
* Callback object for notable events in the life of a Crouton.
*/
public void setLifecycleCallback(LifecycleCallback lifecycleCallback) {
this.lifecycleCallback = lifecycleCallback;
}
/**
* Allows setting of an {@link OnClickListener} directly to a {@link Crouton} without having to use a custom view.
*
* @param onClickListener
* The {@link OnClickListener} to set.
*
* @return this {@link Crouton}.
*/
public Crouton setOnClickListener(OnClickListener onClickListener) {
this.onClickListener = onClickListener;
return this;
}
/**
* Set the {@link Configuration} on this {@link Crouton}, prior to showing it.
*
* @param configuration
* a {@link Configuration} built using the {@link Configuration.Builder}.
*
* @return this {@link Crouton}.
*/
public Crouton setConfiguration(final Configuration configuration) {
this.configuration = configuration;
return this;
}
@Override
public String toString() {
return "Crouton{" +
"text=" + text +
", style=" + style +
", configuration=" + configuration +
", customView=" + customView +
", onClickListener=" + onClickListener +
", activity=" + activity +
", viewGroup=" + viewGroup +
", croutonView=" + croutonView +
", inAnimation=" + inAnimation +
", outAnimation=" + outAnimation +
", lifecycleCallback=" + lifecycleCallback +
'}';
}
/**
* Convenience method to get the license text for embedding within your application.
*
* @return The license text.
*/
public static String getLicenseText() {
return "This application uses the Crouton library.\n\n" +
"Copyright 2012 - 2013 Benjamin Weiss \n" +
"Copyright 2012 Neofonie Mobile GmbH\n" +
"\n" +
"Licensed under the Apache License, Version 2.0 (the \"License\");\n" +
"you may not use this file except in compliance with the License.\n" +
"You may obtain a copy of the License at\n" +
"\n" +
" http://www.apache.org/licenses/LICENSE-2.0\n" +
"\n" +
"Unless required by applicable law or agreed to in writing, software\n" +
"distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
"See the License for the specific language governing permissions and\n" +
"limitations under the License.";
}
//////////////////////////////////////////////////////////////////////////////////////
// You have reached the internal API of Crouton.
// If you do not plan to develop for Crouton there is nothing of interest below here.
//////////////////////////////////////////////////////////////////////////////////////
/**
* @return <code>true</code> if the {@link Crouton} is being displayed, else
* <code>false</code>.
*/
boolean isShowing() {
return (null != activity) && (isCroutonViewNotNull() || isCustomViewNotNull());
}
private boolean isCroutonViewNotNull() {
return (null != croutonView) && (null != croutonView.getParent());
}
private boolean isCustomViewNotNull() {
return (null != customView) && (null != customView.getParent());
}
/** Removes the activity reference this {@link Crouton} is holding */
void detachActivity() {
activity = null;
}
/** Removes the viewGroup reference this {@link Crouton} is holding */
void detachViewGroup() {
viewGroup = null;
}
/** Removes the lifecycleCallback reference this {@link Crouton} is holding */
void detachLifecycleCallback() {
lifecycleCallback = null;
}
/** @return the lifecycleCallback */
LifecycleCallback getLifecycleCallback() {
return lifecycleCallback;
}
/** @return the style */
Style getStyle() {
return style;
}
/** @return this croutons configuration */
Configuration getConfiguration() {
if (null == configuration) {
configuration = getStyle().configuration;
}
return configuration;
}
/** @return the activity */
Activity getActivity() {
return activity;
}
/** @return the viewGroup */
ViewGroup getViewGroup() {
return viewGroup;
}
/** @return the text */
CharSequence getText() {
return text;
}
/** @return the view */
View getView() {
// return the custom view if one exists
if (null != this.customView) {
return this.customView;
}
// if already setup return the view
if (null == this.croutonView) {
initializeCroutonView();
}
return croutonView;
}
private void measureCroutonView() {
View view = getView();
int widthSpec;
if (viewGroup != null) {
widthSpec = View.MeasureSpec.makeMeasureSpec(viewGroup.getMeasuredWidth(), View.MeasureSpec.AT_MOST);
} else {
widthSpec = View.MeasureSpec.makeMeasureSpec(activity.getWindow().getDecorView().getMeasuredWidth(),
View.MeasureSpec.AT_MOST);
}
view.measure(widthSpec, View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
}
private void initializeCroutonView() {
Resources resources = this.activity.getResources();
this.croutonView = initializeCroutonViewGroup(resources);
// create content view
RelativeLayout contentView = initializeContentView(resources);
this.croutonView.addView(contentView);
}
private FrameLayout initializeCroutonViewGroup(Resources resources) {
FrameLayout croutonView = new FrameLayout(this.activity);
if (null != onClickListener) {
croutonView.setOnClickListener(onClickListener);
}
final int height;
if (this.style.heightDimensionResId > 0) {
height = resources.getDimensionPixelSize(this.style.heightDimensionResId);
} else {
height = this.style.heightInPixels;
}
final int width;
if (this.style.widthDimensionResId > 0) {
width = resources.getDimensionPixelSize(this.style.widthDimensionResId);
} else {
width = this.style.widthInPixels;
}
croutonView.setLayoutParams(
new FrameLayout.LayoutParams(width != 0 ? width : FrameLayout.LayoutParams.MATCH_PARENT, height));
// set background
if (this.style.backgroundColorValue != -1) {
croutonView.setBackgroundColor(this.style.backgroundColorValue);
} else {
croutonView.setBackgroundColor(resources.getColor(this.style.backgroundColorResourceId));
}
// set the background drawable if set. This will override the background
// color.
if (this.style.backgroundDrawableResourceId != 0) {
Bitmap background = BitmapFactory.decodeResource(resources, this.style.backgroundDrawableResourceId);
BitmapDrawable drawable = new BitmapDrawable(resources, background);
if (this.style.isTileEnabled) {
drawable.setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
}
croutonView.setBackgroundDrawable(drawable);
}
return croutonView;
}
private RelativeLayout initializeContentView(final Resources resources) {
RelativeLayout contentView = new RelativeLayout(this.activity);
contentView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT));
// set padding
int padding = this.style.paddingInPixels;
// if a padding dimension has been set, this will overwrite any padding
// in pixels
if (this.style.paddingDimensionResId > 0) {
padding = resources.getDimensionPixelSize(this.style.paddingDimensionResId);
}
contentView.setPadding(padding, padding, padding, padding);
// only setup image if one is requested
ImageView image = null;
if ((null != this.style.imageDrawable) || (0 != this.style.imageResId)) {
image = initializeImageView();
contentView.addView(image, image.getLayoutParams());
}
TextView text = initializeTextView(resources);
RelativeLayout.LayoutParams textParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
if (null != image) {
textParams.addRule(RelativeLayout.RIGHT_OF, image.getId());
}
contentView.addView(text, textParams);
return contentView;
}
private TextView initializeTextView(final Resources resources) {
TextView text = new TextView(this.activity);
text.setId(TEXT_ID);
text.setText(this.text);
// text.setTypeface(Typeface.DEFAULT);
text.setGravity(this.style.gravity);
// set the text color if set
if (this.style.textColorResourceId != 0) {
text.setTextColor(resources.getColor(this.style.textColorResourceId));
}
// Set the text size. If the user has set a text size and text
// appearance, the text size in the text appearance
// will override this.
if (this.style.textSize != 0) {
text.setTextSize(TypedValue.COMPLEX_UNIT_SP, this.style.textSize);
}
// Setup the shadow if requested
if (this.style.textShadowColorResId != 0) {
initializeTextViewShadow(resources, text);
}
// Set the text appearance
if (this.style.textAppearanceResId != 0) {
text.setTextAppearance(this.activity, this.style.textAppearanceResId);
}
return text;
}
private void initializeTextViewShadow(final Resources resources, final TextView text) {
int textShadowColor = resources.getColor(this.style.textShadowColorResId);
float textShadowRadius = this.style.textShadowRadius;
float textShadowDx = this.style.textShadowDx;
float textShadowDy = this.style.textShadowDy;
text.setShadowLayer(textShadowRadius, textShadowDx, textShadowDy, textShadowColor);
}
private ImageView initializeImageView() {
ImageView image;
image = new ImageView(this.activity);
image.setId(IMAGE_ID);
image.setAdjustViewBounds(true);
image.setScaleType(this.style.imageScaleType);
// set the image drawable if not null
if (null != this.style.imageDrawable) {
image.setImageDrawable(this.style.imageDrawable);
}
// set the image resource if not 0. This will overwrite the drawable
// if both are set
if (this.style.imageResId != 0) {
image.setImageResource(this.style.imageResId);
}
RelativeLayout.LayoutParams imageParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
imageParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
imageParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
image.setLayoutParams(imageParams);
return image;
}
}
| [
"yao2app@gmail.com"
] | yao2app@gmail.com |
6238c1a8e73f0c08f1c59ce70136672cd6645912 | e6292b315e16053932b4bee173d34b1b1fb9766f | /HaTest/src/main/java/ha/controller/CacheController.java | 4413e98ccf3438a1cbf671ee92cdda38a619adff | [] | no_license | wangymd/ha | 120a7dbb68b7873fd94be02735912151f29702b5 | 78c07d2995ef28231d5cdf5d24a1fc45c92fadd3 | refs/heads/master | 2022-05-13T17:45:36.093267 | 2019-06-16T03:45:14 | 2019-06-16T03:45:14 | 191,594,506 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,540 | java | package ha.controller;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import ha.service.RedisService;
/**
* 缓存管理
* @author wangym
*
*/
@RestController
@RequestMapping("/cache")
public class CacheController {
@Autowired
RedisService redisService;
@RequestMapping(path = "/set")
public void set(@RequestParam(name = "key",required = true) String key, @RequestParam(name = "value",required = true) Object value) {
redisService.set(key, value);
}
@RequestMapping(path = "/setWithTimeout")
public void setWithTimeout(@RequestParam(name = "key",required = true) String key,
@RequestParam(name = "value",required = true) Object value,
@RequestParam(name = "timeout",required = false,defaultValue = "60") long timeout) {
redisService.setWithTimeout(key, value, timeout);
}
@RequestMapping(path = "/get")
public Object get(@RequestParam(name = "key",required = true) String key) {
return redisService.get(key);
}
@RequestMapping(path = "/delete")
public Boolean delete(@RequestParam(name = "key",required = true) String key) {
return redisService.delete(key);
}
@RequestMapping(path = "/keys")
public Set<String> keys(@RequestParam(name = "key",required = false) String key) {
return redisService.keys(key);
}
}
| [
"314851768@qq.com"
] | 314851768@qq.com |
0c2331b06eac08dd41b245a251c77c4186a27039 | 5e44069cec039d0b9d973a9b175d9b96055b5c78 | /src/org/tensorflow/demo/env/DetectedObject.java | db58d036441f7e2ac7e3d714cd40078ccbf9bf8e | [] | no_license | vietcoscc/TFDetect | f73ba41033a449bd7766380a9fa74961f57a33d4 | 992b3eaba6c58d3a1c005af12fb2ca0baab555a3 | refs/heads/master | 2021-05-11T22:28:15.781607 | 2018-05-10T16:54:46 | 2018-05-10T16:54:46 | 117,493,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 759 | java | package org.tensorflow.demo.env;
import android.graphics.Bitmap;
import org.tensorflow.demo.Classifier;
/**
* Created by viet on 01/02/2018.
*/
public class DetectedObject {
private Bitmap bitmap;
private Classifier.Recognition recognition;
public DetectedObject(Bitmap bitmap, Classifier.Recognition recognition) {
this.bitmap = bitmap;
this.recognition = recognition;
}
public Bitmap getBitmap() {
return bitmap;
}
public void setBitmap(Bitmap bitmap) {
this.bitmap = bitmap;
}
public Classifier.Recognition getRecognition() {
return recognition;
}
public void setRecognition(Classifier.Recognition recognition) {
this.recognition = recognition;
}
}
| [
"vietcoscc@gmail.com"
] | vietcoscc@gmail.com |
126f3a746ff0da2bf4cb222f7197ff818d717f4e | 342e432027e5e9789802a554e55bf5f842f63c5e | /Java/Thinking-in-Java/exercise/src/containers/Maps.java | 622aa45fec403db7e676f46fdc62f27a2641ea8b | [] | no_license | etins/Archive | 74dd692a702fb62037fe36ac068b44ec177d7cd6 | 70554057353e2a61f5e7a8e70887f155f3b16ed0 | refs/heads/master | 2021-09-06T22:32:04.585203 | 2018-02-12T16:52:25 | 2018-02-12T16:52:25 | 116,618,246 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,600 | java | package containers;
import java.util.concurrent.*;
import java.util.*;
import net.mindview.util.*;
import static net.mindview.util.Print.*;
public class Maps {
public static void printKeys(Map<Integer, String> map) {
printnb("Size = " + map.size() + ", ");
printnb("Keys: ");
printnb(map.keySet()); // Produce a Set of the keys
}
public static void test(Map<Integer, String> map) {
print(map.getClass().getSimpleName());
map.putAll(new CountingMapData(25));
printKeys(map);
// Producing a Collection of the values;
printnb("Values: ");
printnb(map.values());
printnb(map);
printnb("map.containKey(11): " + map.containsKey(11));
print("map.get(11): " + map.get(11));
print("map.containsValue(\"F0\"): "
+ map.containsValue("F0"));
Integer key = map.keySet().iterator().next();
print("First key in map: " + key);
map.remove(key);
printKeys(map);
map.clear();
print("map.isEmpty(): " + map.isEmpty());
map.putAll(new CountingMapData(25));
// Operations on the Set change the Map
map.keySet().removeAll(map.keySet());
print("map.isEmpty(): " + map.isEmpty());
}
public static void main(String[] args) {
test(new HashMap<Integer, String>());
test(new TreeMap<Integer, String>());
test(new LinkedHashMap<Integer, String>());
test(new IdentityHashMap<Integer, String>());
test(new ConcurrentHashMap<Integer, String>());
test(new WeakHashMap<Integer, String>());
}
}
| [
"etinsj@gmail.com"
] | etinsj@gmail.com |
6471e9dddf691e155f2c18ebbce11891b27213d5 | 4a8b81b7cb0c3647f28c9e3f0ddcfe115a891c00 | /src/main/java/com/myhabit/repository/EatingHabitRepository.java | 39a0181502e629784c4d228b97b345a238cef128 | [] | no_license | phuongHoang01/my_habit-be | ec596d5ab921e7d510004abc9c4d8cec3bc4b242 | 4b698c75653f0c367beca7e3f1682f4b805c40a5 | refs/heads/master | 2023-02-23T17:58:40.556533 | 2021-01-27T02:19:30 | 2021-01-27T02:19:30 | 330,540,103 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 695 | java | package com.myhabit.repository;
import java.time.LocalDate;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.myhabit.core.BaseRepository;
import com.myhabit.entities.EatingHabit;
@Repository
public interface EatingHabitRepository extends HabitRepository<EatingHabit> {
public List<EatingHabit> findEatingHabitByCreateAtBetween(LocalDate fromDate, LocalDate toDate);
}
| [
"won.vn2000@yahoo.com.vn"
] | won.vn2000@yahoo.com.vn |
e29e38c1544ab8d09039b1b7fa04d5b5b2ebf225 | e9dae1871a4201b21a410177c08c21bbef9c3f17 | /app/src/main/java/com/pity/firebaseappautentificacion/activitys/OlvidasteContraseniaActivity.java | b25a9f33d1d571d3d308b68631a6e4985b3887ee | [] | no_license | programandoBaradero/Perros-App | 420daf06fa17915f6e936159f9ebfd8e3f2fa673 | bb0a2ad48c389feed737cc3095b47ec003a3c9a9 | refs/heads/master | 2020-04-23T22:43:45.639474 | 2019-02-23T00:30:34 | 2019-02-23T00:30:34 | 171,511,935 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,751 | java | package com.pity.firebaseappautentificacion.activitys;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.pity.firebaseappautentificacion.R;
import com.pity.firebaseappautentificacion.presenters.OlvidasteContraseniaPresenter;
public class OlvidasteContraseniaActivity extends AppCompatActivity implements View.OnClickListener {
private EditText etxMail;
private Button btnEnviar;
private FirebaseAuth firebaseAuth;
private OlvidasteContraseniaPresenter presenter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_olvidaste_contrasenia);
etxMail = findViewById(R.id.edit_text_email_olvidate_contrasenia);
btnEnviar = findViewById(R.id.button_enviar_olvidaste_contrasenia);
firebaseAuth = FirebaseAuth.getInstance();
presenter = new OlvidasteContraseniaPresenter(this, firebaseAuth);
btnEnviar.setOnClickListener(this);
}
@Override
public void onClick(View view) {
if (view == btnEnviar){
String email = etxMail.getText().toString().trim();
presenter.enviarEmail(email);
startActivity(new Intent(OlvidasteContraseniaActivity.this, LoginActivity.class));
finish();
}
}
}
| [
"47676714+tumbichi@users.noreply.github.com"
] | 47676714+tumbichi@users.noreply.github.com |
e14e2445c703ce963c549b5cd1a35fd12f1fc002 | 1ca0b9931f5f5c8d3dae7e0c0833d424636f4a4e | /FinalProyect/app/src/main/java/dras/finalproyect/dialogos/FotoDialogFragment.java | 0793cd2da7b9dbc569a59cc0e7a55b4546e9b939 | [] | no_license | tempestaddepvc/proyectoFINAL | 64b286e44e6affb5981a75ec52ec8524e277566c | dbc47bc67cda3fe48309c9b4c1aa6bb91c53a66e | refs/heads/master | 2021-01-21T14:40:33.283581 | 2016-06-20T01:52:49 | 2016-06-20T01:52:49 | 58,961,190 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,636 | java | package dras.finalproyect.dialogos;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import dras.finalproyect.App;
import dras.finalproyect.R;
import dras.finalproyect.fragmentos.RecipeEdit1Fragment;
/**
* Created by Usuario on 26/11/2015.
*/
public class FotoDialogFragment extends DialogFragment {
public static final int RC_SELECCIONAR_FOTO = 6;
public static final int RC_CAPTURAR_FOTO = 5;
private void solicitarCapturaFoto() {
Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (i.resolveActivity(getActivity().getPackageManager()) != null) {
// Se crea el archivo para la foto en el directorio público (true).
// Se obtiene la fecha y hora actual.
String timestamp = new SimpleDateFormat("yyyyMMdd_HHmmss",
Locale.getDefault()).format(new Date());
String nombre = "IMG_" + timestamp + "_" + ".jpg";
File fotoFile = crearArchivoFoto(nombre, true);
if (fotoFile != null) {
// Se añade como extra del intent la uri donde debe guardarse.
App.sPathFotoOriginal = fotoFile.getAbsolutePath();
i.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(fotoFile));
getActivity().startActivityForResult(i, RC_CAPTURAR_FOTO);
}
}
}
private File crearArchivoFoto(String nombre, boolean publico) {
// Se obtiene el directorio en el que almacenarlo.
File directorio;
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
if (publico) {
// En el directorio público para imágenes del almacenamiento externo.
directorio = Environment
.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
} else {
directorio = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);
}
} else {
// En almacenamiento interno.
directorio = getActivity().getFilesDir();
}
// Su no existe el directorio, se crea.
if (directorio != null && !directorio.exists()) {
if (!directorio.mkdirs()) {
Log.d(getString(R.string.app_name), "error al crear el directorio");
return null;
}
}
// Se crea un archivo con ese nombre y la extensión jpg en ese
// directorio.
File archivo = null;
if (directorio != null) {
archivo = new File(directorio.getPath() + File.separator +
nombre);
Log.d(getString(R.string.app_name), archivo.getAbsolutePath());
}
// Se retorna el archivo creado.
return archivo;
}
public void buscarFotoEnGaleria() {
Intent i = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
i.setType("image/*");
getActivity().startActivityForResult(i, RC_SELECCIONAR_FOTO);
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder b = new AlertDialog.Builder(this.getActivity());
View vista = LayoutInflater.from(getActivity()).inflate(R.layout.foto_dialog, null);
b.setView(vista);
ImageView imgCamara = (ImageView) vista.findViewById(R.id.imgCamara);
ImageView imgGaleria = (ImageView) vista.findViewById(R.id.imgGaleria);
imgCamara.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
solicitarCapturaFoto();
dismiss();
}
});
imgGaleria.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
buscarFotoEnGaleria();
dismiss();
}
});
b.setPositiveButton("Cancelar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int j) {
}
});
return b.create();
}
}
| [
"Sheith.92@gmail.com"
] | Sheith.92@gmail.com |
5f4f9e23f43477a9705a16ec9b35970d7d854804 | e9f6af8d715ed3cd9367a014eab19ddd84614fbb | /app/src/main/java/com/example/android/apis/app/HelloWorld.java | de26e411f21d2d2652605d45d5b4334e3b5fee01 | [] | no_license | kamaihamaiha/Android-API-Demos | 92fe60331e3e9b6f52272b860c64d6cc48216b14 | 9e0b0d52a42250bd6d80f5c1cbe0f02d3fa7343b | refs/heads/master | 2020-04-04T01:47:28.136062 | 2018-11-01T07:41:21 | 2018-11-01T07:41:21 | 155,677,388 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,026 | java | /*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.android.apis.app;
// Need the following import to get access to the app resources, since this
// class is in a sub-package.
import com.example.android.apis.R;
import android.app.Activity;
import android.os.Bundle;
/**
* Simple example of writing an application Activity.
* Hello World</a></h3>
*
* <p>This demonstrates the basic code needed to write a Screen activity.</p>
*
* <h4>Demo</h4>
* App/Activity/Hello World
*
* <h4>Source files</h4>
* <table class="LinkTable">
* <tr>
* <td >src/com.example.android.apis/app/HelloWorld.java</td>
* <td >The Hello World Screen implementation</td>
* </tr>
* <tr>
* <td >/res/any/layout/hello_world.xml</td>
* <td >Defines contents of the screen</td>
* </tr>
* </table>
*/
public class HelloWorld extends Activity {
/**
* Initialization of the Activity after it is first created. Must at least
* call {@link android.app.Activity#setContentView setContentView()} to
* describe what is to be displayed in the screen.
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
// Be sure to call the super class.
super.onCreate(savedInstanceState);
// See assets/res/any/layout/hello_world.xml for this
// view layout definition, which is being set here as
// the content of our screen.
setContentView(R.layout.hello_world);
}
}
| [
"kamaihamaiha@gmail.com"
] | kamaihamaiha@gmail.com |
88de759875f4aafa5137186058f468eae0a4a531 | 2e763fbbe1ea5e0e69299cb63ef4c5a2ec53dd77 | /client/src/com/blackbird/thermostat/security/ThermostatClientSecurityManager.java | 5d20bb9501cac756018ee08a8df9ebca41391be8 | [
"Apache-2.0"
] | permissive | peterkersch/smartphone-thermostat | 1cfaa5284a53206c14b036e813116b523b8f71ef | b55b9a913a881be78bae1fc49d1f26a4273df0dd | refs/heads/master | 2020-05-31T05:40:36.921318 | 2015-01-26T21:42:09 | 2015-01-26T21:42:09 | 28,563,656 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 571 | java | package com.blackbird.thermostat.security;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import android.content.Context;
import com.blackbird.thermostat.store.ThermostatProfileStore;
import com.thermostat.security.ThermostatSecurityManager;
public class ThermostatClientSecurityManager extends ThermostatSecurityManager<RSAPrivateKey, RSAPublicKey> {
public ThermostatClientSecurityManager(Context context) {
super(new RSAKeyPairStoreSharedPreferences(context), new ThermostatProfileStore());
}
}
| [
"peter.kersch@gmail.com"
] | peter.kersch@gmail.com |
cee4036f9cda6aff4024755099c324c130fb0209 | 3fddbe5fbcc51f4e4d092e45ac17a4ac17894d69 | /usef-build/usef-workflow/usef-agr/src/main/java/energy/usef/agr/dto/device/capability/InterruptCapabilityDto.java | 9cc08c651205f2740a92fefb04de676ebf4f838c | [
"Apache-2.0"
] | permissive | Drimpac2020eu/usef | a77cd3abc5e3ae9f29b46b65d23778cfceab6498 | 65acaef8248da98df45a4ba7507f017dfc903906 | refs/heads/master | 2022-12-22T16:59:47.959244 | 2020-05-08T11:12:51 | 2020-05-08T11:12:51 | 241,834,155 | 0 | 0 | Apache-2.0 | 2022-12-14T20:26:07 | 2020-02-20T08:43:30 | HTML | UTF-8 | Java | false | false | 1,428 | java | /*
* Copyright 2015-2016 USEF Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package energy.usef.agr.dto.device.capability;
/**
* JSON class representing an interrupt capability of a UDI device. This class extends {@link DeviceCapabilityDto}.
*/
public class InterruptCapabilityDto extends DeviceCapabilityDto {
private Integer maxDtus;
private InterruptCapabilityTypeDto type;
public Integer getMaxDtus() {
return maxDtus;
}
public void setMaxDtus(Integer maxDtus) {
this.maxDtus = maxDtus;
}
public InterruptCapabilityTypeDto getType() {
return type;
}
public void setType(InterruptCapabilityTypeDto type) {
this.type = type;
}
@Override public String toString() {
return "InterruptCapabilityDto" + "[" +
"maxDtus=" + maxDtus +
", type=" + type +
"]";
}
}
| [
"drimpac.2020eu@gmail.com"
] | drimpac.2020eu@gmail.com |
05ea1c6012f23468e49d915bf5ca107aa7703461 | 447c00482cdbe81b4aefc233a3cb94226301176d | /BackEnd/SpinnerAgent20180425/Business/SourceFiles/emxWebService_mxJPO.java | a48720bd7ec7a06179144646ee3335f74ac2630a | [] | no_license | Philani7777777/R2015x | c983352dda274ec51d0b7ab46300e83203900cea | 8a6988e67af4d44fb528a93af3b0b84e4377495e | refs/heads/master | 2022-01-25T22:21:41.573136 | 2018-06-06T13:54:58 | 2018-06-06T13:54:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 788 | java | /*
** emxWebService
**
** Copyright (c) 1992-2015 Dassault Systemes.
** All Rights Reserved.
** This program contains proprietary and trade secret information of MatrixOne,
** Inc. Copyright notice is precautionary only
** and does not evidence any actual or intended publication of such program
**
*/
import matrix.db.Context;
public class emxWebService_mxJPO extends emxWebServiceBase_mxJPO {
/**
* Constructor.
*
* @param context
* the eMatrix <code>Context</code> object
* @param args
* holds no arguments
* @throws Exception
* if the operation fails
*/
public emxWebService_mxJPO(Context context, String[] args) throws Exception {
super(context, args);
}
}
| [
"mayank.ymca@gmail.com"
] | mayank.ymca@gmail.com |
3bef1746db7e4e2478d14981a2660ed136e10356 | c282aa268a34359278af247f461e39d29de59b3c | /AP CS/Farm/Cow.java | f1865f44d2c14653f1c21cd905182e145dd5a5e3 | [] | no_license | Rowataro/AP-Computer-Science-A-Projects | 2810357c0a45bdccddb833ebc27231f1e16483e4 | ba255f907fbe21068d67902bd1005ca1c01ffa46 | refs/heads/master | 2020-03-17T21:47:23.050709 | 2018-06-05T09:16:52 | 2018-06-05T09:16:52 | 133,975,767 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 381 | java |
/**
* Write a description of class Cow here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Cow extends Animal
{
public Cow(final String name, final String color)
{
super(name, color);
}
public void act()
{
System.out.println('\n' + name + " the " + color +" cow stomps its hoof and says \"Moo\".");
}
}
| [
"noreply@github.com"
] | noreply@github.com |
186956a7d2ec925dc862ff3548e2c69ceed72937 | 77dba20cd5f7443d4c1c9414a6f647c201bd5c4f | /src/main/java/com/rvk/ic/service/EmployeeManager.java | 0e67460cddc850b3c6dcdcc10a6a8083c629aa31 | [] | no_license | mithleshuser/P1 | a468e390ce693a588c1a10ee156432ba3df190ae | 634e9cdb7fc70545fa750e5f9113ff621fe766e4 | refs/heads/master | 2021-01-23T04:59:54.995213 | 2017-05-31T20:06:25 | 2017-05-31T20:06:25 | 92,949,092 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 223 | java | package com.rvk.ic.service;
import java.util.List;
import com.rvk.ic.dto.EmployeeDTO;
public interface EmployeeManager {
public List<EmployeeDTO> getAllEmployees();
public Boolean createNewRecord(EmployeeDTO emp1);
}
| [
"mithlesh1490@gmail.com"
] | mithlesh1490@gmail.com |
2d55b114389a20e2b3fcb63ca8d9f2e2f4a6804b | f4f9387e9a45494e3063260e19eed8076c643d46 | /wyframe/wyframe/src/main/java/wy/addons/zcgl/topic/service/IXgt_wy_topicService.java | e94aaf335da2c3667cba3a34db1cb5ad92a3fd11 | [
"MIT"
] | permissive | shawncai/houtaiguanli | 8df6ad4511c732538865240c97f56d4ce24354e3 | f50cda14af87e25d78fcb9d7ed9a38ffc895b688 | refs/heads/master | 2020-03-30T07:12:58.572779 | 2018-09-30T03:16:38 | 2018-09-30T03:16:38 | 150,923,412 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 164 | java | package wy.addons.zcgl.topic.service;
/**
* 站点栏目Service
*
* @author wyframe
* @Date 2017-11-09 10:39:19
*/
public interface IXgt_wy_topicService {
}
| [
"784836221@qq.com"
] | 784836221@qq.com |
7f1b0ceabdb69b8714a832365e9a3165662e06bf | 04bd8fd4e0ca2fb02eee959d3414aae8ac432cc1 | /app/src/main/java/com/yyyu/interviewhelper/utils/ActivityHolder.java | 079fa5546c6856c58192ca4a22819d0740e98de3 | [] | no_license | yuqibiao/InterviewHelper_version2.0 | d780d2b89482420e9b2d1a1d7e95bc24baa2ac2c | 7a5813b8f81e7c7577f0fadd24c151972123056a | refs/heads/master | 2021-01-17T19:59:38.279703 | 2016-06-13T09:24:08 | 2016-06-13T09:24:08 | 61,018,923 | 6 | 0 | null | null | null | null | UTF-8 | Java | false | false | 648 | java | package com.yyyu.interviewhelper.utils;
import android.app.Activity;
import java.util.ArrayList;
import java.util.List;
/**
* 功能:维护Activity
*
* @author yyyu
* @date 2016/5/18
*/
public class ActivityHolder {
public static List<Activity> activities = new ArrayList<>();
public static void addActivity(Activity act){
activities.add(act);
}
public static void removeActivity(Activity act){
activities.remove(act);
}
public static void finishedAll(){
for (Activity act: activities) {
if (!act.isFinishing()){
act.finish();
}
}
}
}
| [
"启标禹"
] | 启标禹 |
53fc4014483ed2e3de322709db081f67f4ba45d6 | 191bcfdd40d9bea692553e011c76ee64bc587c94 | /AndroidStudyDemo/app/src/main/java/com/example/studyapp/code4/fragment/dashboard/DashboardViewModel.java | 093bbff9b25935306d6f2f668c19c379b9afa53b | [] | no_license | zhaolongs/AndroidStudy | c3dc56b361be12dceb6dd983976bac4ef8ba4e92 | 90395fb163c3e3e3e726da57f68ac0782e56f207 | refs/heads/main | 2023-08-23T20:59:17.039393 | 2021-10-08T06:04:37 | 2021-10-08T06:04:37 | 404,353,820 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 475 | java | package com.example.studyapp.code4.fragment.dashboard;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class DashboardViewModel extends ViewModel {
private MutableLiveData<String> mText;
public DashboardViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is dashboard fragment");
}
public LiveData<String> getText() {
return mText;
}
} | [
"928343994@qq.com"
] | 928343994@qq.com |
e308f2ec1cff63592f76c36b1a7eec5980c18999 | a18b911a5bc2d8c0c72fe65f726ca7907c9ff5c0 | /fr/neutronstars/inventorymanager/AbstractItem.java | a1f27a3a3b1079670273e2c3fde7f5ef5826f7a1 | [] | no_license | NeutronStars/Inventory-Manager | 6ea1775ef83177d8b8a326701eca3f09b93c2793 | e979d8db271bd8296d48d260f33e12a4ab8d64c4 | refs/heads/master | 2021-01-21T10:34:33.395508 | 2017-03-23T20:54:11 | 2017-03-23T20:54:11 | 83,455,528 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,050 | java | package fr.neutronstars.inventorymanager;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
/**
* @author NeutronStars
* @since 1.0
*/
public abstract class AbstractItem {
private final ItemStack item;
public AbstractItem(ItemStack item) {
this.item = item;
}
public AbstractItem(Material material, int count, int data, String name, List<String> lores, boolean glowing){
item = new ItemStack(material, count, (byte)data);
ItemMeta im = item.getItemMeta();
im.setDisplayName(name);
im.setLore(lores);
if(glowing){
im.addItemFlags(ItemFlag.HIDE_ENCHANTS);
im.addEnchant(Enchantment.DURABILITY, 1, true);
}
item.setItemMeta(im);
}
protected final ItemStack getItem() {
return item.clone();
}
protected abstract void clickItem(InventoryManager inventoryManager, AbstractInventory inventory, Player player);
}
| [
"alan.vion.62.av@gmail.com"
] | alan.vion.62.av@gmail.com |
5ae3f5164e29fa6aade3fc7ad001f4088484c5e1 | e90b0566cefe44368441cf34b05fd61366517d70 | /Test001/829_Test001/src/com/listener/connListener.java | 99967f9aae36987164d0fe19b1f809ad32bffd5c | [] | no_license | KittyUSmile/ExamSystem | 0f2a4b0efa70a6f8376d53c4b135cb03006efab4 | 91d6065af21ba6e6ec13a20546a11c51a8865c9d | refs/heads/master | 2022-12-15T19:33:42.537199 | 2020-09-06T11:43:54 | 2020-09-06T11:43:54 | 291,423,896 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,642 | java | package com.listener;
import com.util.JdbcUtil;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class connListener implements ServletContextListener {
//监听器接口
@Override//全局作用域创建时
public void contextInitialized(ServletContextEvent sce) {
JdbcUtil util = new JdbcUtil();
//创建一个map集合装conn对象
Map map = new HashMap();
//创建 20 个 conn对象
for(int i = 0;i<20;i++){
Connection conn = util.getCon();
System.out.println("我"+conn+"出生了!");
map.put(conn,true);//装进map,true表示此个 conn 连接通道空闲中
}
ServletContext application = sce.getServletContext();
application.setAttribute("connKey",map);//装进全局作用域对象中
}
@Override//全局作用域销毁时
public void contextDestroyed(ServletContextEvent sce) {
JdbcUtil util = new JdbcUtil();
ServletContext application = sce.getServletContext();
Map map = (Map)application.getAttribute("connKey");
//把 key 迭代
Iterator iter = map.keySet().iterator();
while(iter.hasNext()){
Connection conn = (Connection) iter.next();
if (conn!=null) {
System.out.println("我"+conn+"还会回来的!");
util.close(conn);
}
}
}
}
| [
"3118845046@qq.com"
] | 3118845046@qq.com |
a3f30e759f545632904eec0144e2318efa8c97bf | 0a59dec908dd05f4ea4b507d438f7da6923be616 | /app/src/main/java/com/example/joni/basicchatapp/services/LeaveGroupService.java | bb83ea47d30683449590bb04bc3e60adc1ac0c4a | [] | no_license | jonisuh/chat-android-client | c86a96641e705c12c6990993e2a25be424dc899e | 93cd4e60a121b9910d1d27db8be4cbd07e8a9a44 | refs/heads/master | 2016-09-14T03:10:53.099007 | 2016-05-04T08:02:16 | 2016-05-04T08:02:16 | 57,156,312 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,810 | java | package com.example.joni.basicchatapp.services;
import android.app.IntentService;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.util.Log;
import com.example.joni.basicchatapp.ChatProvider;
import com.example.joni.basicchatapp.LoginManager;
import com.example.joni.basicchatapp.MenuActivity;
import com.example.joni.basicchatapp.MessagesTable;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* Created by Joni on 28.4.2016.
*/
public class LeaveGroupService extends IntentService {
public LeaveGroupService() {
super("LeaveGroupService");
}
@Override
protected void onHandleIntent(Intent intent) {
if (intent != null) {
Log.d("LeaveGroupService", "started");
try {
int groupID = intent.getIntExtra("groupID", -1);
if(groupID != -1){
boolean leavestatus = leaveGroup(groupID);
if(leavestatus) {
Uri uri = Uri.parse(ChatProvider.GROUPS_CONTENT_URI + "/" + groupID);
getContentResolver().delete(uri, null, null);
getContentResolver().delete(ChatProvider.MESSAGES_CONTENT_URI, MessagesTable.COLUMN_GROUP_ID + "=" + groupID, null);
}else{
broadcastToast("Error while leaving group.");
}
}
} catch (IOException e) {
e.printStackTrace();
broadcastToast("Network not connected.");
}
}
Log.d("LeaveGroupService", "ended");
}
private boolean leaveGroup(int groupID) throws IOException {
URL url = new URL(MenuActivity.SERVER_URI+"Groups/"+groupID+"/leave/");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
String basicAuth = this.getSharedPreferences(LoginManager.PREF_NAME, 0).getString(LoginManager.KEY_CRED,"");
conn.setRequestProperty("Authorization", basicAuth);
conn.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
conn.setReadTimeout(10000 /* milliseconds */);
conn.setConnectTimeout(15000 /* milliseconds */);
conn.setRequestMethod("DELETE");
// Starts the query
conn.connect();
//Log.d("LeaveGroupService", conn.getResponseCode()+" "+conn.getResponseMessage());
if(conn.getResponseCode() == 200){
return true;
}else {
return false;
}
}
private void broadcastToast(String message) {
Intent intent = new Intent(this, LoginReceiver.class);
intent.putExtra("message", message);
sendBroadcast(intent);
}
} | [
"joni.suhonen@metropolia.fi"
] | joni.suhonen@metropolia.fi |
08a881110e0de7e1811470565b62c00e9cbdc27b | c949cb701d879acf128e157e6a98aaba17fda71f | /force-com-cloud-converter/src/java/com/modelmetrics/cloudconverter/importxls/services/ExcelFileParserService.java | baa600197d2cfd4e5cba77c8e1cef223a614f2f6 | [] | no_license | ramzihad/force-com-cloud-converter | 669d23c343cd2826900c87e9653e4cecd16d602c | 7323dfc029efd1846f2c52d27f452eb27220ce98 | refs/heads/master | 2021-01-20T04:24:57.776795 | 2010-02-26T03:02:52 | 2010-02-26T03:02:52 | 40,235,496 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,428 | java | /*
The MIT License
Copyright (c) 2008, 2009 Model Metrics, Inc.
http://ModelMetrics.com
http://ModelMetrics.com/authors/rcarlberg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
package com.modelmetrics.cloudconverter.importxls.services;
import java.io.File;
import java.util.List;
public interface ExcelFileParserService {
List<ExcelWorksheetWrapperBean> parseXLS(File file)
throws ParseException;
}
| [
"reidcarlberg@2ad8b26c-d14b-11dd-a412-a1792178251d"
] | reidcarlberg@2ad8b26c-d14b-11dd-a412-a1792178251d |
df0923e34659be8c050c5e873660981c11d51649 | ac90019102b91fe6bfacf9710b70103f96816530 | /Workspaces/WJavaFonctionelStudent/PLamda/src/ch/arc/cours/lamda/a_interfacefonctionelle/b_neu/d_function/a_math/custom/compose/UseCompose.java | e995451fa86dd0f5e481d0b92ee8c89498387e30 | [] | no_license | TheGoo-ooo/cuda | 9e70e7a6a3da12afce753a82ee2d68e31748a487 | cc183d1b8fadb88822a87eac915afc378d785193 | refs/heads/master | 2021-08-16T22:10:11.582701 | 2017-11-20T11:43:15 | 2017-11-20T11:43:15 | 111,402,596 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,647 | java |
package ch.arc.cours.lamda.a_interfacefonctionelle.b_neu.d_function.a_math.custom.compose;
import org.junit.Assert;
import ch.arc.cours.lamda.a_interfacefonctionelle.b_neu.d_function.a_math.custom.Function_I;
public class UseCompose
{
/*------------------------------------------------------------------*\
|* Methodes Public *|
\*------------------------------------------------------------------*/
public static void main(String[] args)
{
main();
}
public static void main()
{
System.out.println("Compose");
useComposition1();
useComposition2();
useComposition3();
}
/*------------------------------------------------------------------*\
|* Methodes Private *|
\*------------------------------------------------------------------*/
/**
* x -> x*x+1
*
* h(x)= x+1
* g(x)= x*x
* (h o g) (x)= h(g(x))
*
* Classe interne anonyme dans variable
*/
private static void useComposition1()
{
// TODO
Function_I h= new Function_I()
{
@Override
public double value(double x)
{
return x+1;
}
};
Function_I g=new Function_I()
{
@Override
public double value(double x)
{
return x*x;
}
};
Function_I u1 = FunctionCompose.composition1(h, g);
Function_I u2 = FunctionCompose.composition2(h, g);
Function_I u3 = FunctionCompose.composition3(h, g);
check(u1, u2, u3);
}
/**
* x -> x*x+1
*
* h(x)= x+1
* g(x)= x*x
*
* (h o g) (x)= h(g(x))
*
* lamda dans variable
*/
private static void useComposition2()
{
// TODO
Function_I h=x->x+1;
Function_I g=x->x*x;
Function_I u1 = FunctionCompose.composition1(h, g);
Function_I u2 = FunctionCompose.composition2(h, g);
Function_I u3 = FunctionCompose.composition3(h, g);
check(u1, u2, u3);
}
/**
* x -> x*x+1
*
* h(x)= x+1
* g(x)= x*x
*
* (h o g) (x)= h(g(x))
*
* lamda
*/
private static void useComposition3()
{
// Pas pratique dans ce cas, on fait pas !!
{
// a completer
// Function_I u1 = FunctionCompose.composition1(h, g);
// Function_I u2 = FunctionCompose.composition2(h, g);
// Function_I u3 = FunctionCompose.composition3(h, g);
// check(u1, u2, u3);
}
}
/*------------------------------*\
|* Tools *|
\*------------------------------*/
private static void check(Function_I u1, Function_I u2, Function_I u3)
{
System.out.println(u1.value(2));
System.out.println(u2.value(2));
System.out.println(u3.value(2));
Assert.assertTrue(u1.value(2) == 2 * 2 + 1);
Assert.assertTrue(u2.value(2) == 2 * 2 + 1);
Assert.assertTrue(u3.value(2) == 2 * 2 + 1);
}
}
| [
"florian.fasmeyer@he-arc.ch"
] | florian.fasmeyer@he-arc.ch |
8ee43c4ab82c44b1b6a074918db2abcdae61ed62 | 280fbe213b4f013facc243462fc85632ce10eeba | /ParseStarterProject/build/generated/source/r/debug/android/support/v7/mediarouter/R.java | 3d8bfaa397f33a89aec2ffd9757ce78c1774ecea | [] | no_license | koldoiribarren/DSM-2017-Garijo-Iribarren-Android | 728b4fa502117f14e4e156b323b1386e8a6f88bf | 8ee0fff643f67748418d47f90a6272ec6f341bd4 | refs/heads/master | 2021-01-21T07:07:32.067810 | 2017-06-08T08:35:11 | 2017-06-08T08:35:11 | 91,597,767 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 86,909 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.v7.mediarouter;
public final class R {
public static final class anim {
public static final int abc_fade_in = 0x7f050000;
public static final int abc_fade_out = 0x7f050001;
public static final int abc_grow_fade_in_from_bottom = 0x7f050002;
public static final int abc_popup_enter = 0x7f050003;
public static final int abc_popup_exit = 0x7f050004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f050005;
public static final int abc_slide_in_bottom = 0x7f050006;
public static final int abc_slide_in_top = 0x7f050007;
public static final int abc_slide_out_bottom = 0x7f050008;
public static final int abc_slide_out_top = 0x7f050009;
}
public static final class attr {
public static final int actionBarDivider = 0x7f010076;
public static final int actionBarItemBackground = 0x7f010077;
public static final int actionBarPopupTheme = 0x7f010070;
public static final int actionBarSize = 0x7f010075;
public static final int actionBarSplitStyle = 0x7f010072;
public static final int actionBarStyle = 0x7f010071;
public static final int actionBarTabBarStyle = 0x7f01006c;
public static final int actionBarTabStyle = 0x7f01006b;
public static final int actionBarTabTextStyle = 0x7f01006d;
public static final int actionBarTheme = 0x7f010073;
public static final int actionBarWidgetTheme = 0x7f010074;
public static final int actionButtonStyle = 0x7f010090;
public static final int actionDropDownStyle = 0x7f01008c;
public static final int actionLayout = 0x7f010140;
public static final int actionMenuTextAppearance = 0x7f010078;
public static final int actionMenuTextColor = 0x7f010079;
public static final int actionModeBackground = 0x7f01007c;
public static final int actionModeCloseButtonStyle = 0x7f01007b;
public static final int actionModeCloseDrawable = 0x7f01007e;
public static final int actionModeCopyDrawable = 0x7f010080;
public static final int actionModeCutDrawable = 0x7f01007f;
public static final int actionModeFindDrawable = 0x7f010084;
public static final int actionModePasteDrawable = 0x7f010081;
public static final int actionModePopupWindowStyle = 0x7f010086;
public static final int actionModeSelectAllDrawable = 0x7f010082;
public static final int actionModeShareDrawable = 0x7f010083;
public static final int actionModeSplitBackground = 0x7f01007d;
public static final int actionModeStyle = 0x7f01007a;
public static final int actionModeWebSearchDrawable = 0x7f010085;
public static final int actionOverflowButtonStyle = 0x7f01006e;
public static final int actionOverflowMenuStyle = 0x7f01006f;
public static final int actionProviderClass = 0x7f010142;
public static final int actionViewClass = 0x7f010141;
public static final int activityChooserViewStyle = 0x7f010098;
public static final int alertDialogButtonGroupStyle = 0x7f0100bb;
public static final int alertDialogCenterButtons = 0x7f0100bc;
public static final int alertDialogStyle = 0x7f0100ba;
public static final int alertDialogTheme = 0x7f0100bd;
public static final int arrowHeadLength = 0x7f010106;
public static final int arrowShaftLength = 0x7f010107;
public static final int autoCompleteTextViewStyle = 0x7f0100c2;
public static final int background = 0x7f010041;
public static final int backgroundSplit = 0x7f010043;
public static final int backgroundStacked = 0x7f010042;
public static final int backgroundTint = 0x7f01019d;
public static final int backgroundTintMode = 0x7f01019e;
public static final int barLength = 0x7f010108;
public static final int borderlessButtonStyle = 0x7f010095;
public static final int buttonBarButtonStyle = 0x7f010092;
public static final int buttonBarNegativeButtonStyle = 0x7f0100c0;
public static final int buttonBarNeutralButtonStyle = 0x7f0100c1;
public static final int buttonBarPositiveButtonStyle = 0x7f0100bf;
public static final int buttonBarStyle = 0x7f010091;
public static final int buttonPanelSideLayout = 0x7f010057;
public static final int buttonStyle = 0x7f0100c3;
public static final int buttonStyleSmall = 0x7f0100c4;
public static final int buttonTint = 0x7f0100ea;
public static final int buttonTintMode = 0x7f0100eb;
public static final int checkboxStyle = 0x7f0100c5;
public static final int checkedTextViewStyle = 0x7f0100c6;
public static final int closeIcon = 0x7f010156;
public static final int closeItemLayout = 0x7f010051;
public static final int collapseContentDescription = 0x7f010194;
public static final int collapseIcon = 0x7f010193;
public static final int color = 0x7f010102;
public static final int colorAccent = 0x7f0100b3;
public static final int colorButtonNormal = 0x7f0100b7;
public static final int colorControlActivated = 0x7f0100b5;
public static final int colorControlHighlight = 0x7f0100b6;
public static final int colorControlNormal = 0x7f0100b4;
public static final int colorPrimary = 0x7f0100b1;
public static final int colorPrimaryDark = 0x7f0100b2;
public static final int colorSwitchThumbNormal = 0x7f0100b8;
public static final int commitIcon = 0x7f01015b;
public static final int contentInsetEnd = 0x7f01004c;
public static final int contentInsetLeft = 0x7f01004d;
public static final int contentInsetRight = 0x7f01004e;
public static final int contentInsetStart = 0x7f01004b;
public static final int controlBackground = 0x7f0100b9;
public static final int customNavigationLayout = 0x7f010044;
public static final int defaultQueryHint = 0x7f010155;
public static final int dialogPreferredPadding = 0x7f01008a;
public static final int dialogTheme = 0x7f010089;
public static final int displayOptions = 0x7f01003a;
public static final int divider = 0x7f010040;
public static final int dividerHorizontal = 0x7f010097;
public static final int dividerPadding = 0x7f010123;
public static final int dividerVertical = 0x7f010096;
public static final int drawableSize = 0x7f010104;
public static final int drawerArrowStyle = 0x7f010002;
public static final int dropDownListViewStyle = 0x7f0100a9;
public static final int dropdownListPreferredItemHeight = 0x7f01008d;
public static final int editTextBackground = 0x7f01009e;
public static final int editTextColor = 0x7f01009d;
public static final int editTextStyle = 0x7f0100c7;
public static final int elevation = 0x7f01004f;
public static final int expandActivityOverflowButtonDrawable = 0x7f010053;
public static final int externalRouteEnabledDrawable = 0x7f01013e;
public static final int gapBetweenBars = 0x7f010105;
public static final int goIcon = 0x7f010157;
public static final int height = 0x7f010003;
public static final int hideOnContentScroll = 0x7f01004a;
public static final int homeAsUpIndicator = 0x7f01008f;
public static final int homeLayout = 0x7f010045;
public static final int icon = 0x7f01003e;
public static final int iconifiedByDefault = 0x7f010153;
public static final int indeterminateProgressStyle = 0x7f010047;
public static final int initialActivityCount = 0x7f010052;
public static final int isLightTheme = 0x7f010004;
public static final int itemPadding = 0x7f010049;
public static final int layout = 0x7f010152;
public static final int listChoiceBackgroundIndicator = 0x7f0100b0;
public static final int listDividerAlertDialog = 0x7f01008b;
public static final int listItemLayout = 0x7f01005b;
public static final int listLayout = 0x7f010058;
public static final int listPopupWindowStyle = 0x7f0100aa;
public static final int listPreferredItemHeight = 0x7f0100a4;
public static final int listPreferredItemHeightLarge = 0x7f0100a6;
public static final int listPreferredItemHeightSmall = 0x7f0100a5;
public static final int listPreferredItemPaddingLeft = 0x7f0100a7;
public static final int listPreferredItemPaddingRight = 0x7f0100a8;
public static final int logo = 0x7f01003f;
public static final int logoDescription = 0x7f010197;
public static final int maxButtonHeight = 0x7f010192;
public static final int measureWithLargestChild = 0x7f010121;
public static final int mediaRouteButtonStyle = 0x7f010030;
public static final int mediaRouteCastDrawable = 0x7f010031;
public static final int mediaRouteConnectingDrawable = 0x7f010032;
public static final int mediaRouteOffDrawable = 0x7f010033;
public static final int mediaRouteOnDrawable = 0x7f010034;
public static final int mediaRoutePauseDrawable = 0x7f010035;
public static final int mediaRoutePlayDrawable = 0x7f010036;
public static final int mediaRouteSettingsDrawable = 0x7f010037;
public static final int multiChoiceItemLayout = 0x7f010059;
public static final int navigationContentDescription = 0x7f010196;
public static final int navigationIcon = 0x7f010195;
public static final int navigationMode = 0x7f010039;
public static final int overlapAnchor = 0x7f01014a;
public static final int paddingEnd = 0x7f01019b;
public static final int paddingStart = 0x7f01019a;
public static final int panelBackground = 0x7f0100ad;
public static final int panelMenuListTheme = 0x7f0100af;
public static final int panelMenuListWidth = 0x7f0100ae;
public static final int popupMenuStyle = 0x7f01009b;
public static final int popupTheme = 0x7f010050;
public static final int popupWindowStyle = 0x7f01009c;
public static final int preserveIconSpacing = 0x7f010143;
public static final int progressBarPadding = 0x7f010048;
public static final int progressBarStyle = 0x7f010046;
public static final int queryBackground = 0x7f01015d;
public static final int queryHint = 0x7f010154;
public static final int radioButtonStyle = 0x7f0100c8;
public static final int ratingBarStyle = 0x7f0100c9;
public static final int searchHintIcon = 0x7f010159;
public static final int searchIcon = 0x7f010158;
public static final int searchViewStyle = 0x7f0100a3;
public static final int selectableItemBackground = 0x7f010093;
public static final int selectableItemBackgroundBorderless = 0x7f010094;
public static final int showAsAction = 0x7f01013f;
public static final int showDividers = 0x7f010122;
public static final int showText = 0x7f010171;
public static final int singleChoiceItemLayout = 0x7f01005a;
public static final int spinBars = 0x7f010103;
public static final int spinnerDropDownItemStyle = 0x7f01008e;
public static final int spinnerStyle = 0x7f0100cd;
public static final int splitTrack = 0x7f010170;
public static final int state_above_anchor = 0x7f01014b;
public static final int submitBackground = 0x7f01015e;
public static final int subtitle = 0x7f01003b;
public static final int subtitleTextAppearance = 0x7f01018c;
public static final int subtitleTextColor = 0x7f010199;
public static final int subtitleTextStyle = 0x7f01003d;
public static final int suggestionRowLayout = 0x7f01015c;
public static final int switchMinWidth = 0x7f01016e;
public static final int switchPadding = 0x7f01016f;
public static final int switchStyle = 0x7f0100ce;
public static final int switchTextAppearance = 0x7f01016d;
public static final int textAllCaps = 0x7f010060;
public static final int textAppearanceLargePopupMenu = 0x7f010087;
public static final int textAppearanceListItem = 0x7f0100ab;
public static final int textAppearanceListItemSmall = 0x7f0100ac;
public static final int textAppearanceSearchResultSubtitle = 0x7f0100a1;
public static final int textAppearanceSearchResultTitle = 0x7f0100a0;
public static final int textAppearanceSmallPopupMenu = 0x7f010088;
public static final int textColorAlertDialogListItem = 0x7f0100be;
public static final int textColorSearchUrl = 0x7f0100a2;
public static final int theme = 0x7f01019c;
public static final int thickness = 0x7f010109;
public static final int thumbTextPadding = 0x7f01016c;
public static final int title = 0x7f010038;
public static final int titleMarginBottom = 0x7f010191;
public static final int titleMarginEnd = 0x7f01018f;
public static final int titleMarginStart = 0x7f01018e;
public static final int titleMarginTop = 0x7f010190;
public static final int titleMargins = 0x7f01018d;
public static final int titleTextAppearance = 0x7f01018b;
public static final int titleTextColor = 0x7f010198;
public static final int titleTextStyle = 0x7f01003c;
public static final int toolbarNavigationButtonStyle = 0x7f01009a;
public static final int toolbarStyle = 0x7f010099;
public static final int track = 0x7f01016b;
public static final int voiceIcon = 0x7f01015a;
public static final int windowActionBar = 0x7f010061;
public static final int windowActionBarOverlay = 0x7f010063;
public static final int windowActionModeOverlay = 0x7f010064;
public static final int windowFixedHeightMajor = 0x7f010068;
public static final int windowFixedHeightMinor = 0x7f010066;
public static final int windowFixedWidthMajor = 0x7f010065;
public static final int windowFixedWidthMinor = 0x7f010067;
public static final int windowMinWidthMajor = 0x7f010069;
public static final int windowMinWidthMinor = 0x7f01006a;
public static final int windowNoTitle = 0x7f010062;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs = 0x7f080003;
public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f080001;
public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f080004;
public static final int abc_config_actionMenuItemAllCaps = 0x7f080005;
public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f080002;
public static final int abc_config_closeDialogWhenTouchOutside = 0x7f080006;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f080007;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f0d006f;
public static final int abc_background_cache_hint_selector_material_light = 0x7f0d0070;
public static final int abc_color_highlight_material = 0x7f0d0071;
public static final int abc_input_method_navigation_guard = 0x7f0d0000;
public static final int abc_primary_text_disable_only_material_dark = 0x7f0d0072;
public static final int abc_primary_text_disable_only_material_light = 0x7f0d0073;
public static final int abc_primary_text_material_dark = 0x7f0d0074;
public static final int abc_primary_text_material_light = 0x7f0d0075;
public static final int abc_search_url_text = 0x7f0d0076;
public static final int abc_search_url_text_normal = 0x7f0d0001;
public static final int abc_search_url_text_pressed = 0x7f0d0002;
public static final int abc_search_url_text_selected = 0x7f0d0003;
public static final int abc_secondary_text_material_dark = 0x7f0d0077;
public static final int abc_secondary_text_material_light = 0x7f0d0078;
public static final int accent_material_dark = 0x7f0d0004;
public static final int accent_material_light = 0x7f0d0005;
public static final int background_floating_material_dark = 0x7f0d0006;
public static final int background_floating_material_light = 0x7f0d0007;
public static final int background_material_dark = 0x7f0d0008;
public static final int background_material_light = 0x7f0d0009;
public static final int bright_foreground_disabled_material_dark = 0x7f0d000a;
public static final int bright_foreground_disabled_material_light = 0x7f0d000b;
public static final int bright_foreground_inverse_material_dark = 0x7f0d000c;
public static final int bright_foreground_inverse_material_light = 0x7f0d000d;
public static final int bright_foreground_material_dark = 0x7f0d000e;
public static final int bright_foreground_material_light = 0x7f0d000f;
public static final int button_material_dark = 0x7f0d0010;
public static final int button_material_light = 0x7f0d0011;
public static final int dim_foreground_disabled_material_dark = 0x7f0d0034;
public static final int dim_foreground_disabled_material_light = 0x7f0d0035;
public static final int dim_foreground_material_dark = 0x7f0d0036;
public static final int dim_foreground_material_light = 0x7f0d0037;
public static final int foreground_material_dark = 0x7f0d0038;
public static final int foreground_material_light = 0x7f0d0039;
public static final int highlighted_text_material_dark = 0x7f0d003a;
public static final int highlighted_text_material_light = 0x7f0d003b;
public static final int hint_foreground_material_dark = 0x7f0d003c;
public static final int hint_foreground_material_light = 0x7f0d003d;
public static final int material_blue_grey_800 = 0x7f0d003e;
public static final int material_blue_grey_900 = 0x7f0d003f;
public static final int material_blue_grey_950 = 0x7f0d0040;
public static final int material_deep_teal_200 = 0x7f0d0041;
public static final int material_deep_teal_500 = 0x7f0d0042;
public static final int material_grey_100 = 0x7f0d0043;
public static final int material_grey_300 = 0x7f0d0044;
public static final int material_grey_50 = 0x7f0d0045;
public static final int material_grey_600 = 0x7f0d0046;
public static final int material_grey_800 = 0x7f0d0047;
public static final int material_grey_850 = 0x7f0d0048;
public static final int material_grey_900 = 0x7f0d0049;
public static final int primary_dark_material_dark = 0x7f0d0050;
public static final int primary_dark_material_light = 0x7f0d0051;
public static final int primary_material_dark = 0x7f0d0052;
public static final int primary_material_light = 0x7f0d0053;
public static final int primary_text_default_material_dark = 0x7f0d0054;
public static final int primary_text_default_material_light = 0x7f0d0055;
public static final int primary_text_disabled_material_dark = 0x7f0d0056;
public static final int primary_text_disabled_material_light = 0x7f0d0057;
public static final int ripple_material_dark = 0x7f0d0058;
public static final int ripple_material_light = 0x7f0d0059;
public static final int secondary_text_default_material_dark = 0x7f0d005a;
public static final int secondary_text_default_material_light = 0x7f0d005b;
public static final int secondary_text_disabled_material_dark = 0x7f0d005c;
public static final int secondary_text_disabled_material_light = 0x7f0d005d;
public static final int switch_thumb_disabled_material_dark = 0x7f0d005e;
public static final int switch_thumb_disabled_material_light = 0x7f0d005f;
public static final int switch_thumb_material_dark = 0x7f0d007d;
public static final int switch_thumb_material_light = 0x7f0d007e;
public static final int switch_thumb_normal_material_dark = 0x7f0d0060;
public static final int switch_thumb_normal_material_light = 0x7f0d0061;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material = 0x7f09000d;
public static final int abc_action_bar_default_height_material = 0x7f090001;
public static final int abc_action_bar_default_padding_end_material = 0x7f09000e;
public static final int abc_action_bar_default_padding_start_material = 0x7f09000f;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f09001c;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f09001d;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f09001e;
public static final int abc_action_bar_progress_bar_size = 0x7f090002;
public static final int abc_action_bar_stacked_max_height = 0x7f09001f;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f090020;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f090021;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f090022;
public static final int abc_action_button_min_height_material = 0x7f090023;
public static final int abc_action_button_min_width_material = 0x7f090024;
public static final int abc_action_button_min_width_overflow_material = 0x7f090025;
public static final int abc_alert_dialog_button_bar_height = 0x7f090000;
public static final int abc_button_inset_horizontal_material = 0x7f090026;
public static final int abc_button_inset_vertical_material = 0x7f090027;
public static final int abc_button_padding_horizontal_material = 0x7f090028;
public static final int abc_button_padding_vertical_material = 0x7f090029;
public static final int abc_config_prefDialogWidth = 0x7f090005;
public static final int abc_control_corner_material = 0x7f09002a;
public static final int abc_control_inset_material = 0x7f09002b;
public static final int abc_control_padding_material = 0x7f09002c;
public static final int abc_dialog_list_padding_vertical_material = 0x7f09002d;
public static final int abc_dialog_min_width_major = 0x7f09000a;
public static final int abc_dialog_min_width_minor = 0x7f09000b;
public static final int abc_dialog_padding_material = 0x7f09002e;
public static final int abc_dialog_padding_top_material = 0x7f09002f;
public static final int abc_disabled_alpha_material_dark = 0x7f090030;
public static final int abc_disabled_alpha_material_light = 0x7f090031;
public static final int abc_dropdownitem_icon_width = 0x7f090032;
public static final int abc_dropdownitem_text_padding_left = 0x7f090033;
public static final int abc_dropdownitem_text_padding_right = 0x7f090034;
public static final int abc_edit_text_inset_bottom_material = 0x7f090035;
public static final int abc_edit_text_inset_horizontal_material = 0x7f090036;
public static final int abc_edit_text_inset_top_material = 0x7f090037;
public static final int abc_floating_window_z = 0x7f090038;
public static final int abc_list_item_padding_horizontal_material = 0x7f090039;
public static final int abc_panel_menu_list_width = 0x7f09003a;
public static final int abc_search_view_preferred_width = 0x7f09003b;
public static final int abc_search_view_text_min_width = 0x7f09000c;
public static final int abc_switch_padding = 0x7f090019;
public static final int abc_text_size_body_1_material = 0x7f09003f;
public static final int abc_text_size_body_2_material = 0x7f090040;
public static final int abc_text_size_button_material = 0x7f090041;
public static final int abc_text_size_caption_material = 0x7f090042;
public static final int abc_text_size_display_1_material = 0x7f090043;
public static final int abc_text_size_display_2_material = 0x7f090044;
public static final int abc_text_size_display_3_material = 0x7f090045;
public static final int abc_text_size_display_4_material = 0x7f090046;
public static final int abc_text_size_headline_material = 0x7f090047;
public static final int abc_text_size_large_material = 0x7f090048;
public static final int abc_text_size_medium_material = 0x7f090049;
public static final int abc_text_size_menu_material = 0x7f09004a;
public static final int abc_text_size_small_material = 0x7f09004b;
public static final int abc_text_size_subhead_material = 0x7f09004c;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f090003;
public static final int abc_text_size_title_material = 0x7f09004d;
public static final int abc_text_size_title_material_toolbar = 0x7f090004;
public static final int disabled_alpha_material_dark = 0x7f09007a;
public static final int disabled_alpha_material_light = 0x7f09007b;
public static final int highlight_alpha_material_colored = 0x7f09007c;
public static final int highlight_alpha_material_dark = 0x7f09007d;
public static final int highlight_alpha_material_light = 0x7f09007e;
public static final int mr_media_route_controller_art_max_height = 0x7f090018;
public static final int notification_large_icon_height = 0x7f090082;
public static final int notification_large_icon_width = 0x7f090083;
public static final int notification_subtext_size = 0x7f090084;
}
public static final class drawable {
public static final int abc_ab_share_pack_mtrl_alpha = 0x7f020000;
public static final int abc_action_bar_item_background_material = 0x7f020001;
public static final int abc_btn_borderless_material = 0x7f020002;
public static final int abc_btn_check_material = 0x7f020003;
public static final int abc_btn_check_to_on_mtrl_000 = 0x7f020004;
public static final int abc_btn_check_to_on_mtrl_015 = 0x7f020005;
public static final int abc_btn_colored_material = 0x7f020006;
public static final int abc_btn_default_mtrl_shape = 0x7f020007;
public static final int abc_btn_radio_material = 0x7f020008;
public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f020009;
public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f02000a;
public static final int abc_btn_rating_star_off_mtrl_alpha = 0x7f02000b;
public static final int abc_btn_rating_star_on_mtrl_alpha = 0x7f02000c;
public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f02000d;
public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f02000e;
public static final int abc_cab_background_internal_bg = 0x7f02000f;
public static final int abc_cab_background_top_material = 0x7f020010;
public static final int abc_cab_background_top_mtrl_alpha = 0x7f020011;
public static final int abc_control_background_material = 0x7f020012;
public static final int abc_dialog_material_background_dark = 0x7f020013;
public static final int abc_dialog_material_background_light = 0x7f020014;
public static final int abc_edit_text_material = 0x7f020015;
public static final int abc_ic_ab_back_mtrl_am_alpha = 0x7f020016;
public static final int abc_ic_clear_mtrl_alpha = 0x7f020017;
public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f020018;
public static final int abc_ic_go_search_api_mtrl_alpha = 0x7f020019;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f02001a;
public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f02001b;
public static final int abc_ic_menu_moreoverflow_mtrl_alpha = 0x7f02001c;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f02001d;
public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f02001e;
public static final int abc_ic_menu_share_mtrl_alpha = 0x7f02001f;
public static final int abc_ic_search_api_mtrl_alpha = 0x7f020020;
public static final int abc_ic_voice_search_api_mtrl_alpha = 0x7f020025;
public static final int abc_item_background_holo_dark = 0x7f020026;
public static final int abc_item_background_holo_light = 0x7f020027;
public static final int abc_list_divider_mtrl_alpha = 0x7f020028;
public static final int abc_list_focused_holo = 0x7f020029;
public static final int abc_list_longpressed_holo = 0x7f02002a;
public static final int abc_list_pressed_holo_dark = 0x7f02002b;
public static final int abc_list_pressed_holo_light = 0x7f02002c;
public static final int abc_list_selector_background_transition_holo_dark = 0x7f02002d;
public static final int abc_list_selector_background_transition_holo_light = 0x7f02002e;
public static final int abc_list_selector_disabled_holo_dark = 0x7f02002f;
public static final int abc_list_selector_disabled_holo_light = 0x7f020030;
public static final int abc_list_selector_holo_dark = 0x7f020031;
public static final int abc_list_selector_holo_light = 0x7f020032;
public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f020033;
public static final int abc_popup_background_mtrl_mult = 0x7f020034;
public static final int abc_ratingbar_full_material = 0x7f020035;
public static final int abc_spinner_mtrl_am_alpha = 0x7f02003f;
public static final int abc_spinner_textfield_background_material = 0x7f020040;
public static final int abc_switch_thumb_material = 0x7f020041;
public static final int abc_switch_track_mtrl_alpha = 0x7f020042;
public static final int abc_tab_indicator_material = 0x7f020043;
public static final int abc_tab_indicator_mtrl_alpha = 0x7f020044;
public static final int abc_text_cursor_material = 0x7f020045;
public static final int abc_textfield_activated_mtrl_alpha = 0x7f020046;
public static final int abc_textfield_default_mtrl_alpha = 0x7f020047;
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f020048;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f020049;
public static final int abc_textfield_search_material = 0x7f02004a;
public static final int ic_cast_dark = 0x7f0200ab;
public static final int ic_cast_disabled_light = 0x7f0200ac;
public static final int ic_cast_light = 0x7f0200ad;
public static final int ic_cast_off_light = 0x7f0200ae;
public static final int ic_cast_on_0_light = 0x7f0200af;
public static final int ic_cast_on_1_light = 0x7f0200b0;
public static final int ic_cast_on_2_light = 0x7f0200b1;
public static final int ic_cast_on_light = 0x7f0200b2;
public static final int ic_media_pause = 0x7f0200b3;
public static final int ic_media_play = 0x7f0200b4;
public static final int ic_media_route_disabled_mono_dark = 0x7f0200b5;
public static final int ic_media_route_off_mono_dark = 0x7f0200b6;
public static final int ic_media_route_on_0_mono_dark = 0x7f0200b7;
public static final int ic_media_route_on_1_mono_dark = 0x7f0200b8;
public static final int ic_media_route_on_2_mono_dark = 0x7f0200b9;
public static final int ic_media_route_on_mono_dark = 0x7f0200ba;
public static final int ic_pause_dark = 0x7f0200bb;
public static final int ic_pause_light = 0x7f0200bc;
public static final int ic_play_dark = 0x7f0200bd;
public static final int ic_play_light = 0x7f0200be;
public static final int ic_setting_dark = 0x7f0200c3;
public static final int ic_setting_light = 0x7f0200c4;
public static final int mr_ic_cast_dark = 0x7f0200c6;
public static final int mr_ic_cast_light = 0x7f0200c7;
public static final int mr_ic_media_route_connecting_mono_dark = 0x7f0200c8;
public static final int mr_ic_media_route_connecting_mono_light = 0x7f0200c9;
public static final int mr_ic_media_route_mono_dark = 0x7f0200ca;
public static final int mr_ic_media_route_mono_light = 0x7f0200cb;
public static final int mr_ic_pause_dark = 0x7f0200cc;
public static final int mr_ic_pause_light = 0x7f0200cd;
public static final int mr_ic_play_dark = 0x7f0200ce;
public static final int mr_ic_play_light = 0x7f0200cf;
public static final int mr_ic_settings_dark = 0x7f0200d0;
public static final int mr_ic_settings_light = 0x7f0200d1;
public static final int notification_template_icon_bg = 0x7f0200ff;
}
public static final class id {
public static final int action0 = 0x7f0e0118;
public static final int action_bar = 0x7f0e00ad;
public static final int action_bar_activity_content = 0x7f0e0000;
public static final int action_bar_container = 0x7f0e00ac;
public static final int action_bar_root = 0x7f0e00a8;
public static final int action_bar_spinner = 0x7f0e0001;
public static final int action_bar_subtitle = 0x7f0e008e;
public static final int action_bar_title = 0x7f0e008d;
public static final int action_context_bar = 0x7f0e00ae;
public static final int action_divider = 0x7f0e011c;
public static final int action_menu_divider = 0x7f0e0002;
public static final int action_menu_presenter = 0x7f0e0003;
public static final int action_mode_bar = 0x7f0e00aa;
public static final int action_mode_bar_stub = 0x7f0e00a9;
public static final int action_mode_close_button = 0x7f0e008f;
public static final int activity_chooser_view_content = 0x7f0e0090;
public static final int alertTitle = 0x7f0e009c;
public static final int always = 0x7f0e005e;
public static final int art = 0x7f0e0110;
public static final int beginning = 0x7f0e0057;
public static final int buttonPanel = 0x7f0e0097;
public static final int buttons = 0x7f0e0115;
public static final int cancel_action = 0x7f0e0119;
public static final int checkbox = 0x7f0e00a5;
public static final int chronometer = 0x7f0e011f;
public static final int collapseActionView = 0x7f0e005f;
public static final int contentPanel = 0x7f0e009d;
public static final int custom = 0x7f0e00a3;
public static final int customPanel = 0x7f0e00a2;
public static final int decor_content_parent = 0x7f0e00ab;
public static final int default_activity_button = 0x7f0e0093;
public static final int default_control_frame = 0x7f0e010f;
public static final int disableHome = 0x7f0e0025;
public static final int disconnect = 0x7f0e0116;
public static final int edit_query = 0x7f0e00af;
public static final int end = 0x7f0e0037;
public static final int end_padder = 0x7f0e0122;
public static final int expand_activities_button = 0x7f0e0091;
public static final int expanded_menu = 0x7f0e00a4;
public static final int home = 0x7f0e0012;
public static final int homeAsUp = 0x7f0e0026;
public static final int icon = 0x7f0e0095;
public static final int ifRoom = 0x7f0e0060;
public static final int image = 0x7f0e0092;
public static final int info = 0x7f0e0121;
public static final int line1 = 0x7f0e011d;
public static final int line3 = 0x7f0e0120;
public static final int listMode = 0x7f0e0022;
public static final int list_item = 0x7f0e0094;
public static final int media_actions = 0x7f0e011b;
public static final int media_route_control_frame = 0x7f0e010e;
public static final int media_route_list = 0x7f0e010a;
public static final int media_route_volume_layout = 0x7f0e0113;
public static final int media_route_volume_slider = 0x7f0e0114;
public static final int middle = 0x7f0e0058;
public static final int multiply = 0x7f0e003d;
public static final int never = 0x7f0e0061;
public static final int none = 0x7f0e0021;
public static final int normal = 0x7f0e0023;
public static final int parentPanel = 0x7f0e0099;
public static final int play_pause = 0x7f0e0111;
public static final int progress_circular = 0x7f0e0014;
public static final int progress_horizontal = 0x7f0e0015;
public static final int radio = 0x7f0e00a7;
public static final int route_name = 0x7f0e010c;
public static final int screen = 0x7f0e003e;
public static final int scrollView = 0x7f0e009f;
public static final int search_badge = 0x7f0e00b1;
public static final int search_bar = 0x7f0e00b0;
public static final int search_button = 0x7f0e00b2;
public static final int search_close_btn = 0x7f0e00b7;
public static final int search_edit_frame = 0x7f0e00b3;
public static final int search_go_btn = 0x7f0e00b9;
public static final int search_mag_icon = 0x7f0e00b4;
public static final int search_plate = 0x7f0e00b5;
public static final int search_src_text = 0x7f0e00b6;
public static final int search_voice_btn = 0x7f0e00ba;
public static final int select_dialog_listview = 0x7f0e00bb;
public static final int settings = 0x7f0e010d;
public static final int shortcut = 0x7f0e00a6;
public static final int showCustom = 0x7f0e0027;
public static final int showHome = 0x7f0e0028;
public static final int showTitle = 0x7f0e0029;
public static final int split_action_bar = 0x7f0e0016;
public static final int src_atop = 0x7f0e003f;
public static final int src_in = 0x7f0e0040;
public static final int src_over = 0x7f0e0041;
public static final int status_bar_latest_event_content = 0x7f0e011a;
public static final int stop = 0x7f0e0117;
public static final int submit_area = 0x7f0e00b8;
public static final int subtitle = 0x7f0e0112;
public static final int tabMode = 0x7f0e0024;
public static final int text = 0x7f0e0100;
public static final int text2 = 0x7f0e0052;
public static final int textSpacerNoButtons = 0x7f0e00a0;
public static final int time = 0x7f0e011e;
public static final int title = 0x7f0e0096;
public static final int title_bar = 0x7f0e010b;
public static final int title_template = 0x7f0e009b;
public static final int topPanel = 0x7f0e009a;
public static final int up = 0x7f0e0017;
public static final int useLogo = 0x7f0e002a;
public static final int withText = 0x7f0e0062;
public static final int wrap_content = 0x7f0e0030;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f0b0002;
public static final int abc_config_activityShortDur = 0x7f0b0003;
public static final int abc_max_action_buttons = 0x7f0b0000;
public static final int cancel_button_image_alpha = 0x7f0b0005;
public static final int status_bar_notification_info_maxnum = 0x7f0b0008;
}
public static final class layout {
public static final int abc_action_bar_title_item = 0x7f040000;
public static final int abc_action_bar_up_container = 0x7f040001;
public static final int abc_action_bar_view_list_nav_layout = 0x7f040002;
public static final int abc_action_menu_item_layout = 0x7f040003;
public static final int abc_action_menu_layout = 0x7f040004;
public static final int abc_action_mode_bar = 0x7f040005;
public static final int abc_action_mode_close_item_material = 0x7f040006;
public static final int abc_activity_chooser_view = 0x7f040007;
public static final int abc_activity_chooser_view_list_item = 0x7f040008;
public static final int abc_alert_dialog_material = 0x7f04000a;
public static final int abc_dialog_title_material = 0x7f04000b;
public static final int abc_expanded_menu_layout = 0x7f04000c;
public static final int abc_list_menu_item_checkbox = 0x7f04000d;
public static final int abc_list_menu_item_icon = 0x7f04000e;
public static final int abc_list_menu_item_layout = 0x7f04000f;
public static final int abc_list_menu_item_radio = 0x7f040010;
public static final int abc_popup_menu_item_layout = 0x7f040011;
public static final int abc_screen_content_include = 0x7f040012;
public static final int abc_screen_simple = 0x7f040013;
public static final int abc_screen_simple_overlay_action_mode = 0x7f040014;
public static final int abc_screen_toolbar = 0x7f040015;
public static final int abc_search_dropdown_item_icons_2line = 0x7f040016;
public static final int abc_search_view = 0x7f040017;
public static final int abc_select_dialog_material = 0x7f040018;
public static final int mr_media_route_chooser_dialog = 0x7f040033;
public static final int mr_media_route_controller_material_dialog_b = 0x7f040034;
public static final int mr_media_route_list_item = 0x7f040035;
public static final int notification_media_action = 0x7f040036;
public static final int notification_media_cancel_action = 0x7f040037;
public static final int notification_template_big_media = 0x7f040038;
public static final int notification_template_big_media_narrow = 0x7f040039;
public static final int notification_template_lines = 0x7f04003a;
public static final int notification_template_media = 0x7f04003b;
public static final int notification_template_part_chronometer = 0x7f04003c;
public static final int notification_template_part_time = 0x7f04003d;
public static final int select_dialog_item_material = 0x7f040042;
public static final int select_dialog_multichoice_material = 0x7f040043;
public static final int select_dialog_singlechoice_material = 0x7f040044;
public static final int support_simple_spinner_dropdown_item = 0x7f040045;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f070000;
public static final int abc_action_bar_home_description_format = 0x7f070001;
public static final int abc_action_bar_home_subtitle_description_format = 0x7f070002;
public static final int abc_action_bar_up_description = 0x7f070003;
public static final int abc_action_menu_overflow_description = 0x7f070004;
public static final int abc_action_mode_done = 0x7f070005;
public static final int abc_activity_chooser_view_see_all = 0x7f070006;
public static final int abc_activitychooserview_choose_application = 0x7f070007;
public static final int abc_search_hint = 0x7f07000a;
public static final int abc_searchview_description_clear = 0x7f07000b;
public static final int abc_searchview_description_query = 0x7f07000c;
public static final int abc_searchview_description_search = 0x7f07000d;
public static final int abc_searchview_description_submit = 0x7f07000e;
public static final int abc_searchview_description_voice = 0x7f07000f;
public static final int abc_shareactionprovider_share_with = 0x7f070010;
public static final int abc_shareactionprovider_share_with_application = 0x7f070011;
public static final int abc_toolbar_collapse_description = 0x7f070012;
public static final int mr_media_route_button_content_description = 0x7f070049;
public static final int mr_media_route_chooser_searching = 0x7f07004a;
public static final int mr_media_route_chooser_title = 0x7f07004b;
public static final int mr_media_route_controller_disconnect = 0x7f07004c;
public static final int mr_media_route_controller_no_info_available = 0x7f07004d;
public static final int mr_media_route_controller_pause = 0x7f07004e;
public static final int mr_media_route_controller_play = 0x7f07004f;
public static final int mr_media_route_controller_settings_description = 0x7f070050;
public static final int mr_media_route_controller_stop = 0x7f070051;
public static final int mr_system_route_name = 0x7f070052;
public static final int mr_user_route_category_name = 0x7f070053;
public static final int status_bar_notification_info_overflow = 0x7f070056;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0a0088;
public static final int AlertDialog_AppCompat_Light = 0x7f0a0089;
public static final int Animation_AppCompat_Dialog = 0x7f0a008a;
public static final int Animation_AppCompat_DropDownUp = 0x7f0a008b;
public static final int Base_AlertDialog_AppCompat = 0x7f0a008e;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f0a008f;
public static final int Base_Animation_AppCompat_Dialog = 0x7f0a0090;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0a0091;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0a0093;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f0a0092;
public static final int Base_TextAppearance_AppCompat = 0x7f0a0038;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0a0039;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0a003a;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f0a0022;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0a003b;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0a003c;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0a003d;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0a003e;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0a003f;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0a0040;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0a000c;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f0a0041;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0a000d;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0a0042;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0a0043;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0a0044;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0a000e;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0a0045;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0a0094;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0a0046;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0a0047;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f0a0048;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0a000f;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0a0049;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0a0010;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f0a004a;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0a0011;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0a0081;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0a004b;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0a004c;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0a004d;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0a004e;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0a004f;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0a0050;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0a0051;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0a0082;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0a0095;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0a0052;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0a0053;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0a0054;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0a0055;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0a0096;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0a0056;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0a0057;
public static final int Base_ThemeOverlay_AppCompat = 0x7f0a009f;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0a00a0;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0a00a1;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0a00a2;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0a00a3;
public static final int Base_Theme_AppCompat = 0x7f0a0058;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0a0097;
public static final int Base_Theme_AppCompat_Dialog = 0x7f0a0012;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0a0002;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0a0098;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0a0099;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0a009a;
public static final int Base_Theme_AppCompat_Light = 0x7f0a0059;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0a009b;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0a0013;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0a0003;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0a009c;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0a009d;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0a009e;
public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f0a0014;
public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f0a0015;
public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f0a001e;
public static final int Base_V12_Widget_AppCompat_EditText = 0x7f0a001f;
public static final int Base_V21_Theme_AppCompat = 0x7f0a005a;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0a005b;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f0a005c;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0a005d;
public static final int Base_V22_Theme_AppCompat = 0x7f0a007f;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f0a0080;
public static final int Base_V23_Theme_AppCompat = 0x7f0a0083;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f0a0084;
public static final int Base_V7_Theme_AppCompat = 0x7f0a00a4;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0a00a5;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f0a00a6;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0a00a7;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0a00a8;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0a00a9;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0a00aa;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0a00ab;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0a00ac;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0a005e;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0a005f;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f0a0060;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0a0061;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0a0062;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0a00ad;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0a00ae;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0a0020;
public static final int Base_Widget_AppCompat_Button = 0x7f0a0063;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0a0067;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0a00b0;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0a0064;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0a0065;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0a00af;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0a0085;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f0a0066;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0a0068;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0a0069;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0a00b1;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0a0000;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0a00b2;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0a006a;
public static final int Base_Widget_AppCompat_EditText = 0x7f0a0021;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0a00b3;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0a00b4;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0a00b5;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0a006c;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0a006d;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0a006e;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0a006f;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0a0070;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0a0071;
public static final int Base_Widget_AppCompat_ListView = 0x7f0a0072;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0a0073;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0a0074;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0a0075;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0a0076;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0a00b6;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0a0016;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0a0017;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f0a0077;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0a00b7;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0a00b8;
public static final int Base_Widget_AppCompat_Spinner = 0x7f0a0079;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0a0004;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0a007a;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0a00b9;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0a007b;
public static final int Platform_AppCompat = 0x7f0a0018;
public static final int Platform_AppCompat_Light = 0x7f0a0019;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f0a007c;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0a007d;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0a007e;
public static final int Platform_V11_AppCompat = 0x7f0a001a;
public static final int Platform_V11_AppCompat_Light = 0x7f0a001b;
public static final int Platform_V14_AppCompat = 0x7f0a0023;
public static final int Platform_V14_AppCompat_Light = 0x7f0a0024;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f0a001c;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0a002a;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0a002b;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0a002c;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0a002d;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0a002e;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0a002f;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0a0035;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0a0030;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0a0031;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0a0032;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0a0033;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0a0034;
public static final int TextAppearance_AppCompat = 0x7f0a00bf;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0a00c0;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0a00c1;
public static final int TextAppearance_AppCompat_Button = 0x7f0a00c2;
public static final int TextAppearance_AppCompat_Caption = 0x7f0a00c3;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0a00c4;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0a00c5;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0a00c6;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0a00c7;
public static final int TextAppearance_AppCompat_Headline = 0x7f0a00c8;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0a00c9;
public static final int TextAppearance_AppCompat_Large = 0x7f0a00ca;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0a00cb;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0a00cc;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0a00cd;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0a00ce;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0a00cf;
public static final int TextAppearance_AppCompat_Medium = 0x7f0a00d0;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0a00d1;
public static final int TextAppearance_AppCompat_Menu = 0x7f0a00d2;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0a00d3;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0a00d4;
public static final int TextAppearance_AppCompat_Small = 0x7f0a00d5;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0a00d6;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0a00d7;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0a00d8;
public static final int TextAppearance_AppCompat_Title = 0x7f0a00d9;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0a00da;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0a00db;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0a00dc;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0a00dd;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0a00de;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0a00df;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0a00e0;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0a00e1;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0a00e2;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0a00e3;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0a00e4;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0a00e5;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0a00e6;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0a00e7;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0a00e8;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0a00e9;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0a00ea;
public static final int TextAppearance_StatusBar_EventContent = 0x7f0a0025;
public static final int TextAppearance_StatusBar_EventContent_Info = 0x7f0a0026;
public static final int TextAppearance_StatusBar_EventContent_Line2 = 0x7f0a0027;
public static final int TextAppearance_StatusBar_EventContent_Time = 0x7f0a0028;
public static final int TextAppearance_StatusBar_EventContent_Title = 0x7f0a0029;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0a00f6;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0a00f7;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0a00f8;
public static final int ThemeOverlay_AppCompat = 0x7f0a0111;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0a0112;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f0a0113;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0a0114;
public static final int ThemeOverlay_AppCompat_Light = 0x7f0a0115;
public static final int Theme_AppCompat = 0x7f0a00f9;
public static final int Theme_AppCompat_CompactMenu = 0x7f0a00fa;
public static final int Theme_AppCompat_Dialog = 0x7f0a00fb;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0a00fe;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0a00fc;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0a00fd;
public static final int Theme_AppCompat_Light = 0x7f0a00ff;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0a0100;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0a0101;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0a0104;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0a0102;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0a0103;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0a0105;
public static final int Theme_AppCompat_NoActionBar = 0x7f0a0106;
public static final int Theme_MediaRouter = 0x7f0a010f;
public static final int Theme_MediaRouter_Light = 0x7f0a0110;
public static final int Widget_AppCompat_ActionBar = 0x7f0a011a;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0a011b;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0a011c;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0a011d;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0a011e;
public static final int Widget_AppCompat_ActionButton = 0x7f0a011f;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0a0120;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0a0121;
public static final int Widget_AppCompat_ActionMode = 0x7f0a0122;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f0a0123;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0a0124;
public static final int Widget_AppCompat_Button = 0x7f0a0125;
public static final int Widget_AppCompat_ButtonBar = 0x7f0a012b;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0a012c;
public static final int Widget_AppCompat_Button_Borderless = 0x7f0a0126;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0a0127;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0a0128;
public static final int Widget_AppCompat_Button_Colored = 0x7f0a0129;
public static final int Widget_AppCompat_Button_Small = 0x7f0a012a;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0a012d;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0a012e;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0a012f;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0a0130;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0a0131;
public static final int Widget_AppCompat_EditText = 0x7f0a0132;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f0a0134;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0a0135;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0a0136;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0a0137;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0a0138;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0a0139;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0a013a;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0a013b;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0a013c;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f0a013d;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0a013e;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0a013f;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0a0140;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0a0141;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0a0142;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0a0143;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0a0144;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0a0145;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0a0146;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0a0147;
public static final int Widget_AppCompat_Light_SearchView = 0x7f0a0148;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0a0149;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f0a014a;
public static final int Widget_AppCompat_ListView = 0x7f0a014b;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f0a014c;
public static final int Widget_AppCompat_ListView_Menu = 0x7f0a014d;
public static final int Widget_AppCompat_PopupMenu = 0x7f0a014e;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0a014f;
public static final int Widget_AppCompat_PopupWindow = 0x7f0a0150;
public static final int Widget_AppCompat_ProgressBar = 0x7f0a0151;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0a0152;
public static final int Widget_AppCompat_RatingBar = 0x7f0a0153;
public static final int Widget_AppCompat_SearchView = 0x7f0a0156;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0a0157;
public static final int Widget_AppCompat_Spinner = 0x7f0a0159;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0a015a;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0a015b;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0a015c;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0a015d;
public static final int Widget_AppCompat_Toolbar = 0x7f0a015e;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0a015f;
public static final int Widget_MediaRouter_Light_MediaRouteButton = 0x7f0a0169;
public static final int Widget_MediaRouter_MediaRouteButton = 0x7f0a016a;
}
public static final class styleable {
public static final int[] ActionBar = { 0x7f010003, 0x7f010038, 0x7f010039, 0x7f01003a, 0x7f01003b, 0x7f01003c, 0x7f01003d, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050, 0x7f01008f };
public static final int[] ActionBarLayout = { 0x010100b3 };
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int ActionBar_background = 10;
public static final int ActionBar_backgroundSplit = 12;
public static final int ActionBar_backgroundStacked = 11;
public static final int ActionBar_contentInsetEnd = 21;
public static final int ActionBar_contentInsetLeft = 22;
public static final int ActionBar_contentInsetRight = 23;
public static final int ActionBar_contentInsetStart = 20;
public static final int ActionBar_customNavigationLayout = 13;
public static final int ActionBar_displayOptions = 3;
public static final int ActionBar_divider = 9;
public static final int ActionBar_elevation = 24;
public static final int ActionBar_height = 0;
public static final int ActionBar_hideOnContentScroll = 19;
public static final int ActionBar_homeAsUpIndicator = 26;
public static final int ActionBar_homeLayout = 14;
public static final int ActionBar_icon = 7;
public static final int ActionBar_indeterminateProgressStyle = 16;
public static final int ActionBar_itemPadding = 18;
public static final int ActionBar_logo = 8;
public static final int ActionBar_navigationMode = 2;
public static final int ActionBar_popupTheme = 25;
public static final int ActionBar_progressBarPadding = 17;
public static final int ActionBar_progressBarStyle = 15;
public static final int ActionBar_subtitle = 4;
public static final int ActionBar_subtitleTextStyle = 6;
public static final int ActionBar_title = 1;
public static final int ActionBar_titleTextStyle = 5;
public static final int[] ActionMenuItemView = { 0x0101013f };
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMenuView = { };
public static final int[] ActionMode = { 0x7f010003, 0x7f01003c, 0x7f01003d, 0x7f010041, 0x7f010043, 0x7f010051 };
public static final int ActionMode_background = 3;
public static final int ActionMode_backgroundSplit = 4;
public static final int ActionMode_closeItemLayout = 5;
public static final int ActionMode_height = 0;
public static final int ActionMode_subtitleTextStyle = 2;
public static final int ActionMode_titleTextStyle = 1;
public static final int[] ActivityChooserView = { 0x7f010052, 0x7f010053 };
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
public static final int ActivityChooserView_initialActivityCount = 0;
public static final int[] AlertDialog = { 0x010100f2, 0x7f010057, 0x7f010058, 0x7f010059, 0x7f01005a, 0x7f01005b };
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonPanelSideLayout = 1;
public static final int AlertDialog_listItemLayout = 5;
public static final int AlertDialog_listLayout = 2;
public static final int AlertDialog_multiChoiceItemLayout = 3;
public static final int AlertDialog_singleChoiceItemLayout = 4;
public static final int[] AppCompatTextView = { 0x01010034, 0x7f010060 };
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_textAllCaps = 1;
public static final int[] CompoundButton = { 0x01010107, 0x7f0100ea, 0x7f0100eb };
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int[] DrawerArrowToggle = { 0x7f010102, 0x7f010103, 0x7f010104, 0x7f010105, 0x7f010106, 0x7f010107, 0x7f010108, 0x7f010109 };
public static final int DrawerArrowToggle_arrowHeadLength = 4;
public static final int DrawerArrowToggle_arrowShaftLength = 5;
public static final int DrawerArrowToggle_barLength = 6;
public static final int DrawerArrowToggle_color = 0;
public static final int DrawerArrowToggle_drawableSize = 2;
public static final int DrawerArrowToggle_gapBetweenBars = 3;
public static final int DrawerArrowToggle_spinBars = 1;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f010040, 0x7f010121, 0x7f010122, 0x7f010123 };
public static final int[] LinearLayoutCompat_Layout = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 };
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 8;
public static final int LinearLayoutCompat_measureWithLargestChild = 6;
public static final int LinearLayoutCompat_showDividers = 7;
public static final int[] ListPopupWindow = { 0x010102ac, 0x010102ad };
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int[] MediaRouteButton = { 0x0101013f, 0x01010140, 0x7f01013e };
public static final int MediaRouteButton_android_minHeight = 1;
public static final int MediaRouteButton_android_minWidth = 0;
public static final int MediaRouteButton_externalRouteEnabledDrawable = 2;
public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 };
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_visible = 2;
public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f01013f, 0x7f010140, 0x7f010141, 0x7f010142 };
public static final int MenuItem_actionLayout = 14;
public static final int MenuItem_actionProviderClass = 16;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_showAsAction = 13;
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f010143 };
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_preserveIconSpacing = 7;
public static final int[] PopupWindow = { 0x01010176, 0x7f01014a };
public static final int[] PopupWindowBackgroundState = { 0x7f01014b };
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_overlapAnchor = 1;
public static final int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f010152, 0x7f010153, 0x7f010154, 0x7f010155, 0x7f010156, 0x7f010157, 0x7f010158, 0x7f010159, 0x7f01015a, 0x7f01015b, 0x7f01015c, 0x7f01015d, 0x7f01015e };
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_closeIcon = 8;
public static final int SearchView_commitIcon = 13;
public static final int SearchView_defaultQueryHint = 7;
public static final int SearchView_goIcon = 9;
public static final int SearchView_iconifiedByDefault = 5;
public static final int SearchView_layout = 4;
public static final int SearchView_queryBackground = 15;
public static final int SearchView_queryHint = 6;
public static final int SearchView_searchHintIcon = 11;
public static final int SearchView_searchIcon = 10;
public static final int SearchView_submitBackground = 16;
public static final int SearchView_suggestionRowLayout = 14;
public static final int SearchView_voiceIcon = 12;
public static final int[] Spinner = { 0x010100b2, 0x01010176, 0x0101017b, 0x01010262, 0x7f010050 };
public static final int Spinner_android_dropDownWidth = 3;
public static final int Spinner_android_popupBackground = 1;
public static final int Spinner_android_prompt = 2;
public static final int Spinner_popupTheme = 4;
public static final int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f01016b, 0x7f01016c, 0x7f01016d, 0x7f01016e, 0x7f01016f, 0x7f010170, 0x7f010171 };
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 9;
public static final int SwitchCompat_splitTrack = 8;
public static final int SwitchCompat_switchMinWidth = 6;
public static final int SwitchCompat_switchPadding = 7;
public static final int SwitchCompat_switchTextAppearance = 5;
public static final int SwitchCompat_thumbTextPadding = 4;
public static final int SwitchCompat_track = 3;
public static final int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x7f010060 };
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_textAllCaps = 8;
public static final int[] Toolbar = { 0x010100af, 0x01010140, 0x7f010038, 0x7f01003b, 0x7f01003f, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f010050, 0x7f01018b, 0x7f01018c, 0x7f01018d, 0x7f01018e, 0x7f01018f, 0x7f010190, 0x7f010191, 0x7f010192, 0x7f010193, 0x7f010194, 0x7f010195, 0x7f010196, 0x7f010197, 0x7f010198, 0x7f010199 };
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_collapseContentDescription = 19;
public static final int Toolbar_collapseIcon = 18;
public static final int Toolbar_contentInsetEnd = 6;
public static final int Toolbar_contentInsetLeft = 7;
public static final int Toolbar_contentInsetRight = 8;
public static final int Toolbar_contentInsetStart = 5;
public static final int Toolbar_logo = 4;
public static final int Toolbar_logoDescription = 22;
public static final int Toolbar_maxButtonHeight = 17;
public static final int Toolbar_navigationContentDescription = 21;
public static final int Toolbar_navigationIcon = 20;
public static final int Toolbar_popupTheme = 9;
public static final int Toolbar_subtitle = 3;
public static final int Toolbar_subtitleTextAppearance = 11;
public static final int Toolbar_subtitleTextColor = 24;
public static final int Toolbar_title = 2;
public static final int Toolbar_titleMarginBottom = 16;
public static final int Toolbar_titleMarginEnd = 14;
public static final int Toolbar_titleMarginStart = 13;
public static final int Toolbar_titleMarginTop = 15;
public static final int Toolbar_titleMargins = 12;
public static final int Toolbar_titleTextAppearance = 10;
public static final int Toolbar_titleTextColor = 23;
public static final int[] View = { 0x01010000, 0x010100da, 0x7f01019a, 0x7f01019b, 0x7f01019c };
public static final int[] ViewBackgroundHelper = { 0x010100d4, 0x7f01019d, 0x7f01019e };
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int[] ViewStubCompat = { 0x010100d0, 0x010100f2, 0x010100f3 };
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_inflatedId = 2;
public static final int ViewStubCompat_android_layout = 1;
public static final int View_android_focusable = 1;
public static final int View_android_theme = 0;
public static final int View_paddingEnd = 3;
public static final int View_paddingStart = 2;
public static final int View_theme = 4;
}
}
| [
"master@koldoiribarren.com"
] | master@koldoiribarren.com |
094292a4306fc77baab61cbbd6ec5347e17e80c4 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/elasticsearch/2015/4/WatcherServiceAction.java | 84c5487bb5f3ed806aac7514c5928c49a071288e | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 1,036 | java | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
package org.elasticsearch.watcher.transport.actions.service;
import org.elasticsearch.watcher.client.WatcherAction;
import org.elasticsearch.client.Client;
/**
*/
public class WatcherServiceAction extends WatcherAction<WatcherServiceRequest, WatcherServiceResponse, WatcherServiceRequestBuilder> {
public static final WatcherServiceAction INSTANCE = new WatcherServiceAction();
public static final String NAME = "cluster:admin/watcher/service";
private WatcherServiceAction() {
super(NAME);
}
@Override
public WatcherServiceResponse newResponse() {
return new WatcherServiceResponse();
}
@Override
public WatcherServiceRequestBuilder newRequestBuilder(Client client) {
return new WatcherServiceRequestBuilder(client);
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
c15f3270207e9bcff94b2510a50d0aceaddfbe06 | 5e9f3f62051285044059ee87bb979ebd45fae62d | /my-security/src/main/java/com/yz/common/security/ISecurity.java | 33ef3e2e68af218d08e456877ed6a98b748ffe93 | [] | no_license | zhengsun/my-framework | 813c888cf4bc220d76706d90fda70ae9dbe5722b | 26aec74bcfbaeccaf28cafb7a2a75ccf7f02527a | refs/heads/master | 2021-01-24T01:28:49.726550 | 2018-02-25T06:09:36 | 2018-02-25T06:09:36 | 122,810,044 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,074 | java | package com.yz.common.security;
import java.util.*;
public interface ISecurity {
/**
* 加密字符串
* @param data
* @return
*/
public String Encrypt(String data) throws Exception;
/**
* 解密字符串
* @param data
* @return
*/
public String Decrypt(String data) throws Exception;
/**
* 签名
* @param content
* @param privateKey
* @return
* @throws Exception
*/
public String Sign(String content, String privateKey) throws Exception;
/**
* 除去数组中的空值和签名参数
* @param sArray 签名参数组
* @return 去掉空值与签名参数后的新签名参数组
*/
public default Map<String, String> paraFilter(Map<String, String> sArray) {
Map<String, String> result = new HashMap<String, String>();
if (sArray == null || sArray.size() <= 0) {
return result;
}
for (String key : sArray.keySet()) {
String value = sArray.get(key);
if (value == null || value.equals("") || key.equalsIgnoreCase("sign")) {
continue;
}
result.put(key, value);
}
return result;
}
/**
* 把数组所有元素排序,并按照“参数=参数值”的模式用“&”字符拼接成字符串
* @param params 需要排序并参与字符拼接的参数组
* @return 拼接后字符串
*/
public default String createLinkString(Map<String, String> params) {
List<String> keys = new ArrayList<String>(params.keySet());
Collections.sort(keys);
String prestr = "";
for (int i = 0; i < keys.size(); i++) {
String key = keys.get(i);
String value = params.get(key);
if (i == keys.size() - 1) {//拼接时,不包括最后一个&字符
prestr = prestr + key + "=" + value;
} else {
prestr = prestr + key + "=" + value + "&";
}
}
return prestr;
}
}
| [
"zy1434497067@gmail.com"
] | zy1434497067@gmail.com |
498d3212debecb64ce5cd5fdf1f7ba9a3796f210 | 5b22cb19e793987fd8dea03195f739f67a0ecbd1 | /MailRoom/src/mailroom/Snippet.java | eb55f304b4b7eaf4f489a66912b0393f72ce407f | [] | no_license | rockking1379/Mailroom | 5274e4a111544989791bce00f9442d9c050e5c1c | f3943416d46098ab0b7861140c19d6046c09a01a | refs/heads/master | 2020-05-23T16:56:10.432430 | 2014-03-18T19:29:21 | 2014-03-18T19:29:21 | 10,066,713 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 70 | java | package mailroom;
public class Snippet {
boolean noStops =false;
}
| [
"nehringtb@grizzlies.adams.edu"
] | nehringtb@grizzlies.adams.edu |
8dd6d402699d3d7c4f05d63267fa69acbafbeec8 | 4301584f35eebf745bbf1797dfa3eedfe70a2cd3 | /kiss/src/main/java/com/hezhi/kiss/Manager/activity/ActivityManager.java | 50c7460d0b7fedfca9056f4e4643ee569971a671 | [] | no_license | HezEngineer/CodePie | f484d0fc8738dfa06e3a62335ed8755c2491d281 | 989ef6b5a2c1f43369268ff31abf8928b6141fa2 | refs/heads/master | 2021-01-24T08:28:42.330547 | 2017-07-14T03:24:06 | 2017-07-14T03:24:06 | 93,382,727 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,205 | java | package com.hezhi.kiss.Manager.activity;
import com.hezhi.kiss.base.BaseActivity;
import java.util.LinkedList;
public class ActivityManager {
/**
* 视图栈
*/
private static LinkedList<ActivityInfo> activities = new LinkedList<ActivityInfo>();
public static LinkedList<ActivityInfo> getManagers() {
return activities;
}
public static void setManagers(LinkedList<ActivityInfo> activities) {
ActivityManager.activities = activities;
}
/**
* 向视图栈中添加新的视图
*
* @param data 视图数据
* @return 添加是否成功
*/
public static boolean addNewActivity(ActivityInfo data) {
if (data == null || data.getActivityId() == null
|| data.getActivityId().length() == 0) {
return false;
}
activities.add(data);
return true;
}
/**
* 通过ID在视图栈中查找视图数据
*
* @param activityId 查找ID
* @return 查找结果
*/
private static ActivityInfo getDataByActivityId(String activityId) {
if (activities != null) {
for (int i = 0; i < activities.size(); i++) {
ActivityInfo item = activities.get(i);
if (activityId.equalsIgnoreCase(item.getActivityId())) {
return item;
}
}
}
return null;
}
/**
* 获取视图栈顶部视图数据
*
* @return 返回视图数据
*/
public static ActivityInfo getTopInfo() {
if (activities != null && activities.size() >= 1) {
return activities.get(activities.size() - 1);
}
return null;
}
/**
* 通过查找ID替换视图栈中指定视图的ID
*
* @param sourceId 原ID
* @param destId 替换ID
* @return 替换是否成功
*/
public static boolean replaceActivityId(String sourceId, String destId) {
if (activities != null) {
for (int i = 0; i < activities.size(); i++) {
ActivityInfo item = activities.get(i);
if (sourceId.equalsIgnoreCase(item.getActivityId())) {
item.setActivityId(destId);
return true;
}
}
}
return false;
}
/**
* 通过视图对象替换视图栈中指定视图的ID
*
* @param baseActivity 待查找的视图对象
* @param activityId 替换的ID
* @return 更新ID是否成功
*/
public static boolean updateActivityIdByBaseActivity(BaseActivity baseActivity, String activityId) {
if (baseActivity == null || activityId == null || activityId.length() == 0) {
return false;
}
for (int i = 0; i < activities.size(); i++) {
ActivityInfo item = activities.get(i);
if (item.getActivityContent() == baseActivity) {
item.setActivityId(activityId);
return true;
}
}
return false;
}
/**
* 视图栈出栈操作
*
* @param isrefresh 是否刷新
*/
public static void popActivity(boolean isrefresh) {
if (activities != null && activities.size() >= 1) {
ActivityInfo item = activities.remove(activities.size() - 1);
item.getActivityContent().finish();
item = null;
System.gc();
if (isrefresh == true) {
if (getTopInfo() != null && getTopInfo().getActivityContent() != null) {
getTopInfo().getActivityContent().refresh();
}
}
}
}
/**
* 出栈到指定ID的视图
*
* @param popActivityId 指定ID
* @param isrefresh 是否刷新
* @return 返回栈顶数据
*/
public static ActivityInfo popToActivityById(String popActivityId, boolean isrefresh) {
if (getDataByActivityId(popActivityId) != null) {
LinkedList<ActivityInfo> delList = new LinkedList<ActivityInfo>();
for (int i = activities.size() - 1; i >= 0; i--) {
ActivityInfo item = activities.get(i);
if (item.getActivityId().equals(popActivityId) == false) {
item.getActivityContent().finish();
delList.add(item);
} else {
activities.removeAll(delList);
if (isrefresh == true) {
if (item != null && item.getActivityContent() != null) {
item.getActivityContent().refresh();
}
}
return item;
}
}
activities.removeAll(delList);
}
return null;
}
public static void clearActivity() {
LinkedList<ActivityInfo> delList = new LinkedList<ActivityInfo>();
for (int i = activities.size() - 1; i >= 0; i--) {
ActivityInfo item = activities.get(i);
item.getActivityContent().finish();
delList.add(item);
}
activities.removeAll(delList);
}
}
| [
"il"
] | il |
adcaeafc294291e04a0aaa970bd65d4e45d3c9e0 | 2fa9dabc2c92c3432954cca52616ae0d1dd3e9b7 | /core/src/com/mygdx/game/Setting_Room.java | 15868cc7894015a1a3be4bf06f8cf8225ccbe370 | [] | no_license | nhommasoi/bh | d175bc5b52be56113f608c0497d9dc1a79403307 | 3b1b4afbbc584aabbe5da3a75b3170dec45d7111 | refs/heads/master | 2020-03-26T17:56:05.624473 | 2018-08-31T10:50:47 | 2018-08-31T10:50:47 | 145,187,946 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,786 | java | package com.mygdx.game;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Button;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import java.awt.ScrollPane;
import java.nio.channels.SelectionKey;
public class Setting_Room implements Screen{
private Game game;
private Stage stage;
private SpriteBatch batch;
private Skin skin;
private Texture background;
private Label lblroiphong,lblcaidat,lblsuport;
private Button btnroiphong,btncaidat,btnsuport;
public Setting_Room(Game game){
batch=new SpriteBatch();
stage=new Stage();
skin=new Skin(Gdx.files.internal("uiskin.json"));
background=new Texture("raw_12.jpeg");
skin=new Skin(Gdx.files.internal(GameConstants.myskin));
lblroiphong=new Label("exit room",skin);
lblcaidat=new Label("setting",skin);
lblsuport=new Label("support",skin);
btnroiphong=new Button(skin);
btnroiphong.setColor(Color.RED);
btncaidat=new Button(skin);
btncaidat.setColor(Color.RED);
btnsuport=new Button(skin);
btnsuport.setColor(Color.RED);
Table table=new Table();
table.add(btnroiphong).left();
table.add(lblroiphong).center().height(GameConstants.row_height);
table.add().row();
table.add(btncaidat).left();
table.add(lblcaidat).center();
table.add().row();
table.add(btnsuport).left();
table.add(lblsuport).center().height(GameConstants.row_height);
table.setPosition(GameConstants.screenWidth-GameConstants.col_width,GameConstants.screenHeight -GameConstants.four_height);
stage.addActor(table);
}
@Override
public void show() {
Gdx.input.setInputProcessor(stage);
}
@Override
public void render(float delta) {
Gdx.gl.glClearColor(1,1,1,1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
batch.draw(background,0,0,GameConstants.screenWidth,GameConstants.screenHeight);
batch.end();
stage.act(delta);
stage.draw();
}
@Override
public void resize(int width, int height) {
}
@Override
public void pause() {
}
@Override
public void resume() {
}
@Override
public void hide() {
}
@Override
public void dispose() {
}
}
| [
"hai6722@gmail.com"
] | hai6722@gmail.com |
a230b1de0bf0e2053b7d923c6ccde171c0ce576f | 5043e74928ec012bbe9aef3be963614f614e1d4e | /src/main/java/io/cat/ai/ildirim/adt/nonlinear/graph/component/GraphEdge.java | 2e1143df145d075e38492d878e173cb950508f28 | [] | no_license | cat-ai/ildirim | 03bafdb8a08bf14816446bd5dd86e4739d68b7ea | 9b1d9bd25162e2115a1746731edea67d754c994f | refs/heads/master | 2022-05-17T01:45:29.827349 | 2020-04-24T10:55:40 | 2020-04-24T10:55:40 | 258,482,331 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 286 | java | package io.cat.ai.ildirim.adt.nonlinear.graph.component;
import io.cat.ai.ildirim.adt.nonlinear.graph.Graph;
import lombok.*;
@AllArgsConstructor @Getter @Setter
class GraphEdge<E, N> {
private E val;
private final Graph<E, N> source;
private final Graph<E, N> target;
} | [
"k.gadzhiev@pflb.ru"
] | k.gadzhiev@pflb.ru |
7800daefecd983919d86c454542be7d859325987 | 5431875a111b1a17045a7e1b337dd1b23e95139c | /src/main/java/com/vg/eventmanagement/common/HttpStatusCode.java | 5cd5c3f84043d31cb23e5408c2d2f6caa7486310 | [] | no_license | viraag/event-management-backend | e5db9ded93618a1dbaea3b3ad4b16b2c4c216169 | 9ce78828c525d55ef9dd1d52314266668bd8894b | refs/heads/master | 2022-11-28T07:13:52.089870 | 2020-08-16T06:05:14 | 2020-08-16T06:05:14 | 286,762,646 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,532 | java | package com.vg.eventmanagement.common;
public enum HttpStatusCode {
CONTINUE(100, "Continue"),
SWITCHING_PROTOCOL(101, "Switching Protocols"),
PROCESSING(102, "Processing"),
OK(200, "OK"),
CREATED(201, "Created"),
ACCEPTED(202, "Accepted"),
NON_AUTHORITATIVE_INFORMATION(203, "Non-Authoritative Information"),
NO_CONTENT(204, "No Content"),
RESET_CONTENT(205, "Reset Content"),
PARTIAL_CONTENT(206, "Partial Content"),
MULTI_STATUS(207, "Multi-Status (WebDAV; RFC 4918"),
ALREADY_REPORTED(208, "Already Reported (WebDAV; RFC 5842)" ),
IM_USED(226, "IM Used (RFC 3229)"),
MULTIPLE_CHOICES(300, "Multiple Choices"),
MOVED_PERMANENTLY(301, "Moved Permanently"),
FOUND(302, "Found"),
SEE_OTHER(303, "See Other (since HTTP/1.1)"),
NOT_MODIFIED(304, "Not Modified"),
USE_PROXY(305, "Use Proxy (since HTTP/1.1)"),
SWITCH_PROXY(306, "Switch Proxy"),
TEMPORARY_REDIRECT(307, "Temporary Redirect (since HTTP/1.1)"),
PERMANENT_REDIRECT(308, "Permanent Redirect (approved as experimental RFC)[12]"),
BAD_REQUEST(400, "Bad Request"),
UNAUTHORIZED(401, "Unauthorized"),
PAYMENT_REQUIRED(402, "Payment Required"),
FORBIDDEN(403, "Forbidden"),
NOT_FOUND(404, "Not Found"),
METHOD_NOT_ALLOWED(405, "Method Not Allowed"),
NOT_ACCEPTABLE(406, "Not Acceptable"),
PROXY_AUTHENTICATION_REQUIRED(407, "Proxy Authentication Required"),
REQUEST_TIMEOUT(408, "Request Timeout"),
CONFLICT(409, "Conflict"),
GONE(410, "Gone"),
LENGTH_REQUIRED(411, "Length Required"),
PRECONDITION_FAILED(412, "Precondition Failed"),
REQUEST_ENTITY_TOO_LARGE(413, "Request Entity Too Large"),
REQUEST_URI_TOO_LONG(414, "Request-URI Too Long"),
UNSUPPORTED_MEDIA_TYPE(415, "Unsupported Media Type"),
REQUESTED_RANGE_NOT_SATISFIABLE(416, "Requested Range Not Satisfiable"),
EXPECTATION_FAILED(417, "Expectation Failed"),
INTERNAL_SERVER_ERROR(500, "Internal Server Error"),
NOT_IMPLEMENTED(501, "Not Implemented"),
BAD_GATEWAY(502, "Bad Gateway"),
SERVICE_UNAVAILABLE(503, "Service Unavailable"),
GATEWAY_TIMEOUT(504, "Gateway Timeout"),
HTTP_VERSION_NOT_SUPPORTED(505, "HTTP Version Not Supported"),
VARIANT_ALSO_NEGOTIATES(506, "Variant Also Negotiates (RFC 2295)"),
INSUFFICIENT_STORAGE(507, "Insufficient Storage (WebDAV; RFC 4918)"),
LOOP_DETECTED(508, "Loop Detected (WebDAV; RFC 5842)"),
BANDWIDTH_LIMIT_EXCEEDED(509, "Bandwidth Limit Exceeded (Apache bw/limited extension)"),
NOT_EXTEND(510, "Not Extended (RFC 2774)"),
NETWORK_AUTHENTICATION_REQUIRED(511, "Network Authentication Required (RFC 6585)"),
CONNECTION_TIMED_OUT(522, "Connection timed out"),
PROXY_DECLINED_REQUEST(523, "Proxy Declined Request"),
TIMEOUT_OCCURRED(524, "A timeout occurred")
;
private int code;
private String desc;
private String text;
HttpStatusCode(int code, String desc) {
this.code = code;
this.desc = desc;
this.text = Integer.toString(code);
}
/**
* Gets the HTTP status code
* @return the status code number
*/
public int getCode() {
return code;
}
/**
* Gets the HTTP status code as a text string
* @return the status code as a text string
*/
public String asText() {
return text;
}
/**
* Get the description
* @return the description of the status code
*/
public String getDesc() {
return desc;
}
}
| [
"viraagsingh007@gmail.com"
] | viraagsingh007@gmail.com |
e6e07d07a2539cb0f46fc374bd0f483344e1d49b | da8013fd299b2b5b2b75dba8e890cc9212e408af | /app/src/main/java/com/xxjr/xxjr/other/lineChart/AxesRenderer.java | 9787965e5fd8ce160337dfc2e17d1ff151488254 | [] | no_license | xnn1987/XXJR | 65085be7aca8fc347a35f1ca77f089c0b8ef90b9 | 52e006f216f9c7175e7b999bbb890800f794b93a | refs/heads/master | 2021-01-19T04:49:59.279675 | 2017-04-06T07:30:57 | 2017-04-06T07:30:57 | 87,399,813 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 28,123 | java | package com.xxjr.xxjr.other.lineChart;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Paint.FontMetricsInt;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.text.TextUtils;
/**
* Default axes renderer. Can draw maximum four axes - two horizontal(top/bottom) and two vertical(left/right).
*/
public class AxesRenderer {
private static final int DEFAULT_AXIS_MARGIN_DP = 2;
/**
* Axis positions indexes, used for indexing tabs that holds axes parameters, see below.
*/
private static final int TOP = 0;
private static final int LEFT = 1;
private static final int RIGHT = 2;
private static final int BOTTOM = 3;
/**
* Used to measure label width. If label has mas 5 characters only 5 first characters of this array are used to
* measure text width.
*/
private static final char[] labelWidthChars = new char[]{
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'};
private Chart chart;
private ChartComputator computator;
private int axisMargin;
private float density;
private float scaledDensity;
private Paint[] labelPaintTab = new Paint[]{new Paint(), new Paint(), new Paint(), new Paint()};
private Paint[] namePaintTab = new Paint[]{new Paint(), new Paint(), new Paint(), new Paint()};
private Paint[] linePaintTab = new Paint[]{new Paint(), new Paint(), new Paint(), new Paint()};
private float[] nameBaselineTab = new float[4];
private float[] labelBaselineTab = new float[4];
private float[] separationLineTab = new float[4];
private int[] labelWidthTab = new int[4];
private int[] labelTextAscentTab = new int[4];
private int[] labelTextDescentTab = new int[4];
private int[] labelDimensionForMarginsTab = new int[4];
private int[] labelDimensionForStepsTab = new int[4];
private int[] tiltedLabelXTranslation = new int[4];
private int[] tiltedLabelYTranslation = new int[4];
private FontMetricsInt[] fontMetricsTab = new FontMetricsInt[]{new FontMetricsInt(), new FontMetricsInt(),
new FontMetricsInt(), new FontMetricsInt()};
/**
* Holds formatted axis value label.
*/
private char[] labelBuffer = new char[64];
/**
* Holds number of values that should be drown for each axis.
*/
private int[] valuesToDrawNumTab = new int[4];
/**
* Holds raw values to draw for each axis.
*/
private float[][] rawValuesTab = new float[4][0];
/**
* Holds auto-generated values that should be drawn, i.e if axis is inside not all auto-generated values should be
* drawn to avoid overdrawing. Used only for auto axes.
*/
private float[][] autoValuesToDrawTab = new float[4][0];
/**
* Holds custom values that should be drawn, used only for custom axes.
*/
private AxisValue[][] valuesToDrawTab = new AxisValue[4][0];
/**
* Buffers for axes lines coordinates(to draw grid in the background).
*/
private float[][] linesDrawBufferTab = new float[4][0];
/**
* Buffers for auto-generated values for each axis, used only if there are auto axes.
*/
private AxisAutoValues[] autoValuesBufferTab = new AxisAutoValues[]{new AxisAutoValues(),
new AxisAutoValues(), new AxisAutoValues(), new AxisAutoValues()};
public AxesRenderer(Context context, Chart chart) {
this.chart = chart;
computator = chart.getChartComputator();
density = context.getResources().getDisplayMetrics().density;
scaledDensity = context.getResources().getDisplayMetrics().scaledDensity;
axisMargin = ChartUtils.dp2px(density, DEFAULT_AXIS_MARGIN_DP);
for (int position = 0; position < 4; ++position) {
labelPaintTab[position].setStyle(Paint.Style.FILL);
labelPaintTab[position].setAntiAlias(true);
namePaintTab[position].setStyle(Paint.Style.FILL);
namePaintTab[position].setAntiAlias(true);
linePaintTab[position].setStyle(Paint.Style.STROKE);
linePaintTab[position].setAntiAlias(true);
}
}
public void onChartSizeChanged() {
onChartDataOrSizeChanged();
}
public void onChartDataChanged() {
onChartDataOrSizeChanged();
}
private void onChartDataOrSizeChanged() {
initAxis(chart.getChartData().getAxisXTop(), TOP);
initAxis(chart.getChartData().getAxisXBottom(), BOTTOM);
initAxis(chart.getChartData().getAxisYLeft(), LEFT);
initAxis(chart.getChartData().getAxisYRight(), RIGHT);
}
public void resetRenderer() {
this.computator = chart.getChartComputator();
}
/**
* Initialize attributes and measurement for axes(left, right, top, bottom);
*/
private void initAxis(Axis axis, int position) {
if (null == axis) {
return;
}
initAxisAttributes(axis, position);
initAxisMargin(axis, position);
initAxisMeasurements(axis, position);
}
private void initAxisAttributes(Axis axis, int position) {
initAxisPaints(axis, position);
initAxisTextAlignment(axis, position);
if (axis.hasTiltedLabels()) {
initAxisDimensionForTiltedLabels(position);
intiTiltedLabelsTranslation(axis, position);
} else {
initAxisDimension(position);
}
}
private void initAxisPaints(Axis axis, int position) {
Typeface typeface = axis.getTypeface();
if (null != typeface) {
labelPaintTab[position].setTypeface(typeface);
namePaintTab[position].setTypeface(typeface);
}
labelPaintTab[position].setColor(axis.getTextColor());
labelPaintTab[position].setTextSize(ChartUtils.sp2px(scaledDensity, axis.getTextSize()));
labelPaintTab[position].getFontMetricsInt(fontMetricsTab[position]);
namePaintTab[position].setColor(axis.getTextColor());
namePaintTab[position].setTextSize(ChartUtils.sp2px(scaledDensity, axis.getTextSize()));
linePaintTab[position].setColor(axis.getLineColor());
labelTextAscentTab[position] = Math.abs(fontMetricsTab[position].ascent);
labelTextDescentTab[position] = Math.abs(fontMetricsTab[position].descent);
labelWidthTab[position] = (int) labelPaintTab[position].measureText(labelWidthChars, 0,
axis.getMaxLabelChars());
}
private void initAxisTextAlignment(Axis axis, int position) {
namePaintTab[position].setTextAlign(Align.CENTER);
if (TOP == position || BOTTOM == position) {
labelPaintTab[position].setTextAlign(Align.CENTER);
} else if (LEFT == position) {
if (axis.isInside()) {
labelPaintTab[position].setTextAlign(Align.LEFT);
} else {
labelPaintTab[position].setTextAlign(Align.RIGHT);
}
} else if (RIGHT == position) {
if (axis.isInside()) {
labelPaintTab[position].setTextAlign(Align.RIGHT);
} else {
labelPaintTab[position].setTextAlign(Align.LEFT);
}
}
}
private void initAxisDimensionForTiltedLabels(int position) {
int pythagoreanFromLabelWidth = (int) Math.sqrt(Math.pow(labelWidthTab[position], 2) / 2);
int pythagoreanFromAscent = (int) Math.sqrt(Math.pow(labelTextAscentTab[position], 2) / 2);
labelDimensionForMarginsTab[position] = pythagoreanFromAscent + pythagoreanFromLabelWidth;
labelDimensionForStepsTab[position] = Math.round(labelDimensionForMarginsTab[position] * 0.75f);
}
private void initAxisDimension(int position) {
if (LEFT == position || RIGHT == position) {
labelDimensionForMarginsTab[position] = labelWidthTab[position];
labelDimensionForStepsTab[position] = labelTextAscentTab[position];
} else if (TOP == position || BOTTOM == position) {
labelDimensionForMarginsTab[position] = labelTextAscentTab[position] +
labelTextDescentTab[position];
labelDimensionForStepsTab[position] = labelWidthTab[position];
}
}
private void intiTiltedLabelsTranslation(Axis axis, int position) {
int pythagoreanFromLabelWidth = (int) Math.sqrt(Math.pow(labelWidthTab[position], 2) / 2);
int pythagoreanFromAscent = (int) Math.sqrt(Math.pow(labelTextAscentTab[position], 2) / 2);
int dx = 0;
int dy = 0;
if (axis.isInside()) {
if (LEFT == position) {
dx = pythagoreanFromAscent;
} else if (RIGHT == position) {
dy = -pythagoreanFromLabelWidth / 2;
} else if (TOP == position) {
dy = (pythagoreanFromAscent + pythagoreanFromLabelWidth / 2) - labelTextAscentTab[position];
} else if (BOTTOM == position) {
dy = -pythagoreanFromLabelWidth / 2;
}
} else {
if (LEFT == position) {
dy = -pythagoreanFromLabelWidth / 2;
} else if (RIGHT == position) {
dx = pythagoreanFromAscent;
} else if (TOP == position) {
dy = -pythagoreanFromLabelWidth / 2;
} else if (BOTTOM == position) {
dy = (pythagoreanFromAscent + pythagoreanFromLabelWidth / 2) - labelTextAscentTab[position];
}
}
tiltedLabelXTranslation[position] = dx;
tiltedLabelYTranslation[position] = dy;
}
private void initAxisMargin(Axis axis, int position) {
int margin = 0;
if (!axis.isInside() && (axis.isAutoGenerated() || !axis.getValues().isEmpty())) {
margin += axisMargin + labelDimensionForMarginsTab[position];
}
margin += getAxisNameMargin(axis, position);
insetContentRectWithAxesMargins(margin, position);
}
private int getAxisNameMargin(Axis axis, int position) {
int margin = 0;
if (!TextUtils.isEmpty(axis.getName())) {
margin += labelTextAscentTab[position];
margin += labelTextDescentTab[position];
margin += axisMargin;
}
return margin;
}
private void insetContentRectWithAxesMargins(int axisMargin, int position) {
if (LEFT == position) {
chart.getChartComputator().insetContentRect(axisMargin, 0, 0, 0);
} else if (RIGHT == position) {
chart.getChartComputator().insetContentRect(0, 0, axisMargin, 0);
} else if (TOP == position) {
chart.getChartComputator().insetContentRect(0, axisMargin, 0, 0);
} else if (BOTTOM == position) {
chart.getChartComputator().insetContentRect(0, 0, 0, axisMargin);
}
}
private void initAxisMeasurements(Axis axis, int position) {
if (LEFT == position) {
if (axis.isInside()) {
labelBaselineTab[position] = computator.getContentRectMinusAllMargins().left + axisMargin;
nameBaselineTab[position] = computator.getContentRectMinusAxesMargins().left - axisMargin
- labelTextDescentTab[position];
} else {
labelBaselineTab[position] = computator.getContentRectMinusAxesMargins().left - axisMargin;
nameBaselineTab[position] = labelBaselineTab[position] - axisMargin
- labelTextDescentTab[position] - labelDimensionForMarginsTab[position];
}
separationLineTab[position] = computator.getContentRectMinusAllMargins().left;
} else if (RIGHT == position) {
if (axis.isInside()) {
labelBaselineTab[position] = computator.getContentRectMinusAllMargins().right - axisMargin;
nameBaselineTab[position] = computator.getContentRectMinusAxesMargins().right + axisMargin
+ labelTextAscentTab[position];
} else {
labelBaselineTab[position] = computator.getContentRectMinusAxesMargins().right + axisMargin;
nameBaselineTab[position] = labelBaselineTab[position] + axisMargin
+ labelTextAscentTab[position] + labelDimensionForMarginsTab[position];
}
separationLineTab[position] = computator.getContentRectMinusAllMargins().right;
} else if (BOTTOM == position) {
if (axis.isInside()) {
labelBaselineTab[position] = computator.getContentRectMinusAllMargins().bottom - axisMargin
- labelTextDescentTab[position];
nameBaselineTab[position] = computator.getContentRectMinusAxesMargins().bottom + axisMargin
+ labelTextAscentTab[position];
} else {
labelBaselineTab[position] = computator.getContentRectMinusAxesMargins().bottom + axisMargin
+ labelTextAscentTab[position];
nameBaselineTab[position] = labelBaselineTab[position] + axisMargin +
labelDimensionForMarginsTab[position];
}
separationLineTab[position] = computator.getContentRectMinusAllMargins().bottom;
} else if (TOP == position) {
if (axis.isInside()) {
labelBaselineTab[position] = computator.getContentRectMinusAllMargins().top + axisMargin
+ labelTextAscentTab[position];
nameBaselineTab[position] = computator.getContentRectMinusAxesMargins().top - axisMargin
- labelTextDescentTab[position];
} else {
labelBaselineTab[position] = computator.getContentRectMinusAxesMargins().top - axisMargin
- labelTextDescentTab[position];
nameBaselineTab[position] = labelBaselineTab[position] - axisMargin -
labelDimensionForMarginsTab[position];
}
separationLineTab[position] = computator.getContentRectMinusAllMargins().top;
} else {
throw new IllegalArgumentException("Invalid axis position: " + position);
}
}
/**
* Prepare axes coordinates and draw axes lines(if enabled) in the background.
*
* @param canvas
*/
public void drawInBackground(Canvas canvas) {
Axis axis = chart.getChartData().getAxisYLeft();
if (null != axis) {
prepareAxisToDraw(axis, LEFT);
drawAxisLines(canvas, axis, LEFT);
}
axis = chart.getChartData().getAxisYRight();
if (null != axis) {
prepareAxisToDraw(axis, RIGHT);
drawAxisLines(canvas, axis, RIGHT);
}
axis = chart.getChartData().getAxisXBottom();
if (null != axis) {
prepareAxisToDraw(axis, BOTTOM);
drawAxisLines(canvas, axis, BOTTOM);
}
axis = chart.getChartData().getAxisXTop();
if (null != axis) {
prepareAxisToDraw(axis, TOP);
drawAxisLines(canvas, axis, TOP);
}
}
private void prepareAxisToDraw(Axis axis, int position) {
if (axis.isAutoGenerated()) {
prepareAutoGeneratedAxis(axis, position);
} else {
prepareCustomAxis(axis, position);
}
}
/**
* Draw axes labels and names in the foreground.
*
* @param canvas
*/
public void drawInForeground(Canvas canvas) {
Axis axis = chart.getChartData().getAxisYLeft();
if (null != axis) {
drawAxisLabelsAndName(canvas, axis, LEFT);
}
axis = chart.getChartData().getAxisYRight();
if (null != axis) {
drawAxisLabelsAndName(canvas, axis, RIGHT);
}
axis = chart.getChartData().getAxisXBottom();
if (null != axis) {
drawAxisLabelsAndName(canvas, axis, BOTTOM);
}
axis = chart.getChartData().getAxisXTop();
if (null != axis) {
drawAxisLabelsAndName(canvas, axis, TOP);
}
}
private void prepareCustomAxis(Axis axis, int position) {
final Viewport maxViewport = computator.getMaximumViewport();
final Viewport visibleViewport = computator.getVisibleViewport();
final Rect contentRect = computator.getContentRectMinusAllMargins();
boolean isAxisVertical = isAxisVertical(position);
float viewportMin, viewportMax;
float scale = 1;
if (isAxisVertical) {
if (maxViewport.height() > 0 && visibleViewport.height() > 0) {
scale = contentRect.height() * (maxViewport.height() / visibleViewport.height());
}
viewportMin = visibleViewport.bottom;
viewportMax = visibleViewport.top;
} else {
if (maxViewport.width() > 0 && visibleViewport.width() > 0) {
scale = contentRect.width() * (maxViewport.width() / visibleViewport.width());
}
viewportMin = visibleViewport.left;
viewportMax = visibleViewport.right;
}
if (scale == 0) {
scale = 1;
}
int module = (int) Math.max(1,
Math.ceil((axis.getValues().size() * labelDimensionForStepsTab[position] * 1.5) / scale));
//Reinitialize tab to hold lines coordinates.
if (axis.hasLines() && (linesDrawBufferTab[position].length < axis.getValues().size() * 4)) {
linesDrawBufferTab[position] = new float[axis.getValues().size() * 4];
}
//Reinitialize tabs to hold all raw values to draw.
if (rawValuesTab[position].length < axis.getValues().size()) {
rawValuesTab[position] = new float[axis.getValues().size()];
}
//Reinitialize tabs to hold all raw values to draw.
if (valuesToDrawTab[position].length < axis.getValues().size()) {
valuesToDrawTab[position] = new AxisValue[axis.getValues().size()];
}
float rawValue;
int valueIndex = 0;
int valueToDrawIndex = 0;
for (AxisValue axisValue : axis.getValues()) {
// Draw axis values that are within visible viewport.
final float value = axisValue.getValue();
if (value >= viewportMin && value <= viewportMax) {
// Draw axis values that have 0 module value, this will hide some labels if there is no place for them.
if (0 == valueIndex % module) {
if (isAxisVertical) {
rawValue = computator.computeRawY(value);
} else {
rawValue = computator.computeRawX(value);
}
if (checkRawValue(contentRect, rawValue, axis.isInside(), position, isAxisVertical)) {
rawValuesTab[position][valueToDrawIndex] = rawValue;
valuesToDrawTab[position][valueToDrawIndex] = axisValue;
++valueToDrawIndex;
}
}
// If within viewport - increment valueIndex;
++valueIndex;
}
}
valuesToDrawNumTab[position] = valueToDrawIndex;
}
private void prepareAutoGeneratedAxis(Axis axis, int position) {
final Viewport visibleViewport = computator.getVisibleViewport();
final Rect contentRect = computator.getContentRectMinusAllMargins();
boolean isAxisVertical = isAxisVertical(position);
float start, stop;
int contentRectDimension;
if (isAxisVertical) {
start = visibleViewport.bottom;
stop = visibleViewport.top;
contentRectDimension = contentRect.height();
} else {
start = visibleViewport.left;
stop = visibleViewport.right;
contentRectDimension = contentRect.width();
}
FloatUtils.computeAutoGeneratedAxisValues(start, stop, Math.abs(contentRectDimension) /
labelDimensionForStepsTab[position] / 2, autoValuesBufferTab[position]);
//Reinitialize tab to hold lines coordinates.
if (axis.hasLines()
&& (linesDrawBufferTab[position].length < autoValuesBufferTab[position].valuesNumber * 4)) {
linesDrawBufferTab[position] = new float[autoValuesBufferTab[position].valuesNumber * 4];
}
//Reinitialize tabs to hold all raw and auto values.
if (rawValuesTab[position].length < autoValuesBufferTab[position].valuesNumber) {
rawValuesTab[position] = new float[autoValuesBufferTab[position].valuesNumber];
}
if (autoValuesToDrawTab[position].length < autoValuesBufferTab[position].valuesNumber) {
autoValuesToDrawTab[position] = new float[autoValuesBufferTab[position].valuesNumber];
}
float rawValue;
int valueToDrawIndex = 0;
for (int i = 0; i < autoValuesBufferTab[position].valuesNumber; ++i) {
if (isAxisVertical) {
rawValue = computator.computeRawY(autoValuesBufferTab[position].values[i]);
} else {
rawValue = computator.computeRawX(autoValuesBufferTab[position].values[i]);
}
if (checkRawValue(contentRect, rawValue, axis.isInside(), position, isAxisVertical)) {
rawValuesTab[position][valueToDrawIndex] = rawValue;
autoValuesToDrawTab[position][valueToDrawIndex] = autoValuesBufferTab[position].values[i];
++valueToDrawIndex;
}
}
valuesToDrawNumTab[position] = valueToDrawIndex;
}
private boolean checkRawValue(Rect rect, float rawValue, boolean axisInside, int position, boolean isVertical) {
if (axisInside) {
if (isVertical) {
float marginBottom = labelTextAscentTab[BOTTOM] + axisMargin;
float marginTop = labelTextAscentTab[TOP] + axisMargin;
if (rawValue <= rect.bottom - marginBottom && rawValue >= rect.top + marginTop) {
return true;
} else {
return false;
}
} else {
float margin = labelWidthTab[position] / 2;
if (rawValue >= rect.left + margin && rawValue <= rect.right - margin) {
return true;
} else {
return false;
}
}
}
return true;
}
private void drawAxisLines(Canvas canvas, Axis axis, int position) {
final Rect contentRectMargins = computator.getContentRectMinusAxesMargins();
float separationX1, separationY1, separationX2, separationY2;
separationX1 = separationY1 = separationX2 = separationY2 = 0;
float lineX1, lineY1, lineX2, lineY2;
lineX1 = lineY1 = lineX2 = lineY2 = 0;
boolean isAxisVertical = isAxisVertical(position);
if (LEFT == position || RIGHT == position) {
separationX1 = separationX2 = separationLineTab[position];
separationY1 = contentRectMargins.bottom;
separationY2 = contentRectMargins.top;
lineX1 = contentRectMargins.left;
lineX2 = contentRectMargins.right;
} else if (TOP == position || BOTTOM == position) {
separationX1 = contentRectMargins.left;
separationX2 = contentRectMargins.right;
separationY1 = separationY2 = separationLineTab[position];
lineY1 = contentRectMargins.top;
lineY2 = contentRectMargins.bottom;
}
// Draw separation line with the same color as axis labels and name.
if (axis.hasSeparationLine()) {
canvas.drawLine(separationX1, separationY1, separationX2, separationY2, labelPaintTab[position]);
}
if (axis.hasLines()) {
int valueToDrawIndex = 0;
for (; valueToDrawIndex < valuesToDrawNumTab[position]; ++valueToDrawIndex) {
if (isAxisVertical) {
lineY1 = lineY2 = rawValuesTab[position][valueToDrawIndex];
} else {
lineX1 = lineX2 = rawValuesTab[position][valueToDrawIndex];
}
linesDrawBufferTab[position][valueToDrawIndex * 4 + 0] = lineX1;
linesDrawBufferTab[position][valueToDrawIndex * 4 + 1] = lineY1;
linesDrawBufferTab[position][valueToDrawIndex * 4 + 2] = lineX2;
linesDrawBufferTab[position][valueToDrawIndex * 4 + 3] = lineY2;
}
canvas.drawLines(linesDrawBufferTab[position], 0, valueToDrawIndex * 4, linePaintTab[position]);
}
}
private void drawAxisLabelsAndName(Canvas canvas, Axis axis, int position) {
float labelX, labelY;
labelX = labelY = 0;
boolean isAxisVertical = isAxisVertical(position);
if (LEFT == position || RIGHT == position) {
labelX = labelBaselineTab[position];
} else if (TOP == position || BOTTOM == position) {
labelY = labelBaselineTab[position];
}
for (int valueToDrawIndex = 0; valueToDrawIndex < valuesToDrawNumTab[position]; ++valueToDrawIndex) {
int charsNumber = 0;
if (axis.isAutoGenerated()) {
final float value = autoValuesToDrawTab[position][valueToDrawIndex];
charsNumber = axis.getFormatter().formatValueForAutoGeneratedAxis(labelBuffer, value,
autoValuesBufferTab[position].decimals);
} else {
AxisValue axisValue = valuesToDrawTab[position][valueToDrawIndex];
charsNumber = axis.getFormatter().formatValueForManualAxis(labelBuffer, axisValue);
}
if (isAxisVertical) {
labelY = rawValuesTab[position][valueToDrawIndex];
} else {
labelX = rawValuesTab[position][valueToDrawIndex];
}
if (axis.hasTiltedLabels()) {
canvas.save();
canvas.translate(tiltedLabelXTranslation[position], tiltedLabelYTranslation[position]);
canvas.rotate(-45, labelX, labelY);
canvas.drawText(labelBuffer, labelBuffer.length - charsNumber, charsNumber, labelX, labelY,
labelPaintTab[position]);
canvas.restore();
} else {
canvas.drawText(labelBuffer, labelBuffer.length - charsNumber, charsNumber, labelX, labelY,
labelPaintTab[position]);
}
}
// Drawing axis name
final Rect contentRectMargins = computator.getContentRectMinusAxesMargins();
if (!TextUtils.isEmpty(axis.getName())) {
if (isAxisVertical) {
canvas.save();
canvas.rotate(-90, contentRectMargins.centerY(), contentRectMargins.centerY());
canvas.drawText(axis.getName(), contentRectMargins.centerY(), nameBaselineTab[position],
namePaintTab[position]);
canvas.restore();
} else {
canvas.drawText(axis.getName(), contentRectMargins.centerX(), nameBaselineTab[position],
namePaintTab[position]);
}
}
}
private boolean isAxisVertical(int position) {
if (LEFT == position || RIGHT == position) {
return true;
} else if (TOP == position || BOTTOM == position) {
return false;
} else {
throw new IllegalArgumentException("Invalid axis position " + position);
}
}
} | [
"xnn1987@163.com"
] | xnn1987@163.com |
da88d2cb5b19904155fa5bfdfac66aaaa0a31849 | eb21514553dd215a1f0dc6b44f60381543a770bf | /app/src/main/java/com/softdesign/devintensive/data/network/ServiceGenerator.java | 39ac37c31665959c5188e5f832909596d03a542d | [] | no_license | hellmojo/DevIntensive | bce58e2b9ce38ec9af1e60e8a6e5547eeeb62a2d | 85a2ee743e38d7fa1ebcde415cc7a87daa3825d5 | refs/heads/master | 2021-01-17T20:55:42.174409 | 2016-07-13T12:31:13 | 2016-07-13T12:31:13 | 61,594,292 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 954 | java | package com.softdesign.devintensive.data.network;
import com.softdesign.devintensive.utils.AppConfig;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class ServiceGenerator {
private static OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
private static Retrofit.Builder sBuilder = new Retrofit.Builder()
.baseUrl(AppConfig.BASE_URL)
.addConverterFactory(GsonConverterFactory.create());
public static <S> S createService(Class<S> serviceClass){
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
httpClient.addInterceptor(logging);
Retrofit retrofit = sBuilder
.client(httpClient.build())
.build();
return retrofit.create(serviceClass);
}
} | [
"energizr@mail.ru"
] | energizr@mail.ru |
36633f134e98e5b4aa6856716c97eedf47290fa2 | e75db83ad2bfca703495c66cc91fc64595302063 | /src/main/java/com/xiaoniu/dataplatform/ruleengine/common/interceptor/OperationLogInterceptor.java | fd1df0f6c8caeaec86032ca097806248779d19cd | [] | no_license | sunrain520/ruleengine-manager | 082b6b8bb90fb70b270b84582df3a845e0854f13 | 1da7ceaed042174544a00bf52d97d132b82a0a02 | refs/heads/master | 2021-08-10T13:41:15.962711 | 2017-11-12T16:45:58 | 2017-11-12T16:45:58 | 110,450,091 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 8,259 | java | package com.xiaoniu.dataplatform.ruleengine.common.interceptor;
import com.alibaba.fastjson.JSON;
import com.xiaoniu.dataplatform.ruleengine.common.ModuleDef;
import com.xiaoniu.dataplatform.ruleengine.entity.OperateLog;
import com.xiaoniu.dataplatform.ruleengine.manager.OperateLogManager;
import com.xiaoniu.dataplatform.ruleengine.mapper.manage.OperateLogMapper;
import com.xiaoniu.dataplatform.ruleengine.utils.RuleEngineErrorCode;
import com.xiaoniu.dataplatform.ruleengine.utils.RuleEngineResponse;
import com.xiaoniu.dataplatform.ruleengine.utils.RuleUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.UnauthorizedException;
import org.codehaus.jackson.map.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.NamedThreadLocal;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
/**
* 操作日志拦截器
*
* @author tanhui
* @version 1.0
*/
public class OperationLogInterceptor extends HandlerInterceptorAdapter {
/**
* Logger for this class
*/
private static final Logger logger = LoggerFactory.getLogger(OperationLogInterceptor.class);
private NamedThreadLocal<Long> startTimeThreadLocal = new NamedThreadLocal<Long>("StopWatch-StartTime");
/**
* 拦截器白名单
*/
private String excludeURLs = "";
@Autowired
private OperateLogManager operateLogManager;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
long beginTime = System.currentTimeMillis(); // 开始时间
startTimeThreadLocal.set(beginTime); // 线程绑定变量
if (excludeURLs.indexOf(request.getRequestURI()) != -1) {
return true;
}
return super.preHandle(request, response, handler);
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
super.postHandle(request, response, handler, modelAndView);
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
long endTime = System.currentTimeMillis();
long beginTime = startTimeThreadLocal.get();
long consumeTime = endTime - beginTime;
if (consumeTime > 500) {//此处认为处理时间超过1000毫秒的请求为慢请求
logger.warn(String.format("%s consume %d millis", request.getRequestURI(), consumeTime));
}
if (handler instanceof HandlerMethod) {
HandlerMethod methodHandler = (HandlerMethod) handler;
ModuleDef moduleDef = methodHandler.getMethod().getAnnotation(ModuleDef.class);
if (moduleDef != null) {
String appId = RuleUtils.getAppId();
String method = request.getMethod();
String url = request.getRequestURI();
String localAddr = request.getLocalAddr();
String remoteAddr = request.getRemoteAddr();
String serviceName = "ruleengine-web";
String operateModule = "";//模块
String operate = ""; //操作
String operator = RuleUtils.getWorkNum(); //操作人
String data = "";
String subModule = "";
operateModule = moduleDef.module();
subModule = moduleDef.subModule();
operate = moduleDef.operate();
OperateLog operateLog = new OperateLog();
operateLog.setfAppId(appId);
operateLog.setfLocalAddress(localAddr);
operateLog.setfRemoteAddress(remoteAddr);
operateLog.setfUrl(url);
operateLog.setfMethod(method);
operateLog.setfServiceName(serviceName);
operateLog.setfModule(operateModule);
operateLog.setfOperate(operate);
operateLog.setfOperator(operator);
operateLog.setfCreateTime(new Date());
operateLog.setfUpdateTime(operateLog.getfCreateTime());
Map parameters = request.getParameterMap();
ObjectMapper mapper = new ObjectMapper();
if (parameters != null) {
String requestParameters = mapper.writeValueAsString(parameters);
data = requestParameters;
if (StringUtils.isEmpty(subModule)) { //规则项模块具体找ruleId
if(operateModule.startsWith("规则项")){
String ruleId = request.getParameter("fRuleId");
if(StringUtils.isEmpty(ruleId)){
ruleId = request.getParameter("ruleId");
}
if (StringUtils.isNotEmpty(ruleId)) {
if(ruleId.contains("_")){
ruleId = ruleId.split("_")[1];
}
subModule = RuleUtils.queryRuleName(ruleId);
}
}
}
logger.info("request data:{}",requestParameters);
}
operateLog.setfData(data);
operateLog.setfSubModule(subModule);
operateLogManager.saveOperateLog(operateLog);
}
}
}
@Override
public void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
super.afterConcurrentHandlingStarted(request, response, handler);
}
/**
* 解析head
*
* @param request
* @return
*/
private String parseHeads(HttpServletRequest request) {
Enumeration<String> headEnumeration = request.getHeaderNames();
Map<String, String> headMap = new HashMap<String, String>();
while (headEnumeration.hasMoreElements()) {
String name = (String) headEnumeration.nextElement();
if (!StringUtils.equals("Cookie", name)) {
String value = request.getHeader(name);
headMap.put(name, value);
}
}
return JSON.toJSONString(headMap);
}
/**
* 输出字节
*
* @param is
* @param contentLen
* @return
*/
public static final byte[] readBytes(InputStream is, int contentLen) {
if (contentLen > 0) {
int readLen = 0;
int readLengthThisTime = 0;
byte[] message = new byte[contentLen];
try {
while (readLen != contentLen) {
readLengthThisTime = is.read(message, readLen, contentLen - readLen);
if (readLengthThisTime == -1) {// Should not happen.
break;
}
readLen += readLengthThisTime;
}
return message;
} catch (IOException e) {
logger.error("读取流异常.", e);
}
}
return new byte[]{};
}
/**
* excludeURLs
*
* @return the excludeURLs
*/
public String getExcludeURLs() {
return excludeURLs;
}
/**
* @param excludeURLs the excludeURLs to set
*/
public void setExcludeURLs(String excludeURLs) {
this.excludeURLs = excludeURLs;
}
}
| [
"767375210@qq.com"
] | 767375210@qq.com |
e0a3244841d4ada0a6ffc410671bb5a5c1fd20e7 | 63a799928f5fa6c0dac007412ee09a662a1185b4 | /src/main/java/com/test/auth/controller/UserController.java | a860be703984939a516e18499771604251e15fae | [] | no_license | toandam0210/rsa | 5533d6b17c96d242e83583d7c9f8ef3f61e2edbb | 46d0faee4c1e0b4672ea06ffb6693cb02199abb3 | refs/heads/master | 2023-08-02T09:29:17.567109 | 2021-06-11T06:41:01 | 2021-06-11T06:41:01 | 375,925,208 | 0 | 0 | null | 2021-09-16T15:52:17 | 2021-06-11T06:22:08 | Java | UTF-8 | Java | false | false | 1,953 | java | package com.test.auth.controller;
import java.security.interfaces.RSAPublicKey;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.test.auth.model.User;
import com.test.auth.payload.LoginRequest;
import com.test.auth.payload.SignupRequest;
import com.test.auth.service.UserService;
@CrossOrigin(origins = "*", maxAge = 3600)
@RestController
@RequestMapping("/api")
public class UserController {
@Autowired
UserService userService;
@Autowired
RSAPublicKey publicKey;
@PostMapping("/login")
public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginRequest loginRequest) throws Exception {
return ResponseEntity.ok(userService.login(loginRequest));
}
@PostMapping("/signup")
public ResponseEntity<?> registerUser(@Valid @RequestBody SignupRequest signUpRequest) {
return userService.signup(signUpRequest);
}
@PutMapping({ "updateUser/{userId}" })
public ResponseEntity<User> updateUser(@PathVariable("userId") int userId, @RequestBody User user) {
userService.updateUser(userId, user);
return new ResponseEntity<>(userService.getUserById(userId), HttpStatus.OK);
}
@DeleteMapping({ "deleteUser/{userId}" })
public ResponseEntity<String> deleteUser(@PathVariable("userId") int userId) {
userService.deleteUser(userId);
return new ResponseEntity<>("True", HttpStatus.OK);
}
} | [
"61044788+toan0210@users.noreply.github.com"
] | 61044788+toan0210@users.noreply.github.com |
bbc332237030ea7c715d1d99466d4fa73b3c7edb | a1dcbe0e196491b996ce0a005bc85ab561fd2958 | /cloud-config-client-3355/src/test/java/com/ygm/springcloud/CloudConfigClient3355ApplicationTests.java | 71270868377dff7756331079a227b9e7e87c2f5c | [] | no_license | Yanggaoming/springcloud | b6fbf29f5bad95c944342b21e2c913f67c87b3a5 | f924b25266b877c4b01ad19d7ef8efa4f26df535 | refs/heads/master | 2023-01-12T18:35:52.350680 | 2020-11-20T10:20:09 | 2020-11-20T10:20:33 | 314,518,845 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 226 | java | package com.ygm.springcloud;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class CloudConfigClient3355ApplicationTests {
@Test
void contextLoads() {
}
}
| [
"1592470135@qq.com"
] | 1592470135@qq.com |
606064fd7caee989a7b014757a9737c3229d4909 | c6d4e0902089744a6c55700ec847795e3422f594 | /Pluralsight/Spring/Spring Security/oauth2-spring-security-spring-boot/effective-oauth2-with-spring/module_4/1_spring security custom authorization server/mod4_authorization_server/src/main/java/com/pluralsight/security/userdetails/UserInfo.java | f4c824820577f97c125fbbbbf69af4b1d2489952 | [] | no_license | MickeyMuis007/software-courses | 4f96f9f5167ae9835ce991be3a1bb1d70e317892 | 0531a3f480c00651795163b7550a06e3d24a5276 | refs/heads/master | 2022-12-22T22:52:43.436753 | 2022-03-08T04:42:00 | 2022-03-08T04:42:00 | 235,821,404 | 0 | 0 | null | 2022-12-16T01:28:40 | 2020-01-23T15:15:26 | C# | UTF-8 | Java | false | false | 390 | java | package com.pluralsight.security.userdetails;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public class UserInfo {
private final String username;
private final String firstName;
private final String lastName;
private final String email;
public String getFirstAndLastName() {
return firstName+" "+lastName;
}
}
| [
"mihendricks1@gmail.com"
] | mihendricks1@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.