blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
410
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
684M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 132
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 28
values | content
stringlengths 3
9.45M
| authors
listlengths 1
1
| author_id
stringlengths 0
352
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cb73233369f054cb5c1fc7dcd69ffc15398d017a
|
7668d8cce3e305f45756b1a4818cca2ea62e8b49
|
/uitest/src/com/vaadin/tests/push/PushErrorHandling.java
|
3074bd38514d5818d12957ba85750aae0c57b938
|
[] |
no_license
|
rtvt123/vaadin
|
014b29a477dcc96cae60401e5ea80a39bc86e1b0
|
bc0d55197a2b7fd8a6ac163688026d92203f2618
|
refs/heads/master
| 2022-08-27T11:35:43.168720
| 2013-11-07T11:28:53
| 2013-11-07T12:16:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,236
|
java
|
package com.vaadin.tests.push;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.vaadin.data.util.AbstractInMemoryContainer;
import com.vaadin.data.util.BeanContainer;
import com.vaadin.event.ItemClickEvent;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.ErrorHandler;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinSession;
import com.vaadin.shared.communication.PushMode;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Table;
public class PushErrorHandling extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
getPushConfiguration().setPushMode(PushMode.AUTOMATIC);
VaadinSession.getCurrent().setErrorHandler(new ErrorHandler() {
@Override
public void error(com.vaadin.server.ErrorEvent event) {
addComponent(new Label("An error! "
+ event.getThrowable().getMessage()));
System.err.println("An error! "
+ event.getThrowable().getMessage());
}
});
final Button button = new Button("Click for NPE!",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
((String) null).length(); // Null-pointer exception
}
});
addComponent(button);
final Table view = new Table("testtable");
view.setSelectable(true);
view.setMultiSelect(false);
view.setImmediate(true);
view.setSizeFull();
view.addItemClickListener(new ItemClickListener() {
@Override
public void itemClick(ItemClickEvent event) {
BeanContainer<String, AbstractInMemoryContainer> metaContainer = new BeanContainer<String, AbstractInMemoryContainer>(
AbstractInMemoryContainer.class) {
@Override
public Collection<String> getContainerPropertyIds() {
List<String> cpropIds = new ArrayList<String>(super
.getContainerPropertyIds());
cpropIds.add("testid");
return cpropIds;
}
@Override
public Class<?> getType(Object propertyId) {
((Object) null).hashCode();
return super.getType(propertyId);
}
};
view.setContainerDataSource(metaContainer);
}
});
view.addContainerProperty("Column", String.class, "Click for NPE");
view.addItem(new Object());
addComponent(view);
}
@Override
protected String getTestDescription() {
return "Error handling should still work w/ push enabled. (Button can be handled properly, table causes internal error)";
}
@Override
protected Integer getTicketNumber() {
return 11882;
}
}
|
[
"review@vaadin.com"
] |
review@vaadin.com
|
50c4e1453a4839d9fba6b8944b67564fae13b0a7
|
a25cd0fe45f6fc928b42b266eb425b85b87c42c6
|
/WhatsUp/app/src/main/java/com/example/btw/whatsup/LeadershipComparator.java
|
d5657a1f8101700cc59fa864ca9879a4b06bc25a
|
[] |
no_license
|
sherlynng/orbital
|
7ce262e2903bd3ebcd6fa708b19178e75dbaf418
|
e6d99f08280fd07806559f0c6dd2e745185af759
|
refs/heads/master
| 2021-01-20T15:06:48.398930
| 2017-08-09T13:41:09
| 2017-08-09T13:41:09
| 90,718,739
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 372
|
java
|
package com.example.btw.whatsup;
import java.util.Comparator;
/**
* Created by sherl on 21/7/2017.
*/
public class LeadershipComparator implements Comparator<User> {
@Override
public int compare(User u1, User u2){
return -(u1.getScore() - u2.getScore());
}
@Override
public boolean equals(Object obj){
return this == obj;
}
}
|
[
"alexawangzi@gmail.com"
] |
alexawangzi@gmail.com
|
45edbd870c6c2a34901cac32e025addc2b9a38dd
|
af74884e3c2b2dac7e41ccdabd9cc37080dd1c79
|
/Inorder traversal/Main.java
|
a7f79267e05cce4b75f679c7e70cbbb195fd4334
|
[] |
no_license
|
shanmalini/Playground
|
1c50f5cab8e7927ed6761cd5d155124d95807b6f
|
5da9aca170a6d2975d0f877885e069bd93f32de4
|
refs/heads/master
| 2021-12-11T10:38:22.941843
| 2021-08-23T05:48:32
| 2021-08-23T05:48:32
| 187,820,271
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,422
|
java
|
#include<iostream>
using namespace std;
struct nodetree
{
int data;
struct nodetree *left;
struct nodetree *right;
};
void insert(struct nodetree **root, int value)
{
struct nodetree *newnode = (struct nodetree*)malloc(sizeof(struct nodetree));
newnode -> data = value;
newnode -> left = NULL;
newnode -> right = NULL;
if(*root == NULL)
*root = newnode;
else
{
struct nodetree *temp = *root;
while(1)
{
if(value < temp->data) // inserting left child
{
if(temp->left == NULL)
{
temp->left = newnode;
return;
}
temp = temp->left;
}
else // inserting right child
{
if(temp->right == NULL)
{
temp->right = newnode;
return;
}
temp = temp->right;
}
}
}
}
void inorder(struct nodetree *root) // left root right
{
if(root == NULL)
return;
inorder(root->left);
cout << root->data << " ";
inorder(root->right);
}
int main()
{
struct nodetree *root = NULL;
int value;
while(1)
{
cin >> value;
if(value >= 0)
insert(&root, value);
else
break;
}
cout << "Inorder Traversal:" << endl;
inorder(root);
return 0;
}
|
[
"50870026+shanmalini@users.noreply.github.com"
] |
50870026+shanmalini@users.noreply.github.com
|
892b4aea522a13bd55f5c445e6ad10dd996e1fee
|
0b28d5104c6faa39966e6301739ae3eb77bb9f42
|
/MyDemo/app/src/main/java/com/dong/mydemo/MainActivity.java
|
28f7f3b97f9a44331d68fe51b18899baa05361ca
|
[] |
no_license
|
DgPengPeng/DgPengDemo
|
76ea674a0b749b35ad6acfbf57bf9be67d3e3a38
|
9c2c0eca4a10abea5d835b0b3d4031790e352706
|
refs/heads/master
| 2020-06-17T01:39:17.668305
| 2016-11-29T07:04:47
| 2016-11-29T07:04:47
| 75,051,833
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 328
|
java
|
package com.dong.mydemo;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
[
"1242688818@qq.com"
] |
1242688818@qq.com
|
9abf1fe85fc6f8f5d053fd168ca1104b501eab8f
|
544cfadc742536618168fc80a5bd81a35a5f2c99
|
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/ui/common/SingleLiveEventTest.java
|
181a41e687a73a149cf402440c24339b4e00b919
|
[] |
no_license
|
ZYHGOD-1/Aosp11
|
0400619993b559bf4380db2da0addfa9cccd698d
|
78a61ca023cbf1a0cecfef8b97df2b274ac3a988
|
refs/heads/main
| 2023-04-21T20:13:54.629813
| 2021-05-22T05:28:21
| 2021-05-22T05:28:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,189
|
java
|
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.car.dialer.ui.common;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleRegistry;
import com.android.car.dialer.CarDialerRobolectricTestRunner;
import com.android.car.dialer.LiveDataObserver;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
@RunWith(CarDialerRobolectricTestRunner.class)
public class SingleLiveEventTest {
private static final String VALUE = "setValue";
private SingleLiveEvent<String> mSingleLiveEvent;
private LifecycleRegistry mLifecycleRegistry;
@Mock
private LifecycleOwner mMockLifecycleOwner;
@Mock
private LiveDataObserver<SingleLiveEvent> mMockObserver1;
@Mock
private LiveDataObserver<SingleLiveEvent> mMockObserver2;
@Captor
private ArgumentCaptor<String> mCaptor;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
mSingleLiveEvent = new SingleLiveEvent();
mLifecycleRegistry = new LifecycleRegistry(mMockLifecycleOwner);
when(mMockLifecycleOwner.getLifecycle()).thenReturn(mLifecycleRegistry);
}
@Test
public void test_onChangeCalledAfterSetValue() {
mSingleLiveEvent.observe(mMockLifecycleOwner, mMockObserver1);
verify(mMockObserver1, never()).onChanged(any());
mLifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_START);
verify(mMockObserver1, never()).onChanged(any());
mSingleLiveEvent.setValue(VALUE);
verify(mMockObserver1, times(1)).onChanged(mCaptor.capture());
assertThat(mCaptor.getValue()).isEqualTo(VALUE);
}
@Test
public void test_onChangeOnlyHandledOnce() {
mLifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_START);
mSingleLiveEvent.observe(mMockLifecycleOwner, mMockObserver1);
mSingleLiveEvent.observe(mMockLifecycleOwner, mMockObserver2);
mSingleLiveEvent.setValue(VALUE);
verify(mMockObserver1, times(1)).onChanged(mCaptor.capture());
assertThat(mCaptor.getValue()).isEqualTo(VALUE);
verify(mMockObserver2, never()).onChanged(any());
}
}
|
[
"rick_tan@qq.com"
] |
rick_tan@qq.com
|
f258f6ab1c5753a0d6f1b2b86ef0fb9f6cab3bf1
|
1f8c8aa87ff13d35bc8ec333fde7cf07c0bf2934
|
/Vote.java
|
ceefc780f579c27e5f9a6ca197463f6017c430ca
|
[] |
no_license
|
Potatopat/Voting
|
b04e89ed2b719f3d328497dac56ea286ed1db088
|
e5df689407b06423e6fc47856e05c45737aa238d
|
refs/heads/master
| 2016-08-12T14:50:36.740765
| 2015-09-28T19:05:39
| 2015-09-28T19:05:39
| 43,320,045
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,716
|
java
|
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
public class Vote
{
public static boolean running = true;
public static int ID = 0, num = 0, a = -2468;
public static String studentId = "";
public static JOptionPane j = new JOptionPane();
public static String readFileName = "Students.txt", writeFileName = "Results.txt";
public static ReadFile student = new ReadFile(readFileName);
public static ReadFile doubleVotes = new ReadFile(writeFileName);
public static int SOMENUMBERHAHAHA = a;
public static String[] Questions = new String[4000];
public static void main(String[] args)
{
enterId();
}
public static void enterId()
{
do
{
Questions[num] = j.showInputDialog("What is your ID number?");
studentId = Questions[num];
try{
ID = Integer.parseInt(studentId);
}
catch(NumberFormatException nFE){
ID = 0;
}
if (ID == SOMENUMBERHAHAHA)
System.exit(0);
try
{
doubleVotes.checkID(ID);
}
catch (Exception e){ }
try
{
student.checkID(ID);
}
catch (Exception e){ }
//}
}while(!student.Found() || doubleVotes.Found(ID) || studentId.equals("") || studentId == null);
VotingGUI voting = new VotingGUI(student);
voting.display();
num++;
}
}
|
[
"potatopat1973@gmail.com"
] |
potatopat1973@gmail.com
|
af048c1e6745477b9ad2b37fcb00507400f47b22
|
024ef33f04da3a84f9c44e4180604f5a9339f161
|
/ga-supervision-mgt/src/main/java/com/atosenet/ga/company/mgt/service/ga/employe/PhysicalRecordService.java
|
91d17f9178f9463c98f3e02d2168f717d5942c4c
|
[] |
no_license
|
pitaoWang/ga_supervision
|
d95da46b39cf61185ac9c8f32f285e0198a4a8c2
|
4dc42dae1fae66f6065f27c65a52765b7e6f5f07
|
refs/heads/master
| 2020-04-08T22:27:49.202427
| 2018-12-04T09:43:35
| 2018-12-04T09:43:35
| 159,641,336
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,207
|
java
|
package com.atosenet.ga.company.mgt.service.ga.employe;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.atosenet.ga.company.db.model.ga.employe.Employee;
import com.atosenet.ga.company.db.model.ga.employe.PhysicalRecord;
import com.atosenet.ga.company.db.repos.ga.employe.EmployeeRepository;
import com.atosenet.ga.company.db.repos.ga.employe.PhysicalRecordRepository;
/**
* @Description:TODO
* @time:2017年9月1日 上午8:00:48
*/
@Service
@Transactional(propagation=Propagation.SUPPORTS,readOnly = true)
public class PhysicalRecordService {
@Autowired
PhysicalRecordRepository physicalRecordRepository;
@Autowired
EmployeeRepository employeeRepository;
/**
* 增加
*/
@Transactional(readOnly=false)
public void save(PhysicalRecord record,HttpServletRequest request){
PhysicalRecord employee= physicalRecordRepository.save(record);
Employee em = employeeRepository.findOne(employee.getEmployeeId());
em.setFlag(4);
employeeRepository.save(em);
}
/**
*删除
*/
@Transactional(readOnly=false)
public void delete(Long id){
physicalRecordRepository.delete(id);
}
/**
*删除
*/
@Transactional(readOnly=false)
public void batchDelete(List<PhysicalRecord> entities){
physicalRecordRepository.delete(entities);
}
/**
* 查询
*/
@Transactional(readOnly=true)
public Page<PhysicalRecord> findByEmployeeId(long employeeId, Pageable pageable){
return physicalRecordRepository.findByEmployeeId(employeeId, pageable);
}
@Transactional(readOnly=true)
public List<PhysicalRecord> findByEmployeeId(long employeeId){
return physicalRecordRepository.findAllByEmployeeId(employeeId);
}
/**
* 查询
*/
@Transactional(readOnly=true)
public PhysicalRecord findById(long id){
return physicalRecordRepository.findOne(id);
}
}
|
[
"wpt1225@126.com"
] |
wpt1225@126.com
|
7d2691a3ec98481c3eea32dc5ffc20ce6ba37fd2
|
24da489a08b898d8fc0052df7c4906de83bd0da0
|
/src/com/github/serializable/service/Product.java
|
c579ebd4f58db781e65c919c8c083e3ec98f7495
|
[] |
no_license
|
Tsiones/Serializable-Lab
|
e4b152cc67b6bc9f2e1a20370630307babbbbe6c
|
c26ef36900e850863a1da2852cd5c2644efe2f17
|
refs/heads/master
| 2021-01-11T18:01:42.571383
| 2017-01-19T16:45:36
| 2017-01-19T16:45:36
| 79,472,886
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 921
|
java
|
package com.github.serializable.service;
import java.io.Serializable;
/**
* this is the public product object that will be saved/loaded by the
* application
*/
public class Product extends Id implements Serializable
{
private static final long serialVersionUID = 525630403812799901L;
private String name;
private String productDescription;
private double price;
// default constructor ensures only eCommerce can create new instances
public Product(String name, String productDescription, double price)
{
this.name = name;
this.productDescription = productDescription;
this.price = price;
}
public String getProductName()
{
return name;
}
public String getProductDescription()
{
return productDescription;
}
public double getPrice()
{
return price;
}
@Override
public String toString()
{
return getId() + " : " + getProductName() + " : " + getProductDescription() + "\n";
}
}
|
[
"Tsiones@Eduards-MacBook-Pro.local"
] |
Tsiones@Eduards-MacBook-Pro.local
|
9bd0b8cd149f1a627cfe93c5b6485495b48118aa
|
c95ca5eeeb81f492383514d4a54e5f066d2ac08f
|
/xiaoyaoji-web/src/main/java/cn/com/xiaoyaoji/utils/JdbcUtils.java
|
e934a0119b4569afef2d5d59fd22a1d567ae1af8
|
[] |
no_license
|
Jsonlu/api
|
679bc5fa6a54f732d98cadf3c07c0a4cfbcaaa58
|
a6695c46c5af22be06b4cfcc95286d3181e57b81
|
refs/heads/master
| 2021-01-01T19:38:09.510476
| 2017-07-29T07:25:44
| 2017-07-29T07:25:44
| 98,634,690
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,565
|
java
|
package cn.com.xiaoyaoji.utils;
import java.sql.Connection;
import java.sql.SQLException;
import org.apache.commons.dbutils.DbUtils;
import com.alibaba.druid.pool.DruidDataSource;
/**
* @author: zhoujingjie
* @Date: 16/5/2
*/
public class JdbcUtils {
private static DruidDataSource ds;
static {
ds = new DruidDataSource();
ds.setDriverClassName(ConfigUtils.getJdbcDriverclass());
ds.setUsername(ConfigUtils.getJdbcUsername());
ds.setPassword(ConfigUtils.getJdbcPassword());
ds.setUrl(ConfigUtils.getJdbcURL());
ds.setInitialSize(Integer.parseInt(ConfigUtils.getJdbcInitSize()));
ds.setMaxWait(Long.parseLong(ConfigUtils.getJdbcMaxWait()));
ds.setMaxActive(100);
ds.setMinIdle(Integer.parseInt(ConfigUtils.getJdbcMinIdle()));
ds.setTimeBetweenEvictionRunsMillis(10000);
ds.setValidationQuery("select 'x'");
ds.setPoolPreparedStatements(true);
try {
ds.setFilters("stat");
} catch (SQLException e) {
e.printStackTrace();
}
}
public static Connection getConnect() throws SQLException {
Connection connection= ds.getConnection();
connection.setAutoCommit(false);
return connection;
}
public static void close(Connection connection){
DbUtils.closeQuietly(connection);
}
public static void commit(Connection connection){
try {
connection.commit();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
|
[
"a12345678"
] |
a12345678
|
80f3d9f0b24cb00fc57abe7926dd799e61282f01
|
62c0cdf9d02569b363fe5125b87e3c69456e6dc1
|
/Distributed Highly Available Calendar Tool for Workgroups/Chord_Implementation/src/Fault_Detection.java
|
871abd7ed0d06500903055ccc3d39ed5080f727b
|
[] |
no_license
|
DontWorryIGotThis/Distributed-Highly-Available-Calendar-Tool-for-Workgroups
|
f01790719c26a635d3a7432588ad7a95627771ab
|
63d7b739febf8d3545ec9a023cb66569b26a3e86
|
refs/heads/master
| 2020-05-17T09:59:17.837089
| 2015-06-12T17:17:48
| 2015-06-12T17:17:48
| 37,334,549
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 469
|
java
|
import java.io.Serializable;
import java.net.DatagramSocket;
import java.net.SocketException;
public class Fault_Detection implements Runnable, Serializable {
DatagramSocket Fault_Detection_Socket;
public Fault_Detection() {
try {
Fault_Detection_Socket= new DatagramSocket(Server.Initializations.Fault_Detection_Port);
} catch (SocketException e) {
System.err.println(e.getMessage());
}
}
public void run(){
}
}
|
[
"kirankumar.reddy.18@live.com"
] |
kirankumar.reddy.18@live.com
|
c281fddba9a5e8b7397ee1d7aa6b9a04644534ec
|
d9c2682189e718f15cb129b5df7ccb325dae5f3e
|
/renren-admin/src/main/java/io/renren/modules/sys/controller/SysLoginController.java
|
3b97e6f80d7ee984696fd1025900a61c9c217312
|
[
"Apache-2.0"
] |
permissive
|
xwj920930/renren-admin
|
69693ab43aa4844da5653b54a3b79fb2c316e44a
|
3b5edd81bfea64bf8995c1dddbccadecaa9df910
|
refs/heads/master
| 2020-05-04T19:30:15.389795
| 2019-04-04T01:15:46
| 2019-04-04T01:15:46
| 179,396,605
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,723
|
java
|
/**
* Copyright 2018 人人开源 http://www.renren.io
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package io.renren.modules.sys.controller;
import com.google.code.kaptcha.Constants;
import com.google.code.kaptcha.Producer;
import io.renren.common.utils.R;
import io.renren.modules.sys.service.SysUserRoleService;
import io.renren.modules.sys.shiro.ShiroUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.List;
/**
* 登录相关
*
* @author chenshun
* @email sunlightcs@gmail.com
* @date 2016年11月10日 下午1:15:31
*/
@Controller
public class SysLoginController {
@Autowired
private Producer producer;
@Autowired
private SysUserRoleService sysUserRoleService;
@RequestMapping("captcha.jpg")
public void captcha(HttpServletResponse response)throws IOException {
response.setHeader("Cache-Control", "no-store, no-cache");
response.setContentType("image/jpeg");
//生成文字验证码
String text = producer.createText();
//生成图片验证码
BufferedImage image = producer.createImage(text);
//保存到shiro session
ShiroUtils.setSessionAttribute(Constants.KAPTCHA_SESSION_KEY, text);
ServletOutputStream out = response.getOutputStream();
ImageIO.write(image, "jpg", out);
}
/**
* 登录
*/
@ResponseBody
@RequestMapping(value = "/sys/login", method = RequestMethod.POST)
public R login(String username, String password, String captcha) {
String kaptcha = ShiroUtils.getKaptcha(Constants.KAPTCHA_SESSION_KEY);
if(!captcha.equalsIgnoreCase(kaptcha)){
return R.error("验证码不正确");
}
try{
Subject subject = ShiroUtils.getSubject();
UsernamePasswordToken token = new UsernamePasswordToken(username, password);
subject.login(token);
subject.getSession().setAttribute("scenicId","lgh");
String roleName = sysUserRoleService.queryRoleNameList(ShiroUtils.getUserId());
if (roleName.contains("atm")){
subject.getSession().setTimeout(1000*10);
}
}catch (UnknownAccountException e) {
return R.error(e.getMessage());
}catch (IncorrectCredentialsException e) {
return R.error("账号或密码不正确");
}catch (LockedAccountException e) {
return R.error("账号已被锁定,请联系管理员");
}catch (AuthenticationException e) {
return R.error("账户验证失败");
}
return R.ok();
}
/**
* 退出
*/
@RequestMapping(value = "logout", method = RequestMethod.GET)
public String logout() {
String scenicId= (String) ShiroUtils.getSubject().getSession().getAttribute("scenicId");
ShiroUtils.logout();
return "redirect:login.html?scenicId="+scenicId;
}
}
|
[
"276349574@qq.com"
] |
276349574@qq.com
|
1243c44d888c545570956982fb8abeb51cc041a1
|
ffbc4e5072a571d24eb8837ee185bf7c890438a8
|
/NeurophStudio/NeurophClassificationSample/src/org/neuroph/netbeans/classificationsample/NeuralNetObserver.java
|
4a906f1108ee17c2464a050e8adc5a24e50ce082
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
ABjelotomic/ART
|
3f5c2405f60c0f3ad64d9805db68a7a59c9b6def
|
6cb3a624502820667c17efebd4554eb44595950b
|
refs/heads/master
| 2020-04-09T22:57:51.415584
| 2015-03-17T11:15:10
| 2015-03-17T11:15:10
| 32,153,662
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 611
|
java
|
package org.neuroph.netbeans.classificationsample;
import java.util.Observable;
import java.util.Observer;
import org.neuroph.core.NeuralNetwork;
/**
*
* @author Marko
*/
public class NeuralNetObserver implements Observer{
private NeuralNetwork nnet = new NeuralNetwork();
public NeuralNetwork getNnet() {
return nnet;
}
public void setNeuralNet(NeuralNetwork nn)
{
nnet = nn;
}
public void update(Observable o, Object arg) {
setNeuralNet(((org.neuroph.netbeans.classificationsample.PerceptronSampleTrainingSet)o).getNeuralNetwork());
}
}
|
[
"sevarac@4ad91d96-3078-4544-b664-688ae3f1b027"
] |
sevarac@4ad91d96-3078-4544-b664-688ae3f1b027
|
e6888404771571f4de157f0b1c1615942272b5f2
|
2f10b47b903e63798acab6fa7a93f8fff997341d
|
/design-patterns/src/decoratorpattern/Whip.java
|
1760a7db440298a15f40dd03d3ec2a979731a8b4
|
[] |
no_license
|
rakshith67/rakshithWorkspace
|
3d02c499f6305613fcdb1cb4081ef33ad0d63896
|
8e2f70b8ca84d98c9e77a94ac04265f75eb4b366
|
refs/heads/master
| 2021-06-25T10:18:20.441547
| 2021-02-01T17:37:21
| 2021-02-01T17:37:21
| 203,383,906
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 286
|
java
|
package decoratorpattern;
public class Whip extends CondimentDecorator {
public Whip(Beverage beverage) {
this.beverage = beverage;
}
public String getDescription() {
return beverage.getDescription() + ", Whip";
}
public double cost() {
return .10 + beverage.cost();
}
}
|
[
"Rakshith.Mamidala@amdocs.com"
] |
Rakshith.Mamidala@amdocs.com
|
c3a5847efc5bd0f70877078f5d976cd70935d8e4
|
a78fe462c02c6e5cf329d7d187186d7fc3290562
|
/app/src/main/java/sistem/Smarta/grandcikarangcity2/model/DataPengajuan.java
|
862d441db420bbbcf8c5ec0aca7c4254eff7667e
|
[] |
no_license
|
zenzero3/Aplikasi-Manajement-RT
|
66ac41ac0900d370c1e89a42dbea9b41310adb94
|
59f9254d5cce320d20142baf719d861d50510f1e
|
refs/heads/master
| 2023-07-16T04:24:27.763100
| 2021-09-02T08:54:19
| 2021-09-02T08:54:19
| 375,195,988
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 688
|
java
|
package sistem.Smarta.grandcikarangcity2.model;
public class DataPengajuan {
private String namasurat,namawarga,status,id;
public void setId(String id) {
this.id = id;
}
public void setNamasurat(String namasurat){
this.namasurat=namasurat;
}
public void setNamawarga(String namawarga){
this.namawarga=namawarga;
}
public void setStatus(String status){
this.status=status;
}
public String getNamasurat(){
return namasurat;
}
public String getId() {
return id;
}
public String getNamawarga() {
return namawarga;
}
public String getStatus() {
return status;
}
}
|
[
"zen.ilfat@gmail.com"
] |
zen.ilfat@gmail.com
|
6c8b18c8e4efabf06771f592988066596372ac8f
|
ea4da81a69a300624a46fce9e64904391c37267c
|
/src/main/java/com/alipay/api/domain/AlipayOpenServicemarketInstanceSyncModel.java
|
dc94e028eefb2d3de2cd2fc0ecd50b90721788b8
|
[
"Apache-2.0"
] |
permissive
|
shiwei1024/alipay-sdk-java-all
|
741cc3cb8cf757292b657ce05958ff9ad8ecf582
|
d6a051fd47836c719a756607e6f84fee2b26ecb4
|
refs/heads/master
| 2022-12-29T18:46:53.195585
| 2020-10-09T06:34:30
| 2020-10-09T06:34:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,981
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 服务市场实例同步
*
* @author auto create
* @since 1.0, 2019-11-18 13:30:28
*/
public class AlipayOpenServicemarketInstanceSyncModel extends AlipayObject {
private static final long serialVersionUID = 4441873247631581169L;
/**
* 2088101118588888
*/
@ApiField("consumer_uid")
private String consumerUid;
/**
* 生效时间,格式yyyy-MM-dd HH:mm:ss
*/
@ApiField("effect_date")
private String effectDate;
/**
* 事件类型
*/
@ApiField("event")
private String event;
/**
* 过期时间,格式yyyy-MM-dd HH:mm:ss
*/
@ApiField("expire_date")
private String expireDate;
/**
* 金融科技产品码
*/
@ApiField("fin_tech_product_code")
private String finTechProductCode;
/**
* 最后修改时间,用做防请求乱序,针对同一条数据的更新,如果值小于上一个请求的值,该次请求会被丢弃。建议使用数据的修改时间,或者乐观锁的version作为参数值。
*/
@ApiField("gmt_modified")
private Long gmtModified;
/**
* 实例标识
*/
@ApiField("instance_id")
private String instanceId;
/**
* 金融科技实例状态
*/
@ApiField("instance_status")
private String instanceStatus;
/**
* 比如某种业务标准外部订单号,比如交易外部订单号,代表商户端自己订单号
*/
@ApiField("out_biz_no")
private String outBizNo;
public String getConsumerUid() {
return this.consumerUid;
}
public void setConsumerUid(String consumerUid) {
this.consumerUid = consumerUid;
}
public String getEffectDate() {
return this.effectDate;
}
public void setEffectDate(String effectDate) {
this.effectDate = effectDate;
}
public String getEvent() {
return this.event;
}
public void setEvent(String event) {
this.event = event;
}
public String getExpireDate() {
return this.expireDate;
}
public void setExpireDate(String expireDate) {
this.expireDate = expireDate;
}
public String getFinTechProductCode() {
return this.finTechProductCode;
}
public void setFinTechProductCode(String finTechProductCode) {
this.finTechProductCode = finTechProductCode;
}
public Long getGmtModified() {
return this.gmtModified;
}
public void setGmtModified(Long gmtModified) {
this.gmtModified = gmtModified;
}
public String getInstanceId() {
return this.instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public String getInstanceStatus() {
return this.instanceStatus;
}
public void setInstanceStatus(String instanceStatus) {
this.instanceStatus = instanceStatus;
}
public String getOutBizNo() {
return this.outBizNo;
}
public void setOutBizNo(String outBizNo) {
this.outBizNo = outBizNo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
15fc0e48182570496f3a7b12dab0a2e62c29b14a
|
0016005ee6a22429433a4e0e66ff1303147179ec
|
/src/day21_MultiDimensionalArrays/DeepToString.java
|
8e8f5b3ae5305c61b3db7360314a19b2f43f38f0
|
[] |
no_license
|
OrkhanMusayev/B18_JavaCourse
|
7d1fee404169ec7f45b20efc42456f0173577327
|
017a6cfca170ec0c0ace15fa5d5fb319529f2921
|
refs/heads/master
| 2022-12-10T06:03:38.178027
| 2020-08-22T23:31:10
| 2020-08-22T23:31:10
| 286,326,298
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 823
|
java
|
package day21_MultiDimensionalArrays;
import java.util.Arrays;
import java.util.Arrays;
public class DeepToString {
public static void main(String[] args) {
int[] arr1D = {1,2,3};
System.out.println(Arrays.toString(arr1D));
int[][] arr2D = {{1,2,3},{4,5,6}};
System.out.println( Arrays.toString(arr2D));
System.out.println( Arrays.deepToString(arr2D));
// 0 1 0 1
int[][][] arr3D = { {{1,2,3},{4,5,6}} , {{7,8,9},{10,11,12}} };
// 0 1
System.out.println( Arrays.deepToString( arr3D[1] ) );
System.out.println( Arrays.toString( arr3D[0][1] ) );
System.out.println( arr3D[1][1][2] );
}
}
|
[
"mussayevorkhan@gmail.com"
] |
mussayevorkhan@gmail.com
|
f083e49cf7aa7410215d813eee6e586de4067bfa
|
52280cf6517f27bde1ad70037bc20f9aaa01d6c5
|
/src/com/jd/lottery/lib/data/CurrIssueManager.java
|
61946c95b4f1c94e5e55ca033e246b242d03bfff
|
[] |
no_license
|
xiangyong/JDMall
|
7730ae3395a44d03387f4d4075a1b2c8870c23be
|
5ce5a7870e87a67cad500903bc169cd266b5a2e9
|
refs/heads/master
| 2021-01-16T18:13:41.254336
| 2014-02-26T09:59:08
| 2014-02-26T09:59:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 857
|
java
|
package com.jd.lottery.lib.data;
import android.content.Context;
import com.jd.droidlib.persist.sql.EntityManager;
import com.jd.lottery.lib.model.CurrIssueEntity;
public class CurrIssueManager
extends EntityManager<CurrIssueEntity>
{
public CurrIssueManager(Context paramContext)
{
super(CurrIssueEntity.class, paramContext);
}
public boolean create(CurrIssueEntity paramCurrIssueEntity)
{
paramCurrIssueEntity.id = 0L;
return super.create(paramCurrIssueEntity);
}
public boolean update(CurrIssueEntity paramCurrIssueEntity)
{
paramCurrIssueEntity.id = 0L;
return super.update(paramCurrIssueEntity);
}
}
/* Location: C:\Users\yepeng\Documents\classes-dex2jar.jar
* Qualified Name: com.jd.lottery.lib.data.CurrIssueManager
* JD-Core Version: 0.7.0.1
*/
|
[
"13718868826@163.com"
] |
13718868826@163.com
|
6aa37b19177305b77f7beccc04d904d8fd8e4acf
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE129_Improper_Validation_of_Array_Index/s01/CWE129_Improper_Validation_of_Array_Index__database_array_read_check_min_74b.java
|
02c9e9ed456912bebacda692f333d22c88c82f41
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,061
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_of_Array_Index__database_array_read_check_min_74b.java
Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml
Template File: sources-sinks-74b.tmpl.java
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: database Read data from a database
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: array_read_check_min
* GoodSink: Read from array after verifying that data is at least 0 and less than array.length
* BadSink : Read from array after verifying that data is at least 0 (but not verifying that data less than array.length)
* Flow Variant: 74 Data flow: data passed in a HashMap from one method to another in different source files in the same package
*
* */
package testcases.CWE129_Improper_Validation_of_Array_Index.s01;
import testcasesupport.*;
import java.util.HashMap;
import javax.servlet.http.*;
public class CWE129_Improper_Validation_of_Array_Index__database_array_read_check_min_74b
{
public void badSink(HashMap<Integer,Integer> dataHashMap ) throws Throwable
{
int data = dataHashMap.get(2);
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = { 0, 1, 2, 3, 4 };
/* POTENTIAL FLAW: Verify that data >= 0, but don't verify that data < array.length, so may be attempting to read out of the array bounds */
if (data >= 0)
{
IO.writeLine(array[data]);
}
else
{
IO.writeLine("Array index out of bounds");
}
}
/* goodG2B() - use GoodSource and BadSink */
public void goodG2BSink(HashMap<Integer,Integer> dataHashMap ) throws Throwable
{
int data = dataHashMap.get(2);
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = { 0, 1, 2, 3, 4 };
/* POTENTIAL FLAW: Verify that data >= 0, but don't verify that data < array.length, so may be attempting to read out of the array bounds */
if (data >= 0)
{
IO.writeLine(array[data]);
}
else
{
IO.writeLine("Array index out of bounds");
}
}
/* goodB2G() - use BadSource and GoodSink */
public void goodB2GSink(HashMap<Integer,Integer> dataHashMap ) throws Throwable
{
int data = dataHashMap.get(2);
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = { 0, 1, 2, 3, 4 };
/* FIX: Fully verify data before reading from array at location data */
if (data >= 0 && data < array.length)
{
IO.writeLine(array[data]);
}
else
{
IO.writeLine("Array index out of bounds");
}
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
9bdac05ecb564649883ab343567bef296c33ee83
|
de3c2d89f623527b35cc5dd936773f32946025d2
|
/src/main/java/com/bytedance/sdk/openadsdk/utils/Reflection.java
|
25825fd1d4f667ef4df6c95307d953a7cbbd8597
|
[] |
no_license
|
ren19890419/lvxing
|
5f89f7b118df59fd1da06aaba43bd9b41b5da1e6
|
239875461cb39e58183ac54e93565ec5f7f28ddb
|
refs/heads/master
| 2023-04-15T08:56:25.048806
| 2020-06-05T10:46:05
| 2020-06-05T10:46:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,597
|
java
|
package com.bytedance.sdk.openadsdk.utils;
import java.lang.reflect.Method;
/* renamed from: com.bytedance.sdk.openadsdk.utils.aa */
public class Reflection {
/* renamed from: a */
private static Object f9107a;
/* renamed from: b */
private static Method f9108b;
static {
try {
Method declaredMethod = Class.class.getDeclaredMethod("forName", new Class[]{String.class});
Method declaredMethod2 = Class.class.getDeclaredMethod("getDeclaredMethod", new Class[]{String.class, Class[].class});
Class cls = (Class) declaredMethod.invoke(null, new Object[]{"dalvik.system.VMRuntime"});
Method method = (Method) declaredMethod2.invoke(cls, new Object[]{"getRuntime", null});
f9108b = (Method) declaredMethod2.invoke(cls, new Object[]{"setHiddenApiExemptions", new Class[]{String[].class}});
f9107a = method.invoke(null, new Object[0]);
} catch (Throwable th) {
C2564t.m12221b("Reflection", "reflect bootstrap failed:", th);
}
}
/* renamed from: a */
public static boolean m11928a(String... strArr) {
Object obj = f9107a;
if (obj != null) {
Method method = f9108b;
if (method != null) {
try {
method.invoke(obj, new Object[]{strArr});
return true;
} catch (Throwable unused) {
}
}
}
return false;
}
/* renamed from: a */
public static boolean m11927a() {
return m11928a("L");
}
}
|
[
"593746220@qq.com"
] |
593746220@qq.com
|
7fa3e9a6f791d5d9da192d25fc6bd180b712db7b
|
551507b5ba52c3341aeadd1df596d949f8f7fbe6
|
/webflux/src/main/java/org/springframework/security/web/server/authentication/AuthenticationEntryPointFailureHandler.java
|
95cd2cf5d5621a6ae72d04650e6a15108645a809
|
[
"Apache-2.0"
] |
permissive
|
hoomanb1/spring-security
|
eb591ccd1b9ec43067c596887b84ba6fdb53d19f
|
c2fa89f11e7714c96783ae962ffe24b4d08c4731
|
refs/heads/master
| 2021-12-03T15:32:47.214165
| 2021-11-29T01:07:03
| 2021-11-29T01:07:03
| 106,230,005
| 0
| 0
| null | 2017-10-09T02:56:40
| 2017-10-09T02:56:40
| null |
UTF-8
|
Java
| false
| false
| 1,655
|
java
|
/*
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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.springframework.security.web.server.authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.server.AuthenticationEntryPoint;
import org.springframework.security.web.server.WebFilterExchange;
import org.springframework.util.Assert;
import reactor.core.publisher.Mono;
/**
* @author Rob Winch
* @since 5.0
*/
public class AuthenticationEntryPointFailureHandler implements AuthenticationFailureHandler {
private final AuthenticationEntryPoint authenticationEntryPoint;
public AuthenticationEntryPointFailureHandler(
AuthenticationEntryPoint authenticationEntryPoint) {
Assert.notNull(authenticationEntryPoint, "authenticationEntryPoint cannot be null");
this.authenticationEntryPoint = authenticationEntryPoint;
}
@Override
public Mono<Void> onAuthenticationFailure(WebFilterExchange webFilterExchange,
AuthenticationException exception) {
return this.authenticationEntryPoint.commence(webFilterExchange.getExchange(), exception);
}
}
|
[
"rwinch@users.noreply.github.com"
] |
rwinch@users.noreply.github.com
|
35b721c3f240be62881e9494d84ece7f3b2a8892
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-84b-1-24-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/direct/DirectSearchOptimizer_ESTest.java
|
96443967029dc22acfa5808f29907a88a933fb7f
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,313
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Apr 03 08:38:28 UTC 2020
*/
package org.apache.commons.math.optimization.direct;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math.optimization.OptimizationException;
import org.apache.commons.math.optimization.direct.MultiDirectional;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DirectSearchOptimizer_ESTest extends DirectSearchOptimizer_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
MultiDirectional multiDirectional0 = new MultiDirectional();
multiDirectional0.setMaxIterations((-2146160621));
try {
multiDirectional0.incrementIterationsCounter();
fail("Expecting exception: OptimizationException");
} catch(OptimizationException e) {
//
// org.apache.commons.math.MaxIterationsExceededException: Maximal number of iterations (-2,146,160,621) exceeded
//
verifyException("org.apache.commons.math.optimization.direct.DirectSearchOptimizer", e);
}
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
036019c8562984235a353fac849f1c3c5846c1b2
|
726b6d9f5bd965b8047662cdf3c7f2796139e69c
|
/InteraxTelephonyAsteriskJava/src/org/asteriskjava/fastagi/command/AnswerCommand.java
|
e38f24bdd04f943372604a9dae90278b242d7003
|
[] |
no_license
|
adiquintero/interaxtelephony
|
794e8311d3f61e3fdec233c055c0e5df4db3274a
|
14dcd109fa3dd5ed74797f681dd87ec793ded703
|
refs/heads/master
| 2020-08-23T09:24:31.158545
| 2019-10-21T14:21:34
| 2019-10-21T14:21:34
| 216,584,831
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,241
|
java
|
/*
* Copyright 2004-2006 Stefan Reuter
*
* 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.asteriskjava.fastagi.command;
/**
* Answers channel if not already in answer state.<p>
* Returns -1 on channel failure, or 0 if successful.
*
* @author srt
* @version $Id: AnswerCommand.java,v 1.1 2010/09/19 19:11:20 yusmery Exp $
*/
public class AnswerCommand extends AbstractAgiCommand
{
/**
* Serial version identifier.
*/
private static final long serialVersionUID = 3762248656229053753L;
/**
* Creates a new AnswerCommand.
*/
public AnswerCommand()
{
super();
}
@Override
public String buildCommand()
{
return "ANSWER";
}
}
|
[
"yquintero@alodiga.com"
] |
yquintero@alodiga.com
|
c7911fcf5c6ea0050dafc18d91532edce686189d
|
48a8f7155f6daa41eb5fc6cfdbfefd5baecf94a9
|
/index-providers/modeshape-lucene-index-provider/src/main/java/org/modeshape/jcr/index/lucene/SingleColumnIndex.java
|
db0bf293178bdaa3cd93fb406eb923a8d392e04d
|
[
"Apache-2.0"
] |
permissive
|
vhalbert/modeshape
|
3aa246867e914a107d95b17a74e655e5917754c9
|
0bde16a631204b7361840dbfb09d8f946784a938
|
refs/heads/master
| 2020-12-01T01:09:40.172364
| 2018-11-16T21:33:54
| 2018-11-16T21:33:54
| 159,847,462
| 0
| 0
|
Apache-2.0
| 2019-05-30T14:24:50
| 2018-11-30T16:07:36
|
Java
|
UTF-8
|
Java
| false
| false
| 3,381
|
java
|
/*
* ModeShape (http://www.modeshape.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.modeshape.jcr.index.lucene;
import java.io.IOException;
import java.util.Map;
import org.apache.lucene.document.Document;
import org.modeshape.common.annotation.Immutable;
import org.modeshape.common.annotation.ThreadSafe;
import org.modeshape.common.util.CheckArg;
import org.modeshape.jcr.ExecutionContext;
import org.modeshape.jcr.index.lucene.query.LuceneQueryFactory;
import org.modeshape.jcr.value.PropertyType;
/**
* Lucene index which only supports a single column. This should perform better in most cases than {@link MultiColumnIndex}
* because there is no real document updating. Each document is removed and then added with new fields.
*
* @author Horia Chiorean (hchiorea@redhat.com)
* @since 4.5
*/
@Immutable
@ThreadSafe
class SingleColumnIndex extends LuceneIndex {
protected SingleColumnIndex( String name,
String workspaceName,
LuceneConfig config,
Map<String, PropertyType> propertyTypesByName,
ExecutionContext context ) {
super(name, workspaceName, config, propertyTypesByName, context);
}
@Override
public void add( String nodeKey, String propertyName, Object[] values ) {
CheckArg.isNotNull(nodeKey, "nodeKey");
CheckArg.isNotNull(propertyName, "propertyName");
CheckArg.isNotNull(values, "values");
try {
Document document = new Document();
addProperty(nodeKey, document, propertyName, values);
// since multiple columns are not possible we'll just update the entire document
// which means removing the old one and creating a new one (which is what Lucene does anyway)
logger.debug("Adding the document '{0}' in the Lucene Index '{1}' with the property '{2}' and values '{3}",
nodeKey, name, propertyName, values);
writer.updateDocument(FieldUtil.idTerm(nodeKey), document);
} catch (IOException e) {
throw new LuceneIndexException(e);
}
}
@Override
protected void remove( String nodeKey, String propertyName ) {
// simply remove the document with this key, since if this method was called, `propertyName` is already tracked by this index
// and there's can't be more than 1 column
try {
writer.deleteDocuments(FieldUtil.idTerm(nodeKey));
} catch (IOException e) {
throw new LuceneIndexException(e);
}
}
@Override
protected LuceneQueryFactory queryFactory( Map<String, Object> variables ) {
return LuceneQueryFactory.forSingleColumnIndex(context.getValueFactories(), variables, propertyTypesByName);
}
}
|
[
"hchiorea@redhat.com"
] |
hchiorea@redhat.com
|
dd742b5a7773f833c44828fa5c2f0e8c73489ed6
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project269/src/test/java/org/gradle/test/performance/largejavamultiproject/project269/p1345/Test26903.java
|
e9cf6ccc7e3d620e714f1a97002212d3f9012934
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128
| 2021-03-04T01:01:39
| 2021-03-04T01:01:39
| 344,307,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,182
|
java
|
package org.gradle.test.performance.largejavamultiproject.project269.p1345;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test26903 {
Production26903 objectUnderTest = new Production26903();
@Test
public void testProperty0() {
Production26900 value = new Production26900();
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
Production26901 value = new Production26901();
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
Production26902 value = new Production26902();
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"sterling.greene@gmail.com"
] |
sterling.greene@gmail.com
|
4dc481e046c7bb1304d3716a591ed4d2699f3cbc
|
736fef3dcf85164cf103976e1753c506eb13ae09
|
/seccon_2015/Reverse-Engineering Android APK 1/files/source/src/android/support/v4/graphics/drawable/DrawableCompat$LollipopMr1DrawableImpl.java
|
224f414a32df8abf437065f1f8e64ecca6050638
|
[
"MIT"
] |
permissive
|
Hamz-a/MyCTFWriteUps
|
4b7dac9a7eb71fceb7d83966dc63cf4e5a796007
|
ffa98e4c096ff1751f5f729d0ec882e079a6b604
|
refs/heads/master
| 2021-01-10T17:46:10.014480
| 2018-04-01T22:14:31
| 2018-04-01T22:14:31
| 47,495,748
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 556
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package android.support.v4.graphics.drawable;
import android.graphics.drawable.Drawable;
// Referenced classes of package android.support.v4.graphics.drawable:
// DrawableCompat, DrawableCompatApi22
static class Q extends Q
{
public Drawable wrap(Drawable drawable)
{
return DrawableCompatApi22.wrapForTinting(drawable);
}
Q()
{
}
}
|
[
"dzcyberdev@gmail.com"
] |
dzcyberdev@gmail.com
|
55d0845285a54172e9bce9c049cc384ca00a4564
|
db590cdb8e3fb6be8109af366b7ae1a52def6aab
|
/Singleton/src/com/it/demo2/SingletonTest03.java
|
d2f2582f8ba06864775c788fe9a06e44280fc274
|
[] |
no_license
|
1035929/pinyougou_project
|
daee28d95e23b314db3b3d2be9b5eaa4dc8699bb
|
776792fbf4e4a746918ec0b515b485fd52386e64
|
refs/heads/master
| 2022-12-23T18:10:42.673592
| 2019-12-22T09:56:24
| 2019-12-22T09:56:24
| 229,547,731
| 0
| 0
| null | 2022-12-16T07:16:13
| 2019-12-22T09:54:49
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 311
|
java
|
package com.it.demo2;
public class SingletonTest03 {
private SingletonTest03(){
}
private static class SingletonManger{
private final static SingletonTest03 instance=new SingletonTest03();
}
public static SingletonTest03 getInstance(){
return SingletonManger.instance;
}
}
|
[
"1035929256@qq.com"
] |
1035929256@qq.com
|
baef96823ac7e0c3b5cc6f003b3f422f955fba24
|
9f2614252555e8d149565032f1496eedd9773081
|
/esac-commons-core/src/main/java/com/esacinc/commons/logging/logstash/impl/TimestampJsonProvider.java
|
58632bcd6261c479d1d60ba8c1b8d4c13d940df2
|
[
"Apache-2.0"
] |
permissive
|
mkotelba/esac-commons
|
bd9033df7191c4ca1efeb5fabb085f6e353821ff
|
81f1567e16fc796dec6694d7929d900deb6a4b78
|
refs/heads/master
| 2021-01-12T11:38:12.464762
| 2017-01-24T03:17:13
| 2017-01-24T03:17:13
| 72,240,463
| 0
| 0
| null | 2016-10-28T20:39:51
| 2016-10-28T20:39:50
| null |
UTF-8
|
Java
| false
| false
| 1,143
|
java
|
package com.esacinc.commons.logging.logstash.impl;
import ch.qos.logback.classic.spi.LoggingEvent;
import com.esacinc.commons.config.property.PropertyTrie;
import com.esacinc.commons.logging.elasticsearch.ElasticsearchDatatype;
import com.esacinc.commons.logging.elasticsearch.ElasticsearchFieldMapping;
import com.esacinc.commons.logging.elasticsearch.impl.ElasticsearchFieldMappingImpl;
import javax.annotation.Nullable;
import net.logstash.logback.composite.FormattedTimestampJsonProvider;
import org.apache.commons.lang3.ArrayUtils;
public class TimestampJsonProvider extends AbstractEsacJsonProvider {
private final static ElasticsearchFieldMapping[] FIELD_MAPPINGS =
ArrayUtils.toArray(new ElasticsearchFieldMappingImpl(FormattedTimestampJsonProvider.FIELD_TIMESTAMP, ElasticsearchDatatype.DATE));
@Override
protected void writeToInternal(PropertyTrie<Object> fields, LoggingEvent event) {
fields.put(FormattedTimestampJsonProvider.FIELD_TIMESTAMP, event.getTimeStamp());
}
@Nullable
@Override
public ElasticsearchFieldMapping[] getFieldMappings() {
return FIELD_MAPPINGS;
}
}
|
[
"michal.kotelba@esacinc.com"
] |
michal.kotelba@esacinc.com
|
cf14f23dd0a9f770ebd44eb2e6eaa0a78ad5121c
|
539c22a397b0679415c26ef0690c4c8f33a82fbb
|
/src/FlowInt.java
|
f6bac96b78b35686701a95cd6e210bf4488dfd98
|
[] |
no_license
|
lupeiadrian/-FlowersDelivery-
|
9808c6f1e4cdae5adcf45669e9bd5ec3b1eb9570
|
c3e9f1ec13c2932e0591d44e1eba8722836561ec
|
refs/heads/master
| 2022-11-27T12:35:51.948118
| 2020-07-01T17:20:26
| 2020-07-01T17:20:26
| 275,565,888
| 0
| 0
| null | 2020-06-28T19:53:19
| 2020-06-28T10:59:53
|
Java
|
UTF-8
|
Java
| false
| false
| 21,840
|
java
|
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Image;
import java.io.File;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout.Alignment;
import javax.swing.GroupLayout;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Color;
import java.awt.Font;
import javax.swing.SwingConstants;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import java.awt.Cursor;
/**
*
* @author Genuine
*/
public class FlowInt extends javax.swing.JFrame {
/**
* Creates new form FlowInt
*/
public FlowInt() {
getContentPane().setBackground(new Color(255, 204, 102));
setUndecorated(true);
setPreferredSize(new Dimension(543,596));
initComponents();
//Calling method/function to add column header to jtable
addTableHeader();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
buttonGroup2 = new javax.swing.ButtonGroup();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jTextFieldName = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel();
jLabel1.setFont(new Font("Segoe Script", Font.PLAIN, 15));
jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
buttonAranjament = new javax.swing.JRadioButton();
buttonAranjament.setBackground(new Color(102, 255, 102));
buttonBuchet = new javax.swing.JRadioButton();
buttonBuchet.setBackground(new Color(102, 255, 102));
boxNatural = new javax.swing.JCheckBox();
boxNatural.setBackground(new Color(0, 255, 255));
boxArtificial = new javax.swing.JCheckBox();
boxArtificial.setBackground(new Color(0, 255, 255));
jComboBoxExteriors = new javax.swing.JComboBox();
jComboBoxExteriors.setBackground(new Color(255, 255, 153));
jComboBoxExteriors.setForeground(new Color(0, 0, 0));
jComboBoxExteriors.setFont(new Font("Segoe Script", Font.PLAIN, 13));
jButton1 = new javax.swing.JButton();
jButton1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
jButton1.setFont(new Font("Segoe Script", Font.PLAIN, 15));
jButton1.setBackground(new Color(255, 102, 51));
jLabelImage = new javax.swing.JLabel();
jLabelImage.setBackground(Color.WHITE);
jButtonBrowseImage = new javax.swing.JButton();
jButtonBrowseImage.setFont(new Font("Segoe Script", Font.PLAIN, 13));
jButtonBrowseImage.setBackground(new Color(255, 153, 255));
jButtonBrowseImage.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"null"
}
));
jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jTable1MouseClicked(evt);
}
});
jScrollPane1.setViewportView(jTable1);
jTextFieldName.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextFieldNameActionPerformed(evt);
}
});
jLabel1.setText("NUME");
buttonGroup1.add(buttonAranjament);
buttonAranjament.setText("Aranjament");
buttonGroup1.add(buttonBuchet);
buttonBuchet.setText("Buchet");
buttonGroup2.add(boxNatural);
boxNatural.setText("Natural");
buttonGroup2.add(boxArtificial);
boxArtificial.setText("Artificial");
jComboBoxExteriors.setModel(new DefaultComboBoxModel(new String[] {"In cutie", "In Folie", "In Sticla"}));
jButton1.setText("Adauga");
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1MouseClicked(evt);
}
});
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButtonBrowseImage.setText("Browse IMG");
jButtonBrowseImage.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonBrowseImageActionPerformed(evt);
}
});
lblTipul = new JLabel();
lblTipul.setFont(new Font("Segoe Script", Font.PLAIN, 15));
lblTipul.setText("Tipul:");
JLabel lblSau = new JLabel();
lblSau.setHorizontalAlignment(SwingConstants.CENTER);
lblSau.setText("SAU");
lblSau.setFont(new Font("Segoe Script", Font.PLAIN, 15));
JLabel lblSau_1 = new JLabel();
lblSau_1.setHorizontalAlignment(SwingConstants.CENTER);
lblSau_1.setText("SAU");
lblSau_1.setFont(new Font("Segoe Script", Font.PLAIN, 15));
JLabel lblExterior = new JLabel();
lblExterior.setText("Exterior:");
lblExterior.setFont(new Font("Segoe Script", Font.PLAIN, 15));
lblNewLabel = new JLabel("");
lblNewLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
lblNewLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
dispose();
}
});
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel.setIcon(new ImageIcon(FlowInt.class.getResource("/Exit.png")));
label = new JLabel("");
label.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
label.addMouseMotionListener(new MouseMotionAdapter() {
@Override
public void mouseDragged(MouseEvent e) {
int cordonataX = e.getXOnScreen();
int cordonataY = e.getYOnScreen();
setLocation(cordonataX, cordonataY);
}
});
label.setHorizontalAlignment(SwingConstants.CENTER);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
layout.setHorizontalGroup(
layout.createParallelGroup(Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(jTextFieldName, GroupLayout.PREFERRED_SIZE, 132, GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addGap(12)
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(jButtonBrowseImage)
.addGroup(layout.createSequentialGroup()
.addComponent(lblTipul, GroupLayout.PREFERRED_SIZE, 60, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(boxNatural, GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
.addComponent(buttonAranjament, GroupLayout.PREFERRED_SIZE, 104, GroupLayout.PREFERRED_SIZE)))
.addComponent(lblExterior, GroupLayout.PREFERRED_SIZE, 87, GroupLayout.PREFERRED_SIZE)))))
.addGroup(layout.createSequentialGroup()
.addGap(49)
.addComponent(jLabel1)))
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabelImage, GroupLayout.PREFERRED_SIZE, 146, GroupLayout.PREFERRED_SIZE)
.addGap(43)
.addComponent(jButton1, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(Alignment.TRAILING)
.addComponent(lblSau, GroupLayout.PREFERRED_SIZE, 60, GroupLayout.PREFERRED_SIZE)
.addComponent(lblSau_1, GroupLayout.PREFERRED_SIZE, 60, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(buttonBuchet, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)
.addComponent(boxArtificial)))
.addComponent(jComboBoxExteriors, GroupLayout.PREFERRED_SIZE, 116, GroupLayout.PREFERRED_SIZE))
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addContainerGap(25, Short.MAX_VALUE)
.addComponent(label, GroupLayout.PREFERRED_SIZE, 475, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 36, GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addContainerGap(14, Short.MAX_VALUE)
.addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 517, GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(Alignment.LEADING, false)
.addComponent(label, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lblNewLabel, GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE))
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(9)
.addGroup(layout.createParallelGroup(Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(jTextFieldName, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
.addGap(18)
.addComponent(jButtonBrowseImage)
.addGap(49))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabelImage, GroupLayout.PREFERRED_SIZE, 138, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)))
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(lblTipul)
.addComponent(buttonAranjament)
.addComponent(lblSau, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
.addComponent(buttonBuchet))
.addPreferredGap(ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(boxNatural)
.addComponent(boxArtificial)
.addComponent(lblSau_1, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
.addGap(35)
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(lblExterior, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBoxExteriors, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(49)
.addComponent(jButton1, GroupLayout.PREFERRED_SIZE, 49, GroupLayout.PREFERRED_SIZE)))
.addGap(18)
.addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 251, GroupLayout.PREFERRED_SIZE)
.addGap(45))
);
getContentPane().setLayout(layout);
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void jTextFieldNameActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
DefaultTableModel model;
String name = "";
String tip1 = "";
String tip2 = "";
String Exterior = "";
String selectedImagePath = "";
// byte imageJtable = new Byte(1024);
//Adding table headers
public void addTableHeader() {
model = (DefaultTableModel) jTable1.getModel();
Object[] newIdentifiers = new Object[]{"Nume", "Tipul", "Tipul", "Exterior", "Image"};
model.setColumnIdentifiers(newIdentifiers);
//Get Image column and override TableCellRenderer class component method (getTableCellRendererComponent)
jTable1.getColumn("Image").setCellRenderer(new myTableCellRenderer());
}
class myTableCellRenderer implements TableCellRenderer {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
// Change Image column minimum width and maximum width
TableColumn tb = jTable1.getColumn("Image");
tb.setMaxWidth(60);
tb.setMinWidth(60);
jTable1.setRowHeight(60);
return (Component) value;
}
}
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
name = jTextFieldName.getText();
if (buttonAranjament.isSelected()) {
tip1 = "Aranjament";
} else if (buttonBuchet.isSelected()) {
tip1 = "Buchet";
}
if (boxNatural.isSelected()) {
tip2 = "Natural";
} else if (boxArtificial.isSelected()) {
tip2 = "Artificial";
}
Exterior = jComboBoxExteriors.getSelectedItem().toString();
JLabel imageLabel = new JLabel();
ImageIcon imageicon = new ImageIcon(selectedImagePath);
//Resize image to fixed dimensions 60 * 60 (width and height).
Image imageIc = imageicon.getImage().getScaledInstance(60, 60, Image.SCALE_SMOOTH);
//Storing imageicon in a jlabel
imageLabel.setIcon(new ImageIcon(imageIc));
//Checking if one or more field is empty
if (name.isEmpty() || tip1.isEmpty() || tip2.isEmpty() || Exterior.isEmpty()) {
JOptionPane.showMessageDialog(null, "One Or More Fields Are Empty");
} else {
// JOptionPane.showMessageDialog(null, "All Fields are filled");
//Adding entered data to jtable
model.addRow(new Object[]{name, tip1, tip2, Exterior, imageLabel});
JOptionPane.showMessageDialog(null, "Data Inserted");
//clear fields after inserting the data
clearFields();
}
}
private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
// Display data from jtable in input fields
int selectedRow = jTable1.getSelectedRow();
jTextFieldName.setText(model.getValueAt(selectedRow, 0).toString());
String tabletip1 = model.getValueAt(selectedRow, 1).toString();
if (tabletip1.equals("Aranjament")) {
buttonAranjament.setSelected(true);
} else if (tabletip1.equals("Buchet")) {
buttonBuchet.setSelected(true);
}
String checkPLanguage = model.getValueAt(selectedRow, 2).toString();
if (checkPLanguage.equals("Natural")) {
boxNatural.setSelected(true);
} else if (checkPLanguage.equals("Artificial")) {
boxArtificial.setSelected(true);
}
String comboSub = model.getValueAt(selectedRow, 3).toString();
for (int i = 0; i < jComboBoxExteriors.getItemCount(); i++) {
if (jComboBoxExteriors.getItemAt(i).toString().equalsIgnoreCase(comboSub)) {
jComboBoxExteriors.setSelectedIndex(i);
}
}
JLabel labJT = (JLabel) model.getValueAt(selectedRow, 4);
ImageIcon iconImage = (ImageIcon) labJT.getIcon();
System.out.println("Returns " + labJT.getIcon());
Image imgJL = iconImage.getImage().getScaledInstance(jLabelImage.getWidth(), jLabelImage.getHeight(), Image.SCALE_SMOOTH);
jLabelImage.setIcon(new ImageIcon(imgJL));
}
private void jButtonBrowseImageActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
// Setting default browser location
JFileChooser browseImageFile = new JFileChooser("C:\\Users\\Public\\Pictures\\Sample Pictures");
//Filter image extensions
FileNameExtensionFilter fnef = new FileNameExtensionFilter("IMAGES", "png", "jpg", "jpeg");
browseImageFile.addChoosableFileFilter(fnef);
int showOpenDialogue = browseImageFile.showOpenDialog(null);
if (showOpenDialogue == JFileChooser.APPROVE_OPTION) {
File selectedImageFile = browseImageFile.getSelectedFile();
selectedImagePath = selectedImageFile.getAbsolutePath();
JOptionPane.showMessageDialog(null, selectedImagePath);
//Display image on jlable
ImageIcon ii = new ImageIcon(selectedImagePath);
// Resize image to fit jlabel
Image image = ii.getImage().getScaledInstance(jLabelImage.getWidth(), jLabelImage.getHeight(), Image.SCALE_SMOOTH);
jLabelImage.setIcon(new ImageIcon(image));
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(FlowInt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(FlowInt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(FlowInt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(FlowInt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new FlowInt().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.ButtonGroup buttonGroup2;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButtonBrowseImage;
private javax.swing.JCheckBox boxNatural;
private javax.swing.JCheckBox boxArtificial;
private javax.swing.JComboBox jComboBoxExteriors;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabelImage;
private javax.swing.JRadioButton buttonBuchet;
private javax.swing.JRadioButton buttonAranjament;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
private javax.swing.JTextField jTextFieldName;
private JLabel lblTipul;
private JLabel lblNewLabel;
private JLabel label;
// End of variables declaration
private void clearFields() {
jTextFieldName.setText("");
buttonGroup1.clearSelection();
buttonGroup2.clearSelection();
jComboBoxExteriors.setSelectedIndex(0);
}
}
|
[
"lupei@DESKTOP-758UGCK"
] |
lupei@DESKTOP-758UGCK
|
e789ade847c54211eabea83000708a6f4030aa21
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/iot-20180120/src/main/java/com/aliyun/iot20180120/models/QueryMessageInfoRequest.java
|
c58087b47b245ed327343e1bfaa276991fb70773
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 943
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.iot20180120.models;
import com.aliyun.tea.*;
public class QueryMessageInfoRequest extends TeaModel {
@NameInMap("IotInstanceId")
public String iotInstanceId;
@NameInMap("UniMsgId")
public String uniMsgId;
public static QueryMessageInfoRequest build(java.util.Map<String, ?> map) throws Exception {
QueryMessageInfoRequest self = new QueryMessageInfoRequest();
return TeaModel.build(map, self);
}
public QueryMessageInfoRequest setIotInstanceId(String iotInstanceId) {
this.iotInstanceId = iotInstanceId;
return this;
}
public String getIotInstanceId() {
return this.iotInstanceId;
}
public QueryMessageInfoRequest setUniMsgId(String uniMsgId) {
this.uniMsgId = uniMsgId;
return this;
}
public String getUniMsgId() {
return this.uniMsgId;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
fb2b5605092c62cab1050da589c354dacd59349e
|
cbd473c31ad9e95249f7ea929004ce2af4be76cc
|
/app/src/main/java/com/example/weather2/FiveDayForecast.java
|
801257e7f86e0bcf93c623a3cefa98078949a68b
|
[] |
no_license
|
the-eugene/Weather2
|
6f48e1871de3984183b349209d4507b5b3850770
|
ff739262fa38e3e8d4a9ba4ed0f478a17f433ca1
|
refs/heads/master
| 2022-12-31T00:39:38.232851
| 2020-10-23T21:34:32
| 2020-10-23T21:34:32
| 306,750,798
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,081
|
java
|
package com.example.weather2;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class FiveDayForecast {
@SerializedName("cnt")
@Expose
public Integer countResponses=0;
@SerializedName("list")
@Expose
public List<WeatherConditions> catalog = null;
@SerializedName("city")
@Expose
public About city;
public String toString(){
StringBuilder text = new StringBuilder(String.format("5 Day Forecast for: %s, %s\n", city.name, city.country));
for (WeatherConditions item:catalog) {
text.append(item.toString(" "));
}
return text.toString();
}
public float findMaxTemp() {
float max=0;
for (WeatherConditions w:catalog) {
max=Math.max(w.measurements.get("temp"),max);
}
return max;
}
public float findMaxWind() {
float max=0;
for (WeatherConditions w:catalog) {
max=Math.max(w.wind.speed,max);
}
return max;
}
}
|
[
"72322861+the-eugene@users.noreply.github.com"
] |
72322861+the-eugene@users.noreply.github.com
|
454c6880cd63cdd9d35318ab11ad83dfc8a0119c
|
516a32e6b2c5b679341abe49d51bab20f68d85d4
|
/src/main/java/com/tianyu/example/asm/App.java
|
265285d9b8ceb8be01671956cad402a22883c654
|
[] |
no_license
|
coobee0620/example
|
b377dd75cb7e9ff8348ccc89bcac2d6598b9fca8
|
0373528e06f86c96f1369d8769183e14d67ba9e3
|
refs/heads/master
| 2021-09-21T19:47:08.714206
| 2018-08-31T02:13:52
| 2018-08-31T02:13:52
| 103,602,040
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,544
|
java
|
package com.tianyu.example.asm;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* App
*
* @Author yu.tian@mtime.com
* @Date 17/10/30 16:29
*/
public class App extends ClassLoader implements Opcodes{
public static void main(String[] args) throws IOException, IllegalAccessException, InstantiationException, InvocationTargetException {
ClassReader cr=new ClassReader(HelloWorld.class.getName());
ClassWriter cw=new ClassWriter(cr,ClassWriter.COMPUTE_FRAMES);
CustomVisitor myv=new CustomVisitor(Opcodes.ASM5,cw);
cr.accept(myv, ClassReader.EXPAND_FRAMES);
byte[] code=cw.toByteArray();
//自定义加载器
App loader=new App();
Class<?> appClass=loader.defineClass(null, code, 0,code.length);
Method[] methods = appClass.getMethods();
for (Method method : methods) {
if (method.getName().equals("sayHello")) {
try {
method.invoke(appClass.newInstance(), new Object[]{});
} catch (Exception e) {
System.out.println(e.getCause().getMessage());
}
// method.invoke(appClass.newInstance(), new Object[]{});
}
}
// FileOutputStream f=new FileOutputStream(new File("d:"+File.separator+"ok2.class"));
// f.write(code);
// f.close();
}
}
|
[
"yu.tian@mtime.com"
] |
yu.tian@mtime.com
|
a43615857d74b0647bbcda37bd898af06b407190
|
76dda0e120b3129be9809d463c90ffc1f9690ba4
|
/Notes3.java
|
e907cf71557ab6c315cf352da151828153139048
|
[] |
no_license
|
RathoreDevansh08/Java_Notes
|
1e2abc03e47ed0312aed846728f01077cd6bba90
|
42d37dff002a6c68f5982f12dc5a45090f7b794d
|
refs/heads/master
| 2022-10-19T21:44:06.203690
| 2020-06-11T16:38:11
| 2020-06-11T16:38:11
| 270,387,373
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,246
|
java
|
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TOPICS :: Conditional statements, Switch, Loops(For, While, Do-While, For-each), break/continue.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
public class Notes3 {
public static void main(String[] args) {
// comparision operators: ==, !=. >=, <=, >, <
// logical operators: &&, ||, !
// conditional statements
int age = 21;
if(age<18) System.out.println("Minor");
else if (age>=18 && age<50) {
System.out.println("Mid age: " + ++age); // Output > Mid age: 22
}
else System.out.println("Old");
String ternary = (10 >= 20) ? "Maths!!" : "Stupid!!"; //ternary operator
System.out.println(ternary); // Output > "Stupid!!"
// switch statements
String sw1 = "mentor";
switch(sw1){
case "admin":
System.out.println("Its Admin.");
break;
case "student":
System.out.println("Its Student.");
break;
case "mentor":
System.out.println("Its Mentor."); // Output > "Its Mentor."
break;
default:
System.out.println("Guest");
}
// We cannot use '!=' or '==' to compare two strings as they are of reference type.
String nm = "DSR";
System.out.println(nm.equals("DSR")); // Output > true
// For loop
for(int i=0; i<1; i++){
System.out.println("Crazy"); // Output > "Crazy"
}
// While loop
while(true)
{
break;
}
// Do While loop
do {
age++;
} while(!true);
// For-each loop
String[] fruits = {"Apple", "Mango", "Orange"};
for(String fruit : fruits){
System.out.print(fruit); // Ouput > AppleMangoOrange
}
System.out.println();
/*
break -> to end a loop, switch condition
continue -> to bring at the loop beginning
*/
}
}
|
[
"rathoredevansh08@gmail.com"
] |
rathoredevansh08@gmail.com
|
5c4ca9c8c5914fbc4a750aeb9bbe7d81c8543838
|
bd729ef9fcd96ea62e82bb684c831d9917017d0e
|
/CHPT/source/trunk/supp_app/SspDispatchService/src/com/ctfo/storage/model/basedata/TbVehicleModels.java
|
eb4495f5f0bd8ebd5feba0dc3dbf17dbeed40c1e
|
[] |
no_license
|
shanghaif/workspace-kepler
|
849c7de67b1f3ee5e7da55199c05c737f036780c
|
ac1644be26a21f11a3a4a00319c450eb590c1176
|
refs/heads/master
| 2023-03-22T03:38:55.103692
| 2018-03-24T02:39:41
| 2018-03-24T02:39:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,797
|
java
|
package com.ctfo.storage.model.basedata;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
*
* <p>
* ----------------------------------------------------------------------------- <br>
* 工程名 : SspDispatchService <br>
* 功能: 车型档案<br>
* 描述: 车型档案<br>
* 授权 : (C) Copyright (c) 2011 <br>
* 公司 : 北京中交慧联信息科技有限公司 <br>
* ----------------------------------------------------------------------------- <br>
* 修改历史 <br>
* <table width="432" border="1">
* <tr>
* <td>版本</td>
* <td>时间</td>
* <td>作者</td>
* <td>改变</td>
* </tr>
* <tr>
* <td>1.0</td>
* <td>2014-11-5</td>
* <td>xuehui</td>
* <td>创建</td>
* </tr>
* </table>
* <br>
* <font color="#FF0000">注意: 本内容仅限于[北京中交慧联信息科技有限公司]内部使用,禁止转发</font> <br>
*
* @version 1.0
*
* @author xuehui
* @since JDK1.6
*/
public class TbVehicleModels implements Serializable {
/** */
private static final long serialVersionUID = -3650287222202590535L;
/** 车型档案ID */
private String vmId;
/** 数据来源,关联字典码表 */
private String dataSource;
/** 车辆品牌,关联字典码表 */
private String vBrand;
/** 车型类别,关联字典码表 */
private String vmType;
/** 车型分类,字典 */
private String vmClass;
/** 车型编号 */
private String vmCode;
/** 车型名称 */
private String vmName;
/** 备注 */
private String remark;
/** 外出里程单价---宇通 */
private BigDecimal outPrice;
/** 外出里程单价(特殊)---宇通 */
private BigDecimal outSpecialPrice;
/** 可售车型---宇通 */
private String vSaleType;
/** 报到单价---宇通 */
private BigDecimal reportPrice;
/** 特殊里程单价时间(开始)---宇通 */
private String beginDate;
/** 特殊里程单价时间(结束)---宇通 */
private String endDate;
/** 保养单价---宇通 */
private BigDecimal repairPrice;
/** 删除标记,0为删除,1未删除 默认1 */
private String enableFlag;
/** 状态 0,停用 1,启用 */
private String status;
/** 最后编辑时间 */
private Long updateTime;
/** 创建人,关联人员表 */
private String createBy;
/** 创建时间 */
private Long createTime;
/** 最后编辑人,关联人员表 */
private String updateBy;
/** 服务站id,云平台用 */
private String serStationId;
/** 帐套id,云平台用 */
private String setBookId;
/** 宇通CRMid */
private String modelsCrmId;
public String getSerStationId() {
return serStationId;
}
public void setSerStationId(String serStationId) {
this.serStationId = serStationId;
}
public String getSetBookId() {
return setBookId;
}
public void setSetBookId(String setBookId) {
this.setBookId = setBookId;
}
public String getVmId() {
return vmId;
}
public void setVmId(String vmId) {
this.vmId = vmId;
}
public String getDataSource() {
return dataSource;
}
public void setDataSource(String dataSource) {
this.dataSource = dataSource;
}
public String getVBrand() {
return vBrand;
}
public void setVBrand(String vBrand) {
this.vBrand = vBrand;
}
public String getVmType() {
return vmType;
}
public void setVmType(String vmType) {
this.vmType = vmType;
}
public String getVmClass() {
return vmClass;
}
public void setVmClass(String vmClass) {
this.vmClass = vmClass;
}
public String getVmCode() {
return vmCode;
}
public void setVmCode(String vmCode) {
this.vmCode = vmCode;
}
public String getVmName() {
return vmName;
}
public void setVmName(String vmName) {
this.vmName = vmName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public BigDecimal getOutPrice() {
return outPrice;
}
public void setOutPrice(BigDecimal outPrice) {
this.outPrice = outPrice;
}
public BigDecimal getOutSpecialPrice() {
return outSpecialPrice;
}
public void setOutSpecialPrice(BigDecimal outSpecialPrice) {
this.outSpecialPrice = outSpecialPrice;
}
public String getVSaleType() {
return vSaleType;
}
public void setVSaleType(String vSaleType) {
this.vSaleType = vSaleType;
}
public BigDecimal getReportPrice() {
return reportPrice;
}
public void setReportPrice(BigDecimal reportPrice) {
this.reportPrice = reportPrice;
}
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public BigDecimal getRepairPrice() {
return repairPrice;
}
public void setRepairPrice(BigDecimal repairPrice) {
this.repairPrice = repairPrice;
}
public String getEnableFlag() {
return enableFlag;
}
public void setEnableFlag(String enableFlag) {
this.enableFlag = enableFlag;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Long updateTime) {
this.updateTime = updateTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public String getModelsCrmId() {
return modelsCrmId;
}
public void setModelsCrmId(String modelsCrmId) {
this.modelsCrmId = modelsCrmId;
}
}
|
[
"zhangjunfang0505@163.com"
] |
zhangjunfang0505@163.com
|
a2c81a38f5f2e3b597d03ed4781d094e21bbdabe
|
00b1b8ec0ec1e5b9d39548cc104aa8c751d4304d
|
/src/main/java/com/ironhack/midterm/bankingAPI/utils/Decode.java
|
6bb44a8337cedb6bf91c654b7090707c35d7baef
|
[] |
no_license
|
EN-IH-WDPT-JUN21/miniProject_group1_monolith
|
99c0548f215c500aaaf573b4e0f43eab5630525e
|
f4e7baffe3a9275271d026d99bb4981a39bdc37e
|
refs/heads/master
| 2023-09-03T22:28:19.734265
| 2021-10-09T13:43:30
| 2021-10-09T13:43:30
| 415,319,298
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 520
|
java
|
package com.ironhack.midterm.bankingAPI.utils;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
public class Decode {
public static void main(String[] args) {
BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
System.out.println("123456");
System.out.println(bCryptPasswordEncoder.encode("123456"));
System.out.println(bCryptPasswordEncoder.matches("123456", "$2a$10$rGyUQKQZC9ybFZCRAiYpmeSpO53weufrTBZ3NbdWiIM8tmJGRyQ.C"));
}
}
|
[
"wojtek.drygas@gmail.com"
] |
wojtek.drygas@gmail.com
|
1a593df3c1b667fe14fb5947e57d865a7d69a9dd
|
b181102cc07b2704fff74d25e197126f6cbf37ed
|
/xmd-shop-parent/xmd-shop-commons/xmd-shop-common-oauth/src/test/java/com/baidu/test/JwtTokenTest.java
|
b6d50ca9a044a046a50fc269e28fee7476d671de
|
[] |
no_license
|
xinmengdan/xmd-shop
|
8d657bdd8ccbcaa202bff8cb5ec843df56b8d28c
|
8f6461ed0353d880102d1fcdf0c45f759c3e607d
|
refs/heads/master
| 2023-01-03T04:08:28.790114
| 2020-10-31T03:29:28
| 2020-10-31T03:29:28
| 290,703,909
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,099
|
java
|
package com.baidu.test;
import com.baidu.shop.dto.UserInfo;
import com.baidu.shop.utils.JwtUtils;
import com.baidu.shop.utils.RsaUtils;
import org.junit.Before;
import org.junit.Test;
import java.security.PrivateKey;
import java.security.PublicKey;
/**
* @ClassName JwtTokenTest
* @Description: TODO
* @Author xinmengdan
* @Date 2020/10/15
* @Version V1.0
**/
public class JwtTokenTest {
//公钥位置
private static final String pubKeyPath = "D:\\secret\\rea.pub";
//私钥位置
private static final String priKeyPath = "D:\\secret\\rea.pri";
//公钥对象
private PublicKey publicKey;
//私钥对象
private PrivateKey privateKey;
/**
* 生成公钥私钥 根据密文
* @throws Exception
*/
@Test
public void genRsaKey() throws Exception {
RsaUtils.generateKey(pubKeyPath, priKeyPath, "baidu");
}
/**
* 从文件中读取公钥私钥
* @throws Exception
*/
@Before
public void getKeyByRsa() throws Exception {
this.publicKey = RsaUtils.getPublicKey(pubKeyPath);
this.privateKey = RsaUtils.getPrivateKey(priKeyPath);
}
/**
* 根据用户信息结合私钥生成token
* @throws Exception
*/
@Test
public void genToken() throws Exception {
// 生成token
String token = JwtUtils.generateToken(new UserInfo(1, "hhh"), privateKey, 2);
System.out.println("user-token = " + token);
}
/**
* 结合公钥解析token
* @throws Exception
*/
@Test
public void parseToken() throws Exception {
String token = "eyJhbGciOiJSUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJpZGZrY3giLCJleHAiOjE2MDI3NDU4MDF9.HLlWO-725_Hgzt6JZLIzGLN8Sjtc2Aymu2TitzfkJD72f_Dx1GmaxHO5jP9NEH0GI5fJbP7r1KNBQ9P3WGiwzP_oB1DwrfwwmNmIAUQsHA3oRxnlLs7mexG7qTaYHsA0VYZnHiZhJbALbHyv9N5LLtrecEwobr4GP9KiRpkwFhw";
// 解析token
UserInfo user = JwtUtils.getInfoFromToken(token, publicKey);
System.out.println("id: " + user.getId());
System.out.println("userName: " + user.getUsername());
}
}
|
[
"xinmengdan@163.com"
] |
xinmengdan@163.com
|
edb030fa75b009b4bc41bba4d98c9d84a56d90d4
|
fb07107b7758bd1c1ec30feb13d612f318093901
|
/src/main/java/br/com/brazukas/Models/Responses/PagamentoResponse.java
|
34bfe4d5bd7bbf5174b0cb503bf135b224ba9bb1
|
[] |
no_license
|
Caio-Moreno/Ecommerce-Java-API
|
05d08a23356d8aaf0a73935f91b952a1725aaa5a
|
c3fde439afd330af85a193f2fbe85b184e0e4b00
|
refs/heads/main
| 2023-07-15T04:46:09.428811
| 2021-08-31T18:47:09
| 2021-08-31T18:47:09
| 342,949,334
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 345
|
java
|
package br.com.brazukas.Models.Responses;
import br.com.brazukas.Models.Payment;
import lombok.*;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class PagamentoResponse {
private int _httpCode;
private String _message;
private int _idVenda;
private String _numPedido;
private Payment _pagamento;
}
|
[
"cvinicius.moreno@outlook.com"
] |
cvinicius.moreno@outlook.com
|
639591f834a2490e01cec7d1ccbf5772118a76f8
|
4215fe95adc47d31b712c777c05e3085e66f8a5d
|
/src/plugins/dbaccess/src/java/org/jivesoftware/openfire/plugin/DbAccessPlugin.java
|
446414addfbdee8be169d3bc09451edca71c9ac7
|
[
"Apache-2.0"
] |
permissive
|
koothooloo/openfire
|
a27ca5d530fef683687da6c95dfb6b488279b27a
|
258663addfea44b31132a21d52198b6e2aaba44f
|
refs/heads/master
| 2023-01-10T00:12:59.395548
| 2017-02-23T03:13:32
| 2017-04-03T20:01:53
| 87,117,292
| 0
| 0
|
Apache-2.0
| 2022-12-27T14:47:20
| 2017-04-03T20:23:16
|
Java
|
UTF-8
|
Java
| false
| false
| 724
|
java
|
/**
* Copyright (C) 2008 Daniel Henninger. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.plugin;
import org.jivesoftware.openfire.container.Plugin;
import org.jivesoftware.openfire.container.PluginManager;
import java.io.File;
/**
* This is a stub for now, really does nothing for the plugin what-so-ever.
*
* @author Daniel Henninger
*/
public class DbAccessPlugin implements Plugin {
public void initializePlugin(PluginManager manager, File pluginDirectory) {
// Nothing to do
}
public void destroyPlugin() {
// Nothing to do
}
}
|
[
"daeva@b35dd754-fafc-0310-a699-88a17e54d16e"
] |
daeva@b35dd754-fafc-0310-a699-88a17e54d16e
|
f09de8f7b4d48eacdf1272abfde4f6a77bebbfba
|
b051fb2c04233d7fc1777ea69e92d09a9e836b7c
|
/src/main/java/com/btanabe/busnotifier/onebusaway/listeners/LoggingRetryListener.java
|
2b62c15f17b5bfde67734e04256bb3533e79ffe5
|
[] |
no_license
|
brian-tanabe/BusNotifier
|
5a4da0c90780929bf6f429c33ed9e9e10f4d913e
|
ba87591d1f9395a4ff71b17c12d832939e1f2263
|
refs/heads/master
| 2020-01-23T22:03:58.439001
| 2017-02-05T20:24:06
| 2017-02-05T20:24:06
| 74,704,754
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,357
|
java
|
package com.btanabe.busnotifier.onebusaway.listeners;
import com.github.rholder.retry.Attempt;
import com.github.rholder.retry.RetryListener;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
/**
* Created by Brian on 12/11/16.
*/
@Slf4j
public class LoggingRetryListener implements RetryListener {
@Override
public <V> void onRetry(Attempt<V> attempt) {
if (attempt.hasResult()) {
logSuccessAttemptMessage(attempt);
} else {
logUnsuccessfulAttemptMessage(attempt);
}
}
private <V> void logSuccessAttemptMessage(Attempt<V> attempt) {
log.info(String.format("Successful request: retries needed=[%d], time since first attempt=[%d ms]", attempt.getAttemptNumber() - 1, attempt.getDelaySinceFirstAttempt()));
}
/**
* TODO FIGURE OUT IF ITEMS WITHOUT RESULTS WILL ALWAYS HAVE AN EXCEPTION. I'M NOT SURE IF THEY WILL.
*
* @param attempt
* @param <V>
*/
private <V> void logUnsuccessfulAttemptMessage(Attempt<V> attempt) {
log.error(String.format("Unsuccessful request: attempt count=[%d], time since first attempt=[%d ms], cause=[%s]", attempt.getAttemptNumber(), attempt.getDelaySinceFirstAttempt(), ExceptionUtils.getRootCause(attempt.getExceptionCause()).getClass().getSimpleName()));
}
}
|
[
"btanabe2@gmail.com"
] |
btanabe2@gmail.com
|
6573e74df3af50b8508e9955829ea7ffe81b522f
|
fda3d45669a82feb72e70b84c658e97db759b9a2
|
/app/src/main/java/com/penglong/android/libsocket/sdk/bean/ISendable.java
|
41dce10f9a512c7814e12813520fa66315545eaa
|
[] |
no_license
|
xiangruyimobuliaoq/qycode
|
22db500a276e1ec050035fd8d1bd60d0d5f96820
|
0b9767cfa42cdb6e7f8f8bf263ab89b1af0015d2
|
refs/heads/master
| 2020-03-30T00:27:09.043019
| 2018-10-08T02:44:53
| 2018-10-08T02:44:53
| 150,524,307
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 366
|
java
|
package com.penglong.android.libsocket.sdk.bean;
import java.io.Serializable;
/**
* 可发送类,继承该类,并实现parse方法即可获得发送能力
* Created by penglong on 2017/5/16.
*/
public interface ISendable extends Serializable {
/**
* 数据转化
*
* @return 将要发送的数据的字节数组
*/
byte[] parse();
}
|
[
"446971874@qq.com"
] |
446971874@qq.com
|
f40c753fe42232b5e06bab5d97706f25d859ea41
|
30f2dfccea2e8ba000379f3da2acbba2611db207
|
/sample/src/main/java/me/jeevuz/outlast/sample/ChildPresentationModel.java
|
375377e63ed7c3338a6008e6c93f17590f721ba7
|
[
"MIT"
] |
permissive
|
Jeevuz/Outlast
|
d8e63006c32439c3cb3171ca61dc1ffa6bf1eda4
|
fd98107289c0bc6e4712f329919559c399968ea2
|
refs/heads/master
| 2021-01-22T05:34:03.533830
| 2017-04-13T21:10:35
| 2017-04-13T21:10:35
| 81,678,243
| 7
| 2
| null | 2017-04-02T19:51:13
| 2017-02-11T19:54:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,865
|
java
|
package me.jeevuz.outlast.sample;
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.subjects.BehaviorSubject;
import timber.log.Timber;
import static me.jeevuz.outlast.sample.TheApplication.BAD_WORDS;
/**
* @author Vasili Chyrvon (vasili.chyrvon@gmail.com)
*/
public final class ChildPresentationModel implements PresentationModel {
private int intervalSpeedSeconds;
public ChildPresentationModel(int intervalSpeedSeconds) {
this.intervalSpeedSeconds = intervalSpeedSeconds;
}
private CompositeDisposable composite = new CompositeDisposable();
// View states
private BehaviorSubject<String> intervalText = BehaviorSubject.create();
public Observable<String> intervalText() {
return intervalText.hide();
}
@Override
public void onCreate() {
Timber.d("Created child %s" + hashCode());
// Interval text
composite.add(
Observable.interval(intervalSpeedSeconds, TimeUnit.SECONDS)
.doOnNext(s -> Timber.d("Interval value: %s", s))
.map(intervalValue -> {
int position = (int)(intervalValue % BAD_WORDS.size());
return BAD_WORDS.get(position);
})
.subscribe(
string -> {
intervalText.onNext((intervalText.getValue() == null) ? string
: intervalText.getValue() + " " + string);
},
Timber::e)
);
}
@Override
public void onDestroy() {
Timber.d("Destroyed child %s" + hashCode());
composite.clear();
}
}
|
[
"vasili@mobileup.ru"
] |
vasili@mobileup.ru
|
990bf3150012f48195b45594e721d0eed151a9f4
|
07925a627afa3f670f2c7c3c9813ca766cea362e
|
/app/src/main/java/cnaio/imooc/com/cniao5/model/Category.java
|
53f75cf119f1cf57e5ee0c643bdcd88d4767506e
|
[] |
no_license
|
cnrnews/Cniaoshop
|
5248ca9058b84bdb5c030467c4f5735dac7d79da
|
c9f2c59eac061a1eed5714c7d5584ce1c617d217
|
refs/heads/master
| 2021-08-24T01:27:00.874814
| 2017-12-07T12:57:15
| 2017-12-07T12:57:15
| 113,450,906
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 659
|
java
|
package cnaio.imooc.com.cniao5.model;
/**
* 分类
* @author:lihl on 2017/11/20 22:52
* @email:1601796593@qq.com
*/
public class Category {
/**
* id : 1
* name : 热门推荐
* sort : 1
*/
private int id;
private String name;
private int sort;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getSort() {
return sort;
}
public void setSort(int sort) {
this.sort = sort;
}
}
|
[
"18810356923@163.com"
] |
18810356923@163.com
|
a8d52a946b343b95545fdd2ad1dc56efe1a70a15
|
6a57764caa0c2652ee2334c3e9ce74536db248d7
|
/Fn/src/fn/ContextFnNode.java
|
ad586ee2e8c60b336941f9fc1476a01410eefa38
|
[] |
no_license
|
calvinashmore/painter
|
2da46d3b7f55b4bae849d645cafee74fea2ae50d
|
bb25d9cb02ecb347e13e96247e11fcbb14290116
|
refs/heads/master
| 2021-03-12T23:59:20.720280
| 2011-09-22T17:28:56
| 2011-09-22T17:28:56
| 26,514,507
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,555
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fn;
import fn.parser.ASTBlock;
import fn.parser.ASTFnDefinition;
import fn.parser.ASTFnDefinition.TypeAndName;
import fn.parser.Token;
import java.util.ArrayList;
import java.util.List;
import jd.ClassDescriptor;
import jd.CodeBlockDescriptor;
import jd.CodeStringDescriptor;
import jd.MethodDescriptor;
/**
*
* @author Calvin Ashmore
*/
abstract public class ContextFnNode extends FnNode {
public ContextFnNode(ASTFnDefinition fn) {
super(fn);
}
@Override
ClassDescriptor make_class() {
ClassDescriptor c = super.make_class();
if (hasContextVariables()) {
c.addMethod(make_getNumberContextVariables());
c.addMethod(make_getContextVariableIntendedName());
c.addMethod(make_getContextVariableType());
}
return c;
}
String convertContextVariables(ASTBlock execBlock) {
StringBuffer sb = new StringBuffer();
List<String> cvNames = new ArrayList();
//List<TypeAndName> cvs = new ArrayList<TypeAndName>();
for (TypeAndName cv : getFn().getTypeAndNames("cvar")) {
cvNames.add(cv.getName());
}
//cvs.add(cv)
Token currentToken;
if (execBlock.firstToken.next == execBlock.lastToken) {
return "";
}
// first to last exclusive, ignore "{" "}"
for (currentToken = execBlock.firstToken.next; currentToken.next != execBlock.lastToken; currentToken = currentToken.next) {
// see if the context variable is used.
if (cvNames.contains(currentToken.image)) {
if (currentToken.next.image.equals("=")) {
String cvName = currentToken.image;
StringBuffer assignment = new StringBuffer();
Token assignToken;
for (assignToken = currentToken.next.next; !assignToken.image.equals(";"); assignToken = assignToken.next) {
assignment.append(assignToken.image + " ");
}
currentToken = assignToken;
sb.append(cvName + " = " + assignment + "; ");
sb.append("context.setVariable(" + "__" + cvName + ", " + cvName + ");");
} else {
sb.append(currentToken.image);
}
} else {
sb.append(currentToken.image);
}
if (currentToken.image.equals(";") || currentToken.image.equals("{") || currentToken.image.equals("}")) {
sb.append("\n");
} else {
sb.append(" ");
}
}
sb.append(currentToken.image);
// Add the last token to the image to return.
return sb.toString();
}
boolean hasContextVariables() {
return getFn().getTypeAndNames("cvar").size() > 0;
}
CodeStringDescriptor make_contextVariableDeclarations() {
StringBuffer sb = new StringBuffer();
for (TypeAndName cv : getFn().getTypeAndNames("cvar")) {
sb.append("final String __" + cv.getName() + " = getContextVariableActualName(\"" + cv.getName() + "\");\n");
sb.append(cv.getType().dumpTokens() + " " + cv.getName() + ";\n");
}
return new CodeStringDescriptor(sb.toString());
}
public MethodDescriptor make_getContextVariableIntendedName() {
MethodDescriptor method = new MethodDescriptor("getContextVariableIntendedName");
method.addModifier("public");
method.addModifier("String");
method.addArgument("int", "i");
// switch on parameters
CodeBlockDescriptor block = new CodeBlockDescriptor();
block.setBlockHeader("switch(i) {");
int i = 0;
for (TypeAndName contextVariable : getFn().getTypeAndNames("cvar")) {
block.addToBlockBody(new CodeStringDescriptor("case " + i + ": return \"" + contextVariable.getName() + "\";\n"));
i++;
}
block.addToBlockBody(new CodeStringDescriptor("default: return null;\n"));
block.setBlockFooter("}");
method.addToBlockBody(block);
return method;
}
public MethodDescriptor make_getContextVariableType() {
MethodDescriptor method = new MethodDescriptor("getContextVariableType");
method.addModifier("public");
method.addModifier("Class");
method.addArgument("int", "i");
// switch on parameters
CodeBlockDescriptor block = new CodeBlockDescriptor();
block.setBlockHeader("switch(i) {");
int i = 0;
for (TypeAndName contextVariable : getFn().getTypeAndNames("cvar")) {
block.addToBlockBody(new CodeStringDescriptor("case " + i + ": return " + contextVariable.getType().dumpTokens() + ".class;\n"));
i++;
}
block.addToBlockBody(new CodeStringDescriptor("default: return null;\n"));
block.setBlockFooter("}");
method.addToBlockBody(block);
return method;
}
public MethodDescriptor make_getNumberContextVariables() {
MethodDescriptor method = new MethodDescriptor("getNumberContextVariables");
method.addModifier("public");
method.addModifier("int");
int numberContextVariables = getFn().getTypeAndNames("cvar").size();
method.addToBlockBody(new CodeStringDescriptor("return " + numberContextVariables + ";"));
return method;
}
}
|
[
"ashmore@a3f7fd50-973e-0410-8b28-ed0ccb69969c"
] |
ashmore@a3f7fd50-973e-0410-8b28-ed0ccb69969c
|
3d6dbd0318bb94a975a315c7ca9fd7157327cfe6
|
f4c64601684ea81564b5a31e9992bc035a054a82
|
/src/main/java/com/cse406/cw/TransactionController.java
|
fa5ab93e3308fa5eb4a6067e0b3b1ddcf3e9cf0f
|
[] |
no_license
|
davidberlian/coursework-cse406-2
|
379c0bf4ec7195d957018f8512c94aa4b8db5537
|
cf688d4e91e44f9723d3407a39061e74153ce519
|
refs/heads/master
| 2022-06-23T02:07:37.955370
| 2020-05-08T15:08:43
| 2020-05-08T15:08:43
| 258,809,804
| 0
| 0
| null | 2020-05-08T08:00:06
| 2020-04-25T15:30:37
|
Java
|
UTF-8
|
Java
| false
| false
| 4,820
|
java
|
package com.cse406.cw;
import java.text.NumberFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.cse406.cw.models.User;
import com.cse406.cw.models.dummyAccount;
import com.cse406.cw.models.Month;
import com.cse406.cw.models.Transaction;
@Controller
public class TransactionController {
@GetMapping("/transaction")
public String transaction(Model model, HttpServletRequest request, @RequestParam(defaultValue = "") String month) {
try {
User user = new User();
HttpSession newSession = request.getSession();
System.out.println("SESSION DATA" + newSession.getAttribute("token").toString());
user.setUsername(newSession.getAttribute("username").toString());
user.setToken(newSession.getAttribute("token").toString());
if(user.checkToken()) {
model.addAttribute("user", user);
NumberFormat format = NumberFormat.getCurrencyInstance(Locale.US);
String userBalance = format.format(user.getSavings());
model.addAttribute("userBalance", userBalance);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM");
LocalDateTime picked = null;
if(month.equals("")) {
picked = LocalDateTime.now();
}else {
picked = LocalDateTime.parse(month+"-01T00:00:01");
}
Double totalDebit = 0D;
Double totalCredit = 0D;
Double startingBalance = Transaction.loadTransactionBalance(user.getUsername(), picked.format(dtf));
Double currentBalance = startingBalance;
System.out.println("CURRENT BALANCE" + currentBalance);
ArrayList<String[]> list = null;
list = Transaction.loadTransaction(user.getUsername(), picked.format(dtf));
ArrayList<Transaction> listOfTransaction= new ArrayList<Transaction>();
format = NumberFormat.getCurrencyInstance(Locale.US);
ArrayList<Month> listOfMonth = new ArrayList<Month>();
LocalDateTime currentdate = LocalDateTime.now();
for(int i = 3; i > 0; i--) {
listOfMonth.add(new Month(currentdate));
currentdate = currentdate.minusMonths(1);
}
model.addAttribute("options",listOfMonth);
int maxDay = picked.getMonth().maxLength();
System.out.println("DAY OF MONTH + +"+maxDay);
dtf = DateTimeFormatter.ofPattern("dd MMMM yyyy");
LocalDateTime begin = LocalDateTime.of(picked.getYear(), picked.getMonth(), 1,0,0,0);
LocalDateTime end = LocalDateTime.of(picked.getYear(), picked.getMonth(), maxDay,0,0,0);
model.addAttribute("period", begin.format(dtf)+" to "+end.format(dtf));
for(int i = 0; i<list.size(); i++) {
System.out.println("Success+"+i);
listOfTransaction.add(new Transaction(list.get(i)[2],list.get(i)[0],list.get(i)[1]));
System.out.println("CURRENT BALANCE BEFORE" + currentBalance);
if(listOfTransaction.get(i).getCreditdebit().contentEquals("CREDIT")) {
totalCredit += listOfTransaction.get(i).getAmount();
}else {
totalDebit += listOfTransaction.get(i).getAmount();
}
currentBalance += listOfTransaction.get(i).getAmount();
listOfTransaction.get(i).setCurrentbalance(format.format(currentBalance));
System.out.println("CURRENT BALANCE" + currentBalance);
}
model.addAttribute("transactions",listOfTransaction);
model.addAttribute("startingBalance",format.format(startingBalance));
model.addAttribute("totalDebit",format.format(totalDebit));
model.addAttribute("totalCredit",format.format(totalCredit));
model.addAttribute("currentBalance",format.format(currentBalance));
return "transaction";
}else {
System.out.println("Failed");
model.addAttribute("message", "Please Login!");
model.addAttribute("user", new User());
newSession.invalidate();
return "redirect:/login";
}
}catch(Exception e) {
return "redirect:/login";
}
}
}
|
[
"david.berlian@outlook.com"
] |
david.berlian@outlook.com
|
60cab93a4dca66e6d977a85188cfa97b53b1b5de
|
493c101f337ff4b1060f1e1586f0336faace8f87
|
/src/com/mkyong/common/SendMailSSL.java
|
e0e638ec1e41d3aabe39e8c8aa0e446f9f22a9bf
|
[] |
no_license
|
ShoeTurtle/Trade-My-Book
|
6590f809ece27bac2b9e2b426c71b9c19d60c03e
|
7693835f156b5fb8260e5b3b459c3ae235f028ec
|
refs/heads/master
| 2021-03-12T23:54:17.996849
| 2013-01-15T06:14:48
| 2013-01-15T06:14:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,424
|
java
|
package com.mkyong.common;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class SendMailSSL {
public static void main(String[] args) {
Properties props = new Properties();
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "465");
Session session = Session.getDefaultInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("binay.b@gmail.com","contileap10");
}
});
try {
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("binay.b@gmail.com"));
message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("binay_budhathoki@hotmail.com"));
message.setSubject("Testing Subject");
message.setText("Dear Mail Crawler," +
"\n\n No spam to my email, please!");
Transport.send(message);
System.out.println("Done");
} catch (MessagingException e) {
throw new RuntimeException(e);
}
}
}
|
[
"binay_budhathoki@hotmail.com"
] |
binay_budhathoki@hotmail.com
|
692161356d310677a7236e53a3c613e4f68df688
|
85f24d3c5dcb258569128c7fac0ef749f91ac33b
|
/ad-management/src/main/java/com/healspace/ad/controller/AdvertisementController.java
|
70c85458b4c19e890024033ef62ba9e9461f6244
|
[
"Apache-2.0"
] |
permissive
|
mengyuhs/ad
|
37b8d5480fd80daf78c11fcff9ccae9a4f6255cb
|
831e2df49e2b40a823aeb12d3bfba85d975a5a60
|
refs/heads/master
| 2021-01-02T08:55:22.230019
| 2017-08-02T17:48:22
| 2017-08-02T17:48:22
| 99,098,834
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 154
|
java
|
package com.healspace.ad.controller;
/**
* AdvertisementController
*
* @author mengyu
* @since 2017/8/2
*/
public class AdvertisementController {
}
|
[
"yu.meng@17zuoye.com"
] |
yu.meng@17zuoye.com
|
e50ddf4c77b7128d688886bc85eb2e706a63dece
|
a37a129755fd193fa46d3c64ab269b6b9dde7982
|
/DesignPatterns/src/com/org/modal/FactoryPattern/Circle.java
|
b3b196414b02eee20f47b88c53e02bff01507b13
|
[] |
no_license
|
dishu2016/DesignPatterns
|
df82c10457798d8e9315b7eb508e0cb3a2b53203
|
bdc2d6bab03c2170fdf848d4544aeb90db5040fb
|
refs/heads/master
| 2020-04-22T10:34:22.465777
| 2016-09-07T10:02:52
| 2016-09-07T10:02:52
| 67,590,219
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 211
|
java
|
package com.org.modal.FactoryPattern;
public class Circle implements Shape {
@Override
public void draw() {
// TODO Auto-generated method stub
System.out.println("Inside Circle::draw() method.");
}
}
|
[
"1193218027@qq.com"
] |
1193218027@qq.com
|
31f45a15f9427932736e712ee52577f7f80b7416
|
8c4fc22c0899daa1bdb49f9468b657929c56b884
|
/src/main/java/resume/ExperianceModel.java
|
e7d3dabd0c449b0506cf42c1a8c80772b6dd0fd4
|
[] |
no_license
|
Betty2017/ResumeWeek6
|
35e04657283071f0dfe5b949094ef52b5ee73813
|
35f5abe9090bd86e30c29ae56f41ca3fa34d7eef
|
refs/heads/master
| 2020-12-03T00:39:14.309624
| 2017-07-10T17:12:01
| 2017-07-10T17:12:01
| 95,598,942
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,319
|
java
|
package resume;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class ExperianceModel {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private String company;
private String position;
private String startingYear;
private String endYear;
private String duty;
private String username;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getStartingYear() {
return startingYear;
}
public void setStartingYear(String startingYear) {
this.startingYear = startingYear;
}
public String getEndYear() {
return endYear;
}
public void setEndYear(String endYear) {
this.endYear = endYear;
}
public String getDuty() {
return duty;
}
public void setDuty(String duty) {
this.duty = duty;
}
}
|
[
"beti.negatu@gmail.com"
] |
beti.negatu@gmail.com
|
11aa72c205412fbd936877f51914bc4a369f560a
|
7ddcd3628958272be3a40b58bb062889d373a810
|
/src/exam_questions/files/Test6.java
|
2f50d2212c225d09edc74bd8f144088d22001c2a
|
[] |
no_license
|
minaeva/ocp
|
ca7961b57aa8a122669f5261a633cfe666fb7f9c
|
52ebb67a3bd265993e178b266aad4c9988acd730
|
refs/heads/main
| 2023-08-25T10:01:39.087351
| 2021-09-21T15:51:30
| 2021-09-21T15:51:30
| 337,324,757
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 683
|
java
|
package exam_questions.files;
class Resource1 implements AutoCloseable {
public void close() {
System.out.println("Resource1");
}
}
class Resource2 implements AutoCloseable {
public void close() {
System.out.println("Resource2");
}
}
public class Test6 {
public static void main(String[] args) {
try (Resource1 r1 = new Resource1(); Resource2 r2 = new Resource2()) {
System.out.println("Test");
}
//Test
//Resource2
//Resource1
//Classes used in try-with-resources statement must implement java.lang
// .AutoCloseable or its sub interfaces such as java.io.Closeable.
}
}
|
[
"sminaeva@uscold.com"
] |
sminaeva@uscold.com
|
455e6eb0ec93ed0d56b2a82c5996fd9658cbdf74
|
21c13de053a615f44b80545fe13e1024167d7779
|
/src/main/java/com/woowahan/firstweb/answer/ApiAnswerController.java
|
46d25c096afd1bcb972c16da66c3efc7bb0ef3a8
|
[] |
no_license
|
HannaJeon/firstweb
|
0378511b3aa892a7674355fa709128ee3da095b6
|
bdd12416c396ebdbc07a16acf6110921e402b57d
|
refs/heads/master
| 2021-05-05T07:03:43.139000
| 2018-01-30T08:05:27
| 2018-01-30T08:05:27
| 118,846,790
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,878
|
java
|
package com.woowahan.firstweb.answer;
import com.woowahan.firstweb.question.Question;
import com.woowahan.firstweb.question.QuestionRepository;
import com.woowahan.firstweb.user.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpSession;
@RestController
@RequestMapping("api/questions/{questionId}/answers")
public class ApiAnswerController {
private static final Logger log = LoggerFactory.getLogger(ApiAnswerController.class);
@Autowired
private AnswerRepository answerRepository;
@Autowired
private QuestionRepository questionRepository;
@PostMapping("")
public Answer create(@PathVariable long questionId, String contents, HttpSession session) {
log.debug("asdlkfjl;asfjldsak;jfl;sa");
User user = (User)session.getAttribute("sessionedUser");
Question question = questionRepository.findOne(questionId);
if (user == null)
return null;
Answer answer = new Answer(question, user, contents);
return answerRepository.save(answer);
}
@DeleteMapping("/{id}")
public Answer delete(@PathVariable long questionId, @PathVariable long id, HttpSession session) {
Answer answer = answerRepository.findOne(id);
User user = (User)session.getAttribute("sessionedUser");
if (user == null)
return null;
if (!answer.equals(user))
return null;
answer.setDeleted(true);
return answerRepository.save(answer);
}
// @GetMapping("")
// public Answer test(@PathVariable long questionId, HttpSession session) {
// User user = (User)session.getAttribute("sessionedUser");
// Question question = questionRepository.findOne(questionId);
// Answer answer = new Answer(question, user, "test");
// return answerRepository.save(answer);
// }
}
|
[
"jks7psj@gmail.com"
] |
jks7psj@gmail.com
|
39b500d2ab7bae334b24708f4345565e93b3a718
|
7e8c1a7db1b3cf31eae3e28ffb32eec3eaa906a7
|
/SDET Programs/src/homework/ds/arrays/P010Calories.java
|
0076ef6cf1e36ef7755ec516dea53a8a2c9380bf
|
[] |
no_license
|
AravindhanBoopathi/SDET
|
ecebe7066819e1d3879ec2d8a1e38e92149cadb7
|
d857bd4d818af3558b509b68edadabc85fdecd6a
|
refs/heads/master
| 2023-02-10T20:41:55.876573
| 2021-01-07T15:40:54
| 2021-01-07T15:40:54
| 296,859,371
| 0
| 2
| null | 2020-10-16T06:54:27
| 2020-09-19T12:01:52
|
Java
|
UTF-8
|
Java
| false
| false
| 3,223
|
java
|
package homework.ds.arrays;
import org.junit.Test;
public class P010Calories {
/*
A dieter consumes calories[i] calories on the i-th day.
Given an integer k, for every consecutive sequence of k days (calories[i], calories[i+1], ..., calories[i+k-1] for all 0 <= i <= n-k),
they look at T, the total calories consumed during that sequence of k days (calories[i] + calories[i+1] + ... + calories[i+k-1]):
If T < lower, they performed poorly on their diet and lose 1 point;
If T > upper, they performed well on their diet and gain 1 point;
Otherwise, they performed normally and there is no change in points.
Initially, the dieter has zero points. Return the total number of points the dieter has after dieting for calories.length days.
Note that the total points can be negative.
Example 1:
Input: calories = [1,2,3,4,5], k = 1, lower = 3, upper = 3
Output: 0
Explanation: Since k = 1, we consider each element of the array separately and compare it to lower and upper.
calories[0] and calories[1] are less than lower so 2 points are lost.
calories[3] and calories[4] are greater than upper so 2 points are gained.
Example 2:
Input: calories = [3,2], k = 2, lower = 0, upper = 1
Output: 1
Explanation: Since k = 2, we consider subarrays of length 2.
calories[0] + calories[1] > upper so 1 point is gained.
Example 3:
Input: calories = [6,5,0,0], k = 2, lower = 1, upper = 5
Output: 0
Explanation:
calories[0] + calories[1] > upper so 1 point is gained.
lower <= calories[1] + calories[2] <= upper so no change in points.
calories[2] + calories[3] < lower so 1 point is lost.
*
*
*/
private int solution(int[] calories, int k, int lower, int upper){
int index = 0;
int calory = 0;
int points = 0;
for(int i =0; i < calories.length; i++){
if(index < k){
calory = calory + calories[i];
index++;
}
if(index >= k){
index = 0;
if(calory < lower)points--;
if(calory > upper)points++;
calory = 0;
}
}
return points;
}
@Test
public void testData1(){
int calories[] = {1,2,3,4,5};
int k = 1, lower = 3, upper = 3;
System.out.println(solution(calories, k, lower, upper));
}
@Test
public void testData2(){
int calories[] = {3,2};
int k = 2, lower = 0, upper = 1;
System.out.println(solution(calories, k, lower, upper));
}
@Test
public void testData3(){
int calories[] = {6,5,0,0};
int k = 2, lower = 1, upper = 5;
System.out.println(solution(calories, k, lower, upper));
}
/*
class Solution {
public int minFlips(String target) {
int minFlips = 0;
if(target.indexOf('1') == -1){
return minFlips;
}
int occurence = 0;
char[] targetArray = target.toCharArray();
for(int i=0; i<target.length()-1; i++){
if(targetArray[i] == '0' && targetArray[i+1] == '1'){
occurence++;
}
}
if(targetArray[0] == '1'){
occurence++;
}
System.out.println(occurence);
minFlips = 2*(occurence-1)+1;
return minFlips;
}
}
*/
}
|
[
"aravindhanb@hotmail.com"
] |
aravindhanb@hotmail.com
|
845afc16ba62967811d592b4aac4f17627a1e80e
|
360506c57cf9b7f2eb2fb583bbe79088bd7494af
|
/系统后台/src/main/java/com/pers/food/object/vo/UserVO.java
|
e112ce7fec1396b54b2c43ceedc310e1aabd331d
|
[] |
no_license
|
Lovefirmament/wechat_order_food
|
5c74ba1d5b5cb508f5326f6f020e78b48a4446d3
|
30de28b7047dda3bd594684a13c3f25a0d6d8532
|
refs/heads/master
| 2022-04-24T00:08:52.867204
| 2020-04-17T12:06:09
| 2020-04-17T12:06:09
| 256,488,927
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package com.pers.food.object.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class UserVO implements Serializable {
private static final long serialVersionUID = 9098717301875076528L;
private String username;
private String token;
}
|
[
"623311582@qq.com"
] |
623311582@qq.com
|
058feb8b31c1cf79a484e360a654c9832d10681d
|
76fb987699fd42cbc266a72b2d274156a11eb00f
|
/app/src/main/java/com/baidu/traveleverywhere/utils/SpUtil.java
|
1242d9bdb99990cec7fc2df308977ab65aa1c415
|
[] |
no_license
|
Jesuslovedtheworld/Travel
|
edbc1cf946681edffdebc193dce221cf30a2a0df
|
1fb0972cfde0ca08624b69667f58a73d5ae3b282
|
refs/heads/master
| 2020-05-24T06:30:36.588330
| 2019-05-17T03:47:34
| 2019-05-17T03:47:34
| 187,139,157
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,105
|
java
|
package com.baidu.traveleverywhere.utils;
import android.content.Context;
import android.content.SharedPreferences;
import com.baidu.traveleverywhere.base.BaseApp;
/*
* * author gme
* time 2019年4月30日14:08:37
*/
//Sharepreference
public class SpUtil {
/**
* 保存在手机里面的文件名
*/
private static final String FILE_NAME = "share_date";
/**
* 保存数据的方法,我们需要拿到保存数据的具体类型,然后根据类型调用不同的保存方法
* @param key
* @param object
*/
public static void setParam( String key, Object object){
String type = object.getClass().getSimpleName();
SharedPreferences sp = BaseApp.getInstance().getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
if("String".equals(type)){
editor.putString(key, (String)object);
}
else if("Integer".equals(type)){
editor.putInt(key, (Integer)object);
}
else if("Boolean".equals(type)){
editor.putBoolean(key, (Boolean)object);
}
else if("Float".equals(type)){
editor.putFloat(key, (Float)object);
}
else if("Long".equals(type)){
editor.putLong(key, (Long)object);
}
editor.commit();
}
/**
* 得到保存数据的方法,我们根据默认值得到保存的数据的具体类型,然后调用相对于的方法获取值
* @param key
* @param defaultObject
* @return
*/
public static Object getParam(String key, Object defaultObject){
String type = defaultObject.getClass().getSimpleName();
SharedPreferences sp = BaseApp.getInstance().getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);
if("String".equals(type)){
return sp.getString(key, (String)defaultObject);
}
else if("Integer".equals(type)){
return sp.getInt(key, (Integer)defaultObject);
}
else if("Boolean".equals(type)){
return sp.getBoolean(key, (Boolean)defaultObject);
}
else if("Float".equals(type)){
return sp.getFloat(key, (Float)defaultObject);
}
else if("Long".equals(type)){
return sp.getLong(key, (Long)defaultObject);
}
return null;
}
}
|
[
"1367346501@qq.com"
] |
1367346501@qq.com
|
ce4b9b88899892d6260983673d5d8a827bb6b4a0
|
ee62fa86f658c22421cd58585c01f1974b78211c
|
/src/main/java/com/anzoo_anzoom/database/information_schema/tables/records/InnodbLocksRecord.java
|
e6eeca962ce1b7d46d6b58ba689be6d8250e47c5
|
[] |
no_license
|
ppurin888/anzoo-anzoom
|
d31a9cc133aba0d26002293701584b97bc9a80dd
|
8594265b00789ad4d3e2fa8e780804dc2cecbf42
|
refs/heads/master
| 2021-05-07T14:01:05.284523
| 2017-11-22T08:05:57
| 2017-11-22T08:05:57
| 109,797,678
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 11,552
|
java
|
/*
* This file is generated by jOOQ.
*/
package com.anzoo_anzoom.database.information_schema.tables.records;
import com.anzoo_anzoom.database.information_schema.tables.InnodbLocks;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Record10;
import org.jooq.Row10;
import org.jooq.impl.TableRecordImpl;
import org.jooq.types.ULong;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.10.0"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class InnodbLocksRecord extends TableRecordImpl<InnodbLocksRecord> implements Record10<String, String, String, String, String, String, ULong, ULong, ULong, String> {
private static final long serialVersionUID = -337105279;
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_id</code>.
*/
public void setLockId(String value) {
set(0, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_id</code>.
*/
public String getLockId() {
return (String) get(0);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_trx_id</code>.
*/
public void setLockTrxId(String value) {
set(1, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_trx_id</code>.
*/
public String getLockTrxId() {
return (String) get(1);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_mode</code>.
*/
public void setLockMode(String value) {
set(2, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_mode</code>.
*/
public String getLockMode() {
return (String) get(2);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_type</code>.
*/
public void setLockType(String value) {
set(3, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_type</code>.
*/
public String getLockType() {
return (String) get(3);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_table</code>.
*/
public void setLockTable(String value) {
set(4, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_table</code>.
*/
public String getLockTable() {
return (String) get(4);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_index</code>.
*/
public void setLockIndex(String value) {
set(5, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_index</code>.
*/
public String getLockIndex() {
return (String) get(5);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_space</code>.
*/
public void setLockSpace(ULong value) {
set(6, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_space</code>.
*/
public ULong getLockSpace() {
return (ULong) get(6);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_page</code>.
*/
public void setLockPage(ULong value) {
set(7, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_page</code>.
*/
public ULong getLockPage() {
return (ULong) get(7);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_rec</code>.
*/
public void setLockRec(ULong value) {
set(8, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_rec</code>.
*/
public ULong getLockRec() {
return (ULong) get(8);
}
/**
* Setter for <code>information_schema.INNODB_LOCKS.lock_data</code>.
*/
public void setLockData(String value) {
set(9, value);
}
/**
* Getter for <code>information_schema.INNODB_LOCKS.lock_data</code>.
*/
public String getLockData() {
return (String) get(9);
}
// -------------------------------------------------------------------------
// Record10 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public Row10<String, String, String, String, String, String, ULong, ULong, ULong, String> fieldsRow() {
return (Row10) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public Row10<String, String, String, String, String, String, ULong, ULong, ULong, String> valuesRow() {
return (Row10) super.valuesRow();
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field1() {
return InnodbLocks.INNODB_LOCKS.LOCK_ID;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field2() {
return InnodbLocks.INNODB_LOCKS.LOCK_TRX_ID;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field3() {
return InnodbLocks.INNODB_LOCKS.LOCK_MODE;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field4() {
return InnodbLocks.INNODB_LOCKS.LOCK_TYPE;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field5() {
return InnodbLocks.INNODB_LOCKS.LOCK_TABLE;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field6() {
return InnodbLocks.INNODB_LOCKS.LOCK_INDEX;
}
/**
* {@inheritDoc}
*/
@Override
public Field<ULong> field7() {
return InnodbLocks.INNODB_LOCKS.LOCK_SPACE;
}
/**
* {@inheritDoc}
*/
@Override
public Field<ULong> field8() {
return InnodbLocks.INNODB_LOCKS.LOCK_PAGE;
}
/**
* {@inheritDoc}
*/
@Override
public Field<ULong> field9() {
return InnodbLocks.INNODB_LOCKS.LOCK_REC;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field10() {
return InnodbLocks.INNODB_LOCKS.LOCK_DATA;
}
/**
* {@inheritDoc}
*/
@Override
public String component1() {
return getLockId();
}
/**
* {@inheritDoc}
*/
@Override
public String component2() {
return getLockTrxId();
}
/**
* {@inheritDoc}
*/
@Override
public String component3() {
return getLockMode();
}
/**
* {@inheritDoc}
*/
@Override
public String component4() {
return getLockType();
}
/**
* {@inheritDoc}
*/
@Override
public String component5() {
return getLockTable();
}
/**
* {@inheritDoc}
*/
@Override
public String component6() {
return getLockIndex();
}
/**
* {@inheritDoc}
*/
@Override
public ULong component7() {
return getLockSpace();
}
/**
* {@inheritDoc}
*/
@Override
public ULong component8() {
return getLockPage();
}
/**
* {@inheritDoc}
*/
@Override
public ULong component9() {
return getLockRec();
}
/**
* {@inheritDoc}
*/
@Override
public String component10() {
return getLockData();
}
/**
* {@inheritDoc}
*/
@Override
public String value1() {
return getLockId();
}
/**
* {@inheritDoc}
*/
@Override
public String value2() {
return getLockTrxId();
}
/**
* {@inheritDoc}
*/
@Override
public String value3() {
return getLockMode();
}
/**
* {@inheritDoc}
*/
@Override
public String value4() {
return getLockType();
}
/**
* {@inheritDoc}
*/
@Override
public String value5() {
return getLockTable();
}
/**
* {@inheritDoc}
*/
@Override
public String value6() {
return getLockIndex();
}
/**
* {@inheritDoc}
*/
@Override
public ULong value7() {
return getLockSpace();
}
/**
* {@inheritDoc}
*/
@Override
public ULong value8() {
return getLockPage();
}
/**
* {@inheritDoc}
*/
@Override
public ULong value9() {
return getLockRec();
}
/**
* {@inheritDoc}
*/
@Override
public String value10() {
return getLockData();
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value1(String value) {
setLockId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value2(String value) {
setLockTrxId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value3(String value) {
setLockMode(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value4(String value) {
setLockType(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value5(String value) {
setLockTable(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value6(String value) {
setLockIndex(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value7(ULong value) {
setLockSpace(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value8(ULong value) {
setLockPage(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value9(ULong value) {
setLockRec(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord value10(String value) {
setLockData(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public InnodbLocksRecord values(String value1, String value2, String value3, String value4, String value5, String value6, ULong value7, ULong value8, ULong value9, String value10) {
value1(value1);
value2(value2);
value3(value3);
value4(value4);
value5(value5);
value6(value6);
value7(value7);
value8(value8);
value9(value9);
value10(value10);
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached InnodbLocksRecord
*/
public InnodbLocksRecord() {
super(InnodbLocks.INNODB_LOCKS);
}
/**
* Create a detached, initialised InnodbLocksRecord
*/
public InnodbLocksRecord(String lockId, String lockTrxId, String lockMode, String lockType, String lockTable, String lockIndex, ULong lockSpace, ULong lockPage, ULong lockRec, String lockData) {
super(InnodbLocks.INNODB_LOCKS);
set(0, lockId);
set(1, lockTrxId);
set(2, lockMode);
set(3, lockType);
set(4, lockTable);
set(5, lockIndex);
set(6, lockSpace);
set(7, lockPage);
set(8, lockRec);
set(9, lockData);
}
}
|
[
"alska1039@allocation.co.kr"
] |
alska1039@allocation.co.kr
|
bb5b134b3e6a3853c58f5b47b8de8c8fa7fa56c3
|
b3c6dc41e5f05c8be7e158e7c841a3ac6df2a505
|
/spring-aop-async/src/main/java/com/zbwfisher/async/core/AsyncFutureCallback.java
|
25305c8bb43010f8ecb04b7e24327f9a8b553e44
|
[] |
no_license
|
zbwfisher1/spring-vue-docker
|
0b35320fd897fdbc623189566dad23cfaf647d41
|
1f4404bba6fd6a516226be000763a3702ee1d1ee
|
refs/heads/master
| 2020-06-17T18:19:22.877244
| 2018-12-13T12:28:14
| 2018-12-13T12:28:14
| 94,160,038
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 274
|
java
|
package com.zbwfisher.async.core;
/**
* <p>
*
*
*
* </p>
* @author woter
* @date 2016-8-1 下午4:12:08
* @version
*/
public interface AsyncFutureCallback<V>{
public void onSuccess(V result);
public void onFailure(Throwable t);
}
|
[
"zhang_bw@inspur.com"
] |
zhang_bw@inspur.com
|
229604095db6e5599efb9c110b89fdfa28400c3b
|
ef83fba33db607763110612c1cba54625ab19f1c
|
/lib/main/net/oz/string/StringUtils.java
|
ca47450b0165ca85e2a791c7aa59ad8b75e11fb6
|
[
"Apache-2.0"
] |
permissive
|
osmanys/cpjava2
|
6e12913a53e2be3b70a905febd01b8d5caa06c12
|
707c57ff9bca694ff159e95cd9af45675b1ac7e2
|
refs/heads/master
| 2020-05-14T13:18:31.072651
| 2019-06-30T20:07:16
| 2019-06-30T20:07:16
| 181,809,171
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,201
|
java
|
package net.oz.string;
import java.util.Arrays;
/**
* @author Egor Kulikov (kulikov@devexperts.com)
*/
public class StringUtils {
public static String reverse(String sample) {
StringBuilder result = new StringBuilder(sample);
result.reverse();
return result.toString();
}
public static int count(String string, char c) {
int count = 0;
for (int i = string.length() - 1; i >= 0; i--) {
if (string.charAt(i) == c) {
count++;
}
}
return count;
}
public static String unite(String[] array) {
StringBuilder result = new StringBuilder();
for (String s : array) {
result.append(s);
}
return result.toString();
}
public static int differs(String first, String second) {
int result = 0;
for (int i = 0; i < first.length(); i++) {
if (first.charAt(i) != second.charAt(i)) {
result++;
}
}
return result;
}
public static int[] zAlgorithm(CharSequence s) {
int length = s.length();
int[] z = new int[length];
int left = 0, right = 0;
for (int i = 1; i < length; i++) {
if (i > right) {
int j;
//noinspection StatementWithEmptyBody
for (j = 0; i + j < length && s.charAt(i + j) == s.charAt(j); j++) {
;
}
z[i] = j;
left = i;
right = i + j - 1;
} else if (z[i - left] < right - i + 1) {
z[i] = z[i - left];
} else {
int j;
//noinspection StatementWithEmptyBody
for (j = 1; right + j < length && s.charAt(right + j) == s.charAt(right - i + j); j++) {
;
}
z[i] = right - i + j;
left = i;
right = right + j - 1;
}
}
return z;
}
public static int[] prefixFunction(CharSequence s) {
int l = s.length();
int[] p = new int[l];
int k = 0;
for (int i = 1; i < l; i++) {
while ((k > 0) && (s.charAt(k) != s.charAt(i))) {
k = p[k - 1];
}
if (s.charAt(k) == s.charAt(i)) {
k++;
}
p[i] = k;
}
return p;
}
public static int[][] buildPrefixAutomaton(CharSequence s) {
return buildPrefixAutomaton(s, 'a', 'z');
}
public static int[][] buildPrefixAutomaton(CharSequence s, char from, char to) {
int[] prefixFunction = prefixFunction(s);
int length = to - from + 1;
int[][] result = new int[s.length() + 1][length];
result[0][s.charAt(0) - from] = 1;
for (int i = 1; i <= s.length(); i++) {
System.arraycopy(result[prefixFunction[i - 1]], 0, result[i], 0, length);
if (i != s.length()) {
result[i][s.charAt(i) - from] = i + 1;
}
}
return result;
}
public static boolean contains(final String s, final String target) {
int[] z = zAlgorithm(new CharSequence() {
public int length() {
return s.length() + target.length();
}
public char charAt(int index) {
if (index < target.length()) {
return target.charAt(index);
}
return s.charAt(index - target.length());
}
public CharSequence subSequence(int start, int end) {
throw new UnsupportedOperationException();
}
});
for (int i = target.length(); i < z.length; i++) {
if (z[i] >= target.length()) {
return true;
}
}
return false;
}
public static int[] suffixArray(CharSequence s) {
int length = s.length();
int[] position = new int[length];
int[] count = new int[Math.max(256, length)];
int[] order = new int[length];
for (int i = 0; i < length; ++i) {
count[s.charAt(i)]++;
}
for (int i = 1; i < 256; ++i) {
count[i] += count[i - 1];
}
for (int i = 0; i < length; ++i) {
position[--count[s.charAt(i)]] = i;
}
order[position[0]] = 0;
int currentClass = 0;
for (int i = 1; i < length; ++i) {
if (s.charAt(position[i]) != s.charAt(position[i - 1])) {
currentClass++;
}
order[position[i]] = currentClass;
}
int[] nextPosition = new int[length];
int[] nextOrder = new int[length];
for (int h = 0; (1 << h) < length; h++) {
for (int i = 0; i < length; ++i) {
nextPosition[i] = position[i] - (1 << h);
if (nextPosition[i] < 0) {
nextPosition[i] += length;
}
}
Arrays.fill(count, 0);
for (int i = 0; i < length; ++i) {
count[order[nextPosition[i]]]++;
}
for (int i = 1; i <= currentClass; ++i) {
count[i] += count[i - 1];
}
for (int i = length - 1; i >= 0; --i) {
position[--count[order[nextPosition[i]]]] = nextPosition[i];
}
nextOrder[position[0]] = 0;
currentClass = 0;
for (int i = 1; i < length; ++i) {
int mid1 = (position[i] + (1 << h));
if (mid1 >= length) {
mid1 -= length;
}
int mid2 = (position[i - 1] + (1 << h));
if (mid2 >= length) {
mid2 -= length;
}
if (order[position[i]] != order[position[i - 1]] || order[mid1] != order[mid2]) {
currentClass++;
}
nextOrder[position[i]] = currentClass;
}
System.arraycopy(nextOrder, 0, order, 0, length);
}
return order;
}
}
|
[
"osmanys@gmail.com"
] |
osmanys@gmail.com
|
4977a09e2ba8c88daeb283201e201bf24b24264e
|
9630c7c54e36bf6f1e5f6921f0890f9725f972b9
|
/src/main/java/com/jxf/task/tasks/trans/ImportUpdateMemberMsgTask4.java
|
4b8373b65fdb225c80d78b067abd17e7fdf858f2
|
[] |
no_license
|
happyjianguo/wyjt
|
df1539f6227ff38b7b7990fb0c56d20105d9c0b1
|
a5de0f17db2e5e7baf25ea72159e100c656920ea
|
refs/heads/master
| 2022-11-18T01:16:29.783973
| 2020-07-14T10:32:42
| 2020-07-14T10:32:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 562
|
java
|
package com.jxf.task.tasks.trans;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.jxf.transplantation.temp.message.ImportUpdateMessageUtils4;
/**
* 导入好友数据
*
* @author wo
*/
@DisallowConcurrentExecution
public class ImportUpdateMemberMsgTask4 implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
ImportUpdateMessageUtils4.importMessage();
}
}
|
[
"gbojob@126.com"
] |
gbojob@126.com
|
36603e44d3469ef28fbf188d07e4527e9342d64a
|
6c38e256d798c666ab20c5215296d3f8cefb4cfb
|
/zap_syn/src/main/java/com/goldmsg/gmvcs/syn/core/base/BaseController.java
|
52e0aaa4ae3bd181ae7bb671928191822419c1dc
|
[] |
no_license
|
13169114313/tools
|
1294628e2060a4b489b706c787d01d49d41254fe
|
ede4b8580dec4613dab3baf99950c12d935893b2
|
refs/heads/master
| 2021-05-09T05:36:18.766746
| 2018-02-08T02:19:02
| 2018-02-08T02:19:02
| 119,315,739
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,456
|
java
|
package com.goldmsg.gmvcs.syn.core.base;
import com.alibaba.druid.support.json.JSONUtils;
import com.goldmsg.gmvcs.syn.core.exception.MyException;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.InitBinder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public abstract class BaseController<T> {
@InitBinder
protected void initBinder(WebDataBinder binder) {
binder.registerCustomEditor(Date.class, new CustomDateEditor(
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"), true));
binder.registerCustomEditor(Date.class, new CustomDateEditor(
new SimpleDateFormat("yyyy-MM-dd"), true));
}
@ExceptionHandler
public String authorizationException(HttpServletRequest request,HttpServletResponse res, Exception e1) {
if (isAjaxRequest(request)) {
try {
res.setContentType("application/json;charset=UTF-8");
PrintWriter writer = res.getWriter();
Map<String, Object> map = new HashMap<String, Object>();
map.put("success", false);
// 为安全起见,只有业务异常我们对前端可见,否则统一归为系统异常
if (e1 instanceof MyException) {
map.put("msg", e1.getMessage());
} else {
map.put("msg", "系统异常!");
}
writer.write(JSONUtils.toJSONString(map));
writer.flush();
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
return null;
} else {
String message="权限不足";
try {
message = URLEncoder.encode(message,"utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return "redirect:/error/403?message="+message;
}
}
public static boolean isAjaxRequest(HttpServletRequest request) {
String requestedWith = request.getHeader("x-requested-with");
if (requestedWith != null && requestedWith.equalsIgnoreCase("XMLHttpRequest")) {
return true;
} else {
return false;
}
}
}
|
[
"1332787671@qq.com"
] |
1332787671@qq.com
|
89b70399efdaf57175800d8e7c6939b771b78744
|
3a7fcec7fcf57989c813ddf0f56bf1afb0a048a9
|
/src/main/java/com/keyan/common/constant/CommonMap.java
|
34ff9b4e80ab5efe2e73a42a49aeadeb54932d09
|
[] |
no_license
|
zhangguoji/KeYanBookKeep
|
57ce96fa2e8a81eaa4cda571afc37d6c05d6d293
|
485917d8eb2379364f84ba82aaed64ac5479c5de
|
refs/heads/master
| 2022-12-22T21:07:24.729112
| 2020-09-23T08:39:30
| 2020-09-23T08:39:38
| 297,889,781
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,285
|
java
|
package com.keyan.common.constant;
import java.util.HashMap;
import java.util.Map;
/**
* 通用Map数据
*
* @author ruoyi
*/
public class CommonMap
{
/** 状态编码转换 */
public static Map<String, String> javaTypeMap = new HashMap<String, String>();
static
{
initJavaTypeMap();
}
/**
* 返回状态映射
*/
public static void initJavaTypeMap()
{
javaTypeMap.put("tinyint", "Integer");
javaTypeMap.put("smallint", "Integer");
javaTypeMap.put("mediumint", "Integer");
javaTypeMap.put("int", "Integer");
javaTypeMap.put("integer", "integer");
javaTypeMap.put("bigint", "Long");
javaTypeMap.put("float", "Float");
javaTypeMap.put("double", "Double");
javaTypeMap.put("decimal", "BigDecimal");
javaTypeMap.put("bit", "Boolean");
javaTypeMap.put("char", "String");
javaTypeMap.put("varchar", "String");
javaTypeMap.put("tinytext", "String");
javaTypeMap.put("text", "String");
javaTypeMap.put("mediumtext", "String");
javaTypeMap.put("longtext", "String");
javaTypeMap.put("date", "Date");
javaTypeMap.put("datetime", "Date");
javaTypeMap.put("timestamp", "Date");
}
}
|
[
"zguoji@servyou.com.cn"
] |
zguoji@servyou.com.cn
|
398707076586a30a1468f4e6b6e7974ecf3ac035
|
128da67f3c15563a41b6adec87f62bf501d98f84
|
/com/emt/proteus/duchampopt/__tcf_25139.java
|
45bd99f67f649dac83ea256ac892d4e7a784f969
|
[] |
no_license
|
Creeper20428/PRT-S
|
60ff3bea6455c705457bcfcc30823d22f08340a4
|
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
|
refs/heads/master
| 2020-03-26T03:59:25.725508
| 2018-08-12T16:05:47
| 2018-08-12T16:05:47
| 73,244,383
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,639
|
java
|
/* */ package com.emt.proteus.duchampopt;
/* */
/* */ import com.emt.proteus.runtime.api.Env;
/* */ import com.emt.proteus.runtime.api.Frame;
/* */ import com.emt.proteus.runtime.api.Function;
/* */ import com.emt.proteus.runtime.api.ImplementedFunction;
/* */ import com.emt.proteus.runtime.library.strings._ZNSsD1Ev;
/* */
/* */ public final class __tcf_25139 extends ImplementedFunction
/* */ {
/* */ public static final int FNID = 1600;
/* 12 */ public static final Function _instance = new __tcf_25139();
/* 13 */ public final Function resolve() { return _instance; }
/* */
/* 15 */ public __tcf_25139() { super("__tcf_25139", 1, false); }
/* */
/* */ public int execute(int paramInt)
/* */ {
/* 19 */ call(paramInt);
/* 20 */ return 0;
/* */ }
/* */
/* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4)
/* */ {
/* 25 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 26 */ paramInt4 += 2;
/* 27 */ paramInt3--;
/* 28 */ call(i);
/* 29 */ return paramInt4;
/* */ }
/* */
/* */
/* */
/* */
/* */ public static void call(int paramInt)
/* */ {
/* */ try
/* */ {
/* 39 */ _ZNSsD1Ev.call(463680);
/* 40 */ return;
/* */ }
/* */ finally {}
/* */ }
/* */ }
/* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/__tcf_25139.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"kimjoey79@gmail.com"
] |
kimjoey79@gmail.com
|
98d6b1b40546401b719390d0020105950eff26d5
|
fc0cfa4aeac24c4b8c9ca4b67ffb439dd5cfc112
|
/src/main/java/grader/TestExtractZippedFile.java
|
b32c3c5d1ba83feef196fe5e9c93e960a392cc22
|
[] |
no_license
|
camman3d/Grader
|
c8c07456ec1ad7be9fd5a4af01a58be8cf569f43
|
67fb994cdb1520de323c4d9e7180135a21046e86
|
refs/heads/master
| 2020-05-27T07:54:24.544505
| 2013-12-12T15:42:36
| 2013-12-12T15:42:36
| 13,368,673
| 1
| 1
| null | 2013-11-06T16:13:55
| 2013-10-06T20:18:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,502
|
java
|
package grader;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
public class TestExtractZippedFile {
public static final String ZIPPED_FOLDER = "D:/dewan_backup/Java/RecursionLimit.zip";
// public static final String ZIPPED_FOLDER = "D:/dewan_backup/Java/AmandaKaramFinalUpdated.zip";
public static final String ZIP_FILE = "RecursionLimit/src/main/Main.java";
public static BufferedReader toBufferedReader(String aZipfolder, String aZipFile) {
try {
ZipFile zipFile = new ZipFile(aZipfolder);
ZipEntry zipEntry = zipFile.getEntry(aZipFile);
InputStream inputStream = zipFile.getInputStream(zipEntry);
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(inputStream));
return bufferedReader;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static void readZipFile() {
try {
ZipFile zipFile = new ZipFile(ZIPPED_FOLDER);
ZipEntry zipEntry = zipFile.getEntry(ZIP_FILE);
InputStream inputStream = zipFile.getInputStream(zipEntry);
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(inputStream));
String inputLine;
while ((inputLine = bufferedReader.readLine()) != null)
System.out.println(inputLine);
bufferedReader.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main (String[] args) {
readZipFile();
}
}
|
[
"camman3d@gmail.com"
] |
camman3d@gmail.com
|
e84abf3e9cea041a562ecbe342cb4840f517567f
|
51dc63e7dc911d9bd6216c5c27a9ab50b8ff8925
|
/SplitMoney!!/src/main/java/com/example/yoshita/navigation/Main6Activity.java
|
ddd55f73a8ab6a1bd436778b162d4baa63ba24b7
|
[] |
no_license
|
Wise-team3/Crackitpls
|
e7c37e3ec6a4fa5ac550d148094d8aafcce0c257
|
12eed0f296cc7eea8b9ca07817c6d2e7df5f3ce7
|
refs/heads/master
| 2021-05-01T09:52:21.133246
| 2018-02-11T06:56:20
| 2018-02-11T06:56:20
| 121,100,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 345
|
java
|
package com.example.yoshita.navigation;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class Main6Activity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main6);
}
}
|
[
"byoshita@gmail.com"
] |
byoshita@gmail.com
|
8b817d2ab164885d1ec602a6323887b1f993d90d
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-70b-1-25-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math/analysis/solvers/BisectionSolver_ESTest.java
|
a75bf1827d26a786399574ef1f85710c2b7ae905
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,157
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Apr 05 13:27:00 UTC 2020
*/
package org.apache.commons.math.analysis.solvers;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.analysis.solvers.BisectionSolver;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class BisectionSolver_ESTest extends BisectionSolver_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
BisectionSolver bisectionSolver0 = new BisectionSolver();
UnivariateRealFunction univariateRealFunction0 = mock(UnivariateRealFunction.class, new ViolatedAssumptionAnswer());
// Undeclared exception!
bisectionSolver0.solve(univariateRealFunction0, (-490.0), 1.0E-14, 2218.8437910497);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0120a195ee49cd027a8af03eaf8b39e5ff0affa2
|
2e48d53bf94b0ae9dfdf5ad51cee7d5651a022d3
|
/hib/LambdaExp/src/com/shrey/samples/java8/WithLambdaExp.java
|
b31daf8da598093d6c59dec9a3421785a1476787
|
[] |
no_license
|
Jehanat/mode1-2
|
826d2c7bcccf77ba50ad71f06065e35213da7508
|
bd914ece9839682b465cae8570b0a327b62bf6fe
|
refs/heads/master
| 2022-12-20T14:38:19.345886
| 2019-10-24T13:17:41
| 2019-10-24T13:17:41
| 216,971,322
| 0
| 0
| null | 2022-12-16T10:42:46
| 2019-10-23T04:58:25
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 240
|
java
|
package com.shrey.samples.java8;
public class WithLambdaExp {
public static void main(String[] args) {
MyFunctionalInterface myFunctionalInterface =() -> {System.out.println("Welcome Lambda");
};
myFunctionalInterface.sayMessage();
}
}
|
[
"jehanatjamil1412@gmail.com"
] |
jehanatjamil1412@gmail.com
|
eaacee027b80cb58005594b1747c7f703c617b3a
|
2577325d9ffd99ecbf569648d2315e08368c476f
|
/RushuWechatCP/src/main/java/com/rushucloud/wechat/cp/Application.java
|
63973565cd88c02540cb77f158837e2d31778205
|
[
"Unlicense"
] |
permissive
|
yangboz/north-american-adventure
|
b1f69b283241984bccfc3d9be1ccd3711b1d0356
|
544c89fac8c861216c40bef01badeade65409a23
|
refs/heads/master
| 2021-03-19T07:07:18.855860
| 2015-04-10T12:47:33
| 2015-04-10T12:47:33
| 23,430,933
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,196
|
java
|
package com.rushucloud.wechat.cp;
import java.util.List;
import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.cp.api.WxCpInMemoryConfigStorage;
import me.chanjar.weixin.cp.api.WxCpServiceImpl;
import me.chanjar.weixin.cp.bean.WxCpMessage;
import me.chanjar.weixin.cp.bean.WxCpUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.ComponentScan;
@ComponentScan
@EnableAutoConfiguration
public class Application {
private static Logger LOG = LoggerFactory.getLogger(Application.class);
public static void main(String[] args) throws WxErrorException {
SpringApplication.run(Application.class, args);
// Wechat-CP testing code here:
// @see:
// https://github.com/chanjarster/weixin-java-tools/wiki/CP_Quick-Start
WxCpInMemoryConfigStorage config = new WxCpInMemoryConfigStorage();
config.setCorpId("wxdb1834a05c43e4fa"); // 设置微信企业号的appid
config.setCorpSecret("Yzo8BH1brF7J-pe1wndApJTWrJe73DaAYTpBpk0-DuTPCSPWShK7WD0l4Nrhr-pu"); // 设置微信企业号的app
// corpSecret
config.setAgentId("2"); // 设置微信企业号应用ID
config.setToken("TzAPtuMryApadDWWmGHo"); // 设置微信企业号应用的token
config.setAesKey("eHOhWSIZIkkMjxB440hSTEkyMwH4Amkqwm7Prw8XSCt"); // 设置微信企业号应用的EncodingAESKey
WxCpServiceImpl wxCpService = new WxCpServiceImpl();
wxCpService.setWxCpConfigStorage(config);
LOG.info("wxDepartGet:"+wxCpService.departGet().toString());
List<WxCpUser> users = wxCpService.departGetUsers(1, true, 1);
for(int i=0;i<users.size();i++)
{
LOG.info("wxDepartGetUser["+i+":"+users.get(i).toJson().toString());
}
// String userId = "yangbozhou";
// WxCpMessage message = WxCpMessage.TEXT().agentId("2")
// .toParty("1")
// .toUser(userId)
// .content("Foo bar!").build();
// try {
// LOG.info("wxMessageSend:"+message.toJson().toString());
// wxCpService.messageSend(message);
// } catch (WxErrorException e) {
// LOG.error(e.toString());
// }
}
}
|
[
"YoungWelle@gmail.com"
] |
YoungWelle@gmail.com
|
e5a283688ca7009bc80c951cbf8880d13fd7097e
|
4c1b59312ecf261c30e933ea751e3f25d7ece627
|
/src/main/java/com/thinkgem/jeesite/modules/wlpt/service/trade/TradeTraceService.java
|
889f56cdc337d6830df3270e9a644b396b9806f3
|
[
"Apache-2.0"
] |
permissive
|
nowimwrok/zd_ztpor
|
e18d58545ac0f02c64cff81e38bfb0510352047d
|
1e53899726f0a5e89ce8dab647504be7b4e68a03
|
refs/heads/master
| 2021-04-05T23:43:06.065526
| 2018-03-09T06:17:07
| 2018-03-09T06:17:07
| 124,496,758
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 9,798
|
java
|
/**
*
*/
package com.thinkgem.jeesite.modules.wlpt.service.trade;
import java.util.List;
import com.thinkgem.jeesite.common.config.DataDic;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.service.SystemService;
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
import com.thinkgem.jeesite.modules.wlpt.dao.trade.OrderinfoDao;
import com.thinkgem.jeesite.modules.wlpt.entity.goods.Quoteinfo;
import com.thinkgem.jeesite.modules.wlpt.entity.trade.Orderinfo;
import com.thinkgem.jeesite.modules.wlpt.entity.trade.TradePayinfo;
import com.thinkgem.jeesite.modules.wlpt.service.goods.QuoteinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.common.utils.Tools;
import com.thinkgem.jeesite.modules.wlpt.entity.trade.TradeTrace;
import com.thinkgem.jeesite.modules.wlpt.dao.trade.TradeTraceDao;
/**
* 运单操作日志记录Service
*
* @author 饶江龙
* @version 2016-07-28
*/
@Service
@Transactional(readOnly = true)
public class TradeTraceService extends CrudService<TradeTraceDao, TradeTrace> {
@Autowired
private TradeTraceDao tradeTraceDao;
@Autowired
private OrderinfoDao orderinfoDao;
@Autowired
private QuoteinfoService quoteinfoService;
@Autowired
private SystemService systemService;
@Autowired
private TradePayinfoService payinfoService;
public TradeTrace get(String id) {
return super.get(id);
}
/**
* 保存操作记录信息
*
* @param type
* @param status
* @param orderinfo
*/
@Transactional(readOnly = false)
public void saveTrace(String type, String status, Orderinfo orderinfo) {
TradeTrace tradeTrace = new TradeTrace();
tradeTrace.preInsert();
String content = "";
///获取交易运单信息
Orderinfo traceorder = orderinfoDao.get(orderinfo.getId());
switch (type) {
case "0":
/////修改状态操作日志
saveOrderStatusTrace(traceorder, type, status);
break;
case "1":
////支付操作日志
saveOrderPayTrace(traceorder, type, status);
break;
case "2":
///运输轨迹日志
break;
case "3":
///争议日志
saveOrderUpdateTrace(traceorder,type,status);
break;
}
}
/***
* 保存运单状态操作记录
*
* @param traceorder 运单对象
* @param type 记录类型
* @param status 状态
*/
@Transactional(readOnly = false)
public void saveOrderStatusTrace(Orderinfo traceorder, String type, String status) {
TradeTrace tradeTrace = new TradeTrace();
tradeTrace.preInsert();
String content = "";
//获取报价信息
Quoteinfo quoteinfo = quoteinfoService.get(traceorder.getQuoteinfo().getId());
String carnumber = "";
if(quoteinfo.getCar()!=null && !Tools.IsNullOrWhiteSpace(quoteinfo.getCar().getCarnumber())){
carnumber = quoteinfo.getCar().getCarnumber();
}
User driver = new User();
if(quoteinfo.getDriver()!=null){
driver = systemService.getUser(quoteinfo.getDriver().getId());
}
User upuser = UserUtils.getUser();
///保存运单状态
if (DataDic.ORDER_TRACE_TYPE_STATUS.equals(type)) {
tradeTrace.setType(DataDic.ORDER_TRACE_TYPE_STATUS);
tradeTrace.setStatus(status);
///保存一个title
tradeTrace.setTitle(DataDic.ORDER_TRACE_TITLE1);
switch (status) {
case "0":
content = "供货方:" + upuser.getLoginName() + "同意报价成功,生成运单";
break;
case "1":
content = "运输方:" + upuser.getLoginName() + "同意运输";
break;
case "2":
content = upuser.getLoginName() + "取消运单";
break;
case "3":
content = "运输方:司机-" + driver.getLoginName() + "已提货";
break;
case "4":
content = "运输方:车辆-" + carnumber + "已卸货," + upuser.getLoginName() + "已回单";
break;
case "5":
content = "供货方:" + upuser.getLoginName() + "确认交易完成";
break;
case "6":
content = "争议:" + upuser.getLoginName() + "发起争议";
break;
case "7":
content = "争议:" + upuser.getLoginName() + "处理争议完毕";
}
tradeTrace.setContent(content);
tradeTrace.setOrderinfo(traceorder);
tradeTraceDao.insert(tradeTrace);
}
}
/***
* 保存运单状态操作记录
*
* @param traceorder 运单对象
* @param type 记录类型
* @param status 状态
*/
@Transactional(readOnly = false)
public void saveOrderPayTrace(Orderinfo traceorder, String type, String status) {
TradeTrace tradeTrace = new TradeTrace();
tradeTrace.preInsert();
String content = "";
//获取报价信息
Quoteinfo quoteinfo = quoteinfoService.get(traceorder.getQuoteinfo().getId());
///获取司机信息
TradePayinfo payinfo = payinfoService.get(traceorder.getPayinfo().getId());
User upuser = UserUtils.getUser();
///保存运单状态
if (DataDic.ORDER_TRACE_TYPE_PAY.equals(type)) {
//赋值状态
tradeTrace.setStatus(status);
///支付类型
tradeTrace.setType(DataDic.ORDER_TRACE_TYPE_PAY);
///保存一个title
tradeTrace.setTitle(DataDic.ORDER_TRACE_TITLE2);
switch (status) {
case DataDic.ORDER_PAY_PREFORZEN:
content = "供货方:" + upuser.getLoginName() + "预冻结线上支付运费<br>" +
"运单号:" + traceorder.getOrderno() + "线上支付金额:" + payinfo.getOnlineamount();
break;
case DataDic.ORDER_PAY_FORZEN:
content = "供货方:" + upuser.getLoginName() + "冻结线上支付" + payinfo.getOnlineamount();
break;
case DataDic.ORDER_PAY_PAYPREMONEY:
content = "供货方:" + upuser.getLoginName() + "支付预支付金额" + payinfo.getPreamount();
break;
case DataDic.ORDER_PAY_CANCELFORZEN:
content = "供货方:" + upuser.getLoginName() + "返还冻结金额" + payinfo.getOnlineamount();
break;
case DataDic.ORDER_PAY_BANANCE:
content = "运输方:" + upuser.getLoginName() + "收到余款" + payinfo.getActualamount();
//if (traceorder.getIsdispute())
break;
}
tradeTrace.setContent(content);
tradeTrace.setOrderinfo(traceorder);
tradeTraceDao.insert(tradeTrace);
}
}
/***
* 保存运单信息变更操作记录
*
* @param traceorder 运单对象
* @param type 记录类型
* @param status 状态
*/
@Transactional(readOnly = false)
public void saveOrderUpdateTrace(Orderinfo traceorder, String type, String status) {
TradeTrace tradeTrace = new TradeTrace();
tradeTrace.preInsert();
String content = "";
TradePayinfo payinfo = payinfoService.get(traceorder.getPayinfo().getId());
///保存运单状态
if (DataDic.ORDER_TRACE_TYPE_DISPUTE.equals(type)) {
tradeTrace.setType(DataDic.ORDER_TRACE_TYPE_DISPUTE);
tradeTrace.setStatus(status);
///保存一个title
tradeTrace.setTitle(DataDic.ORDER_TRACE_TITLE4);
switch (status) {
case "0":
content = "";
break;
case "1":
content = "";
break;
case "2":
content = "";
break;
case "3":
content = "";
break;
case "4":
content = "";
break;
case "5":
content = "";
break;
case "6":
content = "运单信息变更:争议金额变更为"+payinfo.getDisputeamount()+",实际支付金额变更为"+payinfo.getActualamount();
}
tradeTrace.setContent(content);
tradeTrace.setOrderinfo(traceorder);
tradeTraceDao.insert(tradeTrace);
}
}
public List<TradeTrace> findList(TradeTrace tradeTrace) {
return super.findList(tradeTrace);
}
public Page<TradeTrace> findPage(Page<TradeTrace> page, TradeTrace tradeTrace) {
return super.findPage(page, tradeTrace);
}
@Transactional(readOnly = false)
public void save(TradeTrace tradeTrace) {
super.save(tradeTrace);
}
@Transactional(readOnly = false)
public void delete(TradeTrace tradeTrace) {
super.delete(tradeTrace);
}
}
|
[
"nowimwork@foxmail.com"
] |
nowimwork@foxmail.com
|
b920ebf6c088e4a6b3a330a07f6f3dc5d7e77277
|
84e064c973c0cc0d23ce7d491d5b047314fa53e5
|
/latest9.3/hej/net/sf/saxon/tree/linked/ElementImpl.java
|
3ce38643d6336ba32f6588bbeecb323fb5095f19
|
[] |
no_license
|
orbeon/saxon-he
|
83fedc08151405b5226839115df609375a183446
|
250c5839e31eec97c90c5c942ee2753117d5aa02
|
refs/heads/master
| 2022-12-30T03:30:31.383330
| 2020-10-16T15:21:05
| 2020-10-16T15:21:05
| 304,712,257
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 32,135
|
java
|
package net.sf.saxon.tree.linked;
import net.sf.saxon.event.CopyInformee;
import net.sf.saxon.event.Receiver;
import net.sf.saxon.event.ReceiverOptions;
import net.sf.saxon.om.*;
import net.sf.saxon.tree.iter.AxisIterator;
import net.sf.saxon.tree.iter.NamespaceIterator;
import net.sf.saxon.pattern.NodeKindTest;
import net.sf.saxon.expr.sort.IntArraySet;
import net.sf.saxon.expr.sort.IntHashSet;
import net.sf.saxon.expr.sort.IntIterator;
import net.sf.saxon.expr.sort.IntSet;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.type.Type;
import net.sf.saxon.value.Whitespace;
import net.sf.saxon.lib.NamespaceConstant;
import net.sf.saxon.tree.util.Navigator;
import net.sf.saxon.tree.util.AttributeCollectionImpl;
import net.sf.saxon.tree.util.NamespaceCodeIterator;
import net.sf.saxon.tree.util.FastStringBuffer;
import java.util.Iterator;
/**
* ElementImpl implements an element with no attributes or namespace declarations.<P>
* This class is an implementation of NodeInfo. For elements with attributes or
* namespace declarations, class ElementWithAttributes is used.
* @author Michael H. Kay
*/
public class ElementImpl extends ParentNodeImpl implements NamespaceResolver {
private int nameCode;
private int typeCode;
private AttributeCollection attributeList; // this excludes namespace attributes
private int[] namespaceList = null; // list of namespace codes
/**
* Construct an empty ElementImpl
*/
public ElementImpl() {}
/**
* Set the name code. Used when creating a dummy element in the Stripper
* @param nameCode the integer name code representing the element name
*/
public void setNameCode(int nameCode) {
this.nameCode = nameCode;
}
/**
* Set the attribute list
* @param atts the list of attributes of this element (not including namespace attributes)
*/
public void setAttributeList(AttributeCollection atts) {
this.attributeList = atts;
}
/**
* Set the namespace list
* @param namespaces an integer array of namespace codes
*/
public void setNamespaceList(int[] namespaces) {
this.namespaceList = namespaces;
}
/**
* Initialise a new ElementImpl with an element name
* @param nameCode Integer representing the element name, with namespaces resolved
* @param typeCode Integer representing the schema type of the element node
* @param atts The attribute list: always null
* @param parent The parent node
* @param sequenceNumber Integer identifying this element within the document
*/
public void initialise(int nameCode, int typeCode, AttributeCollectionImpl atts, NodeInfo parent,
int sequenceNumber) {
setNameCode(nameCode);
this.typeCode = (typeCode == -1 ? StandardNames.XS_UNTYPED : typeCode);
setRawParent((ParentNodeImpl)parent);
setRawSequenceNumber(sequenceNumber);
attributeList = atts;
}
/**
* Set location information for this node
* @param systemId the base URI
* @param line the line number if known
* @param column the column number if known
*/
public void setLocation(String systemId, int line, int column) {
DocumentImpl root = getRawParent().getPhysicalRoot();
root.setLineAndColumn(getRawSequenceNumber(), line, column);
root.setSystemId(getRawSequenceNumber(), systemId);
}
/**
* Set the system ID of this node. This method is provided so that a NodeInfo
* implements the javax.xml.transform.Source interface, allowing a node to be
* used directly as the Source of a transformation
*/
public void setSystemId(String uri) {
getPhysicalRoot().setSystemId(getRawSequenceNumber(), uri);
}
/**
* Get the root node
*/
public NodeInfo getRoot() {
ParentNodeImpl up = getRawParent();
if (up == null || (up instanceof DocumentImpl && ((DocumentImpl)up).isImaginary())) {
return this;
} else {
return up.getRoot();
}
}
/**
* Get the root node, if it is a document node.
*
* @return the DocumentInfo representing the containing document. If this
* node is part of a tree that does not have a document node as its
* root, returns null.
* @since 8.4
*/
public DocumentInfo getDocumentRoot() {
NodeInfo root = getRoot();
if (root instanceof DocumentInfo) {
return (DocumentInfo)root;
} else {
return null;
}
}
/**
* Get the system ID of the entity containing this element node.
*/
public final String getSystemId() {
DocumentImpl root = getPhysicalRoot();
return (root == null ? null : root.getSystemId(getRawSequenceNumber()));
}
/**
* Get the base URI of this element node. This will be the same as the System ID unless
* xml:base has been used.
*/
public String getBaseURI() {
return Navigator.getBaseURI(this);
}
/**
* Get the attribute list. Note that if the attribute list is empty, it should not be modified, as it
* will be shared by other elements. Instead, set a new attribute list.
* @return the list of attributes of this element (not including namespace attributes)
*/
public AttributeCollection gsetAttributeCollection() {
return this.attributeList;
}
/**
* Determine whether the node has the is-nilled property
*
* @return true if the node has the is-nilled property
*/
public boolean isNilled() {
return (typeCode & NodeInfo.IS_NILLED) != 0;
}
/**
* Set the type annotation on a node. This must only be called when the caller has verified (by validation)
* that the node is a valid instance of the specified type. The call is ignored if the node is not an element
* or attribute node.
*
* @param typeCode the type annotation (possibly including high bits set to indicate the isID, isIDREF, and
* isNilled properties)
*/
public void setTypeAnnotation(int typeCode) {
if (typeCode == -1) {
typeCode = StandardNames.XS_UNTYPED;
}
this.typeCode = typeCode;
}
/**
* Get the type annotation of this node, if any
* @return the type annotation, as the integer name code of the type name
*/
public int getTypeAnnotation() {
return typeCode & NamePool.FP_MASK;
}
/**
* Set the line number of the element within its source document entity
* @param line the line number
* @param column the column number
*/
public void setLineAndColumn(int line, int column) {
DocumentImpl root = getPhysicalRoot();
if (root != null) {
root.setLineAndColumn(getRawSequenceNumber(), line, column);
}
}
/**
* Get the line number of the node within its source document entity
*/
public int getLineNumber() {
DocumentImpl root = getPhysicalRoot();
if (root == null) {
return -1;
} else {
return root.getLineNumber(getRawSequenceNumber());
}
}
/**
* Get the line number of the node within its source document entity
*/
public int getColumnNumber() {
DocumentImpl root = getPhysicalRoot();
if (root == null) {
return -1;
} else {
return root.getColumnNumber(getRawSequenceNumber());
}
}
/**
* Get the nameCode of the node. This is used to locate the name in the NamePool
*/
public int getNameCode() {
return nameCode;
}
/**
* Get a character string that uniquely identifies this node
* @param buffer to contain the generated ID
*/
public void generateId(FastStringBuffer buffer) {
int sequence = getRawSequenceNumber();
if (sequence >= 0) {
getPhysicalRoot().generateId(buffer);
buffer.append("e");
buffer.append(Integer.toString(sequence));
} else {
getRawParent().generateId(buffer);
buffer.append("f");
buffer.append(Integer.toString(getSiblingPosition()));
}
}
/**
* Return the kind of node.
* @return Type.ELEMENT
*/
public final int getNodeKind() {
return Type.ELEMENT;
}
/**
* Copy this node to a given outputter (supporting xsl:copy-of)
* @param out The outputter
* @param copyOptions
*/
public void copy(Receiver out, int copyOptions, int locationId) throws XPathException {
int typeCode = (CopyOptions.includes(copyOptions, CopyOptions.TYPE_ANNOTATIONS) ?
getTypeAnnotation() : StandardNames.XS_UNTYPED);
CopyInformee informee = out.getPipelineConfiguration().getCopyInformee();
if (informee != null) {
locationId = informee.notifyElementNode(this);
}
out.startElement(getNameCode(), typeCode, locationId, 0);
// output the namespaces
int childCopyOptions = copyOptions & ~CopyOptions.ALL_NAMESPACES;
if ((copyOptions & CopyOptions.LOCAL_NAMESPACES) != 0) {
int[] localNamespaces = getDeclaredNamespaces(null);
for (int i=0; i<localNamespaces.length; i++) {
int ns = localNamespaces[i];
if (ns == -1) {
break;
}
out.namespace(ns, 0);
}
} else if ((copyOptions & CopyOptions.ALL_NAMESPACES) != 0) {
NamespaceCodeIterator.sendNamespaces(this, out);
childCopyOptions |= CopyOptions.LOCAL_NAMESPACES;
}
// output the attributes
if (attributeList != null) {
for (int i=0; i<attributeList.getLength(); i++) {
int nc = attributeList.getNameCode(i);
if (nc != -1) {
// if attribute hasn't been deleted
out.attribute(nc, StandardNames.XS_UNTYPED_ATOMIC, attributeList.getValue(i), 0, 0);
}
}
}
out.startContent();
// output the children
NodeImpl next = (NodeImpl)getFirstChild();
while (next!=null) {
next.copy(out, childCopyOptions, locationId);
next = (NodeImpl)next.getNextSibling();
}
out.endElement();
}
/**
* Delete this node (that is, detach it from its parent)
*/
public void delete() {
DocumentImpl root = getPhysicalRoot();
super.delete();
if (root != null) {
AxisIterator iter = iterateAxis(Axis.DESCENDANT_OR_SELF, NodeKindTest.ELEMENT);
while (true) {
ElementImpl n = (ElementImpl)iter.next();
int atts = attributeList.getLength();
for (int index=0; index<atts; index++) {
if (attributeList.isId(index)) {
root.deregisterID(attributeList.getValue(index));
}
}
if (n == null) {
break;
}
root.deIndex(n);
}
}
}
/**
* Rename this node
*
* @param newNameCode the NamePool code of the new name
*/
public void rename(int newNameCode) {
nameCode = newNameCode;
int nscode = getNamePool().getNamespaceCode(newNameCode);
int prefixCode = nscode>>16 & 0xffff;
int uriCode = nscode&0xffff;
short uc = getURICodeForPrefixCode(prefixCode);
if ((uc == -1 || uc == 0) && uriCode != 0) {
addNamespace(nscode, true);
} else if (uc != uriCode) {
throw new IllegalArgumentException(
"Namespace binding of new name conflicts with existing namespace binding");
}
}
/**
* Add a namespace binding (that is, a namespace node) to this element. This call has no effect if applied
* to a node other than an element.
* @param nscode The namespace code representing the (prefix, uri) pair of the namespace binding to be
* added. If the target element already has a namespace binding with this (prefix, uri) pair, the call has
* no effect. If the target element currently has a namespace binding with this prefix and a different URI, an
* exception is raised.
* @param inherit If true, the new namespace binding will be inherited by any children of the target element
* that do not already have a namespace binding for the specified prefix, recursively.
* If false, the new namespace binding will not be inherited.
* @throws IllegalArgumentException if the target element already has a namespace binding for this prefix,
* or if the namespace code represents a namespace undeclaration
*/
public void addNamespace(int nscode, boolean inherit) {
if ((nscode&0xffff) == 0) {
throw new IllegalArgumentException("Cannot add a namespace undeclaration");
}
addNamespaceInternal(nscode, true);
// The data model is such that namespaces are inherited by default. If inheritance is NOT requested,
// we must process the children to add namespace undeclarations
if (hasChildNodes() && !inherit) {
int undecl = nscode & 0xffff0000;
AxisIterator kids = enumerateChildren(NodeKindTest.ELEMENT);
while (true) {
ElementImpl child = (ElementImpl)kids.next();
if (child == null) {
break;
}
child.addNamespaceInternal(undecl, false);
}
}
}
private void addNamespaceInternal(int nscode, boolean externalCall) {
if (namespaceList == null) {
namespaceList = new int[]{nscode};
} else {
for (int i=0; i<namespaceList.length; i++) {
if (namespaceList[i] == nscode) {
return;
}
if ((namespaceList[i]&0xffff0000) == (nscode&0xffff0000)) {
if ((namespaceList[i]&0x0000ffff) == 0) {
// this is an undeclaration; replace it with the new declaration
namespaceList[i] = nscode;
return;
} else if (externalCall) {
throw new IllegalArgumentException("New namespace conflicts with existing namespace binding");
} else {
return;
}
}
}
int len = namespaceList.length;
int[] ns2 = new int[len + 1];
System.arraycopy(namespaceList, 0, ns2, 0, len);
ns2[len] = nscode;
namespaceList = ns2;
}
}
/**
* Replace the string-value of this node
*
* @param stringValue the new string value
*/
public void replaceStringValue(CharSequence stringValue) {
if (stringValue.length() == 0) {
setChildren(null);
} else {
TextImpl text = new TextImpl(stringValue.toString());
text.setRawParent(this);
setChildren(text);
}
}
/**
* Add an attribute to this element node.
*
* <p>If this node is not an element, or if the supplied node is not an attribute, the method
* takes no action. If the element already has an attribute with this name, the method
* throws an exception.</p>
*
* <p>This method does not perform any namespace fixup. It is the caller's responsibility
* to ensure that any namespace prefix used in the name of the attribute (or in its value
* if it has a namespace-sensitive type) is declared on this element.</p>
*
* @param nameCode the name of the new attribute
* @param typeCode the type annotation of the new attribute
* @param value the string value of the new attribute
* @param properties properties including IS_ID and IS_IDREF properties
* @throws IllegalStateException if the element already has an attribute with the given name.
*/
public void addAttribute(int nameCode, int typeCode, CharSequence value, int properties) {
if (attributeList == null || attributeList.getLength() == 0) {
attributeList = new AttributeCollectionImpl(getConfiguration());
}
AttributeCollectionImpl atts = (AttributeCollectionImpl)attributeList;
int index = atts.getIndexByFingerprint(nameCode & NamePool.FP_MASK);
if (index == -1) {
atts.addAttribute(nameCode, typeCode, value.toString(), 0, 0);
} else {
throw new IllegalStateException(
"Cannot add an attribute to an element as it already has an attribute with the specified name");
}
if ((nameCode>>20) != 0) {
// The new attribute name is in a namespace
int nscode = getNamePool().getNamespaceCode(nameCode);
int prefixCode = nscode>>16 & 0xffff;
short uc = getURICodeForPrefixCode(prefixCode);
if (uc == -1) {
// The namespace is not already declared on the element
addNamespace(nscode, true);
} else if (uc != (nscode&0xffff)) {
throw new IllegalStateException(
"Namespace binding of new name conflicts with existing namespace binding");
}
}
if ((properties & ReceiverOptions.IS_ID) != 0) {
DocumentImpl root = getPhysicalRoot();
if (root != null) {
root.registerID(this, Whitespace.trim(value));
}
}
}
/**
* Remove an attribute from this element node
*
* <p>If this node is not an element, or if the specified node is not an attribute
* of this element, this method takes no action.</p>
*
* <p>The attribute object itself becomes unusable; any attempt to use this attribute object,
* or any other object representing the same node, is likely to result in an exception.</p>
*
* @param attribute the attribute node to be removed
*/
public void removeAttribute(NodeInfo attribute) {
if (!(attribute instanceof AttributeImpl)) {
return; // no action
}
AttributeCollectionImpl atts = (AttributeCollectionImpl)getAttributeList();
int index = ((AttributeImpl)attribute).getSiblingPosition();
if (index >= 0 && atts.isId(index)) {
DocumentImpl root = getPhysicalRoot();
root.deregisterID(atts.getValue(index));
}
atts.removeAttribute(index);
((AttributeImpl)attribute).setRawParent(null);
}
/**
* Remove type information from this node (and its ancestors, recursively).
* This method implements the upd:removeType() primitive defined in the XQuery Update specification
*
*/
public void removeTypeAnnotation() {
int t = getTypeAnnotation();
if (t != StandardNames.XS_UNTYPED) {
typeCode = StandardNames.XS_ANY_TYPE;
getRawParent().removeTypeAnnotation();
}
}
/**
* Set the namespace declarations for the element
* @param namespaces the list of namespace codes
* @param namespacesUsed the number of entries in the list that are used
*/
public void setNamespaceDeclarations(int[] namespaces, int namespacesUsed) {
namespaceList = new int[namespacesUsed];
System.arraycopy(namespaces, 0, namespaceList, 0, namespacesUsed);
}
/**
* Get the namespace URI corresponding to a given prefix. Return null
* if the prefix is not in scope.
*
* @param prefix the namespace prefix. May be the zero-length string, indicating
* that there is no prefix. This indicates either the default namespace or the
* null namespace, depending on the value of useDefault.
* @param useDefault true if the default namespace is to be used when the
* prefix is "". If false, the method returns "" when the prefix is "".
* @return the uri for the namespace, or null if the prefix is not in scope.
* The "null namespace" is represented by the pseudo-URI "".
*/
public String getURIForPrefix(String prefix, boolean useDefault) {
if (prefix.equals("xml")) {
return NamespaceConstant.XML;
}
if (prefix.length() == 0 && !useDefault) {
return "";
}
NamePool pool = getNamePool();
int prefixCode = pool.getCodeForPrefix(prefix);
if (prefixCode==-1) {
return null;
}
short uriCode = getURICodeForPrefixCode(prefixCode);
if (uriCode == -1) {
return null;
}
return pool.getURIFromURICode(uriCode);
}
/**
* Get an iterator over all the prefixes declared in this namespace context. This will include
* the default namespace (prefix="") and the XML namespace where appropriate
*/
public Iterator iteratePrefixes() {
return new Iterator() {
private NamePool pool = null;
private IntIterator iter = NamespaceCodeIterator.iterateNamespaces(ElementImpl.this);
public boolean hasNext() {
return (pool == null || iter.hasNext());
}
public Object next() {
if (pool == null) {
pool = getNamePool();
return "xml";
} else {
return pool.getPrefixFromNamespaceCode(iter.next());
}
}
public void remove() {
throw new UnsupportedOperationException("remove");
}
};
}
/**
* Search the NamespaceList for a given prefix, returning the corresponding URI.
* @param prefix The prefix to be matched. To find the default namespace, supply ""
* @return The URI code corresponding to this namespace. If it is an unnamed default namespace,
* return Namespace.NULL_CODE.
* @throws net.sf.saxon.om.NamespaceException if the prefix has not been declared on this NamespaceList.
*/
public short getURICodeForPrefix(String prefix) throws NamespaceException {
if (prefix.equals("xml")) return NamespaceConstant.XML_CODE;
NamePool pool = getNamePool();
int prefixCode = pool.getCodeForPrefix(prefix);
if (prefixCode==-1) {
throw new NamespaceException(prefix);
}
short uc = getURICodeForPrefixCode(prefixCode);
if (uc == -1) {
throw new NamespaceException(getNamePool().getPrefixFromNamespaceCode(prefixCode<<16));
}
return uc;
}
/**
* Get the URI bound to a given prefix in the in-scope namespaces of this element
* @param prefixCode the prefix code as a 16-bit integer
* @return the uri code as a 16-bit integer, or -1 if there is no in-scope binding for this prefix
*/
protected short getURICodeForPrefixCode(int prefixCode) {
if (namespaceList!=null) {
for (int i=0; i<namespaceList.length; i++) {
if ((namespaceList[i]>>16) == prefixCode) {
short u = (short)(namespaceList[i] & 0xffff);
return (u==0 && prefixCode!=0 ? (short)-1 : u);
}
}
}
NodeInfo next = getRawParent();
if (next.getNodeKind()==Type.DOCUMENT) {
// prefixCode==0 represents the empty namespace prefix ""
if (prefixCode==0) {
return NamespaceConstant.NULL_CODE;
}
return -1;
} else {
return ((ElementImpl)next).getURICodeForPrefixCode(prefixCode);
}
}
/**
* Search the NamespaceList for a given URI, returning the corresponding prefix.
* @param uri The URI to be matched.
* @return The prefix corresponding to this URI. If not found, return null. If there is
* more than one prefix matching the URI, the first one found is returned. If the URI matches
* the default namespace, return an empty string.
*/
public String getPrefixForURI(String uri) {
if (uri.equals(NamespaceConstant.XML)) return "xml";
NamePool pool = getNamePool();
int uriCode = pool.getCodeForURI(uri);
if (uriCode<0) return null;
return getPrefixForURICode(uriCode);
}
private String getPrefixForURICode(int code) {
if (namespaceList!=null) {
for (int i=0; i<namespaceList.length; i++) {
if ((namespaceList[i] & 0xffff) == code) {
return getNamePool().getPrefixFromNamespaceCode(namespaceList[i]);
}
}
}
NodeInfo next = getRawParent();
if (next instanceof DocumentInfo) {
return null;
} else {
return ((ElementImpl)next).getPrefixForURICode(code);
}
}
/**
* Get all namespace undeclarations and undeclarations defined on this element.
*
* @param buffer If this is non-null, and the result array fits in this buffer, then the result
* may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.
* @return An array of integers representing the namespace declarations and undeclarations present on
* this element. For a node other than an element, return null. Otherwise, the returned array is a
* sequence of namespace codes, whose meaning may be interpreted by reference to the name pool. The
* top half word of each namespace code represents the prefix, the bottom half represents the URI.
* If the bottom half is zero, then this is a namespace undeclaration rather than a declaration.
* The XML namespace is never included in the list. If the supplied array is larger than required,
* then the first unused entry will be set to -1.
* <p/>
* <p>For a node other than an element, the method returns null.</p>
*/
public int[] getDeclaredNamespaces(int[] buffer) {
return (namespaceList == null ? IntArraySet.EMPTY_INT_ARRAY : namespaceList);
}
/**
* Get the list of in-scope namespaces for this element as an array of
* namespace codes. (Used by LiteralResultElement)
* @return the list of namespaces
*/
public int[] getInScopeNamespaceCodes() {
return NamespaceIterator.getInScopeNamespaceCodes(this);
}
/**
* Ensure that a child element being inserted into a tree has the right namespace declarations.
* Redundant declarations should be removed. If the child is in the null namespace but the parent has a default
* namespace, xmlns="" should be added. If inherit is false, namespace undeclarations should be added for all
* namespaces that are declared on the parent but not on the child.
* @param inherit true if the child is to inherit the inscope namespaces of its new parent
*/
protected void fixupInsertedNamespaces(boolean inherit) {
if (getRawParent().getNodeKind() == Type.DOCUMENT) {
return;
}
IntSet childNamespaces = new IntHashSet();
if (namespaceList != null) {
for (int i=0; i<namespaceList.length; i++) {
childNamespaces.add(namespaceList[i]);
}
}
NamespaceResolver inscope = new InscopeNamespaceResolver(getRawParent());
NamePool pool = getNamePool();
// If the child is in the null namespace but the parent has a default namespace, xmlns="" should be added.
if (getURI().length()==0 && inscope.getURIForPrefix("", true).length()!=0) {
childNamespaces.add(0);
}
// Namespaces present on the parent but not on the child should be undeclared (if requested)
if (!inherit) {
Iterator it = inscope.iteratePrefixes();
while (it.hasNext()) {
String prefix = (String)it.next();
int prefixCode = pool.getCodeForPrefix(prefix)<<16;
boolean found = false;
if (namespaceList != null) {
for (int i=0; i<namespaceList.length; i++) {
if ((namespaceList[i] & 0xffff0000) == prefixCode) {
found = true;
break;
}
}
}
if (!found) {
childNamespaces.add(prefixCode);
}
}
}
// Redundant namespaces should be removed
if (namespaceList != null) {
for (int i=0; i<namespaceList.length; i++) {
int nscode = namespaceList[i];
String prefix = pool.getPrefixFromNamespaceCode(nscode);
String uri = pool.getURIFromNamespaceCode(nscode);
String parentUri = inscope.getURIForPrefix(prefix, true);
if (parentUri != null && parentUri.equals(uri)) {
// the namespace declaration is redundant
childNamespaces.remove(nscode);
}
}
}
int[] n2 = new int[childNamespaces.size()];
int j = 0;
IntIterator ii = childNamespaces.iterator();
while (ii.hasNext()) {
n2[j++] = ii.next();
}
namespaceList = n2;
}
/**
* Get the attribute list for this element.
* @return The attribute list. This will not include any
* namespace attributes. The attribute names will be in expanded form, with prefixes
* replaced by URIs
*/
public AttributeCollection getAttributeList() {
return (attributeList == null ? AttributeCollectionImpl.EMPTY_ATTRIBUTE_COLLECTION : attributeList);
}
/**
* Get the namespace list for this element.
* @return The raw namespace list, as an array of name codes
*/
public int[] getNamespaceList() {
return namespaceList;
}
/**
* Get the value of a given attribute of this node
* @param fingerprint The fingerprint of the attribute name
* @return the attribute value if it exists or null if not
*/
public String getAttributeValue(int fingerprint) {
return (attributeList == null ? null : attributeList.getValueByFingerprint(fingerprint));
}
/**
* Get the value of a given attribute of this node
* @param uri the namespace URI of the attribute name, or "" if the attribute is not in a namepsace
* @param localName the local part of the attribute name
* @return the attribute value if it exists or null if not
*/
public String getAttributeValue(String uri, String localName) {
return (attributeList == null ? null : attributeList.getValue(uri, localName));
}
/**
* Determine whether this node has the is-id property
* @return true if the node is an ID
*/
public boolean isId() {
int tc = getTypeAnnotation();
return tc < 1024 ? tc == StandardNames.XS_ID : getConfiguration().getTypeHierarchy().isIdCode(tc);
}
}
//
// The contents of this file are subject to the Mozilla Public License Version 1.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.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
// See the License for the specific language governing rights and limitations under the License.
//
// The Original Code is: all this file.
//
// The Initial Developer of the Original Code is Michael H. Kay.
//
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
//
// Contributor(s): none.
//
|
[
"mike@saxonica.com"
] |
mike@saxonica.com
|
270ed3d6a761d6383db15437c7951291559d079a
|
2bce0faeefb37450d32f97f13ff8ab9bbdaaf8cf
|
/app/src/main/java/com/zxt/zxt_phone/utils/GlideUtil.java
|
73f05d7ef6ff84fa7b6fcb205f267b05cc7d3641
|
[] |
no_license
|
hyz632067489/zxt_phone
|
6fe6556fb39808ed788610c6e8dc024a88513a13
|
f48fa9bc011e3dd168896ec19e5f7692345346fb
|
refs/heads/master
| 2021-01-22T19:04:46.340479
| 2017-05-27T06:44:10
| 2017-05-27T06:44:10
| 85,156,915
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 23,209
|
java
|
package com.zxt.zxt_phone.utils;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.RectF;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
/**
* Glide 工具类
* Google推荐的图片加载库,专注于流畅的滚动
* <p>
* Glide 比Picasso 加载快 但需要更大的内存来缓存
* <p>
* Glide 不光接受Context,还接受Activity 和 Fragment ,图片加载会和Activity/Fragment的生命周期保持一致 在onPause()暂停加载,onResume()恢复加载
* <p>
* 支持GIF格式图片加载
*/
public class GlideUtil {
private static GlideUtil instance;
public static GlideUtil getInstance() {
if (instance == null) {
synchronized (GlideUtil.class) {
if (instance == null) {
instance = new GlideUtil();
}
}
}
return instance;
}
// with(Context context). 使用Application上下文,Glide请求将不受Activity/Fragment生命周期控制。
// with(Activity activity).使用Activity作为上下文,Glide的请求会受到Activity生命周期控制。
// with(FragmentActivity activity).Glide的请求会受到FragmentActivity生命周期控制。
// with(android.app.Fragment fragment).Glide的请求会受到Fragment 生命周期控制。
// with(android.support.v4.app.Fragment fragment).Glide的请求会受到Fragment生命周期控制。
//-----------------------------
// Glide基本可以load任何可以拿到的媒体资源,如:
// load SD卡资源:load("file://"+ Environment.getExternalStorageDirectory().getPath()+"/test.jpg")
// load assets资源:load("file:///android_asset/f003.gif")
// load raw资源:load("android.resource://com.frank.glide/raw/raw_1")或load("android.resource://com.frank.glide/raw/"+R.raw.raw_1)
// load drawable资源:load("android.resource://com.frank.glide/drawable/news")或load("android.resource://com.frank.glide/drawable/"+R.drawable.news)
// load ContentProvider资源:load("content://media/external/images/media/139469")
// load http资源:load("http://img.my.csdn.net/uploads/201508/05/1438760757_3588.jpg")
// load https资源:load("https://img.alicdn.com/tps/TB1uyhoMpXXXXcLXVXXXXXXXXXX-476-538.jpg_240x5000q50.jpg_.webp")
// 当然,load不限于String类型,还可以:
// load(Uri uri),load(File file),load(Integer resourceId),load(URL url),load(byte[] model, final String id),load(byte[] model),load(T model)。
// 而且可以使用自己的ModelLoader进行资源加载:
// using(ModelLoader<A, T> modelLoader, Class<T> dataClass),using(final StreamModelLoader<T> modelLoader),using(StreamByteArrayLoader modelLoader),using(final FileDescriptorModelLoader<T> modelLoader)。
// 返回RequestBuilder实例
//--------------------------------------
// * thumbnail(float sizeMultiplier). 请求给定系数的缩略图。如果缩略图比全尺寸图先加载完,
// 就显示缩略图,否则就不显示。系数sizeMultiplier必须在(0,1)之间,可以递归调用该方法。
// * sizeMultiplier(float sizeMultiplier). 在加载资源之前给Target大小设置系数。
// * skipMemoryCache(boolean skip). 设置是否跳过内存缓存,但不保证一定不被缓存
// (比如请求已经在加载资源且没设置跳过内存缓存,这个资源就会被缓存在内存中)。
// * diskCacheStrategy(DiskCacheStrategy strategy).设置缓存策略。
// DiskCacheStrategy.SOURCE:缓存原始数据,
// DiskCacheStrategy.RESULT:缓存变换修改后的资源数据,
// DiskCacheStrategy.NONE:什么都不缓存,
// DiskCacheStrategy.ALL:缓存所有图片 默认
// 默认采用DiskCacheStrategy.RESULT策略,对于download only操作要使用DiskCacheStrategy.SOURCE。
// * priority(Priority priority). 指定加载的优先级,优先级越高越优先加载,但不保证所有图片都按序加载。
// 枚举Priority.IMMEDIATE,Priority.HIGH,Priority.NORMAL,Priority.LOW。默认为Priority.NORMAL。
// * crossFade(5000) //设置淡入淡出效果,默认300ms,可以传参
// * dontAnimate(). 移除所有的动画。
// * animate(int animationId). 在异步加载资源完成时会执行该动画。
// * animate(ViewPropertyAnimation.Animator animator). 在异步加载资源完成时会执行该动画。
// * placeholder(int resourceId). 设置资源加载过程中的占位Drawable。
// * placeholder(Drawable drawable). 设置资源加载过程中的占位Drawable。
// * fallback(int resourceId). 设置model为空时要显示的Drawable。如果没设置fallback,
// model为空时将显示error的Drawable,如果error的Drawable也没设置,就显示placeholder的Drawable。
// * fallback(Drawable drawable).设置model为空时显示的Drawable。
// * error(int resourceId).设置load失败时显示的Drawable。
// * error(Drawable drawable).设置load失败时显示的Drawable。
// * Glide支持两种图片缩放形式,CenterCrop 和 FitCenter
// CenterCrop:等比例缩放图片, 直到图片的狂高都大于等于ImageView的宽度,然后截取中间的显示。
// FitCenter:等比例缩放图片,宽或者是高等于ImageView的宽或者是高。
// * 当列表在滑动的时候,调用pauseRequests()取消请求,滑动停止时,调用resumeRequests()恢复请求
// * listener(RequestListener<? super ModelType, TranscodeType> requestListener).
// 监听资源加载的请求状态,可以使用两个回调:
// onResourceReady(R resource, T model, Target<R> target, boolean isFromMemoryCache, boolean isFirstResource)
// 和onException(Exception e, T model, Target<R> target, boolean isFirstResource),
// 但不要每次请求都使用新的监听器,要避免不必要的内存申请,可以使用单例进行统一的异常监听和处理。
// * clear() 清除掉所有的图片加载请求
// * override(int width, int height). 重新设置Target的宽高值(单位为pixel)。
// * into(Y target).设置资源将被加载到的Target。
// * into(ImageView view). 设置资源将被加载到的ImageView。取消该ImageView之前所有的加载并释放资源。
// * into(int width, int height). 后台线程加载时要加载资源的宽高值(单位为pixel)。
// * preload(int width, int height). 预加载resource到缓存中(单位为pixel)。
// * asBitmap(). 无论资源是不是gif动画,都作为Bitmap对待。如果是gif动画会停在第一帧。
// * asGif().把资源作为GifDrawable对待。如果资源不是gif动画将会失败,会回调.error()。
//-------------------------------------------------------------------------------
/**
* 加载bitmap,如果是GIF则显示第一帧
*/
public static String LOAD_BITMAP = "GLIDEUTILS_GLIDE_LOAD_BITMAP";
/**
* 加载gif动画
*/
public static String LOAD_GIF = "GLIDEUTILS_GLIDE_LOAD_GIF";
/**
* 使用Application上下文,Glide请求将不受Activity/Fragment生命周期控制
* 使用activity 会受到Activity生命周期控制
* 使用FragmentActivity 会受到FragmentActivity生命周期控制
*
* @param activity
* @param path
* @param imageView
* @param placeid 占位
* @param errorid 错误
* @param bitmapOrgif 加载普通图片 或者GIF图片 ,GIF图片设置bitmap显示第一帧
*/
public void LoadContextBitmap(Context context, String path, ImageView imageView, int placeid, int errorid, String bitmapOrgif) {
if (bitmapOrgif == null || bitmapOrgif.equals(LOAD_BITMAP)) {
Glide.with(context).load(path).placeholder(placeid).error(errorid).crossFade().into(imageView);
} else if (bitmapOrgif.equals(LOAD_GIF)) {
Glide.with(context).load(path).asGif().crossFade().into(imageView);
}
}
/**
* Glide请求图片,会受到Fragment 生命周期控制。
*
* @param fragment
* @param path
* @param imageView
* @param placeid
* @param errorid
* @param bitmapOrgif 加载普通图片 或者GIF图片 ,GIF图片设置bitmap显示第一帧
*/
public void LoadFragmentBitmap(android.app.Fragment fragment, String path, ImageView imageView, int placeid, int errorid, String bitmapOrgif) {
if (bitmapOrgif == null || bitmapOrgif.equals(LOAD_BITMAP)) {
Glide.with(fragment).load(path).placeholder(placeid).error(errorid).crossFade().into(imageView);
} else if (bitmapOrgif.equals(LOAD_GIF)) {
Glide.with(fragment).load(path).asGif().crossFade().into(imageView);
}
}
/**
* Glide请求图片,会受到support.v4.app.Fragment生命周期控制。
*
* @param fragment
* @param path
* @param imageView
* @param placeid
* @param errorid
* @param bitmapOrgif 加载普通图片 或者GIF图片 ,GIF图片设置bitmap显示第一帧
*/
public void LoadSupportv4FragmentBitmap(android.support.v4.app.Fragment fragment, String path, ImageView imageView, int placeid, int errorid, String bitmapOrgif) {
if (bitmapOrgif == null || bitmapOrgif.equals(LOAD_BITMAP)) {
Glide.with(fragment).load(path).placeholder(placeid).error(errorid).crossFade().into(imageView);
} else if (bitmapOrgif.equals(LOAD_GIF)) {
Glide.with(fragment).load(path).asGif().crossFade().into(imageView);
}
}
//---------------------圆形图片-------------------
/**
* 加载设置圆形图片
* 使用Application上下文,Glide请求将不受Activity/Fragment生命周期控制
* <BR/>使用activity 会受到Activity生命周期控制
* <BR/>使用FragmentActivity 会受到FragmentActivity生命周期控制
*
* @param context
* @param path
* @param imageView
*/
@SuppressWarnings("unchecked")
public void LoadContextCircleBitmap(Context context, String path, ImageView imageView) {
Glide.with(context).load(path).bitmapTransform(new GlideCircleTransform(context)).into(imageView);
}
/**
* Glide请求图片设置圆形,会受到android.app.Fragment生命周期控制
*
* @param fragment
* @param path
* @param imageView
*/
@SuppressWarnings("unchecked")
public void LoadfragmentCircleBitmap(android.app.Fragment fragment, String path, ImageView imageView) {
Glide.with(fragment).load(path).bitmapTransform(new GlideCircleTransform(fragment.getActivity())).into(imageView);
}
/**
* Glide请求图片设置圆形,会受到android.support.v4.app.Fragment生命周期控制
*
* @param fragment
* @param path
* @param imageView
*/
@SuppressWarnings("unchecked")
public void LoadSupportv4FragmentCircleBitmap(android.support.v4.app.Fragment fragment, String path, ImageView imageView) {
Glide.with(fragment).load(path).bitmapTransform(new GlideCircleTransform(fragment.getActivity())).into(imageView);
}
//-----------------------圆角图片----------------------
/**
* 加载设置圆角图片
* 使用Application上下文,Glide请求将不受Activity/Fragment生命周期控制
* <BR/>使用activity 会受到Activity生命周期控制
* <BR/>使用FragmentActivity 会受到FragmentActivity生命周期控制
*
* @param context
* @param path
* @param imageView
* @param roundradius 圆角大小(>0)
*/
@SuppressWarnings("unchecked")
public void LoadContextRoundBitmap(Context context, String path, ImageView imageView, int roundradius) {
if (roundradius < 0) {
Glide.with(context).load(path).bitmapTransform(new GlideRoundTransform(context)).into(imageView);
} else {
Glide.with(context).load(path).bitmapTransform(new GlideRoundTransform(context, roundradius)).into(imageView);
}
}
/**
* Glide请求图片设置圆角,会受到android.app.Fragment生命周期控制
*
* @param fragment
* @param path
* @param imageView
* @param roundradius
*/
@SuppressWarnings("unchecked")
public void LoadfragmentRoundBitmap(android.app.Fragment fragment, String path, ImageView imageView, int roundradius) {
if (roundradius < 0) {
Glide.with(fragment).load(path).bitmapTransform(new GlideRoundTransform(fragment.getActivity())).into(imageView);
} else {
Glide.with(fragment).load(path).bitmapTransform(new GlideRoundTransform(fragment.getActivity(), roundradius)).into(imageView);
}
}
/**
* Glide请求图片设置圆角,会受到android.support.v4.app.Fragment生命周期控制
*
* @param fragment
* @param path
* @param imageView
* @param roundradius
*/
@SuppressWarnings("unchecked")
public void LoadSupportv4FragmentRoundBitmap(android.support.v4.app.Fragment fragment, String path, ImageView imageView, int roundradius) {
if (roundradius < 0) {
Glide.with(fragment).load(path).bitmapTransform(new GlideRoundTransform(fragment.getActivity())).into(imageView);
} else {
Glide.with(fragment).load(path).bitmapTransform(new GlideRoundTransform(fragment.getActivity(), roundradius)).into(imageView);
}
}
//-------------------------------------------------
/**
* Glide 加载模糊图片
* 使用Application上下文,Glide请求将不受Activity/Fragment生命周期控制
* <BR/>使用activity 会受到Activity生命周期控制
* <BR/>使用FragmentActivity 会受到FragmentActivity生命周期控制
*
* @param context
* @param path
* @param imageView
*/
@SuppressWarnings("unchecked")
public void LoadContextBlurBitmap(Context context, String path, ImageView imageView) {
Glide.with(context).load(path).bitmapTransform(new BlurTransformation(context)).into(imageView);
}
/**
* Glide 加载模糊图片 会受到Fragment生命周期控制
*
* @param context
* @param path
* @param imageView
*/
@SuppressWarnings("unchecked")
public void LoadFragmentBlurBitmap(android.app.Fragment fragment, String path, ImageView imageView) {
Glide.with(fragment).load(path).bitmapTransform(new BlurTransformation(fragment.getActivity())).into(imageView);
}
/**
* Glide 加载模糊图片 会受到support.v4.app.Fragment生命周期控制
*
* @param context
* @param path
* @param imageView
*/
@SuppressWarnings("unchecked")
public void LoadSupportv4FragmentBlurBitmap(android.support.v4.app.Fragment fragment, String path, ImageView imageView) {
Glide.with(fragment).load(path).bitmapTransform(new BlurTransformation(fragment.getActivity())).into(imageView);
}
//---------------------------------------------------------
/**
* 旋转图片
* 使用Application上下文,Glide请求将不受Activity/Fragment生命周期控制
* <BR/>使用activity 会受到Activity生命周期控制
* <BR/>使用FragmentActivity 会受到FragmentActivity生命周期控制
*
* @param context
* @param path
* @param imageView
* @param rotateRotationAngle 旋转角度
*/
@SuppressWarnings("unchecked")
public void LoadContextRotateBitmap(Context context, String path, ImageView imageView, Float rotateRotationAngle) {
Glide.with(context).load(path).bitmapTransform(new RotateTransformation(context, rotateRotationAngle)).into(imageView);
}
/**
* Glide 加载旋转图片 会受到Fragment生命周期控制
*
* @param fragment
* @param path
* @param imageView
* @param rotateRotationAngle
*/
@SuppressWarnings("unchecked")
public void LoadFragmentRotateBitmap(android.app.Fragment fragment, String path, ImageView imageView, Float rotateRotationAngle) {
Glide.with(fragment).load(path).bitmapTransform(new RotateTransformation(fragment.getActivity(), rotateRotationAngle)).into(imageView);
}
/**
* Glide 加载旋转图片 会受到support.v4.app.Fragment生命周期控制
*
* @param fragment
* @param path
* @param imageView
* @param rotateRotationAngle
*/
@SuppressWarnings("unchecked")
public void LoadSupportv4FragmentRotateBitmap(android.support.v4.app.Fragment fragment, String path, ImageView imageView, Float rotateRotationAngle) {
Glide.with(fragment).load(path).bitmapTransform(new RotateTransformation(fragment.getActivity(), rotateRotationAngle)).into(imageView);
}
//----------------------旋转---------------------------
/**
* 旋转
*/
public class RotateTransformation extends BitmapTransformation {
private float rotateRotationAngle = 0f;
public RotateTransformation(Context context, float rotateRotationAngle) {
super(context);
this.rotateRotationAngle = rotateRotationAngle;
}
@Override
protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
Matrix matrix = new Matrix();
matrix.postRotate(rotateRotationAngle);
return Bitmap.createBitmap(toTransform, 0, 0, toTransform.getWidth(), toTransform.getHeight(), matrix, true);
}
@Override
public String getId() {
return "rotate" + rotateRotationAngle;
}
}
//--------------------------------------------------
/**
* 图片转圆形
*/
public class GlideCircleTransform extends BitmapTransformation {
public GlideCircleTransform(Context context) {
super(context);
}
@Override
protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
return circleCrop(pool, toTransform);
}
private Bitmap circleCrop(BitmapPool pool, Bitmap source) {
if (source == null) return null;
int size = Math.min(source.getWidth(), source.getHeight());
int x = (source.getWidth() - size) / 2;
int y = (source.getHeight() - size) / 2;
Bitmap squared = Bitmap.createBitmap(source, x, y, size, size);
Bitmap result = pool.get(size, size, Bitmap.Config.ARGB_4444);
if (result == null) {
result = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_4444);
}
Canvas canvas = new Canvas(result);
Paint paint = new Paint();
paint.setShader(new BitmapShader(squared, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP));
paint.setAntiAlias(true);
float r = size / 2f;
canvas.drawCircle(r, r, r, paint);
return result;
}
@Override
public String getId() {
return getClass().getName();
}
}
//-----------------------------图片模糊----------------------------------
/**
* 图片模糊
*/
public class BlurTransformation extends BitmapTransformation {
private RenderScript rs;
public BlurTransformation(Context context) {
super(context);
rs = RenderScript.create(context);
}
@Override
protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
Bitmap blurredBitmap = toTransform.copy(Bitmap.Config.ARGB_8888, true);
// Allocate memory for Renderscript to work with
Allocation input = Allocation.createFromBitmap(
rs,
blurredBitmap,
Allocation.MipmapControl.MIPMAP_FULL,
Allocation.USAGE_SHARED
);
Allocation output = Allocation.createTyped(rs, input.getType());
// Load up an instance of the specific script that we want to use.
ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
script.setInput(input);
// Set the blur radius
script.setRadius(10);
// Start the ScriptIntrinisicBlur
script.forEach(output);
// Copy the output to the blurred bitmap
output.copyTo(blurredBitmap);
toTransform.recycle();
return blurredBitmap;
}
@Override
public String getId() {
return "blur";
}
}
//-------------------图片转换圆角图片------------------------------
/**
* 图片转换圆角图片
*/
public class GlideRoundTransform extends BitmapTransformation {
private float radius = 0f;
public GlideRoundTransform(Context context) {
this(context, 4);
}
/**
* 自定义圆角大小
*
* @param context
* @param dp
*/
public GlideRoundTransform(Context context, int dp) {
super(context);
this.radius = Resources.getSystem().getDisplayMetrics().density * dp;
}
@Override
protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
return roundCrop(pool, toTransform);
}
private Bitmap roundCrop(BitmapPool pool, Bitmap source) {
if (source == null) return null;
Bitmap result = pool.get(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888);
if (result == null) {
result = Bitmap.createBitmap(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888);
}
Canvas canvas = new Canvas(result);
Paint paint = new Paint();
paint.setShader(new BitmapShader(source, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP));
paint.setAntiAlias(true);
RectF rectF = new RectF(0f, 0f, source.getWidth(), source.getHeight());
canvas.drawRoundRect(rectF, radius, radius, paint);
return result;
}
@Override
public String getId() {
return getClass().getName() + Math.round(radius);
}
}
}
|
[
"632067489@qq.com"
] |
632067489@qq.com
|
94b70d71e53d6e23f92e93e2fb2f197ca76e8035
|
27ffe1f66b556ce52adfa6e43c7b9e6f198d040b
|
/NUM239.java
|
a91cfbb99eb69a665b8c60c08543a03e0f6389df
|
[
"MIT"
] |
permissive
|
flick-23/Hackerrank-Solutions
|
6c2c7200d3269cd3afc79f62eea53319598deb4a
|
1b5cc6b41811da7488087bc568cf30973e84ecf7
|
refs/heads/master
| 2022-11-08T01:15:24.046871
| 2022-10-30T07:48:06
| 2022-10-30T07:48:06
| 218,800,382
| 2
| 1
|
MIT
| 2022-10-30T07:48:07
| 2019-10-31T15:39:02
|
Java
|
UTF-8
|
Java
| false
| false
| 420
|
java
|
import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;
class NUM239
{
public static void main(String[]args)
{
Scanner venki=new Scanner(System.in);
int T=venki.nextInt();
for(int t=0;t<T;t++)
{
int c=0;
int l=venki.nextInt();
int r=venki.nextInt();
for(int i=l;i<=r;i++)
{
if(i%10==2 || i%10==3 || i%10==9)
{
c++;
}
}
System.out.println(c);
}
}
}
|
[
"venkigd8@gmail.com"
] |
venkigd8@gmail.com
|
f4f122270fc10a31281fa1f3e861b221df3160c4
|
90df306ee552a6e9f1582d826ccd9964f167d462
|
/Tutorial 4/Question3.java
|
8b84925b4d56156103879d0f8eba042719e17b75
|
[] |
no_license
|
dilenDev/Mobile_Development_Team
|
6f3f6f30d1252344c2e9f116d8df7c69e94672b8
|
952b3ae8629b056598589a9554cacbe9ece5992c
|
refs/heads/master
| 2023-09-03T12:16:06.439952
| 2021-09-12T08:49:29
| 2021-09-12T08:49:29
| 398,852,002
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 502
|
java
|
public class Question3 {
public static void main(String[] args) {
int [] arr = {10, 20, 30, 40, 50};
reverse(arr, arr.length);
}
static void reverse(int a[], int n)
{
int[] b = new int[n];
int j = n;
for (int i = 0; i < n; i++) {
b[j - 1] = a[i];
j = j - 1;
}
System.out.println("Reversed array is: \n");
for (int k = 0; k < n; k++) {
System.out.println(b[k]);
}
}
}
|
[
"flightme89"
] |
flightme89
|
d594feb0a31a98a3301b0e877813fe52f4eada50
|
45a8506bbb5783d6cb6c5a0cb71a85c7a6e02cee
|
/src/main/java/com/shunan/committeewb/controller/converter/CustomDateConverter.java
|
6350cb64dd945260cf96f62208a0c29af98906e0
|
[] |
no_license
|
zhangyong9704/committeewb
|
1a70002ec8f072262741bf2f5c1a7a099bc08742
|
647ededd4cc92d87e41fca3ea762eee55c86115e
|
refs/heads/master
| 2021-05-17T15:37:11.773620
| 2018-03-30T01:35:13
| 2018-03-30T01:35:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 541
|
java
|
package com.shunan.committeewb.controller.converter;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* 自定义日期转换器
* @author 李琳茹
*
*/
public class CustomDateConverter implements org.springframework.core.convert.converter.Converter<String, Date>{
/**
* String转Date
*/
public Date convert(String source) {
try {
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(source);
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}
}
|
[
"13523558276@163.com"
] |
13523558276@163.com
|
1f89e7508917bdff64dade385174327b97d01e98
|
70ac32b5ff97e5103ed150478c20ee713eb30381
|
/src/main/java/com/example/demo/HomeController.java
|
6543e8b713b6b5aace112c28657e2bd686ba2f39
|
[] |
no_license
|
ambriel2016/Exercise-20_4
|
55cb5db6c32181974ca7ac6f3be9f9aee83c981d
|
a7c5e65aad8535ea25bab4e7f86b3bd1bf04ea20
|
refs/heads/master
| 2020-09-30T03:35:04.216852
| 2019-12-10T18:50:50
| 2019-12-10T18:50:50
| 227,192,674
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 751
|
java
|
package com.example.demo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import javax.naming.Binding;
import javax.validation.Valid;
@Controller
public class HomeController {
@GetMapping("/carform")
public String loadcarForm(Model model){
model.addAttribute("car", new Car());
return "carform";
}
@PostMapping("/carform")
public String processcarForm(@Valid Car car, BindingResult result){
if (result.hasErrors()){
return "carform";
}
return "carconfirm";
}
}
|
[
"crb3305@gmail.com"
] |
crb3305@gmail.com
|
766756685dfe43af3928d81711ee09dbdbf07fb9
|
fe38801548d39122743ba010b273a57a6498c55a
|
/rpcClient/src/main/java/Proxy/ProxyFactory.java
|
3fdc1edfa077e9fb3c137154ff31f990d9075b3e
|
[] |
no_license
|
zntzhang/rpcDemo
|
da8a8c91fc43e377ebe8c5bb5e825350ac563acd
|
ea911ec58dc7c9ddb13e2839fde3e6962ef03198
|
refs/heads/master
| 2022-12-07T07:37:38.691910
| 2020-04-07T01:53:05
| 2020-04-07T01:53:05
| 253,660,585
| 0
| 0
| null | 2022-11-16T12:15:56
| 2020-04-07T01:52:23
|
Java
|
UTF-8
|
Java
| false
| false
| 314
|
java
|
package Proxy;
import java.lang.reflect.Proxy;
public class ProxyFactory {
public static <T> T create(Class<T> interfaceClass) throws Exception {
return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(),new Class<?>[] {interfaceClass}, new RpcClientDynamicProxy<T>(interfaceClass));
}
}
|
[
"zhangtao@olymtech.com"
] |
zhangtao@olymtech.com
|
11a517ce74978f233fdd7d19c567970bb74b70bd
|
ebff50ab6612e289f04181d92d1ce94769873240
|
/java/com/google/gerrit/server/change/AbandonUtil.java
|
f505f6d1d2bc2db9748b70780ee629f26dd22453
|
[
"Apache-2.0"
] |
permissive
|
ycj211/gerrit_chinese
|
9a2b3bdb84a130293f92e776471145286aeabe43
|
6daa275bb3337f7e4c277740319826ba0829646f
|
refs/heads/master
| 2022-12-14T00:11:08.778824
| 2019-01-21T00:54:23
| 2019-01-21T00:54:23
| 166,319,815
| 0
| 1
|
Apache-2.0
| 2022-11-28T13:41:22
| 2019-01-18T00:56:53
|
Java
|
UTF-8
|
Java
| false
| false
| 4,892
|
java
|
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.server.change;
import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.flogger.FluentLogger;
import com.google.gerrit.index.query.QueryParseException;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.server.InternalUser;
import com.google.gerrit.server.config.ChangeCleanupConfig;
import com.google.gerrit.server.query.change.ChangeData;
import com.google.gerrit.server.query.change.ChangeQueryBuilder;
import com.google.gerrit.server.query.change.ChangeQueryProcessor;
import com.google.gerrit.server.update.BatchUpdate;
import com.google.gwtorm.server.OrmException;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;
@Singleton
public class AbandonUtil {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private final ChangeCleanupConfig cfg;
private final Provider<ChangeQueryProcessor> queryProvider;
private final ChangeQueryBuilder queryBuilder;
private final BatchAbandon batchAbandon;
private final InternalUser internalUser;
@Inject
AbandonUtil(
ChangeCleanupConfig cfg,
InternalUser.Factory internalUserFactory,
Provider<ChangeQueryProcessor> queryProvider,
ChangeQueryBuilder queryBuilder,
BatchAbandon batchAbandon) {
this.cfg = cfg;
this.queryProvider = queryProvider;
this.queryBuilder = queryBuilder;
this.batchAbandon = batchAbandon;
internalUser = internalUserFactory.create();
}
public void abandonInactiveOpenChanges(BatchUpdate.Factory updateFactory) {
if (cfg.getAbandonAfter() <= 0) {
return;
}
try {
String query =
"status:new age:" + TimeUnit.MILLISECONDS.toMinutes(cfg.getAbandonAfter()) + "m";
if (!cfg.getAbandonIfMergeable()) {
query += " -is:mergeable";
}
List<ChangeData> changesToAbandon =
queryProvider.get().enforceVisibility(false).query(queryBuilder.parse(query)).entities();
ImmutableListMultimap.Builder<Project.NameKey, ChangeData> builder =
ImmutableListMultimap.builder();
for (ChangeData cd : changesToAbandon) {
builder.put(cd.project(), cd);
}
int count = 0;
ListMultimap<Project.NameKey, ChangeData> abandons = builder.build();
String message = cfg.getAbandonMessage();
for (Project.NameKey project : abandons.keySet()) {
Collection<ChangeData> changes = getValidChanges(abandons.get(project), query);
try {
batchAbandon.batchAbandon(updateFactory, project, internalUser, changes, message);
count += changes.size();
} catch (Throwable e) {
StringBuilder msg = new StringBuilder("Failed to auto-abandon inactive change(s):");
for (ChangeData change : changes) {
msg.append(" ").append(change.getId().get());
}
msg.append(".");
logger.atSevere().withCause(e).log(msg.toString());
}
}
logger.atInfo().log("Auto-Abandoned %d of %d changes.", count, changesToAbandon.size());
} catch (QueryParseException | OrmException e) {
logger.atSevere().withCause(e).log(
"Failed to query inactive open changes for auto-abandoning.");
}
}
private Collection<ChangeData> getValidChanges(Collection<ChangeData> changes, String query)
throws OrmException, QueryParseException {
Collection<ChangeData> validChanges = new ArrayList<>();
for (ChangeData cd : changes) {
String newQuery = query + " change:" + cd.getId();
List<ChangeData> changesToAbandon =
queryProvider
.get()
.enforceVisibility(false)
.query(queryBuilder.parse(newQuery))
.entities();
if (!changesToAbandon.isEmpty()) {
validChanges.add(cd);
} else {
logger.atFine().log(
"Change data with id \"%s\" does not satisfy the query \"%s\""
+ " any more, hence skipping it in clean up",
cd.getId(), query);
}
}
return validChanges;
}
}
|
[
"ycj211@163.com"
] |
ycj211@163.com
|
18772c6401a326476c7c9b18fff520f08a2eff76
|
b7d4c627dd7a7a40eaaa8dcd85e9125b2f0d060c
|
/src/main/java/com/best/java/jvm/init/NonInitializationThree.java
|
89929c898bf32064353ef1929efb0eead9f7bde7
|
[] |
no_license
|
PrometheusComing/bestjava
|
d03a0a6ac04a03845dd4888416610db4ac3836a8
|
2f30460503bcba861de765bad26c42fe8f8999bc
|
refs/heads/master
| 2022-11-10T04:36:55.615334
| 2020-08-30T16:23:14
| 2020-08-30T16:23:14
| 229,012,255
| 2
| 1
| null | 2022-10-05T18:22:01
| 2019-12-19T08:45:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,733
|
java
|
package com.best.java.jvm.init;
/**
* @Author: xjxu3
* @Date: 2019/12/16 16:31
* @Description: 被动引用,不会触发类加载
* 类加载的初始化有且只有5种场景会发生,被称为类的主动引用
* 1.遇到new,getstatic,putstatic,invokestatic这4条字节码指令,如果类没有初始化,就会先触发其初始化
* 这4条指令常见于使用new实例化对象、读取或者设置一个类的静态字段(被final修饰且编译期把结果放入常量池的
* 静态字段除外)以及调用一个类的静态方法的时候
* 2.对类使用反射操作的时候
* 3.初始化一个类的时候,其父类没有初始化过,会触发父类的初始化
* 4.当虚拟机启动时,用户需要指定一个要执行的主类(包含main),虚拟机会先初始化这个主类
* 5.动态语言支持时,java.lang.invoke.MethodHandle实例最后的解析结果中有REF_getStatic,REF_putStatic
* REF_invokeStatic的方法句柄,且这个方法句柄的类没有初始化过
*
* 类的被动引用,3种场景举例
* 1.通过子类引用父类的静态字段,不会引发子类的初始化(见PassiveReference)
* 2.通过数组的定义引用类,不会触发初始化(见PassiveReference)
* 3.常量在编译期间会存入调用类的常量池中,本质上并没用直接引用到定义常量的类,因此不会触发定义常量的
* 类的初始化。其实编译后的字节码,NonInitializationThree都不持有Fieldref // com/best/java/jvm/init/
* ConstClass.HELLO_WORLD:Ljava/lang/String;(就是本例)
*/
public class NonInitializationThree {
public static void main(String[] args) {
System.out.println(ConstClass.HELLO_WORLD);
}
}
|
[
"1226553206@qq.com"
] |
1226553206@qq.com
|
1160c7e430b29c7445062b632696663b7a45fade
|
ac96270bdd9f667596e527fa7a6a74652ee2a013
|
/app/src/main/java/com/bw/android/cloudmusic/MusicPlayActivity/StackBlurManager.java
|
f07b0a36187d4591f9861100cd5f62c241e3714a
|
[] |
no_license
|
shuGuo813/CloudMusic2
|
5bf5aecb40865518d1c2d2831ddf0de1c8dfde48
|
aed89d9963383bb9a1cc6bc78e0fcaa1eea301d6
|
refs/heads/master
| 2020-05-05T09:25:45.768529
| 2019-04-07T01:14:28
| 2019-04-07T01:14:28
| 179,904,183
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 16,777
|
java
|
package com.bw.android.cloudmusic.MusicPlayActivity; /**
* StackBlur v1.0 for Android
*
* @Author: Enrique López Mañas <eenriquelopez@gmail.com>
* http://www.neo-tech.es
*
* Author of the original algorithm: Mario Klingemann <mario.quasimondo.com>
*
* This is a compromise between Gaussian Blur and Box blur
* It creates much better looking blurs than Box Blur, but is
* 7x faster than my Gaussian Blur implementation.
*
* I called it Stack Blur because this describes best how this
* filter works internally: it creates a kind of moving stack
* of colors whilst scanning through the image. Thereby it
* just has to add one new block of color to the right side
* of the stack and remove the leftmost color. The remaining
* colors on the topmost layer of the stack are either added on
* or reduced by one, depending on if they are on the right or
* on the left side of the stack.
*
* @copyright: Enrique López Mañas
* @license: Apache License 2.0
*/
import android.graphics.Bitmap;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class StackBlurManager {
static final int EXECUTOR_THREADS = Runtime.getRuntime().availableProcessors();
static final ExecutorService EXECUTOR = Executors.newFixedThreadPool(EXECUTOR_THREADS);
/**
* Original image
*/
private final Bitmap _image;
/**
* Method of blurring
*/
private final JavaBlurProcess _blurProcess;
/**
* Most recent result of blurring
*/
private Bitmap _result;
/**
* Constructor method (basic initialization and construction of the pixel array)
*
* @param image The image that will be analyed
*/
public StackBlurManager(Bitmap image) {
_image = image;
_blurProcess = new JavaBlurProcess();
}
/**
* Process the image on the given radius. Radius must be at least 1
*
* @param radius
*/
public Bitmap process(int radius) {
_result = _blurProcess.blur(_image, radius);
return _result;
}
/**
* Returns the blurred image as a bitmap
*
* @return blurred image
*/
public Bitmap returnBlurredImage() {
return _result;
}
/**
* Save the image into the file system
*
* @param path The path where to save the image
*/
public void saveIntoFile(String path) {
try {
FileOutputStream out = new FileOutputStream(path);
_result.compress(Bitmap.CompressFormat.PNG, 90, out);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Returns the original image as a bitmap
*
* @return the original bitmap image
*/
public Bitmap getImage() {
return this._image;
}
public static class JavaBlurProcess {
private static final short[] stackblur_mul = {
512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512,
454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512,
482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456,
437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512,
497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328,
320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456,
446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335,
329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512,
505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405,
399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328,
324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271,
268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456,
451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388,
385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335,
332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292,
289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259
};
private static final byte[] stackblur_shr = {
9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17,
17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24
};
private static void blurIteration(int[] src, int w, int h, int radius, int cores, int core, int step) {
int x, y, xp, yp, i;
int sp;
int stack_start;
int stack_i;
int src_i;
int dst_i;
long sum_r, sum_g, sum_b,
sum_in_r, sum_in_g, sum_in_b,
sum_out_r, sum_out_g, sum_out_b;
int wm = w - 1;
int hm = h - 1;
int div = (radius * 2) + 1;
int mul_sum = stackblur_mul[radius];
byte shr_sum = stackblur_shr[radius];
int[] stack = new int[div];
if (step == 1) {
int minY = core * h / cores;
int maxY = (core + 1) * h / cores;
for (y = minY; y < maxY; y++) {
sum_r = sum_g = sum_b =
sum_in_r = sum_in_g = sum_in_b =
sum_out_r = sum_out_g = sum_out_b = 0;
src_i = w * y; // start of line (0,y)
for (i = 0; i <= radius; i++) {
stack_i = i;
stack[stack_i] = src[src_i];
sum_r += ((src[src_i] >>> 16) & 0xff) * (i + 1);
sum_g += ((src[src_i] >>> 8) & 0xff) * (i + 1);
sum_b += (src[src_i] & 0xff) * (i + 1);
sum_out_r += ((src[src_i] >>> 16) & 0xff);
sum_out_g += ((src[src_i] >>> 8) & 0xff);
sum_out_b += (src[src_i] & 0xff);
}
for (i = 1; i <= radius; i++) {
if (i <= wm) src_i += 1;
stack_i = i + radius;
stack[stack_i] = src[src_i];
sum_r += ((src[src_i] >>> 16) & 0xff) * (radius + 1 - i);
sum_g += ((src[src_i] >>> 8) & 0xff) * (radius + 1 - i);
sum_b += (src[src_i] & 0xff) * (radius + 1 - i);
sum_in_r += ((src[src_i] >>> 16) & 0xff);
sum_in_g += ((src[src_i] >>> 8) & 0xff);
sum_in_b += (src[src_i] & 0xff);
}
sp = radius;
xp = radius;
if (xp > wm) xp = wm;
src_i = xp + y * w; // img.pix_ptr(xp, y);
dst_i = y * w; // img.pix_ptr(0, y);
for (x = 0; x < w; x++) {
src[dst_i] = (int)
((src[dst_i] & 0xff000000) |
((((sum_r * mul_sum) >>> shr_sum) & 0xff) << 16) |
((((sum_g * mul_sum) >>> shr_sum) & 0xff) << 8) |
((((sum_b * mul_sum) >>> shr_sum) & 0xff)));
dst_i += 1;
sum_r -= sum_out_r;
sum_g -= sum_out_g;
sum_b -= sum_out_b;
stack_start = sp + div - radius;
if (stack_start >= div) stack_start -= div;
stack_i = stack_start;
sum_out_r -= ((stack[stack_i] >>> 16) & 0xff);
sum_out_g -= ((stack[stack_i] >>> 8) & 0xff);
sum_out_b -= (stack[stack_i] & 0xff);
if (xp < wm) {
src_i += 1;
++xp;
}
stack[stack_i] = src[src_i];
sum_in_r += ((src[src_i] >>> 16) & 0xff);
sum_in_g += ((src[src_i] >>> 8) & 0xff);
sum_in_b += (src[src_i] & 0xff);
sum_r += sum_in_r;
sum_g += sum_in_g;
sum_b += sum_in_b;
++sp;
if (sp >= div) sp = 0;
stack_i = sp;
sum_out_r += ((stack[stack_i] >>> 16) & 0xff);
sum_out_g += ((stack[stack_i] >>> 8) & 0xff);
sum_out_b += (stack[stack_i] & 0xff);
sum_in_r -= ((stack[stack_i] >>> 16) & 0xff);
sum_in_g -= ((stack[stack_i] >>> 8) & 0xff);
sum_in_b -= (stack[stack_i] & 0xff);
}
}
}
// step 2
else if (step == 2) {
int minX = core * w / cores;
int maxX = (core + 1) * w / cores;
for (x = minX; x < maxX; x++) {
sum_r = sum_g = sum_b =
sum_in_r = sum_in_g = sum_in_b =
sum_out_r = sum_out_g = sum_out_b = 0;
src_i = x; // x,0
for (i = 0; i <= radius; i++) {
stack_i = i;
stack[stack_i] = src[src_i];
sum_r += ((src[src_i] >>> 16) & 0xff) * (i + 1);
sum_g += ((src[src_i] >>> 8) & 0xff) * (i + 1);
sum_b += (src[src_i] & 0xff) * (i + 1);
sum_out_r += ((src[src_i] >>> 16) & 0xff);
sum_out_g += ((src[src_i] >>> 8) & 0xff);
sum_out_b += (src[src_i] & 0xff);
}
for (i = 1; i <= radius; i++) {
if (i <= hm) src_i += w; // +stride
stack_i = i + radius;
stack[stack_i] = src[src_i];
sum_r += ((src[src_i] >>> 16) & 0xff) * (radius + 1 - i);
sum_g += ((src[src_i] >>> 8) & 0xff) * (radius + 1 - i);
sum_b += (src[src_i] & 0xff) * (radius + 1 - i);
sum_in_r += ((src[src_i] >>> 16) & 0xff);
sum_in_g += ((src[src_i] >>> 8) & 0xff);
sum_in_b += (src[src_i] & 0xff);
}
sp = radius;
yp = radius;
if (yp > hm) yp = hm;
src_i = x + yp * w; // img.pix_ptr(x, yp);
dst_i = x; // img.pix_ptr(x, 0);
for (y = 0; y < h; y++) {
src[dst_i] = (int)
((src[dst_i] & 0xff000000) |
((((sum_r * mul_sum) >>> shr_sum) & 0xff) << 16) |
((((sum_g * mul_sum) >>> shr_sum) & 0xff) << 8) |
((((sum_b * mul_sum) >>> shr_sum) & 0xff)));
dst_i += w;
sum_r -= sum_out_r;
sum_g -= sum_out_g;
sum_b -= sum_out_b;
stack_start = sp + div - radius;
if (stack_start >= div) stack_start -= div;
stack_i = stack_start;
sum_out_r -= ((stack[stack_i] >>> 16) & 0xff);
sum_out_g -= ((stack[stack_i] >>> 8) & 0xff);
sum_out_b -= (stack[stack_i] & 0xff);
if (yp < hm) {
src_i += w; // stride
++yp;
}
stack[stack_i] = src[src_i];
sum_in_r += ((src[src_i] >>> 16) & 0xff);
sum_in_g += ((src[src_i] >>> 8) & 0xff);
sum_in_b += (src[src_i] & 0xff);
sum_r += sum_in_r;
sum_g += sum_in_g;
sum_b += sum_in_b;
++sp;
if (sp >= div) sp = 0;
stack_i = sp;
sum_out_r += ((stack[stack_i] >>> 16) & 0xff);
sum_out_g += ((stack[stack_i] >>> 8) & 0xff);
sum_out_b += (stack[stack_i] & 0xff);
sum_in_r -= ((stack[stack_i] >>> 16) & 0xff);
sum_in_g -= ((stack[stack_i] >>> 8) & 0xff);
sum_in_b -= (stack[stack_i] & 0xff);
}
}
}
}
/**
* Process the given image, blurring by the supplied radius.
* If radius is 0, this will return original
*
* @param original the bitmap to be blurred
* @param radius the radius in pixels to blur the image
* @return the blurred version of the image.
*/
public Bitmap blur(Bitmap original, float radius) {
int w = original.getWidth();
int h = original.getHeight();
int[] currentPixels = new int[w * h];
original.getPixels(currentPixels, 0, w, 0, 0, w, h);
int cores = StackBlurManager.EXECUTOR_THREADS;
ArrayList<BlurTask> horizontal = new ArrayList<BlurTask>(cores);
ArrayList<BlurTask> vertical = new ArrayList<BlurTask>(cores);
for (int i = 0; i < cores; i++) {
horizontal.add(new BlurTask(currentPixels, w, h, (int) radius, cores, i, 1));
vertical.add(new BlurTask(currentPixels, w, h, (int) radius, cores, i, 2));
}
try {
StackBlurManager.EXECUTOR.invokeAll(horizontal);
} catch (InterruptedException e) {
return null;
}
try {
StackBlurManager.EXECUTOR.invokeAll(vertical);
} catch (InterruptedException e) {
return null;
}
return Bitmap.createBitmap(currentPixels, w, h, Bitmap.Config.ARGB_8888);
}
private static class BlurTask implements Callable<Void> {
private final int[] _src;
private final int _w;
private final int _h;
private final int _radius;
private final int _totalCores;
private final int _coreIndex;
private final int _round;
public BlurTask(int[] src, int w, int h, int radius, int totalCores, int coreIndex, int round) {
_src = src;
_w = w;
_h = h;
_radius = radius;
_totalCores = totalCores;
_coreIndex = coreIndex;
_round = round;
}
@Override
public Void call() throws Exception {
blurIteration(_src, _w, _h, _radius, _totalCores, _coreIndex, _round);
return null;
}
}
}
}
|
[
"yy252253892911.com"
] |
yy252253892911.com
|
e7e4b2ed494b31d673de60caa1b02673bea53314
|
a01b17f2ebdf76cbac0d38b2b4db2fc30c7a8079
|
/Lecture_4_Threads_Intro/src/main/java/prepare/lecture/Util.java
|
dc1780db4215b3555e86555236dd256fe4caa501
|
[] |
no_license
|
rusergei2010/GITLAB_v2
|
f11a4ec7f2279f3312b2bf3fc623c16164e563c0
|
063091e774a2ca95cbabfc9410506c741e7c24b5
|
refs/heads/master
| 2023-01-19T06:28:08.419272
| 2023-01-08T13:28:50
| 2023-01-08T13:28:50
| 156,403,552
| 1
| 88
| null | 2023-03-10T09:41:53
| 2018-11-06T15:20:10
|
Java
|
UTF-8
|
Java
| false
| false
| 308
|
java
|
package prepare.lecture;
public class Util {
public static void printThread(final Thread thread) {
System.out
.println("name = " + thread + " group = " + thread.getThreadGroup() + " state = " + thread.getState() + " isInterrupted = " + thread.isInterrupted());
}
}
|
[
"S.Zheleznov@thomsonreuters.com"
] |
S.Zheleznov@thomsonreuters.com
|
d5b5e5cf17ea04bb630c39c9a489ea5e7251abc5
|
4fc490c7d53c114bf5db361662a50a9928285178
|
/BinaryFileSubstitution/src/ru/spbstu/timofeev/workers/SubstitutionTable.java
|
377a0c11e8aa2b83d45ed39197e7cbaf020be600
|
[] |
no_license
|
nineleven/java
|
f7374f29a6a6549f659537eaba5034a262b2a87d
|
0a99ae9c3c0a4b9c0d4d7fbe08ccc9da4f7b35e0
|
refs/heads/master
| 2023-01-29T23:13:03.614800
| 2020-12-12T15:36:11
| 2020-12-12T15:36:11
| 301,173,133
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,768
|
java
|
package ru.spbstu.timofeev.workers;
import ru.spbstu.pipeline.RC;
import ru.spbstu.timofeev.utils.FileParser;
import ru.spbstu.timofeev.utils.Pair;
import ru.spbstu.timofeev.utils.PipelineBaseGrammar;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
public class SubstitutionTable {
private final HashMap<Byte, Byte> table;
private final Logger logger;
private SubstitutionTable(HashMap<Byte, Byte> table, Logger logger) {
this.table = table;
this.logger = logger;
}
public byte Substitute(byte x) {
Byte y = table.get(x);
if (y == null) {
return x;
}
else {
return y;
}
}
public RC Substitute(byte[] data) {
if (data == null) {
logger.warning("Invalid substitution input");
return RC.CODE_INVALID_ARGUMENT;
}
for (int i = 0; i < data.length; ++i) {
data[i] = Substitute(data[i]);
}
return RC.CODE_SUCCESS;
}
private static boolean isValidTable(HashMap<Byte, Byte> map) {
boolean[] present = new boolean[256];
for(Map.Entry<Byte, Byte> entry: map.entrySet()) {
if (!map.containsKey(entry.getValue())) {
return false;
}
if (present[128 + entry.getValue()]) {
return false;
}
present[128 + entry.getValue()] = true;
}
return true;
}
public static Pair<SubstitutionTable, RC> fromFile(String filename, Logger logger) {
PipelineBaseGrammar tableGrammar = new PipelineBaseGrammar(new String[] {}) {
@Override
public String delimiter() {
return "=>";
}
@Override
public boolean containsToken(String token) {
return true;
}
} ;
Pair<HashMap<String, String>, RC> res = FileParser.readMap(
filename, tableGrammar, logger
);
if (res.first == null) {
logger.severe("Failed to read a table from " + filename);
return new Pair<>(null, res.second);
}
HashMap<String, String> stringTable = res.first;
HashMap<Byte, Byte> byteTable = StringTableToByte(stringTable);
if (byteTable == null) {
logger.severe("Failed to convert table to byte");
return new Pair<>(null, RC.CODE_CONFIG_SEMANTIC_ERROR);
}
if (!isValidTable(byteTable)) {
logger.severe("Invalid mapping");
return new Pair<>(null, RC.CODE_CONFIG_SEMANTIC_ERROR);
}
SubstitutionTable table = new SubstitutionTable(byteTable, logger);
return new Pair<>(table, RC.CODE_SUCCESS);
}
private static HashMap<Byte, Byte> StringTableToByte(HashMap<String, String> stringTable) {
HashMap<Byte, Byte> byteTable = new HashMap<>();
for (Map.Entry<String, String> entry:stringTable.entrySet()) {
Byte key = parseByte(entry.getKey());
Byte value = parseByte(entry.getValue());
if (key == null || value == null) {
return null;
}
byteTable.put(key, value);
}
return byteTable;
}
/*
returns null if unable to parse correctly
*/
private static Byte parseByte(String line) {
if (line == null || line.length() != 4 ||
!line.startsWith("0x")) {
return null;
}
byte result;
try {
result = (byte) Integer.parseInt(line.substring(2), 16);
} catch (NumberFormatException ex) {
return null;
}
return result;
}
}
|
[
"tim-sania2008@mail.ru"
] |
tim-sania2008@mail.ru
|
581abd4491a1a97bf5937412ccc1ed2f7f6f7b88
|
00726b566d23db9c1343cd1fbfed3aaf143ee89d
|
/src/main/java/net/ttk1/jetty_example/servlet/HogeServlet.java
|
ed76d20608a7d05202314845ab63b7e78dffdd3f
|
[] |
no_license
|
ttk1/jetty_example
|
d8afb579eb75a08141e4e278ca0bbf4f4a06f1cf
|
4d0a968710ffe69496462f8e7dff36cc64792b86
|
refs/heads/master
| 2021-07-13T00:29:44.954561
| 2019-11-12T16:16:57
| 2019-11-12T16:16:57
| 221,228,726
| 0
| 0
| null | 2020-11-16T17:13:14
| 2019-11-12T13:48:28
|
Java
|
UTF-8
|
Java
| false
| false
| 417
|
java
|
package net.ttk1.jetty_example.servlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class HogeServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
resp.getWriter().println("Hello, World");
}
}
|
[
"tama@ttk1.net"
] |
tama@ttk1.net
|
f55e00abe81d625887429731ea09a329aeac1963
|
b67d1a01c5fc26d7ac303301b2e91fafc142a5c1
|
/src/test/java/jp/gr/java_conf/dyama/rink/parser/core/BitVectorTest.java
|
5b36a2ae7e6abf46765246f71c44d930ebdffce4
|
[
"BSD-3-Clause"
] |
permissive
|
dyamah/rink
|
6c0ab410828f2b32cc75ae59e223f5622650a2b3
|
3ef1df689afc6768383ac7987c8470a2ff81562b
|
refs/heads/master
| 2016-08-04T22:29:09.878831
| 2013-02-28T06:41:25
| 2013-02-28T06:41:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 14,946
|
java
|
package jp.gr.java_conf.dyama.rink.parser.core;
import static org.junit.Assert.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import jp.gr.java_conf.dyama.rink.parser.core.BitVector;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class BitVectorTest {
static final double E = 0.000000001;
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
@Test
public void testBitVector() {
try {
new BitVector(null);
fail("");
} catch (IllegalArgumentException e) {
assertEquals("the array is null.", e.getMessage());
} catch (Exception e) {
fail("");
}
{
double[] v = {0,0, 0,0, 0,0};
BitVector bv = new BitVector(v);
assertEquals(0, bv.size());
assertEquals(0.0, bv.squaredL2norm(), E);
}
{
double[] v = {};
BitVector bv = new BitVector(v);
assertEquals(0, bv.size());
assertEquals(0.0, bv.squaredL2norm(), E);
}
}
@Test
public void testSize() {
{
double[] v = {0, 0, 0, 0, 0, 0};
BitVector bv = new BitVector(v);
assertEquals(0, bv.size());
}
{
double[] v = {1.0, 0, 3.0, 0, 0, 6.0};
BitVector bv = new BitVector(v);
assertEquals(3, bv.size());
}
{
double[] v = {0.0, 0, 3.0, 0, 0, 0.00000000001};
BitVector bv = new BitVector(v);
assertEquals(2, bv.size());
}
}
@Test
public void testSquaredL2norm() {
{
double[] v = {0, 0, 0, 0, 0, 0};
BitVector bv = new BitVector(v);
assertEquals(0.0, bv.squaredL2norm(), E);
}
{
double[] v = {1.0, 0, 3.0, 0, 0, 6.0};
BitVector bv = new BitVector(v);
assertEquals(46.0, bv.squaredL2norm(), E);
}
{
double[] v = {0.0, 0, 3.0, 0, 0, -1.0};
BitVector bv = new BitVector(v);
assertEquals(10.0, bv.squaredL2norm(), E);
}
}
@Test
public void testPopCount(){
assertEquals( 1, BitVector.popCount(1L));
assertEquals( 4, BitVector.popCount(0xfL));
assertEquals( 8, BitVector.popCount(0xffL));
assertEquals(12, BitVector.popCount(0xfffL));
assertEquals(16, BitVector.popCount(0xffffL));
assertEquals(16, BitVector.popCount(0xffff0000L));
assertEquals( 1, BitVector.popCount(0x1L));
assertEquals( 2, BitVector.popCount(0x11L));
assertEquals( 3, BitVector.popCount(0x111L));
assertEquals(14, BitVector.popCount(0xff444444L));
}
@Test
public void testGet() {
{
double[] v = {0, 0, 0, 0, 0, 0};
BitVector bv = new BitVector(v);
assertEquals(0.0, bv.get(-1), E);
assertEquals(0.0, bv.get( 0), E);
assertEquals(0.0, bv.get( 1), E);
assertEquals(0.0, bv.get( 2), E);
assertEquals(0.0, bv.get( 3), E);
assertEquals(0.0, bv.get( 4), E);
assertEquals(0.0, bv.get( 5), E);
}
{
double[] v = {1.0, 0, 3.0, 0, 0, 6.0};
BitVector bv = new BitVector(v);
assertEquals(0.0, bv.get(-1), E);
assertEquals(1.0, bv.get( 0), E);
assertEquals(0.0, bv.get( 1), E);
assertEquals(3.0, bv.get( 2), E);
assertEquals(0.0, bv.get( 3), E);
assertEquals(0.0, bv.get( 4), E);
assertEquals(6.0, bv.get( 5), E);
assertEquals(0.0, bv.get( 6), E);
assertEquals(0.0, bv.get( 7), E);
}
{
double[] v = new double[1024];
for(int i = 0; i < v.length; i++)
v[i] = (double) (i+1) ;
BitVector bv = new BitVector(v);
assertEquals(1024, bv.size());
for(int i = 0; i < bv.size(); i++)
assertEquals((double)(i+1), bv.get(i), E);
}
{
double[] v = new double[130];
v[126] = 127.0;
v[127] = 128.0;
v[128] = 129.0;
BitVector bv = new BitVector(v);
assertEquals(3, bv.size());
for(int i = 0; i < 130; i++){
if (i == 126){
assertEquals(127.0, bv.get(i), E);
} else if (i == 127){
assertEquals(128.0, bv.get(i), E);
} else if (i == 128){
assertEquals(129.0, bv.get(i), E);
} else {
assertEquals(0.0, bv.get(i), E);
}
}
}
}
@Test
public void testSet() {
{
double[] v = {0, 0, 0, 0, 0, 0};
BitVector bv = new BitVector(v);
assertEquals(0.0, bv.get(-1), E);
assertEquals(0.0, bv.get( 0), E);
assertEquals(0.0, bv.get( 1), E);
assertEquals(0.0, bv.get( 2), E);
assertEquals(0.0, bv.get( 3), E);
assertEquals(0.0, bv.get( 4), E);
assertEquals(0.0, bv.get( 5), E);
try {
bv.set(-1, 1);
fail("");
} catch (IllegalArgumentException e){
assertEquals("the index is negative.", e.getMessage());
} catch (Exception e){
fail("");
}
bv.set(0, 0);
assertEquals(0.0, bv.get(-1), E);
assertEquals(0.0, bv.get( 0), E);
assertEquals(0.0, bv.get( 1), E);
assertEquals(0.0, bv.get( 2), E);
assertEquals(0.0, bv.get( 3), E);
assertEquals(0.0, bv.get( 4), E);
assertEquals(0.0, bv.get( 5), E);
bv.set(4, 4);
assertEquals(0.0, bv.get(-1), E);
assertEquals(0.0, bv.get( 0), E);
assertEquals(0.0, bv.get( 1), E);
assertEquals(0.0, bv.get( 2), E);
assertEquals(0.0, bv.get( 3), E);
assertEquals(4.0, bv.get( 4), E);
assertEquals(0.0, bv.get( 5), E);
}
{
int m = 65;
double[] v = new double[m];
assertEquals(65, m);
for(int i = 0; i < m; i++)
v[i] = 0;
BitVector bv = new BitVector(v);
assertEquals(0, bv.size());
for(int i = 0; i < m; i++)
assertEquals(0, bv.get(i), E);
for(int i = 0; i < m; i++)
bv.set(i, (double)i+1);
assertEquals(65, bv.size());
for(int i = 0; i < m; i++)
assertEquals((double)i+1, bv.get(i), E);
}
{
int m = 1024;
double[] v = new double[m];
assertEquals(1024, m);
for(int i = 0; i < m; i++)
v[i] = 0;
BitVector bv = new BitVector(v);
assertEquals(0, bv.size());
for(int i = 0; i < m; i++)
assertEquals(0, bv.get(i), E);
for(int i = 0; i < m; i++)
bv.set(i, (double)i+1);
assertEquals(1024, bv.size());
for(int i = 0; i < m; i++)
assertEquals((double)i+1, bv.get(i), E);
}
{
int m = 256;
double[] v = new double[0];
BitVector bv = new BitVector(v);
assertEquals(0, bv.size());
for(int i = 0; i < m; i++)
assertEquals(0, bv.get(i), E);
for(int i = 0; i < m; i++)
bv.set(i, (double)i+1);
assertEquals(256, bv.size());
for(int i = 0; i < m; i++)
assertEquals((double)i+1, bv.get(i), E);
for(int i = 0; i < m; i++){
bv.set(i, 0);
assertEquals(0.0, bv.get(i), E);
assertEquals(256 - i - 1, bv.size());
}
assertEquals(0, bv.size());
for(int i = 0; i < m; i++)
assertEquals(0, bv.get(i), E);
for(int i = 0; i < m; i++)
if (i % 3 == 0)
bv.set(i, (double) i+1);
assertEquals(256 / 3 + 1, bv.size());
for(int i = 0; i < m; i++){
if (i % 3 == 0){
assertEquals((double) i+1, bv.get(i), E);
} else {
assertEquals(0.0, bv.get(i), E);
}
}
}
{
double[] v = new double[130];
v[126] = 127.0;
v[127] = 128.0;
v[128] = 129.0;
BitVector bv = new BitVector(v);
assertEquals(3, bv.size());
for(int i = 0; i < 130; i++){
if (i == 126){
assertEquals(127.0, bv.get(i), E);
} else if (i == 127){
assertEquals(128.0, bv.get(i), E);
} else if (i == 128){
assertEquals(129.0, bv.get(i), E);
} else {
assertEquals(0.0, bv.get(i), E);
}
}
bv.set(0, 0);
assertEquals(3, bv.size());
for(int i = 0; i < 130; i++){
if (i == 126){
assertEquals(127.0, bv.get(i), E);
} else if (i == 127){
assertEquals(128.0, bv.get(i), E);
} else if (i == 128){
assertEquals(129.0, bv.get(i), E);
} else {
assertEquals(0.0, bv.get(i), E);
}
}
bv.set(0, 1.0);
assertEquals(4, bv.size());
for(int i = 0; i < 130; i++){
if (i == 0){
assertEquals(1.0, bv.get(i), E);
} else if (i == 126){
assertEquals(127.0, bv.get(i), E);
} else if (i == 127){
assertEquals(128.0, bv.get(i), E);
} else if (i == 128){
assertEquals(129.0, bv.get(i), E);
} else {
assertEquals(0.0, bv.get(i), E);
}
}
bv.set(0, 0.0);
assertEquals(3, bv.size());
for(int i = 0; i < 130; i++){
if (i == 0){
assertEquals(0.0, bv.get(i), E);
} else if (i == 126){
assertEquals(127.0, bv.get(i), E);
} else if (i == 127){
assertEquals(128.0, bv.get(i), E);
} else if (i == 128){
assertEquals(129.0, bv.get(i), E);
} else {
assertEquals(0.0, bv.get(i), E);
}
}
bv.set(1, 1.2);
bv.set(127, 0);
assertEquals(3, bv.size());
for(int i = 0; i < 130; i++){
if (i == 1){
assertEquals(1.2, bv.get(i), E);
} else if (i == 126){
assertEquals(127.0, bv.get(i), E);
} else if (i == 127){
assertEquals(0.0, bv.get(i), E);
} else if (i == 128){
assertEquals(129.0, bv.get(i), E);
} else {
assertEquals(0.0, bv.get(i), E);
}
}
bv.set(127, 1.3);
bv.set(128, 0);
assertEquals(3, bv.size());
for(int i = 0; i < 130; i++){
if (i == 1){
assertEquals(1.2, bv.get(i), E);
} else if (i == 126){
assertEquals(127.0, bv.get(i), E);
} else if (i == 127){
assertEquals(1.3, bv.get(i), E);
} else if (i == 128){
assertEquals(0.0, bv.get(i), E);
} else {
assertEquals(0.0, bv.get(i), E);
}
}
}
}
@Test
public void testProduct() {
{
double[] v = {0, 0, 0, 0, 0, 0};
BitVector bv = new BitVector(v);
assertEquals(0.0, bv.get(-1), E);
assertEquals(0.0, bv.get( 0), E);
assertEquals(0.0, bv.get( 1), E);
assertEquals(0.0, bv.get( 2), E);
assertEquals(0.0, bv.get( 3), E);
assertEquals(0.0, bv.get( 4), E);
assertEquals(0.0, bv.get( 5), E);
bv.product(1.11);
assertEquals(0.0, bv.get(-1), E);
assertEquals(0.0, bv.get( 0), E);
assertEquals(0.0, bv.get( 1), E);
assertEquals(0.0, bv.get( 2), E);
assertEquals(0.0, bv.get( 3), E);
assertEquals(0.0, bv.get( 4), E);
assertEquals(0.0, bv.get( 5), E);
}
{
double[] v = {0, 1.0, 2.0, 3.0, 4.0, 5.0};
BitVector bv = new BitVector(v);
assertEquals(0.0, bv.get(-1), E);
assertEquals(0.0, bv.get( 0), E);
assertEquals(1.0, bv.get( 1), E);
assertEquals(2.0, bv.get( 2), E);
assertEquals(3.0, bv.get( 3), E);
assertEquals(4.0, bv.get( 4), E);
assertEquals(5.0, bv.get( 5), E);
bv.product(2.0);
assertEquals(0.0, bv.get(-1), E);
assertEquals(0.0, bv.get( 0), E);
assertEquals(2.0, bv.get( 1), E);
assertEquals(4.0, bv.get( 2), E);
assertEquals(6.0, bv.get( 3), E);
assertEquals(8.0, bv.get( 4), E);
assertEquals(10.0, bv.get( 5), E);
}
}
@Test
public void testSerialize() throws IOException, ClassNotFoundException{
File tmpfile = File.createTempFile("BitVectorTest", ".tmp");
tmpfile.deleteOnExit();
{
double[] v = new double[1000];
for(int i = 0; i < 1000; i++)
v[i] = i + 1;
BitVector bv = new BitVector(v);
assertEquals(1000, bv.size());
for(int i = 0; i < 1000; i++)
assertEquals(i + 1, bv.get(i), E);
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(tmpfile) );
out.writeObject(bv);
out.close();
}
{
ObjectInputStream in = new ObjectInputStream(new FileInputStream(tmpfile));
BitVector bv = (BitVector)in.readObject();
assertEquals(1000, bv.size());
for(int i = 0; i < 1000; i++)
assertEquals(i + 1, bv.get(i), E);
in.close();
}
}
}
|
[
"dyama.h@gmail.com"
] |
dyama.h@gmail.com
|
b1b41171060db740190b044eb5d893dcb2fe24b1
|
6345f2e959be705441fb63f8cfbaee4d1e8bdf3a
|
/src/org/iplantcollaborative/AccessPermissionCache.java
|
8bbdb1806d6ba51a5e60927fced723ffe4724063
|
[
"Apache-2.0"
] |
permissive
|
iychoi/iPlantBorderMessageServer
|
a93ca6eee61bc33a903be20d98957ffa6773f887
|
cbb540202d5a222339b689c79622a7cceddbcb4f
|
refs/heads/master
| 2021-01-18T23:55:58.081587
| 2016-07-26T02:04:16
| 2016-07-26T02:04:16
| 46,043,496
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,677
|
java
|
/*
* Copyright 2015 iychoi.
*
* 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.iplantcollaborative;
import java.util.Objects;
import org.apache.commons.collections4.map.LRUMap;
/**
*
* @author iychoi
*/
public class AccessPermissionCache {
private static final int DEFAULT_CACHE_SIZE = 100000;
private LRUMap<AccessPermissionKey, Boolean> cache = new LRUMap<AccessPermissionKey, Boolean>(DEFAULT_CACHE_SIZE);
public static class AccessPermissionKey {
private String userId;
private String path;
public AccessPermissionKey(String userId, String path) {
this.userId = userId;
this.path = path;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@Override
public int hashCode() {
return this.userId.hashCode() ^ this.path.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final AccessPermissionKey other = (AccessPermissionKey) obj;
if (!Objects.equals(this.userId, other.userId)) {
return false;
}
if (!Objects.equals(this.path, other.path)) {
return false;
}
return true;
}
@Override
public String toString() {
return this.userId + "@" + this.path;
}
}
public AccessPermissionCache() {
}
public void cache(AccessPermissionKey key, Boolean allowed) {
this.cache.put(key, allowed);
}
public Boolean get(AccessPermissionKey key) {
return this.cache.get(key);
}
public void clearCache() {
this.cache.clear();
}
}
|
[
"iychoi@email.arizona.edu"
] |
iychoi@email.arizona.edu
|
c75209a700f5d245df70557c53381989bc52b8fa
|
329be945c297354a23dc4fd69122d54e1dea9ed5
|
/hrm_user_parent/hrm_user_client/src/main/java/com/ymy/hrm/client/VipCourseCollectClientHystrixFallbackFactory.java
|
3c359b7ae81444a4dddaccf895d52f835b3694a1
|
[] |
no_license
|
jackyang92/hrm_parent
|
d57fa7f3b7f46704108ce3a84a027dbc91b22f20
|
ae9db97fe6f78ea45ec06f56f7950ff88150c1e1
|
refs/heads/master
| 2022-07-05T04:13:39.059021
| 2019-10-07T01:57:43
| 2019-10-07T01:57:43
| 205,696,724
| 1
| 0
| null | 2022-06-17T03:28:10
| 2019-09-01T15:36:25
|
Java
|
UTF-8
|
Java
| false
| false
| 1,261
|
java
|
package com.ymy.hrm.client;
import com.ymy.hrm.domain.VipCourseCollect;
import com.ymy.hrm.query.VipCourseCollectQuery;
import com.ymy.hrm.util.AjaxResult;
import com.ymy.hrm.util.PageList;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author yaohuaipeng
* @date 2018/10/8-16:18
*/
@Component
public class VipCourseCollectClientHystrixFallbackFactory implements FallbackFactory<VipCourseCollectClient> {
@Override
public VipCourseCollectClient create(Throwable throwable) {
return new VipCourseCollectClient() {
@Override
public AjaxResult save(VipCourseCollect vipCourseCollect) {
return null;
}
@Override
public AjaxResult delete(Integer id) {
return null;
}
@Override
public VipCourseCollect get(Long id) {
return null;
}
@Override
public List<VipCourseCollect> list() {
return null;
}
@Override
public PageList<VipCourseCollect> json(VipCourseCollectQuery query) {
return null;
}
};
}
}
|
[
"jack@163.com"
] |
jack@163.com
|
a44b99089f7d7f820354dd8d21565b8a2edc2bfa
|
bbacce19dd5a7d526b97e6004faa4cf7da2bd645
|
/Demo_working/Tax1099Automation-master/Test/src/test/java/Fidentity_pages/UserActions.java
|
fd95c297992dfb016287bb1148a78286bd6a8cc7
|
[] |
no_license
|
prasadautomation/Tax1099Automation
|
f44bbce63fb7d756e07444cfa8c17d843937472b
|
ef1fd1fab8743d27810591b8a688cce9e329675c
|
refs/heads/master
| 2023-04-02T12:07:34.545111
| 2021-04-08T05:50:47
| 2021-04-08T05:50:47
| 322,508,946
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 18,210
|
java
|
package Fidentity_pages;
import java.util.List;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
import Common.Fid_base;
public class UserActions extends Fid_base{
public void userActions_nav () {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement element= driver.findElement(By.xpath("//div[@class='side-wrapper']//ul[1]//li[@id='service_users_parent']//a"));
JavascriptExecutor executor = (JavascriptExecutor) driver;
executor.executeScript("arguments[0].click();", element);
WebElement viewusers= driver.findElement(By.xpath("//div[@id='service_user_features']//span[4]//a[contains(text(),'View users')]"));
JavascriptExecutor userexecutor = (JavascriptExecutor) driver;
userexecutor.executeScript("arguments[0].click();", viewusers);
List <WebElement> allvalue = driver.findElements(By.xpath("//div[@class='card my-card']//li//table//tr/td[6]"));
//int count=allvalue.size();
System.out.print("Number of users:--"+allvalue.size()+" ");
if(allvalue.size()>1) {
WebElement visibleactions= driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div"));
JavascriptExecutor visibleexecutor = (JavascriptExecutor) driver;
visibleexecutor.executeScript("arguments[0].click();", visibleactions);}
else {System.out.print("cannot perform user actions on root admin");}}
public void deactiavte_emp() throws InterruptedException {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
List <WebElement> allvalue = driver.findElements(By.xpath("//div[@class='card my-card']//li//table//tr/td[6]"));
//int count=allvalue.size();
System.out.print("Number of users:--"+allvalue.size()+" ");
if(allvalue.size()>1) {
WebElement status=driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div//table//tr/td[6]//span[2]"));
if(status.getText().equals("active")) {
WebElement deactiavte= driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div[contains(@class,'collapsible-body ')]//span//a[@title='Deactivate account']"));
JavascriptExecutor deactivatexecutor = (JavascriptExecutor) driver;
deactivatexecutor.executeScript("arguments[0].click();", deactiavte);
Thread.sleep(3000);
System.out.print("Deactiavte clciked");
WebElement confirmdeactiavte= driver.findElement(By.xpath("//div[@id='status_change_user_modal']//a[contains(@class,'delete-button') and contains(text(),'Yes, Deactivate')]"));
JavascriptExecutor confirmexecutor = (JavascriptExecutor) driver;
confirmexecutor.executeScript("arguments[0].click();", confirmdeactiavte);
Thread.sleep(3000);
System.out.print("Deactiavtion confirmed");
}else {System.out.print("Employee already deactivated");}}
else{System.out.print("--Only one user available we cannot perform actions---");}
driver.navigate().refresh();
}
public void activate_emp() throws InterruptedException {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement status=driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div//table//tr/td[6]//span[2]"));
if(status.getText().equals("inactive")) {
WebElement activate= driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div[contains(@class,'collapsible-body ')]//span//a[@title='Deactivate account']"));
JavascriptExecutor activateexecutor = (JavascriptExecutor) driver;
activateexecutor.executeScript("arguments[0].click();", activate);
Thread.sleep(3000);
System.out.print("actiavte clicked");
WebElement confirmdeactiavte= driver.findElement(By.xpath("//div[@id='status_change_user_modal']//a[contains(@class,'primary-button') and contains(text(),'Yes, Activate')]"));
JavascriptExecutor confirmexecutor = (JavascriptExecutor) driver;
confirmexecutor.executeScript("arguments[0].click();", confirmdeactiavte);
Thread.sleep(3000);
System.out.print("Actiavtion confirmed");
}
else {System.out.print("Employee already actiavted");}
driver.navigate().refresh();
}
public void status_change() throws InterruptedException {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement status=driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div//table//tr/td[6]//span[2]"));
if(status.getText().equals("active")) {
WebElement deactiavte= driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div[contains(@class,'collapsible-body ')]//span//a[@title='Deactivate account']"));
JavascriptExecutor deactivatexecutor = (JavascriptExecutor) driver;
deactivatexecutor.executeScript("arguments[0].click();", deactiavte);
Thread.sleep(3000);
System.out.print("Actiave employee changed as deactive");
}
else {
WebElement activate= driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div[contains(@class,'collapsible-body ')]//span//a[@title='Activate account']"));
JavascriptExecutor activateexecutor = (JavascriptExecutor) driver;
activateexecutor.executeScript("arguments[0].click();", activate);
Thread.sleep(3000);
System.out.print("Deactive employee changed as active");
}
}
public void cancel_status_change() throws InterruptedException {
WebElement cancelstatus= driver.findElement(By.xpath("//div[@id='status_change_user_modal']//a[contains(@class,'reset-button') and contains(text(),'No, Cancel')]"));
JavascriptExecutor cancelexecutor = (JavascriptExecutor) driver;
cancelexecutor.executeScript("arguments[0].click();", cancelstatus);
}
public void click_change_password() {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement status=driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div//table//tr/td[6]//span[2]"));
if(status.getText().equals("active")) {
WebElement resetpassword= driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div[contains(@class,'collapsible-body')]//a[@title='Reset Password']"));
JavascriptExecutor passwordexecutor = (JavascriptExecutor) driver;
passwordexecutor.executeScript("arguments[0].click();", resetpassword);
Random randomGenerator = new Random();
int randomInt = randomGenerator.nextInt(1000);
String random_password="Sridevi@"+randomInt;
System.out.print("New password is--"+random_password);
String user =driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div//table//tr//td[4]//span[2]")).getText();
System.out.print(" User is--"+user);
driver.findElement(By.xpath("//div[@id='reset_user_modal']//input[@id='new_password']")).sendKeys(random_password);
WebElement passwordconfirm= driver.findElement(By.xpath("//div[@id='reset_user_modal']//a[@class='primary-button' and contains(text(),'Yes, Change')]"));
JavascriptExecutor confirmexecutor = (JavascriptExecutor) driver;
confirmexecutor.executeScript("arguments[0].click();", passwordconfirm);
}else {
System.out.print("User is in inactive state cannot reset password");
}
}
public void enter_password() {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement status=driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div//table//tr/td[6]//span[2]"));
if(status.getText().equals("active")) {
WebElement resetpassword= driver.findElement(By.xpath("//div[@class='card my-card']//li//div[contains(@class,'collapsible-body')]//a[@title='Reset Password']"));
JavascriptExecutor passwordexecutor = (JavascriptExecutor) driver;
passwordexecutor.executeScript("arguments[0].click();", resetpassword);
Random randomGenerator = new Random();
int randomInt = randomGenerator.nextInt(1000);
String random_password="Sridevi@"+randomInt;
System.out.print("New password is--"+random_password);
String user =driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//div//table//tr//td[4]//span[2]")).getText();
System.out.print(" User is--"+user);
driver.findElement(By.xpath("//div[@id='reset_user_modal']//input[@id='new_password']")).sendKeys(random_password);}
else {System.out.print("Employee status is inactive");}
}
public void cancel_confirmation() throws InterruptedException {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement passwordconfirm= driver.findElement(By.xpath("//div[@id='reset_user_modal']//a[contains(@class,'reset-button') and contains(text(),'No, Cancel')]"));
JavascriptExecutor confirmexecutor = (JavascriptExecutor) driver;
confirmexecutor.executeScript("arguments[0].click();", passwordconfirm);
Thread.sleep(3000);
System.out.print("--Deletion cancelled--");
}
public void delete_action() throws InterruptedException {
List <WebElement> allvalue = driver.findElements(By.xpath("//div[@class='card my-card']//li//table//tr/td[6]"));
//int count=allvalue.size();
System.out.print("Number of users:--"+allvalue.size()+" ");
if(allvalue.size()>1) {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement delete_action= driver.findElement(By.xpath("//div[@class='card my-card']//li[2]//a[@title='Delete user account']"));
JavascriptExecutor deletexecutor = (JavascriptExecutor) driver;
deletexecutor.executeScript("arguments[0].click();", delete_action);
Thread.sleep(3000); }
else {System.out.print("\n"+"Delte action:Only one user is there-");}
}
public void confirm_deletion() {
List <WebElement> allvalue = driver.findElements(By.xpath("//div[@class='card my-card']//li//table//tr/td[6]"));
System.out.print("Number of users:-"+allvalue.size()+" ");
if(allvalue.size()>1) {
WebElement delete_action= driver.findElement(By.xpath("//div[@id='delete_user_modal']//a[contains(@class,'delete-button') and contains(text(),'Yes, Delete')]"));
JavascriptExecutor deletexecutor = (JavascriptExecutor) driver;
deletexecutor.executeScript("arguments[0].click();", delete_action);}
else {System.out.print("Root admin cannot delete");}
}
// WebElement element = driver.findElement(locator);
// Assert.assertFalse(element.isDisplayed());
public void user_account_type() {
List <WebElement> allvalue = driver.findElements(By.xpath("//div[@class='card my-card']//li//table//tr/td[6]"));
for(int i=0;i<allvalue.size();i++) {
WebElement accounttype=driver.findElement(By.xpath("//div[@class='card my-card']//li["+(i+1)+"]//a[@title='Change Account type']"));
boolean visible=accounttype.isDisplayed();
if(visible==true) {
JavascriptExecutor visiblexecutor = (JavascriptExecutor) driver;
visiblexecutor.executeScript("arguments[0].click();", accounttype);
String usertype=driver.findElement(By.xpath("//div[@class='card my-card']//li["+(i+1)+"]//table//tr/td[5]//span[2]")).getText();
System.out.print("\n"+"account type:"+usertype);
WebElement usertypemodal=driver.findElement(By.xpath("//div[@id='change_user_type_modal']"));
boolean modalvisible=usertypemodal.isDisplayed();
if(modalvisible==true) {
// String usertype=driver.findElement(By.xpath("//div[@class='card my-card']//li//table//tr/td[5]//span[2]")).getText();
System.out.print("\n"+"-Employee type:"+usertype);
if(usertype.equals("admin")){
System.out.print("\n"+"usertype is admin and changing as employee--");
WebElement admin= driver.findElement(By.xpath("//div[@id='change_user_type_modal']//div[@class='input-field login-type-edit']//span//label[2]"));
JavascriptExecutor adminexecutor = (JavascriptExecutor) driver;
adminexecutor.executeScript("arguments[0].click();", admin);
}
if(usertype.equals("employee")) {
System.out.print("--usertype is employee and changing as admin--");
WebElement employee= driver.findElement(By.xpath("//div[@id='change_user_type_modal']//div[@class='input-field login-type-edit']//span//label[1]"));
JavascriptExecutor employexecutor = (JavascriptExecutor) driver;
employexecutor.executeScript("arguments[0].click();", employee);
}
}else {System.out.print("user modal not displayed");}
break;}
else{System.out.print("\n"+"first user type is root admin");}
}}
public void Select_user_type() {
WebElement usertypemodal=driver.findElement(By.xpath("//div[@id='change_user_type_modal']"));
boolean visible=usertypemodal.isDisplayed();
if(visible==true) {
//System.out.print("--usertype change modal window displaying");
String usertype=driver.findElement(By.xpath("//div[@class='card my-card']//li//table//tr/td[5]//span[2]")).getText();
System.out.print("\n"+"-Employee type:"+usertype);
if(usertype.equals("admin")){
System.out.print("--usertype is admin and changing as employee--");
WebElement admin= driver.findElement(By.xpath("//div[@id='change_user_type_modal']//div[@class='input-field login-type-edit']//span//label[2]"));
JavascriptExecutor adminexecutor = (JavascriptExecutor) driver;
adminexecutor.executeScript("arguments[0].click();", admin);
}
if(usertype.equals("employee")) {
System.out.print("--usertype is employee and changing as admin--");
WebElement employee= driver.findElement(By.xpath("//div[@id='change_user_type_modal']//div[@class='input-field login-type-edit']//span//label[1]"));
JavascriptExecutor employexecutor = (JavascriptExecutor) driver;
employexecutor.executeScript("arguments[0].click();", employee);
}
}else {System.out.print("user modal not displayed");
}
}
public void confirm_account_change() {
WebElement usertypemodal=driver.findElement(By.xpath("//div[@id='change_user_type_modal']"));
boolean visible=usertypemodal.isDisplayed();
if(visible==true) {
WebElement confirmation= driver.findElement(By.xpath("//div[@id='change_user_type_modal']//div[@class='modal-footer']//a[contains(@class,'primary-button') and contains(text(),'Yes, Change')]"));
JavascriptExecutor confirmexecutor = (JavascriptExecutor) driver;
confirmexecutor.executeScript("arguments[0].click();", confirmation);
driver.navigate().refresh();
}else {System.out.print("user modal not displayed");}
}
public void Cancel_account_change() {
WebElement usertypemodal=driver.findElement(By.xpath("//div[@id='change_user_type_modal']"));
boolean visible=usertypemodal.isDisplayed();
if(visible==true) {
WebElement cancelchange= driver.findElement(By.xpath("//div[@id='change_user_type_modal']//div[@class='modal-footer']//a[contains(@class,'reset-button') and contains(text(),'No, Cancel')]"));
JavascriptExecutor cancelexecutor = (JavascriptExecutor) driver;
cancelexecutor.executeScript("arguments[0].click();", cancelchange);
}else {System.out.print("user modal not displayed");}
}
public void logout_nav() {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement element= driver.findElement(By.xpath("//div[@class='side-wrapper']//ul[1]//li[@id='service_users_parent']//a"));
JavascriptExecutor executor = (JavascriptExecutor) driver;
executor.executeScript("arguments[0].click();", element);
WebElement viewusers= driver.findElement(By.xpath("//div[@id='service_user_features']//span[4]//a[contains(text(),'View users')]"));
JavascriptExecutor userexecutor = (JavascriptExecutor) driver;
userexecutor.executeScript("arguments[0].click();", viewusers);
List <WebElement> allvalue = driver.findElements(By.xpath("//div[@class='card my-card']//li//table//tr/td[6]"));
for(int i=1;i<=allvalue.size();i++) {
//driver.findElements(By.xpath("//div[@class='card my-card']//li//table//tr/td[6]"));
WebElement row=driver.findElement(By.xpath("//div[@class='card my-card']//li["+(i)+"]//table//tr/td[6]"));
JavascriptExecutor rowexecutor = (JavascriptExecutor) driver;
rowexecutor.executeScript("arguments[0].click();", row);
WebElement accounttype=driver.findElement(By.xpath("//div[@class='card my-card']//li["+(i)+"]//a[contains(@title,'Logout')]"));
boolean visible=accounttype.isDisplayed();
if(visible==true) {
JavascriptExecutor accountexecutor = (JavascriptExecutor) driver;
accountexecutor.executeScript("arguments[0].click();", accounttype);
break;}
else {System.out.print("Logout icon not visible ");}
}
}
public void confirm_logout() throws InterruptedException {
WebElement logoutmodal=driver.findElement(By.xpath("//div[@id='logout_user_modal']"));
boolean modal=logoutmodal.isDisplayed();
if(modal==true) {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement logoutconfirm= driver.findElement(By.xpath("//div[@id='logout_user_modal']//a[@class='primary-button' and contains(text(),'Yes, Logout')]"));
JavascriptExecutor confirmexecutor = (JavascriptExecutor) driver;
confirmexecutor.executeScript("arguments[0].click();", logoutconfirm);
driver.navigate().refresh();
Thread.sleep(3000);}else{System.out.print("logout modal is not displayed");
}
//div[@id='logout_user_modal']//a[@class='primary-button' and contains(text(),'Yes, Logout')]
}
public void Cancel_logout() throws InterruptedException {
WebElement logoutmodal=driver.findElement(By.xpath("//div[@id='logout_user_modal']"));
boolean modal=logoutmodal.isDisplayed();
if(modal==true) {
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement cancelconfirm= driver.findElement(By.xpath("//div[@id='logout_user_modal']//a[contains(@class,'reset-button') and contains(text(),'No, Cancel')]"));
JavascriptExecutor cancelexecutor = (JavascriptExecutor) driver;
cancelexecutor.executeScript("arguments[0].click();", cancelconfirm);
driver.navigate().refresh();
Thread.sleep(3000);}else{System.out.print("logout modal is not displayed");}
//div[@id='logout_user_modal']//a[@class='primary-button' and contains(text(),'Yes, Logout')]
}
}
|
[
"sridevi@zenwork.com"
] |
sridevi@zenwork.com
|
0af6c59dd3c648cf17123e2a2a13fa2b83a1dbcb
|
152f382f72d6b65b9b766babb2feb4894a4dcb0e
|
/src/main/java/org/bcia/javachain/sdk/security/csp/pkcs11/rsa/RsaImpl.java
|
6c1ec2618a9d0043386ce20c65fe83e70009aacb
|
[
"Apache-2.0"
] |
permissive
|
JulongChain/julongchain-sdk-ftsafe
|
c1d8738afbc54a87f89a78c764e492ceb85fdf53
|
255140ca39369327fdbe26135c3f8efc85dddb39
|
refs/heads/master
| 2020-03-29T05:49:46.975344
| 2018-10-19T01:25:44
| 2018-10-19T01:25:44
| 149,598,310
| 7
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 27,650
|
java
|
/**
* Copyright Dingxuan. All Rights Reserved.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.bcia.javachain.sdk.security.csp.pkcs11.rsa;
import org.bcia.javachain.sdk.security.csp.intfs.IKey;
import org.bcia.javachain.sdk.security.csp.pkcs11.IPKCS11FactoryOpts;
import org.bcia.javachain.sdk.security.csp.pkcs11.PKCS11CspLog;
import org.bcia.javachain.sdk.security.csp.pkcs11.util.DataUtil;
import org.bcia.javachain.common.exception.JavaChainException;
import sun.security.pkcs11.wrapper.CK_ATTRIBUTE;
import sun.security.pkcs11.wrapper.CK_MECHANISM;
import sun.security.pkcs11.wrapper.PKCS11Exception;
import sun.security.rsa.RSAPrivateCrtKeyImpl;
import sun.security.rsa.RSAPublicKeyImpl;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.KeyFactory;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.interfaces.RSAPrivateCrtKey;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;
import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
/**
* RSA Keypair Impl
*
* @author xuying
* @date 2018/05/20
* @company FEITIAN
*/
public class RsaImpl {
private static void setLoggerDebug(String msg, int classNO){
PKCS11CspLog csplog = new PKCS11CspLog();
switch (classNO){
case 1:
csplog.setLogMsg(msg, 0, RsaImpl.GenerateRSA.class);
break;
case 2:
csplog.setLogMsg(msg, 0, RsaImpl.ImportKeyRSA.class);
break;
case 3:
csplog.setLogMsg(msg, 0, RsaImpl.GetkeyRSA.class);
break;
case 4:
csplog.setLogMsg(msg, 0, RsaImpl.SignRSAKey.class);
break;
case 5:
csplog.setLogMsg(msg, 0, RsaImpl.VerifyRSAKey.class);
break;
case 6:
csplog.setLogMsg(msg, 0, RsaImpl.EncryptRSAKey.class);
break;
case 7:
csplog.setLogMsg(msg, 0, RsaImpl.DecryptRSAKey.class);
break;
default:
csplog.setLogMsg(msg, 0, RsaImpl.class);
break;
}
}
private static void setLoggerInfo(String msg, int classNO){
PKCS11CspLog csplog = new PKCS11CspLog();
switch (classNO){
case 1:
csplog.setLogMsg(msg, 1, RsaImpl.GenerateRSA.class);
break;
case 2:
csplog.setLogMsg(msg, 1, RsaImpl.ImportKeyRSA.class);
break;
case 3:
csplog.setLogMsg(msg, 1, RsaImpl.GetkeyRSA.class);
break;
case 4:
csplog.setLogMsg(msg, 1, RsaImpl.SignRSAKey.class);
break;
case 5:
csplog.setLogMsg(msg, 1, RsaImpl.VerifyRSAKey.class);
break;
case 6:
csplog.setLogMsg(msg, 1, RsaImpl.EncryptRSAKey.class);
break;
case 7:
csplog.setLogMsg(msg, 1, RsaImpl.DecryptRSAKey.class);
break;
default:
csplog.setLogMsg(msg, 1, RsaImpl.class);
break;
}
}
private static void setLoggerErr(String msg, int classNO){
PKCS11CspLog csplog = new PKCS11CspLog();
switch (classNO){
case 1:
csplog.setLogMsg(msg, 2, RsaImpl.GenerateRSA.class);
break;
case 2:
csplog.setLogMsg(msg, 2, RsaImpl.ImportKeyRSA.class);
break;
case 3:
csplog.setLogMsg(msg, 2, RsaImpl.GetkeyRSA.class);
break;
case 4:
csplog.setLogMsg(msg, 2, RsaImpl.SignRSAKey.class);
break;
case 5:
csplog.setLogMsg(msg, 2, RsaImpl.VerifyRSAKey.class);
break;
case 6:
csplog.setLogMsg(msg, 2, RsaImpl.EncryptRSAKey.class);
break;
case 7:
csplog.setLogMsg(msg, 2, RsaImpl.DecryptRSAKey.class);
break;
default:
csplog.setLogMsg(msg, 2, RsaImpl.class);
break;
}
}
/**
* Generate RSA Keypair
*
* @author xuying
* @date 2018/05/20
* @company FEITIAN
*/
public static class GenerateRSA{
public GenerateRSA() {
}
/**
* 生成rsa密钥
*
* @param keySize 模长
* @param ephemeral 临时标记
* @param opts p11 factory
* @return key
*/
public static IKey generateRsa(int keySize, boolean ephemeral, IPKCS11FactoryOpts opts) throws JavaChainException {
try {
//create bigint
int iValue = new Random().nextInt(100);
String strDate = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
long lBigInt = Long.parseLong(strDate + iValue);
String publabel = String.format("BCPUB%s", Long.toHexString(lBigInt));
String prvlabel = String.format("BCPRV%s", Long.toHexString(lBigInt));
//create a pubkey attribute
CK_MECHANISM ckm = new CK_MECHANISM();
ckm.mechanism = CKM_RSA_PKCS_KEY_PAIR_GEN;
CK_ATTRIBUTE[] rsaPubObject = new CK_ATTRIBUTE[10];
rsaPubObject[0] = new CK_ATTRIBUTE(CKA_CLASS, CKO_PUBLIC_KEY);
rsaPubObject[1] = new CK_ATTRIBUTE(CKA_TOKEN, !ephemeral);
rsaPubObject[2] = new CK_ATTRIBUTE(CKA_ENCRYPT, true);
rsaPubObject[3] = new CK_ATTRIBUTE(CKA_VERIFY, true);
rsaPubObject[4] = new CK_ATTRIBUTE(CKA_KEY_TYPE, CKK_RSA);
rsaPubObject[5] = new CK_ATTRIBUTE(CKA_WRAP, true);
rsaPubObject[6] = new CK_ATTRIBUTE(CKA_MODULUS_BITS, keySize);
rsaPubObject[7] = new CK_ATTRIBUTE(CKA_ID, publabel);
rsaPubObject[8] = new CK_ATTRIBUTE(CKA_PUBLIC_EXPONENT, lBigInt);
rsaPubObject[9] = new CK_ATTRIBUTE(CKA_LABEL, publabel);
CK_ATTRIBUTE[] rsaPrvObject = new CK_ATTRIBUTE[10];
rsaPrvObject[0] = new CK_ATTRIBUTE(CKA_CLASS, CKO_PRIVATE_KEY);
rsaPrvObject[1] = new CK_ATTRIBUTE(CKA_TOKEN, !ephemeral);
rsaPrvObject[2] = new CK_ATTRIBUTE(CKA_DECRYPT, true);
rsaPrvObject[3] = new CK_ATTRIBUTE(CKA_SIGN, true);
rsaPrvObject[4] = new CK_ATTRIBUTE(CKA_SIGN_RECOVER, true);
rsaPrvObject[5] = new CK_ATTRIBUTE(CKA_KEY_TYPE, CKK_RSA);
rsaPrvObject[6] = new CK_ATTRIBUTE(CKA_MODULUS_BITS, keySize);
rsaPrvObject[7] = new CK_ATTRIBUTE(CKA_ID, prvlabel);
rsaPrvObject[8] = new CK_ATTRIBUTE(CKA_LABEL, prvlabel);
rsaPrvObject[9] = new CK_ATTRIBUTE(CKA_PRIVATE, true);
long[] keypair =opts.getPKCS11().C_GenerateKeyPair(opts.getSessionhandle(), ckm, rsaPubObject, rsaPrvObject);
CK_ATTRIBUTE[] attributes = new CK_ATTRIBUTE[] {
new CK_ATTRIBUTE(CKA_MODULUS),
new CK_ATTRIBUTE(CKA_PUBLIC_EXPONENT),
};
opts.getPKCS11().C_GetAttributeValue(opts.getSessionhandle(),keypair[0],
attributes);
BigInteger n = attributes[0].getBigInteger();
BigInteger e = attributes[1].getBigInteger();
byte[] PublicHash = getPublicHash(n, e);
byte[] pubder = getPublicDer(n, e);
CK_ATTRIBUTE[] setski = new CK_ATTRIBUTE[2];
setski[0] = new CK_ATTRIBUTE(CKA_ID, PublicHash);
setski[1] = new CK_ATTRIBUTE(CKA_LABEL, DataUtil.MyByteToHex(PublicHash));
opts.getPKCS11().C_SetAttributeValue(opts.getSessionhandle(),keypair[0],setski);
opts.getPKCS11().C_SetAttributeValue(opts.getSessionhandle(),keypair[1],setski);
IKey ikey = new RsaKeyOpts.RsaPubKey(PublicHash, pubder);
return ikey;
}catch(PKCS11Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:PKCS11Exception ErrCode: 0x%08x", ex.getErrorCode());
RsaImpl.setLoggerErr(err, 1);
throw new JavaChainException(err, ex.getCause());
}catch(Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:Exception ErrMessage: %s", ex.getMessage());
RsaImpl.setLoggerErr(err, 1);
throw new JavaChainException(err, ex.getCause());
}
}
}
/**
* Import RSA Keypair
*
* @author xuying
* @date 2018/05/20
* @company FEITIAN
*/
public static class ImportKeyRSA{
/**
* 导入rsa密钥
*
* @param PriRaw 私钥DER编码
* @param PubRaw 公钥DER编码
* @param ephemeral 临时标记
* @param opts p11 factory
* @param flagpubkey 公钥标记
* @return 公钥摘要(cka_id value)
*/
public static byte[] importRsaKey(byte[] PriRaw, byte[] PubRaw, boolean ephemeral,
IPKCS11FactoryOpts opts, boolean flagpubkey) throws JavaChainException{
byte[] byteSKI;
try {
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
List<CK_ATTRIBUTE> keyTemplate = new ArrayList<CK_ATTRIBUTE>();
if(flagpubkey)
{
// decode public key
X509EncodedKeySpec pubSpec = new X509EncodedKeySpec(PubRaw);
RSAPublicKey pubKey = (RSAPublicKey) keyFactory.generatePublic(pubSpec);
// SKI
byte[] PublicHash = getPublicHash(pubKey.getModulus(), pubKey.getPublicExponent());
byteSKI = new byte[PublicHash.length];
System.arraycopy(PublicHash, 0, byteSKI, 0, PublicHash.length);
BigInteger bit = pubKey.getModulus().multiply(new BigInteger("8"));
keyTemplate.add(new CK_ATTRIBUTE(CKA_CLASS, CKO_PUBLIC_KEY));
keyTemplate.add(new CK_ATTRIBUTE(CKA_KEY_TYPE, CKK_RSA));
keyTemplate.add(new CK_ATTRIBUTE(CKA_TOKEN, !ephemeral));
keyTemplate.add(new CK_ATTRIBUTE(CKA_MODULUS, pubKey.getModulus()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_PUBLIC_EXPONENT, pubKey.getPublicExponent()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_ID, PublicHash));
keyTemplate.add(new CK_ATTRIBUTE(CKA_MODULUS_BITS, bit));
}
else
{
byteSKI = importRsaKey(null,PubRaw,ephemeral,opts, true);
// decode private key
//PKCS8EncodedKeySpec privSpec = new PKCS8EncodedKeySpec(PriRaw);
//RSAPrivateKey privKey = (RSAPrivateKey)keyFactory.generatePrivate(privSpec);
RSAPrivateKey privKey = RSAPrivateCrtKeyImpl.newKey(PriRaw);
//RSAPrivateCrtKeyImpl privatekeyimpl = (RSAPrivateCrtKeyImpl)privKey1;
RSAPrivateCrtKey privatectrlkey = (RSAPrivateCrtKey)privKey;
keyTemplate.add(new CK_ATTRIBUTE(CKA_CLASS, CKO_PRIVATE_KEY));
keyTemplate.add(new CK_ATTRIBUTE(CKA_KEY_TYPE, CKK_RSA));
keyTemplate.add(new CK_ATTRIBUTE(CKA_TOKEN, !ephemeral));
keyTemplate.add(new CK_ATTRIBUTE(CKA_PUBLIC_EXPONENT, privatectrlkey.getPublicExponent()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_MODULUS, privatectrlkey.getModulus()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_PRIVATE_EXPONENT, privatectrlkey.getPrivateExponent()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_PRIME_1, privatectrlkey.getPrimeP()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_PRIME_2, privatectrlkey.getPrimeQ()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_EXPONENT_1, privatectrlkey.getPrimeExponentP()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_EXPONENT_2, privatectrlkey.getPrimeExponentQ()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_COEFFICIENT, privatectrlkey.getCrtCoefficient()));
keyTemplate.add(new CK_ATTRIBUTE(CKA_ID, byteSKI));
}
opts.getPKCS11().C_CreateObject(opts.getSessionhandle(), keyTemplate.toArray(new CK_ATTRIBUTE[0]));
return byteSKI;
}catch(NoSuchAlgorithmException ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:NoSuchAlgorithmException ErrMessage: %s", ex.getMessage());
RsaImpl.setLoggerErr(err, 2);
throw new JavaChainException(err, ex.getCause());
}catch(InvalidKeySpecException ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:InvalidKeySpecException ErrMessage: %s", ex.getMessage());
RsaImpl.setLoggerErr(err, 2);
throw new JavaChainException(err, ex.getCause());
}catch(PKCS11Exception ex){
ex.printStackTrace();
String err = String.format("[JC_PKCS]:PKCS11Exception ErrCode: 0x%08x", ex.getErrorCode());
RsaImpl.setLoggerErr(err, 2);
throw new JavaChainException(err, ex.getCause());
}catch(InvalidKeyException ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:InvalidKeyException ErrMessage: %s", ex.getMessage());
RsaImpl.setLoggerErr(err, 2);
throw new JavaChainException(err, ex.getCause());
}catch(Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:Exception ErrMessage: %s", ex.getMessage());
RsaImpl.setLoggerErr(err, 2);
throw new JavaChainException(err, ex.getCause());
}
}
public IKey getKey(byte[] ski, byte[] prider, byte[] pubder) {
IKey ikey = new RsaKeyOpts.RsaPriKey(ski, prider, new RsaKeyOpts.RsaPubKey(ski, pubder));
return ikey;
}
public IKey getKey(byte[] ski, byte[] pubder) {
IKey ikey = new RsaKeyOpts.RsaPubKey(ski, pubder);
return ikey;
}
}
/**
* Get RSA PublicKey
*
* @author xuying
* @date 2018/05/20
* @company FEITIAN
*/
public static final class GetkeyRSA{
private static byte[] ski;
private static IPKCS11FactoryOpts opts;
public GetkeyRSA(byte[] ski, IPKCS11FactoryOpts opts){
this.ski = ski;
this.opts = opts;
}
public static IKey getkey() throws JavaChainException {
try {
long[] keypbu = findKeypairFromSKI(opts, false, ski);
if (keypbu==null || (keypbu!=null && keypbu.length==0)) {
String str = String.format("[JC_PKCS]:No Find Key");
RsaImpl.setLoggerInfo(str, 3);
return null;
}
else
{
CK_ATTRIBUTE[] attributes = new CK_ATTRIBUTE[] {
new CK_ATTRIBUTE(CKA_MODULUS),
new CK_ATTRIBUTE(CKA_PUBLIC_EXPONENT),
};
opts.getPKCS11().C_GetAttributeValue(opts.getSessionhandle(), keypbu[0], attributes);
BigInteger n = attributes[0].getBigInteger();
BigInteger e = attributes[1].getBigInteger();
byte[] pubder = getPublicDer(n, e);
IKey ikey = new RsaKeyOpts.RsaPubKey(ski, pubder);
return ikey;
}
}catch(PKCS11Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:PKCS11Exception ErrCode: 0x%08x", ex.getErrorCode());
RsaImpl.setLoggerErr(err, 3);
throw new JavaChainException(err, ex.getCause());
}
}
}
/**
* Use the private key signature of the specified SKI
*
* @author xuying
* @date 2018/05/20
* @company FEITIAN
*/
public static class SignRSAKey{
public SignRSAKey() {
}
/**
* sign data
*
* @param ski cka_id value
* @param digest digest data
* @param newMechanism the alg
* @param opts p11factory
*/
public static byte[] signRSA(byte[] ski, byte[] digest, long newMechanism, IPKCS11FactoryOpts opts) throws JavaChainException{
try {
long[] privatekey = findKeypairFromSKI(opts, true, ski);
if (privatekey==null || (privatekey!=null && privatekey.length==0))
{
String str=String.format("[JC_PKCS]:No Find Key");
RsaImpl.setLoggerErr(str, 4);
throw new JavaChainException(str);
}
CK_MECHANISM ckMechanism = new CK_MECHANISM();
ckMechanism.mechanism = newMechanism;
opts.getPKCS11().C_SignInit(opts.getSessionhandle(), ckMechanism, privatekey[0]);
byte[] signvalue = opts.getPKCS11().C_Sign(opts.getSessionhandle(), digest);
return signvalue;
}catch(PKCS11Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:PKCS11Exception ErrCode: 0x%08x", ex.getErrorCode());
RsaImpl.setLoggerErr(err, 4);
throw new JavaChainException(err, ex.getCause());
}
}
}
/**
* Use the public key verify signature of the specified SKI
*
* @author xuying
* @date 2018/05/20
* @company FEITIAN
*/
public static class VerifyRSAKey{
public VerifyRSAKey() {
}
/**
* verify signature
*
* @param ski cka_id value
* @param signature signature data
* @param digest digest data
* @param newMechanism the alg
* @param opts p11factory
*/
public boolean verifyRSA(byte[] ski, byte[] signature, byte[] digest, long newMechanism, IPKCS11FactoryOpts opts) throws JavaChainException{
try {
long[] publickey = findKeypairFromSKI(opts, false, ski);
if (publickey==null || (publickey!=null && publickey.length==0)) {
String str=String.format("[JC_PKCS]:No Find Key");
RsaImpl.setLoggerErr(str, 5);
throw new JavaChainException(str);
}
CK_MECHANISM ckMechanism = new CK_MECHANISM();
ckMechanism.mechanism = newMechanism;
opts.getPKCS11().C_VerifyInit(opts.getSessionhandle(), ckMechanism, publickey[0]);
opts.getPKCS11().C_Verify(opts.getSessionhandle(), digest, signature);
return true;
}catch(PKCS11Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:PKCS11Exception ErrCode: 0x%08x", ex.getErrorCode());
RsaImpl.setLoggerErr(err, 5);
return false;
}
}
}
/**
* Use the key encrypt of the specified SKI
*
* @author xuying
* @date 2018/05/20
* @company FEITIAN
*/
public static class EncryptRSAKey{
public EncryptRSAKey() {
}
/**
* encrypt data
*
* @param ski cka_id value
* @param plaintext plain data
* @param flagpub public flag
* @param mechanism the alg
* @param opts p11factory
* @return ciphertext
*/
public byte[] encryptRSA(byte[] ski, byte[] plaintext, boolean flagpub, long mechanism, IPKCS11FactoryOpts opts) throws JavaChainException {
try {
long[] enckey;
if (flagpub)
enckey = findKeypairFromSKI(opts, false, ski);
else
enckey = findKeypairFromSKI(opts, true, ski);
if (enckey==null || (enckey!=null && enckey.length==0)) {
String str=String.format("[JC_PKCS]:No Find Key");
RsaImpl.setLoggerErr(str, 6);
throw new JavaChainException(str);
}
CK_ATTRIBUTE[] attributes = new CK_ATTRIBUTE[] {
new CK_ATTRIBUTE(CKA_MODULUS_BITS),
};
opts.getPKCS11().C_GetAttributeValue(opts.getSessionhandle(), enckey[0], attributes);
CK_MECHANISM ckMechanism = new CK_MECHANISM();
ckMechanism.mechanism = mechanism;
opts.getPKCS11().C_EncryptInit(opts.getSessionhandle(), ckMechanism, enckey[0]);
int outlen = (int)attributes[0].getLong()/8;
byte[] out1 = new byte[outlen];
int rv = opts.getPKCS11().C_Encrypt(opts.getSessionhandle(), plaintext, 0, plaintext.length, out1, 0, outlen);
return out1;
}catch(PKCS11Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:PKCS11Exception ErrCode: 0x%08x", ex.getErrorCode());
RsaImpl.setLoggerErr(err, 6);
throw new JavaChainException(err, ex.getCause());
}
}
}
/**
* Use the key decrypt of the specified SKI
*
* @author xuying
* @date 2018/05/20
* @company FEITIAN
*/
public static class DecryptRSAKey{
public DecryptRSAKey() {}
/**
* decrypt data
*
* @param ski cka_id value
* @param ciphertext cipher data
* @param flagpub public flag
* @param mechanism the alg
* @param opts p11factory
* @return plaintext
*/
public static byte[] decryptRSA(byte[] ski, byte[] ciphertext, boolean flagpub, long mechanism, IPKCS11FactoryOpts opts) throws JavaChainException{
try {
long[] deckey;
if (flagpub)
deckey = findKeypairFromSKI(opts, false, ski);
else
deckey = findKeypairFromSKI(opts, true, ski);
if (deckey==null || (deckey!=null && deckey.length==0)) {
String str=String.format("[JC_PKCS]:No Find Key");
RsaImpl.setLoggerErr(str, 7);
throw new JavaChainException(str);
}
int outlen = 512;
CK_MECHANISM ckMechanism = new CK_MECHANISM();
ckMechanism.mechanism = mechanism;
byte[] out = new byte[outlen];
opts.getPKCS11().C_DecryptInit(opts.getSessionhandle(), ckMechanism, deckey[0]);
int len = opts.getPKCS11().C_Decrypt(opts.getSessionhandle(), ciphertext, /*ciphertext.length*/0, ciphertext.length, out, 0, outlen);
byte[] data = new byte[len];
System.arraycopy(out, 0, data, 0, len);
return data;
}catch(PKCS11Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:PKCS11Exception ErrCode: 0x%08x", ex.getErrorCode());
RsaImpl.setLoggerErr(err, 7);
throw new JavaChainException(err, ex.getCause());
}
}
}
/**
* Find the key of the specified SKI
*
*/
private static long[] findKeypairFromSKI(IPKCS11FactoryOpts opts, boolean bPri, byte[] ski) throws JavaChainException{
long keyclass = CKO_PUBLIC_KEY;
if(bPri)
keyclass = CKO_PRIVATE_KEY;
CK_ATTRIBUTE[] template = new CK_ATTRIBUTE[3];
template[0] = new CK_ATTRIBUTE(CKA_CLASS, keyclass);
template[1] = new CK_ATTRIBUTE(CKA_ID, ski);
template[2] = new CK_ATTRIBUTE(CKA_KEY_TYPE, CKK_RSA);
try {
opts.getPKCS11().C_FindObjectsInit(opts.getSessionhandle(), template);
long[] keypair = opts.getPKCS11().C_FindObjects(opts.getSessionhandle(), 1);
opts.getPKCS11().C_FindObjectsFinal(opts.getSessionhandle());
return keypair;
}catch(PKCS11Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:PKCS11Exception ErrCode: 0x%08x", ex.getErrorCode());
setLoggerErr(err, 0);
throw new JavaChainException(err, ex.getCause());
}catch(Exception ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:Exception ErrMessage: %s", ex.getMessage());
setLoggerErr(err, 0);
throw new JavaChainException(err, ex.getCause());
}
}
/**
* get public key der code
*
*/
private static byte[] getPublicDer(BigInteger n, BigInteger e) throws JavaChainException{
try {
RSAPublicKeyImpl rsapublickeyimpl = new RSAPublicKeyImpl(n, e);
return rsapublickeyimpl.getEncoded();
}catch( InvalidKeyException ex){
ex.printStackTrace();
String err = String.format("[JC_PKCS]:InvalidKeyException ErrMessage: %s", ex.getMessage());
setLoggerErr(err, 0);
throw new JavaChainException(err, ex.getCause());
}
}
/**
* get public key hash data
*
*/
private static byte[] getPublicHash(BigInteger n, BigInteger e) throws JavaChainException{
try {
MessageDigest shahash = MessageDigest.getInstance("SHA-1");
byte[] out = getPublicDer(n, e);
shahash.update(out);
return shahash.digest();
}catch(NoSuchAlgorithmException ex) {
ex.printStackTrace();
String err = String.format("[JC_PKCS]:NoSuchAlgorithmException ErrMessage: %s", ex.getMessage());
setLoggerErr(err, 0);
throw new JavaChainException(err, ex.getCause());
}
}
}
|
[
"wangzhe@ftsafe.com"
] |
wangzhe@ftsafe.com
|
3c59d0b046d7259248106713f959017f6fc24886
|
3ef31baa81483ea134cbd8a8b1339ef9fb5ec4a4
|
/src/NeuralNet/NonLinFuncs/Sigmoid.java
|
f31899c54a88cac18c987c3f853b464b66b3bbae
|
[] |
no_license
|
shenkev/JavaNet
|
dace62faede8f916383bf7c900ef38f6c08ab5fa
|
1e555cb5d7d1c7bef4abefcfca38919511dad584
|
refs/heads/master
| 2021-01-11T02:56:08.493383
| 2016-12-08T02:37:40
| 2016-12-08T02:37:40
| 70,879,062
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 415
|
java
|
package NeuralNet.NonLinFuncs;
import NeuralNet.NonLinAndDerivs.SigmoidDerivative;
import NeuralNet.NonLinAndDerivs.SigmoidFunction;
// Outputs from 0 to 1
public class Sigmoid extends NonLinFunction{
public Sigmoid() {
this.fnc = new SigmoidFunction();
this.derivative = new SigmoidDerivative();
}
public static double evaluateSigmoid(double z) {
return ( 1/( 1 + Math.pow( Math.E,(-1*z) ) ) );
}
}
|
[
"tingkekevin@hotmail.com"
] |
tingkekevin@hotmail.com
|
fa158732e8af9611003749124d2b9aa3ab656700
|
70e207ac63da49eddd761a6e3a901e693f4ec480
|
/net.certware.argument.euz.diagram/src/net/certware/argument/euz/diagram/edit/parts/SolutionSolutionCriteriaExternalLabelEditPart.java
|
ee991579e4afcff3e4d33e575ee9d7d695ef7056
|
[
"Apache-2.0"
] |
permissive
|
arindam7development/CertWare
|
43be650539963b1efef4ce4cad164f23185d094b
|
cbbfdb6012229444d3c0d7e64c08ac2a15081518
|
refs/heads/master
| 2020-05-29T11:38:08.794116
| 2016-03-29T13:56:37
| 2016-03-29T13:56:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 14,803
|
java
|
/*
* Copyright (c) 2010 National Aeronautics and Space Administration. All rights reserved.
*/
package net.certware.argument.euz.diagram.edit.parts;
import java.util.Collections;
import java.util.List;
import net.certware.argument.euz.diagram.edit.policies.EuzTextSelectionEditPolicy;
import net.certware.argument.euz.diagram.part.EuzVisualIDRegistry;
import net.certware.argument.euz.diagram.providers.EuzElementTypes;
import net.certware.argument.euz.diagram.providers.EuzParserProvider;
import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RunnableWithResult;
import org.eclipse.gef.AccessibleEditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.DirectEditRequest;
import org.eclipse.gef.tools.DirectEditManager;
import org.eclipse.gmf.runtime.common.ui.services.parser.CommonParserHint;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
/**
* @generated
*/
public class SolutionSolutionCriteriaExternalLabelEditPart extends
LabelEditPart implements ITextAwareEditPart {
/**
* @generated
*/
public static final int VISUAL_ID = 6016;
/**
* @generated
*/
private DirectEditManager manager;
/**
* @generated
*/
private IParser parser;
/**
* @generated
*/
private List<?> parserElements;
/**
* @generated
*/
private String defaultText;
/**
* @generated
*/
static {
registerSnapBackPosition(
EuzVisualIDRegistry
.getType(net.certware.argument.euz.diagram.edit.parts.SolutionSolutionCriteriaExternalLabelEditPart.VISUAL_ID),
new Point(0, 40));
}
/**
* @generated
*/
public SolutionSolutionCriteriaExternalLabelEditPart(View view) {
super(view);
}
/**
* @generated
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,
new EuzTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
new ArgumentDiagramEditPart.LinkLabelDragPolicy());
}
/**
* @generated
*/
public int getKeyPoint() {
return ConnectionLocator.MIDDLE;
}
/**
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
if (figure instanceof WrappingLabel) {
return ((WrappingLabel) figure).getText();
} else {
return ((Label) figure).getText();
}
}
/**
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
if (figure instanceof WrappingLabel) {
((WrappingLabel) figure).setText(text);
} else {
((Label) figure).setText(text);
}
}
/**
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
if (figure instanceof WrappingLabel) {
return ((WrappingLabel) figure).getIcon();
} else {
return ((Label) figure).getIcon();
}
}
/**
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
if (figure instanceof WrappingLabel) {
((WrappingLabel) figure).setIcon(icon);
} else {
((Label) figure).setIcon(icon);
}
}
/**
* @generated
*/
public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
registerVisuals();
refreshVisuals();
}
/**
* @generated
*/
@SuppressWarnings("rawtypes")
protected List getModelChildren() {
return Collections.EMPTY_LIST;
}
/**
* @generated
*/
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
/**
* @generated
*/
protected EObject getParserElement() {
return (View) getModel();
}
/**
* @generated
*/
protected Image getLabelIcon() {
return null;
}
/**
* @generated
*/
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
if (parserElement != null && getParser() != null) {
text = getParser().getPrintString(
new EObjectAdapter(parserElement),
getParserOptions().intValue());
}
if (text == null || text.length() == 0) {
text = defaultText;
}
return text;
}
/**
* @generated
*/
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof EuzTextSelectionEditPolicy) {
((EuzTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
if (sfEditPolicy instanceof EuzTextSelectionEditPolicy) {
((EuzTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
public String getEditText() {
if (getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
return getParser().getEditString(
new EObjectAdapter(getParserElement()),
getParserOptions().intValue());
}
/**
* @generated
*/
protected boolean isEditable() {
return false;
}
/**
* @generated
*/
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
public String isValid(final Object value) {
if (value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
.runExclusive(
new RunnableWithResult.Impl<IParserEditStatus>() {
public void run() {
setResult(parser
.isValidEditString(
new EObjectAdapter(
element),
(String) value));
}
});
return valid.getCode() == ParserEditStatus.EDITABLE ? null
: valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
// shouldn't get here
return null;
}
};
}
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor() {
if (getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(
new EObjectAdapter(getParserElement()));
}
/**
* @generated
*/
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
/**
* @generated
*/
public IParser getParser() {
if (parser == null) {
parser = EuzParserProvider.getParser(
EuzElementTypes.SolutionSolutionCriteria_4016,
getParserElement(), CommonParserHint.DESCRIPTION);
}
return parser;
}
/**
* @generated
*/
protected DirectEditManager getManager() {
if (manager == null) {
setManager(new TextDirectEditManager(this,
TextDirectEditManager.getTextCellEditorClass(this),
EuzEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
/**
* @generated
*/
protected void setManager(DirectEditManager manager) {
this.manager = manager;
}
/**
* @generated
*/
protected void performDirectEdit() {
getManager().show();
}
/**
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
if (getManager().getClass() == TextDirectEditManager.class) {
((TextDirectEditManager) getManager()).show(eventLocation
.getSWTPoint());
}
}
/**
* @generated
*/
private void performDirectEdit(char initialCharacter) {
if (getManager() instanceof TextDirectEditManager) {
((TextDirectEditManager) getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
}
/**
* @generated
*/
protected void performDirectEditRequest(Request request) {
final Request theRequest = request;
try {
getEditingDomain().runExclusive(new Runnable() {
public void run() {
if (isActive() && isEditable()) {
if (theRequest
.getExtendedData()
.get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) theRequest
.getExtendedData()
.get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
} else if ((theRequest instanceof DirectEditRequest)
&& (getEditText().equals(getLabelText()))) {
DirectEditRequest editRequest = (DirectEditRequest) theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
}
}
}
});
} catch (InterruptedException e) {
e.printStackTrace();
}
}
/**
* @generated
*/
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
refreshFont();
refreshFontColor();
refreshUnderline();
refreshStrikeThrough();
}
/**
* @generated
*/
protected void refreshLabel() {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof EuzTextSelectionEditPolicy) {
((EuzTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
if (sfEditPolicy instanceof EuzTextSelectionEditPolicy) {
((EuzTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
protected void refreshUnderline() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
}
/**
* @generated
*/
protected void refreshStrikeThrough() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style
.isStrikeThrough());
}
}
/**
* @generated
*/
protected void refreshFont() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(style.getFontName(),
style.getFontHeight(), (style.isBold() ? SWT.BOLD
: SWT.NORMAL)
| (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
/**
* @generated
*/
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
/**
* @generated
*/
protected void addSemanticListeners() {
if (getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
parserElements = ((ISemanticParser) getParser())
.getSemanticElementsBeingParsed(element);
for (int i = 0; i < parserElements.size(); i++) {
addListenerFilter(
"SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
}
}
/**
* @generated
*/
protected void removeSemanticListeners() {
if (parserElements != null) {
for (int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
super.removeSemanticListeners();
}
}
/**
* @generated
*/
protected AccessibleEditPart getAccessibleEditPart() {
if (accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
public void getName(AccessibleEvent e) {
e.result = getLabelTextHelper(getFigure());
}
};
}
return accessibleEP;
}
/**
* @generated
*/
private View getFontStyleOwnerView() {
return getPrimaryView();
}
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
Integer c = (Integer) event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(
feature)) {
refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough()
.equals(feature)) {
refreshStrikeThrough();
} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(
feature)
|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(
feature)
|| NotationPackage.eINSTANCE.getFontStyle_Bold()
.equals(feature)
|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(
feature)) {
refreshFont();
} else {
if (getParser() != null
&& getParser().isAffectingEvent(event,
getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
super.handleNotificationEvent(event);
}
/**
* @generated
*/
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
return label;
}
/**
* @generated
*/
protected IFigure createFigurePrim() {
return new WrappingLabel();
}
}
|
[
"mrb@softisms.com"
] |
mrb@softisms.com
|
46432034a05a0c9ad4e5651b407bc6073395548b
|
a6fcda70b3e34c8676eb736fbb6bffe732a26af7
|
/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/com/facebook/R.java
|
a2d990ec6509cf9284311e6a47f67a72869cca13
|
[] |
no_license
|
nadongjun/mr_final
|
a1773a55636c1ca11a83f498d95797c5eba4019c
|
ecbbbcc933a84b8777bcc3b57d47bfaaf6c94b83
|
refs/heads/master
| 2020-11-24T12:21:26.497475
| 2019-12-15T06:41:51
| 2019-12-15T06:41:51
| 228,140,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 131,905
|
java
|
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package com.facebook;
public final class R {
private R() {}
public static final class anim {
private anim() {}
public static final int abc_fade_in = 0x7f010000;
public static final int abc_fade_out = 0x7f010001;
public static final int abc_grow_fade_in_from_bottom = 0x7f010002;
public static final int abc_popup_enter = 0x7f010003;
public static final int abc_popup_exit = 0x7f010004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f010005;
public static final int abc_slide_in_bottom = 0x7f010006;
public static final int abc_slide_in_top = 0x7f010007;
public static final int abc_slide_out_bottom = 0x7f010008;
public static final int abc_slide_out_top = 0x7f010009;
}
public static final class attr {
private attr() {}
public static final int actionBarDivider = 0x7f030000;
public static final int actionBarItemBackground = 0x7f030001;
public static final int actionBarPopupTheme = 0x7f030002;
public static final int actionBarSize = 0x7f030003;
public static final int actionBarSplitStyle = 0x7f030004;
public static final int actionBarStyle = 0x7f030005;
public static final int actionBarTabBarStyle = 0x7f030006;
public static final int actionBarTabStyle = 0x7f030007;
public static final int actionBarTabTextStyle = 0x7f030008;
public static final int actionBarTheme = 0x7f030009;
public static final int actionBarWidgetTheme = 0x7f03000a;
public static final int actionButtonStyle = 0x7f03000b;
public static final int actionDropDownStyle = 0x7f03000c;
public static final int actionLayout = 0x7f03000d;
public static final int actionMenuTextAppearance = 0x7f03000e;
public static final int actionMenuTextColor = 0x7f03000f;
public static final int actionModeBackground = 0x7f030010;
public static final int actionModeCloseButtonStyle = 0x7f030011;
public static final int actionModeCloseDrawable = 0x7f030012;
public static final int actionModeCopyDrawable = 0x7f030013;
public static final int actionModeCutDrawable = 0x7f030014;
public static final int actionModeFindDrawable = 0x7f030015;
public static final int actionModePasteDrawable = 0x7f030016;
public static final int actionModePopupWindowStyle = 0x7f030017;
public static final int actionModeSelectAllDrawable = 0x7f030018;
public static final int actionModeShareDrawable = 0x7f030019;
public static final int actionModeSplitBackground = 0x7f03001a;
public static final int actionModeStyle = 0x7f03001b;
public static final int actionModeWebSearchDrawable = 0x7f03001c;
public static final int actionOverflowButtonStyle = 0x7f03001d;
public static final int actionOverflowMenuStyle = 0x7f03001e;
public static final int actionProviderClass = 0x7f03001f;
public static final int actionViewClass = 0x7f030020;
public static final int activityChooserViewStyle = 0x7f030021;
public static final int alertDialogButtonGroupStyle = 0x7f030022;
public static final int alertDialogCenterButtons = 0x7f030023;
public static final int alertDialogStyle = 0x7f030024;
public static final int alertDialogTheme = 0x7f030025;
public static final int allowStacking = 0x7f030026;
public static final int alpha = 0x7f030027;
public static final int alphabeticModifiers = 0x7f030028;
public static final int arrowHeadLength = 0x7f030029;
public static final int arrowShaftLength = 0x7f03002a;
public static final int autoCompleteTextViewStyle = 0x7f03002b;
public static final int autoSizeMaxTextSize = 0x7f03002c;
public static final int autoSizeMinTextSize = 0x7f03002d;
public static final int autoSizePresetSizes = 0x7f03002e;
public static final int autoSizeStepGranularity = 0x7f03002f;
public static final int autoSizeTextType = 0x7f030030;
public static final int background = 0x7f030031;
public static final int backgroundSplit = 0x7f030032;
public static final int backgroundStacked = 0x7f030033;
public static final int backgroundTint = 0x7f030034;
public static final int backgroundTintMode = 0x7f030035;
public static final int barLength = 0x7f030036;
public static final int borderlessButtonStyle = 0x7f030040;
public static final int buttonBarButtonStyle = 0x7f03004e;
public static final int buttonBarNegativeButtonStyle = 0x7f03004f;
public static final int buttonBarNeutralButtonStyle = 0x7f030050;
public static final int buttonBarPositiveButtonStyle = 0x7f030051;
public static final int buttonBarStyle = 0x7f030052;
public static final int buttonGravity = 0x7f030053;
public static final int buttonPanelSideLayout = 0x7f030055;
public static final int buttonStyle = 0x7f030057;
public static final int buttonStyleSmall = 0x7f030058;
public static final int buttonTint = 0x7f030059;
public static final int buttonTintMode = 0x7f03005a;
public static final int cardBackgroundColor = 0x7f03005b;
public static final int cardCornerRadius = 0x7f03005c;
public static final int cardElevation = 0x7f03005d;
public static final int cardMaxElevation = 0x7f03005e;
public static final int cardPreventCornerOverlap = 0x7f03005f;
public static final int cardUseCompatPadding = 0x7f030060;
public static final int checkboxStyle = 0x7f030063;
public static final int checkedTextViewStyle = 0x7f030068;
public static final int closeIcon = 0x7f03007c;
public static final int closeItemLayout = 0x7f030083;
public static final int collapseContentDescription = 0x7f030084;
public static final int collapseIcon = 0x7f030085;
public static final int color = 0x7f030088;
public static final int colorAccent = 0x7f030089;
public static final int colorBackgroundFloating = 0x7f03008a;
public static final int colorButtonNormal = 0x7f03008b;
public static final int colorControlActivated = 0x7f03008c;
public static final int colorControlHighlight = 0x7f03008d;
public static final int colorControlNormal = 0x7f03008e;
public static final int colorError = 0x7f03008f;
public static final int colorPrimary = 0x7f030090;
public static final int colorPrimaryDark = 0x7f030091;
public static final int colorSwitchThumbNormal = 0x7f030094;
public static final int com_facebook_auxiliary_view_position = 0x7f030095;
public static final int com_facebook_confirm_logout = 0x7f030096;
public static final int com_facebook_foreground_color = 0x7f030097;
public static final int com_facebook_horizontal_alignment = 0x7f030098;
public static final int com_facebook_is_cropped = 0x7f030099;
public static final int com_facebook_login_text = 0x7f03009a;
public static final int com_facebook_logout_text = 0x7f03009b;
public static final int com_facebook_object_id = 0x7f03009c;
public static final int com_facebook_object_type = 0x7f03009d;
public static final int com_facebook_preset_size = 0x7f03009e;
public static final int com_facebook_style = 0x7f03009f;
public static final int com_facebook_tooltip_mode = 0x7f0300a0;
public static final int commitIcon = 0x7f0300a1;
public static final int contentDescription = 0x7f0300a5;
public static final int contentInsetEnd = 0x7f0300a6;
public static final int contentInsetEndWithActions = 0x7f0300a7;
public static final int contentInsetLeft = 0x7f0300a8;
public static final int contentInsetRight = 0x7f0300a9;
public static final int contentInsetStart = 0x7f0300aa;
public static final int contentInsetStartWithNavigation = 0x7f0300ab;
public static final int contentPadding = 0x7f0300ac;
public static final int contentPaddingBottom = 0x7f0300ad;
public static final int contentPaddingLeft = 0x7f0300ae;
public static final int contentPaddingRight = 0x7f0300af;
public static final int contentPaddingTop = 0x7f0300b0;
public static final int controlBackground = 0x7f0300b2;
public static final int customNavigationLayout = 0x7f0300b9;
public static final int defaultQueryHint = 0x7f0300ba;
public static final int dialogPreferredPadding = 0x7f0300bc;
public static final int dialogTheme = 0x7f0300bd;
public static final int displayOptions = 0x7f0300be;
public static final int divider = 0x7f0300bf;
public static final int dividerHorizontal = 0x7f0300c0;
public static final int dividerPadding = 0x7f0300c1;
public static final int dividerVertical = 0x7f0300c2;
public static final int drawableSize = 0x7f0300c3;
public static final int drawerArrowStyle = 0x7f0300c4;
public static final int dropDownListViewStyle = 0x7f0300c5;
public static final int dropdownListPreferredItemHeight = 0x7f0300c6;
public static final int editTextBackground = 0x7f0300c7;
public static final int editTextColor = 0x7f0300c8;
public static final int editTextStyle = 0x7f0300c9;
public static final int elevation = 0x7f0300ca;
public static final int expandActivityOverflowButtonDrawable = 0x7f0300d0;
public static final int font = 0x7f0300e6;
public static final int fontFamily = 0x7f0300e7;
public static final int fontProviderAuthority = 0x7f0300e8;
public static final int fontProviderCerts = 0x7f0300e9;
public static final int fontProviderFetchStrategy = 0x7f0300ea;
public static final int fontProviderFetchTimeout = 0x7f0300eb;
public static final int fontProviderPackage = 0x7f0300ec;
public static final int fontProviderQuery = 0x7f0300ed;
public static final int fontStyle = 0x7f0300ee;
public static final int fontWeight = 0x7f0300f0;
public static final int gapBetweenBars = 0x7f0300f2;
public static final int goIcon = 0x7f0300f3;
public static final int height = 0x7f0300f5;
public static final int hideOnContentScroll = 0x7f0300fa;
public static final int homeAsUpIndicator = 0x7f0300ff;
public static final int homeLayout = 0x7f030100;
public static final int icon = 0x7f030102;
public static final int iconTint = 0x7f030108;
public static final int iconTintMode = 0x7f030109;
public static final int iconifiedByDefault = 0x7f03010a;
public static final int imageButtonStyle = 0x7f03010d;
public static final int indeterminateProgressStyle = 0x7f03010e;
public static final int initialActivityCount = 0x7f03010f;
public static final int isLightTheme = 0x7f030111;
public static final int itemPadding = 0x7f030118;
public static final int layout = 0x7f030121;
public static final int listChoiceBackgroundIndicator = 0x7f030162;
public static final int listDividerAlertDialog = 0x7f030163;
public static final int listItemLayout = 0x7f030164;
public static final int listLayout = 0x7f030165;
public static final int listMenuViewStyle = 0x7f030166;
public static final int listPopupWindowStyle = 0x7f030167;
public static final int listPreferredItemHeight = 0x7f030168;
public static final int listPreferredItemHeightLarge = 0x7f030169;
public static final int listPreferredItemHeightSmall = 0x7f03016a;
public static final int listPreferredItemPaddingLeft = 0x7f03016b;
public static final int listPreferredItemPaddingRight = 0x7f03016c;
public static final int logo = 0x7f03016d;
public static final int logoDescription = 0x7f03016e;
public static final int maxButtonHeight = 0x7f030172;
public static final int measureWithLargestChild = 0x7f030174;
public static final int multiChoiceItemLayout = 0x7f030176;
public static final int navigationContentDescription = 0x7f030177;
public static final int navigationIcon = 0x7f030178;
public static final int navigationMode = 0x7f030179;
public static final int numericModifiers = 0x7f03017b;
public static final int overlapAnchor = 0x7f03017c;
public static final int paddingBottomNoButtons = 0x7f03017d;
public static final int paddingEnd = 0x7f03017e;
public static final int paddingStart = 0x7f03017f;
public static final int paddingTopNoTitle = 0x7f030180;
public static final int panelBackground = 0x7f030181;
public static final int panelMenuListTheme = 0x7f030182;
public static final int panelMenuListWidth = 0x7f030183;
public static final int popupMenuStyle = 0x7f030189;
public static final int popupTheme = 0x7f03018a;
public static final int popupWindowStyle = 0x7f03018b;
public static final int preserveIconSpacing = 0x7f03018c;
public static final int progressBarPadding = 0x7f03018e;
public static final int progressBarStyle = 0x7f03018f;
public static final int queryBackground = 0x7f030190;
public static final int queryHint = 0x7f030191;
public static final int radioButtonStyle = 0x7f030192;
public static final int ratingBarStyle = 0x7f030193;
public static final int ratingBarStyleIndicator = 0x7f030194;
public static final int ratingBarStyleSmall = 0x7f030195;
public static final int searchHintIcon = 0x7f03019c;
public static final int searchIcon = 0x7f03019d;
public static final int searchViewStyle = 0x7f03019e;
public static final int seekBarStyle = 0x7f03019f;
public static final int selectableItemBackground = 0x7f0301a0;
public static final int selectableItemBackgroundBorderless = 0x7f0301a1;
public static final int showAsAction = 0x7f0301a2;
public static final int showDividers = 0x7f0301a3;
public static final int showText = 0x7f0301a5;
public static final int showTitle = 0x7f0301a6;
public static final int singleChoiceItemLayout = 0x7f0301a7;
public static final int spinBars = 0x7f0301ad;
public static final int spinnerDropDownItemStyle = 0x7f0301ae;
public static final int spinnerStyle = 0x7f0301af;
public static final int splitTrack = 0x7f0301b0;
public static final int srcCompat = 0x7f0301b1;
public static final int state_above_anchor = 0x7f0301b3;
public static final int subMenuArrow = 0x7f0301bc;
public static final int submitBackground = 0x7f0301bd;
public static final int subtitle = 0x7f0301be;
public static final int subtitleTextAppearance = 0x7f0301bf;
public static final int subtitleTextColor = 0x7f0301c0;
public static final int subtitleTextStyle = 0x7f0301c1;
public static final int suggestionRowLayout = 0x7f0301c2;
public static final int switchMinWidth = 0x7f0301c3;
public static final int switchPadding = 0x7f0301c4;
public static final int switchStyle = 0x7f0301c5;
public static final int switchTextAppearance = 0x7f0301c6;
public static final int textAllCaps = 0x7f0301e1;
public static final int textAppearanceLargePopupMenu = 0x7f0301ec;
public static final int textAppearanceListItem = 0x7f0301ed;
public static final int textAppearanceListItemSecondary = 0x7f0301ee;
public static final int textAppearanceListItemSmall = 0x7f0301ef;
public static final int textAppearancePopupMenuHeader = 0x7f0301f1;
public static final int textAppearanceSearchResultSubtitle = 0x7f0301f2;
public static final int textAppearanceSearchResultTitle = 0x7f0301f3;
public static final int textAppearanceSmallPopupMenu = 0x7f0301f4;
public static final int textColorAlertDialogListItem = 0x7f0301f7;
public static final int textColorSearchUrl = 0x7f0301f8;
public static final int theme = 0x7f0301fc;
public static final int thickness = 0x7f0301fd;
public static final int thumbTextPadding = 0x7f0301fe;
public static final int thumbTint = 0x7f0301ff;
public static final int thumbTintMode = 0x7f030200;
public static final int tickMark = 0x7f030201;
public static final int tickMarkTint = 0x7f030202;
public static final int tickMarkTintMode = 0x7f030203;
public static final int tint = 0x7f030204;
public static final int tintMode = 0x7f030205;
public static final int title = 0x7f030206;
public static final int titleMargin = 0x7f030208;
public static final int titleMarginBottom = 0x7f030209;
public static final int titleMarginEnd = 0x7f03020a;
public static final int titleMarginStart = 0x7f03020b;
public static final int titleMarginTop = 0x7f03020c;
public static final int titleMargins = 0x7f03020d;
public static final int titleTextAppearance = 0x7f03020e;
public static final int titleTextColor = 0x7f03020f;
public static final int titleTextStyle = 0x7f030210;
public static final int toolbarNavigationButtonStyle = 0x7f030212;
public static final int toolbarStyle = 0x7f030213;
public static final int tooltipForegroundColor = 0x7f030214;
public static final int tooltipFrameBackground = 0x7f030215;
public static final int tooltipText = 0x7f030216;
public static final int track = 0x7f030217;
public static final int trackTint = 0x7f030218;
public static final int trackTintMode = 0x7f030219;
public static final int voiceIcon = 0x7f03021d;
public static final int windowActionBar = 0x7f03021e;
public static final int windowActionBarOverlay = 0x7f03021f;
public static final int windowActionModeOverlay = 0x7f030220;
public static final int windowFixedHeightMajor = 0x7f030221;
public static final int windowFixedHeightMinor = 0x7f030222;
public static final int windowFixedWidthMajor = 0x7f030223;
public static final int windowFixedWidthMinor = 0x7f030224;
public static final int windowMinWidthMajor = 0x7f030225;
public static final int windowMinWidthMinor = 0x7f030226;
public static final int windowNoTitle = 0x7f030227;
}
public static final class bool {
private bool() {}
public static final int abc_action_bar_embed_tabs = 0x7f040000;
public static final int abc_allow_stacked_button_bar = 0x7f040001;
public static final int abc_config_actionMenuItemAllCaps = 0x7f040002;
}
public static final class color {
private color() {}
public static final int abc_background_cache_hint_selector_material_dark = 0x7f050000;
public static final int abc_background_cache_hint_selector_material_light = 0x7f050001;
public static final int abc_btn_colored_borderless_text_material = 0x7f050002;
public static final int abc_btn_colored_text_material = 0x7f050003;
public static final int abc_color_highlight_material = 0x7f050004;
public static final int abc_hint_foreground_material_dark = 0x7f050005;
public static final int abc_hint_foreground_material_light = 0x7f050006;
public static final int abc_input_method_navigation_guard = 0x7f050007;
public static final int abc_primary_text_disable_only_material_dark = 0x7f050008;
public static final int abc_primary_text_disable_only_material_light = 0x7f050009;
public static final int abc_primary_text_material_dark = 0x7f05000a;
public static final int abc_primary_text_material_light = 0x7f05000b;
public static final int abc_search_url_text = 0x7f05000c;
public static final int abc_search_url_text_normal = 0x7f05000d;
public static final int abc_search_url_text_pressed = 0x7f05000e;
public static final int abc_search_url_text_selected = 0x7f05000f;
public static final int abc_secondary_text_material_dark = 0x7f050010;
public static final int abc_secondary_text_material_light = 0x7f050011;
public static final int abc_tint_btn_checkable = 0x7f050012;
public static final int abc_tint_default = 0x7f050013;
public static final int abc_tint_edittext = 0x7f050014;
public static final int abc_tint_seek_thumb = 0x7f050015;
public static final int abc_tint_spinner = 0x7f050016;
public static final int abc_tint_switch_track = 0x7f050017;
public static final int accent_material_dark = 0x7f050018;
public static final int accent_material_light = 0x7f050019;
public static final int background_floating_material_dark = 0x7f05001a;
public static final int background_floating_material_light = 0x7f05001b;
public static final int background_material_dark = 0x7f05001c;
public static final int background_material_light = 0x7f05001d;
public static final int bright_foreground_disabled_material_dark = 0x7f05001e;
public static final int bright_foreground_disabled_material_light = 0x7f05001f;
public static final int bright_foreground_inverse_material_dark = 0x7f050020;
public static final int bright_foreground_inverse_material_light = 0x7f050021;
public static final int bright_foreground_material_dark = 0x7f050022;
public static final int bright_foreground_material_light = 0x7f050023;
public static final int button_material_dark = 0x7f050028;
public static final int button_material_light = 0x7f050029;
public static final int cardview_dark_background = 0x7f05002a;
public static final int cardview_light_background = 0x7f05002b;
public static final int cardview_shadow_end_color = 0x7f05002c;
public static final int cardview_shadow_start_color = 0x7f05002d;
public static final int com_facebook_blue = 0x7f050039;
public static final int com_facebook_button_background_color = 0x7f05003a;
public static final int com_facebook_button_background_color_disabled = 0x7f05003b;
public static final int com_facebook_button_background_color_focused = 0x7f05003c;
public static final int com_facebook_button_background_color_focused_disabled = 0x7f05003d;
public static final int com_facebook_button_background_color_pressed = 0x7f05003e;
public static final int com_facebook_button_background_color_selected = 0x7f05003f;
public static final int com_facebook_button_border_color_focused = 0x7f050040;
public static final int com_facebook_button_login_background_color = 0x7f050041;
public static final int com_facebook_button_login_silver_background_color = 0x7f050042;
public static final int com_facebook_button_login_silver_background_color_pressed = 0x7f050043;
public static final int com_facebook_button_send_background_color = 0x7f050044;
public static final int com_facebook_button_send_background_color_pressed = 0x7f050045;
public static final int com_facebook_button_text_color = 0x7f050046;
public static final int com_facebook_device_auth_text = 0x7f050047;
public static final int com_facebook_likeboxcountview_border_color = 0x7f050048;
public static final int com_facebook_likeboxcountview_text_color = 0x7f050049;
public static final int com_facebook_likeview_text_color = 0x7f05004a;
public static final int com_facebook_messenger_blue = 0x7f05004b;
public static final int com_facebook_send_button_text_color = 0x7f05004c;
public static final int com_smart_login_code = 0x7f05004d;
public static final int dim_foreground_disabled_material_dark = 0x7f050066;
public static final int dim_foreground_disabled_material_light = 0x7f050067;
public static final int dim_foreground_material_dark = 0x7f050068;
public static final int dim_foreground_material_light = 0x7f050069;
public static final int foreground_material_dark = 0x7f05006c;
public static final int foreground_material_light = 0x7f05006d;
public static final int highlighted_text_material_dark = 0x7f05006e;
public static final int highlighted_text_material_light = 0x7f05006f;
public static final int material_blue_grey_800 = 0x7f050070;
public static final int material_blue_grey_900 = 0x7f050071;
public static final int material_blue_grey_950 = 0x7f050072;
public static final int material_deep_teal_200 = 0x7f050073;
public static final int material_deep_teal_500 = 0x7f050074;
public static final int material_grey_100 = 0x7f050075;
public static final int material_grey_300 = 0x7f050076;
public static final int material_grey_50 = 0x7f050077;
public static final int material_grey_600 = 0x7f050078;
public static final int material_grey_800 = 0x7f050079;
public static final int material_grey_850 = 0x7f05007a;
public static final int material_grey_900 = 0x7f05007b;
public static final int notification_action_color_filter = 0x7f050096;
public static final int notification_icon_bg_color = 0x7f050097;
public static final int notification_material_background_media_default_color = 0x7f050098;
public static final int primary_dark_material_dark = 0x7f050099;
public static final int primary_dark_material_light = 0x7f05009a;
public static final int primary_material_dark = 0x7f05009b;
public static final int primary_material_light = 0x7f05009c;
public static final int primary_text_default_material_dark = 0x7f05009d;
public static final int primary_text_default_material_light = 0x7f05009e;
public static final int primary_text_disabled_material_dark = 0x7f05009f;
public static final int primary_text_disabled_material_light = 0x7f0500a0;
public static final int ripple_material_dark = 0x7f0500a1;
public static final int ripple_material_light = 0x7f0500a2;
public static final int secondary_text_default_material_dark = 0x7f0500a3;
public static final int secondary_text_default_material_light = 0x7f0500a4;
public static final int secondary_text_disabled_material_dark = 0x7f0500a5;
public static final int secondary_text_disabled_material_light = 0x7f0500a6;
public static final int switch_thumb_disabled_material_dark = 0x7f0500a7;
public static final int switch_thumb_disabled_material_light = 0x7f0500a8;
public static final int switch_thumb_material_dark = 0x7f0500a9;
public static final int switch_thumb_material_light = 0x7f0500aa;
public static final int switch_thumb_normal_material_dark = 0x7f0500ab;
public static final int switch_thumb_normal_material_light = 0x7f0500ac;
public static final int tooltip_background_dark = 0x7f0500ad;
public static final int tooltip_background_light = 0x7f0500ae;
}
public static final class dimen {
private dimen() {}
public static final int abc_action_bar_content_inset_material = 0x7f060000;
public static final int abc_action_bar_content_inset_with_nav = 0x7f060001;
public static final int abc_action_bar_default_height_material = 0x7f060002;
public static final int abc_action_bar_default_padding_end_material = 0x7f060003;
public static final int abc_action_bar_default_padding_start_material = 0x7f060004;
public static final int abc_action_bar_elevation_material = 0x7f060005;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f060006;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f060007;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f060008;
public static final int abc_action_bar_stacked_max_height = 0x7f060009;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f06000a;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f06000b;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f06000c;
public static final int abc_action_button_min_height_material = 0x7f06000d;
public static final int abc_action_button_min_width_material = 0x7f06000e;
public static final int abc_action_button_min_width_overflow_material = 0x7f06000f;
public static final int abc_alert_dialog_button_bar_height = 0x7f060010;
public static final int abc_button_inset_horizontal_material = 0x7f060012;
public static final int abc_button_inset_vertical_material = 0x7f060013;
public static final int abc_button_padding_horizontal_material = 0x7f060014;
public static final int abc_button_padding_vertical_material = 0x7f060015;
public static final int abc_cascading_menus_min_smallest_width = 0x7f060016;
public static final int abc_config_prefDialogWidth = 0x7f060017;
public static final int abc_control_corner_material = 0x7f060018;
public static final int abc_control_inset_material = 0x7f060019;
public static final int abc_control_padding_material = 0x7f06001a;
public static final int abc_dialog_fixed_height_major = 0x7f06001c;
public static final int abc_dialog_fixed_height_minor = 0x7f06001d;
public static final int abc_dialog_fixed_width_major = 0x7f06001e;
public static final int abc_dialog_fixed_width_minor = 0x7f06001f;
public static final int abc_dialog_list_padding_bottom_no_buttons = 0x7f060020;
public static final int abc_dialog_list_padding_top_no_title = 0x7f060021;
public static final int abc_dialog_min_width_major = 0x7f060022;
public static final int abc_dialog_min_width_minor = 0x7f060023;
public static final int abc_dialog_padding_material = 0x7f060024;
public static final int abc_dialog_padding_top_material = 0x7f060025;
public static final int abc_dialog_title_divider_material = 0x7f060026;
public static final int abc_disabled_alpha_material_dark = 0x7f060027;
public static final int abc_disabled_alpha_material_light = 0x7f060028;
public static final int abc_dropdownitem_icon_width = 0x7f060029;
public static final int abc_dropdownitem_text_padding_left = 0x7f06002a;
public static final int abc_dropdownitem_text_padding_right = 0x7f06002b;
public static final int abc_edit_text_inset_bottom_material = 0x7f06002c;
public static final int abc_edit_text_inset_horizontal_material = 0x7f06002d;
public static final int abc_edit_text_inset_top_material = 0x7f06002e;
public static final int abc_floating_window_z = 0x7f06002f;
public static final int abc_list_item_padding_horizontal_material = 0x7f060030;
public static final int abc_panel_menu_list_width = 0x7f060031;
public static final int abc_progress_bar_height_material = 0x7f060032;
public static final int abc_search_view_preferred_height = 0x7f060033;
public static final int abc_search_view_preferred_width = 0x7f060034;
public static final int abc_seekbar_track_background_height_material = 0x7f060035;
public static final int abc_seekbar_track_progress_height_material = 0x7f060036;
public static final int abc_select_dialog_padding_start_material = 0x7f060037;
public static final int abc_switch_padding = 0x7f060038;
public static final int abc_text_size_body_1_material = 0x7f060039;
public static final int abc_text_size_body_2_material = 0x7f06003a;
public static final int abc_text_size_button_material = 0x7f06003b;
public static final int abc_text_size_caption_material = 0x7f06003c;
public static final int abc_text_size_display_1_material = 0x7f06003d;
public static final int abc_text_size_display_2_material = 0x7f06003e;
public static final int abc_text_size_display_3_material = 0x7f06003f;
public static final int abc_text_size_display_4_material = 0x7f060040;
public static final int abc_text_size_headline_material = 0x7f060041;
public static final int abc_text_size_large_material = 0x7f060042;
public static final int abc_text_size_medium_material = 0x7f060043;
public static final int abc_text_size_menu_header_material = 0x7f060044;
public static final int abc_text_size_menu_material = 0x7f060045;
public static final int abc_text_size_small_material = 0x7f060046;
public static final int abc_text_size_subhead_material = 0x7f060047;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f060048;
public static final int abc_text_size_title_material = 0x7f060049;
public static final int abc_text_size_title_material_toolbar = 0x7f06004a;
public static final int cardview_compat_inset_shadow = 0x7f06004d;
public static final int cardview_default_elevation = 0x7f06004e;
public static final int cardview_default_radius = 0x7f06004f;
public static final int com_facebook_auth_dialog_corner_radius = 0x7f060050;
public static final int com_facebook_auth_dialog_corner_radius_oversized = 0x7f060051;
public static final int com_facebook_button_corner_radius = 0x7f060052;
public static final int com_facebook_button_login_corner_radius = 0x7f060053;
public static final int com_facebook_likeboxcountview_border_radius = 0x7f060054;
public static final int com_facebook_likeboxcountview_border_width = 0x7f060055;
public static final int com_facebook_likeboxcountview_caret_height = 0x7f060056;
public static final int com_facebook_likeboxcountview_caret_width = 0x7f060057;
public static final int com_facebook_likeboxcountview_text_padding = 0x7f060058;
public static final int com_facebook_likeboxcountview_text_size = 0x7f060059;
public static final int com_facebook_likeview_edge_padding = 0x7f06005a;
public static final int com_facebook_likeview_internal_padding = 0x7f06005b;
public static final int com_facebook_likeview_text_size = 0x7f06005c;
public static final int com_facebook_profilepictureview_preset_size_large = 0x7f06005d;
public static final int com_facebook_profilepictureview_preset_size_normal = 0x7f06005e;
public static final int com_facebook_profilepictureview_preset_size_small = 0x7f06005f;
public static final int compat_button_inset_horizontal_material = 0x7f060060;
public static final int compat_button_inset_vertical_material = 0x7f060061;
public static final int compat_button_padding_horizontal_material = 0x7f060062;
public static final int compat_button_padding_vertical_material = 0x7f060063;
public static final int compat_control_corner_material = 0x7f060064;
public static final int disabled_alpha_material_dark = 0x7f060093;
public static final int disabled_alpha_material_light = 0x7f060094;
public static final int highlight_alpha_material_colored = 0x7f060098;
public static final int highlight_alpha_material_dark = 0x7f060099;
public static final int highlight_alpha_material_light = 0x7f06009a;
public static final int hint_alpha_material_dark = 0x7f06009b;
public static final int hint_alpha_material_light = 0x7f06009c;
public static final int hint_pressed_alpha_material_dark = 0x7f06009d;
public static final int hint_pressed_alpha_material_light = 0x7f06009e;
public static final int notification_action_icon_size = 0x7f0600d2;
public static final int notification_action_text_size = 0x7f0600d3;
public static final int notification_big_circle_margin = 0x7f0600d4;
public static final int notification_content_margin_start = 0x7f0600d5;
public static final int notification_large_icon_height = 0x7f0600d6;
public static final int notification_large_icon_width = 0x7f0600d7;
public static final int notification_main_column_padding_top = 0x7f0600d8;
public static final int notification_media_narrow_margin = 0x7f0600d9;
public static final int notification_right_icon_size = 0x7f0600da;
public static final int notification_right_side_padding_top = 0x7f0600db;
public static final int notification_small_icon_background_padding = 0x7f0600dc;
public static final int notification_small_icon_size_as_large = 0x7f0600dd;
public static final int notification_subtext_size = 0x7f0600de;
public static final int notification_top_pad = 0x7f0600df;
public static final int notification_top_pad_large_text = 0x7f0600e0;
public static final int tooltip_corner_radius = 0x7f0600e5;
public static final int tooltip_horizontal_padding = 0x7f0600e6;
public static final int tooltip_margin = 0x7f0600e7;
public static final int tooltip_precise_anchor_extra_offset = 0x7f0600e8;
public static final int tooltip_precise_anchor_threshold = 0x7f0600e9;
public static final int tooltip_vertical_padding = 0x7f0600ea;
public static final int tooltip_y_offset_non_touch = 0x7f0600eb;
public static final int tooltip_y_offset_touch = 0x7f0600ec;
}
public static final class drawable {
private drawable() {}
public static final int abc_ab_share_pack_mtrl_alpha = 0x7f070007;
public static final int abc_action_bar_item_background_material = 0x7f070008;
public static final int abc_btn_borderless_material = 0x7f070009;
public static final int abc_btn_check_material = 0x7f07000a;
public static final int abc_btn_check_to_on_mtrl_000 = 0x7f07000b;
public static final int abc_btn_check_to_on_mtrl_015 = 0x7f07000c;
public static final int abc_btn_colored_material = 0x7f07000d;
public static final int abc_btn_default_mtrl_shape = 0x7f07000e;
public static final int abc_btn_radio_material = 0x7f07000f;
public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f070010;
public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f070011;
public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f070012;
public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f070013;
public static final int abc_cab_background_internal_bg = 0x7f070014;
public static final int abc_cab_background_top_material = 0x7f070015;
public static final int abc_cab_background_top_mtrl_alpha = 0x7f070016;
public static final int abc_control_background_material = 0x7f070017;
public static final int abc_dialog_material_background = 0x7f070018;
public static final int abc_edit_text_material = 0x7f070019;
public static final int abc_ic_ab_back_material = 0x7f07001a;
public static final int abc_ic_arrow_drop_right_black_24dp = 0x7f07001b;
public static final int abc_ic_clear_material = 0x7f07001c;
public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f07001d;
public static final int abc_ic_go_search_api_material = 0x7f07001e;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f07001f;
public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f070020;
public static final int abc_ic_menu_overflow_material = 0x7f070021;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f070022;
public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f070023;
public static final int abc_ic_menu_share_mtrl_alpha = 0x7f070024;
public static final int abc_ic_search_api_material = 0x7f070025;
public static final int abc_ic_star_black_16dp = 0x7f070026;
public static final int abc_ic_star_black_36dp = 0x7f070027;
public static final int abc_ic_star_black_48dp = 0x7f070028;
public static final int abc_ic_star_half_black_16dp = 0x7f070029;
public static final int abc_ic_star_half_black_36dp = 0x7f07002a;
public static final int abc_ic_star_half_black_48dp = 0x7f07002b;
public static final int abc_ic_voice_search_api_material = 0x7f07002c;
public static final int abc_item_background_holo_dark = 0x7f07002d;
public static final int abc_item_background_holo_light = 0x7f07002e;
public static final int abc_list_divider_mtrl_alpha = 0x7f070030;
public static final int abc_list_focused_holo = 0x7f070031;
public static final int abc_list_longpressed_holo = 0x7f070032;
public static final int abc_list_pressed_holo_dark = 0x7f070033;
public static final int abc_list_pressed_holo_light = 0x7f070034;
public static final int abc_list_selector_background_transition_holo_dark = 0x7f070035;
public static final int abc_list_selector_background_transition_holo_light = 0x7f070036;
public static final int abc_list_selector_disabled_holo_dark = 0x7f070037;
public static final int abc_list_selector_disabled_holo_light = 0x7f070038;
public static final int abc_list_selector_holo_dark = 0x7f070039;
public static final int abc_list_selector_holo_light = 0x7f07003a;
public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f07003b;
public static final int abc_popup_background_mtrl_mult = 0x7f07003c;
public static final int abc_ratingbar_indicator_material = 0x7f07003d;
public static final int abc_ratingbar_material = 0x7f07003e;
public static final int abc_ratingbar_small_material = 0x7f07003f;
public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f070040;
public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f070041;
public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f070042;
public static final int abc_scrubber_primary_mtrl_alpha = 0x7f070043;
public static final int abc_scrubber_track_mtrl_alpha = 0x7f070044;
public static final int abc_seekbar_thumb_material = 0x7f070045;
public static final int abc_seekbar_tick_mark_material = 0x7f070046;
public static final int abc_seekbar_track_material = 0x7f070047;
public static final int abc_spinner_mtrl_am_alpha = 0x7f070048;
public static final int abc_spinner_textfield_background_material = 0x7f070049;
public static final int abc_switch_thumb_material = 0x7f07004a;
public static final int abc_switch_track_mtrl_alpha = 0x7f07004b;
public static final int abc_tab_indicator_material = 0x7f07004c;
public static final int abc_tab_indicator_mtrl_alpha = 0x7f07004d;
public static final int abc_text_cursor_material = 0x7f07004e;
public static final int abc_text_select_handle_left_mtrl_dark = 0x7f07004f;
public static final int abc_text_select_handle_left_mtrl_light = 0x7f070050;
public static final int abc_text_select_handle_middle_mtrl_dark = 0x7f070051;
public static final int abc_text_select_handle_middle_mtrl_light = 0x7f070052;
public static final int abc_text_select_handle_right_mtrl_dark = 0x7f070053;
public static final int abc_text_select_handle_right_mtrl_light = 0x7f070054;
public static final int abc_textfield_activated_mtrl_alpha = 0x7f070055;
public static final int abc_textfield_default_mtrl_alpha = 0x7f070056;
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f070057;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f070058;
public static final int abc_textfield_search_material = 0x7f070059;
public static final int abc_vector_test = 0x7f07005a;
public static final int com_facebook_auth_dialog_background = 0x7f070060;
public static final int com_facebook_auth_dialog_cancel_background = 0x7f070061;
public static final int com_facebook_auth_dialog_header_background = 0x7f070062;
public static final int com_facebook_button_background = 0x7f070063;
public static final int com_facebook_button_icon = 0x7f070064;
public static final int com_facebook_button_icon_blue = 0x7f070065;
public static final int com_facebook_button_icon_white = 0x7f070066;
public static final int com_facebook_button_like_background = 0x7f070067;
public static final int com_facebook_button_like_icon_selected = 0x7f070068;
public static final int com_facebook_button_login_background = 0x7f070069;
public static final int com_facebook_button_login_logo = 0x7f07006a;
public static final int com_facebook_button_login_silver_background = 0x7f07006b;
public static final int com_facebook_button_send_background = 0x7f07006c;
public static final int com_facebook_button_send_icon_blue = 0x7f07006d;
public static final int com_facebook_button_send_icon_white = 0x7f07006e;
public static final int com_facebook_close = 0x7f07006f;
public static final int com_facebook_favicon_blue = 0x7f070070;
public static final int com_facebook_profile_picture_blank_portrait = 0x7f070071;
public static final int com_facebook_profile_picture_blank_square = 0x7f070072;
public static final int com_facebook_send_button_icon = 0x7f070073;
public static final int com_facebook_tooltip_black_background = 0x7f070074;
public static final int com_facebook_tooltip_black_bottomnub = 0x7f070075;
public static final int com_facebook_tooltip_black_topnub = 0x7f070076;
public static final int com_facebook_tooltip_black_xout = 0x7f070077;
public static final int com_facebook_tooltip_blue_background = 0x7f070078;
public static final int com_facebook_tooltip_blue_bottomnub = 0x7f070079;
public static final int com_facebook_tooltip_blue_topnub = 0x7f07007a;
public static final int com_facebook_tooltip_blue_xout = 0x7f07007b;
public static final int messenger_bubble_large_blue = 0x7f0700a8;
public static final int messenger_bubble_large_white = 0x7f0700a9;
public static final int messenger_bubble_small_blue = 0x7f0700aa;
public static final int messenger_bubble_small_white = 0x7f0700ab;
public static final int messenger_button_blue_bg_round = 0x7f0700ac;
public static final int messenger_button_blue_bg_selector = 0x7f0700ad;
public static final int messenger_button_send_round_shadow = 0x7f0700ae;
public static final int messenger_button_white_bg_round = 0x7f0700af;
public static final int messenger_button_white_bg_selector = 0x7f0700b0;
public static final int notification_action_background = 0x7f0700b4;
public static final int notification_bg = 0x7f0700b5;
public static final int notification_bg_low = 0x7f0700b6;
public static final int notification_bg_low_normal = 0x7f0700b7;
public static final int notification_bg_low_pressed = 0x7f0700b8;
public static final int notification_bg_normal = 0x7f0700b9;
public static final int notification_bg_normal_pressed = 0x7f0700ba;
public static final int notification_icon_background = 0x7f0700bb;
public static final int notification_template_icon_bg = 0x7f0700bc;
public static final int notification_template_icon_low_bg = 0x7f0700bd;
public static final int notification_tile_bg = 0x7f0700be;
public static final int notify_panel_notification_icon_bg = 0x7f0700bf;
public static final int tooltip_frame_dark = 0x7f0700c1;
public static final int tooltip_frame_light = 0x7f0700c2;
}
public static final class id {
private id() {}
public static final int action0 = 0x7f08000c;
public static final int action_bar = 0x7f08000f;
public static final int action_bar_activity_content = 0x7f080010;
public static final int action_bar_container = 0x7f080011;
public static final int action_bar_root = 0x7f080012;
public static final int action_bar_spinner = 0x7f080013;
public static final int action_bar_subtitle = 0x7f080014;
public static final int action_bar_title = 0x7f080015;
public static final int action_container = 0x7f080016;
public static final int action_context_bar = 0x7f080017;
public static final int action_divider = 0x7f080018;
public static final int action_image = 0x7f08001b;
public static final int action_menu_divider = 0x7f08001c;
public static final int action_menu_presenter = 0x7f08001d;
public static final int action_mode_bar = 0x7f08001e;
public static final int action_mode_bar_stub = 0x7f08001f;
public static final int action_mode_close_button = 0x7f080020;
public static final int action_text = 0x7f080022;
public static final int actions = 0x7f080023;
public static final int activity_chooser_view_content = 0x7f080024;
public static final int add = 0x7f080025;
public static final int alertTitle = 0x7f08002e;
public static final int async = 0x7f080031;
public static final int automatic = 0x7f080033;
public static final int blocking = 0x7f080036;
public static final int bottom = 0x7f080037;
public static final int box_count = 0x7f080039;
public static final int button = 0x7f08003f;
public static final int buttonPanel = 0x7f080040;
public static final int cancel_action = 0x7f080041;
public static final int cancel_button = 0x7f080042;
public static final int center = 0x7f080043;
public static final int checkbox = 0x7f080049;
public static final int chronometer = 0x7f08004a;
public static final int com_facebook_body_frame = 0x7f08004e;
public static final int com_facebook_button_xout = 0x7f08004f;
public static final int com_facebook_device_auth_instructions = 0x7f080050;
public static final int com_facebook_fragment_container = 0x7f080051;
public static final int com_facebook_login_fragment_progress_bar = 0x7f080052;
public static final int com_facebook_smart_instructions_0 = 0x7f080053;
public static final int com_facebook_smart_instructions_or = 0x7f080054;
public static final int com_facebook_tooltip_bubble_view_bottom_pointer = 0x7f080055;
public static final int com_facebook_tooltip_bubble_view_text_body = 0x7f080056;
public static final int com_facebook_tooltip_bubble_view_top_pointer = 0x7f080057;
public static final int confirmation_code = 0x7f08005e;
public static final int contentPanel = 0x7f080061;
public static final int custom = 0x7f080063;
public static final int customPanel = 0x7f080064;
public static final int decor_content_parent = 0x7f080066;
public static final int default_activity_button = 0x7f080067;
public static final int display_always = 0x7f08007c;
public static final int edit_query = 0x7f080081;
public static final int end_padder = 0x7f080088;
public static final int expand_activities_button = 0x7f08008d;
public static final int expanded_menu = 0x7f08008e;
public static final int forever = 0x7f080094;
public static final int home = 0x7f08009b;
public static final int icon = 0x7f08009d;
public static final int icon_group = 0x7f08009e;
public static final int image = 0x7f0800a1;
public static final int info = 0x7f0800a3;
public static final int inline = 0x7f0800a4;
public static final int italic = 0x7f0800a6;
public static final int large = 0x7f0800aa;
public static final int left = 0x7f0800ac;
public static final int line1 = 0x7f0800ae;
public static final int line3 = 0x7f0800af;
public static final int listMode = 0x7f0800b0;
public static final int list_item = 0x7f0800b1;
public static final int media_actions = 0x7f0800b6;
public static final int message = 0x7f0800b7;
public static final int messenger_send_button = 0x7f0800b8;
public static final int multiply = 0x7f0800be;
public static final int never_display = 0x7f0800c5;
public static final int none = 0x7f0800c6;
public static final int normal = 0x7f0800c7;
public static final int notification_background = 0x7f0800c8;
public static final int notification_main_column = 0x7f0800c9;
public static final int notification_main_column_container = 0x7f0800ca;
public static final int open_graph = 0x7f0800cb;
public static final int page = 0x7f0800ce;
public static final int parentPanel = 0x7f0800d1;
public static final int progress_bar = 0x7f0800d9;
public static final int progress_circular = 0x7f0800da;
public static final int progress_horizontal = 0x7f0800db;
public static final int radio = 0x7f0800dc;
public static final int right = 0x7f0800dd;
public static final int right_icon = 0x7f0800de;
public static final int right_side = 0x7f0800df;
public static final int screen = 0x7f0800e3;
public static final int scrollIndicatorDown = 0x7f0800e5;
public static final int scrollIndicatorUp = 0x7f0800e6;
public static final int scrollView = 0x7f0800e7;
public static final int search_badge = 0x7f0800ea;
public static final int search_bar = 0x7f0800eb;
public static final int search_button = 0x7f0800ec;
public static final int search_close_btn = 0x7f0800ed;
public static final int search_edit_frame = 0x7f0800ee;
public static final int search_go_btn = 0x7f0800ef;
public static final int search_mag_icon = 0x7f0800f0;
public static final int search_plate = 0x7f0800f1;
public static final int search_src_text = 0x7f0800f3;
public static final int search_voice_btn = 0x7f0800f4;
public static final int select_dialog_listview = 0x7f0800f5;
public static final int shortcut = 0x7f0800f9;
public static final int small = 0x7f0800fe;
public static final int spacer = 0x7f080104;
public static final int split_action_bar = 0x7f080105;
public static final int src_atop = 0x7f080108;
public static final int src_in = 0x7f080109;
public static final int src_over = 0x7f08010a;
public static final int standard = 0x7f08010b;
public static final int status_bar_latest_event_content = 0x7f08010d;
public static final int submenuarrow = 0x7f08010f;
public static final int submit_area = 0x7f080110;
public static final int tabMode = 0x7f080111;
public static final int tag_transition_group = 0x7f080112;
public static final int text = 0x7f080115;
public static final int text2 = 0x7f080116;
public static final int textSpacerNoButtons = 0x7f080117;
public static final int textSpacerNoTitle = 0x7f080118;
public static final int time = 0x7f080122;
public static final int title = 0x7f080123;
public static final int titleDividerNoCustom = 0x7f080124;
public static final int title_template = 0x7f080125;
public static final int top = 0x7f08012a;
public static final int topPanel = 0x7f08012b;
public static final int uniform = 0x7f080133;
public static final int unknown = 0x7f080134;
public static final int up = 0x7f080136;
public static final int wrap_content = 0x7f08013f;
}
public static final class integer {
private integer() {}
public static final int abc_config_activityDefaultDur = 0x7f090000;
public static final int abc_config_activityShortDur = 0x7f090001;
public static final int cancel_button_image_alpha = 0x7f090004;
public static final int config_tooltipAnimTime = 0x7f090005;
public static final int status_bar_notification_info_maxnum = 0x7f09000f;
}
public static final class layout {
private layout() {}
public static final int abc_action_bar_title_item = 0x7f0b0000;
public static final int abc_action_bar_up_container = 0x7f0b0001;
public static final int abc_action_menu_item_layout = 0x7f0b0002;
public static final int abc_action_menu_layout = 0x7f0b0003;
public static final int abc_action_mode_bar = 0x7f0b0004;
public static final int abc_action_mode_close_item_material = 0x7f0b0005;
public static final int abc_activity_chooser_view = 0x7f0b0006;
public static final int abc_activity_chooser_view_list_item = 0x7f0b0007;
public static final int abc_alert_dialog_button_bar_material = 0x7f0b0008;
public static final int abc_alert_dialog_material = 0x7f0b0009;
public static final int abc_alert_dialog_title_material = 0x7f0b000a;
public static final int abc_dialog_title_material = 0x7f0b000c;
public static final int abc_expanded_menu_layout = 0x7f0b000d;
public static final int abc_list_menu_item_checkbox = 0x7f0b000e;
public static final int abc_list_menu_item_icon = 0x7f0b000f;
public static final int abc_list_menu_item_layout = 0x7f0b0010;
public static final int abc_list_menu_item_radio = 0x7f0b0011;
public static final int abc_popup_menu_header_item_layout = 0x7f0b0012;
public static final int abc_popup_menu_item_layout = 0x7f0b0013;
public static final int abc_screen_content_include = 0x7f0b0014;
public static final int abc_screen_simple = 0x7f0b0015;
public static final int abc_screen_simple_overlay_action_mode = 0x7f0b0016;
public static final int abc_screen_toolbar = 0x7f0b0017;
public static final int abc_search_dropdown_item_icons_2line = 0x7f0b0018;
public static final int abc_search_view = 0x7f0b0019;
public static final int abc_select_dialog_material = 0x7f0b001a;
public static final int com_facebook_activity_layout = 0x7f0b0024;
public static final int com_facebook_device_auth_dialog_fragment = 0x7f0b0025;
public static final int com_facebook_login_fragment = 0x7f0b0026;
public static final int com_facebook_smart_device_dialog_fragment = 0x7f0b0027;
public static final int com_facebook_tooltip_bubble = 0x7f0b0028;
public static final int messenger_button_send_blue_large = 0x7f0b0042;
public static final int messenger_button_send_blue_round = 0x7f0b0043;
public static final int messenger_button_send_blue_small = 0x7f0b0044;
public static final int messenger_button_send_white_large = 0x7f0b0045;
public static final int messenger_button_send_white_round = 0x7f0b0046;
public static final int messenger_button_send_white_small = 0x7f0b0047;
public static final int notification_action = 0x7f0b004a;
public static final int notification_action_tombstone = 0x7f0b004b;
public static final int notification_media_action = 0x7f0b004c;
public static final int notification_media_cancel_action = 0x7f0b004d;
public static final int notification_template_big_media = 0x7f0b004e;
public static final int notification_template_big_media_custom = 0x7f0b004f;
public static final int notification_template_big_media_narrow = 0x7f0b0050;
public static final int notification_template_big_media_narrow_custom = 0x7f0b0051;
public static final int notification_template_custom_big = 0x7f0b0052;
public static final int notification_template_icon_group = 0x7f0b0053;
public static final int notification_template_lines_media = 0x7f0b0054;
public static final int notification_template_media = 0x7f0b0055;
public static final int notification_template_media_custom = 0x7f0b0056;
public static final int notification_template_part_chronometer = 0x7f0b0057;
public static final int notification_template_part_time = 0x7f0b0058;
public static final int select_dialog_item_material = 0x7f0b0059;
public static final int select_dialog_multichoice_material = 0x7f0b005a;
public static final int select_dialog_singlechoice_material = 0x7f0b005b;
public static final int support_simple_spinner_dropdown_item = 0x7f0b005c;
}
public static final class string {
private string() {}
public static final int abc_action_bar_home_description = 0x7f0e0000;
public static final int abc_action_bar_up_description = 0x7f0e0001;
public static final int abc_action_menu_overflow_description = 0x7f0e0002;
public static final int abc_action_mode_done = 0x7f0e0003;
public static final int abc_activity_chooser_view_see_all = 0x7f0e0004;
public static final int abc_activitychooserview_choose_application = 0x7f0e0005;
public static final int abc_capital_off = 0x7f0e0006;
public static final int abc_capital_on = 0x7f0e0007;
public static final int abc_font_family_body_1_material = 0x7f0e0008;
public static final int abc_font_family_body_2_material = 0x7f0e0009;
public static final int abc_font_family_button_material = 0x7f0e000a;
public static final int abc_font_family_caption_material = 0x7f0e000b;
public static final int abc_font_family_display_1_material = 0x7f0e000c;
public static final int abc_font_family_display_2_material = 0x7f0e000d;
public static final int abc_font_family_display_3_material = 0x7f0e000e;
public static final int abc_font_family_display_4_material = 0x7f0e000f;
public static final int abc_font_family_headline_material = 0x7f0e0010;
public static final int abc_font_family_menu_material = 0x7f0e0011;
public static final int abc_font_family_subhead_material = 0x7f0e0012;
public static final int abc_font_family_title_material = 0x7f0e0013;
public static final int abc_search_hint = 0x7f0e001e;
public static final int abc_searchview_description_clear = 0x7f0e001f;
public static final int abc_searchview_description_query = 0x7f0e0020;
public static final int abc_searchview_description_search = 0x7f0e0021;
public static final int abc_searchview_description_submit = 0x7f0e0022;
public static final int abc_searchview_description_voice = 0x7f0e0023;
public static final int abc_shareactionprovider_share_with = 0x7f0e0024;
public static final int abc_shareactionprovider_share_with_application = 0x7f0e0025;
public static final int abc_toolbar_collapse_description = 0x7f0e0026;
public static final int com_facebook_device_auth_instructions = 0x7f0e0031;
public static final int com_facebook_image_download_unknown_error = 0x7f0e0032;
public static final int com_facebook_internet_permission_error_message = 0x7f0e0033;
public static final int com_facebook_internet_permission_error_title = 0x7f0e0034;
public static final int com_facebook_like_button_liked = 0x7f0e0035;
public static final int com_facebook_like_button_not_liked = 0x7f0e0036;
public static final int com_facebook_loading = 0x7f0e0037;
public static final int com_facebook_loginview_cancel_action = 0x7f0e0038;
public static final int com_facebook_loginview_log_in_button = 0x7f0e0039;
public static final int com_facebook_loginview_log_in_button_continue = 0x7f0e003a;
public static final int com_facebook_loginview_log_in_button_long = 0x7f0e003b;
public static final int com_facebook_loginview_log_out_action = 0x7f0e003c;
public static final int com_facebook_loginview_log_out_button = 0x7f0e003d;
public static final int com_facebook_loginview_logged_in_as = 0x7f0e003e;
public static final int com_facebook_loginview_logged_in_using_facebook = 0x7f0e003f;
public static final int com_facebook_send_button_text = 0x7f0e0041;
public static final int com_facebook_share_button_text = 0x7f0e0042;
public static final int com_facebook_smart_device_instructions = 0x7f0e0043;
public static final int com_facebook_smart_device_instructions_or = 0x7f0e0044;
public static final int com_facebook_smart_login_confirmation_cancel = 0x7f0e0045;
public static final int com_facebook_smart_login_confirmation_continue_as = 0x7f0e0046;
public static final int com_facebook_smart_login_confirmation_title = 0x7f0e0047;
public static final int com_facebook_tooltip_default = 0x7f0e0048;
public static final int messenger_send_button_text = 0x7f0e0072;
public static final int search_menu_title = 0x7f0e007e;
public static final int status_bar_notification_info_overflow = 0x7f0e0089;
}
public static final class style {
private style() {}
public static final int AlertDialog_AppCompat = 0x7f0f0000;
public static final int AlertDialog_AppCompat_Light = 0x7f0f0001;
public static final int Animation_AppCompat_Dialog = 0x7f0f0002;
public static final int Animation_AppCompat_DropDownUp = 0x7f0f0003;
public static final int Animation_AppCompat_Tooltip = 0x7f0f0004;
public static final int Base_AlertDialog_AppCompat = 0x7f0f0007;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f0f0008;
public static final int Base_Animation_AppCompat_Dialog = 0x7f0f0009;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0f000a;
public static final int Base_Animation_AppCompat_Tooltip = 0x7f0f000b;
public static final int Base_CardView = 0x7f0f000c;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0f000e;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f0f000d;
public static final int Base_TextAppearance_AppCompat = 0x7f0f000f;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0f0010;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0f0011;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f0f0012;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0f0013;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0f0014;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0f0015;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0f0016;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0f0017;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0f0018;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0f0019;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f0f001a;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0f001b;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0f001c;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0f001d;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0f001e;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0f001f;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0f0020;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0f0021;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0f0022;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0f0023;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f0f0024;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0f0025;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0f0026;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0f0027;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f0f0028;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0f0029;
public static final int Base_TextAppearance_AppCompat_Tooltip = 0x7f0f002a;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0f002b;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0f002c;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0f002d;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0f002e;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0f002f;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0f0030;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0f0031;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0f0032;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0f0033;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0f0034;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0f0035;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0f0036;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0f0037;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0f0038;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0f0039;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0f003a;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0f003b;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0f003c;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0f003d;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0f003e;
public static final int Base_ThemeOverlay_AppCompat = 0x7f0f005e;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0f005f;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0f0060;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0f0061;
public static final int Base_ThemeOverlay_AppCompat_Dialog = 0x7f0f0062;
public static final int Base_ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0f0063;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0f0064;
public static final int Base_Theme_AppCompat = 0x7f0f003f;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0f0040;
public static final int Base_Theme_AppCompat_Dialog = 0x7f0f0041;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0f0045;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0f0042;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0f0043;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0f0044;
public static final int Base_Theme_AppCompat_Light = 0x7f0f0046;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0f0047;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0f0048;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0f004c;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0f0049;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0f004a;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0f004b;
public static final int Base_V21_ThemeOverlay_AppCompat_Dialog = 0x7f0f0074;
public static final int Base_V21_Theme_AppCompat = 0x7f0f0070;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0f0071;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f0f0072;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0f0073;
public static final int Base_V22_Theme_AppCompat = 0x7f0f0075;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f0f0076;
public static final int Base_V23_Theme_AppCompat = 0x7f0f0077;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f0f0078;
public static final int Base_V26_Theme_AppCompat = 0x7f0f0079;
public static final int Base_V26_Theme_AppCompat_Light = 0x7f0f007a;
public static final int Base_V26_Widget_AppCompat_Toolbar = 0x7f0f007b;
public static final int Base_V7_ThemeOverlay_AppCompat_Dialog = 0x7f0f0082;
public static final int Base_V7_Theme_AppCompat = 0x7f0f007e;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0f007f;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f0f0080;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0f0081;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0f0083;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0f0084;
public static final int Base_V7_Widget_AppCompat_Toolbar = 0x7f0f0085;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0f0086;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0f0087;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0f0088;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0f0089;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0f008a;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f0f008b;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0f008c;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0f008d;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0f008e;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0f008f;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0f0090;
public static final int Base_Widget_AppCompat_Button = 0x7f0f0091;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0f0097;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0f0098;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0f0092;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0f0093;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0f0094;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0f0095;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f0f0096;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0f0099;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0f009a;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0f009b;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0f009c;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0f009d;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0f009e;
public static final int Base_Widget_AppCompat_EditText = 0x7f0f009f;
public static final int Base_Widget_AppCompat_ImageButton = 0x7f0f00a0;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0f00a1;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0f00a2;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0f00a3;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0f00a4;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0f00a5;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0f00a6;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0f00a7;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0f00a8;
public static final int Base_Widget_AppCompat_ListMenuView = 0x7f0f00a9;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0f00aa;
public static final int Base_Widget_AppCompat_ListView = 0x7f0f00ab;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0f00ac;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0f00ad;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0f00ae;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0f00af;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0f00b0;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0f00b1;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0f00b2;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f0f00b3;
public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f0f00b4;
public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f0f00b5;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0f00b6;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0f00b7;
public static final int Base_Widget_AppCompat_SeekBar = 0x7f0f00b8;
public static final int Base_Widget_AppCompat_SeekBar_Discrete = 0x7f0f00b9;
public static final int Base_Widget_AppCompat_Spinner = 0x7f0f00ba;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0f00bb;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0f00bc;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0f00bd;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0f00be;
public static final int CardView = 0x7f0f00c4;
public static final int CardView_Dark = 0x7f0f00c5;
public static final int CardView_Light = 0x7f0f00c6;
public static final int MessengerButton = 0x7f0f00c7;
public static final int MessengerButtonText = 0x7f0f00ce;
public static final int MessengerButtonText_Blue = 0x7f0f00cf;
public static final int MessengerButtonText_Blue_Large = 0x7f0f00d0;
public static final int MessengerButtonText_Blue_Small = 0x7f0f00d1;
public static final int MessengerButtonText_White = 0x7f0f00d2;
public static final int MessengerButtonText_White_Large = 0x7f0f00d3;
public static final int MessengerButtonText_White_Small = 0x7f0f00d4;
public static final int MessengerButton_Blue = 0x7f0f00c8;
public static final int MessengerButton_Blue_Large = 0x7f0f00c9;
public static final int MessengerButton_Blue_Small = 0x7f0f00ca;
public static final int MessengerButton_White = 0x7f0f00cb;
public static final int MessengerButton_White_Large = 0x7f0f00cc;
public static final int MessengerButton_White_Small = 0x7f0f00cd;
public static final int Platform_AppCompat = 0x7f0f00d5;
public static final int Platform_AppCompat_Light = 0x7f0f00d6;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f0f00db;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0f00dc;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0f00dd;
public static final int Platform_V21_AppCompat = 0x7f0f00de;
public static final int Platform_V21_AppCompat_Light = 0x7f0f00df;
public static final int Platform_V25_AppCompat = 0x7f0f00e0;
public static final int Platform_V25_AppCompat_Light = 0x7f0f00e1;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f0f00e2;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0f00e3;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0f00e4;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0f00e5;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0f00e6;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0f00e7;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0f00ea;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0f00f1;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0f00ec;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0f00ed;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0f00ee;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0f00ef;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0f00f0;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0f00f2;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0f00f3;
public static final int TextAppearance_AppCompat = 0x7f0f00f4;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0f00f5;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0f00f6;
public static final int TextAppearance_AppCompat_Button = 0x7f0f00f7;
public static final int TextAppearance_AppCompat_Caption = 0x7f0f00f8;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0f00f9;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0f00fa;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0f00fb;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0f00fc;
public static final int TextAppearance_AppCompat_Headline = 0x7f0f00fd;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0f00fe;
public static final int TextAppearance_AppCompat_Large = 0x7f0f00ff;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0f0100;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0f0101;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0f0102;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0f0103;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0f0104;
public static final int TextAppearance_AppCompat_Medium = 0x7f0f0105;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0f0106;
public static final int TextAppearance_AppCompat_Menu = 0x7f0f0107;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0f0108;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0f0109;
public static final int TextAppearance_AppCompat_Small = 0x7f0f010a;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0f010b;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0f010c;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0f010d;
public static final int TextAppearance_AppCompat_Title = 0x7f0f010e;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0f010f;
public static final int TextAppearance_AppCompat_Tooltip = 0x7f0f0110;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0f0111;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0f0112;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0f0113;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0f0114;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0f0115;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0f0116;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0f0117;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0f0118;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0f0119;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0f011a;
public static final int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0f011b;
public static final int TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0f011c;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0f011d;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0f011e;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0f011f;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0f0120;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0f0121;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0f0122;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0f0123;
public static final int TextAppearance_Compat_Notification = 0x7f0f0124;
public static final int TextAppearance_Compat_Notification_Info = 0x7f0f0125;
public static final int TextAppearance_Compat_Notification_Info_Media = 0x7f0f0126;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0f0127;
public static final int TextAppearance_Compat_Notification_Line2_Media = 0x7f0f0128;
public static final int TextAppearance_Compat_Notification_Media = 0x7f0f0129;
public static final int TextAppearance_Compat_Notification_Time = 0x7f0f012a;
public static final int TextAppearance_Compat_Notification_Time_Media = 0x7f0f012b;
public static final int TextAppearance_Compat_Notification_Title = 0x7f0f012c;
public static final int TextAppearance_Compat_Notification_Title_Media = 0x7f0f012d;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0f0145;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0f0146;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0f0147;
public static final int ThemeOverlay_AppCompat = 0x7f0f0178;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0f0179;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f0f017a;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0f017b;
public static final int ThemeOverlay_AppCompat_Dialog = 0x7f0f017c;
public static final int ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0f017d;
public static final int ThemeOverlay_AppCompat_Light = 0x7f0f017e;
public static final int Theme_AppCompat = 0x7f0f0148;
public static final int Theme_AppCompat_CompactMenu = 0x7f0f0149;
public static final int Theme_AppCompat_DayNight = 0x7f0f014a;
public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f0f014b;
public static final int Theme_AppCompat_DayNight_Dialog = 0x7f0f014c;
public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f0f014f;
public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f0f014d;
public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f0f014e;
public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f0f0150;
public static final int Theme_AppCompat_Dialog = 0x7f0f0151;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0f0154;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0f0152;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0f0153;
public static final int Theme_AppCompat_Light = 0x7f0f0155;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0f0156;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0f0157;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0f015a;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0f0158;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0f0159;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0f015b;
public static final int Theme_AppCompat_NoActionBar = 0x7f0f015c;
public static final int Widget_AppCompat_ActionBar = 0x7f0f018b;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0f018c;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0f018d;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0f018e;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0f018f;
public static final int Widget_AppCompat_ActionButton = 0x7f0f0190;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0f0191;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0f0192;
public static final int Widget_AppCompat_ActionMode = 0x7f0f0193;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f0f0194;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0f0195;
public static final int Widget_AppCompat_Button = 0x7f0f0196;
public static final int Widget_AppCompat_ButtonBar = 0x7f0f019c;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0f019d;
public static final int Widget_AppCompat_Button_Borderless = 0x7f0f0197;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0f0198;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0f0199;
public static final int Widget_AppCompat_Button_Colored = 0x7f0f019a;
public static final int Widget_AppCompat_Button_Small = 0x7f0f019b;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0f019e;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0f019f;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0f01a0;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0f01a1;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0f01a2;
public static final int Widget_AppCompat_EditText = 0x7f0f01a3;
public static final int Widget_AppCompat_ImageButton = 0x7f0f01a4;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f0f01a5;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0f01a6;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0f01a7;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0f01a8;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0f01a9;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0f01aa;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0f01ab;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0f01ac;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0f01ad;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f0f01ae;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0f01af;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0f01b0;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0f01b1;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0f01b2;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0f01b3;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0f01b4;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0f01b5;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0f01b6;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0f01b7;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0f01b8;
public static final int Widget_AppCompat_Light_SearchView = 0x7f0f01b9;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0f01ba;
public static final int Widget_AppCompat_ListMenuView = 0x7f0f01bb;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f0f01bc;
public static final int Widget_AppCompat_ListView = 0x7f0f01bd;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f0f01be;
public static final int Widget_AppCompat_ListView_Menu = 0x7f0f01bf;
public static final int Widget_AppCompat_PopupMenu = 0x7f0f01c0;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0f01c1;
public static final int Widget_AppCompat_PopupWindow = 0x7f0f01c2;
public static final int Widget_AppCompat_ProgressBar = 0x7f0f01c3;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0f01c4;
public static final int Widget_AppCompat_RatingBar = 0x7f0f01c5;
public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f0f01c6;
public static final int Widget_AppCompat_RatingBar_Small = 0x7f0f01c7;
public static final int Widget_AppCompat_SearchView = 0x7f0f01c8;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0f01c9;
public static final int Widget_AppCompat_SeekBar = 0x7f0f01ca;
public static final int Widget_AppCompat_SeekBar_Discrete = 0x7f0f01cb;
public static final int Widget_AppCompat_Spinner = 0x7f0f01cc;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0f01cd;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0f01ce;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0f01cf;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0f01d0;
public static final int Widget_AppCompat_Toolbar = 0x7f0f01d1;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0f01d2;
public static final int Widget_Compat_NotificationActionContainer = 0x7f0f01d3;
public static final int Widget_Compat_NotificationActionText = 0x7f0f01d4;
public static final int com_facebook_activity_theme = 0x7f0f0204;
public static final int com_facebook_auth_dialog = 0x7f0f0205;
public static final int com_facebook_auth_dialog_instructions_textview = 0x7f0f0206;
public static final int com_facebook_button = 0x7f0f0207;
public static final int com_facebook_button_like = 0x7f0f0208;
public static final int com_facebook_button_send = 0x7f0f0209;
public static final int com_facebook_button_share = 0x7f0f020a;
public static final int com_facebook_loginview_default_style = 0x7f0f020b;
public static final int com_facebook_loginview_silver_style = 0x7f0f020c;
public static final int tooltip_bubble_text = 0x7f0f020d;
}
public static final class styleable {
private styleable() {}
public static final int[] ActionBar = { 0x7f030031, 0x7f030032, 0x7f030033, 0x7f0300a6, 0x7f0300a7, 0x7f0300a8, 0x7f0300a9, 0x7f0300aa, 0x7f0300ab, 0x7f0300b9, 0x7f0300be, 0x7f0300bf, 0x7f0300ca, 0x7f0300f5, 0x7f0300fa, 0x7f0300ff, 0x7f030100, 0x7f030102, 0x7f03010e, 0x7f030118, 0x7f03016d, 0x7f030179, 0x7f03018a, 0x7f03018e, 0x7f03018f, 0x7f0301be, 0x7f0301c1, 0x7f030206, 0x7f030210 };
public static final int ActionBar_background = 0;
public static final int ActionBar_backgroundSplit = 1;
public static final int ActionBar_backgroundStacked = 2;
public static final int ActionBar_contentInsetEnd = 3;
public static final int ActionBar_contentInsetEndWithActions = 4;
public static final int ActionBar_contentInsetLeft = 5;
public static final int ActionBar_contentInsetRight = 6;
public static final int ActionBar_contentInsetStart = 7;
public static final int ActionBar_contentInsetStartWithNavigation = 8;
public static final int ActionBar_customNavigationLayout = 9;
public static final int ActionBar_displayOptions = 10;
public static final int ActionBar_divider = 11;
public static final int ActionBar_elevation = 12;
public static final int ActionBar_height = 13;
public static final int ActionBar_hideOnContentScroll = 14;
public static final int ActionBar_homeAsUpIndicator = 15;
public static final int ActionBar_homeLayout = 16;
public static final int ActionBar_icon = 17;
public static final int ActionBar_indeterminateProgressStyle = 18;
public static final int ActionBar_itemPadding = 19;
public static final int ActionBar_logo = 20;
public static final int ActionBar_navigationMode = 21;
public static final int ActionBar_popupTheme = 22;
public static final int ActionBar_progressBarPadding = 23;
public static final int ActionBar_progressBarStyle = 24;
public static final int ActionBar_subtitle = 25;
public static final int ActionBar_subtitleTextStyle = 26;
public static final int ActionBar_title = 27;
public static final int ActionBar_titleTextStyle = 28;
public static final int[] ActionBarLayout = { 0x10100b3 };
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int[] ActionMenuItemView = { 0x101013f };
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMode = { 0x7f030031, 0x7f030032, 0x7f030083, 0x7f0300f5, 0x7f0301c1, 0x7f030210 };
public static final int ActionMode_background = 0;
public static final int ActionMode_backgroundSplit = 1;
public static final int ActionMode_closeItemLayout = 2;
public static final int ActionMode_height = 3;
public static final int ActionMode_subtitleTextStyle = 4;
public static final int ActionMode_titleTextStyle = 5;
public static final int[] ActivityChooserView = { 0x7f0300d0, 0x7f03010f };
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
public static final int ActivityChooserView_initialActivityCount = 1;
public static final int[] AlertDialog = { 0x10100f2, 0x7f030054, 0x7f030055, 0x7f030164, 0x7f030165, 0x7f030176, 0x7f0301a6, 0x7f0301a7 };
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonIconDimen = 1;
public static final int AlertDialog_buttonPanelSideLayout = 2;
public static final int AlertDialog_listItemLayout = 3;
public static final int AlertDialog_listLayout = 4;
public static final int AlertDialog_multiChoiceItemLayout = 5;
public static final int AlertDialog_showTitle = 6;
public static final int AlertDialog_singleChoiceItemLayout = 7;
public static final int[] AppCompatImageView = { 0x1010119, 0x7f0301b1, 0x7f030204, 0x7f030205 };
public static final int AppCompatImageView_android_src = 0;
public static final int AppCompatImageView_srcCompat = 1;
public static final int AppCompatImageView_tint = 2;
public static final int AppCompatImageView_tintMode = 3;
public static final int[] AppCompatSeekBar = { 0x1010142, 0x7f030201, 0x7f030202, 0x7f030203 };
public static final int AppCompatSeekBar_android_thumb = 0;
public static final int AppCompatSeekBar_tickMark = 1;
public static final int AppCompatSeekBar_tickMarkTint = 2;
public static final int AppCompatSeekBar_tickMarkTintMode = 3;
public static final int[] AppCompatTextHelper = { 0x1010034, 0x101016d, 0x101016e, 0x101016f, 0x1010170, 0x1010392, 0x1010393 };
public static final int AppCompatTextHelper_android_textAppearance = 0;
public static final int AppCompatTextHelper_android_drawableTop = 1;
public static final int AppCompatTextHelper_android_drawableBottom = 2;
public static final int AppCompatTextHelper_android_drawableLeft = 3;
public static final int AppCompatTextHelper_android_drawableRight = 4;
public static final int AppCompatTextHelper_android_drawableStart = 5;
public static final int AppCompatTextHelper_android_drawableEnd = 6;
public static final int[] AppCompatTextView = { 0x1010034, 0x7f03002c, 0x7f03002d, 0x7f03002e, 0x7f03002f, 0x7f030030, 0x7f0300e4, 0x7f0300e7, 0x7f030120, 0x7f030160, 0x7f0301e1 };
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_autoSizeMaxTextSize = 1;
public static final int AppCompatTextView_autoSizeMinTextSize = 2;
public static final int AppCompatTextView_autoSizePresetSizes = 3;
public static final int AppCompatTextView_autoSizeStepGranularity = 4;
public static final int AppCompatTextView_autoSizeTextType = 5;
public static final int AppCompatTextView_firstBaselineToTopHeight = 6;
public static final int AppCompatTextView_fontFamily = 7;
public static final int AppCompatTextView_lastBaselineToBottomHeight = 8;
public static final int AppCompatTextView_lineHeight = 9;
public static final int AppCompatTextView_textAllCaps = 10;
public static final int[] AppCompatTheme = { 0x1010057, 0x10100ae, 0x7f030000, 0x7f030001, 0x7f030002, 0x7f030003, 0x7f030004, 0x7f030005, 0x7f030006, 0x7f030007, 0x7f030008, 0x7f030009, 0x7f03000a, 0x7f03000b, 0x7f03000c, 0x7f03000e, 0x7f03000f, 0x7f030010, 0x7f030011, 0x7f030012, 0x7f030013, 0x7f030014, 0x7f030015, 0x7f030016, 0x7f030017, 0x7f030018, 0x7f030019, 0x7f03001a, 0x7f03001b, 0x7f03001c, 0x7f03001d, 0x7f03001e, 0x7f030021, 0x7f030022, 0x7f030023, 0x7f030024, 0x7f030025, 0x7f03002b, 0x7f030040, 0x7f03004e, 0x7f03004f, 0x7f030050, 0x7f030051, 0x7f030052, 0x7f030057, 0x7f030058, 0x7f030063, 0x7f030068, 0x7f030089, 0x7f03008a, 0x7f03008b, 0x7f03008c, 0x7f03008d, 0x7f03008e, 0x7f03008f, 0x7f030090, 0x7f030091, 0x7f030094, 0x7f0300b2, 0x7f0300bb, 0x7f0300bc, 0x7f0300bd, 0x7f0300c0, 0x7f0300c2, 0x7f0300c5, 0x7f0300c6, 0x7f0300c7, 0x7f0300c8, 0x7f0300c9, 0x7f0300ff, 0x7f03010d, 0x7f030162, 0x7f030163, 0x7f030166, 0x7f030167, 0x7f030168, 0x7f030169, 0x7f03016a, 0x7f03016b, 0x7f03016c, 0x7f030181, 0x7f030182, 0x7f030183, 0x7f030189, 0x7f03018b, 0x7f030192, 0x7f030193, 0x7f030194, 0x7f030195, 0x7f03019e, 0x7f03019f, 0x7f0301a0, 0x7f0301a1, 0x7f0301ae, 0x7f0301af, 0x7f0301c5, 0x7f0301ec, 0x7f0301ed, 0x7f0301ee, 0x7f0301ef, 0x7f0301f1, 0x7f0301f2, 0x7f0301f3, 0x7f0301f4, 0x7f0301f7, 0x7f0301f8, 0x7f030212, 0x7f030213, 0x7f030214, 0x7f030215, 0x7f03021c, 0x7f03021e, 0x7f03021f, 0x7f030220, 0x7f030221, 0x7f030222, 0x7f030223, 0x7f030224, 0x7f030225, 0x7f030226, 0x7f030227 };
public static final int AppCompatTheme_android_windowIsFloating = 0;
public static final int AppCompatTheme_android_windowAnimationStyle = 1;
public static final int AppCompatTheme_actionBarDivider = 2;
public static final int AppCompatTheme_actionBarItemBackground = 3;
public static final int AppCompatTheme_actionBarPopupTheme = 4;
public static final int AppCompatTheme_actionBarSize = 5;
public static final int AppCompatTheme_actionBarSplitStyle = 6;
public static final int AppCompatTheme_actionBarStyle = 7;
public static final int AppCompatTheme_actionBarTabBarStyle = 8;
public static final int AppCompatTheme_actionBarTabStyle = 9;
public static final int AppCompatTheme_actionBarTabTextStyle = 10;
public static final int AppCompatTheme_actionBarTheme = 11;
public static final int AppCompatTheme_actionBarWidgetTheme = 12;
public static final int AppCompatTheme_actionButtonStyle = 13;
public static final int AppCompatTheme_actionDropDownStyle = 14;
public static final int AppCompatTheme_actionMenuTextAppearance = 15;
public static final int AppCompatTheme_actionMenuTextColor = 16;
public static final int AppCompatTheme_actionModeBackground = 17;
public static final int AppCompatTheme_actionModeCloseButtonStyle = 18;
public static final int AppCompatTheme_actionModeCloseDrawable = 19;
public static final int AppCompatTheme_actionModeCopyDrawable = 20;
public static final int AppCompatTheme_actionModeCutDrawable = 21;
public static final int AppCompatTheme_actionModeFindDrawable = 22;
public static final int AppCompatTheme_actionModePasteDrawable = 23;
public static final int AppCompatTheme_actionModePopupWindowStyle = 24;
public static final int AppCompatTheme_actionModeSelectAllDrawable = 25;
public static final int AppCompatTheme_actionModeShareDrawable = 26;
public static final int AppCompatTheme_actionModeSplitBackground = 27;
public static final int AppCompatTheme_actionModeStyle = 28;
public static final int AppCompatTheme_actionModeWebSearchDrawable = 29;
public static final int AppCompatTheme_actionOverflowButtonStyle = 30;
public static final int AppCompatTheme_actionOverflowMenuStyle = 31;
public static final int AppCompatTheme_activityChooserViewStyle = 32;
public static final int AppCompatTheme_alertDialogButtonGroupStyle = 33;
public static final int AppCompatTheme_alertDialogCenterButtons = 34;
public static final int AppCompatTheme_alertDialogStyle = 35;
public static final int AppCompatTheme_alertDialogTheme = 36;
public static final int AppCompatTheme_autoCompleteTextViewStyle = 37;
public static final int AppCompatTheme_borderlessButtonStyle = 38;
public static final int AppCompatTheme_buttonBarButtonStyle = 39;
public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 40;
public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 41;
public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 42;
public static final int AppCompatTheme_buttonBarStyle = 43;
public static final int AppCompatTheme_buttonStyle = 44;
public static final int AppCompatTheme_buttonStyleSmall = 45;
public static final int AppCompatTheme_checkboxStyle = 46;
public static final int AppCompatTheme_checkedTextViewStyle = 47;
public static final int AppCompatTheme_colorAccent = 48;
public static final int AppCompatTheme_colorBackgroundFloating = 49;
public static final int AppCompatTheme_colorButtonNormal = 50;
public static final int AppCompatTheme_colorControlActivated = 51;
public static final int AppCompatTheme_colorControlHighlight = 52;
public static final int AppCompatTheme_colorControlNormal = 53;
public static final int AppCompatTheme_colorError = 54;
public static final int AppCompatTheme_colorPrimary = 55;
public static final int AppCompatTheme_colorPrimaryDark = 56;
public static final int AppCompatTheme_colorSwitchThumbNormal = 57;
public static final int AppCompatTheme_controlBackground = 58;
public static final int AppCompatTheme_dialogCornerRadius = 59;
public static final int AppCompatTheme_dialogPreferredPadding = 60;
public static final int AppCompatTheme_dialogTheme = 61;
public static final int AppCompatTheme_dividerHorizontal = 62;
public static final int AppCompatTheme_dividerVertical = 63;
public static final int AppCompatTheme_dropDownListViewStyle = 64;
public static final int AppCompatTheme_dropdownListPreferredItemHeight = 65;
public static final int AppCompatTheme_editTextBackground = 66;
public static final int AppCompatTheme_editTextColor = 67;
public static final int AppCompatTheme_editTextStyle = 68;
public static final int AppCompatTheme_homeAsUpIndicator = 69;
public static final int AppCompatTheme_imageButtonStyle = 70;
public static final int AppCompatTheme_listChoiceBackgroundIndicator = 71;
public static final int AppCompatTheme_listDividerAlertDialog = 72;
public static final int AppCompatTheme_listMenuViewStyle = 73;
public static final int AppCompatTheme_listPopupWindowStyle = 74;
public static final int AppCompatTheme_listPreferredItemHeight = 75;
public static final int AppCompatTheme_listPreferredItemHeightLarge = 76;
public static final int AppCompatTheme_listPreferredItemHeightSmall = 77;
public static final int AppCompatTheme_listPreferredItemPaddingLeft = 78;
public static final int AppCompatTheme_listPreferredItemPaddingRight = 79;
public static final int AppCompatTheme_panelBackground = 80;
public static final int AppCompatTheme_panelMenuListTheme = 81;
public static final int AppCompatTheme_panelMenuListWidth = 82;
public static final int AppCompatTheme_popupMenuStyle = 83;
public static final int AppCompatTheme_popupWindowStyle = 84;
public static final int AppCompatTheme_radioButtonStyle = 85;
public static final int AppCompatTheme_ratingBarStyle = 86;
public static final int AppCompatTheme_ratingBarStyleIndicator = 87;
public static final int AppCompatTheme_ratingBarStyleSmall = 88;
public static final int AppCompatTheme_searchViewStyle = 89;
public static final int AppCompatTheme_seekBarStyle = 90;
public static final int AppCompatTheme_selectableItemBackground = 91;
public static final int AppCompatTheme_selectableItemBackgroundBorderless = 92;
public static final int AppCompatTheme_spinnerDropDownItemStyle = 93;
public static final int AppCompatTheme_spinnerStyle = 94;
public static final int AppCompatTheme_switchStyle = 95;
public static final int AppCompatTheme_textAppearanceLargePopupMenu = 96;
public static final int AppCompatTheme_textAppearanceListItem = 97;
public static final int AppCompatTheme_textAppearanceListItemSecondary = 98;
public static final int AppCompatTheme_textAppearanceListItemSmall = 99;
public static final int AppCompatTheme_textAppearancePopupMenuHeader = 100;
public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 101;
public static final int AppCompatTheme_textAppearanceSearchResultTitle = 102;
public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 103;
public static final int AppCompatTheme_textColorAlertDialogListItem = 104;
public static final int AppCompatTheme_textColorSearchUrl = 105;
public static final int AppCompatTheme_toolbarNavigationButtonStyle = 106;
public static final int AppCompatTheme_toolbarStyle = 107;
public static final int AppCompatTheme_tooltipForegroundColor = 108;
public static final int AppCompatTheme_tooltipFrameBackground = 109;
public static final int AppCompatTheme_viewInflaterClass = 110;
public static final int AppCompatTheme_windowActionBar = 111;
public static final int AppCompatTheme_windowActionBarOverlay = 112;
public static final int AppCompatTheme_windowActionModeOverlay = 113;
public static final int AppCompatTheme_windowFixedHeightMajor = 114;
public static final int AppCompatTheme_windowFixedHeightMinor = 115;
public static final int AppCompatTheme_windowFixedWidthMajor = 116;
public static final int AppCompatTheme_windowFixedWidthMinor = 117;
public static final int AppCompatTheme_windowMinWidthMajor = 118;
public static final int AppCompatTheme_windowMinWidthMinor = 119;
public static final int AppCompatTheme_windowNoTitle = 120;
public static final int[] ButtonBarLayout = { 0x7f030026 };
public static final int ButtonBarLayout_allowStacking = 0;
public static final int[] CardView = { 0x101013f, 0x1010140, 0x7f03005b, 0x7f03005c, 0x7f03005d, 0x7f03005e, 0x7f03005f, 0x7f030060, 0x7f0300ac, 0x7f0300ad, 0x7f0300ae, 0x7f0300af, 0x7f0300b0 };
public static final int CardView_android_minWidth = 0;
public static final int CardView_android_minHeight = 1;
public static final int CardView_cardBackgroundColor = 2;
public static final int CardView_cardCornerRadius = 3;
public static final int CardView_cardElevation = 4;
public static final int CardView_cardMaxElevation = 5;
public static final int CardView_cardPreventCornerOverlap = 6;
public static final int CardView_cardUseCompatPadding = 7;
public static final int CardView_contentPadding = 8;
public static final int CardView_contentPaddingBottom = 9;
public static final int CardView_contentPaddingLeft = 10;
public static final int CardView_contentPaddingRight = 11;
public static final int CardView_contentPaddingTop = 12;
public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f030027 };
public static final int ColorStateListItem_android_color = 0;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_alpha = 2;
public static final int[] CompoundButton = { 0x1010107, 0x7f030059, 0x7f03005a };
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int[] DrawerArrowToggle = { 0x7f030029, 0x7f03002a, 0x7f030036, 0x7f030088, 0x7f0300c3, 0x7f0300f2, 0x7f0301ad, 0x7f0301fd };
public static final int DrawerArrowToggle_arrowHeadLength = 0;
public static final int DrawerArrowToggle_arrowShaftLength = 1;
public static final int DrawerArrowToggle_barLength = 2;
public static final int DrawerArrowToggle_color = 3;
public static final int DrawerArrowToggle_drawableSize = 4;
public static final int DrawerArrowToggle_gapBetweenBars = 5;
public static final int DrawerArrowToggle_spinBars = 6;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] FontFamily = { 0x7f0300e8, 0x7f0300e9, 0x7f0300ea, 0x7f0300eb, 0x7f0300ec, 0x7f0300ed };
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f0300e6, 0x7f0300ee, 0x7f0300ef, 0x7f0300f0, 0x7f03021a };
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_ttcIndex = 3;
public static final int FontFamilyFont_android_fontVariationSettings = 4;
public static final int FontFamilyFont_font = 5;
public static final int FontFamilyFont_fontStyle = 6;
public static final int FontFamilyFont_fontVariationSettings = 7;
public static final int FontFamilyFont_fontWeight = 8;
public static final int FontFamilyFont_ttcIndex = 9;
public static final int[] LinearLayoutCompat = { 0x10100af, 0x10100c4, 0x1010126, 0x1010127, 0x1010128, 0x7f0300bf, 0x7f0300c1, 0x7f030174, 0x7f0301a3 };
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 6;
public static final int LinearLayoutCompat_measureWithLargestChild = 7;
public static final int LinearLayoutCompat_showDividers = 8;
public static final int[] LinearLayoutCompat_Layout = { 0x10100b3, 0x10100f4, 0x10100f5, 0x1010181 };
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int[] ListPopupWindow = { 0x10102ac, 0x10102ad };
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int[] MenuGroup = { 0x101000e, 0x10100d0, 0x1010194, 0x10101de, 0x10101df, 0x10101e0 };
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_visible = 2;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int[] MenuItem = { 0x1010002, 0x101000e, 0x10100d0, 0x1010106, 0x1010194, 0x10101de, 0x10101df, 0x10101e1, 0x10101e2, 0x10101e3, 0x10101e4, 0x10101e5, 0x101026f, 0x7f03000d, 0x7f03001f, 0x7f030020, 0x7f030028, 0x7f0300a5, 0x7f030108, 0x7f030109, 0x7f03017b, 0x7f0301a2, 0x7f030216 };
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_actionLayout = 13;
public static final int MenuItem_actionProviderClass = 14;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_alphabeticModifiers = 16;
public static final int MenuItem_contentDescription = 17;
public static final int MenuItem_iconTint = 18;
public static final int MenuItem_iconTintMode = 19;
public static final int MenuItem_numericModifiers = 20;
public static final int MenuItem_showAsAction = 21;
public static final int MenuItem_tooltipText = 22;
public static final int[] MenuView = { 0x10100ae, 0x101012c, 0x101012d, 0x101012e, 0x101012f, 0x1010130, 0x1010131, 0x7f03018c, 0x7f0301bc };
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_preserveIconSpacing = 7;
public static final int MenuView_subMenuArrow = 8;
public static final int[] PopupWindow = { 0x1010176, 0x10102c9, 0x7f03017c };
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_android_popupAnimationStyle = 1;
public static final int PopupWindow_overlapAnchor = 2;
public static final int[] PopupWindowBackgroundState = { 0x7f0301b3 };
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int[] RecycleListView = { 0x7f03017d, 0x7f030180 };
public static final int RecycleListView_paddingBottomNoButtons = 0;
public static final int RecycleListView_paddingTopNoTitle = 1;
public static final int[] SearchView = { 0x10100da, 0x101011f, 0x1010220, 0x1010264, 0x7f03007c, 0x7f0300a1, 0x7f0300ba, 0x7f0300f3, 0x7f03010a, 0x7f030121, 0x7f030190, 0x7f030191, 0x7f03019c, 0x7f03019d, 0x7f0301bd, 0x7f0301c2, 0x7f03021d };
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_closeIcon = 4;
public static final int SearchView_commitIcon = 5;
public static final int SearchView_defaultQueryHint = 6;
public static final int SearchView_goIcon = 7;
public static final int SearchView_iconifiedByDefault = 8;
public static final int SearchView_layout = 9;
public static final int SearchView_queryBackground = 10;
public static final int SearchView_queryHint = 11;
public static final int SearchView_searchHintIcon = 12;
public static final int SearchView_searchIcon = 13;
public static final int SearchView_submitBackground = 14;
public static final int SearchView_suggestionRowLayout = 15;
public static final int SearchView_voiceIcon = 16;
public static final int[] Spinner = { 0x10100b2, 0x1010176, 0x101017b, 0x1010262, 0x7f03018a };
public static final int Spinner_android_entries = 0;
public static final int Spinner_android_popupBackground = 1;
public static final int Spinner_android_prompt = 2;
public static final int Spinner_android_dropDownWidth = 3;
public static final int Spinner_popupTheme = 4;
public static final int[] SwitchCompat = { 0x1010124, 0x1010125, 0x1010142, 0x7f0301a5, 0x7f0301b0, 0x7f0301c3, 0x7f0301c4, 0x7f0301c6, 0x7f0301fe, 0x7f0301ff, 0x7f030200, 0x7f030217, 0x7f030218, 0x7f030219 };
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 3;
public static final int SwitchCompat_splitTrack = 4;
public static final int SwitchCompat_switchMinWidth = 5;
public static final int SwitchCompat_switchPadding = 6;
public static final int SwitchCompat_switchTextAppearance = 7;
public static final int SwitchCompat_thumbTextPadding = 8;
public static final int SwitchCompat_thumbTint = 9;
public static final int SwitchCompat_thumbTintMode = 10;
public static final int SwitchCompat_track = 11;
public static final int SwitchCompat_trackTint = 12;
public static final int SwitchCompat_trackTintMode = 13;
public static final int[] TextAppearance = { 0x1010095, 0x1010096, 0x1010097, 0x1010098, 0x101009a, 0x101009b, 0x1010161, 0x1010162, 0x1010163, 0x1010164, 0x10103ac, 0x7f0300e7, 0x7f0301e1 };
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_textColorHint = 4;
public static final int TextAppearance_android_textColorLink = 5;
public static final int TextAppearance_android_shadowColor = 6;
public static final int TextAppearance_android_shadowDx = 7;
public static final int TextAppearance_android_shadowDy = 8;
public static final int TextAppearance_android_shadowRadius = 9;
public static final int TextAppearance_android_fontFamily = 10;
public static final int TextAppearance_fontFamily = 11;
public static final int TextAppearance_textAllCaps = 12;
public static final int[] Toolbar = { 0x10100af, 0x1010140, 0x7f030053, 0x7f030084, 0x7f030085, 0x7f0300a6, 0x7f0300a7, 0x7f0300a8, 0x7f0300a9, 0x7f0300aa, 0x7f0300ab, 0x7f03016d, 0x7f03016e, 0x7f030172, 0x7f030177, 0x7f030178, 0x7f03018a, 0x7f0301be, 0x7f0301bf, 0x7f0301c0, 0x7f030206, 0x7f030208, 0x7f030209, 0x7f03020a, 0x7f03020b, 0x7f03020c, 0x7f03020d, 0x7f03020e, 0x7f03020f };
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_buttonGravity = 2;
public static final int Toolbar_collapseContentDescription = 3;
public static final int Toolbar_collapseIcon = 4;
public static final int Toolbar_contentInsetEnd = 5;
public static final int Toolbar_contentInsetEndWithActions = 6;
public static final int Toolbar_contentInsetLeft = 7;
public static final int Toolbar_contentInsetRight = 8;
public static final int Toolbar_contentInsetStart = 9;
public static final int Toolbar_contentInsetStartWithNavigation = 10;
public static final int Toolbar_logo = 11;
public static final int Toolbar_logoDescription = 12;
public static final int Toolbar_maxButtonHeight = 13;
public static final int Toolbar_navigationContentDescription = 14;
public static final int Toolbar_navigationIcon = 15;
public static final int Toolbar_popupTheme = 16;
public static final int Toolbar_subtitle = 17;
public static final int Toolbar_subtitleTextAppearance = 18;
public static final int Toolbar_subtitleTextColor = 19;
public static final int Toolbar_title = 20;
public static final int Toolbar_titleMargin = 21;
public static final int Toolbar_titleMarginBottom = 22;
public static final int Toolbar_titleMarginEnd = 23;
public static final int Toolbar_titleMarginStart = 24;
public static final int Toolbar_titleMarginTop = 25;
public static final int Toolbar_titleMargins = 26;
public static final int Toolbar_titleTextAppearance = 27;
public static final int Toolbar_titleTextColor = 28;
public static final int[] View = { 0x1010000, 0x10100da, 0x7f03017e, 0x7f03017f, 0x7f0301fc };
public static final int View_android_theme = 0;
public static final int View_android_focusable = 1;
public static final int View_paddingEnd = 2;
public static final int View_paddingStart = 3;
public static final int View_theme = 4;
public static final int[] ViewBackgroundHelper = { 0x10100d4, 0x7f030034, 0x7f030035 };
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int[] ViewStubCompat = { 0x10100d0, 0x10100f2, 0x10100f3 };
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_layout = 1;
public static final int ViewStubCompat_android_inflatedId = 2;
public static final int[] com_facebook_like_view = { 0x7f030095, 0x7f030097, 0x7f030098, 0x7f03009c, 0x7f03009d, 0x7f03009f };
public static final int com_facebook_like_view_com_facebook_auxiliary_view_position = 0;
public static final int com_facebook_like_view_com_facebook_foreground_color = 1;
public static final int com_facebook_like_view_com_facebook_horizontal_alignment = 2;
public static final int com_facebook_like_view_com_facebook_object_id = 3;
public static final int com_facebook_like_view_com_facebook_object_type = 4;
public static final int com_facebook_like_view_com_facebook_style = 5;
public static final int[] com_facebook_login_view = { 0x7f030096, 0x7f03009a, 0x7f03009b, 0x7f0300a0 };
public static final int com_facebook_login_view_com_facebook_confirm_logout = 0;
public static final int com_facebook_login_view_com_facebook_login_text = 1;
public static final int com_facebook_login_view_com_facebook_logout_text = 2;
public static final int com_facebook_login_view_com_facebook_tooltip_mode = 3;
public static final int[] com_facebook_profile_picture_view = { 0x7f030099, 0x7f03009e };
public static final int com_facebook_profile_picture_view_com_facebook_is_cropped = 0;
public static final int com_facebook_profile_picture_view_com_facebook_preset_size = 1;
}
}
|
[
"nadongjun@Nadongjunui-MacBookPro.local"
] |
nadongjun@Nadongjunui-MacBookPro.local
|
cacb514a4788fb1bed7cb42e4e85b03fddeb15e4
|
4da9097315831c8639a8491e881ec97fdf74c603
|
/src/StockIT-v2-release_source_from_JADX/sources/com/google/android/gms/internal/vision/zzq.java
|
45f8ae2b18cca9dee50fef4dcecac0280840f99e
|
[
"Apache-2.0"
] |
permissive
|
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
|
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
|
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
|
refs/heads/main
| 2023-08-11T06:17:05.659651
| 2021-10-01T08:48:06
| 2021-10-01T08:48:06
| 410,595,708
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,202
|
java
|
package com.google.android.gms.internal.vision;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import com.facebook.imagepipeline.common.RotationOptions;
/* compiled from: com.google.android.gms:play-services-vision-common@@19.0.0 */
public final class zzq {
public static Bitmap zzb(Bitmap bitmap, zzp zzp) {
int i;
int width = bitmap.getWidth();
int height = bitmap.getHeight();
if (zzp.rotation != 0) {
Matrix matrix = new Matrix();
int i2 = zzp.rotation;
if (i2 == 0) {
i = 0;
} else if (i2 == 1) {
i = 90;
} else if (i2 == 2) {
i = RotationOptions.ROTATE_180;
} else if (i2 == 3) {
i = 270;
} else {
throw new IllegalArgumentException("Unsupported rotation degree.");
}
matrix.postRotate((float) i);
bitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, false);
}
if (zzp.rotation == 1 || zzp.rotation == 3) {
zzp.width = height;
zzp.height = width;
}
return bitmap;
}
}
|
[
"57108396+atul-vyshnav@users.noreply.github.com"
] |
57108396+atul-vyshnav@users.noreply.github.com
|
db681d111da83ebb4e9ce77da0ef4340514f0f24
|
f858d8b7a13fad4c069cafb98749b020aa82d0c1
|
/src/main/java/com/tushar/lms/book/repository/BookRepository.java
|
013477a9d7fae16151f947f5384dc80293585e71
|
[] |
no_license
|
tushargangurde/books-service
|
df203d34fb9a318c7ab2ca44b2df9ca071f6f142
|
0b634ce930574863f3944939d010bfa9aa54364d
|
refs/heads/master
| 2023-06-30T13:57:00.744615
| 2021-08-07T10:01:56
| 2021-08-07T10:01:56
| 386,583,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 478
|
java
|
package com.tushar.lms.book.repository;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import com.tushar.lms.book.entity.Book;
public interface BookRepository extends JpaRepository<Book, Integer> {
Book findByBookId(String bookId);
List<Book> findByUserId(String userId);
@Query(value = "{call book_getAvailableBooks}", nativeQuery = true)
List<Book> getAvailableBooks();
}
|
[
"tushar.gangurde92@gmail.com"
] |
tushar.gangurde92@gmail.com
|
a7e72f637f0a188534ad8a72730140ae5c48fccb
|
6252c165657baa6aa605337ebc38dd44b3f694e2
|
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-800-Files/boiler-To-Generate-800-Files/syncregions-800Files/BoilerActuator1639.java
|
d5fe54758ff935d0da8e7426f24e903143056d05
|
[] |
no_license
|
soha500/EglSync
|
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
|
55101bc781349bb14fefc178bf3486e2b778aed6
|
refs/heads/master
| 2021-06-23T02:55:13.464889
| 2020-12-11T19:10:01
| 2020-12-11T19:10:01
| 139,832,721
| 0
| 1
| null | 2019-05-31T11:34:02
| 2018-07-05T10:20:00
|
Java
|
UTF-8
|
Java
| false
| false
| 263
|
java
|
package syncregions;
public class BoilerActuator1639 {
public execute(int temperatureDifference1639, boolean boilerStatus1639) {
//sync _bfpnGUbFEeqXnfGWlV1639, behaviour
Half Change - return temperature - targetTemperature;
//endSync
}
}
|
[
"sultanalmutairi@172.20.10.2"
] |
sultanalmutairi@172.20.10.2
|
c23a58ba54772203d7d982abed056fd617f3afa4
|
f6f1835abd27bc60bca70946c8df89be92a9d869
|
/cnki-backend/cnki-web/src/main/java/net/cnki/service/HrService.java
|
17557ef99156e36bc57244ffe832106c35912cc0
|
[
"MIT"
] |
permissive
|
AichaelLee/vhr
|
b1c13d0ca58d1cbd6bfa16d612a5d0ad49d813b6
|
8e34abae5275a8ea18de810995432f100fbbeaf0
|
refs/heads/master
| 2020-04-08T22:32:46.289534
| 2018-12-28T08:53:29
| 2018-12-28T08:53:29
| 159,791,237
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,436
|
java
|
package net.cnki.service;
import net.cnki.bean.Managers;
import net.cnki.bean.Role;
import net.cnki.mapper.HrMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* Created by lizhizhong on 2018/11/28.
*/
@Service
@Transactional
public class HrService {
@Autowired
HrMapper hrMapper;
protected Collection<GrantedAuthority> getAuthorities(Managers users) {
if (users != null) {
List<GrantedAuthority> authorities = new ArrayList<>();
List<Role> roles = users.getRoles();
for (Role role : roles) {
authorities.add(new SimpleGrantedAuthority(role.getName()));
}
return authorities;
}
return AuthorityUtils.createAuthorityList();
}
public int updateHrRoles(Long hrId, Long[] rids) {
int i = hrMapper.deleteRoleByHrId(hrId);
return hrMapper.addRolesForHr(hrId, rids);
}
public List<Role> getRolesByHrId(Long id){
return hrMapper.getRolesByHrId(id);
}
}
|
[
"aichaellee@sina.com"
] |
aichaellee@sina.com
|
4d87d498a772387603417565f5286dc3b7e02c70
|
65429daa4cafd871b18ce220dfac1f50094bf912
|
/src/com/hcx/bio/chat/Server.java
|
58207d55db52f3c03bea9c7a53aca541d784f36d
|
[] |
no_license
|
GitHongcx/java_io_demo
|
d43d3e34f05e7a9437f0c6b6f15c03aea38dc5fa
|
998be6ea312ef54d05728c2204b01cf84caa24f3
|
refs/heads/main
| 2023-02-19T23:12:07.290977
| 2021-01-21T03:12:50
| 2021-01-21T03:12:50
| 330,592,005
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 885
|
java
|
package com.hcx.bio.chat;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
/**
* BIO模式下的端口转发
* @author hongcaixia
* @version 1.0
* @date 2021/1/14 20:35
*/
public class Server {
//存储所有在线socket
public static List<Socket> allOnlineSocket = new ArrayList<>();
public static void main(String[] args) {
try {
ServerSocket serverSocket = new ServerSocket(9999);
while (true){
Socket socket = serverSocket.accept();
//把登陆的客户端socket存到集合中
allOnlineSocket.add(socket);
//为每个socket分配独立的线程来处理
new ServerReaderThread(socket).start();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"948957717@qq.com"
] |
948957717@qq.com
|
b6d2935cb2648e350c08a5503732fae055a399e0
|
bc98d000881b71e1d25baa35eaf31d1198555f0d
|
/src/metro/bean/TransactionHistory.java
|
c66ede841fc105e1cfb7f98b2d989007f27835df
|
[] |
no_license
|
Saisamyuktha999/MetroManagementSystem
|
0002ce299967af9a5182d45635393101e40e1e35
|
fc296cc75979b28d7efa6ef5837d3226a1cd2c29
|
refs/heads/master
| 2023-07-02T10:53:25.436060
| 2021-08-03T16:35:07
| 2021-08-03T16:35:07
| 391,675,848
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,757
|
java
|
package metro.bean;
public class TransactionHistory {
private int transactionId;
private int cardId;
private int sourceId;
private int destinationId;
private String swapInTime;
private String swapOutTime;
private int fare;
public TransactionHistory(){
}
public TransactionHistory(int transactionId,int cardId,int sourceId,int destinationId,String swapInTime,String swapOutTime)
{
this.transactionId=transactionId;
this.cardId=cardId;
this.sourceId=sourceId;
this.destinationId=destinationId;
this.swapInTime=swapInTime;
this.swapOutTime=swapOutTime;
}
public int getTransactionId() {
return transactionId;
}
public void setTransactionId(int transactionId) {
this.transactionId = transactionId;
}
public int getCardId() {
return cardId;
}
public void setCardId(int cardId) {
this.cardId = cardId;
}
public int getSourceId() {
return sourceId;
}
public void setSourceId(int sourceId) {
this.sourceId = sourceId;
}
public int getDestinationId() {
return destinationId;
}
public void setDestinationId(int destinationId) {
this.destinationId = destinationId;
}
public String getSwapInTime() {
return swapInTime;
}
public void setSwapInTime(String swapInTime) {
this.swapInTime = swapInTime;
}
public String getSwapOutTime() {
return swapOutTime;
}
public void setSwapOutTime(String swapOutTime) {
this.swapOutTime = swapOutTime;
}
public int getFare() {
return fare;
}
public void setFare(int fare) {
this.fare = fare;
}
}
|
[
"38566910+Saisamyuktha999@users.noreply.github.com"
] |
38566910+Saisamyuktha999@users.noreply.github.com
|
8bafe547325b725bed7d2398b7ab5c50cc82f667
|
262889818ceb095305ff444b25b3be691885d6f0
|
/src/de/pandawan/PasswordGeneratorService/CharSet.java
|
b2074c89f6b32889b03f3c8c54ff9d47531875ed
|
[] |
no_license
|
Tsang91/testservice
|
ff124f65b267823401fece3f108ee3e40c3a50dc
|
f646f2021353df7f198878a9a3c315114ce201b8
|
refs/heads/master
| 2016-09-13T07:59:22.179907
| 2016-03-28T16:02:46
| 2016-03-28T16:02:46
| 56,335,410
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package de.pandawan.PasswordGeneratorService;
/**
* Created by vuong on 23.03.16.
*/
public class CharSet {
public String createLowerCharSet(){
return "abcdefghijklmnopqrstuvwxyz";
}
public String createUpperCharSet(){
return "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
public String createNumCharSet() {
return "01234556789";
}
}
|
[
"vuongngo@outlook.de"
] |
vuongngo@outlook.de
|
f3d9205bfc1c267fa426489a0af1ec87575392cf
|
530fe1b3a654543334d5a9afbb2ea46b8544d6b0
|
/week-03/Day-03/src/Codewars_sortDescending.java
|
9522cded3a41d10085b5490533c34100be43d12f
|
[] |
no_license
|
greenfox-zerda-raptors/PappBeata
|
d58ea959f8588172df5ae9994a552a6af5bb7283
|
3a67b8eedeb7e1b0ff723429ea4faa5350fa8d80
|
refs/heads/master
| 2021-01-12T18:19:16.649526
| 2017-05-06T07:55:19
| 2017-05-06T07:55:19
| 71,363,242
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 705
|
java
|
import java.util.Arrays;
import java.util.Collections;
public class Codewars_sortDescending {
public static int sortDesc ( final int num){
int i = 0;
int len = String.valueOf(num).length();
Integer[] list = new Integer[len];
for (; i < len; i++) {
list[i] = Integer.parseInt(String.valueOf(num).substring(i, i + 1));
}
Arrays.sort(list, Collections.reverseOrder());
return Integer.parseInt(Arrays.toString(list).replace(", ", "").replace("[", "").replace("]", ""));
}
public static void main(String... args) {
int num = 0;
System.out.println(sortDesc(num));
}
}
|
[
"pappbeata@gmail.com"
] |
pappbeata@gmail.com
|
77156f0fc8399ca29613f8fa1bf1a3ef1f47466e
|
98802b76b3a7e59f5edad959193be4099d67587f
|
/app/src/main/java/com/nidhi/as/AppStaticsActivity.java
|
bbe44fe55a4d677562628a47ff38ac8c3f982e1d
|
[] |
no_license
|
nidhish4patel/AppStatistics
|
083ff90ccdacf149480afe9b55eb21d4cc6bc467
|
61204b26a43e154f01eec73989ddca4845575740
|
refs/heads/master
| 2021-01-23T08:34:14.251983
| 2017-10-14T02:28:02
| 2017-10-14T02:28:02
| 102,536,003
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,354
|
java
|
package com.nidhi.as;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Context;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.facebook.login.LoginManager;
import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.firebase.auth.FirebaseAuth;
import com.nidhi.as.common.AppPreferences;
import com.nidhi.as.fragments.Notification;
import com.nidhi.as.fragments.QRCode;
import com.nidhi.as.fragments.Parent;
import com.nidhi.as.utils.TraceUtils;
import com.nostra13.universalimageloader.core.ImageLoader;
import java.util.Stack;
public class AppStaticsActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
private Context context = AppStaticsActivity.this;
private TextView tvResult;
private Stack<Parent> fragStack = null;
public FragmentManager manager = null;
public FragmentTransaction trans;
private ImageLoader imageLoader;
private GoogleApiClient mGoogleApiClient;
private GoogleSignInOptions gso;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_app_statics);
fragStack = new Stack<>();
manager = getFragmentManager();
if (savedInstanceState != null) {
trans = manager.beginTransaction();
}
tvResult = (TextView) findViewById(R.id.tv_result);
ImageLoader imageLoader = ImageLoader.getInstance();
String res = AppPreferences.getInstance(context).getStringFromStore("uname");
tvResult.setText("welcome" + " " + res);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
View headerview = navigationView.getHeaderView(0);
ImageView imageView = (ImageView) headerview.findViewById(R.id.imageView);
/*String fimageUri = AppPreferences.getInstance(this).getStringFromStore("profpic");
TraceUtils.logE("imageUri", fimageUri);
imageLoader.displayImage(fimageUri, imageView);*/
String gimageUri = AppPreferences.getInstance(this).getStringFromStore("profpic");
TraceUtils.logE("imageUri", gimageUri);
imageLoader.displayImage(gimageUri, imageView);
TextView tv_name = (TextView) headerview.findViewById(R.id.tv_name);
tv_name.setText(AppPreferences.getInstance(context).getStringFromStore("name"));
// tv_name.setText(AppPreferences.getInstance(context).getStringFromStore("guname"));
gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.build();
mGoogleApiClient = new GoogleApiClient.Builder(this).enableAutoManage(this, null).
addApi(Auth.GOOGLE_SIGN_IN_API, gso).build();
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
/* @Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
return super.onKeyDown(keyCode, event);
}*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.app_statics, 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);
}
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.nav_scanqrcode:
swiftFragments(QRCode.newInstance(), "home");
break;
case R.id.nav_notifications:
swiftFragments(Notification.newInstance(), "notifications");
break;
case R.id.nav_logout:
AppPreferences.getInstance(context).clearSharedPreferences();
LoginManager.getInstance().logOut();
//if (mGoogleApiClient.isConnected())
// Auth.GoogleSignInApi.signOut(mGoogleApiClient);
FirebaseAuth.getInstance().signOut();
AppStaticsActivity.this.finish();
break;
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
public void swiftFragments(Parent frag, String tag) {
trans = manager.beginTransaction();
if (frag.isAdded() && frag.isVisible()) return;
if (frag.isAdded() && frag.isHidden()) {
trans.hide(fragStack.get(fragStack.size() - 1));
trans.show(frag);
} else if (!frag.isAdded()) {
if (fragStack.size() > 0) {
Parent pf = fragStack.get(fragStack.size() - 1);
trans.hide(pf);
}
trans.add(R.id.container, frag, tag);
trans.show(frag);
}
trans.commit();
fragStack.push(frag);
}
public void showToast(Context context, String text) {
Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
}
}
|
[
"nidhishpatel4@gmail.com"
] |
nidhishpatel4@gmail.com
|
96bac1125393784ccca22e223cc447ceaaa0ae04
|
322061d379b741a35ba44be48ee67456e8965724
|
/lib-dempsyimpl/src/test/java/com/nokia/dempsy/router/TestRouterClusterManagement.java
|
c7ef4e72a377ca51fd459775f99e6ec4661f5d81
|
[
"Apache-2.0"
] |
permissive
|
khalabi/Dempsy
|
2ab54e975d5afe449063cc3c3cde5201ea2bf31b
|
8754c97a077149ae330ff7fa1e6269dd440cf375
|
refs/heads/master
| 2021-01-15T16:37:36.490377
| 2012-08-28T22:18:50
| 2012-08-28T22:18:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,841
|
java
|
/*
* Copyright 2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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.nokia.dempsy.router;
import java.util.List;
import java.util.Set;
import junit.framework.Assert;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.nokia.dempsy.Dempsy;
import com.nokia.dempsy.annotations.MessageHandler;
import com.nokia.dempsy.annotations.MessageProcessor;
import com.nokia.dempsy.config.ApplicationDefinition;
import com.nokia.dempsy.config.ClusterDefinition;
import com.nokia.dempsy.config.ClusterId;
import com.nokia.dempsy.messagetransport.Destination;
import com.nokia.dempsy.mpcluster.MpCluster;
import com.nokia.dempsy.mpcluster.MpClusterSession;
import com.nokia.dempsy.mpcluster.MpClusterSessionFactory;
import com.nokia.dempsy.mpcluster.invm.LocalVmMpClusterSessionFactory;
import com.nokia.dempsy.router.Router.ClusterRouter;
import com.nokia.dempsy.serialization.java.JavaSerializer;
public class TestRouterClusterManagement
{
Router routerFactory = null;
RoutingStrategy.Inbound inbound = null;
@MessageProcessor
public static class GoodTestMp
{
@MessageHandler
public void handle(Exception message) {}
}
@Before
public void init() throws Throwable
{
final ClusterId clusterId = new ClusterId("test", "test-slot");
Destination destination = new Destination() {};
ApplicationDefinition app = new ApplicationDefinition(clusterId.getApplicationName());
DefaultRoutingStrategy strategy = new DefaultRoutingStrategy(1, 1);
app.setRoutingStrategy(strategy);
app.setSerializer(new JavaSerializer<Object>());
ClusterDefinition cd = new ClusterDefinition(clusterId.getMpClusterName());
cd.setMessageProcessorPrototype(new GoodTestMp());
app.add(cd);
app.initialize();
LocalVmMpClusterSessionFactory<ClusterInformation, SlotInformation> mpfactory = new LocalVmMpClusterSessionFactory<ClusterInformation, SlotInformation>();
MpClusterSession<ClusterInformation, SlotInformation> session = mpfactory.createSession();
// fake the inbound side setup
inbound = strategy.createInbound(session.getCluster(clusterId),
new Dempsy(){ public List<Class<?>> gm(ClusterDefinition clusterDef) { return super.getAcceptedMessages(clusterDef); }}.gm(cd),
destination);
routerFactory = new Router(app);
routerFactory.setClusterSession(session);
routerFactory.initialize();
}
@After
public void stop() throws Throwable
{
routerFactory.stop();
inbound.stop();
}
@Test
public void testGetRouterNotFound()
{
Set<ClusterRouter> router = routerFactory.getRouter(java.lang.String.class);
Assert.assertNull(router);
Assert.assertTrue(routerFactory.missingMsgTypes.containsKey(java.lang.String.class));
}
@Test
public void testGetRouterFound()
{
Set<ClusterRouter> routers = routerFactory.getRouter(java.lang.Exception.class);
Assert.assertNotNull(routers);
Assert.assertEquals(false, routerFactory.missingMsgTypes.containsKey(java.lang.Exception.class));
Set<ClusterRouter> routers1 = routerFactory.getRouter(ClassNotFoundException.class);
Assert.assertEquals(routers, routers1);
}
@Test
public void testChangingClusterInfo() throws Throwable
{
// check that the message didn't go through.
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"testDempsy/Dempsy.xml", "testDempsy/ClusterManager-LocalVmActx.xml",
"testDempsy/Transport-PassthroughActx.xml", "testDempsy/SimpleMultistageApplicationActx.xml" );
Dempsy dempsy = (Dempsy)context.getBean("dempsy");
MpClusterSessionFactory<ClusterInformation, SlotInformation> factory = dempsy.getClusterSessionFactory();
MpClusterSession<ClusterInformation, SlotInformation> session = factory.createSession();
MpCluster<ClusterInformation, SlotInformation> ch = session.getCluster(new ClusterId("test-app", "test-cluster1"));
ch.setClusterData(new DefaultRoutingStrategy.DefaultRouterClusterInfo(20,2));
session.stop();
dempsy.stop();
}
}
|
[
"thecarrolls@jiminger.com"
] |
thecarrolls@jiminger.com
|
2eccf4323751e531bc9aafc3ebd94c792c2f4432
|
d88f7f5c74e66f1f32c3bcff3bceb2d37cb6f60e
|
/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripeReader.java
|
9a204230abe1343c51cadff1174d32bfb74a77d2
|
[
"BSD-3-Clause",
"CC-BY-2.5",
"EPL-1.0",
"Classpath-exception-2.0",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"GCC-exception-3.1",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"CC-PDDC",
"CC0-1.0",
"CC-BY-3.0",
"CDDL-1.0",
"MIT",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-proprietary-license",
"AGPL-3.0-only",
"BSD-2-Clause-Views",
"MPL-2.0",
"MPL-2.0-no-copyleft-exception",
"BSD-2-Clause",
"LicenseRef-scancode-protobuf",
"LicenseRef-scancode-unknown-license-reference",
"CDDL-1.1",
"LicenseRef-scancode-jdom"
] |
permissive
|
arenadata/hadoop
|
8de902ffdb4e9d9eb41cc56ba2136416687fd49d
|
af33d00fbc442d519560a6c5e72cc19c42b75ab5
|
refs/heads/arenadata-branch-3.1.1
| 2023-03-18T15:47:39.730315
| 2021-03-23T13:55:30
| 2021-03-23T13:55:30
| 61,741,725
| 1
| 2
|
Apache-2.0
| 2023-03-15T17:05:01
| 2016-06-22T18:21:52
|
Java
|
UTF-8
|
Java
| false
| false
| 16,105
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hdfs;
import com.google.common.base.Preconditions;
import org.apache.hadoop.fs.ChecksumException;
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
import org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy;
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
import org.apache.hadoop.hdfs.protocol.LocatedBlock;
import org.apache.hadoop.hdfs.util.StripedBlockUtil;
import org.apache.hadoop.hdfs.util.StripedBlockUtil.StripingChunk;
import org.apache.hadoop.hdfs.util.StripedBlockUtil.AlignedStripe;
import org.apache.hadoop.hdfs.util.StripedBlockUtil.StripingChunkReadResult;
import org.apache.hadoop.io.erasurecode.ECChunk;
import org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder;
import org.apache.hadoop.hdfs.DFSUtilClient.CorruptedBlocks;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.Future;
/**
* The reader for reading a complete {@link StripedBlockUtil.AlignedStripe}.
* Note that an {@link StripedBlockUtil.AlignedStripe} may cross multiple
* stripes with cellSize width.
*/
abstract class StripeReader {
static class ReaderRetryPolicy {
private int fetchEncryptionKeyTimes = 1;
private int fetchTokenTimes = 1;
void refetchEncryptionKey() {
fetchEncryptionKeyTimes--;
}
void refetchToken() {
fetchTokenTimes--;
}
boolean shouldRefetchEncryptionKey() {
return fetchEncryptionKeyTimes > 0;
}
boolean shouldRefetchToken() {
return fetchTokenTimes > 0;
}
}
static class BlockReaderInfo {
final BlockReader reader;
final DatanodeInfo datanode;
/**
* when initializing block readers, their starting offsets are set to the
* same number: the smallest internal block offsets among all the readers.
* This is because it is possible that for some internal blocks we have to
* read "backwards" for decoding purpose. We thus use this offset array to
* track offsets for all the block readers so that we can skip data if
* necessary.
*/
long blockReaderOffset;
/**
* We use this field to indicate whether we should use this reader. In case
* we hit any issue with this reader, we set this field to true and avoid
* using it for the next stripe.
*/
boolean shouldSkip = false;
BlockReaderInfo(BlockReader reader, DatanodeInfo dn, long offset) {
this.reader = reader;
this.datanode = dn;
this.blockReaderOffset = offset;
}
void setOffset(long offset) {
this.blockReaderOffset = offset;
}
void skip() {
this.shouldSkip = true;
}
}
protected final Map<Future<Void>, Integer> futures = new HashMap<>();
protected final AlignedStripe alignedStripe;
protected final CompletionService<Void> service;
protected final LocatedBlock[] targetBlocks;
protected final CorruptedBlocks corruptedBlocks;
protected final BlockReaderInfo[] readerInfos;
protected final ErasureCodingPolicy ecPolicy;
protected final short dataBlkNum;
protected final short parityBlkNum;
protected final int cellSize;
protected final RawErasureDecoder decoder;
protected final DFSStripedInputStream dfsStripedInputStream;
protected ECChunk[] decodeInputs;
StripeReader(AlignedStripe alignedStripe,
ErasureCodingPolicy ecPolicy, LocatedBlock[] targetBlocks,
BlockReaderInfo[] readerInfos, CorruptedBlocks corruptedBlocks,
RawErasureDecoder decoder,
DFSStripedInputStream dfsStripedInputStream) {
this.alignedStripe = alignedStripe;
this.ecPolicy = ecPolicy;
this.dataBlkNum = (short)ecPolicy.getNumDataUnits();
this.parityBlkNum = (short)ecPolicy.getNumParityUnits();
this.cellSize = ecPolicy.getCellSize();
this.targetBlocks = targetBlocks;
this.readerInfos = readerInfos;
this.corruptedBlocks = corruptedBlocks;
this.decoder = decoder;
this.dfsStripedInputStream = dfsStripedInputStream;
service = new ExecutorCompletionService<>(
dfsStripedInputStream.getStripedReadsThreadPool());
}
/**
* Prepare all the data chunks.
*/
abstract void prepareDecodeInputs();
/**
* Prepare the parity chunk and block reader if necessary.
*/
abstract boolean prepareParityChunk(int index);
/**
* Decode to get the missing data.
* @throws IOException if the decoder is closed.
*/
abstract void decode() throws IOException;
/*
* Default close do nothing.
*/
void close() {
}
void updateState4SuccessRead(StripingChunkReadResult result) {
Preconditions.checkArgument(
result.state == StripingChunkReadResult.SUCCESSFUL);
readerInfos[result.index].setOffset(alignedStripe.getOffsetInBlock()
+ alignedStripe.getSpanInBlock());
}
private void checkMissingBlocks() throws IOException {
if (alignedStripe.missingChunksNum > parityBlkNum) {
clearFutures();
throw new IOException(alignedStripe.missingChunksNum
+ " missing blocks, the stripe is: " + alignedStripe
+ "; locatedBlocks is: " + dfsStripedInputStream.getLocatedBlocks());
}
}
/**
* We need decoding. Thus go through all the data chunks and make sure we
* submit read requests for all of them.
*/
private void readDataForDecoding() throws IOException {
prepareDecodeInputs();
for (int i = 0; i < dataBlkNum; i++) {
Preconditions.checkNotNull(alignedStripe.chunks[i]);
if (alignedStripe.chunks[i].state == StripingChunk.REQUESTED) {
if (!readChunk(targetBlocks[i], i)) {
alignedStripe.missingChunksNum++;
}
}
}
checkMissingBlocks();
}
void readParityChunks(int num) throws IOException {
for (int i = dataBlkNum, j = 0; i < dataBlkNum + parityBlkNum && j < num;
i++) {
if (alignedStripe.chunks[i] == null) {
if (prepareParityChunk(i) && readChunk(targetBlocks[i], i)) {
j++;
} else {
alignedStripe.missingChunksNum++;
}
}
}
checkMissingBlocks();
}
private ByteBufferStrategy[] getReadStrategies(StripingChunk chunk) {
if (chunk.useByteBuffer()) {
ByteBufferStrategy strategy = new ByteBufferStrategy(
chunk.getByteBuffer(), dfsStripedInputStream.getReadStatistics(),
dfsStripedInputStream.getDFSClient());
return new ByteBufferStrategy[]{strategy};
}
ByteBufferStrategy[] strategies =
new ByteBufferStrategy[chunk.getChunkBuffer().getSlices().size()];
for (int i = 0; i < strategies.length; i++) {
ByteBuffer buffer = chunk.getChunkBuffer().getSlice(i);
strategies[i] = new ByteBufferStrategy(buffer,
dfsStripedInputStream.getReadStatistics(),
dfsStripedInputStream.getDFSClient());
}
return strategies;
}
private int readToBuffer(BlockReader blockReader,
DatanodeInfo currentNode, ByteBufferStrategy strategy,
ExtendedBlock currentBlock) throws IOException {
final int targetLength = strategy.getTargetLength();
int length = 0;
try {
while (length < targetLength) {
int ret = strategy.readFromBlock(blockReader);
if (ret < 0) {
throw new IOException("Unexpected EOS from the reader");
}
length += ret;
}
return length;
} catch (ChecksumException ce) {
DFSClient.LOG.warn("Found Checksum error for "
+ currentBlock + " from " + currentNode
+ " at " + ce.getPos());
// we want to remember which block replicas we have tried
corruptedBlocks.addCorruptedBlock(currentBlock, currentNode);
throw ce;
} catch (IOException e) {
DFSClient.LOG.warn("Exception while reading from "
+ currentBlock + " of " + dfsStripedInputStream.getSrc() + " from "
+ currentNode, e);
throw e;
}
}
private Callable<Void> readCells(final BlockReader reader,
final DatanodeInfo datanode, final long currentReaderOffset,
final long targetReaderOffset, final ByteBufferStrategy[] strategies,
final ExtendedBlock currentBlock) {
return () -> {
// reader can be null if getBlockReaderWithRetry failed or
// the reader hit exception before
if (reader == null) {
throw new IOException("The BlockReader is null. " +
"The BlockReader creation failed or the reader hit exception.");
}
Preconditions.checkState(currentReaderOffset <= targetReaderOffset);
if (currentReaderOffset < targetReaderOffset) {
long skipped = reader.skip(targetReaderOffset - currentReaderOffset);
Preconditions.checkState(
skipped == targetReaderOffset - currentReaderOffset);
}
for (ByteBufferStrategy strategy : strategies) {
readToBuffer(reader, datanode, strategy, currentBlock);
}
return null;
};
}
boolean readChunk(final LocatedBlock block, int chunkIndex)
throws IOException {
final StripingChunk chunk = alignedStripe.chunks[chunkIndex];
if (block == null) {
chunk.state = StripingChunk.MISSING;
return false;
}
if (readerInfos[chunkIndex] == null) {
if (!dfsStripedInputStream.createBlockReader(block,
alignedStripe.getOffsetInBlock(), targetBlocks,
readerInfos, chunkIndex)) {
chunk.state = StripingChunk.MISSING;
return false;
}
} else if (readerInfos[chunkIndex].shouldSkip) {
chunk.state = StripingChunk.MISSING;
return false;
}
chunk.state = StripingChunk.PENDING;
Callable<Void> readCallable = readCells(readerInfos[chunkIndex].reader,
readerInfos[chunkIndex].datanode,
readerInfos[chunkIndex].blockReaderOffset,
alignedStripe.getOffsetInBlock(), getReadStrategies(chunk),
block.getBlock());
Future<Void> request = service.submit(readCallable);
futures.put(request, chunkIndex);
return true;
}
/**
* read the whole stripe. do decoding if necessary
*/
void readStripe() throws IOException {
for (int i = 0; i < dataBlkNum; i++) {
if (alignedStripe.chunks[i] != null &&
alignedStripe.chunks[i].state != StripingChunk.ALLZERO) {
if (!readChunk(targetBlocks[i], i)) {
alignedStripe.missingChunksNum++;
}
}
}
// There are missing block locations at this stage. Thus we need to read
// the full stripe and one more parity block.
if (alignedStripe.missingChunksNum > 0) {
checkMissingBlocks();
readDataForDecoding();
// read parity chunks
readParityChunks(alignedStripe.missingChunksNum);
}
// TODO: for a full stripe we can start reading (dataBlkNum + 1) chunks
// Input buffers for potential decode operation, which remains null until
// first read failure
while (!futures.isEmpty()) {
try {
StripingChunkReadResult r = StripedBlockUtil
.getNextCompletedStripedRead(service, futures, 0);
if (DFSClient.LOG.isDebugEnabled()) {
DFSClient.LOG.debug("Read task returned: " + r + ", for stripe "
+ alignedStripe);
}
StripingChunk returnedChunk = alignedStripe.chunks[r.index];
Preconditions.checkNotNull(returnedChunk);
Preconditions.checkState(returnedChunk.state == StripingChunk.PENDING);
if (r.state == StripingChunkReadResult.SUCCESSFUL) {
returnedChunk.state = StripingChunk.FETCHED;
alignedStripe.fetchedChunksNum++;
updateState4SuccessRead(r);
if (alignedStripe.fetchedChunksNum == dataBlkNum) {
clearFutures();
break;
}
} else {
returnedChunk.state = StripingChunk.MISSING;
// close the corresponding reader
dfsStripedInputStream.closeReader(readerInfos[r.index]);
final int missing = alignedStripe.missingChunksNum;
alignedStripe.missingChunksNum++;
checkMissingBlocks();
readDataForDecoding();
readParityChunks(alignedStripe.missingChunksNum - missing);
}
} catch (InterruptedException ie) {
String err = "Read request interrupted";
DFSClient.LOG.error(err);
clearFutures();
// Don't decode if read interrupted
throw new InterruptedIOException(err);
}
}
if (alignedStripe.missingChunksNum > 0) {
decode();
}
}
/**
* Some fetched {@link StripingChunk} might be stored in original application
* buffer instead of prepared decode input buffers. Some others are beyond
* the range of the internal blocks and should correspond to all zero bytes.
* When all pending requests have returned, this method should be called to
* finalize decode input buffers.
*/
void finalizeDecodeInputs() {
for (int i = 0; i < alignedStripe.chunks.length; i++) {
final StripingChunk chunk = alignedStripe.chunks[i];
if (chunk != null && chunk.state == StripingChunk.FETCHED) {
if (chunk.useChunkBuffer()) {
chunk.getChunkBuffer().copyTo(decodeInputs[i].getBuffer());
} else {
chunk.getByteBuffer().flip();
}
} else if (chunk != null && chunk.state == StripingChunk.ALLZERO) {
decodeInputs[i].setAllZero(true);
}
}
}
/**
* Decode based on the given input buffers and erasure coding policy.
*/
void decodeAndFillBuffer(boolean fillBuffer) throws IOException {
// Step 1: prepare indices and output buffers for missing data units
int[] decodeIndices = prepareErasedIndices();
final int decodeChunkNum = decodeIndices.length;
ECChunk[] outputs = new ECChunk[decodeChunkNum];
for (int i = 0; i < decodeChunkNum; i++) {
outputs[i] = decodeInputs[decodeIndices[i]];
decodeInputs[decodeIndices[i]] = null;
}
// Step 2: decode into prepared output buffers
decoder.decode(decodeInputs, decodeIndices, outputs);
// Step 3: fill original application buffer with decoded data
if (fillBuffer) {
for (int i = 0; i < decodeIndices.length; i++) {
int missingBlkIdx = decodeIndices[i];
StripingChunk chunk = alignedStripe.chunks[missingBlkIdx];
if (chunk.state == StripingChunk.MISSING && chunk.useChunkBuffer()) {
chunk.getChunkBuffer().copyFrom(outputs[i].getBuffer());
}
}
}
}
/**
* Prepare erased indices.
*/
int[] prepareErasedIndices() {
int[] decodeIndices = new int[parityBlkNum];
int pos = 0;
for (int i = 0; i < alignedStripe.chunks.length; i++) {
if (alignedStripe.chunks[i] != null &&
alignedStripe.chunks[i].state == StripingChunk.MISSING){
decodeIndices[pos++] = i;
}
}
int[] erasedIndices = Arrays.copyOf(decodeIndices, pos);
return erasedIndices;
}
void clearFutures() {
for (Future<Void> future : futures.keySet()) {
future.cancel(false);
}
futures.clear();
}
boolean useDirectBuffer() {
return decoder.preferDirectBuffer();
}
}
|
[
"ean@arenadata.io"
] |
ean@arenadata.io
|
cef416c85dd4604baa4d170d70ee5c193139c6b0
|
4fd23bd3afe6687ac26023dda1478b0dae34f1d8
|
/src/com/class27/Phone.java
|
809568d77a3c2e23e06e6eab4fde6acf158a3586
|
[] |
no_license
|
Zhenissyntax/JAVA-classes
|
86971c2b3145bb289ae8ea1ac75ab3cd754333e6
|
11866fc19c696c80f73f1937d2c9ec39320f5e19
|
refs/heads/master
| 2020-05-03T00:08:23.451622
| 2019-05-04T18:52:06
| 2019-05-04T18:52:06
| 178,301,873
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,123
|
java
|
package com.class27;
public abstract class Phone{
public void makeCall() {
System.out.println("Phone can call");
}
public void sendText() {
System.out.println("Phone can sned text");
}
public abstract void unlockPhone();
public abstract void viewPictures();
}
class iPhone extends Phone{
@Override
public void unlockPhone() {
System.out.println("To unlock Iphone we can use FaceId or FingerPrint");// concrete class-is class that is inherited from a abstract class or we implemented by interface
//and providing implementation of all unimplimented / abstract classes3
// TODO Auto-generated method stub
}
@Override
public void viewPictures() {
System.out.println("To view Pictures on IPhone can go to Images");
// TODO Auto-generated method stub
}
}
class Samsung extends Phone{
@Override
public void unlockPhone() {
System.out.println("To unlock Samsung we need use password");
// TODO Auto-generated method stub
}
@Override
public void viewPictures() {
System.out.println("To view pic we can go to the Pictures");
// TODO Auto-generated method stub
}
}
|
[
"zhenisismagambetov@gmail.com"
] |
zhenisismagambetov@gmail.com
|
cf45ebac8c14730e2f7682b110a79d73908a9f22
|
b297b1dcf292b09c4bddf14186ec0e973f4b0435
|
/common-web/src/main/java/com/nemustech/common/json/JsonValidator.java
|
c1341c05995d189edec8b54486867e423751328e
|
[
"Apache-2.0"
] |
permissive
|
koreafood/common
|
8e0ec7cf40abe4a51199c4a034eda8068dc53581
|
b25ac9acde235e68a897ea084a8564bc83dcdffa
|
refs/heads/master
| 2020-03-24T02:50:09.879560
| 2018-04-27T13:12:20
| 2018-04-27T13:12:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 705
|
java
|
package com.nemustech.common.json;
import java.util.List;
/**
* Json Schema 검증 서비스를 위한 interface
*
*
* @version 1.0.0
*
*/
public interface JsonValidator {
/**
* Schema를 검증한다.
*
* @param text 검증할 Json 문자열
* @param schema 검증에 사용할 Json의 Schema 문자열
* @return 검증 결과. <code>true</code>이면, Schema에 맞는 Json 문자열이다.
*/
abstract public boolean validate(String text, String schema);
/**
* Schema 검증에 실패 시에 상세 이유를 돌려 준다.
*
* @return 상세 이유를 문자열로 가진 {@code List<String>} 객체
*/
public List<String> errors();
}
|
[
"skoh@nemustech.com"
] |
skoh@nemustech.com
|
5a54c6e68e8e0b72ab0c4cb56a4aa4cd6f1f48a9
|
7c91165e686b3693efd9a70608d9c823efff4012
|
/Ewill/app/src/main/java/com/moonlay/litewill/fragments/will/MyWillsFragment.java
|
bbb83460a184b514aa884695d06c50d97009ceb3
|
[] |
no_license
|
adya011/ewilltest
|
a0c4daba6ce56fbdd7a8a0054a3cf6b18623495b
|
396fa9870d5a6edbcdae23b9f6d7fd5136857339
|
refs/heads/master
| 2020-03-26T20:34:00.015328
| 2018-08-23T11:15:08
| 2018-08-23T11:15:08
| 145,330,103
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,874
|
java
|
package com.moonlay.litewill.fragments.will;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import com.moonlay.litewill.DashboardActivity;
import com.moonlay.litewill.R;
import com.moonlay.litewill.WillActivity;
import com.moonlay.litewill.adapter.MyWillsAdapter;
import com.moonlay.litewill.adapter.MyWillsItemListener;
import com.moonlay.litewill.api.ApiInterface;
import com.moonlay.litewill.api.RestProvider;
import com.moonlay.litewill.config.Constants;
import com.moonlay.litewill.fragments.BaseFragment;
import com.moonlay.litewill.fragments.reg_will.Regw1WillNameFragment;
import com.moonlay.litewill.model.MemberInfoResponse;
import com.moonlay.litewill.model.MyWillDetail;
import com.moonlay.litewill.model.MyWillResponse;
import com.moonlay.litewill.utility.SharedPrefManager;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/**
* A simple {@link Fragment} subclass.
*/
public class MyWillsFragment extends BaseFragment {
private static String TAG = "mydebug_mywill";
public List<MyWillDetail> myWills = new ArrayList<>();
SharedPrefManager sharedPrefManager;
ApiInterface apiInterface;
RecyclerView recyclerView;
MyWillsAdapter adapter;
Button btnCreate;
int memberMaxWill;
public MyWillsFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_my_will, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
sharedPrefManager = new SharedPrefManager(getContext());
apiInterface = RestProvider.getClient2().create(ApiInterface.class);
recyclerView = mView.findViewById(R.id.recycler_view);
adapter = new MyWillsAdapter(myWills);
btnCreate = mView.findViewById(R.id.btn_create);
((WillActivity) getActivity()).setActionBarTitle("Wills");
((WillActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);
init();
}
public void init() {
//btnCreate.setVisibility(View.INVISIBLE);
testNotificationCount();
getUserMaxWill();
requestMyWills();
btnCreate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.frame_will, new Regw1WillNameFragment());
ft.addToBackStack(null);
ft.commit();
}
});
}
private void testNotificationCount(){
sharedPrefManager.addNotificationCount(2);
/*LayoutInflater inflater = (LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View vi = inflater.inflate(R.layout.activity_dashboard, null);
TextView tv = vi.findViewById()*/
/*LayoutInflater inflater = (LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View vi = inflater.inflate(R.layout.activity_dashboard, null);*/
//((DashboardActivity)getActivity()).findViewById(R.id.recycler_view);
}
private void getUserMaxWill() {
String token = sharedPrefManager.getLoginToken();
String uniqueID = UUID.randomUUID().toString();
Call<MemberInfoResponse> call = apiInterface.memberInfo(uniqueID, Constants.HEADER_AGENT,
Constants.HEADER_VERSION, token);
call.enqueue(new Callback<MemberInfoResponse>() {
@Override
public void onResponse(Call<MemberInfoResponse> call, Response<MemberInfoResponse> response) {
Log.d(TAG, "Get Member Info API Response. Code: " + response.code() + ". isSuccessfull: " + response.isSuccessful());
memberMaxWill = response.body().getResult().get(0).getSubscriptions().get(0).getMaxWillAllowed();
Log.d(TAG, "getUserMaxWill: " + memberMaxWill);
}
@Override
public void onFailure(Call<MemberInfoResponse> call, Throwable t) {
}
});
}
private void requestMyWills() {
final String token = sharedPrefManager.getLoginToken();
String uniqueID = UUID.randomUUID().toString();
Call<MyWillResponse> call = apiInterface.myWillList(uniqueID, Constants.HEADER_AGENT, Constants.HEADER_VERSION, token);
call.enqueue(new Callback<MyWillResponse>() {
@Override
public void onResponse(Call<MyWillResponse> call, Response<MyWillResponse> response) {
Log.d(TAG, "API Response. Code: " + response.code() + ". isSuccessfull: " + response.isSuccessful());
myWills.addAll(response.body().getResult());
getMyWillList();
Log.d(TAG, "Request My Wills. Member max will: " + memberMaxWill);
if (myWills.size() < memberMaxWill) {
/*btnCreate.setVisibility(View.VISIBLE);*/
btnCreate.setEnabled(true);
} else {
/*btnCreate.setVisibility(View.INVISIBLE);*/
btnCreate.setEnabled(false);
}
adapter.notifyDataSetChanged();
}
@Override
public void onFailure(Call<MyWillResponse> call, Throwable t) {
Log.d(TAG, "Failed");
}
});
}
private void getMyWillList() {
Log.d(TAG, "getMyWillList");
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());
recyclerView.setLayoutManager(layoutManager);
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setAdapter(adapter);
recyclerView.addOnItemTouchListener(new MyWillsItemListener(getContext(), recyclerView,
new MyWillsItemListener.ClickListener() {
@Override
public void onClick(View view, int position) {
MyWillDetail myWillDet = myWills.get(position);
Log.d(TAG, "data clicked: " + myWillDet.getId() + " " + myWillDet.getName());
int willId = myWillDet.getId();
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.frame_will, MyWillDetailFragment.newInstance(willId));
ft.addToBackStack(null);
ft.commit();
}
@Override
public void onLongClick(View view, int position) {
}
}));
}
public void refreshAdapter() {
adapter.notifyDataSetChanged();
}
@Override
public void onResume() {
super.onResume();
Log.d(TAG, "wills on resume");
myWills.clear();
}
}
|
[
"samudera.nanda@gmail.com"
] |
samudera.nanda@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.