blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d3e41a23ee375cb6967901d7837a255dfe408a1f | c6e76418dc68bbd852b450ea9eca7880cbf6c9d3 | /src/main/java/com/example/blogpost/payload/CommentRequest.java | 55f7075c15365313e33431cf64d6e313af802a3f | [] | no_license | agbolade92/BlogAPI | 2544e5bcfec47b65a2481594b321b4aaedddf035 | 29306602a99a7989eb75668954fd3cdcafdba09f | refs/heads/master | 2023-08-01T16:56:58.441578 | 2021-09-26T16:51:02 | 2021-09-26T16:51:02 | 410,014,198 | 0 | 0 | null | 2021-09-26T16:51:03 | 2021-09-24T15:29:09 | Java | UTF-8 | Java | false | false | 126 | java | package com.example.blogpost.payload;
import lombok.Data;
@Data
public class CommentRequest {
private String content;
}
| [
"agbolade92"
] | agbolade92 |
fc63f33aab41ffc1c029441492c315ff8945c5b5 | 1c2e1dd5b7a2392f2d3a89013b45faf4e02156fe | /src/main/java/dev/semo/npgen/utils/UtilBase64File.java | be1dd6a66ab3401c71cb9abadd46bc32a79c51af | [
"MIT"
] | permissive | Semo/npgen | 0802aa87f785747027006c6b9c65bcda5a492660 | 5a5e8c04cbb4a111585163121a5b26a4b86fa05c | refs/heads/master | 2020-06-26T13:20:41.152998 | 2019-07-31T14:54:29 | 2019-07-31T14:54:29 | 199,643,232 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 789 | java | package dev.semo.npgen.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Base64;
public class UtilBase64File {
public static String encodeFromFile(String imagePath) {
File file = new File(imagePath);
try (FileInputStream imageInFile = new FileInputStream(file)) {
String base64ImageString = "";
byte imageData[] = new byte[(int) file.length()];
imageInFile.read(imageData);
base64ImageString = Base64.getEncoder().encodeToString(imageData);
return base64ImageString;
} catch (FileNotFoundException e) {
System.out.println("Image not found" + e);
} catch (IOException ioe) {
System.out.println("Exception while reading the Image " + ioe);
}
return null;
}
}
| [
"[email protected]"
] | |
6e5aeaf4f634823507a59f20abe9ff338c0a46e0 | a1f048ba51689a1b73de0db04a4b4b0197038ff8 | /src/com/web/array/MoveAllZeroAtEnd.java | f0765f1057f3271da174a475365f583e98cae5e9 | [] | no_license | avinash8142/core-java-practice | 83d549a352ffa7c34f717216688aa6c526a00ec7 | abc4e8da3d537ba277d8e439e86e9f4e95af7a72 | refs/heads/master | 2022-12-15T20:32:54.618232 | 2020-09-13T04:14:49 | 2020-09-13T04:14:49 | 295,075,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,262 | java | package com.web.array;
import java.util.Arrays;
public class MoveAllZeroAtEnd {
public static void main(String[] args) {
// Input : arr[] = {1, 2, 0, 4, 3, 0, 5, 0};
// Output : arr[] = {1, 2, 4, 3, 5, 0, 0};
int arr[]= {1, 2, 0, 4, 3, 0, 5, 0};
System.out.println("input "+Arrays.toString(arr));
// moveAllZeroAtEnd(arr);
// moveAllZeroAtEndMaintainOrder(arr);
moveAllZeroAtEndSingleTraversal(arr);
System.out.println(Arrays.toString(arr));
}
//input order is not maintaining
private static void moveAllZeroAtEnd(int arr[]) {
int i=0;
int j=arr.length-1;
while(i<j) {
if(arr[i]!=0) {
i++;
}else if(arr[j]==0) {
j--;
}else {
int temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;
i++;
j--;
}
}
System.out.println(Arrays.toString(arr));
}
//move all zeroes at the end of array in two traversal
private static void moveAllZeroAtEndMaintainOrder(int arr[]) {
int i=0;
int count=0;
while(i<arr.length) {
if(arr[i]!=0)
{
arr[count++]=arr[i];
}
i++;
}
while(count<arr.length) {
arr[count++]=0;
}
}
private static void moveAllZeroAtEndSingleTraversal(int arr[]) {
int count=0;
for(int i=0;i<arr.length;i++) {
if(arr[i]!=0) {
int temp=arr[count];
arr[count]=arr[i];
arr[i]=temp;
count++;
}
}
}
}
| [
"[email protected]"
] | |
75ee15eb097566a108a4f351dcd98b8a3fc3dfd9 | abe8257bbd6816dc499d62ab50d4c8ec5fbd608b | /model/MooGameLogic.java | 61ace2ae4af5c82babdd7b13a6877bbafd0dd8e2 | [] | no_license | PatrikFreij/Clean-Code-Examination | cfca5eda6c0ffbc29f51f38d4f3b96bc9d4f9cd7 | b4d0f41554f0e38b66207169a1190ca3c6f4b8a8 | refs/heads/main | 2023-01-24T15:18:32.998671 | 2020-12-01T16:02:13 | 2020-12-01T16:02:13 | 317,585,373 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 913 | java | package model;
public class MooGameLogic implements GameLogicService {
@Override
public String generateGoal() {
String goal = "";
for (int i = 0; i < 4; i++) {
int random = (int) (Math.random() * 10);
String randomDigit = "" + random;
while (goal.contains(randomDigit)) {
random = (int) (Math.random() * 10);
randomDigit = "" + random;
}
goal = goal + randomDigit;
}
return goal;
}
@Override
public String checkCorrectGoal(String goal, String guess) {
int cows = 0, bulls = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (goal.charAt(i) == guess.charAt(j)) {
if (i == j) {
bulls++;
} else {
cows++;
}
}
}
}
String result = "";
for (int i = 0; i < bulls; i++) {
result = result + "B";
}
result = result + ",";
for (int i = 0; i < cows; i++) {
result = result + "C";
}
return result;
}
}
| [
"[email protected]"
] | |
a91631f66aa6ffa16a74f28d3b59b07366fff13c | 9d51fe82c754fb1b9ac2b1003b586fc42f05f578 | /Project/MyCosts2/app/src/main/java/com/example/mycosts/api/request/JacksonPostRequest.java | c6735a4b3fb53a2d14ee5e9f51e21196b000f2ac | [] | no_license | liza-dobrynina/MyCosts | 15749cbcd5f8a0659d63274286d7fd16edd028b6 | 979d49483a6e221efd232a9fa4162448822081ff | refs/heads/master | 2020-04-28T11:31:39.102834 | 2020-02-27T10:42:36 | 2020-02-27T10:42:36 | 175,244,165 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 487 | java | package com.example.mycosts.api.request;
import com.android.volley.Response;
public class JacksonPostRequest<T> extends JacksonRequestWithBody<T> {
public JacksonPostRequest(String url,
Class<T> clazz,
T data,
Response.Listener<T> listener,
Response.ErrorListener errorListener) {
super(Method.POST, url, clazz, data, listener, errorListener);
}
}
| [
"[email protected]"
] | |
aeb6195d23fef3dd8a294e53bebbb5512b7ed215 | d573776e82ab81f2cc82d6d5ccb570a70bd5c538 | /Java/src/main/java/Misc/LastStoneWeight/LastStoneWeight.java | 7f99772c4f5daa7a0903e05ee836e129163a321a | [] | no_license | timManas/Practice | 9497447beadfe21f668a7f5a9f01970f391b13c2 | fc87bd14d1124109faa58df5ad72ced4e2e7e5b3 | refs/heads/master | 2023-08-17T20:10:49.172995 | 2023-08-16T12:51:01 | 2023-08-16T12:51:01 | 229,855,631 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,055 | java | package Misc.LastStoneWeight;
import java.util.*;
public class LastStoneWeight {
public static void main(String [] args) {
int [] input = {2,7,4,1,8,1};
System.out.println("Last Stone Weight: " + lastStoneWeight(input));
}
public static int lastStoneWeight(int[] stones) {
// Step1 - Create list and populate
List<Integer> list = new ArrayList<>();
for (int i : stones) list.add(i);
// Step2 - Loop by smashing the two heaviest rocks until 1 or none remains
while (list.size() > 1) {
// Step3 - Sort the list
Collections.sort(list);
// Get the two heaviest stones
int y = list.remove(list.size()-1);
int x = list.remove(list.size()-1);
System.out.println("x: " + x + " y: " + y);
// We add the difference back to the list
if (x != y) {
list.add(y-x);
}
}
if (list.isEmpty())
return 0;
return list.get(0);
}
}
| [
"[email protected]"
] | |
f68872cb7fc36aefe1ade2068f2ef7f1957f78f3 | e384651fd3f7f36be1360d83c75aa12566a7416f | /app/src/test/java/com/xiyun/aidlcall/ExampleUnitTest.java | 6535675cc677bbba9d7dce31768cc57641e7e880 | [] | no_license | 258188170/AidlCall | 0a87e596fc5b908711af431dc1b755c0b7abeee1 | f570f8cbeefea3185a0bf0243f9d8b30798103da | refs/heads/master | 2022-06-11T00:36:46.032370 | 2020-05-01T14:50:29 | 2020-05-01T14:50:29 | 260,484,152 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 379 | java | package com.xiyun.aidlcall;
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() {
assertEquals(4, 2 + 2);
}
} | [
"[email protected]"
] | |
50506bcdaac5fd6a913814a98e15d32c8c22a04e | c19b1c410f68d49f8058ec596866c8dc8db0767e | /app/src/main/java/com/wondersgroup/padgrade/MarkChartActivity.java | 5d69ec1b141288788be7bd0a120f9d89de11397a | [] | no_license | kevingekun/PadGrade | e74f4b32ffd104c9f78ddd3a8978b469c1120584 | 094c2a89f54cc083dee1e941e787f4ddf01bc4e9 | refs/heads/master | 2021-01-20T14:25:33.347581 | 2017-05-10T13:42:24 | 2017-05-10T13:42:24 | 90,610,011 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,351 | java | package com.wondersgroup.padgrade;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Layout;
import android.widget.Button;
import android.widget.GridLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;
public class MarkChartActivity extends AppCompatActivity {
@ViewInject(R.id.mtv)
private TextView tv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.app_mark);
GridLayout gridLayout = new GridLayout(this);
TextView textView1 = new TextView(this);
textView1.setWidth(200);
textView1.setText("hello");
textView1.setBackgroundColor(Color.RED);
gridLayout.addView(textView1);
setContentView(gridLayout);
/* LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
ll.setPadding(5,5,5,5);
Button btn1=new Button(this);
Button btn2=new Button(this);
btn1.setText("Button1");
btn2.setText("Button2");
ll.addView(btn1);
ll.addView(btn2);
setContentView(ll);*/
}
}
| [
"[email protected]"
] | |
a5bce1c25390463ac65da78c8bff12d6b492a708 | 3dfdb5d20aad275e4fe7be2ce9a4d883b2d28e65 | /FormatFontText/app/src/main/java/Model/Align.java | c9bb0f81c69bfdac87f2a1e9986d9b7171d4294a | [] | no_license | NhanVo97/Android-Nhom4-Baitap-tuan2 | 1287add2eaa0c9dc7a60a6966e9475723b7b7092 | 94e436670a1a9a8e7bc6a646cb3a1631001a57cf | refs/heads/master | 2020-04-28T23:23:05.936240 | 2019-03-16T06:20:24 | 2019-03-16T06:20:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 561 | java | package Model;
import android.view.Gravity;
public class Align {
private int keyAlign;
private String ValueAlign;
public Align(int keyAlign, String valueAlign) {
this.keyAlign = keyAlign;
ValueAlign = valueAlign;
}
public int getKeyAlign() {
return keyAlign;
}
public void setKeyAlign(int keyAlign) {
this.keyAlign = keyAlign;
}
public String getValueAlign() {
return ValueAlign;
}
public void setValueAlign(String valueAlign) {
ValueAlign = valueAlign;
}
}
| [
"[email protected]"
] | |
52f175bbd5a05e98be673f3a44bd79f5bba21a9d | 200db88702071873d7629460e4f9ad2086568f72 | /src/main/java/com/epam/bench/web/rest/dto/ProposedPositionsDto.java | b737ba31f1c6df4ec59a84cce5921df4fa7d71b8 | [] | no_license | masikbelka/bench-core | e1c021c7ca86b6787b072fcd16ef34e6e06bf79d | 51994ddf985db7366e32e6ba3ed9d9e975e9c5da | refs/heads/master | 2021-01-01T18:16:50.521718 | 2017-07-25T11:32:55 | 2017-07-25T11:32:55 | 98,295,894 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 740 | java | package com.epam.bench.web.rest.dto;
public class ProposedPositionsDto {
private String status;
private String name;
private String type;
private String id;
public ProposedPositionsDto() {
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
| [
"[email protected]"
] | |
c13cc3324b5433b0292b621c0f2de332da57f0b5 | 2849271885dd620d2452fef4f74984b316ccffec | /src/main/java/br/com/samsung/security/jwt/JwtTokenProvider.java | d7ed30d80d38cc322acedee23150ee87dc0f948a | [] | no_license | alexsandrodeveloper/samsung-backend | 452dc3647339b2d644c42509c30004a29f32bb0f | c38df11ed87d4e550da7420b9b9a5c40191eeac7 | refs/heads/master | 2022-12-16T09:58:05.318887 | 2020-09-16T00:36:03 | 2020-09-16T00:36:03 | 293,910,467 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,792 | java | package br.com.samsung.security.jwt;
import java.util.Date;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import org.apache.tomcat.util.codec.binary.Base64;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Service;
import br.com.samsung.exception.InvalidJwtAuthenticationException;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jws;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
@Service
public class JwtTokenProvider {
@Value("${security.jwt.token.secret-key:secret}")
private String secretKey = "secret";
@Value("${security.jwt.token.expire-lenght:3600000}")
private long validityInMilliseconts = 3600000; // 1hr
@Autowired
private UserDetailsService userDetailsService;
@PostConstruct
public void init() {
this.secretKey = Base64.encodeBase64String(secretKey.getBytes());
}
public String createToken(String username, Set<String> roles) {
Claims claims = Jwts.claims().setSubject(username);
claims.put("roles", roles);
Date now = new Date();
Date validity = new Date(now.getTime() + validityInMilliseconts);
return Jwts.builder().setClaims(claims)
.setIssuedAt(now).
setExpiration(validity).
signWith(SignatureAlgorithm.HS256, secretKey).compact();
}
public Authentication getAuthentication(String token) {
UserDetails userDetails = this.userDetailsService.loadUserByUsername(getUsername(token));
return new UsernamePasswordAuthenticationToken(userDetails, "" , userDetails.getAuthorities());
}
private String getUsername(String token) {
return Jwts.parser()
.setSigningKey(secretKey)
.parseClaimsJws(token)
.getBody()
.getSubject();
}
public String resolveToken(HttpServletRequest req) {
String bearerToken = req.getHeader("Authorization");
if(bearerToken != null && bearerToken.startsWith("Bearer")) {
return bearerToken.substring(7 , bearerToken.length());
}
return null;
}
public boolean validateToken(String token) {
try {
Jws<Claims> claims = Jwts.parser()
.setSigningKey(secretKey)
.parseClaimsJws(token);
if(claims.getBody().getExpiration().before(new Date())) {
return false;
}
return true;
} catch (Exception e) {
throw new InvalidJwtAuthenticationException("Token expired or invalid");
}
}
}
| [
"[email protected]"
] | |
31adcd856db227ccc02d41901ce13ecd9914ba01 | 1096ef12c07f21d74aa4f9944c831576d337b56a | /图/AudioClipDialog.java | f1d0a6f10b514c710373810c3d72431b1cee2281 | [] | no_license | Wang-KEVIN/java | b918c151993ea6084430ca2934e23323a3d1a8ca | b0bcdb4d65a5d47f1e128476e429f4e9e31b8fa8 | refs/heads/master | 2020-06-03T17:40:46.390065 | 2019-06-13T01:56:32 | 2019-06-13T01:56:32 | 191,667,327 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,936 | java | import java.awt.*;
import java.net.*;
import java.awt.event.*;
import java.io.*;
import java.applet.*;
import javax.swing.*;
public class AudioClipDialog extends JDialog implements Runnable,ItemListener,ActionListener{
Thread thread;
JComboBox choiceMusic;
AudioClip clip;
JButton buttonPlay,buttonLoop,buttonStop;
String str;
AudioClipDialog(){
thread = new Thread(this);
choiceMusic = new JComboBox();
choiceMusic.addItem("选择音频文件");
choiceMusic.addItem("C:\\Users\\Administrator\\Desktop\\代码\\javal\\图\\all falls down.wav"); //绝对路径+文件格式一定要符合(不是改个后缀名就行了)!!!
choiceMusic.addItem("C:\\Users\\Administrator\\Desktop\\代码\\javal\\图\\somethingjustlikethat.wav");
choiceMusic.addItem("C:\\Users\\Administrator\\Desktop\\代码\\javal\\图\\Stitches.wav");
choiceMusic.addItemListener(this);
buttonPlay = new JButton("播放");
buttonLoop = new JButton("循环");
buttonStop = new JButton("停止");
buttonPlay.addActionListener(this);
buttonLoop.addActionListener(this);
buttonStop.addActionListener(this);
setLayout(new FlowLayout());
add(choiceMusic);
add(buttonPlay);
add(buttonLoop);
add(buttonStop);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setSize(333,122);
}
public void itemStateChanged(ItemEvent e){
str = choiceMusic.getSelectedItem().toString();
if(!(thread.isAlive())){
thread = new Thread(this);
}
try{
thread.start();
}
catch(Exception ee){}
}
public void run(){
try{
File file = new File(str);
URI uri = file.toURI();
URL url = uri.toURL();
clip = Applet.newAudioClip(url);
}
catch(Exception e){}
}
public void actionPerformed(ActionEvent e){
if(e.getSource()==buttonPlay)
clip.play();
else if(e.getSource()==buttonLoop)
clip.loop();
else if(e.getSource()==buttonStop)
clip.stop();
}
} | [
"[email protected]"
] | |
9aee1a37a4697c21db049a343a319b0f93c728ae | dc93be9449e5785f84bf3d4a1f662276495823bf | /QueueUsingArray.java | c17017ce253cc3bb9fa9531e3d9837e5f668d574 | [] | no_license | mallickrohan08/DS-Queue | 574482a79697cf35cc7dc2cddcd8bf1270cd16a4 | d519674c1c1681d177ebc2a41b812e373622ae75 | refs/heads/master | 2020-06-11T02:25:51.495133 | 2016-12-09T18:40:29 | 2016-12-09T18:40:29 | 76,022,892 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,271 | java | class Queue {
int size = 0; //No of item in Queue;
int front = -1; //front index or head index, from where we can dequeue item;
int rear = -1; //Rear index or tail index where we can enqueue items;
int capacity = 0; // Maximum size of Queue;
int queArr[];
Queue(int cap) {
this.capacity = cap;
queArr = new int[cap];
}
//Enque
public void enqueue(int data) {
if(full()) { //We can call full method also.
System.out.println("Queue is full.");
return;
}
if(empty()) {
rear = front = 0;
}
else {
rear = (++rear) % queArr.length;
}
queArr[rear] = data;
size++;
}
//DeQueue
public int dequeue() {
if(empty()) {
System.out.println("Queue is Empty.");
return 0;
}
//First get the element.
int item = queArr[front];
//if Queue is having one element
if(rear == front) {
rear = front = -1;
}
else {
front = (++front) % queArr.length;
}
size--;
return item;
}
//Rear;
public int rear() {
if(empty()) {
System.out.println("Queue is Empty.");
return 0;
}
return queArr[rear];
}
//Front
public int front() {
if(empty()) {
System.out.println("Queue is Empty.");
return 0;
}
return queArr[front];
}
//empty
public boolean empty() {
if(rear == -1 && front == -1) {
return true;
}
else {
return false;
}
}
//Full
public boolean full() {
return ((rear +1) % queArr.length == front);
}
public void printQueue() {
if(empty()) {
System.out.println("Queue is empty.");
return;
}
for(int i=0; i < size; i++) {
System.out.println(queArr[i]);
}
}
}
class QueueUsingArray {
public static void main(String args[]) {
//Code goes here;
Queue que = new Queue(3);
que.enqueue(4);
que.enqueue(5);
que.enqueue(6);
que.enqueue(7);
que.printQueue();
System.out.println("-------");
System.out.println("Rear Item : " + que.rear());
System.out.println("Front Item : " + que.front());
System.out.println("-------");
System.out.println("Poped Item : " + que.dequeue());
System.out.println("Poped Item : " + que.dequeue());
que.enqueue(7);
System.out.println("Poped Item : " + que.dequeue());
System.out.println("Poped Item : " + que.dequeue());
System.out.println("Poped Item : " + que.dequeue());
}
} | [
"[email protected]"
] | |
08083266c69a33fdd8ecd50c5ac76a50f4307081 | df3ca7c43baa1ebe8a5407dbd4eb54737c5c1d9d | /src/test/java/pageObject/desktop/CalendarWidget.java | 1d4b1de4c42ee68a365a1d2fd84a01c21e160e81 | [] | no_license | inteticsal/dn-cucumber | adb6398396c2596a969070f4483035b5249ee774 | e15abefacdd23da1a4ce913a058e8f8fb90f04c6 | refs/heads/master | 2021-07-10T10:13:04.390846 | 2017-10-13T13:37:32 | 2017-10-13T13:37:32 | 105,999,817 | 0 | 0 | null | 2017-10-06T12:02:17 | 2017-10-06T12:02:17 | null | UTF-8 | Java | false | false | 2,070 | java | package pageObject.desktop;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import webDriver.Driver;
public class CalendarWidget {
static WebDriver driver = Driver.getCurrentDriver();
public static class Popup {
public static WebElement selectedDate() {
return driver.findElement(By.xpath("//div[@class='calendar-widget']//div[@class='gwt-Label selected']"));
}
public static WebElement afterSelectedDate(int incrementDays) {
return driver.findElement(By.xpath("//td[div/@class='gwt-Label selected' or div/@class='gwt-Label current-date selected']/following::td[" + incrementDays + "]"));
}
public static WebElement beforeSelectedDate(int decrementDays) {
return driver.findElement(By.xpath("//td[div/@class='gwt-Label selected' or div/@class='gwt-Label current-date selected']/preceding::td[" + decrementDays + "]"));
}
public static WebElement todayDate() {
return driver.findElement(By.xpath("//div[@class='calendar-widget']//div[@class='gwt-Label current-date' or div/@class='gwt-Label current-date selected']"));
}
public static WebElement afterTodayDate(int incrementDays) {
return driver.findElement(By.xpath("//td[div/@class='gwt-Label current-date] or div/@class='gwt-Label current-date selected']/following::td[" + incrementDays + "]"));
}
public static WebElement beforeTodayDate(int decrementDays) {
return driver.findElement(By.xpath("//td[div/@class='gwt-Label current-date] or div/@class='gwt-Label current-date selected']/preceding::td[" + decrementDays + "]"));
}
public static WebElement leftArrow() {
return driver.findElement(By.xpath("//div[@class='calendar-widget']//div[@class='left-arrow']"));
}
public static WebElement rightArrow() {
return driver.findElement(By.xpath("//div[@class='calendar-widget']//div[@class='left-arrow']"));
}
}
}
| [
"[email protected]"
] | |
9d3d88020dc4287df853ccb46374f0cb01f86207 | f6a6e017dc71c350963c9b134134ba025644ce1b | /app/src/main/java/com/flurry/sdk/C0136f2.java | 5b6a6b04a773d6507a138ccc91b816f69f2d7830 | [] | no_license | alissonlauffer/via-browser-dump | 0f42f924612785cf1e030edbb3d51da8a30829b0 | 719120ccaff73f65f93c4f43dbfa9654bc6a667d | refs/heads/master | 2023-02-23T06:37:03.730470 | 2021-01-30T18:36:58 | 2021-01-30T18:36:58 | 271,610,980 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 15,615 | java | package com.flurry.sdk;
import com.flurry.sdk.C0147g2;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
/* renamed from: com.flurry.sdk.f2 */
public class C0136f2 {
/* renamed from: c */
public static final Integer f422c = 50;
/* renamed from: d */
private static final String f423d = C0136f2.class.getSimpleName();
/* renamed from: a */
String f424a;
/* renamed from: b */
LinkedHashMap<String, List<String>> f425b;
/* access modifiers changed from: package-private */
/* renamed from: com.flurry.sdk.f2$a */
public class C0137a implements AbstractC0201n2<List<C0147g2>> {
C0137a(C0136f2 f2Var) {
}
@Override // com.flurry.sdk.AbstractC0201n2
/* renamed from: a */
public final AbstractC0185l2<List<C0147g2>> mo100a(int i) {
return new C0175k2(new C0147g2.C0148a());
}
}
/* access modifiers changed from: package-private */
/* renamed from: com.flurry.sdk.f2$b */
public class C0138b implements AbstractC0201n2<List<C0147g2>> {
C0138b(C0136f2 f2Var) {
}
@Override // com.flurry.sdk.AbstractC0201n2
/* renamed from: a */
public final AbstractC0185l2<List<C0147g2>> mo100a(int i) {
return new C0175k2(new C0147g2.C0148a());
}
}
/* access modifiers changed from: package-private */
/* renamed from: com.flurry.sdk.f2$c */
public class C0139c implements AbstractC0201n2<List<C0147g2>> {
C0139c(C0136f2 f2Var) {
}
@Override // com.flurry.sdk.AbstractC0201n2
/* renamed from: a */
public final AbstractC0185l2<List<C0147g2>> mo100a(int i) {
return new C0175k2(new C0147g2.C0148a());
}
}
/* access modifiers changed from: package-private */
/* renamed from: com.flurry.sdk.f2$d */
public class C0140d implements AbstractC0201n2<List<C0147g2>> {
C0140d(C0136f2 f2Var) {
}
@Override // com.flurry.sdk.AbstractC0201n2
/* renamed from: a */
public final AbstractC0185l2<List<C0147g2>> mo100a(int i) {
return new C0175k2(new C0147g2.C0148a());
}
}
/* access modifiers changed from: package-private */
/* renamed from: com.flurry.sdk.f2$e */
public class C0141e implements AbstractC0201n2<List<C0147g2>> {
C0141e(C0136f2 f2Var) {
}
@Override // com.flurry.sdk.AbstractC0201n2
/* renamed from: a */
public final AbstractC0185l2<List<C0147g2>> mo100a(int i) {
return new C0175k2(new C0147g2.C0148a());
}
}
public C0136f2(String str) {
String str2 = str + "Main";
this.f424a = str2;
m420g(str2);
}
/* renamed from: b */
private synchronized void m417b() {
LinkedList linkedList = new LinkedList(this.f425b.keySet());
new C0174k1(C0118e1.m386a().f361a.getFileStreamPath(m425l(this.f424a)), ".YFlurrySenderIndex.info.", 1, new C0140d(this)).mo254c();
if (!linkedList.isEmpty()) {
String str = this.f424a;
m418d(str, linkedList, str);
}
}
/* renamed from: d */
private synchronized void m418d(String str, List<String> list, String str2) {
C0328z2.m889d();
String str3 = f423d;
C0260s1.m686c(5, str3, "Saving Index File for " + str + " file name:" + C0118e1.m386a().f361a.getFileStreamPath(m425l(str)));
C0174k1 k1Var = new C0174k1(C0118e1.m386a().f361a.getFileStreamPath(m425l(str)), str2, 1, new C0139c(this));
ArrayList arrayList = new ArrayList();
for (String str4 : list) {
arrayList.add(new C0147g2(str4));
}
k1Var.mo253b(arrayList);
}
/* renamed from: e */
private synchronized void m419e(String str, byte[] bArr) {
C0328z2.m889d();
String str2 = f423d;
C0260s1.m686c(5, str2, "Saving Block File for " + str + " file name:" + C0118e1.m386a().f361a.getFileStreamPath(C0119e2.m394a(str)));
C0119e2.m395b(str).mo253b(new C0119e2(bArr));
}
/* renamed from: g */
private void m420g(String str) {
this.f425b = new LinkedHashMap<>();
ArrayList<String> arrayList = new ArrayList();
if (m421h(str)) {
List<String> i = m422i(str);
if (i != null && i.size() > 0) {
arrayList.addAll(i);
for (String str2 : arrayList) {
m423j(str2);
}
}
m424k(str);
} else {
List<C0147g2> list = (List) new C0174k1(C0118e1.m386a().f361a.getFileStreamPath(m425l(this.f424a)), str, 1, new C0137a(this)).mo252a();
if (list == null) {
C0260s1.m697n(f423d, "New main file also not found. returning..");
return;
}
for (C0147g2 g2Var : list) {
arrayList.add(g2Var.f452a);
}
}
for (String str3 : arrayList) {
this.f425b.put(str3, m426m(str3));
}
}
/* renamed from: h */
private synchronized boolean m421h(String str) {
File fileStreamPath;
fileStreamPath = C0118e1.m386a().f361a.getFileStreamPath(".FlurrySenderIndex.info.".concat(String.valueOf(str)));
String str2 = f423d;
C0260s1.m686c(5, str2, "isOldIndexFilePresent: for " + str + fileStreamPath.exists());
return fileStreamPath.exists();
}
/* renamed from: i */
private synchronized List<String> m422i(String str) {
ArrayList arrayList;
Throwable th;
C0328z2.m889d();
String str2 = f423d;
C0260s1.m686c(5, str2, "Reading Index File for " + str + " file name:" + C0118e1.m386a().f361a.getFileStreamPath(".FlurrySenderIndex.info.".concat(String.valueOf(str))));
File fileStreamPath = C0118e1.m386a().f361a.getFileStreamPath(".FlurrySenderIndex.info.".concat(String.valueOf(str)));
ArrayList arrayList2 = null;
DataInputStream dataInputStream = null;
if (fileStreamPath.exists()) {
C0260s1.m686c(5, str2, "Reading Index File for " + str + " Found file.");
try {
DataInputStream dataInputStream2 = new DataInputStream(new FileInputStream(fileStreamPath));
try {
int readUnsignedShort = dataInputStream2.readUnsignedShort();
if (readUnsignedShort == 0) {
C0328z2.m890e(dataInputStream2);
return null;
}
arrayList = new ArrayList(readUnsignedShort);
for (int i = 0; i < readUnsignedShort; i++) {
try {
int readUnsignedShort2 = dataInputStream2.readUnsignedShort();
C0260s1.m686c(4, f423d, "read iter " + i + " dataLength = " + readUnsignedShort2);
byte[] bArr = new byte[readUnsignedShort2];
dataInputStream2.readFully(bArr);
arrayList.add(new String(bArr));
} catch (Throwable th2) {
th = th2;
dataInputStream = dataInputStream2;
try {
C0260s1.m687d(6, f423d, "Error when loading persistent file", th);
arrayList2 = arrayList;
return arrayList2;
} finally {
C0328z2.m890e(dataInputStream);
}
}
}
dataInputStream2.readUnsignedShort();
C0328z2.m890e(dataInputStream2);
arrayList2 = arrayList;
} catch (Throwable th3) {
th = th3;
arrayList = null;
dataInputStream = dataInputStream2;
C0260s1.m687d(6, f423d, "Error when loading persistent file", th);
arrayList2 = arrayList;
return arrayList2;
}
} catch (Throwable th4) {
th = th4;
arrayList = null;
C0260s1.m687d(6, f423d, "Error when loading persistent file", th);
arrayList2 = arrayList;
return arrayList2;
}
} else {
C0260s1.m686c(5, str2, "Agent cache file doesn't exist.");
}
return arrayList2;
}
/* renamed from: j */
private void m423j(String str) {
List<String> i = m422i(str);
if (i == null) {
C0260s1.m697n(f423d, "No old file to replace");
return;
}
for (String str2 : i) {
byte[] n = m427n(str2);
if (n == null) {
C0260s1.m686c(6, f423d, "File does not exist");
} else {
m419e(str2, n);
C0328z2.m889d();
String str3 = f423d;
C0260s1.m686c(5, str3, "Deleting block File for " + str2 + " file name:" + C0118e1.m386a().f361a.getFileStreamPath(".flurrydatasenderblock.".concat(String.valueOf(str2))));
File fileStreamPath = C0118e1.m386a().f361a.getFileStreamPath(".flurrydatasenderblock.".concat(String.valueOf(str2)));
if (fileStreamPath.exists()) {
boolean delete = fileStreamPath.delete();
C0260s1.m686c(5, str3, "Found file for " + str2 + ". Deleted - " + delete);
}
}
}
m418d(str, i, ".YFlurrySenderIndex.info.");
m424k(str);
}
/* renamed from: k */
private static void m424k(String str) {
C0328z2.m889d();
String str2 = f423d;
C0260s1.m686c(5, str2, "Deleting Index File for " + str + " file name:" + C0118e1.m386a().f361a.getFileStreamPath(".FlurrySenderIndex.info.".concat(String.valueOf(str))));
File fileStreamPath = C0118e1.m386a().f361a.getFileStreamPath(".FlurrySenderIndex.info.".concat(String.valueOf(str)));
if (fileStreamPath.exists()) {
boolean delete = fileStreamPath.delete();
C0260s1.m686c(5, str2, "Found file for " + str + ". Deleted - " + delete);
}
}
/* renamed from: l */
private static String m425l(String str) {
return ".YFlurrySenderIndex.info.".concat(String.valueOf(str));
}
/* renamed from: m */
private synchronized List<String> m426m(String str) {
ArrayList arrayList;
C0328z2.m889d();
String str2 = f423d;
C0260s1.m686c(5, str2, "Reading Index File for " + str + " file name:" + C0118e1.m386a().f361a.getFileStreamPath(m425l(str)));
arrayList = new ArrayList();
for (C0147g2 g2Var : (List) new C0174k1(C0118e1.m386a().f361a.getFileStreamPath(m425l(str)), ".YFlurrySenderIndex.info.", 1, new C0138b(this)).mo252a()) {
arrayList.add(g2Var.f452a);
}
return arrayList;
}
/* renamed from: n */
private static byte[] m427n(String str) {
Throwable th;
byte[] bArr;
C0328z2.m889d();
String str2 = f423d;
C0260s1.m686c(5, str2, "Reading block File for " + str + " file name:" + C0118e1.m386a().f361a.getFileStreamPath(".flurrydatasenderblock.".concat(String.valueOf(str))));
File fileStreamPath = C0118e1.m386a().f361a.getFileStreamPath(".flurrydatasenderblock.".concat(String.valueOf(str)));
DataInputStream dataInputStream = null;
if (fileStreamPath.exists()) {
C0260s1.m686c(5, str2, "Reading Index File for " + str + " Found file.");
try {
DataInputStream dataInputStream2 = new DataInputStream(new FileInputStream(fileStreamPath));
try {
int readUnsignedShort = dataInputStream2.readUnsignedShort();
if (readUnsignedShort == 0) {
C0328z2.m890e(dataInputStream2);
return null;
}
byte[] bArr2 = new byte[readUnsignedShort];
dataInputStream2.readFully(bArr2);
dataInputStream2.readUnsignedShort();
C0328z2.m890e(dataInputStream2);
return bArr2;
} catch (Throwable th2) {
th = th2;
dataInputStream = dataInputStream2;
bArr = null;
try {
C0260s1.m687d(6, f423d, "Error when loading persistent file", th);
return bArr;
} finally {
C0328z2.m890e(dataInputStream);
}
}
} catch (Throwable th3) {
th = th3;
bArr = null;
C0260s1.m687d(6, f423d, "Error when loading persistent file", th);
return bArr;
}
} else {
C0260s1.m686c(4, str2, "Agent cache file doesn't exist.");
return null;
}
}
/* renamed from: o */
private synchronized boolean m428o(String str) {
boolean c;
C0328z2.m889d();
C0174k1 k1Var = new C0174k1(C0118e1.m386a().f361a.getFileStreamPath(m425l(str)), ".YFlurrySenderIndex.info.", 1, new C0141e(this));
List<String> a = mo203a(str);
if (a != null) {
String str2 = f423d;
C0260s1.m686c(4, str2, "discardOutdatedBlocksForDataKey: notSentBlocks = " + a.size());
for (String str3 : a) {
C0119e2.m395b(str3).mo254c();
C0260s1.m686c(4, f423d, "discardOutdatedBlocksForDataKey: removed block = ".concat(String.valueOf(str3)));
}
}
this.f425b.remove(str);
c = k1Var.mo254c();
m417b();
return c;
}
/* renamed from: a */
public final List<String> mo203a(String str) {
return this.f425b.get(str);
}
/* renamed from: c */
public final synchronized void mo204c(C0119e2 e2Var, String str) {
boolean z;
String str2 = f423d;
C0260s1.m686c(4, str2, "addBlockInfo".concat(String.valueOf(str)));
String str3 = e2Var.f367a;
List<String> list = this.f425b.get(str);
if (list == null) {
C0260s1.m686c(4, str2, "New Data Key");
list = new LinkedList<>();
z = true;
} else {
z = false;
}
list.add(str3);
if (list.size() > f422c.intValue()) {
C0119e2.m395b(list.get(0)).mo254c();
list.remove(0);
}
this.f425b.put(str, list);
m418d(str, list, ".YFlurrySenderIndex.info.");
if (z) {
m417b();
}
}
/* renamed from: f */
public final boolean mo205f(String str, String str2) {
boolean z;
List<String> list = this.f425b.get(str2);
if (list != null) {
C0119e2.m395b(str).mo254c();
z = list.remove(str);
} else {
z = false;
}
if (list == null || list.isEmpty()) {
m428o(str2);
} else {
this.f425b.put(str2, list);
m418d(str2, list, ".YFlurrySenderIndex.info.");
}
return z;
}
}
| [
"[email protected]"
] | |
da1d7e3f74347efd8b009c0af63630e86cd0f4f1 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/33/33_9d556bb155b90787a532ff5f8246d892165619a8/RackMetaData/33_9d556bb155b90787a532ff5f8246d892165619a8_RackMetaData_t.java | f5a414833c990b2f6b444d13e59f80f4338e416f | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,813 | java | /*
* Copyright 2008-2013 Red Hat, Inc, and individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.torquebox.web.rack;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import org.jboss.as.server.deployment.AttachmentKey;
import org.jboss.as.server.deployment.DeploymentUnit;
import org.projectodd.polyglot.web.WebApplicationMetaData;
public class RackMetaData extends WebApplicationMetaData {
public static final AttachmentKey<RackMetaData> ATTACHMENT_KEY = AttachmentKey.create(RackMetaData.class);
public RackMetaData() {
}
@Override
public void attachTo(DeploymentUnit unit) {
super.attachTo( unit );
unit.putAttachment( ATTACHMENT_KEY, this );
}
public void setRackUpScript(String rackUpScript) {
this.rackUpScript = rackUpScript;
}
public String getRackUpScript(File root) throws IOException {
return this.rackUpScript;
}
public void setRackUpScriptLocation(String rackUpScriptLocation) {
this.rackUpScriptLocation = rackUpScriptLocation;
}
public String getRackUpScriptLocation() {
return this.rackUpScriptLocation;
}
public File getRackUpScriptFile(File root) {
if (this.rackUpScriptLocation == null) {
return null;
}
if (this.rackUpScriptLocation.startsWith( "/" ) || rackUpScriptLocation.matches( "^[A-Za-z]:.*" )) {
return new File( rackUpScriptLocation );
} else {
return new File( root, rackUpScriptLocation );
}
}
public void setRubyRuntimePoolName(String rubyRuntimePoolName) {
this.rubyRuntimePoolName = rubyRuntimePoolName;
}
public String getRubyRuntimePoolName() {
return this.rubyRuntimePoolName;
}
public void setRackApplicationFactoryName(String rackApplicationFactoryName) {
this.rackApplicationFactoryName = rackApplicationFactoryName;
}
public String getRackApplicationFactoryName() {
return this.rackApplicationFactoryName;
}
public void setRackApplicationPoolName(String rackApplicationPoolName) {
this.rackApplicationPoolName = rackApplicationPoolName;
}
public String getRackApplicationPoolName() {
return this.rackApplicationPoolName;
}
public String toString() {
return "[RackApplicationMetaData:" + System.identityHashCode( this ) + "\n rackupScriptLocation=" + this.rackUpScriptLocation + "\n rackUpScript="
+ this.rackUpScript + "\n host=" + getHosts() + "\n context=" + getContextPath() + "\n static=" + getStaticPathPrefix() + "]";
}
private String rackUpScript;
private String rackUpScriptLocation = "config.ru";
private String rubyRuntimePoolName;
private String rackApplicationFactoryName;
private String rackApplicationPoolName;
}
| [
"[email protected]"
] | |
4af02b188a9de55975f9765c9cb3a41a933681d4 | f7055526843b8de39ce5678f6fcad903406be5f6 | /server/src/main/java/eu/livotov/labs/webskel/core/quartz/guice/InjectorJobFactory.java | 8f56ff825bf382d9ef9783701bc757a3f9429114 | [] | no_license | lbanas/WebApplicationSkeleton | f39271cb4f524cfacb543558b2c8293a7e1ac55e | 3b44373ee50edca2f2fac6f0eccefec4ed4c68ba | refs/heads/master | 2021-01-18T14:36:49.725803 | 2015-11-04T08:16:38 | 2015-11-04T08:16:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,692 | java | /*
* Copyright 2015 Livotov Labs Ltd.
* Copyright 2009-2012 The 99 Software 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 eu.livotov.labs.webskel.core.quartz.guice;
import com.google.inject.Injector;
import org.quartz.Job;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.spi.JobFactory;
import org.quartz.spi.TriggerFiredBundle;
import javax.inject.Inject;
/**
* A {@code JobFactory} implementation that delegates Guice creating {@code Job} instances.
*/
final class InjectorJobFactory implements JobFactory
{
/**
* The delegated {@link Injector}.
*/
@Inject
private Injector injector;
/**
* Set the delegated {@link Injector}.
*
* @param injector The delegated {@link Injector}
*/
public void setInjector(Injector injector)
{
this.injector = injector;
}
/**
* {@inheritDoc}
*/
public Job newJob(TriggerFiredBundle bundle, Scheduler scheduler)
throws SchedulerException
{
Class<? extends Job> jobClass = bundle.getJobDetail().getJobClass();
return this.injector.getInstance(jobClass);
}
}
| [
"[email protected]"
] | |
4d7a80afb58a006ecdc778af976c6479203a3751 | faef44ab5a4bfceb292fcf8180c19ef94e84c3ec | /src/main/java/reservation_front/service/impl/TableServiceProxy.java | 505c4f5c42e2dce86d86bdc7ace5ea3c119c2acf | [] | no_license | youyou19/restaurant-reservation-front | 1f3501b650218fd17dcf94796502aff192f8d1d4 | 8a3629cd1fcd60464a09c1a2147fadb5ed9b8ed3 | refs/heads/master | 2022-11-04T14:44:10.725570 | 2020-06-24T07:15:30 | 2020-06-24T07:15:30 | 274,586,260 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,604 | java | package reservation_front.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import reservation_front.domain.DiningTable;
import reservation_front.dto.DiningTableDto;
import reservation_front.service.TableService;
import java.util.List;
@Service
public class TableServiceProxy implements TableService {
@Autowired
private RestTemplate restTemplate;
private final String ONE_URL = "http://localhost:8088/dining-tables/{id}";
private final String ALL_URL = "http://localhost:8088/dining-tables/";
@Override
public DiningTable get(Long id) {
return restTemplate.getForObject(ONE_URL, DiningTable.class, id);
}
@Override
public List<DiningTable> getAll() {
ResponseEntity<List<DiningTable>> response =
restTemplate.exchange(ALL_URL, HttpMethod.GET, null,
new ParameterizedTypeReference<List<DiningTable>>() {
});
return response.getBody();
}
@Override
public DiningTable add(DiningTableDto p) {
return restTemplate.postForObject(ALL_URL, p, DiningTable.class);
}
@Override
public void update(Long id, DiningTable p) {
restTemplate.put(ONE_URL, p, id);
}
@Override
public void delete(Long id) {
restTemplate.delete(ONE_URL, id);
}
}
| [
"[email protected]"
] | |
14e9852466190091c02c92f532831cb1d0177cdc | aed324c76a46911f0bc9241390451990fa6c12c6 | /src/cursojava/executavel/TestandoClassesFilhas.java | b20f4c69da7680f7ee4ded40832cd982e7db7687 | [] | no_license | Marcelo-F/primeiro-programa-java | 728fabd764b97f2d6b58d87d16e0102e93cbef31 | 277b9eed9cfdf8749025d1541c38f69c87a2e038 | refs/heads/master | 2021-01-15T02:40:01.359449 | 2020-03-20T15:08:26 | 2020-03-20T15:08:26 | 242,851,127 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 1,045 | java | package cursojava.executavel;
import cursojava.classes.Aluno;
import cursojava.classes.Diretor;
import cursojava.classes.Pessoa;
import cursojava.classes.Secretario;
public class TestandoClassesFilhas {
public static void main(String[] args) {
Aluno aluno = new Aluno ();
aluno.setNome("Alex");
Diretor diretor = new Diretor();
diretor.setRegistroEducacao("331232131");
Secretario secretario = new Secretario();
secretario.setExperiencia("Administração");
System.out.println(aluno);
System.out.println(diretor);
System.out.println(secretario);
System.out.println("Salário do aluno é" + aluno.salario());
System.out.println("Salário do diretor é" + diretor.salario());
System.out.println("Salário salario do secretário é" + secretario.salario());
teste(aluno);
teste(diretor);
teste(secretario);
}
public static void teste(Pessoa pessoa) {
System.out.println("Essa pessoa é demais= "+pessoa.getNome()+
" e o salario de" +pessoa.salario());
}
}
| [
"[email protected]"
] | |
13172a183dad97adf2ad5998777ea04ae0a056ca | 5e362b9070d4d08234de1d06288ff6692fb6836b | /android/app/src/main/java/com/quantie_18053/MainActivity.java | 57b39b5882778d80bdafebae25fe8189216f06de | [] | no_license | crowdbotics-apps/quantie-18053 | 0a380b0f5cb9d1c4a5200e552a700f7fa3809d01 | b9fe9938b16a3a479303c7768b3a4e162d67e5a8 | refs/heads/master | 2022-10-11T03:19:42.577082 | 2020-06-12T21:37:45 | 2020-06-12T21:37:45 | 271,879,635 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 371 | java | package com.quantie_18053;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "quantie_18053";
}
}
| [
"[email protected]"
] | |
2d557386ebb2132401429e87c685e71e693d9406 | e2bd16f6feb9d64b7e04fca41ae86485b46afa43 | /app/src/main/java/com/example/servicesample/MainActivity.java | 354b15ff5e14b6b42870a8e074bb4cbc3e33f510 | [] | no_license | KoshiDra/android_ServiceSample2 | 69095a9456a89b3c1f3f80539da7d02889ed49b7 | 0df3f680f6ca41e1c111969492340962a04802f0 | refs/heads/main | 2023-06-03T18:07:30.980841 | 2021-06-27T09:53:35 | 2021-06-27T09:53:35 | 380,159,688 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,988 | java | package com.example.servicesample;
import androidx.appcompat.app.AppCompatActivity;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// 通知タップから引継ぎデータを取得
Intent intent = getIntent();
boolean fromNotification = intent.getBooleanExtra("fromNotification", false);
if (fromNotification) {
Button btPlay = findViewById(R.id.btPlay);
Button btStop = findViewById(R.id.btStop);
btPlay.setEnabled(false);
btStop.setEnabled(true);
}
}
/**
* 再生ボタン押下時の処理
* @param view
*/
public void onPlayButtonClick(View view) {
// インテント作成
Intent intent = new Intent(MainActivity.this, SoundManageService.class);
// サービス開始
startService(intent);
// 開始と終了ボタンの押下制御
Button btPlay = findViewById(R.id.btPlay);
Button btStop = findViewById(R.id.btStop);
btPlay.setEnabled(false);
btStop.setEnabled(true);
}
/**
* 停止ボタン押下時の処理
* @param view
*/
public void onStopButtonClick(View view) {
// インテント作成
Intent intent = new Intent(MainActivity.this, SoundManageService.class);
// サービス停止
stopService(intent);
// 開始と終了ボタンの押下制御
Button btPlay = findViewById(R.id.btPlay);
Button btStop = findViewById(R.id.btStop);
btPlay.setEnabled(true);
btStop.setEnabled(false);
}
} | [
"[email protected]"
] | |
682c01f605afa372df371767204a9929f7069db3 | 6a5e1c7fd25e38251c19b74ab719f659d767c416 | /plugins/jobentries/delay/src/test/java/org/apache/hop/job/entries/delay/JobEntryDelayTest.java | b1812e8dc3709b63157bd7c5504da18ca7cdc372 | [
"Apache-2.0"
] | permissive | marciojv/hopOLD | d734576991460ee9275602a505a4d806c166b1a3 | 461d0608069fd5c66ac3113ca03f94417353a0c4 | refs/heads/master | 2022-04-13T23:14:29.027246 | 2020-04-08T17:19:13 | 2020-04-08T17:19:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,558 | java | /*! ******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/
package org.apache.hop.job.entries.delay;
import org.apache.hop.core.util.Utils;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class JobEntryDelayTest {
@Test
public void testGetRealMaximumTimeout() {
JobEntryDelay entry = new JobEntryDelay();
assertTrue( Utils.isEmpty( entry.getRealMaximumTimeout() ) );
entry.setMaximumTimeout( " 1" );
assertEquals( "1", entry.getRealMaximumTimeout() );
entry.setVariable( "testValue", " 20" );
entry.setMaximumTimeout( "${testValue}" );
assertEquals( "20", entry.getRealMaximumTimeout() );
}
}
| [
"[email protected]"
] | |
14066f8752cfa152312992de810cf8fdb2e69ca3 | cdc930c5f2ed633b872657705e1b161fbff4c313 | /springboot2-utils/src/main/java/com/letters7/wuchen/springboot2/utils/security/Cryptos.java | e4dbb4214e457197560e1a6fdf217c02c246f32e | [] | no_license | wuchenl/springboot2-scaffold | 56b6a485f7c389c778688b8f327609d61174d8e6 | cf6ef1c7a22405c03bd654e95ccda7562cb8e8f2 | refs/heads/master | 2020-04-27T10:34:21.844066 | 2019-01-16T05:43:08 | 2019-01-16T05:43:08 | 174,260,120 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,382 | java | package com.letters7.wuchen.springboot2.utils.security;
import com.letters7.wuchen.springboot2.utils.encode.UtilEncode;
import com.letters7.wuchen.springboot2.utils.exception.UtilException;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import java.util.Arrays;
/**
* 支持HMAC-SHA1消息签名 及 DES/AES对称加密的工具类.
* 支持Hex与Base64两种编码方式.
*
* @author calvin
*/
public class Cryptos {
private static final String AES = "AES";
private static final String AES_CBC = "AES/CBC/PKCS5Padding";
private static final String HMACSHA1 = "HmacSHA1";
private static final String DEFAULT_URL_ENCODING = "UTF-8";
private static final int DEFAULT_HMACSHA1_KEYSIZE = 160; //RFC2401
private static final int DEFAULT_AES_KEYSIZE = 128;
private static final int DEFAULT_IVSIZE = 16;
private static final byte[] DEFAULT_KEY = new byte[]{-97,88,-94,9,70,-76,126,25,0,3,-20,113,108,28,69,125};
private static SecureRandom random = new SecureRandom();
//-- HMAC-SHA1 funciton --//
/**
* 使用HMAC-SHA1进行消息签名, 返回字节数组,长度为20字节.
*
* @param input 原始输入字符数组
* @param key HMAC-SHA1密钥
*/
public static byte[] hmacSha1(byte[] input, byte[] key) {
try {
SecretKey secretKey = new SecretKeySpec(key, HMACSHA1);
Mac mac = Mac.getInstance(HMACSHA1);
mac.init(secretKey);
return mac.doFinal(input);
} catch (GeneralSecurityException e) {
throw UtilException.unchecked(e);
}
}
/**
* 校验HMAC-SHA1签名是否正确.
*
* @param expected 已存在的签名
* @param input 原始输入字符串
* @param key 密钥
*/
public static boolean isMacValid(byte[] expected, byte[] input, byte[] key) {
byte[] actual = hmacSha1(input, key);
return Arrays.equals(expected, actual);
}
/**
* 生成HMAC-SHA1密钥,返回字节数组,长度为160位(20字节).
* HMAC-SHA1算法对密钥无特殊要求, RFC2401建议最少长度为160位(20字节).
*/
public static byte[] generateHmacSha1Key() {
try {
KeyGenerator keyGenerator = KeyGenerator.getInstance(HMACSHA1);
keyGenerator.init(DEFAULT_HMACSHA1_KEYSIZE);
SecretKey secretKey = keyGenerator.generateKey();
return secretKey.getEncoded();
} catch (GeneralSecurityException e) {
throw UtilException.unchecked(e);
}
}
//-- AES funciton --//
/**
* 使用AES加密原始字符串.
*
* @param input 原始输入字符数组
*/
public static String aesEncrypt(String input) {
try {
return UtilEncode.encodeHex(aesEncrypt(input.getBytes(DEFAULT_URL_ENCODING), DEFAULT_KEY));
} catch (UnsupportedEncodingException e) {
return "";
}
}
/**
* 使用AES加密原始字符串.
*
* @param input 原始输入字符数组
* @param key 符合AES要求的密钥
*/
public static String aesEncrypt(String input, String key) {
try {
return UtilEncode.encodeHex(aesEncrypt(input.getBytes(DEFAULT_URL_ENCODING), UtilEncode.decodeHex(key)));
} catch (UnsupportedEncodingException e) {
return "";
}
}
/**
* 使用AES加密原始字符串.
*
* @param input 原始输入字符数组
* @param key 符合AES要求的密钥
*/
public static byte[] aesEncrypt(byte[] input, byte[] key) {
return aes(input, key, Cipher.ENCRYPT_MODE);
}
/**
* 使用AES加密原始字符串.
*
* @param input 原始输入字符数组
* @param key 符合AES要求的密钥
* @param iv 初始向量
*/
public static byte[] aesEncrypt(byte[] input, byte[] key, byte[] iv) {
return aes(input, key, iv, Cipher.ENCRYPT_MODE);
}
/**
* 使用AES解密字符串, 返回原始字符串.
*
* @param input Hex编码的加密字符串
*/
public static String aesDecrypt(String input) {
try {
return new String(aesDecrypt(UtilEncode.decodeHex(input), DEFAULT_KEY), DEFAULT_URL_ENCODING);
} catch (UnsupportedEncodingException e) {
return "";
}
}
/**
* 使用AES解密字符串, 返回原始字符串.
*
* @param input Hex编码的加密字符串
* @param key 符合AES要求的密钥
*/
public static String aesDecrypt(String input, String key) {
try {
return new String(aesDecrypt(UtilEncode.decodeHex(input), UtilEncode.decodeHex(key)), DEFAULT_URL_ENCODING);
} catch (UnsupportedEncodingException e) {
return "";
}
}
/**
* 使用AES解密字符串, 返回原始字符串.
*
* @param input Hex编码的加密字符串
* @param key 符合AES要求的密钥
*/
public static byte[] aesDecrypt(byte[] input, byte[] key) {
return aes(input, key, Cipher.DECRYPT_MODE);
}
/**
* 使用AES解密字符串, 返回原始字符串.
*
* @param input Hex编码的加密字符串
* @param key 符合AES要求的密钥
* @param iv 初始向量
*/
public static byte[] aesDecrypt(byte[] input, byte[] key, byte[] iv) {
return aes(input, key, iv, Cipher.DECRYPT_MODE);
}
/**
* 使用AES加密或解密无编码的原始字节数组, 返回无编码的字节数组结果.
*
* @param input 原始字节数组
* @param key 符合AES要求的密钥
* @param mode Cipher.ENCRYPT_MODE 或 Cipher.DECRYPT_MODE
*/
private static byte[] aes(byte[] input, byte[] key, int mode) {
try {
SecretKey secretKey = new SecretKeySpec(key, AES);
Cipher cipher = Cipher.getInstance(AES);
cipher.init(mode, secretKey);
return cipher.doFinal(input);
} catch (GeneralSecurityException e) {
throw UtilException.unchecked(e);
}
}
/**
* 使用AES加密或解密无编码的原始字节数组, 返回无编码的字节数组结果.
*
* @param input 原始字节数组
* @param key 符合AES要求的密钥
* @param iv 初始向量
* @param mode Cipher.ENCRYPT_MODE 或 Cipher.DECRYPT_MODE
*/
private static byte[] aes(byte[] input, byte[] key, byte[] iv, int mode) {
try {
SecretKey secretKey = new SecretKeySpec(key, AES);
IvParameterSpec ivSpec = new IvParameterSpec(iv);
Cipher cipher = Cipher.getInstance(AES_CBC);
cipher.init(mode, secretKey, ivSpec);
return cipher.doFinal(input);
} catch (GeneralSecurityException e) {
throw UtilException.unchecked(e);
}
}
/**
* 生成AES密钥,返回字节数组, 默认长度为128位(16字节).
*/
public static String generateAesKeyString() {
return UtilEncode.encodeHex(generateAesKey(DEFAULT_AES_KEYSIZE));
}
/**
* 生成AES密钥,返回字节数组, 默认长度为128位(16字节).
*/
public static byte[] generateAesKey() {
return generateAesKey(DEFAULT_AES_KEYSIZE);
}
/**
* 生成AES密钥,可选长度为128,192,256位.
*/
public static byte[] generateAesKey(int keysize) {
try {
KeyGenerator keyGenerator = KeyGenerator.getInstance(AES);
keyGenerator.init(keysize);
SecretKey secretKey = keyGenerator.generateKey();
return secretKey.getEncoded();
} catch (GeneralSecurityException e) {
throw UtilException.unchecked(e);
}
}
/**
* 生成随机向量,默认大小为cipher.getBlockSize(), 16字节.
*/
public static byte[] generateIV() {
byte[] bytes = new byte[DEFAULT_IVSIZE];
random.nextBytes(bytes);
return bytes;
}
} | [
"[email protected]"
] | |
935ca72ab41701cbf954d8a1a6800ec4cc392bfb | a257713804c4fa85eef46e47cbc5a0e6cdade150 | /app/src/main/java/com/teambition/talk/entity/Quote.java | cc6fb8dc8ff7a96562dc807c664e17388eb4b47d | [
"MIT"
] | permissive | megadotnet/talk-android | 50aa919b3041840953672fbe588caa59252cd06c | 828ba5c2e72284d7790705bc156cc20d84a605bc | refs/heads/master | 2020-03-09T04:13:54.084431 | 2018-04-08T01:50:57 | 2018-04-08T01:50:57 | 128,582,337 | 0 | 0 | MIT | 2018-04-08T01:05:49 | 2018-04-08T01:05:49 | null | UTF-8 | Java | false | false | 1,963 | java | package com.teambition.talk.entity;
import com.teambition.talk.util.StringUtil;
import org.parceler.Parcel;
/**
* Created by zeatual on 14/11/5.
*/
@Parcel(Parcel.Serialization.BEAN)
public class Quote {
String openId;
String text;
String authorName;
String authorAvatarUrl;
String redirectUrl;
String title;
String category;
String thumbnailPicUrl;
String imageUrl;
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getAuthorName() {
return authorName;
}
public void setAuthorName(String authorName) {
this.authorName = authorName;
}
public String getAuthorAvatarUrl() {
return authorAvatarUrl;
}
public void setAuthorAvatarUrl(String authorAvatarUrl) {
this.authorAvatarUrl = authorAvatarUrl;
}
public String getRedirectUrl() {
return redirectUrl;
}
public void setRedirectUrl(String redirectUrl) {
this.redirectUrl = redirectUrl;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getThumbnailPicUrl() {
return thumbnailPicUrl;
}
public void setThumbnailPicUrl(String thumbnailPicUrl) {
this.thumbnailPicUrl = thumbnailPicUrl;
}
public String getThumbnailUrl() {
if (StringUtil.isNotBlank(getThumbnailPicUrl())) {
return getThumbnailPicUrl();
} else if (StringUtil.isNotBlank(imageUrl)) {
return imageUrl;
}
return null;
}
}
| [
"[email protected]"
] | |
d9fea2237dff7773d386c1f01e88320dcc4f529a | 0d95242f5de24e865ebaf2652bc155e8666ce307 | /app/src/androidTest/java/com/quanlt/vietcomicmvp/ExampleInstrumentedTest.java | 5d105996b203299e6a4abf226f84605d2f9f7720 | [
"Apache-2.0"
] | permissive | quanlt/VietComicMVP | e10e91d5e158df8359d51f29930d9b381cd8f5f0 | 9428468c17196bb58cdf10f93c0ac47c4bca8ec3 | refs/heads/master | 2021-06-07T19:22:06.924950 | 2016-11-23T12:55:50 | 2016-11-23T12:55:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 776 | java | package com.quanlt.vietcomicmvp;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.quanlt.vietcomicmvp", appContext.getPackageName());
}
}
| [
"[email protected]"
] | |
2c1cb563055796d2b6be44261eb4759f2779bdc9 | 25b3ebc0cf24a3e28e05c5e76faba9dcc5bd8f88 | /src/org/joshy/gfx/node/control/Textbox.java | f4e92e20340c0cf2a987b02b2bed81eb3f9733fd | [] | no_license | joshmarinacci/aminojava | 24a1683a3994e3985299795ea19a99d3d093700e | 6dcddf6100518a7a7c1cb2027d3bbbd496bd5891 | refs/heads/master | 2016-09-06T17:55:34.673930 | 2013-05-20T23:46:38 | 2013-05-20T23:46:38 | 7,651,569 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,530 | java | package org.joshy.gfx.node.control;
import java.text.AttributedString;
import org.joshy.gfx.Core;
import org.joshy.gfx.css.BoxPainter;
import org.joshy.gfx.css.CSSMatcher;
import org.joshy.gfx.css.CSSSkin;
import org.joshy.gfx.css.SizeInfo;
import org.joshy.gfx.draw.FlatColor;
import org.joshy.gfx.draw.Font;
import org.joshy.gfx.draw.GFX;
import org.joshy.gfx.event.ActionEvent;
import org.joshy.gfx.event.Callback;
import org.joshy.gfx.event.EventBus;
import org.joshy.gfx.event.KeyEvent;
import org.joshy.gfx.node.Bounds;
import org.joshy.gfx.node.Insets;
import org.joshy.gfx.stage.Stage;
/**
* The Textbox is a text control for editing a single line of text.
* It will scroll the contents horizontally as needed.
*/
public class Textbox extends TextControl {
private SizeInfo sizeInfo;
private BoxPainter boxPainter;
private CharSequence hintText = "";
private FlatColor selectionColor;
private FlatColor cursorColor;
private AttributedString comp;
private FlatColor textColor;
public static void main(String ... args) throws Exception {
Core.init();
Core.getShared().defer(new Runnable(){
@Override
public void run() {
Stage stage = Stage.createStage();
Textbox tb = new Textbox();
stage.setContent(tb);
Core.getShared().getFocusManager().setFocusedNode(tb);
}
});
}
double xoff = 0;
public Textbox() {
setWidth(100);
setHeight(40);
}
public Textbox(String text) {
this();
setText(text);
}
public Textbox setHintText(CharSequence text) {
this.hintText = text;
return this;
}
@Override
protected double filterMouseX(double x) {
return x - xoff - 0 - styleInfo.calcContentInsets().getLeft();
}
@Override
protected double filterMouseY(double y) {
return y - styleInfo.calcContentInsets().getTop();
}
/* =========== Layout stuff ================= */
@Override
public void doPrefLayout() {
sizeInfo = cssSkin.getSizeInfo(this,styleInfo,text);
if(prefWidth != CALCULATED) {
setWidth(prefWidth);
sizeInfo.width = prefWidth;
} else {
setWidth(sizeInfo.width);
}
if(prefHeight != CALCULATED) {
setHeight(prefHeight);
sizeInfo.height = prefHeight;
} else {
setHeight(sizeInfo.height);
}
layoutText(sizeInfo.contentWidth,sizeInfo.contentHeight);
}
@Override
public void doLayout() {
layoutText(sizeInfo.contentWidth,sizeInfo.contentHeight);
sizeInfo.width = getWidth();
if(sizeInfo != null) {
sizeInfo.width = getWidth();
sizeInfo.height = getHeight();
}
CSSSkin.State state = CSSSkin.State.None;
if(isFocused()) {
state = CSSSkin.State.Focused;
}
boxPainter = cssSkin.createBoxPainter(this, styleInfo, sizeInfo, text, state);
CSSMatcher matcher = CSSSkin.createMatcher(this, state);
selectionColor = new FlatColor(cssSkin.getCSSSet().findColorValue(matcher,"selection-color"));
cursorColor = new FlatColor(cssSkin.getCSSSet().findColorValue(matcher,"cursor-color"));
textColor = new FlatColor(cssSkin.getCSSSet().findColorValue(matcher,"color"));
}
@Override
protected void cursorMoved() {
double cx = getCursor().calculateX();
Insets insets = styleInfo.calcContentInsets();
double fudge = getFont().getAscender();
double w = getWidth() - insets.getLeft() - insets.getRight();
//don't let jump get beyond 1/3rd of the width of the text box
double jump = Math.min(getFont().getAscender()*2,w/3);
if(cx >= w - fudge -xoff) {
xoff -= jump;
}
if(cx + xoff < fudge) {
xoff += jump;
if(xoff > 0) xoff = 0;
}
}
@Override
public double getBaseline() {
return styleInfo.calcContentInsets().getTop()+ styleInfo.contentBaseline;
}
@Override
public Bounds getLayoutBounds() {
return new Bounds(getTranslateX(), getTranslateY(), getWidth(), getHeight());
}
/* =============== Drawing stuff ================ */
@Override
public void draw(GFX g) {
if(!isVisible()) return;
//draw background and border, but skip the text
drawBackground(g);
Insets insets = styleInfo.calcContentInsets();
//set a new clip
Bounds oldClip = g.getClipRect();
g.setClipRect(new Bounds(
styleInfo.margin.getLeft()+styleInfo.borderWidth.getLeft(),
0,
getWidth() - insets.getLeft() - insets.getRight(),
getHeight()));
//filter the text
String text = getText();
text = text + getComposingText();
text = filterText(text);
//draw the selection
if(selection.isActive() && text.length() > 0) {
double start = getCursor().calculateX(0,selection.getStart());
double end = getCursor().calculateX(0,selection.getEnd());
if(end < start) {
double t = start;
start = end;
end = t;
}
g.setPaint(selectionColor);
g.fillRect(
insets.getLeft() + start + xoff,
insets.getTop(),
end-start,
getHeight()-insets.getTop()-insets.getBottom());
}
//draw the text
Font font = getFont();
double y = font.getAscender();
y+=insets.getTop();
double x = insets.getLeft();
if(!focused && text.length() == 0) {
g.setPaint(new FlatColor(0x6080a0));
g.drawText(hintText.toString(), getFont(), x + xoff, y);
}
g.setPaint(textColor);
g.drawText(text, getFont(), x + xoff, y);
//draw the composing underline
if(getComposingText().length() > 0) {
double underlineLen = font.calculateWidth(getComposingText());
g.setPaint(FlatColor.RED);
double fullLen = font.calculateWidth(text);
g.drawLine(x+xoff+fullLen-underlineLen,y+2,x+xoff+fullLen,y+2);
}
//draw the cursor
if(isFocused()) {
g.setPaint(cursorColor);
CursorPosition cursor = getCursor();
double cx = cursor.calculateX() + xoff;
// draw cursor
g.fillRect(
insets.getLeft()+cx, insets.getTop(),
1,
getHeight()-insets.getTop()-insets.getBottom());
}
//restore the old clip
g.setClipRect(oldClip);
}
protected void drawBackground(GFX g) {
boxPainter.draw(g, styleInfo, sizeInfo, "");
}
protected String filterText(String text) {
return text;
}
@Override
protected void processKeyEvent(KeyEvent event) {
if(event.getKeyCode() == KeyEvent.KeyCode.KEY_ENTER) {
ActionEvent act = new ActionEvent(ActionEvent.Action,this);
EventBus.getSystem().publish(act);
} else {
super.processKeyEvent(event);
}
}
public Textbox onAction(Callback<ActionEvent> callback) {
EventBus.getSystem().addListener(this,ActionEvent.Action,callback);
return this;
}
}
| [
"[email protected]"
] | |
9c752199a23db6411279af1472f18baffbaab6a1 | 3998ab9a87c7094915fe39afa418c08baa9eb920 | /src/main/java/com/softsign/graphql/DataFetchers.java | 5ff7445efdcea2531206fa330ac73a21569311be | [] | no_license | MatiasMinian/GraphQL-Test | be169a365d66dcffe62c0f9d74051fce589e8ba9 | 2ceef91df527e865b739336f7ac7af09bf122e16 | refs/heads/master | 2021-06-12T22:19:59.056712 | 2016-12-28T22:32:22 | 2016-12-28T22:32:22 | 76,380,218 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 395 | java | package com.softsign.graphql;
import com.softsign.model.User;
import graphql.schema.DataFetcher;
public class DataFetchers {
public static DataFetcher userDataFetcher = (environment -> AppDataset.users.get( (Integer)environment.getArguments().get("id") - 1));
public static DataFetcher userTransportsDataFetcher = (environment -> ((User)environment.getSource()).getTransports());
}
| [
"[email protected]"
] | |
9ec328d6c229d2538f28978380908afbbc0e9034 | 65eef6677a132162d8e6ba055c0d1b79982be5a3 | /src/DPLL.java | 4c4d8b2199e0cfa57086bba1c7ec3ab3d086bb64 | [] | no_license | ejmejm/Inferencer | 62cb797773b4321dce5f5f7883a5e86c45e8d873 | e3e42ffbf6e344e5a0450b3191e285aed39ce948 | refs/heads/master | 2020-05-18T14:31:16.880388 | 2017-03-08T02:15:27 | 2017-03-08T02:15:27 | 84,247,044 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,590 | java | import java.util.ArrayList;
import java.util.LinkedList;
public class DPLL {
public static boolean entails(Model model, Statement statement){
State state = new State(model);
ArrayList<State> leafNodes = state.getLeafNodes(state);
boolean entails = true;
for(State node : leafNodes){
if(!node.entails(statement))
entails = false;
}
return entails;
}
public static void printEntails(Model model, Statement statement){
boolean result = entails(model, statement);
if(result)
System.out.println("DPLL: Statement, \"" + statement.getLabel() + "\" is entailed");
else
System.out.println("DPLL: Statement, \"" + statement.getLabel() + "\" is NOT entailed");
}
public static void printTree(Model model){
State state = new State(model);
LinkedList<State> q = new LinkedList<State>();
q.addLast(state);
int cnt = 0;
while(!q.isEmpty()){
State tmp = q.pop();
if(tmp.statement != null)
System.out.println("(" + cnt + ") " + tmp.statement.getLabel() + ": " + tmp.statement.getValue());
if(tmp.children != null && !tmp.children.isEmpty())
for(int i = 0; i < tmp.children.size(); i++)
q.addFirst(tmp.children.get(i));
cnt++;
}
}
private static class State{
Statement statement;
ArrayList<Statement> knownStms;
ArrayList<State> children;
Model model;
public State(Model model){
this.model = model;
knownStms = new ArrayList<Statement>();
statement = null;
children = genAncestors(model);
}
public State(Model model, ArrayList<Statement> knownStms, Statement statement){
this.model = model;
this.knownStms = knownStms;
this.statement = statement;
children = genAncestors(model);
}
public ArrayList<State> genAncestors(Model model){
if(knownStms.size() == model.variables.size())//Maybe do something here
return null;
ArrayList<State> ancestors = new ArrayList<State>();
Statement ancestorStmt = model.getStatementByIndex(knownStms.size());
if(ancestorStmt.isKnown())
ancestors.add(copyHist(ancestorStmt));
else{
ancestors.add(copyHist(ancestorStmt));
ancestors.add(copyHist(ancestorStmt.getSwitchedValue()));
}
if(ancestors.size() == 0)
return null;
return ancestors;
}
private State copyHist(Statement nStatement){
ArrayList<Statement> nKnownStms = new ArrayList<Statement>();
for(Statement s : knownStms)
nKnownStms.add(s);
nKnownStms.add(statement);
return new State(model, nKnownStms, nStatement);
}
public ArrayList<State> getLeafNodes(State state){
ArrayList<State> leafNodes = new ArrayList<State>();
LinkedList<State> q = new LinkedList<State>();
q.addLast(state);
while(!q.isEmpty()){
State tmp = q.pop();
if(tmp.children != null && !tmp.children.isEmpty())
for(int i = 0; i < tmp.children.size(); i++)
q.addLast(tmp.children.get(i));
else{
tmp.knownStms.add(tmp.statement);
leafNodes.add(tmp);
}
}
return leafNodes;
}
private boolean constraintsMet(){
for(Relation r : model.relations) //Make sure constraints are met
if(r.isKnown() && calcValue(r, knownStms) != r.value)
return false; //Return false if one of them is not met
return true; //Otherwise they are all met
}
public boolean entails(Statement statement){
if(constraintsMet() && calcValue(statement, knownStms) != true) //Make sure statement is entailed
return false;
return true;
}
}
private static boolean calcValue(Statement s, ArrayList<Statement> knownStms){
//If the statement is a variable
if(s instanceof Variable){
for(Statement stm : knownStms)
if(stm != null && stm.equals(s))
return stm.value;
System.err.println("ERROR: The variable \"" + s.getLabel() + "\" was not found in the tree but it was in a relationship");
}
//If the statement is a relationship
Relation r = (Relation) s;
/*
boolean p1 = false, p2 = false;
boolean p1k = false, p2k = false;
for(Statement stm : knownStms){
if(stm.equals(r.getS1())){
p1 = stm.value;
p1k = true;
}
if(!r.isAtomic() && stm.equals(r.getS2())){
p2 = stm.value;
p2k = true;
}
}
//If the parts of r1 are not variables then recursively calculate the value of
if(p1k == false)
p1 = calcValue(r.getS1(), knownStms);
if(!r.isAtomic() && p2k == false)
p2 = calcValue(r.getS2(), knownStms);
*/
if(r.isAtomic())
return r.calcValue(calcValue(r.getS1(), knownStms));
return r.calcValue(calcValue(r.getS1(), knownStms), calcValue(r.getS2(), knownStms));
}
}
| [
"[email protected]"
] | |
f56c7eb2081d945611d637cda7b2046c97fd0854 | 989c4e50ab672c4971cdb9052be945a2ebac9984 | /ArraySort.java | d35af9b3890aaec7ff47745f976e1717f9da9ee9 | [] | no_license | NobSirawit/Sorting-Array-JAVA | 6210c2aa3fec48f42aea9e0984bbe6bc837abc22 | 5000f1fc7fa65d7310819e51eb3dd491543b035e | refs/heads/master | 2020-07-10T17:41:58.546132 | 2019-08-25T17:11:58 | 2019-08-25T17:11:58 | 204,325,321 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 306 | java | import java.util.Arrays;
public class ArraySort {
public static void main (String [] args) {
int [] array = {45,12,85,32,89,39,69,44,42,1,6,8};
Arrays.sort(array);
for (int i = 0; i < array.length; i++) {
System.out.println(array[i]);
};
}
}
| [
"[email protected]"
] | |
dce3fb6aa3d1de1c1862c99c6f3c16414c72505d | 6cc096998061db8cb1f13e82ccc899aa04e686ff | /src/main/java/com/vectorsearch/faiss/swig/intArray.java | c6e7be649bd61392db8064ceac5f8a103120636b | [
"MIT"
] | permissive | xuqiong1989/JFaiss-CPU | a02aacca1d6f6999fc59dd9dee3e1d63f0dcc46d | 3f12ff474938954aa34e7d831af821eb14db0e5c | refs/heads/master | 2022-12-25T20:44:50.503752 | 2020-09-15T05:57:52 | 2020-09-15T05:57:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,652 | java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.vectorsearch.faiss.swig;
public class intArray {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected intArray(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(intArray obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_intArray(swigCPtr);
}
swigCPtr = 0;
}
}
public intArray(int nelements) {
this(swigfaissJNI.new_intArray(nelements), true);
}
public int getitem(int index) {
return swigfaissJNI.intArray_getitem(swigCPtr, this, index);
}
public void setitem(int index, int value) {
swigfaissJNI.intArray_setitem(swigCPtr, this, index, value);
}
public SWIGTYPE_p_int cast() {
long cPtr = swigfaissJNI.intArray_cast(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
}
public static intArray frompointer(SWIGTYPE_p_int t) {
long cPtr = swigfaissJNI.intArray_frompointer(SWIGTYPE_p_int.getCPtr(t));
return (cPtr == 0) ? null : new intArray(cPtr, false);
}
}
| [
"[email protected]"
] | |
d0798e0d4a39d4e6cad40bdcd5e110f66c120c17 | a69254f9f84bba6facc3ffa940ba2e540627d77b | /core/src/main/java/org/jdal/text/PeriodFormatAnnotationFactory.java | 40db674d04b65b778042e4a315207c62dc959910 | [
"Apache-2.0"
] | permissive | chelu/jdal | 3250423e5eaaf5571d6f85045c759abe12adff1f | 2c20b4a7e506d97487a075cd4fa5809e088670cd | refs/heads/master | 2023-03-07T14:09:26.124132 | 2018-05-22T18:52:30 | 2018-05-22T18:52:30 | 13,729,407 | 21 | 12 | null | 2017-01-25T12:20:48 | 2013-10-21T00:10:59 | Java | UTF-8 | Java | false | false | 1,923 | java | /*
* Copyright 2009-2012 Jose Luis Martin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jdal.text;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import org.springframework.format.AnnotationFormatterFactory;
import org.springframework.format.Formatter;
import org.springframework.format.Parser;
import org.springframework.format.Printer;
/**
* PeriodFormat Annotation Factory.
*
* @author Jose Luis Martin - ([email protected])
*/
public class PeriodFormatAnnotationFactory implements AnnotationFormatterFactory<PeriodFormat> {
/**
* {@inheritDoc}
*/
public Set<Class<?>> getFieldTypes() {
return new HashSet<Class<?>>(Arrays.asList(new Class<?>[] {
Short.class, Integer.class, Long.class, Float.class,
Double.class, BigDecimal.class, BigInteger.class }));
}
/**
* {@inheritDoc}
*/
public Printer<?> getPrinter(PeriodFormat annotation, Class<?> fieldType) {
return getFormatter(annotation, fieldType);
}
/**
* {@inheritDoc}
*/
public Parser<?> getParser(PeriodFormat annotation, Class<?> fieldType) {
return getFormatter(annotation, fieldType);
}
/**
* @param annotation
* @param fieldType
* @return
*/
protected Formatter<?> getFormatter(PeriodFormat annotation, Class<?> fieldType) {
return new PeriodFormatter();
}
}
| [
"[email protected]"
] | |
c2e9a9056256e4c3e227452b4d753ca1b21b5fe1 | c90538cd8e95644776a8dd4c8f29c153d6fb71ce | /Common/src/messages/GetStaticMapMsg.java | ca0ba5a0d80e761e36d2d724da94acbb1f82550f | [] | no_license | grimmle/point-n-shoot | 43d9a37e9b027709bdc8c6463ed5b5fc6dea4077 | 7ae96f850a74465e50c146333db70c7b21336e06 | refs/heads/main | 2023-06-18T19:23:33.427961 | 2021-07-12T16:44:00 | 2021-07-12T16:44:00 | 313,705,115 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 222 | java | package messages;
import common.Msg;
public class GetStaticMapMsg implements Msg {
private static final long serialVersionUID = 8576917706186946304L;
public int id;
public Object staticMap;
public Object dynamic;
}
| [
"[email protected]"
] | |
710d3fdba96c000a19da5c30b7b948d1547a12fa | ddaede1300f7b125f8c2fd2608e850127b69ffe9 | /JavaExercise/src/main/java/thread/synchronizedDemo/TestMethod.java | 88d5052d8f6477234a342b50915e54807f142746 | [] | no_license | lojack636/DEMO | 6ef57ad454161e3677a8ab8dd4cfa9b284172664 | 3d11c1bc26bfb9478bd9455fce250ef1169a7c49 | refs/heads/master | 2023-01-15T21:40:15.999114 | 2020-11-23T14:58:45 | 2020-11-23T14:58:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,189 | java | package thread.synchronizedDemo;
/**
* 测试Synchronized
*
* @author qiang
*
*/
public class TestMethod implements Runnable {
private static int number;
TestMethod() {
number = 0;
}
// 修饰非静态的方法
public static synchronized void m1() {
for (int i = 0; i < 3; i++) {
try {
System.out.println(Thread.currentThread().getName() + ":" + (number++));
Thread.sleep(200);
} catch (Exception e) {
System.out.println("异常");
}
}
}
public static synchronized void m2() {//此时方法属于类
for (int i = 0; i < 3; i++) {
try {
System.out.println(Thread.currentThread().getName() + ":" + (number++));
Thread.sleep(200);
} catch (Exception e) {
System.out.println("异常");
}
}
}
@Override
public void run() {
String name = Thread.currentThread().getName();
if (name.equalsIgnoreCase("thread1")) {
m1();
} else {
m2();
}
}
public static void main(String[] args) {
TestMethod testMethod = new TestMethod();
Thread thread1 = new Thread(testMethod,"thread1");
Thread thread2 = new Thread(testMethod,"thread2");
thread1.start();
thread2.start();
}
} | [
"[email protected]"
] | |
6ba3b6386ecaf96022cfd6fc836d32be7516cda0 | 306578f3c6d15e0d4b4600c60ce8c827638a3d21 | /src/test/java/insat/gl4/cookme/CookMeApplicationTests.java | 6c775b91e685826e5a118f52f2f7ef43bc8036c5 | [] | no_license | mmmarzouki/cook-me_backend | 982252528869e8e53e4526b36e08204359a02775 | 6ef5728cea986d7bcf809e609c036ed0b5dce429 | refs/heads/master | 2020-04-27T00:24:53.078036 | 2019-05-01T11:38:27 | 2019-05-01T11:38:27 | 173,933,204 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 342 | java | package insat.gl4.cookme;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class CookMeApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"[email protected]"
] | |
5c2885a00683ef38aada972cc6b37b2a20d3bf0b | c085b4593fdbc55337a8112bf7157dc7f0f4c8b0 | /app/src/main/java/edu/illinois/cs465/petlocator/LostPetLocationActivity.java | f96a9785c71f59debc3830bbe973dd3ccaecb682 | [] | no_license | jbuildstuff/PetLocator | ce6c359afa2a62fb8f3cb71c8efc9c5aa98e6cff | 6d6de1a6fb2e595f4669764647702a792215c6a3 | refs/heads/master | 2023-03-02T11:49:15.205897 | 2019-12-31T16:55:31 | 2019-12-31T16:55:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,227 | java | package edu.illinois.cs465.petlocator;
import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationManager;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
public class LostPetLocationActivity extends FragmentActivity implements OnMapReadyCallback, GoogleMap.OnMyLocationButtonClickListener,
GoogleMap.OnMyLocationClickListener, GoogleMap.OnMarkerClickListener, GoogleMap.OnMarkerDragListener, View.OnClickListener {
private GoogleMap mMap;
private View view;
private static LatLng fromPosition = null;
private static LatLng toPosition = null;
private static LatLng finalPos = null;
private static LatLng defaultPos = null;
private static Marker lostPetMarker = null;
private static Location currLocation = null;
private Button pickLocation;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_lost_pet_location);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.activity_lost_pet_location, container, false);
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
if (mapFragment != null) {
mapFragment.getMapAsync(this);
}
return view;
}
/**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just add a marker near Sydney, Australia.
* If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app.
*/
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
mMap.setOnMyLocationButtonClickListener(this);
mMap.setOnMyLocationClickListener(this);
mMap.setOnMarkerClickListener(this);
mMap.setOnMarkerDragListener(this);
// Add a marker in uiuc and move the camera
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
mMap.setMyLocationEnabled(true);
LatLng siebel = new LatLng(40.1138069, -88.2270939);
defaultPos = siebel;
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria();
Location location = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));
if (location != null) {
defaultPos = new LatLng(location.getLatitude(), location.getLongitude());
}
currLocation = new Location("");
currLocation.setLatitude(defaultPos.latitude);
currLocation.setLongitude(defaultPos.longitude);
lostPetMarker = mMap.addMarker(new MarkerOptions().position(defaultPos).title("Lost Pet Marker").draggable(true));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(defaultPos, 10));
mMap.animateCamera(CameraUpdateFactory.zoomIn());
// Zoom out to zoom level 10, animating with a duration of 2 seconds.
mMap.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);
pickLocation = (Button) findViewById(R.id.PickLocation);
pickLocation.setOnClickListener(this);
}
@Override
public void onMyLocationClick(@NonNull Location location) {
currLocation = location;
LatLng currLatLng = new LatLng(currLocation.getLatitude(), currLocation.getLongitude());
lostPetMarker.setPosition(currLatLng);
Toast.makeText(this, "Current location:\n" + location, Toast.LENGTH_LONG).show();
}
@Override
public boolean onMyLocationButtonClick() {
if (currLocation == null) {
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria();
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return false;
}
Location location = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));
LatLng currLatLng = new LatLng(location.getLatitude(), location.getLongitude());
lostPetMarker.setPosition(currLatLng);
}
else {
LatLng currLatLng = new LatLng(currLocation.getLatitude(), currLocation.getLongitude());
lostPetMarker.setPosition(currLatLng);
}
// Toast.makeText(this, "Finding your location", Toast.LENGTH_SHORT).show();
// Return false so that we don't consume the event and the default behavior still occurs
// (the camera animates to the user's current position).
return false;
}
@Override
public boolean onMarkerClick(Marker marker) {
Log.i("GoogleMapActivity", "onMarkerClick");
Toast.makeText(getApplicationContext(),
"Marker Clicked: " + marker.getTitle(), Toast.LENGTH_LONG)
.show();
return false;
}
@Override
public void onMarkerDrag(Marker marker) {
// do nothing during drag
}
@Override
public void onMarkerDragEnd(Marker marker) {
toPosition = marker.getPosition();
/*
Toast.makeText(
getApplicationContext(),
"Marker " + marker.getTitle() + " dragged from " + fromPosition
+ " to " + toPosition, Toast.LENGTH_LONG).show();*/
finalPos = toPosition;
}
@Override
public void onMarkerDragStart(Marker marker) {
fromPosition = marker.getPosition();
Log.d(getClass().getSimpleName(), "Drag start at: " + fromPosition);
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.PickLocation) {
Intent intent = new Intent(LostPetLocationActivity.this, pet_details.class);
if(finalPos==null)
{
intent.putExtra("LostPetLatitude", (float)defaultPos.latitude);
intent.putExtra("LostPetLongitude", (float)defaultPos.longitude);
}
else{
intent.putExtra("LostPetLatitude", (float)finalPos.latitude);
intent.putExtra("LostPetLongitude", (float)finalPos.longitude);
}
startActivity(intent);
}
}
}
| [
"[email protected]"
] | |
a492a9b2b49fe2a2f432401d0da10322ead89738 | 84f6d0c1cf9afe7a54c1b0e22708a3310c04453c | /src/main/java/com/fmx/tool/hdfsfilemanager/app/treeviewer/action/Rename.java | 3bd12b182e31c30dcf422e2568b4da1146f2eaa2 | [
"MIT"
] | permissive | FMX/HdfsFileManager | e2987273a609676318a89b017c27c71bc593aaed | 77fa02fd27b3b2214e756f725f8c0d06ac264478 | refs/heads/master | 2020-04-03T01:43:33.746493 | 2018-10-31T05:44:54 | 2018-10-31T05:44:54 | 154,938,111 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 149 | java | package com.fmx.tool.hdfsfilemanager.app.treeviewer.action;
import org.eclipse.jface.action.Action;
/**
*/
public class Rename extends Action {
}
| [
"[email protected]"
] | |
576ee3a5e8aa4b77c14502b267f0e7815c7b7b02 | e7c48e95f167f37edf8c4f5d9062d4d546211c81 | /chbase-jaxb/src/main/java/com/chbase/thing/oxm/jaxb/healthevent/ObjectFactory.java | 08ed1dd16eee9bf8c9641d3fc7d9ff25c89e8e90 | [] | no_license | CHBase/chbase-java-sdk | 1d6b04e1884cfa20541bfe0d3ff0b7e3c1fcacd8 | 61c6143134162d11f897d446595a26a8abdcacd5 | refs/heads/master | 2023-02-19T09:14:26.321622 | 2023-02-09T07:10:58 | 2023-02-09T07:10:58 | 43,138,403 | 0 | 2 | null | 2023-02-09T07:11:00 | 2015-09-25T12:10:54 | Java | UTF-8 | Java | false | false | 1,392 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.05.07 at 02:21:20 PM PDT
//
package com.chbase.thing.oxm.jaxb.healthevent;
import javax.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each Java content interface and Java
* element interface generated in the
* com.microsoft.hsg.thing.oxm.jaxb.healthevent package.
* <p>
* An ObjectFactory allows you to programatically construct new instances of the
* Java representation for XML content. The Java representation of XML content
* can consist of schema derived interfaces and classes representing the binding
* of schema type definitions, element declarations and model groups. Factory
* methods for each of these are provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
/**
* Create a new ObjectFactory that can be used to create new instances of
* schema derived classes for package:
* com.microsoft.hsg.thing.oxm.jaxb.healthevent
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link HealthEvent }
*
*/
public HealthEvent createHealthEvent() {
return new HealthEvent();
}
}
| [
"[email protected]"
] | |
e0b5ffcfb891b84cd3a68236654e4e83f0e5a073 | 79b318ac1e234378169fbf96d62f2d4cfcbb52fd | /phonedrohne/Quaternion/src/ch/sharpsoft/quaternion/util/Quaternion.java | ecd058862dea4b29b81770ad9950fa0afb1373b5 | [] | no_license | helios57/phonedrone | 0e508ced1b91d6ce245cba04031c2e6dab65a16e | 9a23565fa535ccedc0b364ecefea22eadba5fdc9 | refs/heads/master | 2021-01-10T10:44:03.958737 | 2013-07-24T13:15:07 | 2013-07-24T13:15:07 | 36,993,352 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,283 | java | package ch.sharpsoft.quaternion.util;
import ch.sharpsoft.quaternion.v1.Vector3;
public class Quaternion {
private final float w, x, y, z;
public Quaternion(float[] q) {
this.w = q[0];
this.x = q[1];
this.y = q[2];
this.z = q[3];
}
public Quaternion(float w, float x, float y, float z) {
this.w = w;
this.x = x;
this.y = y;
this.z = z;
}
public double norm() {
return Math.sqrt(w * w + x * x + y * y + z * z);
}
public Quaternion normalize() {
final double norm = norm();
return new Quaternion((float) (w / norm), (float) (x / norm),
(float) (y / norm), (float) (z / norm));
}
public Quaternion conjugate() {
return new Quaternion(w, -x, -y, -z);
}
public Quaternion plus(Quaternion b) {
return new Quaternion(w + b.w, x + b.x, y + b.y, z + b.z);
}
// return a new Quaternion whose value is (this * b)
public Quaternion multiply(Quaternion b) {
float w0 = w * b.w - x * b.x - y * b.y - z * b.z;
float x0 = w * b.x + x * b.w + y * b.z - z * b.y;
float y0 = w * b.y - x * b.z + y * b.w + z * b.x;
float z0 = w * b.z + x * b.y - y * b.x + z * b.w;
return new Quaternion(w0, x0, y0, z0);
}
public Vector3 multiply(final Vector3 vec) {
Quaternion vecQuat = new Quaternion(0.0f, vec.getX(), vec.getY(),
vec.getZ());
Quaternion resQuat = multiply(vecQuat).multiply(conjugate());
return (new Vector3(resQuat.x, resQuat.y, resQuat.z));
}
public static Quaternion fromAxis(Vector3 v, float angle) {
Vector3 vn = v.normalize();
float sinAngle = (float) Math.sin(angle / 2);
float x = (vn.getX() * sinAngle);
float y = (vn.getY() * sinAngle);
float z = (vn.getZ() * sinAngle);
float w = (float) Math.cos(angle / 2);
return new Quaternion(w, x, y, z);
}
/**
*
* @param pitch
* in radiants
* @param yaw
* in radiants
* @param roll
* in radiants
* @return
*/
public static Quaternion fromEuler(float pitch, float yaw, float roll) {
// Basically we create 3 Quaternions, one for pitch, one for yaw, one
// for roll
// and multiply those together.
// the calculation below does the same, just shorter
float p = (float) (pitch / 2.0);
float y = (float) (yaw / 2.0);
float r = (float) (roll / 2.0);
float sinp = (float) Math.sin(p);
float siny = (float) Math.sin(y);
float sinr = (float) Math.sin(r);
float cosp = (float) Math.cos(p);
float cosy = (float) Math.cos(y);
float cosr = (float) Math.cos(r);
float _x = sinr * cosp * cosy - cosr * sinp * siny;
float _y = cosr * sinp * cosy + sinr * cosp * siny;
float _z = cosr * cosp * siny - sinr * sinp * cosy;
float _w = cosr * cosp * cosy + sinr * sinp * siny;
return new Quaternion(_w, _x, _y, _z).normalize();
}
public float getW() {
return w;
}
public float getX() {
return x;
}
public float getY() {
return y;
}
public float getZ() {
return z;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + Float.floatToIntBits(w);
result = prime * result + Float.floatToIntBits(x);
result = prime * result + Float.floatToIntBits(y);
result = prime * result + Float.floatToIntBits(z);
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Quaternion other = (Quaternion) obj;
if (Float.floatToIntBits(w) != Float.floatToIntBits(other.w))
return false;
if (Float.floatToIntBits(x) != Float.floatToIntBits(other.x))
return false;
if (Float.floatToIntBits(y) != Float.floatToIntBits(other.y))
return false;
if (Float.floatToIntBits(z) != Float.floatToIntBits(other.z))
return false;
return true;
}
@Override
public String toString() {
return "Q [w=" + String.format("%.4f", w) + ", x="
+ String.format("%.4f", x) + ", y=" + String.format("%.4f", y)
+ ", z=" + String.format("%.4f", z) + "]";
}
public float[] getFloatArray() {
return new float[]{w,x,y,z};
}
public float[] getFloatArrayXYZW() {
return new float[]{x,y,z,w};
}
}
| [
"Helios"
] | Helios |
ee895b8707195071578947c14847f0d79780a7f2 | 9707e95b0b96fccdf3a42f5add5e8ef5a035d843 | /Linked List/deep copy of list with forward pointer.java | ed3a1b003e14130da0262ce61e22054dcef61074 | [] | no_license | fanyang209/data-structure | 09ffa4a8b7026e59cc66f94e749ff8f962498f7d | 2fad37f3bb8fd895326cf2b09f073b0f73f2eab2 | refs/heads/master | 2020-12-12T16:42:59.963240 | 2016-08-02T15:39:44 | 2016-08-02T15:39:44 | 53,741,545 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 588 | java | public ListNode deepCopy( ListNode head ) {
if( head == null ) {
return head ;
}
ListNode dummy = new ListNode( 0 ) ;
ListNode cur = dummy ;
Map< ListNode, ListNode> map = new HashMap< ListNode, ListNode>() ;
while( head != null ) {
if( !map.containsKey( head ) ) {
map.put( head, new ListNode( head.value ) ) ;
}
cur.next = map.get( head ) ;
if( head.forward != null ) {
if( !map.containsKey( head.forward ) ) {
map.put( head.forward, new ListNode( head.forward.value ) ) ;
}
cur.forward.next = map.get( head.forward) ;
}
head = head.next ;
cur = cur.next ;
}
return dummy.next ;
} | [
"[email protected]"
] | |
6b5a61ea960befd01c249d88ed76dd163c026408 | 7d940553cf07c8c4c644c6f890328c61c82c16ad | /app/src/main/java/gnosisdevelopment/arduinobtweatherstation/DBHelper.java | 5314b88e9a7c4c7370cb9bef8b411cc990e02510 | [
"CC-BY-3.0"
] | permissive | JamesHarley/BTWeatherStation | d19341293cbf806ba064674ed8b39e4fc40053d3 | 7d76953a0565152b37b12a42a4843b78ef5f206a | refs/heads/master | 2020-03-22T13:09:56.343529 | 2018-08-15T22:10:02 | 2018-08-15T22:10:02 | 140,088,113 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,066 | java | package gnosisdevelopment.arduinobtweatherstation;
import java.util.ArrayList;
import java.util.HashMap;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.DatabaseUtils;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
public class DBHelper extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "BTWeather.db";
public static final String PREFS_TABLE_NAME = "prefs";
public static final String PREFS_COLUMN_ID = "id";
public static final String PREFS_COLUMN_TEMPSTATE = "tempstate";
public static final String PREFS_COLUMN_HUMIDSTATE = "humidstate";
public static final String PREFS_COLUMN_WINDSTATE = "windstate";
public static final String PREFS_COLUMN_BTDEVICE = "btdevice";
public static final String PREFS_COLUMN_CELSIUS = "celsius";
public static final String PREFS_COLUMN_UPDATE_INTERVAL = "interval";
private HashMap hp;
public DBHelper(Context context) {
super(context, DATABASE_NAME , null, 1);
Log.d("BTWeather - DB", "db init");
}
@Override
public void onCreate(SQLiteDatabase db) {
Log.d("BTWeather - DB", "create db");
db.execSQL(
"create table prefs " +
"(id integer primary key, tempstate boolean,humidstate boolean, windstate boolean,btdevice text, celsius boolean,interval integer)"
);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS prefs");
onCreate(db);
}
public boolean insertPrefs (Boolean tempstate,Boolean humidstate, Boolean windstate, String btdevice, Boolean celsius, int interval) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("tempstate", tempstate);
contentValues.put("humidstate", humidstate);
contentValues.put("windstate", windstate);
contentValues.put("btdevice", btdevice);
contentValues.put("celsius", celsius);
contentValues.put("interval", interval);
db.insert("prefs", null, contentValues);
Log.d("BTWeather - DB", "insert db");
return true;
}
public Cursor getData(int id) {
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from prefs where id="+id+"", null );
return res;
}
public int numberOfRows(){
SQLiteDatabase db = this.getReadableDatabase();
int numRows = (int) DatabaseUtils.queryNumEntries(db, PREFS_TABLE_NAME);
return numRows;
}
public boolean updateContact (Integer id, Boolean tempstate,Boolean humidstate, Boolean windstate, String btdevice, Boolean celsius, int interval) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("tempstate", tempstate);
contentValues.put("humidstate", humidstate);
contentValues.put("windstate", windstate);
contentValues.put("btdevice", btdevice);
contentValues.put("celsius", celsius);
contentValues.put("interval", interval);
db.update("prefs", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
return true;
}
public Integer deletePrefs (Integer id) {
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("prefs",
"id = ? ",
new String[] { Integer.toString(id) });
}
public ArrayList<String> getAllPrefs() {
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from prefs", null );
res.moveToFirst();
while(res.isAfterLast() == false){
array_list.add(res.getString(res.getColumnIndex(PREFS_COLUMN_ID)));
res.moveToNext();
}
return array_list;
}
public boolean isEmpty(){
if( numberOfRows() >0){
return false;
}
else
return true;
}
public boolean updateTempState(Integer id, boolean tempstate){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("tempstate", tempstate);
db.update("prefs", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
Log.d("BTWeather - DB", "update tempstate");
return true;
}
public boolean updateHumidState(Integer id, boolean humidstate){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("humidstate", humidstate);
db.update("prefs", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
Log.d("BTWeather - DB", "update humid state");
return true;
}
public boolean updateWindState(Integer id, boolean windstate){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("windstate", windstate);
db.update("prefs", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
Log.d("BTWeather - DB", "update windstate");
return true;
}
public boolean updateBT(Integer id, String btdevice){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("btdevice", btdevice);
db.update("prefs", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
return true;
}
public boolean updateCelsius(Integer id, boolean celsius){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("celsius", celsius);
db.update("prefs", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
Log.d("BTWeather - DB", "update celsius");
return true;
}
public boolean updateInterval(Integer id, int interval){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("interval", interval);
db.update("prefs", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
Log.d("BTWeather - DB", "update interval");
return true;
}
public int getHumidState(){
try{
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from prefs ",null );
res.moveToFirst();
return res.getInt(res.getColumnIndex(DBHelper.PREFS_COLUMN_HUMIDSTATE));}
catch (Exception e ){Log.d("BTWeather-getHumidState", String.valueOf(e));}
return 1;
}
public int getTempState(){
try{
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from prefs ",null );
res.moveToFirst();
return res.getInt(res.getColumnIndex(DBHelper.PREFS_COLUMN_TEMPSTATE));}
catch (Exception e ){Log.d("BTWeatherget-TempState", String.valueOf(e));}
return 1;
}
public int getWindState(){
try{
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from prefs ",null );
res.moveToFirst();
return res.getInt(res.getColumnIndex(DBHelper.PREFS_COLUMN_WINDSTATE));}
catch (Exception e ){Log.d("BTWeatherget-WindState", String.valueOf(e));}
return 1;
}
public String getBTDevice(){
try{
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from prefs ",null );
res.moveToFirst();
return res.getString(res.getColumnIndex(DBHelper.PREFS_COLUMN_BTDEVICE));}
catch (Exception e ){Log.d("BTWeather - getBTDevice", String.valueOf(e));}
return "";
}
public int getCelsius(){
try{
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from prefs ",null );
res.moveToFirst();
return res.getInt(res.getColumnIndex(DBHelper.PREFS_COLUMN_CELSIUS));}
catch (Exception e ){Log.d("BTWeather - getCelsius", String.valueOf(e));}
return 1;
}
public int getInterval(){
try{
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from prefs ",null );
res.moveToFirst();
return res.getInt(res.getColumnIndex(DBHelper.PREFS_COLUMN_UPDATE_INTERVAL));}
catch (Exception e ){Log.d("BTWeatherget-interval", String.valueOf(e));}
return -1;
}
} | [
"[email protected]"
] | |
050dd6b08ddb50fee3bd9a7a756f830e32eea542 | d3abbbeac102de77fe50a6d400c6aa7c0a80a97c | /src/com/interview/leetcode/MissingNumber.java | 32460dbdf97dd923c356e6ae8360984370e36765 | [] | no_license | teraliv/interview | 6ce0352d285eac1dc02f34a05dbd028bba2aa2f2 | 4fd2bc80e8cf8fe18e2b0f38385e60b0cb93366f | refs/heads/master | 2020-04-24T06:35:04.608247 | 2019-04-01T04:17:45 | 2019-04-01T04:17:45 | 171,770,343 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,112 | java | package com.interview.leetcode;
/**
* 268. Missing Number
*
* Given an array containing n distinct numbers taken from
* 0, 1, 2, ..., n, find the one that is missing from the array.
* Your algorithm should run in linear runtime complexity.
*
* https://leetcode.com/problems/missing-number/
*/
public class MissingNumber {
/**
* Time complexity: O(n)
* Space complexity: O(1)
*
* Logic:
* 1. sum up indexes
* 2. sum up elements in array
* 3. the result is difference between sum of indexes and sum of array elements
*/
public int findMissingNumber(int[] nums) {
int i, sum1 = 0, sum2 = 0;
for (i = 0; i < nums.length; i++) {
sum1 += nums[i];
sum2 += i;
}
sum2 += i;
return sum2 - sum1;
}
public static void main(String[] args) {
MissingNumber mn = new MissingNumber();
int[] nums1 = {3,0,1};
int[] nums2 = {9,6,4,2,3,5,7,0,1};
System.out.println( mn.findMissingNumber(nums1) );
System.out.println( mn.findMissingNumber(nums2) );
}
}
| [
"[email protected]"
] | |
1da6b3861087983a819e97a6a0009b9d1eacb50f | 4953bb4beb49ae211c4487605668269fb437d2a1 | /src/main/java/com/api/scgapi/models/ApiResponseModel.java | 5d5165d86b97592673d58d43a1e3201f37326c72 | [] | no_license | supacheep-first/scg-api | af09b4aa443d585b0a9243b535b82d09906547bb | c4fe62ade17d6d3348e1baadf41b03fb864319c9 | refs/heads/master | 2023-01-19T01:53:08.923461 | 2020-11-20T06:03:13 | 2020-11-20T06:03:13 | 314,455,933 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 193 | java | package com.api.scgapi.models;
import lombok.Data;
import org.springframework.http.HttpStatus;
@Data
public class ApiResponseModel {
private HttpStatus status;
private String body;
}
| [
"[email protected]"
] | |
f006ba31355a3220bd209139230151d1204d6e20 | bb144a9a3691eda39cf72954c32371b62a87cf34 | /src/weeksix/tuesday/challenges/stock_control_system/Order.java | 5f80611707d3dde21d2a1bc3c7af1955dcea523e | [] | no_license | RobertWatkin/GatesHeadCollege | 6ef500031c1013d30edb3887ed531a80fac3c928 | 90a77338da41248c4ebb0ea5e06ba3d2135f2cef | refs/heads/master | 2022-02-28T20:40:23.370215 | 2019-10-14T09:18:39 | 2019-10-14T09:18:39 | 214,985,406 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 544 | java | /*
Written By : Robert Watkin
Date Created : 08/10/2019
*/
package weeksix.tuesday.challenges.stock_control_system;
import java.util.Date;
public class Order {
// Variable Declaration
private int orderID;
private int customerID;
private int quantity;
private Date orderDate;
// Constructor
public Order(int orderID, int customerID, int quantity, Date orderDate) {
this.orderID = orderID;
this.customerID = customerID;
this.quantity = quantity;
this.orderDate = orderDate;
}
}
| [
"[email protected]"
] | |
3083a6d62b3280d47555ea81b9aff1e600e43740 | d8ae0563f237551cdfbe707cb367a5dcbae8854c | /bingo-core/src/main/java/org/bingo/security/service/AuthorityService.java | a32f1e037bc17d7ed95e861bc31f57218889f941 | [] | no_license | ERIC0402/bingo | ebda99e1d4f6d14511effc43912927d33d47fce7 | 4782ee19fd54293a0c5f9e0e2da987730ffcc513 | refs/heads/master | 2021-06-16T14:01:38.393305 | 2017-05-11T05:47:44 | 2017-05-11T05:47:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 417 | java | package org.bingo.security.service;
import java.util.List;
import java.util.Set;
import org.bingo.security.model.Authority;
import org.bingo.security.model.User;
public interface AuthorityService {
/**
* 获取该用户所有权限
* @param user
* @return
*/
public Set<Authority> getAuthorities(User user);
/**
* 获取所有权限
* @return
*/
public List<Authority> findAllAuthority();
}
| [
"[email protected]"
] | |
68346cebd6965db5a61122ad436e421003621680 | 020713896789ae44e56e54bfcbe7c494b8d9ae65 | /src/fontMeshCreator/GUIText.java | 62b31c965cf9e49c8a092b9cd66b407d2e2ad6c6 | [] | no_license | Lmntrix18/T-rex-Adventures-3D-Game | e5f82cece25bd781714ccecb473283017ce0e448 | f89a08f5a0e569849c1d0d67ccd2970ce9bb12ab | refs/heads/main | 2023-03-13T06:42:32.616728 | 2021-03-08T08:58:41 | 2021-03-08T08:58:41 | 345,562,586 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,829 | java | package fontMeshCreator;
import org.lwjgl.util.vector.Vector2f;
import org.lwjgl.util.vector.Vector3f;
import fontRendering.TextMaster;
/**
* Represents a piece of text in the game.
*
* @author Karl
*
*/
public class GUIText {
private String textString;
private float fontSize;
private int textMeshVao;
private int vertexCount;
private Vector3f colour = new Vector3f(0f, 0f, 0f);
private Vector2f position;
private float lineMaxSize;
private int numberOfLines;
private FontType font;
private boolean centerText = false;
/**
* Creates a new text, loads the text's quads into a VAO, and adds the text
* to the screen.
*
* @param text
* - the text.
* @param fontSize
* - the font size of the text, where a font size of 1 is the
* default size.
* @param font
* - the font that this text should use.
* @param position
* - the position on the screen where the top left corner of the
* text should be rendered. The top left corner of the screen is
* (0, 0) and the bottom right is (1, 1).
* @param maxLineLength
* - basically the width of the virtual page in terms of screen
* width (1 is full screen width, 0.5 is half the width of the
* screen, etc.) Text cannot go off the edge of the page, so if
* the text is longer than this length it will go onto the next
* line. When text is centered it is centered into the middle of
* the line, based on this line length value.
* @param centered
* - whether the text should be centered or not.
*/
public GUIText(String text, float fontSize, FontType font, Vector2f position, float maxLineLength,
boolean centered) {
this.textString = text;
this.fontSize = fontSize;
this.font = font;
this.position = position;
this.lineMaxSize = maxLineLength;
this.centerText = centered;
TextMaster.loadText(this);
// load text
}
/**
* Remove the text from the screen.
*/
public void remove() {
TextMaster.removeText(this);
}
/**
* @return The font used by this text.
*/
public FontType getFont() {
return font;
}
/**
* Set the colour of the text.
*
* @param r
* - red value, between 0 and 1.
* @param g
* - green value, between 0 and 1.
* @param b
* - blue value, between 0 and 1.
*/
public void setColour(float r, float g, float b) {
colour.set(r, g, b);
}
/**
* @return the colour of the text.
*/
public Vector3f getColour() {
return colour;
}
/**
* @return The number of lines of text. This is determined when the text is
* loaded, based on the length of the text and the max line length
* that is set.
*/
public int getNumberOfLines() {
return numberOfLines;
}
/**
* @return The position of the top-left corner of the text in screen-space.
* (0, 0) is the top left corner of the screen, (1, 1) is the bottom
* right.
*/
public Vector2f getPosition() {
return position;
}
/**
* @return the ID of the text's VAO, which contains all the vertex data for
* the quads on which the text will be rendered.
*/
public int getMesh() {
return textMeshVao;
}
/**
* Set the VAO and vertex count for this text.
*
* @param vao
* - the VAO containing all the vertex data for the quads on
* which the text will be rendered.
* @param verticesCount
* - the total number of vertices in all of the quads.
*/
public void setMeshInfo(int vao, int verticesCount) {
this.textMeshVao = vao;
this.vertexCount = verticesCount;
}
/**
* @return The total number of vertices of all the text's quads.
*/
public int getVertexCount() {
return this.vertexCount;
}
/**
* @return the font size of the text (a font size of 1 is normal).
*/
protected float getFontSize() {
return fontSize;
}
/**
* Sets the number of lines that this text covers (method used only in
* loading).
*
* @param number
*/
protected void setNumberOfLines(int number) {
this.numberOfLines = number;
}
/**
* @return {@code true} if the text should be centered.
*/
protected boolean isCentered() {
return centerText;
}
/**
* @return The maximum length of a line of this text.
*/
protected float getMaxLineSize() {
return lineMaxSize;
}
/**
* @return The string of text.
*/
public String getTextString() {
return textString;
}
public void setString(String string) {
this.textString = string;
TextMaster.loadText(this);
}
}
| [
"[email protected]"
] | |
a1f6c0628f94042c8165124423bac569f9253378 | dafb5c3abd51720da10e26872a5d7e59be1c0bf7 | /src/main/java/com/zqbweather/app/model9/XDWeatherDB.java | 0736ae188edf3ee944b410b187d633ab97dfba7b | [
"Apache-2.0"
] | permissive | YJWWZHANG/XDWeather | 210c807e588df078b5828dda54458fd68c95a613 | 42dd28cc0b4c78eb12b705c89382ea76e8063716 | refs/heads/master | 2021-01-01T04:30:52.824953 | 2016-05-21T13:44:17 | 2016-05-21T13:44:17 | 59,361,649 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,421 | java | package com.zqbweather.app.model9;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import com.zqbweather.app.activity.MyApplication;
import com.zqbweather.app.db.XDWeatherOpenHelper;
import com.zqbweather.app.model9.Province9;
import java.util.ArrayList;
import java.util.List;
/**
* Created by admin on 2016/2/5.
*/
public class XDWeatherDB {
public static final String DB_NAME = "xd_weather";
public static final int VERSION = 1;
public static XDWeatherDB xdWeatherDB;
private SQLiteDatabase db;
private XDWeatherDB(Context context){
XDWeatherOpenHelper dbHelper = new XDWeatherOpenHelper(context, DB_NAME, null, VERSION);
db = dbHelper.getWritableDatabase();
}
public synchronized static XDWeatherDB getIntance(){
if(xdWeatherDB == null){
xdWeatherDB = new XDWeatherDB(MyApplication.getContext());
}
return xdWeatherDB;
}
public void saveProvince(Province9 province){
if(province != null){
ContentValues values = new ContentValues();
values.put("province_name", province.getProvinceName());
values.put("province_pyname", province.getProvincePyName());
db.insert("Province", null, values);
}
}
public void saveCity(City9 city){
if(city != null){
ContentValues values = new ContentValues();
values.put("city_name", city.getCityName());
values.put("city_pyname", city.getCityPyName());
values.put("province_pyname", city.getProvincePyName());
xdWeatherDB.db.insert("City", null, values);
}
}
public void saveCounty(County9 county){
if(county != null){
ContentValues values = new ContentValues();
values.put("county_name", county.getCountyName());
values.put("county_weather_code", county.getCountyWeatherCode());
values.put("city_pyname", county.getCityPyName());
db.insert("County", null, values);
}
}
public List<Province9> loadProvince(){
List<Province9> list = new ArrayList<>();
Cursor cursor = db.query("Province", null, null, null, null, null, null);
if(cursor.moveToFirst()){
do{
Province9 province = new Province9();
province.setId(cursor.getInt(cursor.getColumnIndex("id")));
province.setProvinceName(cursor.getString(cursor.getColumnIndex("province_name")));
province.setProvincePyName(cursor.getString(cursor.getColumnIndex("province_pyname")));
list.add(province);
}while (cursor.moveToNext());
}
return list;
}
public List<City9> loadCity(String provincePyName){
List<City9> list = new ArrayList<>();
Cursor cursor = db.query("City", null, "province_pyname = ?", new String[]{provincePyName}, null, null, null);
if(cursor.moveToFirst()){
do{
City9 city = new City9();
city.setId(cursor.getInt(cursor.getColumnIndex("id")));
city.setCityName(cursor.getString(cursor.getColumnIndex("city_name")));;
city.setCityPyName(cursor.getString(cursor.getColumnIndex("city_pyname")));
city.setProvincePyName(cursor.getString(cursor.getColumnIndex("province_pyname")));
list.add(city);
}while (cursor.moveToNext());
}
return list;
}
public List<County9> loadCounty(String cityPyName){
List<County9> list = new ArrayList<>();
Cursor cursor = db.query("County", null, "city_pyname = ?", new String[]{cityPyName}, null, null, null);
if(cursor.moveToFirst()){
do{
County9 county = new County9();
county.setId(cursor.getInt(cursor.getColumnIndex("id")));
county.setCountyName(cursor.getString(cursor.getColumnIndex("county_name")));
county.setCountyWeatherCode(cursor.getString(cursor.getColumnIndex("county_weather_code")));
county.setCityPyName(cursor.getString(cursor.getColumnIndex("city_pyname")));
list.add(county);
}while (cursor.moveToNext());
}
return list;
}
}
| [
"[email protected]"
] | |
d0276aaa0438f055a98a19cd72b01b6b28d4e0e5 | 9ba4fd0c0fe1227afd139ca2d3622eed98985555 | /src/test/java/com/example/prageet/cavorts/ExampleUnitTest.java | c34ea76750655e097786d52def04a319046758be | [] | no_license | VirZon/cavorts2k17 | bf18467751bb0e53a5244997f530fbc2d44e72e4 | 6bdd1ca422ef024e7cf6e097f34db4d1860be23a | refs/heads/master | 2021-01-23T12:00:07.808358 | 2017-09-26T05:01:06 | 2017-09-26T05:01:06 | 102,642,493 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 421 | java | package com.example.prageet.cavorts;
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);
}
} | [
"[email protected]"
] | |
487894e8c2c2b71eb3b5b0eae7634deac7da5cb6 | dc3ff4ec1cae3067369437bc92fceb9d142036b6 | /src/main/java/org/springframework/amqp/tutorials/tut1/Tut1Config.java | 009043647ca39fcbef59e7082efbcc52a20770c2 | [] | no_license | a-chauhan/rabbitmq-spring-tutorials | 2e587e719784fcb5cc84b36088d7f29a0a37a321 | 86cfebe55c760431baf729aa93f1b90a1deb08b8 | refs/heads/master | 2020-03-21T02:38:09.013418 | 2018-06-20T09:29:41 | 2018-06-20T09:29:41 | 138,008,996 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 638 | java | package org.springframework.amqp.tutorials.tut1;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
@Configuration
@Profile({"tut1","hello-world"})
public class Tut1Config {
@Bean
public Queue hello() {
return new Queue("hello");
}
@Profile("receiver")
@Bean
public Tut1Receiver receiver() {
return new Tut1Receiver();
}
@Profile("sender")
@Bean
public Tut1Sender sender() {
return new Tut1Sender();
}
}
| [
"[email protected]"
] | |
bfc3d20a333ce2f2669f8139673815aaf314cf09 | c74a3488129ac10e204bc56b8718c6ff261ee3a7 | /src/main/java/com/chitter/PeepRepository.java | b95277c9dcd16f8026450102641db8c372d18fd9 | [] | no_license | JohnNewman1/chitter-challenge | 2bef6ec5b482e2f6d9893113cb5ebe96a22f3d21 | fccdff3def2a037587c64a9883c03ae650c6947f | refs/heads/master | 2020-03-19T16:29:00.912220 | 2018-06-09T16:02:56 | 2018-06-09T16:02:56 | 136,716,898 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 155 | java | package com.chitter;
import org.springframework.data.repository.CrudRepository;
public interface PeepRepository extends CrudRepository<Peep, Long> {
}
| [
"[email protected]"
] | |
8d1dcd014672496fc0ce74197e43f75059a77f47 | 0c8a9b60a6bb4bce19921c0008c9e79c5eb89f31 | /TianTianApp/app/src/main/java/com/tiantianapp/photo/loader/PhotoDirectoryLoader.java | a73d1571df779f9ca83dd5c2f9327a49ea5012ac | [] | no_license | Tareafengye/GankAPi | 9ad0d724c7bb50167bd63c950bb90dfa7da9cd8a | dafd0ef1d9512954c13fcdd69717294edd31aa3b | refs/heads/master | 2021-05-09T05:41:10.848906 | 2018-04-28T08:55:14 | 2018-04-28T08:55:14 | 119,317,538 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,733 | java | package com.tiantianapp.photo.loader;
import android.content.Context;
import android.net.Uri;
import android.provider.MediaStore.Images.Media;
import android.support.v4.content.CursorLoader;
import static android.provider.MediaStore.MediaColumns.MIME_TYPE;
/**
* Created by Awen <[email protected]>
*/
public class PhotoDirectoryLoader extends CursorLoader {
private final static String IMAGE_JPEG = "image/jpeg";
private final static String IMAGE_PNG = "image/png";
private final static String IMAGE_GIF = "image/gif";
final String[] IMAGE_PROJECTION = {
Media._ID,
Media.DATA,
Media.BUCKET_ID,
Media.BUCKET_DISPLAY_NAME,
Media.DATE_ADDED,
Media.SIZE
};
public PhotoDirectoryLoader(Context context){
this(context,false);
}
public PhotoDirectoryLoader(Context context, boolean showGif) {
super(context);
setProjection(IMAGE_PROJECTION);
setUri(Media.EXTERNAL_CONTENT_URI);
setSortOrder(Media.DATE_ADDED + " DESC");
setSelection(
MIME_TYPE + "=? or " + MIME_TYPE + "=? " + (showGif ? ("or " + MIME_TYPE + "=?") : ""));
String[] selectionArgs;
if (showGif) {
selectionArgs = new String[]{IMAGE_JPEG, IMAGE_PNG, IMAGE_GIF};
} else {
selectionArgs = new String[]{IMAGE_JPEG, IMAGE_PNG};
}
setSelectionArgs(selectionArgs);
}
private PhotoDirectoryLoader(Context context, Uri uri, String[] projection, String selection,
String[] selectionArgs, String sortOrder) {
super(context, uri, projection, selection, selectionArgs, sortOrder);
}
}
| [
"[email protected]"
] | |
c98f66c060e2f214c8db073ef49c6206234154ce | d04ff5275808e541ea7c2033e3cb816128a48231 | /chapter_008/src/main/java/ru/job4j/srp/SubtractAction.java | 95a8e1c3d44772527077ee2f8c7245a57de4143c | [] | no_license | VladimirKovtun/job4j | 2b93e25d00f35722c933cb0d480c696f3dc4478d | 0380675efe04d7b714bb5a109e176f99d51318d0 | refs/heads/master | 2022-09-20T07:20:39.631341 | 2020-01-23T13:15:32 | 2020-01-24T06:12:22 | 207,911,194 | 0 | 0 | null | 2022-09-01T23:17:15 | 2019-09-11T21:36:50 | Java | UTF-8 | Java | false | false | 718 | java | package ru.job4j.srp;
import ru.job4j.calculate.Calculate;
/**
* Subtraction action class.
*/
public class SubtractAction extends BaseCalcAction {
public SubtractAction(String number, String text) {
super(number, text);
}
/**
*Execution of subtraction.
*
* @param calculate Class object with calculator methods.
* @param calcHandler A class object that defines behavior.
* @return The result of the subtraction.
*/
@Override
public double execute(Calculate calculate, CalcHandler calcHandler) {
double result = calcHandler.executeTwoVar(calculate::subTract);
System.out.printf("Result is: %.2f%n", result);
return result;
}
}
| [
"[email protected]"
] | |
5cebf08b0b0cf18bdc8faf0f0612385be89bc353 | 97b0fe480c5ec6cc1720b712ffc77cceca35470d | /src/main/java/me/maxct/asset/dto/LoginVO.java | 672bb9a6c63eb97d9380e7f7f163801282e2c8c9 | [] | no_license | MaoLeYuu/asset-1 | a83683d6e71dabf393363e72459973c9c65a6ca0 | da63c366bc0eedf2d9e12695229adfa6dd80dab4 | refs/heads/master | 2020-07-27T18:32:27.379416 | 2019-05-14T14:06:34 | 2019-05-14T14:06:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 342 | java | package me.maxct.asset.dto;
import lombok.Data;
/**
* @author imaxct
* 2019-03-28 19:41
*/
@Data
public class LoginVO {
private Long id;
private String username;
private String name;
private String token;
private Long expireSecond;
private String depName;
private RoleVO role;
private Long depId;
}
| [
"[email protected]"
] | |
c5ca75282003a98ecf1ae4f664c255e5d197c07d | 05f5127477eff81bf362233f617186252eed46ae | /fun/android/tant-card/src/com/shimoda/oa/util/importer/IDataImportResponse.java | 6aa7c96e1c47db996fe3e329edac3c9eb8a250f0 | [] | no_license | wangym/labs | 2473b16d322c0ae070b5d632d5965686903ee1b3 | b29270e8adf777aa8bdd05b4840949159fff1469 | refs/heads/master | 2020-12-19T23:55:37.155115 | 2016-11-21T07:36:33 | 2016-11-21T07:36:33 | 10,281,534 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 370 | java | package com.shimoda.oa.util.importer;
import java.util.List;
import com.shimoda.oa.model.SourceContactListVO;
public interface IDataImportResponse {
public void onImportDataComplete(List<SourceContactListVO> contactList, int imported, int current);
public void onImportDataFinish(int imported);
public void onImportDataError(String errorMsg);
}
| [
"[email protected]"
] | |
a3f0224d29dd2fd97f06d1bc6f4289b84150a5cb | f0757b5f6006d2b413aa9ede33d09f33dc954f23 | /textbook_examples/ch08/fig08_07_09/src/Date.java | 47b8c213e397738a3439667da6f02e63f4aa426d | [] | no_license | rdfarwell/Software-Design-Spring-2020 | 7b53e02bb8d3511d0145dae33fa55910e5cf6952 | 86ae23d5e7954d063b21c448130bd01035912db2 | refs/heads/master | 2022-12-19T00:18:56.763541 | 2020-09-30T23:21:20 | 2020-09-30T23:21:20 | 279,748,324 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,592 | java | // Fig. 8.7: Date.java
// Date class declaration.
public class Date {
private static final int[] daysPerMonth =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
private int month; // 1-12
private int day; // 1-31 based on month
private int year; // any year
// constructor: confirm proper value for month and day given the year
public Date(int month, int day, int year) {
// check if month in range
if (month <= 0 || month > 12)
throw new IllegalArgumentException(
"month (" + month + ") must be 1-12");
// check if day in range for month
if (day <= 0 ||
(day > daysPerMonth[month] && !(month == 2 && day == 29)))
throw new IllegalArgumentException("day (" + day +
") out-of-range for the specified month and year");
// check for leap year if month is 2 and day is 29
if (month == 2 && day == 29 && !(year % 400 == 0 ||
(year % 4 == 0 && year % 100 != 0)))
throw new IllegalArgumentException("day (" + day +
") out-of-range for the specified month and year");
this.month = month;
this.day = day;
this.year = year;
System.out.printf(
"Date object constructor for date %s%n", this);
}
// return a String of the form month/day/year
public String toString() {
return String.format("%d/%d/%d", month, day, year);
}
} // end class Date
/**************************************************************************
* (C) Copyright 1992-2014 by Deitel & Associates, Inc. and *
* Pearson Education, Inc. All Rights Reserved. *
* *
* DISCLAIMER: The authors and publisher of this book have used their *
* best efforts in preparing the book. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these books. The authors *
* and publisher shall not be liable in any event for incidental or *
* consequential damages in connection with, or arising out of, the *
* furnishing, performance, or use of these programs. *
*************************************************************************/
| [
"[email protected]"
] | |
050e7c420d84f38f9ae40061820208ad6a54151b | bf32bc8d88dba3f3fd9e25ee670b44233dce7a46 | /app/src/main/java/com/firatnet/wst/adapter/RecyclerAllPostsCardAdapter.java | 1a724c484bc70af5caee1c82f349acf18e63fe7c | [] | no_license | amroshehk/WTS | af46167b3c1be5cc85c6178f933f4fd68f8fa603 | 2c48314eca0725e67227d78c6beb3f235aaffbe6 | refs/heads/master | 2020-05-30T07:41:20.694714 | 2019-10-16T19:52:41 | 2019-10-16T19:52:41 | 189,602,436 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,073 | java | package com.firatnet.wst.adapter;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.firatnet.wst.R;
import com.firatnet.wst.activities.PostDetailsActivity;
import com.firatnet.wst.entities.Post;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import java.util.ArrayList;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
public class RecyclerAllPostsCardAdapter extends RecyclerView.Adapter<RecyclerAllPostsCardAdapter.ViewHolder> {
private ArrayList<Post> posts;
private Context context;
private TextView nonumbers;
ImageLoader imageLoader = ImageLoader.getInstance();
ImageLoaderConfiguration config;
DisplayImageOptions options;
public RecyclerAllPostsCardAdapter(ArrayList<Post> posts, Context context, TextView nonumbers) {
this.posts = posts;
this.context=context;
this.nonumbers=nonumbers;
config = new ImageLoaderConfiguration.Builder(context)
.build();
ImageLoader.getInstance().init(config);
options = new DisplayImageOptions.Builder()
.cacheInMemory(true)
.cacheOnDisk(true)
.build();
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v= LayoutInflater.from(parent.getContext()).inflate(R.layout.card_buy_posts_layout,parent,false);
return new ViewHolder(v);
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.number_tv.setText(posts.get(position).getTitle());
holder.created_tv.setText(posts.get(position).getCreated_date());
if (!posts.get(position).getPost_image_url().isEmpty()&&!posts.get(position).getPost_image_url().equals("null"))
{
imageLoader.displayImage(posts.get(position).getPost_image_url(), holder.image, options);
holder.image.setVisibility(View.VISIBLE);
}
else
{
holder.image.setVisibility(View.GONE);
}
}
@Override
public int getItemCount() {
return posts.size();
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public int getItemViewType(int position) {
return position;
}
class ViewHolder extends RecyclerView.ViewHolder{
private ProgressDialog progressDialog;
TextView number_tv;
TextView created_tv;
ImageView image;
@SuppressLint("SetTextI18n")
ViewHolder(final View itemView) {
super(itemView);
number_tv = itemView.findViewById(R.id.number_tv);
created_tv = itemView.findViewById(R.id.created_date_tv);
image = itemView.findViewById(R.id.image);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int position=getAdapterPosition();
Intent intent=new Intent(context, PostDetailsActivity.class);
intent.putExtra("DETAILS",posts.get(position));
context.startActivity(intent);
// Snackbar.make(v,"Cliecked detedcted item on "+position,Snackbar.LENGTH_SHORT).
// setAction("Action",null).show();
}
});
}
}
}
| [
"[email protected]"
] | |
b3eed91ec6cdee6d1e191ad267e8d5094dfdaf7d | 757ff0e036d1c65d99424abb5601012d525c2302 | /sources/com/fimi/album/widget/CustomVideoView.java | 0352c22c5f2e58d79076fe1e9b0041910ec6217f | [] | no_license | pk1z/wladimir-computin-FimiX8-RE-App | 32179ef6f05efab0cf5af0d4957f0319abe04ad0 | 70603638809853a574947b65ecfaf430250cd778 | refs/heads/master | 2020-11-25T21:02:17.790224 | 2019-12-18T13:28:48 | 2019-12-18T13:28:48 | 228,845,415 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 22,905 | java | package com.fimi.album.widget;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Bitmap;
import android.graphics.SurfaceTexture;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnBufferingUpdateListener;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.media.MediaPlayer.OnInfoListener;
import android.media.MediaPlayer.OnPreparedListener;
import android.media.MediaPlayer.OnSeekCompleteListener;
import android.os.Handler;
import android.os.Message;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.TextureView;
import android.view.TextureView.SurfaceTextureListener;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
import com.example.album.R;
import com.fimi.kernel.utils.LogUtil;
import java.util.Formatter;
import java.util.Locale;
public class CustomVideoView extends RelativeLayout implements OnClickListener, SurfaceTextureListener, OnPreparedListener, OnCompletionListener, OnInfoListener, OnErrorListener, OnBufferingUpdateListener, OnSeekBarChangeListener {
private static final int LOAD_TOTAL_COUNT = 3;
private static final int STATE_ERROR = 1;
private static final int STATE_IDLE = 0;
private static final int STATE_PAUSE = 2;
private static final int STATE_PLAYING = 1;
private static final String TAG = "CustomVideoView";
private static final int TIME_INVAL = 1000;
private static final int TIME_MSG = 1;
private static float VIDEO_HEIGHT_PERCENT = 0.5625f;
private AudioManager audioManager;
private boolean canPlay = true;
private boolean isMute;
private boolean isUpdateProgressed = false;
private VideoPlayerListener listener;
private RelativeLayout mBottomPlayRl;
private int mCurrentCount;
private TextView mCurrentTimeTv;
private int mDestationHeight;
private StringBuilder mFormatBuilder;
private Formatter mFormatter;
private Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
super.handleMessage(msg);
switch (msg.what) {
case 1:
if (CustomVideoView.this.isPlaying()) {
if (!CustomVideoView.this.isUpdateProgressed) {
int currentPosition = (int) (Math.round(((double) CustomVideoView.this.getCurrentPosition()) / 1000.0d) * 1000);
CustomVideoView.this.mPlaySb.setProgress(currentPosition);
CustomVideoView.this.mCurrentTimeTv.setText(CustomVideoView.this.setTimeFormatter(currentPosition));
}
if (CustomVideoView.this.listener != null) {
CustomVideoView.this.listener.onBufferUpdate(CustomVideoView.this.getCurrentPosition());
}
sendEmptyMessageDelayed(1, 1000);
return;
}
return;
default:
return;
}
}
};
private boolean mIsComplete;
private boolean mIsRealPause;
private ProgressBar mLoadingBar;
private ImageButton mMiniPlayBtn;
private ViewGroup mParentContainar;
private ImageButton mPlayBackIBtn;
private SeekBar mPlaySb;
private RelativeLayout mPlayerView;
private ScreenEventReciver mScreenEventReciver;
private int mScreenWidth;
private LinearLayout mTopBarLl;
private TextView mTotalTimeTv;
private String mUrl;
private TextureView mVideoView;
private MediaPlayer mediaPlayer;
private TextView nameTv;
private int playerState = 0;
private int showTopBottomBarTime = 0;
private Surface videoSurface;
public interface VideoPlayerListener {
void onAdVideoLoadComplete();
void onAdVideoLoadFailed();
void onAdVideoLoadSuccess();
void onBufferUpdate(int i);
void onClickBackBtn();
void onClickFullScreenBtn();
void onClickPlay();
void onClickVideo();
}
public interface ADFrameImageLoadListener {
void onStartFrameLoad(String str, ImageLoaderListener imageLoaderListener);
}
public interface ImageLoaderListener {
void onLoadingComplete(Bitmap bitmap);
}
private class ScreenEventReciver extends BroadcastReceiver {
private ScreenEventReciver() {
}
/* synthetic */ ScreenEventReciver(CustomVideoView x0, AnonymousClass1 x1) {
this();
}
public void onReceive(Context context, Intent intent) {
Log.i(CustomVideoView.TAG, "onReceive: " + intent.getAction());
String action = intent.getAction();
Object obj = -1;
switch (action.hashCode()) {
case -2128145023:
if (action.equals("android.intent.action.SCREEN_OFF")) {
int obj2 = 1;
break;
}
break;
case 823795052:
if (action.equals("android.intent.action.USER_PRESENT")) {
obj2 = null;
break;
}
break;
}
switch (obj2) {
case null:
if (CustomVideoView.this.playerState != 2) {
return;
}
if (CustomVideoView.this.mIsRealPause) {
CustomVideoView.this.pause();
return;
} else {
CustomVideoView.this.resume();
return;
}
case 1:
if (CustomVideoView.this.playerState == 1) {
CustomVideoView.this.pause();
return;
}
return;
default:
return;
}
}
}
public void timeFunction() {
if (this.mBottomPlayRl.getVisibility() == 0) {
LogUtil.i(TAG, "handleMessage:visible");
this.showTopBottomBarTime++;
if (this.showTopBottomBarTime >= 5) {
this.showTopBottomBarTime = 0;
showBar(false);
return;
}
return;
}
this.showTopBottomBarTime = 0;
}
public CustomVideoView(Context context, ViewGroup parentContainer) {
super(context);
this.mParentContainar = parentContainer;
this.audioManager = (AudioManager) getContext().getSystemService("audio");
initDate();
initView();
registerBroadcastReceiver();
}
private void initDate() {
DisplayMetrics dm = new DisplayMetrics();
((WindowManager) getContext().getSystemService("window")).getDefaultDisplay().getMetrics(dm);
this.mScreenWidth = dm.widthPixels;
this.mDestationHeight = (int) (((float) this.mScreenWidth) * VIDEO_HEIGHT_PERCENT);
this.mFormatBuilder = new StringBuilder();
this.mFormatter = new Formatter(this.mFormatBuilder, Locale.getDefault());
}
private void initView() {
this.mPlayerView = (RelativeLayout) LayoutInflater.from(getContext()).inflate(R.layout.album_custom_video_view, this);
this.mPlayerView.setOnClickListener(this);
this.mLoadingBar = (ProgressBar) this.mPlayerView.findViewById(R.id.load_iv);
this.mVideoView = (TextureView) this.mPlayerView.findViewById(R.id.play_video_textureview);
this.mVideoView.setOnClickListener(this);
this.mVideoView.setKeepScreenOn(true);
this.mVideoView.setSurfaceTextureListener(this);
this.mTopBarLl = (LinearLayout) this.mPlayerView.findViewById(R.id.shoto_top_tab_ll);
this.mBottomPlayRl = (RelativeLayout) this.mPlayerView.findViewById(R.id.bottom_play_rl);
this.mMiniPlayBtn = (ImageButton) this.mBottomPlayRl.findViewById(R.id.play_btn);
this.mPlaySb = (SeekBar) this.mBottomPlayRl.findViewById(R.id.play_sb);
this.mPlaySb.setOnSeekBarChangeListener(this);
this.mMiniPlayBtn.setOnClickListener(this);
this.mCurrentTimeTv = (TextView) this.mBottomPlayRl.findViewById(R.id.time_current_tv);
this.mTotalTimeTv = (TextView) this.mBottomPlayRl.findViewById(R.id.total_time_tv);
showBar(false);
this.nameTv = (TextView) findViewById(R.id.photo_name_tv);
this.mPlayBackIBtn = (ImageButton) findViewById(R.id.media_back_btn);
this.mPlayBackIBtn.setOnClickListener(this);
this.mPlayerView.setOnClickListener(this);
LayoutParams params = new LayoutParams(this.mScreenWidth, this.mDestationHeight);
params.addRule(13);
this.mPlayerView.setLayoutParams(params);
}
public void setDataSource(String url) {
this.mUrl = url;
}
public void onClick(View view) {
if (view.getId() == R.id.play_video_textureview) {
if (this.mTopBarLl.getVisibility() == 0) {
this.mTopBarLl.setVisibility(8);
this.mBottomPlayRl.setVisibility(8);
return;
}
this.mTopBarLl.setVisibility(0);
this.mBottomPlayRl.setVisibility(0);
} else if (view.getId() == R.id.play_btn) {
if (this.playerState == 2) {
seekAndResume(this.mPlaySb.getProgress());
} else if (this.playerState == 0) {
load();
} else {
pause();
}
} else if (view.getId() == R.id.media_back_btn && this.listener != null) {
this.listener.onClickBackBtn();
}
}
private void registerBroadcastReceiver() {
if (this.mScreenEventReciver == null) {
this.mScreenEventReciver = new ScreenEventReciver(this, null);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("android.intent.action.SCREEN_OFF");
intentFilter.addAction("android.intent.action.USER_PRESENT");
getContext().registerReceiver(this.mScreenEventReciver, intentFilter);
}
}
private void unRegisterBroadcastReceiver() {
if (this.mScreenEventReciver != null) {
getContext().unregisterReceiver(this.mScreenEventReciver);
}
}
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i1) {
LogUtil.d(TAG, "onSurfaceTextureAvailable");
this.videoSurface = new Surface(surfaceTexture);
checkMediaPlayer();
this.mediaPlayer.setSurface(this.videoSurface);
load();
}
public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i, int i1) {
LogUtil.d(TAG, "onSurfaceTextureSizeChanged");
}
public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
return false;
}
public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
}
public boolean onTouchEvent(MotionEvent event) {
return true;
}
/* Access modifiers changed, original: protected */
public void onVisibilityChanged(View changedView, int visibility) {
Log.d(TAG, "onVisibilityChanged: " + visibility + "," + this.mMiniPlayBtn.getVisibility());
super.onVisibilityChanged(changedView, visibility);
if (visibility != 0 || this.playerState != 2) {
pause();
} else if (isRealPause() || isComplete()) {
pause();
} else {
resume();
}
}
public void onPrepared(MediaPlayer mediaPlayer) {
LogUtil.i(TAG, "onPrepare");
showPlayView();
this.mPlaySb.setMax(getDuration());
this.mTotalTimeTv.setText(setTimeFormatter(getDuration()));
this.mediaPlayer = mediaPlayer;
if (this.mediaPlayer != null) {
mediaPlayer.setOnBufferingUpdateListener(this);
this.mCurrentCount = 0;
if (this.listener != null) {
this.listener.onAdVideoLoadSuccess();
}
setCurrentPlayState(2);
resume();
}
}
public void onCompletion(MediaPlayer mp) {
LogUtil.i(TAG, "onCompletion");
if (this.listener != null) {
this.listener.onAdVideoLoadComplete();
}
playBack();
setIsComplete(true);
setIsRealPause(true);
}
public boolean onInfo(MediaPlayer mediaPlayer, int i, int i1) {
return false;
}
public boolean onError(MediaPlayer mp, int what, int extra) {
LogUtil.i(TAG, "do error:" + what + ",extra:" + extra);
this.playerState = 1;
this.mediaPlayer = mp;
if (this.mediaPlayer != null) {
this.mediaPlayer.reset();
}
if (this.mCurrentCount >= 3) {
showPauseView(false);
if (this.listener != null) {
this.listener.onAdVideoLoadFailed();
}
}
stop();
return false;
}
public void load() {
LogUtil.i(TAG, "load:" + this.mUrl);
if (this.playerState == 0) {
showLoadingView();
try {
setCurrentPlayState(0);
checkMediaPlayer();
mute(true);
this.mediaPlayer.setDataSource(this.mUrl);
this.nameTv.setText(this.mUrl.substring(this.mUrl.lastIndexOf("/") + 1));
this.mediaPlayer.prepareAsync();
} catch (Exception e) {
e.printStackTrace();
stop();
}
}
}
public void stop() {
LogUtil.i(TAG, "do stop");
if (this.mediaPlayer != null) {
this.mediaPlayer.reset();
this.mediaPlayer.setOnSeekCompleteListener(null);
this.mediaPlayer.stop();
this.mediaPlayer.release();
this.mediaPlayer = null;
}
this.mHandler.removeCallbacksAndMessages(null);
setCurrentPlayState(0);
if (this.mCurrentCount <= 3) {
this.mCurrentCount++;
load();
return;
}
showPauseView(false);
}
public void pause() {
if (this.playerState == 1) {
LogUtil.i(TAG, "do full pause");
setCurrentPlayState(2);
if (isPlaying()) {
this.mediaPlayer.pause();
if (!this.canPlay) {
this.mediaPlayer.seekTo(0);
}
}
showPauseView(false);
this.mHandler.removeCallbacksAndMessages(null);
}
}
public void resume() {
if (this.playerState == 2) {
mute(false);
LogUtil.i(TAG, "resume");
if (isPlaying()) {
showPauseView(false);
return;
}
entryResumeState();
this.mediaPlayer.setOnSeekCompleteListener(null);
this.mediaPlayer.start();
this.mHandler.sendEmptyMessage(1);
showPauseView(true);
}
}
public void destory() {
LogUtil.i(TAG, "do destory");
if (this.mediaPlayer != null) {
this.mediaPlayer.setOnSeekCompleteListener(null);
this.mediaPlayer.stop();
this.mediaPlayer.release();
this.mediaPlayer = null;
}
setCurrentPlayState(0);
this.mCurrentCount = 0;
setIsComplete(false);
setIsRealPause(false);
unRegisterBroadcastReceiver();
this.mHandler.removeCallbacksAndMessages(null);
showPauseView(false);
}
public void playBack() {
LogUtil.i(TAG, " do play back");
setCurrentPlayState(2);
this.mHandler.removeCallbacksAndMessages(null);
if (this.mediaPlayer != null) {
this.mediaPlayer.setOnSeekCompleteListener(null);
this.mediaPlayer.seekTo(0);
this.mediaPlayer.pause();
}
showPauseView(false);
}
private void setCurrentPlayState(int state) {
this.playerState = state;
}
public boolean isPlaying() {
if (this.mediaPlayer == null || !this.mediaPlayer.isPlaying()) {
return false;
}
return true;
}
private synchronized void checkMediaPlayer() {
if (this.mediaPlayer == null) {
this.mediaPlayer = createMediaPlayer();
}
}
private MediaPlayer createMediaPlayer() {
this.mediaPlayer = new MediaPlayer();
this.mediaPlayer.reset();
this.mediaPlayer.setOnPreparedListener(this);
this.mediaPlayer.setOnCompletionListener(this);
this.mediaPlayer.setOnInfoListener(this);
this.mediaPlayer.setOnErrorListener(this);
this.mediaPlayer.setAudioStreamType(3);
if (this.videoSurface == null || !this.videoSurface.isValid()) {
stop();
} else {
this.mediaPlayer.setSurface(this.videoSurface);
}
return this.mediaPlayer;
}
private void entryResumeState() {
this.canPlay = true;
setCurrentPlayState(1);
setIsRealPause(false);
setIsComplete(false);
}
public void setIsComplete(boolean isComplete) {
this.mIsComplete = isComplete;
}
public void setIsRealPause(boolean isRealPause) {
this.mIsRealPause = isRealPause;
}
public void mute(boolean mute) {
this.isMute = mute;
if (this.mediaPlayer != null && this.audioManager != null) {
float volume = this.isMute ? 0.0f : 1.0f;
this.mediaPlayer.setVolume(volume, volume);
}
}
public void seekAndResume(int position) {
if (this.mediaPlayer != null) {
showPauseView(true);
entryResumeState();
this.mediaPlayer.seekTo(position);
this.mediaPlayer.setOnSeekCompleteListener(new OnSeekCompleteListener() {
public void onSeekComplete(MediaPlayer mp) {
LogUtil.d(CustomVideoView.TAG, "do seek and resume");
CustomVideoView.this.mediaPlayer.start();
CustomVideoView.this.mHandler.sendEmptyMessage(1);
}
});
}
}
public void seekAndPause(int position) {
if (this.playerState == 1) {
showPauseView(false);
setCurrentPlayState(2);
if (isPlaying()) {
this.mediaPlayer.seekTo(position);
this.mediaPlayer.setOnSeekCompleteListener(new OnSeekCompleteListener() {
public void onSeekComplete(MediaPlayer mp) {
LogUtil.d(CustomVideoView.TAG, "do seek and pause");
CustomVideoView.this.mediaPlayer.pause();
CustomVideoView.this.mHandler.removeCallbacksAndMessages(null);
}
});
}
}
}
private void showPauseView(boolean show) {
this.mLoadingBar.setVisibility(8);
this.mMiniPlayBtn.setImageResource(show ? R.drawable.album_btn_pause_media : R.drawable.album_icon_play_media);
}
private void showLoadingView() {
this.mLoadingBar.setVisibility(0);
this.mMiniPlayBtn.setImageResource(R.drawable.album_icon_play_media);
this.showTopBottomBarTime = 0;
}
private void showPlayView() {
this.mLoadingBar.setVisibility(8);
this.mMiniPlayBtn.setImageResource(R.drawable.album_btn_pause_media);
this.showTopBottomBarTime = 0;
}
private void showBar(boolean isShow) {
int i;
int i2 = 0;
LinearLayout linearLayout = this.mTopBarLl;
if (isShow) {
i = 0;
} else {
i = 8;
}
linearLayout.setVisibility(i);
RelativeLayout relativeLayout = this.mBottomPlayRl;
if (!isShow) {
i2 = 8;
}
relativeLayout.setVisibility(i2);
}
public int getCurrentPosition() {
if (this.mediaPlayer != null) {
return this.mediaPlayer.getCurrentPosition();
}
return -1;
}
public int getDuration() {
if (this.mediaPlayer != null) {
return this.mediaPlayer.getDuration();
}
return -1;
}
private String setTimeFormatter(int timeMs) {
int totalSeconds = timeMs / 1000;
int seconds = totalSeconds % 60;
int minutes = (totalSeconds / 60) % 60;
int hours = totalSeconds / 3600;
this.mFormatBuilder.setLength(0);
if (hours > 0) {
return this.mFormatter.format("%d:%02d:%02d", new Object[]{Integer.valueOf(hours), Integer.valueOf(minutes), Integer.valueOf(seconds)}).toString();
}
return this.mFormatter.format("%02d:%02d", new Object[]{Integer.valueOf(minutes), Integer.valueOf(seconds)}).toString();
}
public boolean isRealPause() {
return this.mIsRealPause;
}
public boolean isComplete() {
return this.mIsComplete;
}
public void onBufferingUpdate(MediaPlayer mediaPlayer, int i) {
}
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (fromUser) {
LogUtil.i(TAG, "onProgressChanged:" + this.isUpdateProgressed);
this.isUpdateProgressed = true;
this.showTopBottomBarTime = 0;
this.mCurrentTimeTv.setText(setTimeFormatter(seekBar.getProgress()));
}
}
public void onStartTrackingTouch(SeekBar seekBar) {
LogUtil.i(TAG, "onStartTrackingTouch:" + this.isUpdateProgressed);
this.isUpdateProgressed = true;
this.showTopBottomBarTime = 0;
}
public void onStopTrackingTouch(SeekBar seekBar) {
LogUtil.i(TAG, "onStopTrackingTouch:" + this.isUpdateProgressed);
this.isUpdateProgressed = false;
if (this.playerState == 1) {
seekAndResume(seekBar.getProgress());
}
}
public void setListener(VideoPlayerListener listener) {
this.listener = listener;
}
}
| [
"[email protected]"
] | |
29cc013f6119244e8113eee8fadf19be85fef42e | cab20f5d0bc94f5b2db00f5000482b316e5a5522 | /src/main/java/com/youngxpepp/instagramcloneserver/global/error/ErrorCode.java | 80aa408532b7aa8ff637fc12b0a6d6635457af53 | [] | no_license | leesangsuk-cloud/instagram-clone-server | afbf8cd459f9750b75f918e95a9abe9509e34e91 | 9692692ddc99a0bbbee07a2aaacbe2a72eeba0ea | refs/heads/master | 2023-04-03T13:11:41.177142 | 2021-04-15T07:47:43 | 2021-04-15T07:47:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,823 | java | package com.youngxpepp.instagramcloneserver.global.error;
import lombok.Getter;
import org.springframework.http.HttpStatus;
@Getter
public enum ErrorCode {
INVALID_INPUT_VALUE(1000, HttpStatus.BAD_REQUEST, "Invalid input value"),
METHOD_NOT_ALLOWED(1001, HttpStatus.METHOD_NOT_ALLOWED, "Method is not allowed"),
ENTITY_NOT_FOUND(1002, HttpStatus.NOT_FOUND, "Entity is not found"),
INTERNAL_SERVER_ERROR(1003, HttpStatus.INTERNAL_SERVER_ERROR, "Internal server error"),
INVALID_TYPE_VALUE(1004, HttpStatus.BAD_REQUEST, "Invalid type value"),
HANDLE_ACCESS_DENIED(1005, HttpStatus.FORBIDDEN, "Access is denied"),
ENTITY_ALREADY_EXIST(1006, HttpStatus.BAD_REQUEST, "Entity already exists"),
// Authentication
AUTHENTICATION_FAILED(2000, HttpStatus.BAD_REQUEST, "Authentication is failed"),
JWT_EXPIRED(2001, HttpStatus.BAD_REQUEST, "JsonWebToken is expired"),
NO_AUTHORIZATION(2003, HttpStatus.FORBIDDEN, "No authorization in header"),
JWT_NO_PREFIX(2004, HttpStatus.BAD_REQUEST, "No prefix in jwt"),
JWT_MALFORMED(2005, HttpStatus.BAD_REQUEST, "JsonWebToken is malformed"),
JWT_SIG_INVALID(2006, HttpStatus.BAD_REQUEST, "JsonWebToken signature is invalid"),
JWT_UNSUPPORTED(2007, HttpStatus.BAD_REQUEST, "JsonWebToken format is unsupported"),
JWT_EXCEPTION(2008, HttpStatus.BAD_REQUEST, "JsonWebToken has a problem"),
WRONG_PASSWORD(2009, HttpStatus.BAD_REQUEST, "Password is wrong");
private final int code;
private final HttpStatus httpStatus;
private final String message;
ErrorCode(int code, HttpStatus httpStatus, String message) {
this.code = code;
this.httpStatus = httpStatus;
this.message = message;
}
public static ErrorCode resolve(int code) {
for (ErrorCode element : ErrorCode.values()) {
if (element.getCode() == code) {
return element;
}
}
return null;
}
}
| [
"[email protected]"
] | |
8adcf8c78b5769b3f19fe83491ed540c0f625d04 | 1cc621f0cf10473b96f10fcb5b7827c710331689 | /Ex6/Procyon/com/jogamp/common/util/RunnableExecutor.java | 0f56e557f673251378dfe3f9d65971ab4353799e | [] | no_license | nitaiaharoni1/Introduction-to-Computer-Graphics | eaaa16bd2dba5a51f0f7442ee202a04897cbaa1f | 4467d9f092c7e393d9549df9e10769a4b07cdad4 | refs/heads/master | 2020-04-28T22:56:29.061748 | 2019-06-06T18:55:51 | 2019-06-06T18:55:51 | 175,635,562 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 484 | java | //
// Decompiled by Procyon v0.5.30
//
package com.jogamp.common.util;
public interface RunnableExecutor
{
public static final RunnableExecutor currentThreadExecutor = new CurrentThreadExecutor();
void invoke(final boolean p0, final Runnable p1);
public static class CurrentThreadExecutor implements RunnableExecutor
{
@Override
public void invoke(final boolean b, final Runnable runnable) {
runnable.run();
}
}
}
| [
"[email protected]"
] | |
50d058d6694f851be1d910d665488058e6294404 | 03518d7dc5c799c7db419f3ad7fa15a3a8fe2af6 | /src/main/java/com/sri/ai/expresso/helper/FunctionApplicationContainsArgumentSatisfying.java | d8a3a5cbc0caa712d894c1b8d1162a08e39b6cc6 | [
"BSD-3-Clause"
] | permissive | aic-sri-international/aic-expresso | 35b158baee37fa832b9877c057a1cb6ae3d2f7a9 | 01b0bbc33c2ad37fea12a645cbc6105abc7e5352 | refs/heads/master | 2021-01-23T18:24:18.454471 | 2018-11-01T06:59:38 | 2018-11-01T06:59:38 | 35,304,890 | 9 | 1 | BSD-3-Clause | 2020-10-13T10:06:31 | 2015-05-08T22:27:48 | Java | UTF-8 | Java | false | false | 2,577 | java | /*
* Copyright (c) 2013, SRI International
* All rights reserved.
* Licensed under the The BSD 3-Clause License;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://opensource.org/licenses/BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of the aic-expresso nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.sri.ai.expresso.helper;
import com.google.common.annotations.Beta;
import com.google.common.base.Predicate;
import com.sri.ai.expresso.api.Expression;
import com.sri.ai.util.Util;
/**
* Indicates whether a given expression, assumed to be a function application,
* has an argument satisfying a given predicate.
*/
@Beta
public class FunctionApplicationContainsArgumentSatisfying implements Predicate<Expression> {
private Predicate<Expression> base;
public FunctionApplicationContainsArgumentSatisfying(Predicate<Expression> base) {
super();
this.base = base;
}
@Override
public boolean apply(Expression input) {
boolean result = Util.thereExists(input.getArguments(), base);
return result;
}
} | [
"[email protected]@3d43a1d2-4736-3da3-5e10-20935d0d7c2c"
] | [email protected]@3d43a1d2-4736-3da3-5e10-20935d0d7c2c |
2e5a0eeb6504e6f8361f3f8ef328aaf28bde7a55 | 97d8cb35e0648aa25708146f4cefd4661cdda71a | /Zadanie03_game/src/StrangeWorld.java | 14092467264d49b72d91dde8b4c69f8206278bfe | [] | no_license | JakubKosmaty/java | 5a23e9465344020bcf9f74cee29e00f53f8c5791 | ce3251ade2dbfdc27870d6e5870298fde15fbdc4 | refs/heads/main | 2023-02-27T20:35:24.673052 | 2021-02-03T22:09:27 | 2021-02-03T22:09:27 | 306,304,941 | 0 | 0 | null | 2020-10-22T12:41:41 | 2020-10-22T10:43:23 | Java | UTF-8 | Java | false | false | 4,959 | java | public class StrangeWorld implements StrangeWorldInterface{
private PhysicsInterface[] physicsInterface;
private int mapSize;
@Override
public void setSize(int size) {
if (size <= 0) {
return;
}
mapSize = size;
physicsInterface = new PhysicsInterface[mapSize * mapSize];
}
private boolean fallDown(int row, int col) {
int blockIndex = getIndex(row, col);
boolean hasFall = false;
while (row >= 0) {
blockIndex = getIndex(row, col);
PhysicsInterface block = physicsInterface[blockIndex];
if (block.canFloatInTheAirWithoutSupport() && !block.willFallIfNotSupportedFromBelow()) {
return false;
}
if (block.willFallIfNotSupportedFromBelow()) {
if (row == 0) {
physicsInterface[blockIndex] = null;
return true;
}
if (physicsInterface[getIndex(row - 1, col)] != null) {
return hasFall;
}
} else if (blockHasNeighbor(row, col)) {
return hasFall;
}
if (row == 0) {
physicsInterface[blockIndex] = null;
return hasFall;
}
hasFall = true;
physicsInterface[getIndex(row - 1, col)] = physicsInterface[blockIndex];
physicsInterface[blockIndex] = null;
row -= 1;
}
return hasFall;
}
// 0 - Right 1 - Left 2 - Up 3 - Down
private int blockGetNeighbor(int dir, int row, int col) {
int index = -1;
int dRow = 0;
int dCol = 0;
if (dir == 0) {
dCol = 1;
} else if (dir == 1) {
dCol = -1;
} else if (dir == 2) {
dRow = 1;
} else if (dir == 3) {
dRow = -1;
} else {
return -1;
}
int neighbourRow = row + dRow;
int neighbourCol = col + dCol;
if (neighbourRow >= mapSize || neighbourRow < 0 || neighbourCol >= mapSize || neighbourCol < 0) {
return -1;
}
return getIndex(neighbourRow, neighbourCol);
}
private boolean blockHasNeighbor(int row, int col) {
for (int i = 0; i < 4; i++) {
int index = blockGetNeighbor(i, row, col);
if (index != -1 && !isIndexAvailable(index)) {
return true;
}
}
return false;
}
private void checkBlock(int row, int col) {
for (int i = 0; i < 4; i++) {
int neighborIndex = blockGetNeighbor(i, row, col);
if (neighborIndex != -1 && !isIndexAvailable(neighborIndex)) {
if (fallDown(getRow(neighborIndex), getCol(neighborIndex))) {
checkBlock(getRow(neighborIndex), getCol(neighborIndex));
break;
}
}
}
}
@Override
public boolean tryAdd(int row, int col, PhysicsInterface block) {
int index = getIndex(row, col);
if (!isIndexAvailable(index)) {
return false;
}
if (block.mustBeSupportedFromAnySideToBePlaced()) {
if (!blockHasNeighbor(row, col)) {
return false;
}
}
if (block.canFloatInTheAirWithoutSupport() && !block.willFallIfNotSupportedFromBelow()) {
physicsInterface[index] = block;
return true;
}
physicsInterface[index] = block;
fallDown(row, col);
return true;
}
@Override
public PhysicsInterface delAndGet(int row, int col) {
int index = getIndex(row, col);
if (isIndexAvailable(index)) {
return null;
}
PhysicsInterface block = physicsInterface[index];
physicsInterface[index] = null;
checkBlock(row, col);
return block;
}
@Override
public PhysicsInterface get(int row, int col) {
return physicsInterface[getIndex(row, col)];
}
private boolean isIndexAvailable(int index) {
return (physicsInterface[index] == null);
}
private int getRow(int index) {
return (int)index / mapSize;
}
private int getCol(int index) {
return (int)index % mapSize;
}
private int getIndex(int row, int col) {
return row * mapSize + col;
}
public void printMap() {
for (int x = 0; x < mapSize; x++) {
for (int y = 0; y < mapSize; y++) {
int index = x * mapSize + y;
if (physicsInterface[index] == null) {
System.out.print("0");
} else {
System.out.print("1");
}
System.out.print(" ");
}
System.out.println();
}
System.out.println("----------------------");
}
}
| [
"[email protected]"
] | |
d90bee46b1b4db6a0569315194a26e56182a3fa5 | 08be78ee28957fe393bea727228fbe13e5c00df1 | /modules/webcloud/modules/webcloud-pseudocode/src/main/java/com/pseudocode/cloud/zuul/filters/pre/PreDecorationFilter.java | 06b9cf3bca824c2a1b300ce9a7016e4e02c794ce | [] | no_license | javachengwc/java-apply | 432259eadfca88c6f3f2b80aae8e1e8a93df5159 | 98a45c716f18657f0e4181d0c125a73feb402b16 | refs/heads/master | 2023-08-22T12:30:05.708710 | 2023-08-15T08:21:15 | 2023-08-15T08:21:15 | 54,971,501 | 10 | 4 | null | 2022-12-16T11:03:56 | 2016-03-29T11:50:21 | Java | UTF-8 | Java | false | false | 12,283 | java | package com.pseudocode.cloud.zuul.filters.pre;
import java.net.MalformedURLException;
import java.net.URL;
import javax.servlet.http.HttpServletRequest;
import com.pseudocode.cloud.zuul.filters.Route;
import com.pseudocode.cloud.zuul.filters.RouteLocator;
import com.pseudocode.cloud.zuul.filters.ZuulProperties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.util.StringUtils;
import org.springframework.web.util.UrlPathHelper;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.FORWARD_LOCATION_PREFIX;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.FORWARD_TO_KEY;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.HTTPS_PORT;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.HTTPS_SCHEME;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.HTTP_PORT;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.HTTP_SCHEME;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.PRE_DECORATION_FILTER_ORDER;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.PRE_TYPE;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.PROXY_KEY;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.REQUEST_URI_KEY;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.RETRYABLE_KEY;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.SERVICE_HEADER;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.SERVICE_ID_HEADER;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.SERVICE_ID_KEY;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.X_FORWARDED_FOR_HEADER;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.X_FORWARDED_HOST_HEADER;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.X_FORWARDED_PORT_HEADER;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.X_FORWARDED_PREFIX_HEADER;
import static com.pseudocode.cloud.zuul.filters.support.FilterConstants.X_FORWARDED_PROTO_HEADER;
//PreDecorationFilter是pre最重要的过滤器
//该过滤器为当前请求做一些预处理,比如说,进行路由规则的匹配,在请求上下文中设置该请求的基本信息以及将路由匹配结果等一些设置信息等,
//这些信息将是后续过滤器进行处理的重要依据,可以通过RequestContext.getCurrentContext()来访问这些信息。
//另外,还对HTTP头请求进行处理,其中包含了一些头域,比如X-Forwarded-Host,X-Forwarded-Port。
//对于这些头域是通过zuul.addProxyHeaders参数进行控制的,而这个参数默认值是true,
//所以zuul在请求跳转时默认会为请求增加X-Forwarded-*头域,包括X-Forwarded-Host,X-Forwarded-Port,X-Forwarded-For,X-Forwarded-Prefix,X-Forwarded-Proto。
public class PreDecorationFilter extends ZuulFilter {
private static final Log log = LogFactory.getLog(PreDecorationFilter.class);
@Deprecated
public static final int FILTER_ORDER = PRE_DECORATION_FILTER_ORDER;
private RouteLocator routeLocator;
private String dispatcherServletPath;
private ZuulProperties properties;
private UrlPathHelper urlPathHelper = new UrlPathHelper();
private ProxyRequestHelper proxyRequestHelper;
public PreDecorationFilter(RouteLocator routeLocator, String dispatcherServletPath, ZuulProperties properties,
ProxyRequestHelper proxyRequestHelper) {
this.routeLocator = routeLocator;
this.properties = properties;
this.urlPathHelper.setRemoveSemicolonContent(properties.isRemoveSemicolonContent());
this.dispatcherServletPath = dispatcherServletPath;
this.proxyRequestHelper = proxyRequestHelper;
}
@Override
public int filterOrder() {
return PRE_DECORATION_FILTER_ORDER;
}
@Override
public String filterType() {
return PRE_TYPE;
}
@Override
public boolean shouldFilter() {
RequestContext ctx = RequestContext.getCurrentContext();
return !ctx.containsKey(FORWARD_TO_KEY) // a filter has already forwarded
&& !ctx.containsKey(SERVICE_ID_KEY); // a filter has already determined serviceId
}
@Override
public Object run() {
RequestContext ctx = RequestContext.getCurrentContext();
final String requestURI = this.urlPathHelper.getPathWithinApplication(ctx.getRequest());
//路由规则的匹配Route
Route route = this.routeLocator.getMatchingRoute(requestURI);
if (route != null) {
String location = route.getLocation();
if (location != null) {
ctx.put(REQUEST_URI_KEY, route.getPath());
ctx.put(PROXY_KEY, route.getId());
//是否添加敏感头信息
if (!route.isCustomSensitiveHeaders()) {
this.proxyRequestHelper.addIgnoredHeaders(this.properties.getSensitiveHeaders().toArray(new String[0]));
}
else {
this.proxyRequestHelper.addIgnoredHeaders(route.getSensitiveHeaders().toArray(new String[0]));
}
if (route.getRetryable() != null) {
ctx.put(RETRYABLE_KEY, route.getRetryable());
}
if (location.startsWith(HTTP_SCHEME+":") || location.startsWith(HTTPS_SCHEME+":")) {
ctx.setRouteHost(getUrl(location));
ctx.addOriginResponseHeader(SERVICE_HEADER, location);
}
else if (location.startsWith(FORWARD_LOCATION_PREFIX)) {
ctx.set(FORWARD_TO_KEY,
StringUtils.cleanPath(location.substring(FORWARD_LOCATION_PREFIX.length()) + route.getPath()));
ctx.setRouteHost(null);
return null;
}
else {
// set serviceId for use in filters.route.RibbonRequest
//微服务
ctx.set(SERVICE_ID_KEY, location);
ctx.setRouteHost(null);
ctx.addOriginResponseHeader(SERVICE_ID_HEADER, location);
}
//是否添加代理头
if (this.properties.isAddProxyHeaders()) {
addProxyHeaders(ctx, route);
String xforwardedfor = ctx.getRequest().getHeader(X_FORWARDED_FOR_HEADER);
String remoteAddr = ctx.getRequest().getRemoteAddr();
if (xforwardedfor == null) {
xforwardedfor = remoteAddr;
}
else if (!xforwardedfor.contains(remoteAddr)) { // Prevent duplicates
xforwardedfor += ", " + remoteAddr;
}
ctx.addZuulRequestHeader(X_FORWARDED_FOR_HEADER, xforwardedfor);
}
//添加host头
if (this.properties.isAddHostHeader()) {
ctx.addZuulRequestHeader(HttpHeaders.HOST, toHostHeader(ctx.getRequest()));
}
}
}
else {
//Route为null,进行相应的fallback处理
log.warn("No route found for uri: " + requestURI);
String fallBackUri = requestURI;
String fallbackPrefix = this.dispatcherServletPath; // default fallback
// servlet is
// DispatcherServlet
if (RequestUtils.isZuulServletRequest()) {
// remove the Zuul servletPath from the requestUri
log.debug("zuulServletPath=" + this.properties.getServletPath());
fallBackUri = fallBackUri.replaceFirst(this.properties.getServletPath(), "");
log.debug("Replaced Zuul servlet path:" + fallBackUri);
}
else {
// remove the DispatcherServlet servletPath from the requestUri
log.debug("dispatcherServletPath=" + this.dispatcherServletPath);
fallBackUri = fallBackUri.replaceFirst(this.dispatcherServletPath, "");
log.debug("Replaced DispatcherServlet servlet path:" + fallBackUri);
}
if (!fallBackUri.startsWith("/")) {
fallBackUri = "/" + fallBackUri;
}
String forwardURI = fallbackPrefix + fallBackUri;
forwardURI = forwardURI.replaceAll("//", "/");
ctx.set(FORWARD_TO_KEY, forwardURI);
}
return null;
}
private void addProxyHeaders(RequestContext ctx, Route route) {
HttpServletRequest request = ctx.getRequest();
String host = toHostHeader(request);
String port = String.valueOf(request.getServerPort());
String proto = request.getScheme();
if (hasHeader(request, X_FORWARDED_HOST_HEADER)) {
host = request.getHeader(X_FORWARDED_HOST_HEADER) + "," + host;
}
if (!hasHeader(request, X_FORWARDED_PORT_HEADER)) {
if (hasHeader(request, X_FORWARDED_PROTO_HEADER)) {
StringBuilder builder = new StringBuilder();
for (String previous : StringUtils.commaDelimitedListToStringArray(request.getHeader(X_FORWARDED_PROTO_HEADER))) {
if (builder.length()>0) {
builder.append(",");
}
builder.append(HTTPS_SCHEME.equals(previous) ? HTTPS_PORT : HTTP_PORT);
}
builder.append(",").append(port);
port = builder.toString();
}
} else {
port = request.getHeader(X_FORWARDED_PORT_HEADER) + "," + port;
}
if (hasHeader(request, X_FORWARDED_PROTO_HEADER)) {
proto = request.getHeader(X_FORWARDED_PROTO_HEADER) + "," + proto;
}
ctx.addZuulRequestHeader(X_FORWARDED_HOST_HEADER, host);
ctx.addZuulRequestHeader(X_FORWARDED_PORT_HEADER, port);
ctx.addZuulRequestHeader(X_FORWARDED_PROTO_HEADER, proto);
addProxyPrefix(ctx, route);
}
private boolean hasHeader(HttpServletRequest request, String name) {
return StringUtils.hasLength(request.getHeader(name));
}
private void addProxyPrefix(RequestContext ctx, Route route) {
String forwardedPrefix = ctx.getRequest().getHeader(X_FORWARDED_PREFIX_HEADER);
String contextPath = ctx.getRequest().getContextPath();
String prefix = StringUtils.hasLength(forwardedPrefix) ? forwardedPrefix
: (StringUtils.hasLength(contextPath) ? contextPath : null);
if (StringUtils.hasText(route.getPrefix())) {
StringBuilder newPrefixBuilder = new StringBuilder();
if (prefix != null) {
if (prefix.endsWith("/") && route.getPrefix().startsWith("/")) {
newPrefixBuilder.append(prefix, 0, prefix.length() - 1);
}
else {
newPrefixBuilder.append(prefix);
}
}
newPrefixBuilder.append(route.getPrefix());
prefix = newPrefixBuilder.toString();
}
if (prefix != null) {
ctx.addZuulRequestHeader(X_FORWARDED_PREFIX_HEADER, prefix);
}
}
private String toHostHeader(HttpServletRequest request) {
int port = request.getServerPort();
if ((port == HTTP_PORT && HTTP_SCHEME.equals(request.getScheme()))
|| (port == HTTPS_PORT && HTTPS_SCHEME.equals(request.getScheme()))) {
return request.getServerName();
}
else {
return request.getServerName() + ":" + port;
}
}
private URL getUrl(String target) {
try {
return new URL(target);
}
catch (MalformedURLException ex) {
throw new IllegalStateException("Target URL is malformed", ex);
}
}
}
| [
"[email protected]"
] | |
d7ef70c9a0541501cca7a3ec10d3a25cd6abe6f5 | 5aa5db9516419cec1c28846a3e8ee5905f6425d7 | /app/src/main/java/com/malcolm/portsmouthunibus/ui/timetable/TimetableViewModel.java | 648c6671b3c1f45d7299f174f92a11f07ba82282 | [] | no_license | malodita/portsunibusandroid | 27ebf5e7b09c86dc245aa500b1892f3ad42b9e91 | fb8ae060d9d18aee595c448ff78263efb14628e0 | refs/heads/master | 2021-01-11T21:58:28.925500 | 2018-08-28T13:08:29 | 2018-08-28T13:08:29 | 78,887,669 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,733 | java | package com.malcolm.portsmouthunibus.ui.timetable;
import android.app.Application;
import com.malcolm.portsmouthunibus.App;
import com.malcolm.unibusutilities.entity.Times;
import com.malcolm.unibusutilities.repository.MainRepository;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MediatorLiveData;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
/**
* The ViewModel
*/
public class TimetableViewModel extends AndroidViewModel {
private final MediatorLiveData<String> countdown;
private MediatorLiveData<List<Times>> timesLiveData;
private MainRepository repository;
private TimetableViewModel(@NonNull Application application, int stop, boolean is24Hours) {
super(application);
repository = ((App) application).getMainRepository();
timesLiveData = new MediatorLiveData<>();
timesLiveData.addSource(repository.findListOfTimesForStop(stop, is24Hours), timesLiveData::setValue);
countdown = new MediatorLiveData<>();
countdown.addSource(repository.getTimetableCountdown(), countdown::setValue);
if (is24Hours) {
repository.fetchListForTimetableCountdown(stop - 1, MainRepository.TWENTYFOUR_HOUR);
} else {
repository.fetchListForTimetableCountdown(stop - 1, MainRepository.TWELVE_HOUR);
}
}
/**
* Fetches a new list of times for an individual bus stop.
* @param stop Id of stop
* @param is24Hours If should be reported in 12 or 24 hour format
*/
void changeListOfStops(int stop, boolean is24Hours){
repository.findListOfTimesForStop(stop, is24Hours);
}
/**
* Exposes the LiveData for monitoring the current list of stop times.
* @return An array of Times suitable for use in a recyclerview
*/
LiveData<List<Times>> getData() {
return timesLiveData;
}
/**
* Exposes the current countdown until the next bus for observation
*
* @return The LiveData representing the countdown. A single string representing the time
*/
LiveData<String> getCurrentCountdown() {
return countdown;
}
/**
* Causes the {@link MainRepository} to fetch the times for a new stop. The LiveData exposed in
* {@link #getCurrentCountdown()} is updated automatically.
* @param stop The new stop to observe. This will always -1 to make it work correctly due to
* the manual get method starting from 0 in the database (Representing eastney)
*/
void updateStopList(int stop, boolean is24Hours){
if (is24Hours) {
repository.fetchListForTimetableCountdown(stop - 1, MainRepository.TWENTYFOUR_HOUR);
} else {
repository.fetchListForTimetableCountdown(stop - 1, MainRepository.TWELVE_HOUR);
} }
@Override
protected void onCleared() {
repository.stopObservingTimetableStop();
super.onCleared();
}
public static class Factory extends ViewModelProvider.NewInstanceFactory{
@NonNull
private final Application application;
private final boolean is24Hours;
private final int stop;
Factory(@NonNull Application application, boolean is24Hours, int stop) {
this.application = application;
this.is24Hours = is24Hours;
this.stop = stop;
}
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
//noinspection unchecked
return (T) new TimetableViewModel(application, stop, is24Hours);
}
}
}
| [
"[email protected]"
] | |
5856a9790d9e7a4b0c1a00470449234cd86f090e | 741f751c0475eb1a86b46fa449810f7eb3f3d86a | /v2/googlecloud-to-googlecloud/src/main/java/com/google/cloud/teleport/v2/values/PartitionMetadata.java | 34bd28b12910e7cf84a44c212b7e585eabf43801 | [
"Apache-2.0"
] | permissive | mkuthan/DataflowTemplates | 7f844f349cfc589cb899b90de700175975812442 | 0f2353979e797b811727953d3149f50531d87048 | refs/heads/master | 2022-05-21T01:34:52.726207 | 2022-05-05T13:45:52 | 2022-05-05T13:46:26 | 226,102,831 | 0 | 0 | Apache-2.0 | 2019-12-05T12:58:23 | 2019-12-05T12:58:22 | null | UTF-8 | Java | false | false | 2,047 | java | /*
* Copyright (C) 2021 Google LLC
*
* 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.google.cloud.teleport.v2.values;
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
import com.google.api.services.dataplex.v1.model.GoogleCloudDataplexV1Partition;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import java.io.Serializable;
/**
* Partition metadata for Dataplex.
*
* <p>All values are necessary.
*/
@AutoValue
public abstract class PartitionMetadata implements Serializable {
public abstract String location();
public abstract ImmutableList<String> values();
public static Builder builder() {
return new AutoValue_PartitionMetadata.Builder();
}
public GoogleCloudDataplexV1Partition toDataplexPartition() {
return new GoogleCloudDataplexV1Partition().setLocation(location()).setValues(values());
}
/** Builder for {@link PartitionMetadata}. */
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder setLocation(String value);
public abstract Builder setValues(ImmutableList<String> value);
abstract PartitionMetadata autoBuild();
public PartitionMetadata build() {
PartitionMetadata metadata = autoBuild();
checkState(!metadata.location().isEmpty(), "Location cannot be empty");
ImmutableList<String> values = metadata.values();
checkState(!values.isEmpty(), "Values cannot be empty");
return metadata;
}
}
}
| [
"[email protected]"
] | |
5103b98279a42ce772ca88df47831093651ca8e7 | 89f9784a63188126ec0be0eed42fc8f5aa558420 | /src/test/java/com/udemy/uat/stepdefs/SignUpStepDefinitions.java | 1373ba2218dbeb83f1a333f86f7a92ad7eee838d | [] | no_license | cgrkhrmn/UdemyMentoringMac | 5f5f6ef55fead780c986e1f44c840cb9dfc7b142 | 35a2bca444cd67394ae929b71248a50e7a36fd9c | refs/heads/master | 2021-07-05T20:54:05.945114 | 2017-09-27T20:15:06 | 2017-09-27T20:15:06 | 105,060,123 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,729 | java | package com.udemy.uat.stepdefs;
import java.util.Random;
import java.util.Scanner;
import java.util.concurrent.TimeUnit;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import com.udemy.uat.pages.HomePage;
import com.udemy.uat.utilities.ConfigurationReader;
import com.udemy.uat.utilities.Driver;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class SignUpStepDefinitions {
WebDriver driver = Driver.getInstance();
HomePage homePage=new HomePage();
String name;
String fullName;
@Given("^udemy homepage$")
public void udemy_homepage() throws Throwable {
Driver.getInstance().get(ConfigurationReader.getProperty("url"));
Driver.getInstance().manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);
}
@When("^user click sign up button$")
public void user_click_sign_up_button() throws Throwable {
homePage.signUpButton.click();
}
@When("^provide a fullname valid email and password$")
public void provide_a_fullname_valid_email_and_password() throws Throwable {
//Random number created for email uniqueness
Random rand = new Random();
int n = rand.nextInt(5000) + 1;
//Program is asking your name input
// Scanner scan=new Scanner(System.in);
// System.out.println("What is your full name?");
// name=scan.nextLine();
String names[] = {"Jhonny", "Edurardo", "Francis", "Franklin", "Freedy", "Cagcag", "Pranav", "Naci"};
String lastNames[] = {"Jhon", "Edurar", "Frank", "Frankline", "FreedyMac", "Cagcs", "Pranavoc", "Nacika"};
String randomName=names[new Random().nextInt(names.length)];
String randomLastName=lastNames[new Random().nextInt(lastNames.length)];
//creating an email address base on your name response
//String email=name.replace(" ", "").concat(n+"@gmail.com");
fullName=randomName+" "+randomLastName;
String email=(randomName+randomLastName).concat(n+"@gmail.com");
homePage.fullName.sendKeys(fullName);
homePage.emailId.sendKeys(email);
homePage.password.sendKeys("password1234");
}
@When("^click sign up button$")
public void click_sign_up_button() throws Throwable {
homePage.submitButton.click();
}
@Then("^user should be able to signup successfully$")
public void user_should_be_able_to_signup_successfully() throws Throwable {
WebDriverWait wait=new WebDriverWait(Driver.getInstance(), 20);
wait.until(ExpectedConditions.visibilityOf(homePage.nameAvatar));
//Verify if you are sign up successfully.
Assert.assertEquals(homePage.nameAvatar.getAttribute("aria-label"),fullName);
Thread.sleep(5000);
}
} | [
"[email protected]"
] | |
bc042050cdfca87887d90aeb37fd912612037294 | f4ae768f4a7075bb745af3bba676ac7ffb1be1b1 | /src/TestNGFeatures/SoftAsserts.java | 191b422e6df83c9fd8647211c65a14f8b31bc44a | [] | no_license | yahyagit/MyFirst | f6b9a0bbbb4c7b9775fc66c7aae7d80085ce7994 | f6676e1ba92dad0a58179c8408d035220382081c | refs/heads/master | 2020-03-30T18:25:26.622276 | 2017-07-11T07:25:36 | 2017-07-11T07:25:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 963 | java | package TestNGFeatures;
import org.testng.Assert;
import org.testng.annotations.Test;
import org.testng.asserts.SoftAssert;
public class SoftAsserts {
private SoftAssert softA = new SoftAssert();
@Test(priority=0)
public void testCase1() {
Assert.assertEquals("Msg", "Msg");
System.out.println("Msg");
Assert.assertEquals("Msg1", "Msg1");
System.out.println("Msg1");
}
@Test(priority=1)
public void testCase2() {
Assert.assertEquals("Msg2", "Msg2");
System.out.println("Msg2");
Assert.assertEquals("Msg3", "Msg33");
System.out.println("Msg3");
Assert.assertEquals("Msg4", "Msg4");
System.out.println("Msg4");
}
@Test(priority=2)
public void testCase3() {
Assert.assertEquals("Msg5", "Msg5");
System.out.println("Msg5");
softA.assertEquals("Msg6", "Msg66");
System.out.println("Msg6");
softA.assertEquals("Msg7", "Msg7");
System.out.println("Msg7");
softA.assertAll();
}
}
| [
"[email protected]"
] | |
2fa9b1f9ddb7955a1426d0524b9f74b257982c49 | 31103a55a8df56417108b2d401395e2c07844cb4 | /base/src/au/id/villar/mp3Sorter/id3/frames/ENCR.java | 8aa98bfb4186ed7fbb2577efe08e22398277f06b | [] | no_license | morgano5/morgano-tags | 92fc81eb8040ccbb2dd3b0c3e6dbe80758a23d99 | bba3e3613ee2388b6454617b60aab40ac585669b | refs/heads/master | 2021-01-01T17:56:58.734068 | 2013-06-29T04:17:21 | 2013-06-29T04:17:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,404 | java | package au.id.villar.mp3Sorter.id3.frames;
import au.id.villar.mp3Sorter.id3.ID3Reader;
import au.id.villar.mp3Sorter.id3.InvalidTagException;
import java.io.IOException;
public class ENCR extends Frame {
private String ownerId;
private int methodSymbol;
private byte[] encryptionData;
public ENCR(FrameHeader header) {
super(header);
}
public String getOwnerId() {
return ownerId;
}
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
public int getMethodSymbol() {
return methodSymbol;
}
public void setMethodSymbol(int methodSymbol) {
this.methodSymbol = methodSymbol;
}
public byte[] getEncryptionData() {
return encryptionData;
}
public void setEncryptionData(byte[] encryptionData) {
this.encryptionData = encryptionData;
}
@Override
void readBodyFromStream(ID3Reader reader) throws IOException,
InvalidTagException {
ownerId = reader.readString(false);
methodSymbol = reader.readBodyByte();
if(reader.getFrameCounter() > 0)
encryptionData = reader.readRestOfFrame();
}
@Override
public String toString() {
return new StringBuilder().append(header.getId()).append(", \"").append(getFrameDescription()).append("\"").append(", ownerId: ").append(ownerId)
.append(", methodSymbol: ").append(methodSymbol).toString();
}
@Override
public String getFrameDescription() {
return "Encryption method registration";
}
}
| [
"[email protected]"
] | |
3f89f3ac85fbbf49bd599b54049995e300120fe8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/1/1_53fde7739b00630f9767bb7163ae554d28cbb320/GmlHandlerTest/1_53fde7739b00630f9767bb7163ae554d28cbb320_GmlHandlerTest_t.java | b250b18ebf2c9ba83f4477944562c4ddef0c7127 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 9,550 | java | /*
* HUMBOLDT: A Framework for Data Harmonisation and Service Integration.
* EU Integrated Project #030962 01.10.2006 - 30.09.2010
*
* For more information on the project, please refer to the this web site:
* http://www.esdi-humboldt.eu
*
* LICENSE: For information on the license under which this program is
* available, please refer to http:/www.esdi-humboldt.eu/license.html#core
* (c) the HUMBOLDT Consortium, 2007 to 2010.
*/
package eu.esdihumboldt.gmlhandler;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLStreamException;
import org.apache.log4j.Logger;
import org.deegree.commons.xml.XMLParsingException;
import org.deegree.cs.exceptions.TransformationException;
import org.deegree.cs.exceptions.UnknownCRSException;
import org.deegree.feature.Feature;
import org.deegree.feature.FeatureCollection;
import org.deegree.feature.property.Property;
import org.deegree.feature.types.ApplicationSchema;
import org.deegree.feature.types.FeatureType;
import org.deegree.feature.types.property.PropertyType;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
/**
*
* Test-class for the GMLHandler functionality.
*
* @author Anna Pitaev
* @partner 04 / Logica
* @version $Id$
*/
public class GmlHandlerTest {
/** Logger for this class */
private static final Logger LOG = Logger.getLogger(GmlHandlerTest.class);
/** application schema location */
private static final String SCHEMA_LOCATION_GML32 = "urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0 http://svn.esdi-humboldt.eu/repo/humboldt2/trunk/cst/eu.esdihumboldt.cst.corefunctions/src/test/resource/eu/esdihumboldt/cst/corefunctions/inspire/inspire_v3.0_xsd" + "HydroPhysicalWaters.xsd";
/** http-based URL for the application schema */
private static final String SCHEMA_URL = "http://svn.esdi-humboldt.eu/repo/humboldt2/trunk/cst/eu.esdihumboldt.cst.corefunctions/src/test/resource/eu/esdihumboldt/cst/corefunctions/inspire/inspire_v3.0_xsd/" + "HydroPhysicalWaters.xsd";
/** source gml location */
private static final String GML32_INSTANCE_LOCATION = "http://svn.esdi-humboldt.eu/repo/humboldt2/branches/humboldt-deegree3/resource/sourceData/va_target_v3.gml";
/** generated instance location */
private static final String GML32_GENERATED_LOCATION = "src/test/resources/va_target_v3_generated.gml";
/** handler to proceed gmldata */
private static GmlHandler gmlHandler;
/**
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
// pre-define namespaces
HashMap<String, String> namespaces = new HashMap<String, String>();
namespaces.put("gco", "http://www.isotc211.org/2005/gco");
namespaces.put("gmd", "http://www.isotc211.org/2005/gmd");
namespaces.put("gn", "urn:x-inspire:specification:gmlas:GeographicalNames:3.0");
namespaces.put("hy-p", "urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0");
namespaces.put("hy", "urn:x-inspire:specification:gmlas:HydroBase:3.0");
namespaces.put("base", "urn:x-inspire:specification:gmlas:BaseTypes:3.2");
namespaces.put("xsi", "http://www.w3.org/2001/XMLSchema-instance");
// set up GMLHandler with the test configuration
gmlHandler = new GmlHandler(GMLVersions.gml3_2_1, SCHEMA_URL, namespaces);
gmlHandler.setGmlUrl(GML32_INSTANCE_LOCATION);
// set target gml destination
gmlHandler.setTargetGmlUrl(GML32_GENERATED_LOCATION);
}
/**
* @throws java.lang.Exception
*/
@AfterClass
public static void tearDownAfterClass() throws Exception {
new File(GML32_GENERATED_LOCATION).delete();
}
/**
* Test method for {@link eu.esdihumboldt.gmlhandler.GmlHandler#readSchema()}.
*
* @throws IllegalAccessException
* @throws InstantiationException
* @throws ClassNotFoundException
* @throws ClassCastException
* @throws MalformedURLException
*/
@Test
public final void testReadSchema() throws MalformedURLException, ClassCastException, ClassNotFoundException, InstantiationException, IllegalAccessException {
// read application schema
ApplicationSchema schema = gmlHandler.readSchema();
// validate root FeatureTypes
FeatureType[] rootFTypes = schema.getRootFeatureTypes();
assertEquals(17, rootFTypes.length);
for (FeatureType rootType : rootFTypes) {
LOG.debug("Root Feature Type : " + rootType.getName().getNamespaceURI() + ":" + rootType.getName().getLocalPart());
}
// Compare the count of the FeatureTypes
FeatureType[] ftypes = schema.getFeatureTypes();
for (FeatureType ftype : ftypes) {
LOG.debug("Application Schema Type : " + ftype.getName().getNamespaceURI() + ":" + ftype.getName().getLocalPart());
// validate a single Feature Type
if (ftype.getName().getLocalPart().equals("Rapids")) {
assertEquals("hy-p", ftype.getName().getPrefix());
assertEquals("urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0", ftype.getName().getNamespaceURI());
// check parent type
FeatureType pType = schema.getParentFt(ftype);
LOG.debug("Parent Typy of hy-p:Rapids is " + pType.getName().toString());
assertEquals("FluvialPoint", pType.getName().getLocalPart());
// check property declarations list
List<PropertyType> pDeclarations = (List<PropertyType>) ftype.getPropertyDeclarations();
assertEquals(8, pDeclarations.size());
for (PropertyType propType : pDeclarations) {
LOG.debug("Property List of hy-p:Rapids contains : " + propType.getName().toString());
}
}
}
assertEquals(49, ftypes.length);
}
/**
* Little test to see if we can read in a local schema, i.e. file protocol.
*
* @throws MalformedURLException
* @throws ClassCastException
* @throws ClassNotFoundException
* @throws InstantiationException
* @throws IllegalAccessException
*/
@Test
public final void testReadLocalSchema() throws MalformedURLException, ClassCastException, ClassNotFoundException, InstantiationException, IllegalAccessException {
String url = "file://" + this.getClass().getResource("./HydroPhysicalwaters.xsd").getFile();
gmlHandler.setSchemaUrl(url);
// read application schema
gmlHandler.readSchema();
}
/**
* Test method for {@link eu.esdihumboldt.gmlhandler.GmlHandler#readFC()}.
*
* @throws UnknownCRSException
* @throws IllegalAccessException
* @throws InstantiationException
* @throws ClassNotFoundException
* @throws IOException
* @throws FactoryConfigurationError
* @throws XMLStreamException
* @throws ClassCastException
* @throws XMLParsingException
*/
@Test
public final void testReadFC() throws XMLParsingException, ClassCastException, XMLStreamException, FactoryConfigurationError, IOException,
ClassNotFoundException, InstantiationException, IllegalAccessException, UnknownCRSException {
LOG.info("Reading of source Feature Collection..");
URL url = new URL(GML32_INSTANCE_LOCATION);
// read FeatureCollection
FeatureCollection fc = null;
fc = gmlHandler.readFC();
// check feature collection size
assertEquals(998, fc.size());
LOG.info("Feature Collection made up of " + fc.size());
// validate a single feature with id=Watercourses=VA.942
Iterator<Feature> fcIterator = fc.iterator();
LOG.info("Verifying of the single features");
while (fcIterator.hasNext()) {
Feature feature = fcIterator.next();
LOG.debug("Found feature with ID = " + feature.getId());
if (feature.getId().equals("Watercourses_VA.942")) {
LOG.info("Verifying feature with feature id = Watercourses_VA.942");
// check feature name
assertEquals("Watercourse", feature.getName().getLocalPart());
// check feature property list
Property[] props = feature.getProperties();
assertEquals(18, props.length);
// check property localType
for (Property prop : props) {
LOG.debug("Found property " + prop.getName().toString());
if (prop.getName().getLocalPart().equals("localType")) {
LOG.info("Verifying of Property Watercourse:localType");
assertEquals("Fluss, Bach", prop.getValue().toString());
}
}
}
}
}
/**
* Test method for {@link eu.esdihumboldt.gmlhandler.GmlHandler#writeFC(org.deegree.feature.FeatureCollection)} .
* @throws IllegalAccessException
* @throws InstantiationException
* @throws ClassNotFoundException
* @throws IOException
* @throws FactoryConfigurationError
* @throws TransformationException
* @throws UnknownCRSException
* @throws XMLStreamException
* @throws ClassCastException
* @throws FileNotFoundException
* @throws XMLParsingException
*/
@Test
public final void testWriteFC() throws XMLParsingException, FileNotFoundException, ClassCastException, XMLStreamException, UnknownCRSException, TransformationException, FactoryConfigurationError, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
// TODO provide XUNIT-based testing
// TODO clean up generated file after
gmlHandler.writeFC(gmlHandler.readFC());
}
}
| [
"[email protected]"
] | |
b2ef6c7eae671d679b1647491debc755f9c7ad3c | 338c38883ba840234f824fbe054ab6c8b93d175a | /build/generated-sources/jax-rpc/webservice/LyricWikiPortType_getHometown_ResponseStruct_SOAPBuilder.java | 215d4606982a44bd5b288efc2356d6d169357a10 | [] | no_license | prem315/LyricHound | 817491a7de6f5ae058ab4a00c0da8c60b45a9528 | 9013a78e00e2202cd21ba82365f07796a298548d | refs/heads/master | 2020-06-09T04:16:11.341008 | 2015-04-05T11:07:35 | 2015-04-05T11:07:35 | 33,021,823 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,791 | java | // This class was generated by the JAXRPC SI, do not edit.
// Contents subject to change without notice.
// JAX-RPC Standard Implementation (1.1.3, build R1)
// Generated source version: 1.1.3
package webservice;
import com.sun.xml.rpc.encoding.*;
import com.sun.xml.rpc.util.exception.LocalizableExceptionAdapter;
public class LyricWikiPortType_getHometown_ResponseStruct_SOAPBuilder implements SOAPInstanceBuilder {
private webservice.LyricWikiPortType_getHometown_ResponseStruct _instance;
private java.lang.String country;
private java.lang.String state;
private java.lang.String hometown;
private static final int myCOUNTRY_INDEX = 0;
private static final int mySTATE_INDEX = 1;
private static final int myHOMETOWN_INDEX = 2;
public LyricWikiPortType_getHometown_ResponseStruct_SOAPBuilder() {
}
public void setCountry(java.lang.String country) {
this.country = country;
}
public void setState(java.lang.String state) {
this.state = state;
}
public void setHometown(java.lang.String hometown) {
this.hometown = hometown;
}
public int memberGateType(int memberIndex) {
switch (memberIndex) {
case myCOUNTRY_INDEX:
return GATES_INITIALIZATION | REQUIRES_CREATION;
case mySTATE_INDEX:
return GATES_INITIALIZATION | REQUIRES_CREATION;
case myHOMETOWN_INDEX:
return GATES_INITIALIZATION | REQUIRES_CREATION;
default:
throw new IllegalArgumentException();
}
}
public void construct() {
}
public void setMember(int index, java.lang.Object memberValue) {
try {
switch(index) {
case myCOUNTRY_INDEX:
_instance.setCountry((java.lang.String)memberValue);
break;
case mySTATE_INDEX:
_instance.setState((java.lang.String)memberValue);
break;
case myHOMETOWN_INDEX:
_instance.setHometown((java.lang.String)memberValue);
break;
default:
throw new java.lang.IllegalArgumentException();
}
}
catch (java.lang.RuntimeException e) {
throw e;
}
catch (java.lang.Exception e) {
throw new DeserializationException(new LocalizableExceptionAdapter(e));
}
}
public void initialize() {
}
public void setInstance(java.lang.Object instance) {
_instance = (webservice.LyricWikiPortType_getHometown_ResponseStruct)instance;
}
public java.lang.Object getInstance() {
return _instance;
}
}
| [
"[email protected]"
] | |
123e8cffd73629c2277fa254e15e2ace55e75cd2 | 3bfe01d2bf6e994730ae1ec3ea2e5c8cc7258253 | /Main.java | 5b8b4fb22fb973de7c242a38187ba6abe79bb47f | [] | no_license | AsadRizvi97/snp-identifier | 63e6ea0599a5597382ed11bd1d377492443372c8 | f9d06e43d10478b6b1a1b031c641d1b0bf88d888 | refs/heads/master | 2022-02-01T12:37:27.891909 | 2019-05-12T00:17:43 | 2019-05-12T00:17:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,648 | java | import java.util.Arrays;
import java.util.LinkedList;
import edu.princeton.cs.algs4.In;
public class Main {
private LinkedList<Chromosome> chromosomes; //Store chromosomes as linked list
private int numberOfSamples; //Store number of samples for print()
public Main(String[] dataFiles) {
LinkedList<String> identifiers = new LinkedList<>(); //Create linked list of identifiers to see if chromosome exists already
chromosomes = new LinkedList<>();
numberOfSamples = dataFiles.length; //Set number of samples to number of data files inputted
for (int i = 0; i < dataFiles.length; i++) { //For each data file, convert each line to Chromosome | Position | Reference | SNP
In dataInput = new In(dataFiles[i]);
while (!dataInput.isEmpty()) {
String[] split = dataInput.readLine().split("\\s+");
if (split[0].startsWith("#") || split[3].length() != 1 || split[3].equals(".") || split[4].length() != 1 || split[4].equals(".")) {
continue;
}
String[] line = {split[0], split[1], split[3], split[4]};
if (identifiers.contains(split[0])) { //If chromosome already exists, just update the old one already there
Chromosome chromosome = chromosomes.get(identifiers.indexOf(split[0]));
chromosome.update(line, i + 1);
} else { //If no chromosome exists, create it
Chromosome chromosome = new Chromosome(line, dataFiles.length, i + 1);
chromosomes.add(chromosome);
identifiers.add(split[0]);
}
}
}
}
public void print(int label) {
for (Chromosome chromosome : chromosomes) { //For each chromosome, print Position | Reference | Sample 1 | Sample 2 etc.
System.out.printf("%-11s%s\n", "Chromosome", chromosome.identifier());
System.out.printf("%-10s%-11s", "Position", "Reference");
for (int i = 0; i < numberOfSamples; i++) {
System.out.printf("%-7s%-3d", "Sample", i + 1);
}
System.out.println();
chromosome.print(label);
System.out.println();
}
}
public static void main(String[] args) {
int label = 0;
Main aligner;
if (args[0].equals("-label") || args[0].equals("-l")) {
label = 1;
aligner = new Main(Arrays.copyOfRange(args, 1, args.length));
} else {
aligner = new Main(args);
}
aligner.print(label);
}
}
| [
"[email protected]"
] | |
59b10665f158fac588876aabf9e11020c926febe | acf08ff60743111b2e572586b28a1b945952057c | /java-eclipse/FabricaDeCarros/FabricaDeCarros/src/progprinciapl/Principal.java | 1d955eb7f4613aa2110eb3b94e8e40ba16794687 | [] | no_license | nada-pont-com/Arquivos | f24b34536c266b4fff8d8ae5d39cfe3903f06443 | 587b739d2d55d470993c9cf67c3a010dd61097e2 | refs/heads/master | 2020-03-30T02:29:34.844853 | 2019-08-09T04:11:08 | 2019-08-09T04:11:08 | 150,633,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 166 | java | package progprinciapl;
import interfacegrafica.Acao;
public class Principal {
public static void main(String[] args) {
Acao acao = new Acao();
acao.menu();
}
}
| [
"[email protected]"
] | |
6c5635f51c586e7a9ab2a82cb7bbb987bd419b07 | dc13b04749065664cbd1edb38cf6148a8d6262f5 | /kwdautomation/src/test/java/operations/ReadXLData.java | b81ed36b8a191ed34a3f389d5b47556c45453509 | [] | no_license | deepthi021/SeleniumTests | 78e10e7b78e0161f8f38b443090473de0a4e3b8b | 2cd6891d739eb43fd252bfa293c7b780e389ad53 | refs/heads/master | 2023-05-08T07:10:51.265605 | 2021-05-29T18:56:49 | 2021-05-29T18:56:49 | 370,114,598 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,105 | java | package operations;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.testng.annotations.Test;
public class ReadXLData {
@Test
public void Test() throws Exception {
File file = new File("C:\\Users\\Deepthi\\eclipse-workspace\\kwdautomation\\src\\test\\java\\testscenarios\\TestCases.xlsx");
FileInputStream stream = new FileInputStream(file);
XSSFWorkbook wb = new XSSFWorkbook(stream);
XSSFSheet sheet = wb.getSheet("testcases");
int rc = sheet.getLastRowNum() - sheet.getFirstRowNum();
System.out.println("No. of rows found = "+rc);
for(int i=0;i<rc;i++) {
int cc = sheet.getRow(i).getLastCellNum();
System.out.println("Row "+ i+ "th data is : ");
for(int j=0;j<cc;j++) {
System.out.println(sheet.getRow(i).getCell(j));
}
System.out.println();
}
}
}
| [
"[email protected]"
] | |
92a03352b357950f63f853757cca7bb62707e6de | 0818a56ae2c4be2c0cd5a5d4ca682091546645d0 | /src/main/java/services/FolderService.java | f29b0d792d9783e5f793fe7dd73d96625189e146 | [
"MIT"
] | permissive | juagarfer4/Condominium-Manager | a68af660e2a9fb8904b8c48ad285db9c69812e8b | 8e944d57af0832aac9bcd9c8331d329ec91d2105 | refs/heads/master | 2021-07-07T11:33:00.207263 | 2017-09-29T22:32:25 | 2017-09-29T22:32:25 | 105,249,749 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,067 | java | package services;
import java.util.ArrayList;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import domain.Folder;
import domain.Message;
import domain.Owner;
import repositories.FolderRepository;
import security.UserAccount;
@Service
@Transactional
public class FolderService {
// Managed repository ---------------------------------
@Autowired
private FolderRepository folderRepository;
// Supporting services ---------------------------------
@Autowired
private OwnerService ownerService;
// Constructors ----------------------------------------
public FolderService(){
super();
}
// Simple CRUD methods -----------------------------------
public Folder create(Owner owner){
Assert.notNull(owner, "error.null");
Folder result;
Collection<Message> messages;
result=new Folder();
messages=new ArrayList<Message>();
result.setMessages(messages);
result.setOwner(owner);
return result;
}
public Folder findOne (Integer folderId){
Folder result;
Owner owner;
Owner principal;
result=folderRepository.findOne(folderId);
owner=result.getOwner();
principal=ownerService.findByPrincipal();
Assert.isTrue(owner==principal);
return result;
}
public void save(Folder folder){
String name;
name=folder.getName();
Assert.isTrue(name=="INBOX"||name=="OUTBOX"||name=="TRASH", "folder.error.name");
folderRepository.save(folder);
}
// Other business methods --------------------------------
public Collection<Folder> findAllFoldersByOwner(){
Owner principal;
principal=ownerService.findByPrincipal();
Collection<Folder> result;
UserAccount userAccount;
Integer userAccountId;
userAccount=principal.getUserAccount();
userAccountId=userAccount.getId();
result=folderRepository.findAllFoldersByOwner(userAccountId);
return result;
}
}
| [
"[email protected]"
] | |
97333c14d3dcc6b1be0f9c71d6cc2f29f53ab603 | c54062a41a990c192c3eadbb9807e9132530de23 | /solutions/attributes/src/main/java/attributes/book/BookMain.java | f4711ebefe1a21ff03f1327e3cd8680abfc60efa | [] | no_license | Training360/strukturavalto-java-public | 0d76a9dedd7f0a0a435961229a64023931ec43c7 | 82d9b3c54437dd7c74284f06f9a6647ec62796e3 | refs/heads/master | 2022-07-27T15:07:57.915484 | 2021-12-01T08:57:06 | 2021-12-01T08:57:06 | 306,286,820 | 13 | 115 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package attributes.book;
public class BookMain {
public static void main(String[] args) {
Book book = new Book("Egri csillagok");
System.out.println(book.getTitle());
book.setTitle("1984");
System.out.println(book.getTitle());
}
}
| [
"[email protected]"
] | |
bb9ab754256338c51287913b18b69ba91a5db19b | 12835ef1fa75d48a9da56272918ddb0716952820 | /controle-core/src/org/csi/controle/core/entrega/Correios.java | 72b663f45fc2887e5d88864d95ae07a34b4ed07a | [
"Apache-2.0"
] | permissive | carlettibruno/workorder-control | b56b0ee557fe1d46a6637d0518cfebebe9f0424b | 901a23306fb24c898eed2b1dceed9ebc8bf1eb2e | refs/heads/master | 2022-12-06T08:06:29.077656 | 2019-06-25T16:39:44 | 2019-06-25T16:39:44 | 121,046,073 | 0 | 0 | Apache-2.0 | 2022-11-16T06:24:48 | 2018-02-10T19:18:10 | Java | UTF-8 | Java | false | false | 242 | java | package org.csi.controle.core.entrega;
import java.util.List;
import org.csi.rastreamento.correios.entidade.Evento;
public class Correios extends Entrega {
@Override
public List<Evento> getEventos() {
return null;
}
} | [
"[email protected]"
] | |
1f33c1ad4fa57b0e53a305801c01f7e77f5d649d | 8be6b27a6cd6d91f56a0568deb249b811eb0e068 | /SampleCode_AndroidStudio/AndroidStudioSampleCode/supermapAR/src/main/java/com/google/ar/core/supermap/java/common/rendering/ShaderUtil.java | 7ad491f09307c089a3e5bab63f159b1f234ce659 | [] | no_license | LittleSpark2018/iMobile-SampleCode | 76daaeaaa907547dfa3e51ac4f226194b76ce8b2 | 3ca4e50831d1fb1029b76618b1e299167a247316 | refs/heads/master | 2022-04-04T21:36:35.864571 | 2020-02-19T07:05:46 | 2020-02-19T07:05:46 | 270,269,483 | 1 | 0 | null | 2020-06-07T10:23:47 | 2020-06-07T10:23:47 | null | UTF-8 | Java | false | false | 3,351 | java | /*
* Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.ar.core.supermap.java.common.rendering;
import android.content.Context;
import android.opengl.GLES20;
import android.util.Log;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
/** Shader helper functions. */
public class ShaderUtil {
/**
* Converts a raw text file, saved as a resource, into an OpenGL ES shader.
*
* @param type The type of shader we will be creating.
* @param filename The filename of the asset file about to be turned into a shader.
* @return The shader object handler.
*/
public static int loadGLShader(String tag, Context context, int type, String filename)
throws IOException {
String code = readRawTextFileFromAssets(context, filename);
int shader = GLES20.glCreateShader(type);
GLES20.glShaderSource(shader, code);
GLES20.glCompileShader(shader);
// Get the compilation status.
final int[] compileStatus = new int[1];
GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compileStatus, 0);
// If the compilation failed, delete the shader.
if (compileStatus[0] == 0) {
Log.e(tag, "Error compiling shader: " + GLES20.glGetShaderInfoLog(shader));
GLES20.glDeleteShader(shader);
shader = 0;
}
if (shader == 0) {
throw new RuntimeException("Error creating shader.");
}
return shader;
}
/**
* Checks if we've had an error inside of OpenGL ES, and if so what that error is.
*
* @param label Label to report in case of error.
* @throws RuntimeException If an OpenGL error is detected.
*/
public static void checkGLError(String tag, String label) {
int lastError = GLES20.GL_NO_ERROR;
// Drain the queue of all errors.
int error;
while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
Log.e(tag, label + ": glError " + error);
lastError = error;
}
if (lastError != GLES20.GL_NO_ERROR) {
throw new RuntimeException(label + ": glError " + lastError);
}
}
/**
* Converts a raw text file into a string.
*
* @param filename The filename of the asset file about to be turned into a shader.
* @return The context of the text file, or null in case of error.
*/
private static String readRawTextFileFromAssets(Context context, String filename)
throws IOException {
try (InputStream inputStream = context.getAssets().open(filename);
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
StringBuilder sb = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
sb.append(line).append("\n");
}
return sb.toString();
}
}
}
| [
"[email protected]"
] | |
2d58c72461a800e6bd12a7c329d33a0669b204d6 | 003d7938bc369519f593b21c477b5b3e68a3d343 | /app/src/main/java/com/feedhenry/armark/Adaptadores/Adaptador_Almacen.java | 8003da63c9d1208b8838d3577661a1b2af18d4f1 | [
"Apache-2.0"
] | permissive | breinergonza/conexion_serv | 1581c1c7b6965adf86787c8471628dce5e6c2c9f | 2052c90442edcdd624b65ff1463d2b950d642e9b | refs/heads/master | 2021-01-11T01:50:53.488192 | 2016-10-23T20:12:32 | 2016-10-23T20:12:32 | 70,848,956 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,599 | java | package com.feedhenry.armark.Adaptadores;
import android.content.Context;
import android.database.Cursor;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.feedhenry.armark.R;
/**
* Created by ASUS on 20/10/2016.
*/
public class Adaptador_Almacen extends RecyclerView.Adapter<Adaptador_Almacen.ViewHolder> {
private final Context contexto;
private Cursor items;
public OnItemClickListener escuchaAlmacen;
public interface OnItemClickListener {
public void onClick(ViewHolder holder, String idAlmacen);
}
public Adaptador_Almacen(Context contexto,OnItemClickListener escuchaAlmacen) {
this.contexto = contexto;
this.escuchaAlmacen = escuchaAlmacen;
}
@Override
public Adaptador_Almacen.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_lista_almacen,parent,false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(Adaptador_Almacen.ViewHolder holder, int position) {
items.moveToPosition(position);
String s;
// asignacion de ui
s= items.getString(ConsultaAlmacen.RAZONSOCIAL);
holder.viewRazonSocial.setText(s);
s= items.getString(ConsultaAlmacen.DESCRIPCION);
holder.viewDescripcion.setText(s);
s= items.getString(ConsultaAlmacen.LOGO);
Glide.with(contexto).load(s).centerCrop().into(holder.viewLogo);
}
@Override
public int getItemCount() {
if (items != null) {
return items.getCount();
}
return 0;
}
public void swapCursor(Cursor nuevoCursor) {
if (nuevoCursor != null) {
items = nuevoCursor;
notifyDataSetChanged();
}
}
public Cursor getCursor() {
return items;
}
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
// Tomamos las referencias ui
private TextView viewRazonSocial,viewDescripcion;
private ImageView viewLogo;
public ViewHolder(View itemView) {
super(itemView);
viewRazonSocial = (TextView) itemView.findViewById(R.id.txt_razonSocial);
viewDescripcion = (TextView)itemView.findViewById(R.id.txt_descripcion_almacen);
viewLogo = (ImageView)itemView.findViewById(R.id.img_almcen);
itemView.setOnClickListener(this);
}
@Override
public void onClick(View v) {
escuchaAlmacen.onClick(this,obtenerIdAlmacen(getAdapterPosition()));
}
}
private String obtenerIdAlmacen(int adapterPosition) {
if (items != null) {
if (items.moveToPosition(adapterPosition)) {
return items.getString(ConsultaAlmacen.ID_ALMACEN);
}
}
return null;
}
interface ConsultaAlmacen {
int ID_ALMACEN = 0;
int IDWEB = 1;
int RAZONSOCIAL = 2;
int NIT = 3;
int DESCRIPCION = 4;
int DIRECCION = 5;
int TELEFONO = 6;
int CORREO= 7;
int POSICIONGPS = 8;
int LOGO = 9;
int MARCADOR = 10;
int REGISTRO = 11;
int MODIFICADOR = 12;
int VISIBLE = 13;
int ACTIVO = 14;
int TAGS = 15;
int X = 16;
int Y = 17;
}
}
| [
"[email protected]"
] | |
da30a6cc3fce470cbd3c4f5d84e38d68fd4636c8 | d8f2f3fe51a3ff82b89b53b53ff9eb1f9e590027 | /hadoop/page_rank/src/main/java/org/mdp/learn/hadoop/page_rank/PrDriver.java | 26585c9b111e44ff2562e7adab5df3e73243135b | [] | no_license | marcodippy/learning_hadoop | 64cc06e91e42003238f72a56070c868d2047f9a4 | 58569ee95688a22942b473c20868cc0809526752 | refs/heads/master | 2021-01-10T07:54:20.865853 | 2015-12-05T16:11:37 | 2015-12-05T16:11:37 | 44,393,404 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,962 | java | package org.mdp.learn.hadoop.page_rank;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.mdp.learn.hadoop.commons.HdfsUtils;
public class PrDriver extends Configured implements Tool {
public int run(String[] args) throws Exception {
String INPUT_FILE = args[0], OUTPUT_FILE = args[2];
Long NUMBER_OF_NODES = Long.parseLong(args[1]), MAX_ITERATIONS = Long.parseLong(args[3]);
long changedPageRanks = -1, lostPageRankMass = -1, iterations = 0;
String tmpInputFile = INPUT_FILE;
String tmpOutputFile = OUTPUT_FILE + iterations;
do {
PageRankJob pageRank = new PageRankJob(tmpInputFile, tmpOutputFile, NUMBER_OF_NODES).run();
pageRank.printStatus();
changedPageRanks = pageRank.getChangedPageRankNumber();
lostPageRankMass = pageRank.getLostPageRankMass();
if (iterations > 0) HdfsUtils.deleteIfExists(getConf(), new Path(tmpInputFile));
if (lostPageRankMass > 0) {
tmpInputFile = tmpOutputFile;
tmpOutputFile = tmpOutputFile + "_rdpr";
RedistributeLostPageRank redistributeLostPageRank = new RedistributeLostPageRank(tmpInputFile, tmpOutputFile, NUMBER_OF_NODES, lostPageRankMass).run();
changedPageRanks = redistributeLostPageRank.getChangedPageRankNumber(); // ???
HdfsUtils.deleteIfExists(getConf(), new Path(tmpInputFile));
}
iterations++;
tmpInputFile = tmpOutputFile;
tmpOutputFile = OUTPUT_FILE + iterations;
}
while (changedPageRanks > 0 && iterations < MAX_ITERATIONS);
HdfsUtils.rename(getConf(), new Path(tmpInputFile), new Path(OUTPUT_FILE));
System.out.println("Job finished in " + iterations + " iterations");
return 0;
}
public static void main(String[] args) throws Exception {
System.exit(ToolRunner.run(new PrDriver(), args));
}
}
| [
"[email protected]"
] | |
f4592420ff7fd39a7911881e9023f3c0e10f28aa | 6ac25b8bdc3b080cd97d0e7d2fdf0f3d472e2024 | /binary-tree-paths/Solution.java | ca4339ddad712f6476de107989cbf6c179dc0263 | [] | no_license | jmazala/leetcode | 852e5fc9e8529ee059fcb031109431cd074d6a8f | 8a3bc5aa8fe827d5f63cab0f680a17500c2f90e0 | refs/heads/master | 2023-08-09T20:45:29.740162 | 2023-08-02T05:57:22 | 2023-08-02T05:57:22 | 252,583,974 | 0 | 0 | null | 2023-01-07T19:14:33 | 2020-04-02T23:06:42 | JavaScript | UTF-8 | Java | false | false | 1,080 | java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Definition for a binary tree node. public class TreeNode { int val; TreeNode
* left; TreeNode right; TreeNode(int x) { val = x; } }
*/
class Solution {
List<String> answer;
public List<String> binaryTreePaths(TreeNode root) {
this.answer = new ArrayList<String>();
helper(root, "");
return answer;
}
public void helper(TreeNode node, String prefix) {
if (node == null) {
return;
}
prefix += node.val;
if (node.left == null && node.right == null) {
answer.add(prefix);
}
prefix += "->";
if (node.left != null) {
helper(node.left, prefix);
}
if (node.right != null) {
helper(node.right, prefix);
}
}
public static void main(String[] args) {
TreeNode root = new TreeNode(1);
root.left = new TreeNode(2);
root.left.right = new TreeNode(5);
root.right = new TreeNode(3);
Solution s = new Solution();
System.out.println(Arrays.toString(s.binaryTreePaths(root).toArray()));
}
} | [
"[email protected]"
] | |
1e363bad7a5b24818d11d82673a33031055c5311 | 4d9dbc6f814dc9aab8990d5bc517846c7545717c | /app/src/main/java/com/garethabrahams/garethabrahamsdevspace/AboutMeActivity.java | b134c8905a65ce0b02d3ce81661cf5a16962e51b | [] | no_license | GarethAbrahams/GarethAbrahamsDevSpace | cf637b63bca72cd37389a4c408a8c25658095967 | 9d282763e63a6de9bba2b65f275d8733287749f5 | refs/heads/master | 2022-11-27T04:40:51.232597 | 2020-07-30T19:05:13 | 2020-07-30T19:05:13 | 283,329,033 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,476 | java | package com.garethabrahams.garethabrahamsdevspace;
import androidx.appcompat.app.AppCompatActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class AboutMeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about_me);
String msg = "My name is Gareth Abrahams.\n"+"\n"+"A confident and well-rounded IT professional, with experience in management, service desk, desktop support procurement, SQL, IIS and server administration.\n" +
"\n" +
"Working for 17 year in a fast pace software development company, while studying part time for the past 4 years.\n" +
"\n" +
"Very much a family orientated person, married for 10 years and have a 6 year old daughter.\n";
TextView aboutText = (TextView) findViewById(R.id.AboutText);
aboutText.setText(msg);
Button backButton = (Button) findViewById(R.id.backButton);
backButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(AboutMeActivity.this, MenuActivity.class);
startActivity(intent);
}
});
}
} | [
"[email protected]"
] | |
b3530bf56b7624d914f6d8f813b2f43e31194a70 | 845661aeac1512abf1b3a0062eef4f432e1f0f3a | /g2-report-engine/src/main/java/com/googlecode/g2re/html/style/Font.java | 3c03dd520b5235295909ec0de492334be6f1b204 | [] | no_license | joshualucas84/g2-report-engine | 491f38f5eb0aa5c41effb674f52a1bac3766cecc | 25b6fd2917351a167ac98d90431224eff9e74e3f | refs/heads/master | 2021-09-08T14:26:44.979345 | 2009-06-15T23:18:37 | 2009-06-15T23:18:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,522 | java | package com.googlecode.g2re.html.style;
/**
* Defines how an elements font should be rendered
* @author Brad Rydzewski
*/
public class Font implements StyledElement {
private Color color;
private float pixels = -1;
private String fontFamily;
private FontStyle fontStyle;
private FontWeight fontWeight;
public Font() {
}
public Font(String fontFamily) {
setFontFamily(fontFamily);
}
public Font(String ff, float px) {
setFontFamily(ff);
setPixels(px);
}
public Font(float px) {
setPixels(px);
}
public Color getColor() {
return color;
}
public void setColor(Color color) {
this.color = color;
}
public String getFontFamily() {
return fontFamily;
}
public void setFontFamily(String fontFamily) {
this.fontFamily = fontFamily;
}
public FontStyle getFontStyle() {
return fontStyle;
}
public void setFontStyle(FontStyle fontStyle) {
this.fontStyle = fontStyle;
}
public FontWeight getFontWeight() {
return fontWeight;
}
public void setFontWeight(FontWeight fontWeight) {
this.fontWeight = fontWeight;
}
public float getPixels() {
return pixels;
}
public void setPixels(float pixels) {
this.pixels = pixels;
}
/**
* Converts this object to a CSS String
* @return
*/
public String toCSS(){
StringBuilder css = new StringBuilder();
//append font-family
if(getFontFamily()!=null && getFontFamily().isEmpty()==false){
css.append("font-family:").append(getFontFamily());
}
if(getFontWeight()!=null)
css.append(getFontWeight().toCSS());
if(getFontStyle()!=null)
css.append(getFontStyle().toCSS());
if(getColor()!=null)
css.append("color:").append(getColor().toString()).append(";");
if(getPixels()!=-1)
css.append("font-size:").append(getPixels()).append(";");
return css.toString();
}
}
| [
"brad.rydzewski@81167618-2985-11de-8eb0-8789651ec4da"
] | brad.rydzewski@81167618-2985-11de-8eb0-8789651ec4da |
0cb1dfe1ad3d8ffda734ba38ec21ab1e206f18d3 | 803a81cbf3b2c615cbff2bb4a724b3672dd13cdf | /src/main/java/com/cda/gateway/config/CacheConfiguration.java | 47264e83767fca2bbb29aa9d8203c398b0f99052 | [] | no_license | mbobadilla/jhipster-wateway-application | 8ec5238fa4bc04bf1d94961286889962d52cf6bf | 02629cb9e0a6a1e93a3f996063c372d427d57124 | refs/heads/master | 2022-12-21T23:39:24.412381 | 2020-02-20T13:53:18 | 2020-02-20T13:53:18 | 241,896,645 | 0 | 0 | null | 2022-12-16T05:13:12 | 2020-02-20T13:53:02 | Java | UTF-8 | Java | false | false | 2,530 | java | package com.cda.gateway.config;
import java.time.Duration;
import org.ehcache.config.builders.*;
import org.ehcache.jsr107.Eh107Configuration;
import org.hibernate.cache.jcache.ConfigSettings;
import io.github.jhipster.config.JHipsterProperties;
import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer;
import org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.serviceregistry.Registration;
import org.springframework.context.annotation.*;
@Configuration
@EnableCaching
public class CacheConfiguration {
private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration;
public CacheConfiguration(JHipsterProperties jHipsterProperties) {
JHipsterProperties.Cache.Ehcache ehcache = jHipsterProperties.getCache().getEhcache();
jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration(
CacheConfigurationBuilder.newCacheConfigurationBuilder(Object.class, Object.class,
ResourcePoolsBuilder.heap(ehcache.getMaxEntries()))
.withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofSeconds(ehcache.getTimeToLiveSeconds())))
.build());
}
@Bean
public HibernatePropertiesCustomizer hibernatePropertiesCustomizer(javax.cache.CacheManager cacheManager) {
return hibernateProperties -> hibernateProperties.put(ConfigSettings.CACHE_MANAGER, cacheManager);
}
@Bean
public JCacheManagerCustomizer cacheManagerCustomizer() {
return cm -> {
createCache(cm, com.cda.gateway.repository.UserRepository.USERS_BY_LOGIN_CACHE);
createCache(cm, com.cda.gateway.repository.UserRepository.USERS_BY_EMAIL_CACHE);
createCache(cm, com.cda.gateway.domain.User.class.getName());
createCache(cm, com.cda.gateway.domain.Authority.class.getName());
createCache(cm, com.cda.gateway.domain.User.class.getName() + ".authorities");
// jhipster-needle-ehcache-add-entry
};
}
private void createCache(javax.cache.CacheManager cm, String cacheName) {
javax.cache.Cache<Object, Object> cache = cm.getCache(cacheName);
if (cache == null) {
cm.createCache(cacheName, jcacheConfiguration);
}
}
}
| [
"[email protected]"
] | |
25f320ccd85a9d7dc4fd941253d689d3fa84501d | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /DVC-AN20_EMUI10.1.1/src/main/java/android/hardware/radio/V1_1/IRadioResponse.java | eec8946eb94bf6efcf407ee6dc56a46a2f63c2a9 | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 217,297 | java | package android.hardware.radio.V1_1;
import android.hardware.radio.V1_0.ActivityStatsInfo;
import android.hardware.radio.V1_0.Call;
import android.hardware.radio.V1_0.CallForwardInfo;
import android.hardware.radio.V1_0.CardStatus;
import android.hardware.radio.V1_0.CarrierRestrictions;
import android.hardware.radio.V1_0.CdmaBroadcastSmsConfigInfo;
import android.hardware.radio.V1_0.CellInfo;
import android.hardware.radio.V1_0.DataRegStateResult;
import android.hardware.radio.V1_0.GsmBroadcastSmsConfigInfo;
import android.hardware.radio.V1_0.HardwareConfig;
import android.hardware.radio.V1_0.IccIoResult;
import android.hardware.radio.V1_0.LastCallFailCauseInfo;
import android.hardware.radio.V1_0.LceDataInfo;
import android.hardware.radio.V1_0.LceStatusInfo;
import android.hardware.radio.V1_0.NeighboringCell;
import android.hardware.radio.V1_0.OperatorInfo;
import android.hardware.radio.V1_0.RadioCapability;
import android.hardware.radio.V1_0.RadioResponseInfo;
import android.hardware.radio.V1_0.SendSmsResult;
import android.hardware.radio.V1_0.SetupDataCallResult;
import android.hardware.radio.V1_0.SignalStrength;
import android.hardware.radio.V1_0.VoiceRegStateResult;
import android.internal.hidl.base.V1_0.DebugInfo;
import android.internal.hidl.base.V1_0.IBase;
import android.os.HidlSupport;
import android.os.HwBinder;
import android.os.HwBlob;
import android.os.HwParcel;
import android.os.IHwBinder;
import android.os.IHwInterface;
import android.os.NativeHandle;
import android.os.RemoteException;
import com.android.internal.midi.MidiConstants;
import com.android.internal.telephony.PhoneConstants;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Objects;
public interface IRadioResponse extends android.hardware.radio.V1_0.IRadioResponse {
public static final String kInterfaceName = "[email protected]::IRadioResponse";
@Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwInterface, android.internal.hidl.base.V1_0.IBase
IHwBinder asBinder();
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
void debug(NativeHandle nativeHandle, ArrayList<String> arrayList) throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
DebugInfo getDebugInfo() throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
ArrayList<byte[]> getHashChain() throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
ArrayList<String> interfaceChain() throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
String interfaceDescriptor() throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
boolean linkToDeath(IHwBinder.DeathRecipient deathRecipient, long j) throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
void notifySyspropsChanged() throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
void ping() throws RemoteException;
void setCarrierInfoForImsiEncryptionResponse(RadioResponseInfo radioResponseInfo) throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
void setHALInstrumentation() throws RemoteException;
void setSimCardPowerResponse_1_1(RadioResponseInfo radioResponseInfo) throws RemoteException;
void startKeepaliveResponse(RadioResponseInfo radioResponseInfo, KeepaliveStatus keepaliveStatus) throws RemoteException;
void startNetworkScanResponse(RadioResponseInfo radioResponseInfo) throws RemoteException;
void stopKeepaliveResponse(RadioResponseInfo radioResponseInfo) throws RemoteException;
void stopNetworkScanResponse(RadioResponseInfo radioResponseInfo) throws RemoteException;
@Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase
boolean unlinkToDeath(IHwBinder.DeathRecipient deathRecipient) throws RemoteException;
static default IRadioResponse asInterface(IHwBinder binder) {
if (binder == null) {
return null;
}
IHwInterface iface = binder.queryLocalInterface(kInterfaceName);
if (iface != null && (iface instanceof IRadioResponse)) {
return (IRadioResponse) iface;
}
IRadioResponse proxy = new Proxy(binder);
try {
Iterator<String> it = proxy.interfaceChain().iterator();
while (it.hasNext()) {
if (it.next().equals(kInterfaceName)) {
return proxy;
}
}
} catch (RemoteException e) {
}
return null;
}
static default IRadioResponse castFrom(IHwInterface iface) {
if (iface == null) {
return null;
}
return asInterface(iface.asBinder());
}
static default IRadioResponse getService(String serviceName, boolean retry) throws RemoteException {
return asInterface(HwBinder.getService(kInterfaceName, serviceName, retry));
}
static default IRadioResponse getService(boolean retry) throws RemoteException {
return getService(PhoneConstants.APN_TYPE_DEFAULT, retry);
}
static default IRadioResponse getService(String serviceName) throws RemoteException {
return asInterface(HwBinder.getService(kInterfaceName, serviceName));
}
static default IRadioResponse getService() throws RemoteException {
return getService(PhoneConstants.APN_TYPE_DEFAULT);
}
public static final class Proxy implements IRadioResponse {
private IHwBinder mRemote;
public Proxy(IHwBinder remote) {
this.mRemote = (IHwBinder) Objects.requireNonNull(remote);
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwInterface, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public IHwBinder asBinder() {
return this.mRemote;
}
public String toString() {
try {
return interfaceDescriptor() + "@Proxy";
} catch (RemoteException e) {
return "[class or subclass of [email protected]::IRadioResponse]@Proxy";
}
}
public final boolean equals(Object other) {
return HidlSupport.interfacesEqual(this, other);
}
public final int hashCode() {
return asBinder().hashCode();
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getIccCardStatusResponse(RadioResponseInfo info, CardStatus cardStatus) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
cardStatus.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(1, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void supplyIccPinForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(remainingRetries);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(2, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void supplyIccPukForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(remainingRetries);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(3, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void supplyIccPin2ForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(remainingRetries);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(4, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void supplyIccPuk2ForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(remainingRetries);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(5, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void changeIccPinForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(remainingRetries);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(6, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void changeIccPin2ForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(remainingRetries);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(7, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void supplyNetworkDepersonalizationResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(remainingRetries);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(8, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getCurrentCallsResponse(RadioResponseInfo info, ArrayList<Call> calls) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
Call.writeVectorToParcel(_hidl_request, calls);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(9, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void dialResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(10, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getIMSIForAppResponse(RadioResponseInfo info, String imsi) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(imsi);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(11, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void hangupConnectionResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(12, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void hangupWaitingOrBackgroundResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(13, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void hangupForegroundResumeBackgroundResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(14, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void switchWaitingOrHoldingAndActiveResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(15, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void conferenceResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(16, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void rejectCallResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(17, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getLastCallFailCauseResponse(RadioResponseInfo info, LastCallFailCauseInfo failCauseinfo) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
failCauseinfo.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(18, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getSignalStrengthResponse(RadioResponseInfo info, SignalStrength sigStrength) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
sigStrength.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(19, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getVoiceRegistrationStateResponse(RadioResponseInfo info, VoiceRegStateResult voiceRegResponse) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
voiceRegResponse.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(20, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getDataRegistrationStateResponse(RadioResponseInfo info, DataRegStateResult dataRegResponse) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
dataRegResponse.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(21, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getOperatorResponse(RadioResponseInfo info, String longName, String shortName, String numeric) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(longName);
_hidl_request.writeString(shortName);
_hidl_request.writeString(numeric);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(22, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setRadioPowerResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(23, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendDtmfResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(24, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendSmsResponse(RadioResponseInfo info, SendSmsResult sms) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
sms.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(25, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendSMSExpectMoreResponse(RadioResponseInfo info, SendSmsResult sms) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
sms.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(26, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setupDataCallResponse(RadioResponseInfo info, SetupDataCallResult dcResponse) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
dcResponse.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(27, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void iccIOForAppResponse(RadioResponseInfo info, IccIoResult iccIo) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
iccIo.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(28, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendUssdResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(29, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void cancelPendingUssdResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(30, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getClirResponse(RadioResponseInfo info, int n, int m) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(n);
_hidl_request.writeInt32(m);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(31, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setClirResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(32, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getCallForwardStatusResponse(RadioResponseInfo info, ArrayList<CallForwardInfo> callForwardInfos) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
CallForwardInfo.writeVectorToParcel(_hidl_request, callForwardInfos);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(33, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setCallForwardResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(34, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getCallWaitingResponse(RadioResponseInfo info, boolean enable, int serviceClass) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeBool(enable);
_hidl_request.writeInt32(serviceClass);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(35, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setCallWaitingResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(36, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void acknowledgeLastIncomingGsmSmsResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(37, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void acceptCallResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(38, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void deactivateDataCallResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(39, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getFacilityLockForAppResponse(RadioResponseInfo info, int response) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(response);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(40, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setFacilityLockForAppResponse(RadioResponseInfo info, int retry) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(retry);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(41, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setBarringPasswordResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(42, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getNetworkSelectionModeResponse(RadioResponseInfo info, boolean manual) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeBool(manual);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(43, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setNetworkSelectionModeAutomaticResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(44, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setNetworkSelectionModeManualResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(45, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getAvailableNetworksResponse(RadioResponseInfo info, ArrayList<OperatorInfo> networkInfos) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
OperatorInfo.writeVectorToParcel(_hidl_request, networkInfos);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(46, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void startDtmfResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(47, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void stopDtmfResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(48, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getBasebandVersionResponse(RadioResponseInfo info, String version) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(version);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(49, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void separateConnectionResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(50, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setMuteResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(51, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getMuteResponse(RadioResponseInfo info, boolean enable) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeBool(enable);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(52, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getClipResponse(RadioResponseInfo info, int status) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(status);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(53, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getDataCallListResponse(RadioResponseInfo info, ArrayList<SetupDataCallResult> dcResponse) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
SetupDataCallResult.writeVectorToParcel(_hidl_request, dcResponse);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(54, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setSuppServiceNotificationsResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(55, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void writeSmsToSimResponse(RadioResponseInfo info, int index) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(index);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(56, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void deleteSmsOnSimResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(57, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setBandModeResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(58, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getAvailableBandModesResponse(RadioResponseInfo info, ArrayList<Integer> bandModes) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32Vector(bandModes);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(59, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendEnvelopeResponse(RadioResponseInfo info, String commandResponse) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(commandResponse);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(60, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendTerminalResponseToSimResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(61, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void handleStkCallSetupRequestFromSimResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(62, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void explicitCallTransferResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(63, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setPreferredNetworkTypeResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(64, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getPreferredNetworkTypeResponse(RadioResponseInfo info, int nwType) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(nwType);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(65, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getNeighboringCidsResponse(RadioResponseInfo info, ArrayList<NeighboringCell> cells) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
NeighboringCell.writeVectorToParcel(_hidl_request, cells);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(66, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setLocationUpdatesResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(67, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setCdmaSubscriptionSourceResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(68, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setCdmaRoamingPreferenceResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(69, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getCdmaRoamingPreferenceResponse(RadioResponseInfo info, int type) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(type);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(70, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setTTYModeResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(71, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getTTYModeResponse(RadioResponseInfo info, int mode) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(mode);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(72, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setPreferredVoicePrivacyResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(73, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getPreferredVoicePrivacyResponse(RadioResponseInfo info, boolean enable) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeBool(enable);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(74, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendCDMAFeatureCodeResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(75, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendBurstDtmfResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(76, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendCdmaSmsResponse(RadioResponseInfo info, SendSmsResult sms) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
sms.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(77, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void acknowledgeLastIncomingCdmaSmsResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(78, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getGsmBroadcastConfigResponse(RadioResponseInfo info, ArrayList<GsmBroadcastSmsConfigInfo> configs) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
GsmBroadcastSmsConfigInfo.writeVectorToParcel(_hidl_request, configs);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(79, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setGsmBroadcastConfigResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(80, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setGsmBroadcastActivationResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(81, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getCdmaBroadcastConfigResponse(RadioResponseInfo info, ArrayList<CdmaBroadcastSmsConfigInfo> configs) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
CdmaBroadcastSmsConfigInfo.writeVectorToParcel(_hidl_request, configs);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(82, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setCdmaBroadcastConfigResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(83, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setCdmaBroadcastActivationResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(84, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getCDMASubscriptionResponse(RadioResponseInfo info, String mdn, String hSid, String hNid, String min, String prl) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(mdn);
_hidl_request.writeString(hSid);
_hidl_request.writeString(hNid);
_hidl_request.writeString(min);
_hidl_request.writeString(prl);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(85, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void writeSmsToRuimResponse(RadioResponseInfo info, int index) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(index);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(86, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void deleteSmsOnRuimResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(87, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getDeviceIdentityResponse(RadioResponseInfo info, String imei, String imeisv, String esn, String meid) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(imei);
_hidl_request.writeString(imeisv);
_hidl_request.writeString(esn);
_hidl_request.writeString(meid);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(88, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void exitEmergencyCallbackModeResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(89, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getSmscAddressResponse(RadioResponseInfo info, String smsc) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(smsc);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(90, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setSmscAddressResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(91, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void reportSmsMemoryStatusResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(92, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void reportStkServiceIsRunningResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(93, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getCdmaSubscriptionSourceResponse(RadioResponseInfo info, int source) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(source);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(94, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void requestIsimAuthenticationResponse(RadioResponseInfo info, String response) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(response);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(95, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void acknowledgeIncomingGsmSmsWithPduResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(96, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendEnvelopeWithStatusResponse(RadioResponseInfo info, IccIoResult iccIo) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
iccIo.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(97, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getVoiceRadioTechnologyResponse(RadioResponseInfo info, int rat) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(rat);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(98, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getCellInfoListResponse(RadioResponseInfo info, ArrayList<CellInfo> cellInfo) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
CellInfo.writeVectorToParcel(_hidl_request, cellInfo);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(99, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setCellInfoListRateResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(100, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setInitialAttachApnResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(101, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getImsRegistrationStateResponse(RadioResponseInfo info, boolean isRegistered, int ratFamily) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeBool(isRegistered);
_hidl_request.writeInt32(ratFamily);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(102, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendImsSmsResponse(RadioResponseInfo info, SendSmsResult sms) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
sms.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(103, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void iccTransmitApduBasicChannelResponse(RadioResponseInfo info, IccIoResult result) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
result.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(104, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void iccOpenLogicalChannelResponse(RadioResponseInfo info, int channelId, ArrayList<Byte> selectResponse) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(channelId);
_hidl_request.writeInt8Vector(selectResponse);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(105, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void iccCloseLogicalChannelResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(106, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void iccTransmitApduLogicalChannelResponse(RadioResponseInfo info, IccIoResult result) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
result.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(107, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void nvReadItemResponse(RadioResponseInfo info, String result) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeString(result);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(108, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void nvWriteItemResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(109, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void nvWriteCdmaPrlResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(110, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void nvResetConfigResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(111, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setUiccSubscriptionResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(112, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setDataAllowedResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(113, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getHardwareConfigResponse(RadioResponseInfo info, ArrayList<HardwareConfig> config) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HardwareConfig.writeVectorToParcel(_hidl_request, config);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(114, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void requestIccSimAuthenticationResponse(RadioResponseInfo info, IccIoResult result) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
result.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(115, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setDataProfileResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(116, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void requestShutdownResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(117, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getRadioCapabilityResponse(RadioResponseInfo info, RadioCapability rc) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
rc.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(118, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setRadioCapabilityResponse(RadioResponseInfo info, RadioCapability rc) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
rc.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(119, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void startLceServiceResponse(RadioResponseInfo info, LceStatusInfo statusInfo) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
statusInfo.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(120, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void stopLceServiceResponse(RadioResponseInfo info, LceStatusInfo statusInfo) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
statusInfo.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(121, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void pullLceDataResponse(RadioResponseInfo info, LceDataInfo lceInfo) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
lceInfo.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(122, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getModemActivityInfoResponse(RadioResponseInfo info, ActivityStatsInfo activityInfo) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
activityInfo.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(123, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setAllowedCarriersResponse(RadioResponseInfo info, int numAllowed) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeInt32(numAllowed);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(124, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void getAllowedCarriersResponse(RadioResponseInfo info, boolean allAllowed, CarrierRestrictions carriers) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
_hidl_request.writeBool(allAllowed);
carriers.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(125, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void sendDeviceStateResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(126, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setIndicationFilterResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(127, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void setSimCardPowerResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(128, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse
public void acknowledgeRequest(int serial) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
_hidl_request.writeInt32(serial);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(129, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_1.IRadioResponse
public void setCarrierInfoForImsiEncryptionResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(130, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_1.IRadioResponse
public void setSimCardPowerResponse_1_1(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(131, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_1.IRadioResponse
public void startNetworkScanResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(132, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_1.IRadioResponse
public void stopNetworkScanResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(133, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_1.IRadioResponse
public void startKeepaliveResponse(RadioResponseInfo info, KeepaliveStatus status) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
status.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(134, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_1.IRadioResponse
public void stopKeepaliveResponse(RadioResponseInfo info) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName);
info.writeToParcel(_hidl_request);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(135, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public ArrayList<String> interfaceChain() throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IBase.kInterfaceName);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(256067662, _hidl_request, _hidl_reply, 0);
_hidl_reply.verifySuccess();
_hidl_request.releaseTemporaryStorage();
return _hidl_reply.readStringVector();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public void debug(NativeHandle fd, ArrayList<String> options) throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IBase.kInterfaceName);
_hidl_request.writeNativeHandle(fd);
_hidl_request.writeStringVector(options);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(256131655, _hidl_request, _hidl_reply, 0);
_hidl_reply.verifySuccess();
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public String interfaceDescriptor() throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IBase.kInterfaceName);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(256136003, _hidl_request, _hidl_reply, 0);
_hidl_reply.verifySuccess();
_hidl_request.releaseTemporaryStorage();
return _hidl_reply.readString();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public ArrayList<byte[]> getHashChain() throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IBase.kInterfaceName);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(256398152, _hidl_request, _hidl_reply, 0);
_hidl_reply.verifySuccess();
_hidl_request.releaseTemporaryStorage();
ArrayList<byte[]> _hidl_out_hashchain = new ArrayList<>();
HwBlob _hidl_blob = _hidl_reply.readBuffer(16);
int _hidl_vec_size = _hidl_blob.getInt32(8);
HwBlob childBlob = _hidl_reply.readEmbeddedBuffer((long) (_hidl_vec_size * 32), _hidl_blob.handle(), 0, true);
_hidl_out_hashchain.clear();
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
byte[] _hidl_vec_element = new byte[32];
childBlob.copyToInt8Array((long) (_hidl_index_0 * 32), _hidl_vec_element, 32);
_hidl_out_hashchain.add(_hidl_vec_element);
}
return _hidl_out_hashchain;
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public void setHALInstrumentation() throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IBase.kInterfaceName);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(256462420, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public boolean linkToDeath(IHwBinder.DeathRecipient recipient, long cookie) throws RemoteException {
return this.mRemote.linkToDeath(recipient, cookie);
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public void ping() throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IBase.kInterfaceName);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(256921159, _hidl_request, _hidl_reply, 0);
_hidl_reply.verifySuccess();
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public DebugInfo getDebugInfo() throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IBase.kInterfaceName);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(257049926, _hidl_request, _hidl_reply, 0);
_hidl_reply.verifySuccess();
_hidl_request.releaseTemporaryStorage();
DebugInfo _hidl_out_info = new DebugInfo();
_hidl_out_info.readFromParcel(_hidl_reply);
return _hidl_out_info;
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public void notifySyspropsChanged() throws RemoteException {
HwParcel _hidl_request = new HwParcel();
_hidl_request.writeInterfaceToken(IBase.kInterfaceName);
HwParcel _hidl_reply = new HwParcel();
try {
this.mRemote.transact(257120595, _hidl_request, _hidl_reply, 1);
_hidl_request.releaseTemporaryStorage();
} finally {
_hidl_reply.release();
}
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public boolean unlinkToDeath(IHwBinder.DeathRecipient recipient) throws RemoteException {
return this.mRemote.unlinkToDeath(recipient);
}
}
public static abstract class Stub extends HwBinder implements IRadioResponse {
@Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwInterface, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public IHwBinder asBinder() {
return this;
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final ArrayList<String> interfaceChain() {
return new ArrayList<>(Arrays.asList(IRadioResponse.kInterfaceName, android.hardware.radio.V1_0.IRadioResponse.kInterfaceName, IBase.kInterfaceName));
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public void debug(NativeHandle fd, ArrayList<String> arrayList) {
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final String interfaceDescriptor() {
return IRadioResponse.kInterfaceName;
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final ArrayList<byte[]> getHashChain() {
return new ArrayList<>(Arrays.asList(new byte[]{5, -86, 61, -26, 19, 10, -105, -120, -3, -74, -12, -45, -52, 87, -61, -22, MidiConstants.STATUS_NOTE_ON, -16, 103, -25, 122, 94, 9, -42, -89, 114, -20, Byte.MAX_VALUE, 107, -54, 51, -46}, new byte[]{29, 74, 87, 118, 97, 76, 8, -75, -41, -108, -91, -20, 90, MidiConstants.STATUS_CONTROL_CHANGE, 70, -105, 38, 12, -67, 75, 52, 65, -43, -109, 92, -43, 62, -25, 29, 25, -38, 2}, new byte[]{-20, Byte.MAX_VALUE, -41, -98, MidiConstants.STATUS_CHANNEL_PRESSURE, 45, -6, -123, -68, 73, -108, 38, -83, -82, 62, -66, 35, -17, 5, 36, MidiConstants.STATUS_SONG_SELECT, -51, 105, 87, 19, -109, 36, -72, 59, 24, -54, 76}));
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final void setHALInstrumentation() {
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwBinder, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final boolean linkToDeath(IHwBinder.DeathRecipient recipient, long cookie) {
return true;
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final void ping() {
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final DebugInfo getDebugInfo() {
DebugInfo info = new DebugInfo();
info.pid = HidlSupport.getPidIfSharable();
info.ptr = 0;
info.arch = 0;
return info;
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final void notifySyspropsChanged() {
HwBinder.enableInstrumentation();
}
@Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwBinder, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase
public final boolean unlinkToDeath(IHwBinder.DeathRecipient recipient) {
return true;
}
@Override // android.os.IHwBinder
public IHwInterface queryLocalInterface(String descriptor) {
if (IRadioResponse.kInterfaceName.equals(descriptor)) {
return this;
}
return null;
}
public void registerAsService(String serviceName) throws RemoteException {
registerService(serviceName);
}
public String toString() {
return interfaceDescriptor() + "@Stub";
}
@Override // android.os.HwBinder
public void onTransact(int _hidl_code, HwParcel _hidl_request, HwParcel _hidl_reply, int _hidl_flags) throws RemoteException {
boolean _hidl_is_oneway = false;
boolean _hidl_is_oneway2 = true;
switch (_hidl_code) {
case 1:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info = new RadioResponseInfo();
info.readFromParcel(_hidl_request);
CardStatus cardStatus = new CardStatus();
cardStatus.readFromParcel(_hidl_request);
getIccCardStatusResponse(info, cardStatus);
return;
case 2:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info2 = new RadioResponseInfo();
info2.readFromParcel(_hidl_request);
supplyIccPinForAppResponse(info2, _hidl_request.readInt32());
return;
case 3:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info3 = new RadioResponseInfo();
info3.readFromParcel(_hidl_request);
supplyIccPukForAppResponse(info3, _hidl_request.readInt32());
return;
case 4:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info4 = new RadioResponseInfo();
info4.readFromParcel(_hidl_request);
supplyIccPin2ForAppResponse(info4, _hidl_request.readInt32());
return;
case 5:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info5 = new RadioResponseInfo();
info5.readFromParcel(_hidl_request);
supplyIccPuk2ForAppResponse(info5, _hidl_request.readInt32());
return;
case 6:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info6 = new RadioResponseInfo();
info6.readFromParcel(_hidl_request);
changeIccPinForAppResponse(info6, _hidl_request.readInt32());
return;
case 7:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info7 = new RadioResponseInfo();
info7.readFromParcel(_hidl_request);
changeIccPin2ForAppResponse(info7, _hidl_request.readInt32());
return;
case 8:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info8 = new RadioResponseInfo();
info8.readFromParcel(_hidl_request);
supplyNetworkDepersonalizationResponse(info8, _hidl_request.readInt32());
return;
case 9:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info9 = new RadioResponseInfo();
info9.readFromParcel(_hidl_request);
getCurrentCallsResponse(info9, Call.readVectorFromParcel(_hidl_request));
return;
case 10:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info10 = new RadioResponseInfo();
info10.readFromParcel(_hidl_request);
dialResponse(info10);
return;
case 11:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info11 = new RadioResponseInfo();
info11.readFromParcel(_hidl_request);
getIMSIForAppResponse(info11, _hidl_request.readString());
return;
case 12:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info12 = new RadioResponseInfo();
info12.readFromParcel(_hidl_request);
hangupConnectionResponse(info12);
return;
case 13:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info13 = new RadioResponseInfo();
info13.readFromParcel(_hidl_request);
hangupWaitingOrBackgroundResponse(info13);
return;
case 14:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info14 = new RadioResponseInfo();
info14.readFromParcel(_hidl_request);
hangupForegroundResumeBackgroundResponse(info14);
return;
case 15:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info15 = new RadioResponseInfo();
info15.readFromParcel(_hidl_request);
switchWaitingOrHoldingAndActiveResponse(info15);
return;
case 16:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info16 = new RadioResponseInfo();
info16.readFromParcel(_hidl_request);
conferenceResponse(info16);
return;
case 17:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info17 = new RadioResponseInfo();
info17.readFromParcel(_hidl_request);
rejectCallResponse(info17);
return;
case 18:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info18 = new RadioResponseInfo();
info18.readFromParcel(_hidl_request);
LastCallFailCauseInfo failCauseinfo = new LastCallFailCauseInfo();
failCauseinfo.readFromParcel(_hidl_request);
getLastCallFailCauseResponse(info18, failCauseinfo);
return;
case 19:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info19 = new RadioResponseInfo();
info19.readFromParcel(_hidl_request);
SignalStrength sigStrength = new SignalStrength();
sigStrength.readFromParcel(_hidl_request);
getSignalStrengthResponse(info19, sigStrength);
return;
case 20:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info20 = new RadioResponseInfo();
info20.readFromParcel(_hidl_request);
VoiceRegStateResult voiceRegResponse = new VoiceRegStateResult();
voiceRegResponse.readFromParcel(_hidl_request);
getVoiceRegistrationStateResponse(info20, voiceRegResponse);
return;
case 21:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info21 = new RadioResponseInfo();
info21.readFromParcel(_hidl_request);
DataRegStateResult dataRegResponse = new DataRegStateResult();
dataRegResponse.readFromParcel(_hidl_request);
getDataRegistrationStateResponse(info21, dataRegResponse);
return;
case 22:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info22 = new RadioResponseInfo();
info22.readFromParcel(_hidl_request);
getOperatorResponse(info22, _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString());
return;
case 23:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info23 = new RadioResponseInfo();
info23.readFromParcel(_hidl_request);
setRadioPowerResponse(info23);
return;
case 24:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info24 = new RadioResponseInfo();
info24.readFromParcel(_hidl_request);
sendDtmfResponse(info24);
return;
case 25:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info25 = new RadioResponseInfo();
info25.readFromParcel(_hidl_request);
SendSmsResult sms = new SendSmsResult();
sms.readFromParcel(_hidl_request);
sendSmsResponse(info25, sms);
return;
case 26:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info26 = new RadioResponseInfo();
info26.readFromParcel(_hidl_request);
SendSmsResult sms2 = new SendSmsResult();
sms2.readFromParcel(_hidl_request);
sendSMSExpectMoreResponse(info26, sms2);
return;
case 27:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info27 = new RadioResponseInfo();
info27.readFromParcel(_hidl_request);
SetupDataCallResult dcResponse = new SetupDataCallResult();
dcResponse.readFromParcel(_hidl_request);
setupDataCallResponse(info27, dcResponse);
return;
case 28:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info28 = new RadioResponseInfo();
info28.readFromParcel(_hidl_request);
IccIoResult iccIo = new IccIoResult();
iccIo.readFromParcel(_hidl_request);
iccIOForAppResponse(info28, iccIo);
return;
case 29:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info29 = new RadioResponseInfo();
info29.readFromParcel(_hidl_request);
sendUssdResponse(info29);
return;
case 30:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info30 = new RadioResponseInfo();
info30.readFromParcel(_hidl_request);
cancelPendingUssdResponse(info30);
return;
case 31:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info31 = new RadioResponseInfo();
info31.readFromParcel(_hidl_request);
getClirResponse(info31, _hidl_request.readInt32(), _hidl_request.readInt32());
return;
case 32:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info32 = new RadioResponseInfo();
info32.readFromParcel(_hidl_request);
setClirResponse(info32);
return;
case 33:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info33 = new RadioResponseInfo();
info33.readFromParcel(_hidl_request);
getCallForwardStatusResponse(info33, CallForwardInfo.readVectorFromParcel(_hidl_request));
return;
case 34:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info34 = new RadioResponseInfo();
info34.readFromParcel(_hidl_request);
setCallForwardResponse(info34);
return;
case 35:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info35 = new RadioResponseInfo();
info35.readFromParcel(_hidl_request);
getCallWaitingResponse(info35, _hidl_request.readBool(), _hidl_request.readInt32());
return;
case 36:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info36 = new RadioResponseInfo();
info36.readFromParcel(_hidl_request);
setCallWaitingResponse(info36);
return;
case 37:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info37 = new RadioResponseInfo();
info37.readFromParcel(_hidl_request);
acknowledgeLastIncomingGsmSmsResponse(info37);
return;
case 38:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info38 = new RadioResponseInfo();
info38.readFromParcel(_hidl_request);
acceptCallResponse(info38);
return;
case 39:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info39 = new RadioResponseInfo();
info39.readFromParcel(_hidl_request);
deactivateDataCallResponse(info39);
return;
case 40:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info40 = new RadioResponseInfo();
info40.readFromParcel(_hidl_request);
getFacilityLockForAppResponse(info40, _hidl_request.readInt32());
return;
case 41:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info41 = new RadioResponseInfo();
info41.readFromParcel(_hidl_request);
setFacilityLockForAppResponse(info41, _hidl_request.readInt32());
return;
case 42:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info42 = new RadioResponseInfo();
info42.readFromParcel(_hidl_request);
setBarringPasswordResponse(info42);
return;
case 43:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info43 = new RadioResponseInfo();
info43.readFromParcel(_hidl_request);
getNetworkSelectionModeResponse(info43, _hidl_request.readBool());
return;
case 44:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info44 = new RadioResponseInfo();
info44.readFromParcel(_hidl_request);
setNetworkSelectionModeAutomaticResponse(info44);
return;
case 45:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info45 = new RadioResponseInfo();
info45.readFromParcel(_hidl_request);
setNetworkSelectionModeManualResponse(info45);
return;
case 46:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info46 = new RadioResponseInfo();
info46.readFromParcel(_hidl_request);
getAvailableNetworksResponse(info46, OperatorInfo.readVectorFromParcel(_hidl_request));
return;
case 47:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info47 = new RadioResponseInfo();
info47.readFromParcel(_hidl_request);
startDtmfResponse(info47);
return;
case 48:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info48 = new RadioResponseInfo();
info48.readFromParcel(_hidl_request);
stopDtmfResponse(info48);
return;
case 49:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info49 = new RadioResponseInfo();
info49.readFromParcel(_hidl_request);
getBasebandVersionResponse(info49, _hidl_request.readString());
return;
case 50:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info50 = new RadioResponseInfo();
info50.readFromParcel(_hidl_request);
separateConnectionResponse(info50);
return;
case 51:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info51 = new RadioResponseInfo();
info51.readFromParcel(_hidl_request);
setMuteResponse(info51);
return;
case 52:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info52 = new RadioResponseInfo();
info52.readFromParcel(_hidl_request);
getMuteResponse(info52, _hidl_request.readBool());
return;
case 53:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info53 = new RadioResponseInfo();
info53.readFromParcel(_hidl_request);
getClipResponse(info53, _hidl_request.readInt32());
return;
case 54:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info54 = new RadioResponseInfo();
info54.readFromParcel(_hidl_request);
getDataCallListResponse(info54, SetupDataCallResult.readVectorFromParcel(_hidl_request));
return;
case 55:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info55 = new RadioResponseInfo();
info55.readFromParcel(_hidl_request);
setSuppServiceNotificationsResponse(info55);
return;
case 56:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info56 = new RadioResponseInfo();
info56.readFromParcel(_hidl_request);
writeSmsToSimResponse(info56, _hidl_request.readInt32());
return;
case 57:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info57 = new RadioResponseInfo();
info57.readFromParcel(_hidl_request);
deleteSmsOnSimResponse(info57);
return;
case 58:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info58 = new RadioResponseInfo();
info58.readFromParcel(_hidl_request);
setBandModeResponse(info58);
return;
case 59:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info59 = new RadioResponseInfo();
info59.readFromParcel(_hidl_request);
getAvailableBandModesResponse(info59, _hidl_request.readInt32Vector());
return;
case 60:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info60 = new RadioResponseInfo();
info60.readFromParcel(_hidl_request);
sendEnvelopeResponse(info60, _hidl_request.readString());
return;
case 61:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info61 = new RadioResponseInfo();
info61.readFromParcel(_hidl_request);
sendTerminalResponseToSimResponse(info61);
return;
case 62:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info62 = new RadioResponseInfo();
info62.readFromParcel(_hidl_request);
handleStkCallSetupRequestFromSimResponse(info62);
return;
case 63:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info63 = new RadioResponseInfo();
info63.readFromParcel(_hidl_request);
explicitCallTransferResponse(info63);
return;
case 64:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info64 = new RadioResponseInfo();
info64.readFromParcel(_hidl_request);
setPreferredNetworkTypeResponse(info64);
return;
case 65:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info65 = new RadioResponseInfo();
info65.readFromParcel(_hidl_request);
getPreferredNetworkTypeResponse(info65, _hidl_request.readInt32());
return;
case 66:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info66 = new RadioResponseInfo();
info66.readFromParcel(_hidl_request);
getNeighboringCidsResponse(info66, NeighboringCell.readVectorFromParcel(_hidl_request));
return;
case 67:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info67 = new RadioResponseInfo();
info67.readFromParcel(_hidl_request);
setLocationUpdatesResponse(info67);
return;
case 68:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info68 = new RadioResponseInfo();
info68.readFromParcel(_hidl_request);
setCdmaSubscriptionSourceResponse(info68);
return;
case 69:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info69 = new RadioResponseInfo();
info69.readFromParcel(_hidl_request);
setCdmaRoamingPreferenceResponse(info69);
return;
case 70:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info70 = new RadioResponseInfo();
info70.readFromParcel(_hidl_request);
getCdmaRoamingPreferenceResponse(info70, _hidl_request.readInt32());
return;
case 71:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info71 = new RadioResponseInfo();
info71.readFromParcel(_hidl_request);
setTTYModeResponse(info71);
return;
case 72:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info72 = new RadioResponseInfo();
info72.readFromParcel(_hidl_request);
getTTYModeResponse(info72, _hidl_request.readInt32());
return;
case 73:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info73 = new RadioResponseInfo();
info73.readFromParcel(_hidl_request);
setPreferredVoicePrivacyResponse(info73);
return;
case 74:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info74 = new RadioResponseInfo();
info74.readFromParcel(_hidl_request);
getPreferredVoicePrivacyResponse(info74, _hidl_request.readBool());
return;
case 75:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info75 = new RadioResponseInfo();
info75.readFromParcel(_hidl_request);
sendCDMAFeatureCodeResponse(info75);
return;
case 76:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info76 = new RadioResponseInfo();
info76.readFromParcel(_hidl_request);
sendBurstDtmfResponse(info76);
return;
case 77:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info77 = new RadioResponseInfo();
info77.readFromParcel(_hidl_request);
SendSmsResult sms3 = new SendSmsResult();
sms3.readFromParcel(_hidl_request);
sendCdmaSmsResponse(info77, sms3);
return;
case 78:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info78 = new RadioResponseInfo();
info78.readFromParcel(_hidl_request);
acknowledgeLastIncomingCdmaSmsResponse(info78);
return;
case 79:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info79 = new RadioResponseInfo();
info79.readFromParcel(_hidl_request);
getGsmBroadcastConfigResponse(info79, GsmBroadcastSmsConfigInfo.readVectorFromParcel(_hidl_request));
return;
case 80:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info80 = new RadioResponseInfo();
info80.readFromParcel(_hidl_request);
setGsmBroadcastConfigResponse(info80);
return;
case 81:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info81 = new RadioResponseInfo();
info81.readFromParcel(_hidl_request);
setGsmBroadcastActivationResponse(info81);
return;
case 82:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info82 = new RadioResponseInfo();
info82.readFromParcel(_hidl_request);
getCdmaBroadcastConfigResponse(info82, CdmaBroadcastSmsConfigInfo.readVectorFromParcel(_hidl_request));
return;
case 83:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info83 = new RadioResponseInfo();
info83.readFromParcel(_hidl_request);
setCdmaBroadcastConfigResponse(info83);
return;
case 84:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info84 = new RadioResponseInfo();
info84.readFromParcel(_hidl_request);
setCdmaBroadcastActivationResponse(info84);
return;
case 85:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info85 = new RadioResponseInfo();
info85.readFromParcel(_hidl_request);
getCDMASubscriptionResponse(info85, _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString());
return;
case 86:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info86 = new RadioResponseInfo();
info86.readFromParcel(_hidl_request);
writeSmsToRuimResponse(info86, _hidl_request.readInt32());
return;
case 87:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info87 = new RadioResponseInfo();
info87.readFromParcel(_hidl_request);
deleteSmsOnRuimResponse(info87);
return;
case 88:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info88 = new RadioResponseInfo();
info88.readFromParcel(_hidl_request);
getDeviceIdentityResponse(info88, _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString());
return;
case 89:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info89 = new RadioResponseInfo();
info89.readFromParcel(_hidl_request);
exitEmergencyCallbackModeResponse(info89);
return;
case 90:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info90 = new RadioResponseInfo();
info90.readFromParcel(_hidl_request);
getSmscAddressResponse(info90, _hidl_request.readString());
return;
case 91:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info91 = new RadioResponseInfo();
info91.readFromParcel(_hidl_request);
setSmscAddressResponse(info91);
return;
case 92:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info92 = new RadioResponseInfo();
info92.readFromParcel(_hidl_request);
reportSmsMemoryStatusResponse(info92);
return;
case 93:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info93 = new RadioResponseInfo();
info93.readFromParcel(_hidl_request);
reportStkServiceIsRunningResponse(info93);
return;
case 94:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info94 = new RadioResponseInfo();
info94.readFromParcel(_hidl_request);
getCdmaSubscriptionSourceResponse(info94, _hidl_request.readInt32());
return;
case 95:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info95 = new RadioResponseInfo();
info95.readFromParcel(_hidl_request);
requestIsimAuthenticationResponse(info95, _hidl_request.readString());
return;
case 96:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info96 = new RadioResponseInfo();
info96.readFromParcel(_hidl_request);
acknowledgeIncomingGsmSmsWithPduResponse(info96);
return;
case 97:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info97 = new RadioResponseInfo();
info97.readFromParcel(_hidl_request);
IccIoResult iccIo2 = new IccIoResult();
iccIo2.readFromParcel(_hidl_request);
sendEnvelopeWithStatusResponse(info97, iccIo2);
return;
case 98:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info98 = new RadioResponseInfo();
info98.readFromParcel(_hidl_request);
getVoiceRadioTechnologyResponse(info98, _hidl_request.readInt32());
return;
case 99:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info99 = new RadioResponseInfo();
info99.readFromParcel(_hidl_request);
getCellInfoListResponse(info99, CellInfo.readVectorFromParcel(_hidl_request));
return;
case 100:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info100 = new RadioResponseInfo();
info100.readFromParcel(_hidl_request);
setCellInfoListRateResponse(info100);
return;
case 101:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info101 = new RadioResponseInfo();
info101.readFromParcel(_hidl_request);
setInitialAttachApnResponse(info101);
return;
case 102:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info102 = new RadioResponseInfo();
info102.readFromParcel(_hidl_request);
getImsRegistrationStateResponse(info102, _hidl_request.readBool(), _hidl_request.readInt32());
return;
case 103:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info103 = new RadioResponseInfo();
info103.readFromParcel(_hidl_request);
SendSmsResult sms4 = new SendSmsResult();
sms4.readFromParcel(_hidl_request);
sendImsSmsResponse(info103, sms4);
return;
case 104:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info104 = new RadioResponseInfo();
info104.readFromParcel(_hidl_request);
IccIoResult result = new IccIoResult();
result.readFromParcel(_hidl_request);
iccTransmitApduBasicChannelResponse(info104, result);
return;
case 105:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info105 = new RadioResponseInfo();
info105.readFromParcel(_hidl_request);
iccOpenLogicalChannelResponse(info105, _hidl_request.readInt32(), _hidl_request.readInt8Vector());
return;
case 106:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info106 = new RadioResponseInfo();
info106.readFromParcel(_hidl_request);
iccCloseLogicalChannelResponse(info106);
return;
case 107:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info107 = new RadioResponseInfo();
info107.readFromParcel(_hidl_request);
IccIoResult result2 = new IccIoResult();
result2.readFromParcel(_hidl_request);
iccTransmitApduLogicalChannelResponse(info107, result2);
return;
case 108:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info108 = new RadioResponseInfo();
info108.readFromParcel(_hidl_request);
nvReadItemResponse(info108, _hidl_request.readString());
return;
case 109:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info109 = new RadioResponseInfo();
info109.readFromParcel(_hidl_request);
nvWriteItemResponse(info109);
return;
case 110:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info110 = new RadioResponseInfo();
info110.readFromParcel(_hidl_request);
nvWriteCdmaPrlResponse(info110);
return;
case 111:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info111 = new RadioResponseInfo();
info111.readFromParcel(_hidl_request);
nvResetConfigResponse(info111);
return;
case 112:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info112 = new RadioResponseInfo();
info112.readFromParcel(_hidl_request);
setUiccSubscriptionResponse(info112);
return;
case 113:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info113 = new RadioResponseInfo();
info113.readFromParcel(_hidl_request);
setDataAllowedResponse(info113);
return;
case 114:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info114 = new RadioResponseInfo();
info114.readFromParcel(_hidl_request);
getHardwareConfigResponse(info114, HardwareConfig.readVectorFromParcel(_hidl_request));
return;
case 115:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info115 = new RadioResponseInfo();
info115.readFromParcel(_hidl_request);
IccIoResult result3 = new IccIoResult();
result3.readFromParcel(_hidl_request);
requestIccSimAuthenticationResponse(info115, result3);
return;
case 116:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info116 = new RadioResponseInfo();
info116.readFromParcel(_hidl_request);
setDataProfileResponse(info116);
return;
case 117:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info117 = new RadioResponseInfo();
info117.readFromParcel(_hidl_request);
requestShutdownResponse(info117);
return;
case 118:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info118 = new RadioResponseInfo();
info118.readFromParcel(_hidl_request);
RadioCapability rc = new RadioCapability();
rc.readFromParcel(_hidl_request);
getRadioCapabilityResponse(info118, rc);
return;
case 119:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info119 = new RadioResponseInfo();
info119.readFromParcel(_hidl_request);
RadioCapability rc2 = new RadioCapability();
rc2.readFromParcel(_hidl_request);
setRadioCapabilityResponse(info119, rc2);
return;
case 120:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info120 = new RadioResponseInfo();
info120.readFromParcel(_hidl_request);
LceStatusInfo statusInfo = new LceStatusInfo();
statusInfo.readFromParcel(_hidl_request);
startLceServiceResponse(info120, statusInfo);
return;
case 121:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info121 = new RadioResponseInfo();
info121.readFromParcel(_hidl_request);
LceStatusInfo statusInfo2 = new LceStatusInfo();
statusInfo2.readFromParcel(_hidl_request);
stopLceServiceResponse(info121, statusInfo2);
return;
case 122:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info122 = new RadioResponseInfo();
info122.readFromParcel(_hidl_request);
LceDataInfo lceInfo = new LceDataInfo();
lceInfo.readFromParcel(_hidl_request);
pullLceDataResponse(info122, lceInfo);
return;
case 123:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info123 = new RadioResponseInfo();
info123.readFromParcel(_hidl_request);
ActivityStatsInfo activityInfo = new ActivityStatsInfo();
activityInfo.readFromParcel(_hidl_request);
getModemActivityInfoResponse(info123, activityInfo);
return;
case 124:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info124 = new RadioResponseInfo();
info124.readFromParcel(_hidl_request);
setAllowedCarriersResponse(info124, _hidl_request.readInt32());
return;
case 125:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info125 = new RadioResponseInfo();
info125.readFromParcel(_hidl_request);
boolean allAllowed = _hidl_request.readBool();
CarrierRestrictions carriers = new CarrierRestrictions();
carriers.readFromParcel(_hidl_request);
getAllowedCarriersResponse(info125, allAllowed, carriers);
return;
case 126:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info126 = new RadioResponseInfo();
info126.readFromParcel(_hidl_request);
sendDeviceStateResponse(info126);
return;
case 127:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info127 = new RadioResponseInfo();
info127.readFromParcel(_hidl_request);
setIndicationFilterResponse(info127);
return;
case 128:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
RadioResponseInfo info128 = new RadioResponseInfo();
info128.readFromParcel(_hidl_request);
setSimCardPowerResponse(info128);
return;
case 129:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName);
acknowledgeRequest(_hidl_request.readInt32());
return;
case 130:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IRadioResponse.kInterfaceName);
RadioResponseInfo info129 = new RadioResponseInfo();
info129.readFromParcel(_hidl_request);
setCarrierInfoForImsiEncryptionResponse(info129);
return;
case 131:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IRadioResponse.kInterfaceName);
RadioResponseInfo info130 = new RadioResponseInfo();
info130.readFromParcel(_hidl_request);
setSimCardPowerResponse_1_1(info130);
return;
case 132:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IRadioResponse.kInterfaceName);
RadioResponseInfo info131 = new RadioResponseInfo();
info131.readFromParcel(_hidl_request);
startNetworkScanResponse(info131);
return;
case 133:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IRadioResponse.kInterfaceName);
RadioResponseInfo info132 = new RadioResponseInfo();
info132.readFromParcel(_hidl_request);
stopNetworkScanResponse(info132);
return;
case 134:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IRadioResponse.kInterfaceName);
RadioResponseInfo info133 = new RadioResponseInfo();
info133.readFromParcel(_hidl_request);
KeepaliveStatus status = new KeepaliveStatus();
status.readFromParcel(_hidl_request);
startKeepaliveResponse(info133, status);
return;
case 135:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IRadioResponse.kInterfaceName);
RadioResponseInfo info134 = new RadioResponseInfo();
info134.readFromParcel(_hidl_request);
stopKeepaliveResponse(info134);
return;
default:
switch (_hidl_code) {
case 256067662:
if ((_hidl_flags & 1) == 0) {
_hidl_is_oneway2 = false;
}
if (_hidl_is_oneway2) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IBase.kInterfaceName);
ArrayList<String> _hidl_out_descriptors = interfaceChain();
_hidl_reply.writeStatus(0);
_hidl_reply.writeStringVector(_hidl_out_descriptors);
_hidl_reply.send();
return;
case 256131655:
if ((_hidl_flags & 1) == 0) {
_hidl_is_oneway2 = false;
}
if (_hidl_is_oneway2) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IBase.kInterfaceName);
debug(_hidl_request.readNativeHandle(), _hidl_request.readStringVector());
_hidl_reply.writeStatus(0);
_hidl_reply.send();
return;
case 256136003:
if ((_hidl_flags & 1) == 0) {
_hidl_is_oneway2 = false;
}
if (_hidl_is_oneway2) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IBase.kInterfaceName);
String _hidl_out_descriptor = interfaceDescriptor();
_hidl_reply.writeStatus(0);
_hidl_reply.writeString(_hidl_out_descriptor);
_hidl_reply.send();
return;
case 256398152:
if ((_hidl_flags & 1) == 0) {
_hidl_is_oneway2 = false;
}
if (_hidl_is_oneway2) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IBase.kInterfaceName);
ArrayList<byte[]> _hidl_out_hashchain = getHashChain();
_hidl_reply.writeStatus(0);
HwBlob _hidl_blob = new HwBlob(16);
int _hidl_vec_size = _hidl_out_hashchain.size();
_hidl_blob.putInt32(8, _hidl_vec_size);
_hidl_blob.putBool(12, false);
HwBlob childBlob = new HwBlob(_hidl_vec_size * 32);
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
long _hidl_array_offset_1 = (long) (_hidl_index_0 * 32);
byte[] _hidl_array_item_1 = _hidl_out_hashchain.get(_hidl_index_0);
if (_hidl_array_item_1 == null || _hidl_array_item_1.length != 32) {
throw new IllegalArgumentException("Array element is not of the expected length");
}
childBlob.putInt8Array(_hidl_array_offset_1, _hidl_array_item_1);
}
_hidl_blob.putBlob(0, childBlob);
_hidl_reply.writeBuffer(_hidl_blob);
_hidl_reply.send();
return;
case 256462420:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IBase.kInterfaceName);
setHALInstrumentation();
return;
case 256660548:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
return;
case 256921159:
if ((_hidl_flags & 1) == 0) {
_hidl_is_oneway2 = false;
}
if (_hidl_is_oneway2) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IBase.kInterfaceName);
ping();
_hidl_reply.writeStatus(0);
_hidl_reply.send();
return;
case 257049926:
if ((_hidl_flags & 1) == 0) {
_hidl_is_oneway2 = false;
}
if (_hidl_is_oneway2) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IBase.kInterfaceName);
DebugInfo _hidl_out_info = getDebugInfo();
_hidl_reply.writeStatus(0);
_hidl_out_info.writeToParcel(_hidl_reply);
_hidl_reply.send();
return;
case 257120595:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (!_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
_hidl_request.enforceInterface(IBase.kInterfaceName);
notifySyspropsChanged();
return;
case 257250372:
if ((_hidl_flags & 1) != 0) {
_hidl_is_oneway = true;
}
if (_hidl_is_oneway) {
_hidl_reply.writeStatus(Integer.MIN_VALUE);
_hidl_reply.send();
return;
}
return;
default:
return;
}
}
}
}
}
| [
"[email protected]"
] | |
5e876640500aef02f9d5b85c3c3b7aeddf0071ed | f474c2cef8eca505c5546e1d2bf898d886e147e0 | /src/main/command/MonitorableThread.java | 7aaed823969f41dd775558385df5d60152974e2a | [] | no_license | P2LGames/PGFramework | b081a937de4cdd4e4a5ddc76956123c5580f707a | 287523390b5ad5d6890a8c0b5a8992680ef8a021 | refs/heads/master | 2023-07-17T01:40:57.584118 | 2021-01-14T05:45:28 | 2021-01-14T05:45:28 | 314,078,167 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 238 | java | package main.command;
public interface MonitorableThread {
void run();
void start();
void stop();
int getEntityId();
byte[] compileTimeoutError();
boolean isFinished();
void setTimedOut(boolean timedOut);
}
| [
"[email protected]"
] | |
4fd9e46b8ae09a2e8a08975b55329d067123af2b | 65595359a577e7b77e532adc60519ba1ba00cbd7 | /app/src/main/java/com/gsplayer/persistance/source/sqlite/CounterSqlite.java | ab96759357555cda520d8d9221d87832a792a56c | [] | no_license | celluloid90/GSPlayer | d347200eb2eda5238348b0be659e85430ac465fe | 38c4c93ed6bc52c09bdf46a063c75fe8b73465f9 | refs/heads/master | 2021-01-10T13:26:29.766086 | 2016-03-24T10:42:16 | 2016-03-24T10:42:16 | 54,632,361 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,037 | java | package com.gsplayer.persistance.source.sqlite;
import android.database.Cursor;
import com.gsplayer.persistance.source.relational.Table;
import com.gsplayer.persistance.source.sql.Counter;
/**
* TURTLE PLAYER
* <p/>
* Licensed under MIT & GPL
* <p/>
* 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.
* <p/>
* More Information @ com.gpss.com
*
* @author Simon Honegger (Hoene84)
*/
public class CounterSqlite extends Counter
{
public CounterSqlite(Table table)
{
super(table);
}
public Integer create(Cursor queryResult)
{
queryResult.moveToFirst();
return queryResult.getInt(0);
}
}
| [
"[email protected]"
] | |
333913d5a481b2b724c9be02e4eb52538ef806f6 | f8c8707eeb0719e3f75e745fcbf8597745008b47 | /java code/eclipse-workspace/springboot-data/src/main/java/com/edubridge/springboot/data/service/DepartmentService.java | 2d6c2820eeb4898dbaf3ff120e445aa107ed7246 | [] | no_license | gousiya669/edubridgeprojects | 3dd296d5f83145d59823ad25a2d5239af88c4357 | 363a0cef5d3b4d9e214296e2edad7932fe9701c3 | refs/heads/master | 2023-08-12T20:18:12.974442 | 2021-10-05T16:50:36 | 2021-10-05T16:50:36 | 384,156,276 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 449 | java | package com.edubridge.springboot.data.service;
import java.util.List;
import com.edubridge.springboot.data.entities.Department;
public interface DepartmentService {
public Department saveDepartment(Department department);
public List<Department> getAllDepartments();
public Department getDepartmentById(int deptId);
public void deleteDepartmentById(int deptId);
public Department updateDepartment(int deptId , Department department);
}
| [
"[email protected]"
] | |
e69600ab7bd5554375dbaa92dae2bf5be5010aeb | 7e953bd2ce9f2bf1364e1bd09e2763723b46db65 | /src/main/java/core/utilities/General.java | 8939c8c8197689c3703836d3fd2110f6b0ec6d09 | [] | no_license | KOM-Framework/kom-java | a1f1904a6caa0d5c5b1611836312bb2441589096 | 5a8c4919db5506ba1bd8073fb95c13dce608de5a | refs/heads/master | 2020-04-05T13:01:57.868635 | 2017-07-04T14:25:20 | 2017-07-04T14:25:20 | 95,032,450 | 0 | 0 | null | 2017-07-30T19:50:25 | 2017-06-21T18:07:59 | Java | UTF-8 | Java | false | false | 4,570 | java | package core.utilities;
import org.openqa.selenium.By;
import java.util.ArrayList;
/**
* Created by olehk on 07/04/2017.
*/
public class General {
public static String getMiddleValue(String originalString, String startSubStr, String endSubStr){
String out = originalString.substring(originalString.lastIndexOf(startSubStr)+startSubStr.length(), originalString.indexOf(endSubStr));;
return out;
}
public static ArrayList<By> byChainedToByList(Object id){
String tempString = id.toString();
tempString = General.getMiddleValue(tempString, "By.chained({", "})");
String[] arr = tempString.split(",By.");
ArrayList<By> out = new ArrayList<>();
for(String idString:arr){
String expression =idString.substring(idString.indexOf(":")+1, idString.length()).trim();
idString = idString.substring(0,idString.indexOf(":")).trim().replace("By.", "");
switch(idString) {
case "xpath":
out.add(By.xpath(expression));
break;
case "id":
out.add(By.id(expression));
break;
}
}
return out;
}
public enum OrderType {
ASC, DESC
}
public static boolean compareListStringOrder(ArrayList<String> resultList, OrderType orderType){
boolean compareResult=false;
if (resultList.size()==0 | resultList.size()==1) {
compareResult = true;
}else {
for (int i = 0; i < resultList.size() - 1; i++) {
String currentString = resultList.get(i);
String nextString = resultList.get(i + 1);
if (currentString.isEmpty() && nextString.isEmpty()) {
compareResult = true;
i++;
}
if (!currentString.isEmpty() && currentString != null) {
if (!nextString.isEmpty() && nextString != null) {
switch (orderType) {
case ASC:
compareResult = nextString.toLowerCase().compareTo(currentString.toLowerCase()) >= 0;
break;
case DESC:
compareResult = nextString.toLowerCase().compareTo(currentString.toLowerCase()) <= 0;
break;
}
if (!compareResult) {
Log.info(String.format("comparing results with %s order, current value: %s with next value: %s", orderType, currentString, nextString));
break;
}
}
}
}
}
return compareResult;
}
public static boolean compareNumericListOrder(ArrayList<String> resultList, OrderType orderType){
boolean compareResult=false;
if (resultList.size()==0 | resultList.size()==1) {
compareResult = true;
}else {
for (int i = 0; i < resultList.size() - 1; i++) {
String currentString = resultList.get(i).replaceAll("\\s", "").replace(".", "").replace(",", "");
String nextString = resultList.get(i+1).replaceAll("\\s", "").replace(".", "").replace(",", "");
if (currentString.isEmpty() && nextString.isEmpty()) {
compareResult = true;
i++;
}
if (!currentString.isEmpty() && currentString != null) {
Long currentValue = Long.valueOf(currentString);
if (!currentString.isEmpty() && nextString != null) {
Long nextValue = Long.valueOf(nextString);
switch (orderType) {
case ASC:
compareResult = nextValue >= currentValue;
break;
case DESC:
compareResult = nextValue <= currentValue;
break;
}
if (!compareResult) {
Log.info(String.format("comparing results with %s order, current value: %s with next value: %s", orderType, currentString, nextString));
break;
}
}
}
}
}
return compareResult;
}
}
| [
"[email protected]"
] | |
5474fe371349fe55493d9e640f956d983376ffb2 | 76326a5d4a7d74a46a20fb5fbc2be176d5767901 | /src/ChristianA2/OverrideParent.java | c50ea9807b6478d8ff3d50bc38fbde6ef1e21060 | [] | no_license | ChrisgetGit/Java.W2D4.Ekinci.Sander | 9a5511d3f93d11bd02d2f4d20438e0c0ca43d0c9 | 549c928ee869df388e0542b79c35b7811783a37a | refs/heads/master | 2022-11-08T20:52:58.071913 | 2020-07-09T12:55:01 | 2020-07-09T12:55:01 | 278,290,259 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 142 | java | package ChristianA2;
public class OverrideParent {
public void text (){
System.out.println("This is the parent class");
}
}
| [
"[email protected]"
] | |
ad016ecaa3e7ccfe2f46ef9df832c05b204196f2 | 935cb9ac2e91ba4cf5d53746a787c73d4aa1d5b0 | /private_detective/src/privatedetective/FileHandler.java | 1be95160c99b9e170cf41452dba15a414fd915a4 | [] | no_license | galsa/my_play_ground | d568e812ba4c86d2cfc4ad108434be312eed1ec4 | cb53406a490e289a339f433af4bd45f2e3b432f7 | refs/heads/master | 2020-12-02T23:54:31.259804 | 2017-07-01T11:45:34 | 2017-07-01T11:45:34 | 95,960,069 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,602 | java | package privatedetective;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Set;
public class FileHandler {
public static String readFile(String file) throws Exception {
FileReader fileReader = new FileReader(new File(file));
try {
BufferedReader bufferedReader = new BufferedReader(fileReader);
StringBuffer fileContent = new StringBuffer();
String line;
System.out.println("start readingLines:");
while ((line = bufferedReader.readLine()) != null) {
System.out.println(line);
fileContent.append(line);
fileContent.append("\n");
}
System.out.println("Done reading file");
return fileContent.toString();
} finally {
fileReader.close();
}
}
public static void writeFile(String outputFilePath, Set<String> contentToWrite) {
BufferedWriter bw = null;
FileWriter fw = null;
try {
fw = new FileWriter(outputFilePath);
bw = new BufferedWriter(fw);
System.out.println("start writing lines:");
bw.write("The changing word was:");
bw.write("\n");
for (String currentContent : contentToWrite) {
System.out.println(currentContent);
bw.write(currentContent);
}
System.out.println("Done writing file");
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (bw != null)
bw.close();
if (fw != null)
fw.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
}
| [
"[email protected]"
] | |
5810cfd2eee559abcc24bc8229fe9fb4fc1b8c70 | fdab1c9c2e8325d5568a9c2f6938ae035c5a18ef | /src/chen/study/day07继承与多态/内部类/成员内部类的定义与使用/Demo01InnerClass.java | 5776900c27ba0ceab2808e4a84aa3571088c1cc8 | [] | no_license | 2199830642/Java-JavaWeb-Knowledge-points | 95be9504e925200e83caebf02f0137f09edd72fe | bf7a3c44843cb434550346c731a7faf9f2282962 | refs/heads/master | 2022-12-01T19:39:00.466558 | 2020-08-06T14:46:13 | 2020-08-06T14:46:13 | 284,613,470 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,199 | java | package chen.study.day07继承与多态.内部类.成员内部类的定义与使用;
/*
* 如果一个事物的内部 包含另一个事物,这就是一个类包括另外一个类
* :身体与心脏的关系,汽车与发动机
*
* 分类
* 1.成员内部类
* 2.局部内部类(包含匿名内部类)
*
* 1.成员内部类的格式:
* 修饰符 class 类名称{ 外部类名称
* 修饰符 class 类名称{} 内部类名称
* }
* 注意:内用外,随意使用,外用内,一定需要借助内部类对象
*
* 如何使用成员内部类:
* 1.间接使用:在外部类的方法中使用内部类,main只是调用外部类方法
* 2.直接使用:公式:【外部类名称.内部类名称 对象名 = new 外部类名称().new 内部类名称();】
* */
public class Demo01InnerClass {
public static void main(String[] args) {
//通过外部类对象调用外部类的方法,然后里面再间接使用内部类的方法
Body body = new Body();
body.setName("小陈");
body.method();
//直接调用
Body.heart heart = new Body().new heart();
heart.beat();
}
}
| [
"[email protected]"
] | |
bc7a78a6cd6953cd481bda35c62c7738947cdd45 | 6451616fab02a4b2326c471c52ff432958f44f3d | /conexionDB/src/conexiondb/conexionDB.java | 552c05c8526aad052468e26926b1751a8bc9bc35 | [] | no_license | jahazielBH/Practicas_de_Construcccion_SW | 843c4f034f27cae8843246d26c1c8cd1c2a66946 | 0acbd78b3dde54ac7e44428141a01b9877e74d2e | refs/heads/master | 2022-09-09T11:47:48.245601 | 2020-06-04T23:21:04 | 2020-06-04T23:21:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 979 | 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 conexiondb;
import java.sql.Connection;
import java.sql.DriverManager;
/**
*
* @author jahaziel, David, Gabriel
*/
public class conexionDB {
private static conexionDB con=null;
public static conexionDB getInstance(){
if(con==null)
con=new conexionDB();
return con;
}
private Connection conn = null;
private conexionDB(){
String urlDatabase = "jdbc:postgresql://localhost:5432/CRUD";
try{
Class.forName("org.postgresql.Driver");
conn = DriverManager.getConnection(urlDatabase, "postgres", "password");
} catch (Exception e) {
System.out.println("Ocurrio un error:" + e.getMessage());
}
System.out.println("La conexion se realizo sin problemas");
}
}
| [
"[email protected]"
] | |
d1a88f3d58d22b3c2c8a9192bb4ba7bd35bccaa1 | c6f0eb41af209775f264da0ae56e21d7b92d8c87 | /src/test/java/misc/migration/v1_1/EHistory3.java | a3756572a2f7e9be0761ef98ab8dd118539f63a2 | [
"Apache-2.0"
] | permissive | JakubPetr/ebean | 464d88fc466ef4e55258645c189923d99ce5d36f | 4fc47fcd19b568d348bd23a35348198092318094 | refs/heads/master | 2021-06-05T01:53:20.477413 | 2021-05-23T15:45:11 | 2021-05-23T15:45:11 | 136,032,319 | 0 | 1 | NOASSERTION | 2023-05-08T07:01:37 | 2018-06-04T13:51:53 | Java | UTF-8 | Java | false | false | 349 | java | package misc.migration.v1_1;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import io.ebean.annotation.History;
import io.ebean.annotation.HistoryExclude;
@Entity
@Table(name = "migtest_e_history3")
@History
public class EHistory3 {
@Id
Integer id;
@HistoryExclude
String testString;
}
| [
"[email protected]"
] | |
cc275a0cb2cc7060098a37287eab394e36e54422 | 5433952408c865653c6b60212eaaa15c4bbab49c | /Util.java | 6ba0ff9f73977645734cf320533e17d1d20eca1b | [] | no_license | andrew-weinrich/questions | 176c42fcc797f2d95d840afb3a6322d082ada7ab | 03c2e54c61c9fe1b4ae607f286f5413372cbc245 | refs/heads/master | 2020-03-08T22:56:27.755028 | 2018-04-07T01:37:58 | 2018-04-07T01:37:58 | 128,447,358 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,166 | java |
public class Util {
// Converts a list to a string representation
//
// technically, we could just convert the expected and actual outputs to strings
// and then compare those strings, but that's not going to age well.
// better to just test the actual elements, and use the string rep for debugging
public static String listToString(ListNode list) {
// empty list case
if (list == null)
return "(null)";
StringBuilder builder = new StringBuilder();
builder.append(list.val);
ListNode currentNode = list.next;
while (currentNode != null) {
builder.append("->");
builder.append(currentNode.val);
currentNode = currentNode.next;
}
return builder.toString();
}
// compares two lists. returns null if they are identical, or an error string if they are not
public static String compareLists(ListNode list1, ListNode list2) {
ListNode currentOne = list1;
ListNode currentTwo = list2;
int index = 0;
while (currentTwo != null) {
if (currentOne == null) {
return "Not enough elements in list1";
}
if (currentTwo.val != currentOne.val)
return "Mismatch on element " + index + ": " + currentOne.val;
currentTwo = currentTwo.next;
currentOne = currentOne.next;
index++;
}
// check to make sure the actual output isn't too long
if (currentOne != null)
return "Extra elements in list1";
return null;
}
// builds a linked list from an array of numbers
public static ListNode buildList(int[] numbers) {
ListNode output = new ListNode(-1);
ListNode current = output;
for (int i = 0; i < numbers.length; i++) {
ListNode node = new ListNode(numbers[i]);
current.next = node;
current = current.next;
}
return output.next;
}
} | [
"[email protected]"
] | |
9f1c950a6234bc3d78dd1f641b8071bb54b7792e | 8889e6727b6210c1f0c5c0cc0ccfd675207b4f1e | /app/src/main/java/com/okawa/pedro/toolbarpagerdemo/di/scope/Fragment.java | ec374433463dbb9c7b6162f9fdaf95652f5aec21 | [] | no_license | PedroOkawa/toolbar-pager-view | aee9bd2a7427ddfea09d747373827ff1904138ec | ad6687ec21eff5bf1b1963f98724cec85f7841a7 | refs/heads/master | 2021-01-10T16:03:22.682169 | 2016-02-28T00:22:56 | 2016-02-28T00:22:56 | 52,692,027 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 160 | java | package com.okawa.pedro.toolbarpagerdemo.di.scope;
import javax.inject.Scope;
/**
* Created by pokawa on 26/02/16.
*/
@Scope
public @interface Fragment {
}
| [
"[email protected]"
] | |
c14455e878121aaf3636f4e7d0b0bdedbba03831 | dba87418d2286ce141d81deb947305a0eaf9824f | /sources/com/lowagie/text/Table.java | 7df6e3d9dbe5e2541fc5dc7a30a1bf7b65d1dacc | [] | no_license | Sluckson/copyOavct | 1f73f47ce94bb08df44f2ba9f698f2e8589b5cf6 | d20597e14411e8607d1d6e93b632d0cd2e8af8cb | refs/heads/main | 2023-03-09T12:14:38.824373 | 2021-02-26T01:38:16 | 2021-02-26T01:38:16 | 341,292,450 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 32,444 | java | package com.lowagie.text;
import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfPTable;
import harmony.java.awt.Dimension;
import harmony.java.awt.Point;
import java.util.ArrayList;
import java.util.Iterator;
public class Table extends Rectangle implements LargeElement {
private int alignment;
protected boolean autoFillEmptyCells;
private float cellpadding;
boolean cellsFitPage;
private float cellspacing;
private int columns;
protected boolean complete;
protected boolean convert2pdfptable;
private Point curPosition;
private Cell defaultCell;
private int lastHeaderRow;
private boolean locked;
private boolean mTableInserted;
protected boolean notAddedYet;
float offset;
private ArrayList rows;
boolean tableFitsPage;
private float width;
private float[] widths;
public boolean isNestable() {
return true;
}
public int type() {
return 22;
}
public Table(int i) throws BadElementException {
this(i, 1);
}
public Table(int i, int i2) throws BadElementException {
super(0.0f, 0.0f, 0.0f, 0.0f);
this.rows = new ArrayList();
this.curPosition = new Point(0, 0);
this.defaultCell = new Cell(true);
this.lastHeaderRow = -1;
this.alignment = 1;
this.width = 80.0f;
this.locked = false;
this.mTableInserted = false;
this.autoFillEmptyCells = false;
this.tableFitsPage = false;
this.cellsFitPage = false;
this.offset = Float.NaN;
this.convert2pdfptable = false;
this.notAddedYet = true;
this.complete = true;
setBorder(15);
setBorderWidth(1.0f);
this.defaultCell.setBorder(15);
if (i > 0) {
this.columns = i;
for (int i3 = 0; i3 < i2; i3++) {
this.rows.add(new Row(i));
}
this.curPosition = new Point(0, 0);
this.widths = new float[i];
float f = 100.0f / ((float) i);
for (int i4 = 0; i4 < i; i4++) {
this.widths[i4] = f;
}
return;
}
throw new BadElementException("A table should have at least 1 column.");
}
public Table(Table table) {
super(0.0f, 0.0f, 0.0f, 0.0f);
this.rows = new ArrayList();
this.curPosition = new Point(0, 0);
this.defaultCell = new Cell(true);
this.lastHeaderRow = -1;
this.alignment = 1;
this.width = 80.0f;
this.locked = false;
this.mTableInserted = false;
this.autoFillEmptyCells = false;
this.tableFitsPage = false;
this.cellsFitPage = false;
this.offset = Float.NaN;
this.convert2pdfptable = false;
this.notAddedYet = true;
this.complete = true;
cloneNonPositionParameters(table);
this.columns = table.columns;
this.rows = table.rows;
this.curPosition = table.curPosition;
this.defaultCell = table.defaultCell;
this.lastHeaderRow = table.lastHeaderRow;
this.alignment = table.alignment;
this.cellpadding = table.cellpadding;
this.cellspacing = table.cellspacing;
this.width = table.width;
this.widths = table.widths;
this.autoFillEmptyCells = table.autoFillEmptyCells;
this.tableFitsPage = table.tableFitsPage;
this.cellsFitPage = table.cellsFitPage;
this.offset = table.offset;
this.convert2pdfptable = table.convert2pdfptable;
}
public boolean process(ElementListener elementListener) {
try {
return elementListener.add(this);
} catch (DocumentException unused) {
return false;
}
}
public ArrayList getChunks() {
return new ArrayList();
}
public int getColumns() {
return this.columns;
}
public int size() {
return this.rows.size();
}
public Dimension getDimension() {
return new Dimension(this.columns, size());
}
public Cell getDefaultCell() {
return this.defaultCell;
}
public void setDefaultCell(Cell cell) {
this.defaultCell = cell;
}
public int getLastHeaderRow() {
return this.lastHeaderRow;
}
public void setLastHeaderRow(int i) {
this.lastHeaderRow = i;
}
public int endHeaders() {
this.lastHeaderRow = this.curPosition.f4903x - 1;
return this.lastHeaderRow;
}
public int getAlignment() {
return this.alignment;
}
public void setAlignment(int i) {
this.alignment = i;
}
public void setAlignment(String str) {
if ("Left".equalsIgnoreCase(str)) {
this.alignment = 0;
} else if ("right".equalsIgnoreCase(str)) {
this.alignment = 2;
} else {
this.alignment = 1;
}
}
public float getPadding() {
return this.cellpadding;
}
public void setPadding(float f) {
this.cellpadding = f;
}
public float getSpacing() {
return this.cellspacing;
}
public void setSpacing(float f) {
this.cellspacing = f;
}
public void setAutoFillEmptyCells(boolean z) {
this.autoFillEmptyCells = z;
}
public float getWidth() {
return this.width;
}
public void setWidth(float f) {
this.width = f;
}
public boolean isLocked() {
return this.locked;
}
public void setLocked(boolean z) {
this.locked = z;
}
public float[] getProportionalWidths() {
return this.widths;
}
public void setWidths(float[] fArr) throws BadElementException {
int i;
if (fArr.length == this.columns) {
int i2 = 0;
int i3 = 0;
float f = 0.0f;
while (true) {
i = this.columns;
if (i3 >= i) {
break;
}
f += fArr[i3];
i3++;
}
this.widths[i - 1] = 100.0f;
while (true) {
int i4 = this.columns;
if (i2 < i4 - 1) {
float f2 = (fArr[i2] * 100.0f) / f;
float[] fArr2 = this.widths;
fArr2[i2] = f2;
int i5 = i4 - 1;
fArr2[i5] = fArr2[i5] - f2;
i2++;
} else {
return;
}
}
} else {
throw new BadElementException("Wrong number of columns.");
}
}
public void setWidths(int[] iArr) throws DocumentException {
float[] fArr = new float[iArr.length];
for (int i = 0; i < iArr.length; i++) {
fArr[i] = (float) iArr[i];
}
setWidths(fArr);
}
public boolean isTableFitsPage() {
return this.tableFitsPage;
}
public void setTableFitsPage(boolean z) {
this.tableFitsPage = z;
if (z) {
setCellsFitPage(true);
}
}
public boolean isCellsFitPage() {
return this.cellsFitPage;
}
public void setCellsFitPage(boolean z) {
this.cellsFitPage = z;
}
public void setOffset(float f) {
this.offset = f;
}
public float getOffset() {
return this.offset;
}
public boolean isConvert2pdfptable() {
return this.convert2pdfptable;
}
public void setConvert2pdfptable(boolean z) {
this.convert2pdfptable = z;
}
public void addCell(Cell cell, int i, int i2) throws BadElementException {
addCell(cell, new Point(i, i2));
}
public void addCell(Cell cell, Point point) throws BadElementException {
if (cell == null) {
throw new NullPointerException("addCell - cell has null-value");
} else if (point != null) {
if (cell.isTable()) {
insertTable((Table) cell.getElements().next(), point);
}
if (point.f4903x < 0) {
throw new BadElementException("row coordinate of location must be >= 0");
} else if (point.f4904y <= 0 && point.f4904y > this.columns) {
throw new BadElementException("column coordinate of location must be >= 0 and < nr of columns");
} else if (isValidLocation(cell, point)) {
if (cell.getBorder() == -1) {
cell.setBorder(this.defaultCell.getBorder());
}
cell.fill();
placeCell(this.rows, cell, point);
setCurrentLocationToNextValidPosition(point);
} else {
throw new BadElementException("Adding a cell at the location (" + point.f4903x + "," + point.f4904y + ") with a colspan of " + cell.getColspan() + " and a rowspan of " + cell.getRowspan() + " is illegal (beyond boundaries/overlapping).");
}
} else {
throw new NullPointerException("addCell - point has null-value");
}
}
public void addCell(Cell cell) {
try {
addCell(cell, this.curPosition);
} catch (BadElementException unused) {
}
}
public void addCell(Phrase phrase) throws BadElementException {
addCell(phrase, this.curPosition);
}
public void addCell(Phrase phrase, Point point) throws BadElementException {
Cell cell = new Cell((Element) phrase);
cell.setBorder(this.defaultCell.getBorder());
cell.setBorderWidth(this.defaultCell.getBorderWidth());
cell.setBorderColor(this.defaultCell.getBorderColor());
cell.setBackgroundColor(this.defaultCell.getBackgroundColor());
cell.setHorizontalAlignment(this.defaultCell.getHorizontalAlignment());
cell.setVerticalAlignment(this.defaultCell.getVerticalAlignment());
cell.setColspan(this.defaultCell.getColspan());
cell.setRowspan(this.defaultCell.getRowspan());
addCell(cell, point);
}
public void addCell(String str) throws BadElementException {
addCell(new Phrase(str), this.curPosition);
}
public void addCell(String str, Point point) throws BadElementException {
addCell(new Phrase(str), point);
}
public void insertTable(Table table) {
if (table != null) {
insertTable(table, this.curPosition);
return;
}
throw new NullPointerException("insertTable - table has null-value");
}
public void insertTable(Table table, int i, int i2) {
if (table != null) {
insertTable(table, new Point(i, i2));
return;
}
throw new NullPointerException("insertTable - table has null-value");
}
public void insertTable(Table table, Point point) {
if (table == null) {
throw new NullPointerException("insertTable - table has null-value");
} else if (point != null) {
this.mTableInserted = true;
table.complete();
if (point.f4904y <= this.columns) {
int size = (point.f4903x + 1) - this.rows.size();
if (size > 0) {
for (int i = 0; i < size; i++) {
this.rows.add(new Row(this.columns));
}
}
((Row) this.rows.get(point.f4903x)).setElement(table, point.f4904y);
setCurrentLocationToNextValidPosition(point);
return;
}
throw new IllegalArgumentException("insertTable -- wrong columnposition(" + point.f4904y + ") of location; max =" + this.columns);
} else {
throw new NullPointerException("insertTable - point has null-value");
}
}
public void addColumns(int i) {
int i2;
ArrayList arrayList = new ArrayList(this.rows.size());
int i3 = this.columns + i;
int i4 = 0;
while (i4 < this.rows.size()) {
Row row = new Row(i3);
int i5 = 0;
while (true) {
i2 = this.columns;
if (i5 >= i2) {
break;
}
row.setElement(((Row) this.rows.get(i4)).getCell(i5), i5);
i5++;
}
while (i2 < i3 && i4 < this.curPosition.f4903x) {
row.setElement((Object) null, i2);
i2++;
}
arrayList.add(row);
i4++;
}
float[] fArr = new float[i3];
System.arraycopy(this.widths, 0, fArr, 0, this.columns);
for (int i6 = this.columns; i6 < i3; i6++) {
fArr[i6] = 0.0f;
}
this.columns = i3;
this.widths = fArr;
this.rows = arrayList;
}
public void deleteColumn(int i) throws BadElementException {
int i2 = this.columns - 1;
this.columns = i2;
float[] fArr = new float[i2];
System.arraycopy(this.widths, 0, fArr, 0, i);
System.arraycopy(this.widths, i + 1, fArr, i, this.columns - i);
setWidths(fArr);
System.arraycopy(this.widths, 0, fArr, 0, this.columns);
this.widths = fArr;
int size = this.rows.size();
for (int i3 = 0; i3 < size; i3++) {
Row row = (Row) this.rows.get(i3);
row.deleteColumn(i);
this.rows.set(i3, row);
}
if (i == this.columns) {
Point point = this.curPosition;
point.setLocation(point.f4903x + 1, 0);
}
}
public boolean deleteRow(int i) {
if (i < 0 || i >= this.rows.size()) {
return false;
}
this.rows.remove(i);
Point point = this.curPosition;
point.setLocation(point.f4903x - 1, this.curPosition.f4904y);
return true;
}
public void deleteAllRows() {
this.rows.clear();
this.rows.add(new Row(this.columns));
this.curPosition.setLocation(0, 0);
this.lastHeaderRow = -1;
}
public boolean deleteLastRow() {
return deleteRow(this.rows.size() - 1);
}
public void complete() {
if (this.mTableInserted) {
mergeInsertedTables();
this.mTableInserted = false;
}
if (this.autoFillEmptyCells) {
fillEmptyMatrixCells();
}
}
public Object getElement(int i, int i2) {
return ((Row) this.rows.get(i)).getCell(i2);
}
private void mergeInsertedTables() {
int i;
float[] fArr;
float[] fArr2;
Table table;
float[][] fArr3;
float[][] fArr4;
Table table2 = this;
int i2 = table2.columns;
int[] iArr = new int[i2];
float[][] fArr5 = new float[i2][];
int[] iArr2 = new int[table2.rows.size()];
int i3 = 0;
int i4 = 0;
boolean z = false;
while (true) {
i = 1;
if (i3 >= table2.columns) {
break;
}
boolean z2 = z;
int i5 = 1;
float[] fArr6 = null;
int i6 = 0;
while (i6 < table2.rows.size()) {
if (Table.class.isInstance(((Row) table2.rows.get(i6)).getCell(i3))) {
Table table3 = (Table) ((Row) table2.rows.get(i6)).getCell(i3);
if (fArr6 == null) {
fArr6 = table3.widths;
i5 = fArr6.length;
fArr3 = fArr5;
z2 = true;
} else {
int i7 = table3.getDimension().width;
float[] fArr7 = new float[(fArr6.length * i7)];
float f = table3.widths[0] + 0.0f;
float f2 = fArr6[0] + 0.0f;
int i8 = 0;
int i9 = 0;
int i10 = 0;
float f3 = 0.0f;
while (i9 < fArr6.length && i10 < i7) {
if (f > f2) {
fArr7[i8] = f2 - f3;
i9++;
if (i9 < fArr6.length) {
f2 += fArr6[i9];
}
fArr4 = fArr5;
} else {
fArr7[i8] = f - f3;
i10++;
fArr4 = fArr5;
if (((double) Math.abs(f - f2)) < 1.0E-4d && (i9 = i9 + 1) < fArr6.length) {
f2 += fArr6[i9];
}
if (i10 < i7) {
f += table3.widths[i10];
}
}
f3 += fArr7[i8];
i8++;
fArr5 = fArr4;
}
fArr3 = fArr5;
float[] fArr8 = new float[i8];
System.arraycopy(fArr7, 0, fArr8, 0, i8);
fArr6 = fArr8;
i5 = i8;
z2 = true;
i6++;
table2 = this;
fArr5 = fArr3;
}
} else {
fArr3 = fArr5;
}
i6++;
table2 = this;
fArr5 = fArr3;
}
fArr5[i3] = fArr6;
i4 += i5;
iArr[i3] = i5;
i3++;
z = z2;
}
int i11 = 0;
int i12 = 0;
while (i11 < table2.rows.size()) {
int i13 = 1;
for (int i14 = 0; i14 < table2.columns; i14++) {
if (Table.class.isInstance(((Row) table2.rows.get(i11)).getCell(i14))) {
Table table4 = (Table) ((Row) table2.rows.get(i11)).getCell(i14);
if (table4.getDimension().height > i13) {
i13 = table4.getDimension().height;
}
z = true;
}
}
i12 += i13;
iArr2[i11] = i13;
i11++;
i = 1;
}
if (i4 != table2.columns || i12 != table2.rows.size() || z) {
float[] fArr9 = new float[i4];
int i15 = 0;
int i16 = 0;
while (true) {
float[] fArr10 = table2.widths;
if (i15 >= fArr10.length) {
break;
}
float[] fArr11 = fArr9;
if (iArr[i15] != 1) {
for (int i17 = 0; i17 < iArr[i15]; i17++) {
fArr11[i16] = (table2.widths[i15] * fArr5[i15][i17]) / 100.0f;
i16++;
}
} else {
fArr11[i16] = fArr10[i15];
i16++;
}
i15++;
fArr9 = fArr11;
i = 1;
}
ArrayList arrayList = new ArrayList(i12);
int i18 = 0;
while (i18 < i12) {
float[] fArr12 = fArr9;
arrayList.add(new Row(i4));
i18++;
i = 1;
}
int i19 = 0;
for (int i20 = 0; i20 < table2.rows.size(); i20++) {
int i21 = 0;
int i22 = 0;
while (i21 < table2.columns) {
if (Table.class.isInstance(((Row) table2.rows.get(i20)).getCell(i21))) {
Table table5 = (Table) ((Row) table2.rows.get(i20)).getCell(i21);
int[] iArr3 = new int[(table5.widths.length + i)];
int i23 = 0;
int i24 = 0;
while (true) {
float[] fArr13 = table5.widths;
if (i23 >= fArr13.length) {
break;
}
Table table6 = table5;
float[] fArr14 = fArr9;
iArr3[i23] = i22 + i24;
float f4 = fArr13[i23];
int i25 = i24;
float f5 = 0.0f;
while (true) {
if (i25 >= iArr[i21]) {
i24 = i25;
break;
}
i24 = i25 + 1;
f5 += fArr5[i21][i25];
float f6 = f4;
if (((double) Math.abs(f4 - f5)) < 1.0E-4d) {
break;
}
f4 = f6;
i25 = i24;
}
i23++;
table5 = table6;
fArr9 = fArr14;
}
iArr3[i23] = i22 + i24;
for (int i26 = 0; i26 < table5.getDimension().height; i26++) {
int i27 = 0;
while (i27 < table5.getDimension().width) {
Object element = table5.getElement(i26, i27);
if (element != null) {
int i28 = i22 + i27;
table = table5;
if (Cell.class.isInstance(element)) {
Cell cell = (Cell) element;
i28 = iArr3[i27];
fArr2 = fArr9;
cell.setColspan(iArr3[i27 + cell.getColspan()] - i28);
} else {
fArr2 = fArr9;
}
((Row) arrayList.get(i26 + i19)).addElement(element, i28);
} else {
table = table5;
fArr2 = fArr9;
}
i27++;
table5 = table;
fArr9 = fArr2;
}
}
fArr = fArr9;
} else {
fArr = fArr9;
Object element2 = table2.getElement(i20, i21);
if (Cell.class.isInstance(element2)) {
Cell cell2 = (Cell) element2;
cell2.setRowspan((((Cell) ((Row) table2.rows.get(i20)).getCell(i21)).getRowspan() + iArr2[i20]) - 1);
cell2.setColspan((((Cell) ((Row) table2.rows.get(i20)).getCell(i21)).getColspan() + iArr[i21]) - 1);
table2.placeCell(arrayList, cell2, new Point(i19, i22));
}
}
i22 += iArr[i21];
i21++;
fArr9 = fArr;
i = 1;
}
i19 += iArr2[i20];
}
table2.columns = i4;
table2.rows = arrayList;
table2.widths = fArr9;
}
}
private void fillEmptyMatrixCells() {
int i = 0;
while (i < this.rows.size()) {
try {
for (int i2 = 0; i2 < this.columns; i2++) {
if (!((Row) this.rows.get(i)).isReserved(i2)) {
addCell(this.defaultCell, new Point(i, i2));
}
}
i++;
} catch (BadElementException e) {
throw new ExceptionConverter(e);
}
}
}
private boolean isValidLocation(Cell cell, Point point) {
if (point.f4903x < this.rows.size()) {
if (point.f4904y + cell.getColspan() > this.columns) {
return false;
}
int rowspan = this.rows.size() - point.f4903x > cell.getRowspan() ? cell.getRowspan() : this.rows.size() - point.f4903x;
int colspan = this.columns - point.f4904y > cell.getColspan() ? cell.getColspan() : this.columns - point.f4904y;
for (int i = point.f4903x; i < point.f4903x + rowspan; i++) {
for (int i2 = point.f4904y; i2 < point.f4904y + colspan; i2++) {
if (((Row) this.rows.get(i)).isReserved(i2)) {
return false;
}
}
}
return true;
} else if (point.f4904y + cell.getColspan() > this.columns) {
return false;
} else {
return true;
}
}
private void assumeTableDefaults(Cell cell) {
if (cell.getBorder() == -1) {
cell.setBorder(this.defaultCell.getBorder());
}
if (cell.getBorderWidth() == -1.0f) {
cell.setBorderWidth(this.defaultCell.getBorderWidth());
}
if (cell.getBorderColor() == null) {
cell.setBorderColor(this.defaultCell.getBorderColor());
}
if (cell.getBackgroundColor() == null) {
cell.setBackgroundColor(this.defaultCell.getBackgroundColor());
}
if (cell.getHorizontalAlignment() == -1) {
cell.setHorizontalAlignment(this.defaultCell.getHorizontalAlignment());
}
if (cell.getVerticalAlignment() == -1) {
cell.setVerticalAlignment(this.defaultCell.getVerticalAlignment());
}
}
private void placeCell(ArrayList arrayList, Cell cell, Point point) {
int rowspan = (point.f4903x + cell.getRowspan()) - arrayList.size();
assumeTableDefaults(cell);
if (point.f4903x + cell.getRowspan() > arrayList.size()) {
for (int i = 0; i < rowspan; i++) {
arrayList.add(new Row(this.columns));
}
}
int i2 = point.f4903x;
do {
i2++;
if (i2 >= point.f4903x + cell.getRowspan()) {
((Row) arrayList.get(point.f4903x)).addElement(cell, point.f4904y);
return;
}
} while (((Row) arrayList.get(i2)).reserve(point.f4904y, cell.getColspan()));
throw new RuntimeException("addCell - error in reserve");
}
/* JADX WARNING: Removed duplicated region for block: B:3:0x000a */
/* Code decompiled incorrectly, please refer to instructions dump. */
private void setCurrentLocationToNextValidPosition(harmony.java.awt.Point r3) {
/*
r2 = this;
int r0 = r3.f4903x
int r3 = r3.f4904y
L_0x0004:
int r3 = r3 + 1
int r1 = r2.columns
if (r3 != r1) goto L_0x000d
int r0 = r0 + 1
r3 = 0
L_0x000d:
java.util.ArrayList r1 = r2.rows
int r1 = r1.size()
if (r0 >= r1) goto L_0x0027
int r1 = r2.columns
if (r3 >= r1) goto L_0x0027
java.util.ArrayList r1 = r2.rows
java.lang.Object r1 = r1.get(r0)
com.lowagie.text.Row r1 = (com.lowagie.text.Row) r1
boolean r1 = r1.isReserved(r3)
if (r1 != 0) goto L_0x0004
L_0x0027:
harmony.java.awt.Point r1 = new harmony.java.awt.Point
r1.<init>(r0, r3)
r2.curPosition = r1
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.lowagie.text.Table.setCurrentLocationToNextValidPosition(harmony.java.awt.Point):void");
}
public float[] getWidths(float f, float f2) {
float f3;
int i = 1;
float[] fArr = new float[(this.columns + 1)];
if (this.locked) {
f3 = (this.width * 100.0f) / f2;
} else {
f3 = this.width;
}
int i2 = this.alignment;
if (i2 == 0) {
fArr[0] = f;
} else if (i2 != 2) {
fArr[0] = f + (((100.0f - f3) * f2) / 200.0f);
} else {
fArr[0] = f + (((100.0f - f3) * f2) / 100.0f);
}
float f4 = (f2 * f3) / 100.0f;
while (true) {
int i3 = this.columns;
if (i >= i3) {
fArr[i3] = fArr[0] + f4;
return fArr;
}
int i4 = i - 1;
fArr[i] = fArr[i4] + ((this.widths[i4] * f4) / 100.0f);
i++;
}
}
public Iterator iterator() {
return this.rows.iterator();
}
public PdfPTable createPdfPTable() throws BadElementException {
PdfPCell pdfPCell;
if (this.convert2pdfptable) {
setAutoFillEmptyCells(true);
complete();
PdfPTable pdfPTable = new PdfPTable(this.widths);
pdfPTable.setComplete(this.complete);
if (isNotAddedYet()) {
pdfPTable.setSkipFirstHeader(true);
}
SimpleTable simpleTable = new SimpleTable();
simpleTable.cloneNonPositionParameters(this);
simpleTable.setCellspacing(this.cellspacing);
pdfPTable.setTableEvent(simpleTable);
pdfPTable.setHeaderRows(this.lastHeaderRow + 1);
pdfPTable.setSplitLate(this.cellsFitPage);
pdfPTable.setKeepTogether(this.tableFitsPage);
if (!Float.isNaN(this.offset)) {
pdfPTable.setSpacingBefore(this.offset);
}
pdfPTable.setHorizontalAlignment(this.alignment);
if (this.locked) {
pdfPTable.setTotalWidth(this.width);
pdfPTable.setLockedWidth(true);
} else {
pdfPTable.setWidthPercentage(this.width);
}
Iterator it = iterator();
while (it.hasNext()) {
Row row = (Row) it.next();
for (int i = 0; i < row.getColumns(); i++) {
Element element = (Element) row.getCell(i);
if (element != null) {
if (element instanceof Table) {
pdfPCell = new PdfPCell(((Table) element).createPdfPTable());
} else if (element instanceof Cell) {
Cell cell = (Cell) element;
pdfPCell = cell.createPdfPCell();
pdfPCell.setPadding(this.cellpadding + (this.cellspacing / 2.0f));
SimpleCell simpleCell = new SimpleCell(false);
simpleCell.cloneNonPositionParameters(cell);
simpleCell.setSpacing(this.cellspacing * 2.0f);
pdfPCell.setCellEvent(simpleCell);
} else {
pdfPCell = new PdfPCell();
}
pdfPTable.addCell(pdfPCell);
}
}
}
return pdfPTable;
}
throw new BadElementException("No error, just an old style table");
}
public boolean isNotAddedYet() {
return this.notAddedYet;
}
public void setNotAddedYet(boolean z) {
this.notAddedYet = z;
}
public void flushContent() {
setNotAddedYet(false);
ArrayList arrayList = new ArrayList();
for (int i = 0; i < getLastHeaderRow() + 1; i++) {
arrayList.add(this.rows.get(i));
}
this.rows = arrayList;
}
public boolean isComplete() {
return this.complete;
}
public void setComplete(boolean z) {
this.complete = z;
}
public Cell getDefaultLayout() {
return getDefaultCell();
}
public void setDefaultLayout(Cell cell) {
this.defaultCell = cell;
}
}
| [
"[email protected]"
] | |
1ba37a690a15a806165627791a6c4cf247133f20 | f65400893b5d3a80bf1ede506694850a92c05b21 | /JavaStudy/src/ch12/IndexOf.java | 16b56b9cdec2ce2fff5e221d87f3c0e71512e047 | [] | no_license | fire216/JavaStudy | 9795e3d46d72cbdbb3c3be59a87ca26bb05b8b33 | a8f0d73994c6be20ee2b7101b5a12db8e721a614 | refs/heads/master | 2020-04-28T19:41:00.259026 | 2019-04-19T08:12:16 | 2019-04-19T08:12:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 561 | java | package ch12;
public class IndexOf {
public static void main(String[] args) {
// 0123456789
String text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
System.out.println(text.length());
int index = -1;
while (true) {
index = text.indexOf("ipsum", index + 1);
System.out.println(index);
if (index == -1) {
break;
}
}
}
}
| [
"Student@DESKTOP-EF9PEQ2"
] | Student@DESKTOP-EF9PEQ2 |
a74fff7eb54e2ee62437a87dd40c5fb2c71a8238 | c99ecaf5692a5dd3c4b6c5af8960b958ef61d22f | /excelClassExceptionDebug/src/jxl/Workbook.java | d03660e3c8238823bbaf89fb5c8f5e6ac5745109 | [] | no_license | bloomer024/Mobile-Development | afc00c65c7b3ae98ac93a2d2ab3e5b629a8e124f | d68fb0a556702e172f327ab3bc0da8d4be37034a | refs/heads/master | 2020-12-27T09:34:47.148817 | 2013-09-03T16:40:22 | 2013-09-03T16:40:22 | 37,514,253 | 1 | 0 | null | 2015-06-16T07:12:33 | 2015-06-16T07:12:32 | null | UTF-8 | Java | false | false | 12,899 | java | /*********************************************************************
*
* Copyright (C) 2002 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;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import src.jxl.read.biff.BiffException;
import src.jxl.read.biff.PasswordException;
import src.jxl.read.biff.WorkbookParser;
import src.jxl.write.WritableWorkbook;
import src.jxl.write.biff.WritableWorkbookImpl;
/**
* Represents a Workbook. Contains the various factory methods and provides
* a variety of accessors which provide access to the work sheets.
*/
public abstract class Workbook
{
/**
* The current version of the software
*/
private static final String VERSION = "2.6.12";
/**
* The constructor
*/
protected Workbook()
{
}
/**
* Gets the sheets within this workbook. Use of this method for
* large worksheets can cause performance problems.
*
* @return an array of the individual sheets
*/
public abstract Sheet[] getSheets();
/**
* Gets the sheet names
*
* @return an array of strings containing the sheet names
*/
public abstract String[] getSheetNames();
/**
* Gets the specified sheet within this workbook
* As described in the accompanying technical notes, each call
* to getSheet forces a reread of the sheet (for memory reasons).
* Therefore, do not make unnecessary calls to this method. Furthermore,
* do not hold unnecessary references to Sheets in client code, as
* this will prevent the garbage collector from freeing the memory
*
* @param index the zero based index of the reQuired sheet
* @return The sheet specified by the index
* @exception IndexOutOfBoundException when index refers to a non-existent
* sheet
*/
public abstract Sheet getSheet(int index)
throws IndexOutOfBoundsException;
/**
* Gets the sheet with the specified name from within this workbook.
* As described in the accompanying technical notes, each call
* to getSheet forces a reread of the sheet (for memory reasons).
* Therefore, do not make unnecessary calls to this method. Furthermore,
* do not hold unnecessary references to Sheets in client code, as
* this will prevent the garbage collector from freeing the memory
*
* @param name the sheet name
* @return The sheet with the specified name, or null if it is not found
*/
public abstract Sheet getSheet(String name);
/**
* Accessor for the software version
*
* @return the version
*/
public static String getVersion()
{
return VERSION;
}
/**
* Returns the number of sheets in this workbook
*
* @return the number of sheets in this workbook
*/
public abstract int getNumberOfSheets();
/**
* Gets the named cell from this workbook. If the name refers to a
* range of cells, then the cell on the top left is returned. If
* the name cannot be found, null is returned.
* This is a convenience function to quickly access the contents
* of a single cell. If you need further information (such as the
* sheet or adjacent cells in the range) use the functionally
* richer method, findByName which returns a list of ranges
*
* @param name the name of the cell/range to search for
* @return the cell in the top left of the range if found, NULL
* otherwise
*/
public abstract Cell findCellByName(String name);
/**
* Returns the cell for the specified location eg. "Sheet1!A4".
* This is identical to using the CellReferenceHelper with its
* associated performance overheads, consequently it should
* be use sparingly
*
* @param loc the cell to retrieve
* @return the cell at the specified location
*/
public abstract Cell getCell(String loc);
/**
* Gets the named range from this workbook. The Range object returns
* contains all the cells from the top left to the bottom right
* of the range.
* If the named range comprises an adjacent range,
* the Range[] will contain one object; for non-adjacent
* ranges, it is necessary to return an array of length greater than
* one.
* If the named range contains a single cell, the top left and
* bottom right cell will be the same cell
*
* @param name the name of the cell/range to search for
* @return the range of cells, or NULL if the range does not exist
*/
public abstract Range[] findByName(String name);
/**
* Gets the named ranges
*
* @return the list of named cells within the workbook
*/
public abstract String[] getRangeNames();
/**
* Determines whether the sheet is protected
*
* @return TRUE if the workbook is protected, FALSE otherwise
*/
public abstract boolean isProtected();
/**
* Parses the excel file.
* If the workbook is password protected a PasswordException is thrown
* in case consumers of the API wish to handle this in a particular way
*
* @exception BiffException
* @exception PasswordException
*/
protected abstract void parse() throws BiffException, PasswordException;
/**
* Closes this workbook, and frees makes any memory allocated available
* for garbage collection
*/
public abstract void close();
/**
* A factory method which takes in an excel file and reads in the contents.
*
* @exception IOException
* @exception BiffException
* @param file the excel 97 spreadsheet to parse
* @return a workbook instance
*/
public static Workbook getWorkbook(java.io.File file)
throws IOException, BiffException
{
return getWorkbook(file, new WorkbookSettings());
}
/**
* A factory method which takes in an excel file and reads in the contents.
*
* @exception IOException
* @exception BiffException
* @param file the excel 97 spreadsheet to parse
* @param ws the settings for the workbook
* @return a workbook instance
*/
public static Workbook getWorkbook(java.io.File file, WorkbookSettings ws)
throws IOException, BiffException
{
FileInputStream fis = new FileInputStream(file);
// Always close down the input stream, regardless of whether or not the
// file can be parsed. Thanks to Steve Hahn for this
File dataFile = null;
try
{
dataFile = new File(fis, ws);
}
catch (IOException e)
{
fis.close();
throw e;
}
catch (BiffException e)
{
fis.close();
throw e;
}
fis.close();
Workbook workbook = new WorkbookParser(dataFile, ws);
workbook.parse();
return workbook;
}
/**
* A factory method which takes in an excel file and reads in the contents.
*
* @param is an open stream which is the the excel 97 spreadsheet to parse
* @return a workbook instance
* @exception IOException
* @exception BiffException
*/
public static Workbook getWorkbook(InputStream is)
throws IOException, BiffException
{
return getWorkbook(is, new WorkbookSettings());
}
/**
* A factory method which takes in an excel file and reads in the contents.
*
* @param is an open stream which is the the excel 97 spreadsheet to parse
* @param ws the settings for the workbook
* @return a workbook instance
* @exception IOException
* @exception BiffException
*/
public static Workbook getWorkbook(InputStream is, WorkbookSettings ws)
throws IOException, BiffException
{
File dataFile = new File(is, ws);
Workbook workbook = new WorkbookParser(dataFile, ws);
workbook.parse();
return workbook;
}
/**
* Creates a writable workbook with the given file name
*
* @param file the workbook to copy
* @return a writable workbook
* @exception IOException
*/
public static WritableWorkbook createWorkbook(java.io.File file)
throws IOException
{
return createWorkbook(file, new WorkbookSettings());
}
/**
* Creates a writable workbook with the given file name
*
* @param file the file to copy from
* @param ws the global workbook settings
* @return a writable workbook
* @exception IOException
*/
public static WritableWorkbook createWorkbook(java.io.File file,
WorkbookSettings ws)
throws IOException
{
FileOutputStream fos = new FileOutputStream(file);
WritableWorkbook w = new WritableWorkbookImpl(fos, true, ws);
return w;
}
/**
* Creates a writable workbook with the given filename as a copy of
* the workbook passed in. Once created, the contents of the writable
* workbook may be modified
*
* @param file the output file for the copy
* @param in the workbook to copy
* @return a writable workbook
* @exception IOException
*/
public static WritableWorkbook createWorkbook(java.io.File file,
Workbook in)
throws IOException
{
return createWorkbook(file, in, new WorkbookSettings());
}
/**
* Creates a writable workbook with the given filename as a copy of
* the workbook passed in. Once created, the contents of the writable
* workbook may be modified
*
* @param file the output file for the copy
* @param in the workbook to copy
* @param ws the configuration for this workbook
* @return a writable workbook
*/
public static WritableWorkbook createWorkbook(java.io.File file,
Workbook in,
WorkbookSettings ws)
throws IOException
{
FileOutputStream fos = new FileOutputStream(file);
WritableWorkbook w = new WritableWorkbookImpl(fos, in, true, ws);
return w;
}
/**
* Creates a writable workbook as a copy of
* the workbook passed in. Once created, the contents of the writable
* workbook may be modified
*
* @param os the stream to write to
* @param in the workbook to copy
* @return a writable workbook
* @exception IOException
*/
public static WritableWorkbook createWorkbook(OutputStream os,
Workbook in)
throws IOException
{
return createWorkbook(os, in, ((WorkbookParser) in).getSettings());
}
/**
* Creates a writable workbook as a copy of
* the workbook passed in. Once created, the contents of the writable
* workbook may be modified
*
* @param os the output stream to write to
* @param in the workbook to copy
* @param ws the configuration for this workbook
* @return a writable workbook
* @exception IOException
*/
public static WritableWorkbook createWorkbook(OutputStream os,
Workbook in,
WorkbookSettings ws)
throws IOException
{
WritableWorkbook w = new WritableWorkbookImpl(os, in, false, ws);
return w;
}
/**
* Creates a writable workbook. When the workbook is closed,
* it will be streamed directly to the output stream. In this
* manner, a generated excel spreadsheet can be passed from
* a servlet to the browser over HTTP
*
* @param os the output stream
* @return the writable workbook
* @exception IOException
*/
public static WritableWorkbook createWorkbook(OutputStream os)
throws IOException
{
return createWorkbook(os, new WorkbookSettings());
}
/**
* Creates a writable workbook. When the workbook is closed,
* it will be streamed directly to the output stream. In this
* manner, a generated excel spreadsheet can be passed from
* a servlet to the browser over HTTP
*
* @param os the output stream
* @param ws the configuration for this workbook
* @return the writable workbook
* @exception IOException
*/
public static WritableWorkbook createWorkbook(OutputStream os,
WorkbookSettings ws)
throws IOException
{
WritableWorkbook w = new WritableWorkbookImpl(os, false, ws);
return w;
}
}
| [
"[email protected]"
] | |
eaf3fbac45354f74a3550f194396ac60d80353d7 | 9479affecbead662a94096e06dc1e5df6058854b | /app/src/main/java/com/pdroid84/deb/locationbyplacesapi/MainActivity.java | f297afb98f0accce7416752fe6b517bc4d7aacda | [] | no_license | pdroid84/LocationByPlacesAPI | f3aa2ad96c5337ff8db1708c4f58921d4d6efb11 | 27da2773cfadd2c1abbbf6119220a3b6547619f9 | refs/heads/master | 2021-01-10T05:30:07.032885 | 2015-06-06T22:17:13 | 2015-06-06T22:17:13 | 36,996,858 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,489 | java | package com.pdroid84.deb.locationbyplacesapi;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.location.places.PlaceLikelihood;
import com.google.android.gms.location.places.PlaceLikelihoodBuffer;
import com.google.android.gms.location.places.Places;
public class MainActivity extends ActionBarActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener{
private GoogleApiClient mGoogleApiClient;
private String TAG = "DEB";
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.d(TAG,"onCreate is called");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mGoogleApiClient = new GoogleApiClient
.Builder(this)
.addApi(Places.GEO_DATA_API)
.addApi(Places.PLACE_DETECTION_API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void onStart() {
Log.d(TAG,"onStart is called");
super.onStart();
mGoogleApiClient.connect();
}
@Override
protected void onStop() {
Log.d(TAG,"onStop is called");
mGoogleApiClient.disconnect();
super.onStop();
}
@Override
public void onConnected(Bundle bundle) {
Log.d(TAG,"onConnected is called");
PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi
.getCurrentPlace(mGoogleApiClient, null);
result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {
@Override
public void onResult(PlaceLikelihoodBuffer likelyPlaces) {
Log.d(TAG,"onResult is called");
for (PlaceLikelihood placeLikelihood : likelyPlaces) {
Log.d(TAG, String.format("Place '%s' has likelihood: %g",
placeLikelihood.getPlace().getName(),
placeLikelihood.getLikelihood()));
}
likelyPlaces.release();
}
});
}
@Override
public void onConnectionSuspended(int i) {
Log.d(TAG,"onConnectionSuspended is called");
}
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
Log.d(TAG,"onConnectionFailed is called");
}
}
| [
"[email protected]"
] | |
8ea4e828d95add819c50ea16f550fce13b924859 | af6829eaea689efb7336d3cf11a9ddb36b284b92 | /src/com/fh/controller/weal/weal/WealController.java | e3629e10bbc857efb9af3ba753c79208d0efbe18 | [] | no_license | MrXT/erp | f336671aebf9c3f6702a1ca364e56cee64601df4 | c37f53a6183f14e34c3d159e28af56dc5dbcb5de | refs/heads/master | 2021-01-11T09:00:41.561800 | 2017-02-08T06:50:49 | 2017-02-08T06:50:49 | 77,453,295 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,475 | java | package com.fh.controller.weal.weal;
import java.io.PrintWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.fh.controller.base.BaseController;
import com.fh.entity.Page;
import com.fh.entity.system.User;
import com.fh.util.AppUtil;
import com.fh.util.Const;
import com.fh.util.DateUtil;
import com.fh.util.FileUpload;
import com.fh.util.ObjectExcelView;
import com.fh.util.PageData;
import com.fh.util.Jurisdiction;
import com.fh.util.PathUtil;
import com.fh.util.Tools;
import com.fh.service.weal.weal.WealManager;
/**
* 说明:福利模块
* 创建人:FH Q313596790
* 创建时间:2016-12-01
*/
@Controller
@RequestMapping(value="/weal")
public class WealController extends BaseController {
String menuUrl = "weal/list.do"; //菜单地址(权限用)
@Resource(name="wealService")
private WealManager wealService;
/**保存
* @param
* @throws Exception
*/
@RequestMapping(value="/save")
public ModelAndView save(String TITLE,String INFOR,HttpSession session,@RequestParam(required = false,value="files") MultipartFile [] files) throws Exception{
logBefore(logger, Jurisdiction.getUsername()+"新增Weal");
if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限
StringBuilder sb = new StringBuilder();
for (MultipartFile file : files) {
String ffile = DateUtil.getDays(), fileName = "";
if (null != file && !file.isEmpty()) {
String filePath = PathUtil.getPath() + Const.FILEPATHIMG + ffile; // 文件上传路径
fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); // 执行上传
sb.append(ffile + "/" + fileName+",");
} else {
System.out.println("上传失败");
}
}
if(sb.length() != 0){
sb.delete(sb.length()-1,sb.length());
}
ModelAndView mv = this.getModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
User user = (User)session.getAttribute(Const.SESSION_USER);
pd.put("TITLE", TITLE);
pd.put("INFOR", INFOR);
pd.put("imgurl", sb.toString());
pd.put("WEAL_ID", this.get32UUID()); //主键
pd.put("CTIME", new Date());
pd.put("USER_ID", user.getUSER_ID());
wealService.save(pd);
mv.addObject("msg","success");
mv.setViewName("save_result");
return mv;
}
/**删除
* @param out
* @throws Exception
*/
@RequestMapping(value="/delete")
public void delete(PrintWriter out) throws Exception{
logBefore(logger, Jurisdiction.getUsername()+"删除Weal");
if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限
PageData pd = new PageData();
pd = this.getPageData();
wealService.delete(pd);
out.write("success");
out.close();
}
/**修改
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
public ModelAndView edit(String STATUS,String WEAL_ID) throws Exception{
logBefore(logger, Jurisdiction.getUsername()+"修改Weal");
if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限
ModelAndView mv = this.getModelAndView();
PageData pd = new PageData();
pd.put("STATUS", STATUS);
pd.put("WEAL_ID", WEAL_ID);
wealService.edit(pd);
mv.addObject("msg","success");
mv.setViewName("save_result");
return mv;
}
/**列表
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
public ModelAndView list(Page page) throws Exception{
logBefore(logger, Jurisdiction.getUsername()+"列表Weal");
//if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
ModelAndView mv = this.getModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
String keywords = pd.getString("keywords"); //关键词检索条件
if(null != keywords && !"".equals(keywords)){
pd.put("keywords", keywords.trim());
}
page.setPd(pd);
List<PageData> varList = wealService.list(page); //列出Weal列表
mv.setViewName("weal/weal/weal_list");
mv.addObject("varList", varList);
mv.addObject("pd", pd);
mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
return mv;
}
@RequestMapping(value="/scanUsers")
public ModelAndView scanUsers(Page page) throws Exception{
logBefore(logger, Jurisdiction.getUsername()+"列表Weal");
//if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
ModelAndView mv = this.getModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
String keywords = pd.getString("keywords"); //关键词检索条件
if(null != keywords && !"".equals(keywords)){
pd.put("keywords", keywords.trim());
}
page.setPd(pd);
List<PageData> varList = wealService.userList(page); //列出Weal列表
mv.setViewName("weal/weal/weal_user");
mv.addObject("varList", varList);
mv.addObject("pd", pd);
mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
return mv;
}
/**去新增页面
* @param
* @throws Exception
*/
@RequestMapping(value="/goAdd")
public ModelAndView goAdd()throws Exception{
ModelAndView mv = this.getModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
mv.setViewName("weal/weal/weal_edit");
mv.addObject("msg", "save");
mv.addObject("pd", pd);
return mv;
}
/**去修改页面
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
public ModelAndView goEdit()throws Exception{
ModelAndView mv = this.getModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
Page page = new Page();
String type = pd.getString("type");
page.setPd(pd);
pd = wealService.list(page).get(0); //根据ID读取
pd.put("type", type);
if(StringUtils.isNotBlank(pd.getString("imgurl"))){
pd.put("imgurls",pd.getString("imgurl").split(","));
}
mv.setViewName("weal/weal/weal_edit");
mv.addObject("msg", "edit");
mv.addObject("pd", pd);
return mv;
}
/**批量删除
* @param
* @throws Exception
*/
@RequestMapping(value="/deleteAll")
@ResponseBody
public Object deleteAll() throws Exception{
logBefore(logger, Jurisdiction.getUsername()+"批量删除Weal");
if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
PageData pd = new PageData();
Map<String,Object> map = new HashMap<String,Object>();
pd = this.getPageData();
List<PageData> pdList = new ArrayList<PageData>();
String DATA_IDS = pd.getString("DATA_IDS");
if(null != DATA_IDS && !"".equals(DATA_IDS)){
String ArrayDATA_IDS[] = DATA_IDS.split(",");
wealService.deleteAll(ArrayDATA_IDS);
pd.put("msg", "ok");
}else{
pd.put("msg", "no");
}
pdList.add(pd);
map.put("list", pdList);
return AppUtil.returnObject(pd, map);
}
/**导出到excel
* @param
* @throws Exception
*/
@RequestMapping(value="/excel")
public ModelAndView exportExcel() throws Exception{
logBefore(logger, Jurisdiction.getUsername()+"导出Weal到excel");
if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<String,Object>();
List<String> titles = new ArrayList<String>();
titles.add("福利内容"); //1
titles.add("发布时间"); //2
titles.add("标题"); //3
dataMap.put("titles", titles);
List<PageData> varOList = wealService.listAll(pd);
List<PageData> varList = new ArrayList<PageData>();
for(int i=0;i<varOList.size();i++){
PageData vpd = new PageData();
vpd.put("var1", varOList.get(i).getString("INFOR")); //1
vpd.put("var2", varOList.get(i).getString("CTIME")); //2
vpd.put("var3", varOList.get(i).getString("TITLE")); //3
varList.add(vpd);
}
dataMap.put("varList", varList);
ObjectExcelView erv = new ObjectExcelView();
mv = new ModelAndView(erv,dataMap);
return mv;
}
@InitBinder
public void initBinder(WebDataBinder binder){
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true));
}
}
| [
"[email protected]"
] | |
c82319f987d8a14c6f13d0e0862fe409f91bffa2 | 8469d2f71bc22fa2acf66a4bb05155c1d85282fa | /SapeStore/src/test/java/com/sapestore/controller/test/AccountControllerTest.java | 2f30b0a7ee7c3c141349a4a1ea5e1334eb119259 | [
"BSD-2-Clause"
] | permissive | rishon1313/sapestore | bce9f33ba16d82eb86be0a2567d92707b340a8c5 | 3f44263799e9abe279c6311a31d4df9209c9b59c | refs/heads/master | 2021-08-17T02:02:18.544939 | 2017-11-20T17:28:41 | 2017-11-20T17:28:41 | 104,585,570 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,729 | java | package com.sapestore.controller.test;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import com.sapestore.controller.AccountController;
import com.sun.glass.ui.View;
/**
* The class <code>UserLoginControllerTest</code> contains tests for the class
* {@link <code>UserLoginController</code>}
*
* @pattern JUnit Test Case
*
* @generatedBy CodePro at 7/12/14 11:26 AM
*
* @author kmedir
*
* @version $Revision$
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:test-application-context.xml" })
@WebAppConfiguration
public class AccountControllerTest {
private MockMvc mockMvc;
@Autowired
private WebApplicationContext wac;
/**
* The object that is being tested.
*
* @see com.sapestore.controller.UserLoginController
*/
private AccountController fixture = new AccountController();
/**
* Construct new test instance
*
* @param name the test name
*/
public AccountControllerTest() {
}
/**
* Launch the test.
*
* @param args String[]
*/
public static void main(String[] args) {
// add code to run tests here
}
/**
* Return the object that is being tested.
*
* @return the test fixture
*
* @see com.sapestore.controller.UserLoginController
*/
public AccountController getFixture() {
return fixture;
}
/**
* Set the object that is being tested.
*
* @param fixture the test fixture
*/
public void setFixture(AccountController fixture) {
this.fixture = fixture;
}
/**
* Run the String beforeLogin(ModelMap) method test
*/
@Test
public void testBeforeLogin() {
try {
System.out.println("entered testBeforeLogin");
mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
mockMvc.perform(get("/beforelogin"))
.andExpect(status().isOk());
System.out.println("exited testBeforeLogin");
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Run the String login(UserLogin, ModelMap) method test
*/
@Test
public void testLogin() {
try {
System.out.println("entered testLogin");
mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
mockMvc.perform(post("/login").param("userId", "testLoginId").param("password", "testPassword"))
.andExpect(status().isOk());
System.out.println("exited testLogin");
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Run the String logout(WebRequest, SessionStatus) method test
*/
@Test
public void testLogout() {
try {
System.out.println("entered testBeforeLogin");
mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
mockMvc.perform(get("/logout"))
.andExpect(status().is(302));
System.out.println("exited testBeforeLogin");
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void testShopMore(){
try {
System.out.println("entered testShopMore");
mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
mockMvc.perform(get("/shopMore")).andExpect(status().isOk())
.andExpect(forwardedUrl("/WEB-INF/home.jsp"));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
/*$CPS$ This comment was generated by CodePro. Do not edit it.
* patternId = com.instantiations.assist.eclipse.pattern.testCasePattern
* strategyId = com.instantiations.assist.eclipse.pattern.testCasePattern.junitTestCase
* additionalTestNames =
* assertTrue = false
* callTestMethod = true
* createMain = true
* createSetUp = false
* createTearDown = false
* createTestFixture = true
* createTestStubs = false
* methods = beforeLogin(QModelMap;),login(QUserLogin;!QModelMap;)
* package = com.sapestore.controller
* package.sourceFolder = SapeStore/src/main/java
* superclassType = junit.framework.TestCase
* testCase = UserLoginControllerTest
* testClassType = com.sapestore.controller.UserLoginController
*/ | [
"[email protected]"
] | |
a53acfd98e857dad47abf9fb8e92f34bcce79655 | 280da3630f692c94472f2c42abd1051fb73d1344 | /src/net/minecraft/src/BetterSnow.java | 6bd40b743afe638806128ccaaa6a901716a764cc | [] | no_license | MicrowaveClient/Clarinet | 7c35206c671eb28bc139ee52e503f405a14ccb5b | bd387bc30329e0febb6c1c1b06a836d9013093b5 | refs/heads/master | 2020-04-02T18:47:52.047731 | 2016-07-14T03:21:46 | 2016-07-14T03:21:46 | 63,297,767 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,913 | java | package net.minecraft.src;
import net.minecraft.block.*;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.IBlockAccess;
public class BetterSnow {
private static IBakedModel modelSnowLayer = null;
public static void update() {
modelSnowLayer = Config.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(Blocks.snow_layer.getDefaultState());
}
public static IBakedModel getModelSnowLayer() {
return modelSnowLayer;
}
public static IBlockState getStateSnowLayer() {
return Blocks.snow_layer.getDefaultState();
}
public static boolean shouldRender(IBlockAccess blockAccess, Block block, IBlockState blockState, BlockPos blockPos) {
return !checkBlock(block, blockState) ? false : hasSnowNeighbours(blockAccess, blockPos);
}
private static boolean hasSnowNeighbours(IBlockAccess blockAccess, BlockPos pos) {
Block blockSnow = Blocks.snow_layer;
return blockAccess.getBlockState(pos.north()).getBlock() != blockSnow && blockAccess.getBlockState(pos.south()).getBlock() != blockSnow && blockAccess.getBlockState(pos.west()).getBlock() != blockSnow && blockAccess.getBlockState(pos.east()).getBlock() != blockSnow ? false : blockAccess.getBlockState(pos.down()).getBlock().isOpaqueCube();
}
private static boolean checkBlock(Block block, IBlockState blockState) {
if (block.isFullCube()) {
return false;
} else if (block.isOpaqueCube()) {
return false;
} else if (block instanceof BlockSnow) {
return false;
} else if (block instanceof BlockBush && (block instanceof BlockDoublePlant || block instanceof BlockFlower || block instanceof BlockMushroom || block instanceof BlockSapling || block instanceof BlockTallGrass)) {
return true;
} else if (!(block instanceof BlockFence) && !(block instanceof BlockFenceGate) && !(block instanceof BlockFlowerPot) && !(block instanceof BlockPane) && !(block instanceof BlockReed) && !(block instanceof BlockWall)) {
if (block instanceof BlockRedstoneTorch && blockState.getValue(BlockTorch.FACING) == EnumFacing.UP) {
return true;
} else {
if (block instanceof BlockLever) {
Comparable orient = blockState.getValue(BlockLever.FACING);
if (orient == BlockLever.EnumOrientation.UP_X || orient == BlockLever.EnumOrientation.UP_Z) {
return true;
}
}
return false;
}
} else {
return true;
}
}
}
| [
"justanormalpcnoghostclientoranyt@justanormalpcnoghostclientoranyt-Aspire-XC-704"
] | justanormalpcnoghostclientoranyt@justanormalpcnoghostclientoranyt-Aspire-XC-704 |
Subsets and Splits