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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
817a7f94023ee4de508d7b6d3a2f78d14e03208d | e416c74387ef6e7e861a4169d1d294ed7ddfe137 | /src/org/logginging/java/lib/clitools4j/CommandProcedureException.java | c287011bf60fd7e6753c3652a50514c43f2f88f1 | [
"MIT"
] | permissive | mironal/CliTools4j | e49deceec99c59ae900b04d079fbab5a8aa01e11 | b91d394d674731dd8838149b245b1b86abbd8dfa | refs/heads/master | 2021-01-13T01:35:56.410481 | 2012-12-13T11:34:50 | 2012-12-13T11:34:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 318 | java | package org.logginging.java.lib.clitools4j;
public class CommandProcedureException extends Exception {
/**
*
*/
private static final long serialVersionUID = -3985136202622166873L;
public CommandProcedureException(String message) {
super(message);
}
}
| [
"miro.gunp@gmail.com"
] | miro.gunp@gmail.com |
a226475ad752507782e9030300781274fc4747d1 | fd9408158a6fd90b342eac926729ef1e6256bdad | /javabasic/com.study.java.parent/spring-boot/src/main/java/com/springboot/controller/UserController.java | 30402b8dc47ebf8e3669a45c1c4092535b77ec7e | [] | no_license | seeyoula/javastudy | ed61a15168dea3406ab9178b883e499a623f09a8 | 020e7578518fca091b672cf4d9d680ec291e7369 | refs/heads/master | 2022-12-23T06:25:01.939061 | 2019-11-24T07:16:18 | 2019-11-24T07:16:18 | 59,389,750 | 1 | 0 | null | 2022-12-16T01:41:49 | 2016-05-22T01:44:09 | Java | UTF-8 | Java | false | false | 698 | java | package com.springboot.controller;
import com.springboot.entity.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by Administrator on 2017/8/6.
*/
@RestController
@RequestMapping("/user")
public class UserController {
@RequestMapping("/{id}")
public User view(@PathVariable("id") Long id) {
User user = new User();
user.setId(id);
user.setName("zhang");
return user;
}
}
| [
"wangxiaoquan9@163.com"
] | wangxiaoquan9@163.com |
f972b55f1d3ee77529488034bcfce1d0698e8c5c | 058a87e4d1687647227f2310820d4455c62e4990 | /src/xadrez/PecaXadrez.java | 2822deb17aa08fc8750b0ecf64789907315c6530 | [] | no_license | marcos-vinicios/xadrez-sistema-java | f1214e5fd935436262980e37e36977b2fd82bb51 | f6c9afb7c943dcb5b184bb4837a9ebce7ce8b56c | refs/heads/master | 2020-07-15T03:25:14.531414 | 2019-09-16T22:06:55 | 2019-09-16T22:06:55 | 205,468,400 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 794 | java | package xadrez;
import tabuleiroJogo.Peca;
import tabuleiroJogo.Posicao;
import tabuleiroJogo.Tabuleiro;
public abstract class PecaXadrez extends Peca{
private Color color;
private int moveContagem;
public PecaXadrez(Tabuleiro tabuleiro, Color color) {
super(tabuleiro);
this.color = color;
}
public Color getColor() {
return color;
}
public int getMoveContagem() {
return moveContagem;
}
public void inclementarMoveContagem() {
moveContagem++;
}
public void decrescendoMoveContagem() {
moveContagem--;
}
public PosicaoXadrez getPosicaoXadrez() {
return PosicaoXadrez.daPosicao(posicao);
}
protected boolean existeOponentePeca(Posicao posicao) {
PecaXadrez p = (PecaXadrez)getTabuleiro().peca(posicao);
return p != null && p.getColor() != color;
}
}
| [
"marcosviniciosj2@gmail.com"
] | marcosviniciosj2@gmail.com |
ed14a36c127033bc806a5c1320f3afaeb9beeac4 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/flink/2015/4/SimpleCommunityDetectionData.java | 20b562b5e0740d9e228179d2fb2c140227c68504 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 2,585 | 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.flink.graph.example.utils;
import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.graph.Edge;
import java.util.ArrayList;
import java.util.List;
/**
* Provides the default data set used for the Simple Community Detection example program.
* If no parameters are given to the program, the default edge data set is used.
*/
public class SimpleCommunityDetectionData {
// the algorithm is not guaranteed to always converge
public static final Integer MAX_ITERATIONS = 30;
public static final double DELTA = 0.5f;
public static DataSet<Edge<Long, Double>> getDefaultEdgeDataSet(ExecutionEnvironment env) {
List<Edge<Long, Double>> edges = new ArrayList<Edge<Long, Double>>();
edges.add(new Edge<Long, Double>(1L, 2L, 1.0));
edges.add(new Edge<Long, Double>(1L, 3L, 2.0));
edges.add(new Edge<Long, Double>(1L, 4L, 3.0));
edges.add(new Edge<Long, Double>(2L, 3L, 4.0));
edges.add(new Edge<Long, Double>(2L, 4L, 5.0));
edges.add(new Edge<Long, Double>(3L, 5L, 6.0));
edges.add(new Edge<Long, Double>(5L, 6L, 7.0));
edges.add(new Edge<Long, Double>(5L, 7L, 8.0));
edges.add(new Edge<Long, Double>(6L, 7L, 9.0));
edges.add(new Edge<Long, Double>(7L, 12L, 10.0));
edges.add(new Edge<Long, Double>(8L, 9L, 11.0));
edges.add(new Edge<Long, Double>(8L, 10L, 12.0));
edges.add(new Edge<Long, Double>(8L, 11L, 13.0));
edges.add(new Edge<Long, Double>(9L, 10L, 14.0));
edges.add(new Edge<Long, Double>(9L, 11L, 15.0));
edges.add(new Edge<Long, Double>(10L, 11L, 16.0));
edges.add(new Edge<Long, Double>(10L, 12L, 17.0));
edges.add(new Edge<Long, Double>(11L, 12L, 18.0));
return env.fromCollection(edges);
}
private SimpleCommunityDetectionData() {}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
e45c892c5bd95a667372012c9d574651985f4b66 | 1a189d05c961756a850fd57c9c3b91489ded8bb7 | /src/dataStructure/linkedList/LoopNode.java | c85ada4ed649b284eceb0b9686b88907f66cd133 | [] | no_license | wangqianping/Algorithms | da5a5761a63e469c34f27589d7b880f0bc073a94 | 44180322164d45c384fd42928abd2f3a0c2ba218 | refs/heads/master | 2021-03-30T06:53:53.412604 | 2020-04-06T18:01:29 | 2020-04-06T18:01:29 | 248,027,060 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,004 | java | package dataStructure.linkedList;
/**
* 循环链表
* <p>
* 和单链表唯一的区别就是最后一个节点指向第一个节点
*/
public class LoopNode {
private int data;
private LoopNode next = this;
public LoopNode(int data) {
this.data = data;
}
/**
* 删除下一个节点
*/
public void removeNext() {
//取出下下个节点
LoopNode node = next.next;
//将下下个节点赋值给当前节点的下一个节点
next = node;
}
/**
* 插入一个节点
*/
public void insert(LoopNode node) {
//下一节点作为当前节点的下一节点
node.next = next;
//要插入的节点作为当前节点的下一个节点
this.next = node;
}
/**
* 获取下一个节点
*/
public LoopNode next() {
return next;
}
/**
* 获取节点中的数据
*/
public int getData() {
return this.data;
}
}
| [
"1981517703@qq.com"
] | 1981517703@qq.com |
6092aef7ee676af1258f544210002141afd5b439 | baed17757992f47ba36899faca16c5d7f9245c76 | /src/main/java/other/LeetSpeakConverter.java | a2e16144e81c87c81913f3d14311960f736321ab | [] | no_license | ncapasso/JavaProgrammingExercises | cb9b27a82a1184af05d6cf3bf03fbdbd24a265a7 | deed64a0f35506fd6b75c72306c982e13237e9b2 | refs/heads/master | 2020-12-30T12:01:19.582461 | 2017-05-25T21:13:08 | 2017-05-25T21:13:08 | 91,497,504 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,764 | java | package other;
import utilities.IOUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
/**
* Created by ncapasso on 5/25/2017.
*/
public class LeetSpeakConverter {
private static final Map<String, String[]> leetMap;
static {
leetMap = new HashMap<>();
leetMap.put("a", new String[]{"/-\\", "/\\", "4", "@"});
leetMap.put("b", new String[]{"|3", "8", "|o"});
leetMap.put("c", new String[]{"(", "<", "K", "S"});
leetMap.put("d", new String[]{"|)", "o|", "|>", "<|"});
leetMap.put("e", new String[]{"3"});
leetMap.put("f", new String[]{"|=", "ph"});
leetMap.put("g", new String[]{"(", "9", "6"});
leetMap.put("h", new String[]{"|-|", "]-[", "}-{", "(-)", ")-(", "#"});
leetMap.put("i", new String[]{"l", "1", "|", "!", "]["});
leetMap.put("j", new String[]{"_|"});
leetMap.put("k", new String[]{"|<", "/<", "\\<", "|{"});
leetMap.put("l", new String[]{"|_", "|", "1"});
leetMap.put("m", new String[]{"|\\/|", "/\\/\\", "|'|'|", "(\\/)", "/\\\\", "/|\\", "/v\\"});
leetMap.put("n", new String[]{"|\\|", "/\\/", "|\\\\|", "/|/"});
leetMap.put("o", new String[]{"o", "()", "[]", "{}"});
leetMap.put("p", new String[]{"|2", "|D"});
leetMap.put("q", new String[]{"(,)", "kw"});
leetMap.put("r", new String[]{"|2", "|Z", "|?"});
leetMap.put("s", new String[]{"5", "$"});
leetMap.put("t", new String[]{"+", "\'][\'", "7"});
leetMap.put("u", new String[]{"|_|"});
leetMap.put("v", new String[]{"[/", "\\|", "\\/", "/"});
leetMap.put("w", new String[]{"\\/\\/", "\\|\\|", "|/|/", "\\|/", "\\^/", "//"});
leetMap.put("x", new String[]{"><", "}{"});
leetMap.put("y", new String[]{"`/", "\'/", "j"});
leetMap.put("z", new String[]{"2", "(\\)"});
}
public static void main(String[] args) {
// System.out.println(wordConverter("test123"));
System.out.println("Please enter words to convert into leet-speak. Empty line exits.");
ArrayList<String> input = IOUtils.getInput(System.in);
System.out.println("Do you want vowels to be changed? y/n");
String boolResp = IOUtils.getInputSingleLine(System.in);
if (boolResp != null && boolResp.toLowerCase().equals("n")) {
for (String s : input) {
System.out.println("Original word: " + s + "\nConverted word: " + wordConverter(s , true));
}
} else {
for (String s : input) {
System.out.println("Original word: " + s + "\nConverted word: " + wordConverter(s, false));
}
}
}
private static String wordConverter(String input, boolean changeVowels) {
Random random = new Random();
StringBuilder str = new StringBuilder();
char[] wordChar = input.toCharArray();
for (char c : wordChar) {
String tempStr = Character.toString(c).toLowerCase();
if (changeVowels && isAVowel(c)) {
str.append(c);
continue;
}
if (leetMap.containsKey(tempStr)) {
String[] tempArr = leetMap.get(tempStr);
str.append(tempArr[random.nextInt((tempArr.length))]);
} else {
str.append(c);
}
}
return str.toString();
}
private static boolean isAVowel(char c) {
switch (Character.toLowerCase(c)) {
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
return true;
default:
return false;
}
}
}
| [
"foxtrot261@gmail.com"
] | foxtrot261@gmail.com |
8675f87f8558b6cc69c1b207367b3578c1661aca | a94736b4cc9e44c469429e821e4f913729542b74 | /src/sample/dataBase/DataBaseHandler.java | 5bee4311cdb0e92c71205c61e50c7a360b8c1bb4 | [] | no_license | ZoviProstoDMT/Shop_Database | 9ba4f1e19f5e602376b931bec0d256ba6586e1f3 | f40c15e935ba0d741da9d7330bf8381ee280c114 | refs/heads/master | 2023-01-21T20:53:54.498358 | 2020-11-27T11:08:19 | 2020-11-27T11:08:19 | 242,668,077 | 0 | 1 | null | 2020-03-10T10:04:06 | 2020-02-24T06:59:31 | Java | UTF-8 | Java | false | false | 3,169 | java | package sample.dataBase;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.control.TableView;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.ResultSet;
public class DataBaseHandler extends Configs {
Connection dbConnection;
public Connection getDbconnection() throws ClassNotFoundException, SQLException {
String connectionString = "jdbc:postgresql://" + dbHost + ":" + dbPort + "/" + dbName;
dbConnection = DriverManager.getConnection(connectionString, dbUser, dbPass);
return dbConnection;
}
public void signUpUser(User user) {
String insert = "INSERT INTO " + Const.USER_TABLE + "(" + Const.USER_FIRSTNAME + "," + Const.USER_LASTNAME + "," + Const.USER_USERNAME
+ "," + Const.USER_PASSWORD + "," + Const.USER_LOCATION + "," + Const.USER_GENDER + ")" + "VALUES(?,?,?,?,?,?)";
try {
PreparedStatement prSt = getDbconnection().prepareStatement(insert);
prSt.setString(1, user.getFirstname());
prSt.setString(2, user.getLastname());
prSt.setString(3, user.getUsername());
prSt.setString(4, user.getPassword());
prSt.setString(5, user.getLocation());
prSt.setString(6, user.getGender());
prSt.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
public ResultSet getUser(User user) {
ResultSet resSet = null;
String select = "SELECT * FROM " + Const.USER_TABLE + " WHERE " + Const.USER_USERNAME + " =? AND " + Const.USER_PASSWORD + " =?";
try {
PreparedStatement prSt = getDbconnection().prepareStatement(select);
prSt.setString(1,user.getUsername());
prSt.setString(2,user.getPassword());
resSet = prSt.executeQuery();
}
catch (SQLException e) {
e.printStackTrace();
}
catch (ClassNotFoundException e) {
e.printStackTrace();
}
return resSet;
}
public void deleteUser(String name) {
String delete = "DELETE FROM " + Const.USER_TABLE + " WHERE " + Const.USER_USERNAME + " ='" + name +"';";
try {
PreparedStatement prSt = getDbconnection().prepareStatement(delete);
prSt.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
public void changeUserRole(String name, String role) {
String up = "UPDATE " + Const.USER_TABLE + " SET role = '" + role + "' WHERE " + Const.USER_USERNAME + " = '" + name + "';";
try {
PreparedStatement prSt = getDbconnection().prepareStatement(up);
prSt.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
| [
"kozikov.dmitrii@mail.ru"
] | kozikov.dmitrii@mail.ru |
8ae7d591165a8c4d8fe7e07cf5355ab3aa0f25bd | 4c2c911dd9bd7a7b30bec1b240553bf0169f1472 | /src/main/java/com/gsl/coolweather/app/MainActivity.java | 9e5017ba7f0a1ff599d92cf2403ca1537c07677f | [] | no_license | guosenlin/coolweather | 2510d1cb85d1909178e5f79c8e15b3583ea0e192 | 533b7eaddaa4435319ef76841f8ae301bb4cf526 | refs/heads/master | 2021-04-15T13:40:47.578399 | 2016-08-05T16:57:11 | 2016-08-05T16:57:11 | 65,031,568 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 307 | java | package com.gsl.coolweather.app;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
| [
"951033414@qq.com"
] | 951033414@qq.com |
7a611b6debefa470e32fefc0b68e15df85dff5e8 | 3ec45313838c78fb175d16ba05c6a9140a790c9b | /SportEventAnalyserService/src/de/tudresden/inf/rn/mobilis/server/services/sea/service/proxy/ISportEventAnalyserIncoming.java | 42953a057c0240b60d12f7ad881fd9cde276b459 | [] | no_license | pschwede/sporteventanalyser | bb4546f1e7f62acc4ea0f43781aea64f62bd09c5 | 594782dfa28d1ec9300792245c282206d2601842 | refs/heads/master | 2021-01-23T07:35:02.532986 | 2013-08-14T17:41:52 | 2013-08-14T17:41:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 226 | java | package de.tudresden.inf.rn.mobilis.server.services.sea.service.proxy;
import de.tudresden.inf.rn.mobilis.xmpp.beans.XMPPBean;
public interface ISportEventAnalyserIncoming {
XMPPBean onGameMappings( MappingRequest in );
} | [
"patrick.tempel@live.de"
] | patrick.tempel@live.de |
e5f4f525d20f19bdc54a2816a0cdf57fb81a2314 | c47d4038f4b30ce6ea2ef25609686ea438b6d11f | /src/main/java/study/dfs/ActualProblem4.java | 08e47e2e00d228d6fe4cdb6f3bb6c90d69065e45 | [] | no_license | Rok93/codingtest-example | b93ed2b1683e4187aece21cb3499128585501b3e | 729c425a7cfacb83f8ad6a0981a77670ab1617d6 | refs/heads/master | 2021-08-22T04:05:04.225362 | 2021-07-13T09:49:20 | 2021-07-13T09:49:20 | 232,443,346 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,675 | java | package study.dfs;
//괄호 변환
public class ActualProblem4 {
public String solution(String p) {
if (isCorrect(p)) { // 올바른 괄호문자열!
return p;
}
return editWord(p);
}
private boolean isCorrect(String s) {
int repetitionNumber = s.length() / 2;
String copiedP = s;
for (int i = 0; i < repetitionNumber; i++) {
copiedP = copiedP.replaceAll("\\(\\)", "");
}
return copiedP.isEmpty();
}
private String editWord(String p) {
if (p.isEmpty()) {
return p;
}
int findIndex = findUIndex(p);
String u = p.substring(0, findIndex + 1);
String v = p.substring(findIndex + 1);
if (isCorrect(u)) {
return u + editWord(v);
}
return "(" + editWord(v) + ")" + turnString(u.substring(1, u.length() - 1));
}
private String turnString(String s) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == '(') {
sb.append(")");
continue;
}
sb.append("(");
}
return sb.toString();
}
private int findUIndex(String p) {
int leftCnt = 0;
int rightCnt = 0;
int i = 0;
while (true) {
char c = p.charAt(i);
if (c == '(') {
leftCnt++;
}
if (c == ')') {
rightCnt++;
}
if (leftCnt == rightCnt) {
break;
}
i++;
}
return i;
}
}
| [
"goodboy3421@gmail.com"
] | goodboy3421@gmail.com |
ec708054fbef8cc224250161bc6bb94f329a0a26 | d64d62de28802e86a80ea3456f80b3bea2efe8bb | /BancoImobiliario_POO/src/tabuleiro/Prisao.java | 90a76fca3de8315be6c5e4a0e3c466ca367c4f4b | [] | no_license | WeslleyGRR/BancoImobiliario | ab5f5a264e394a95c958c9d318ff8bea6c3215b0 | fb689cec6996bf0787e09c5da9eaafc2afd3eb8b | refs/heads/master | 2020-06-30T17:43:07.898075 | 2019-08-06T18:02:41 | 2019-08-06T18:02:41 | 200,900,040 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 117 | java | package tabuleiro;
public class Prisao implements CasaTabuleiro{
public String getNome(){
return "Prisao";
}
}
| [
"weslley.gabriel@dce.ufpb.br"
] | weslley.gabriel@dce.ufpb.br |
6362d6a30619eaaff8a55aa040df7dde4d8c9f6d | 3ca1d1a6a844a7b9346a28b853ebc47a3b09a146 | /FacebookLoginSignup/app/src/test/java/com/example/abhishek/facebookloginsignup/ExampleUnitTest.java | 0891051089d6fa2561175ce4c803ce2b312a36ae | [] | no_license | AbhishekTiwari0812/MISC | 5c47c79814fd909cf4ab6111933637cbbb4970e9 | 16788dc27a0c448d6661448266b9a42c0d8595c3 | refs/heads/master | 2021-01-17T10:34:41.957842 | 2016-04-16T17:47:27 | 2016-04-16T17:47:27 | 41,962,927 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 333 | java | package com.example.abhishek.facebookloginsignup;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"abhishektiwari08121994007@gmail.com"
] | abhishektiwari08121994007@gmail.com |
8b839fc5273934aa0e7fe14e1e0ea2163b9200c1 | a3295d1f841e32d4551c36684c1543fda2c8e26f | /src/main/java/BeautyIt/BP/Menu/RemoveAdminMenu.java | 3013dd159a91cc8c9b67cf9c0e30e0afbdfd1d58 | [] | no_license | ShantKhayalian/BeautyProductsWebWorks | 85b322b68a28a728c9388e7e3b4669ad2b5c28c9 | 0fd29a4ce73c57b95f61e3eef45903344190c137 | refs/heads/master | 2023-01-24T05:51:17.951306 | 2019-04-19T06:21:35 | 2019-04-19T06:21:35 | 170,174,165 | 0 | 0 | null | 2023-01-11T19:55:42 | 2019-02-11T17:49:23 | HTML | UTF-8 | Java | false | false | 4,853 | java | package BeautyIt.BP.Menu;
import BeautyIt.BP.Bean.Admin;
import BeautyIt.BP.Bean.Menu;
import BeautyIt.BP.Bean.Messaging;
import BeautyIt.BP.Dao.AdminDao;
import BeautyIt.BP.Dao.MenuDao;
import BeautyIt.BP.Dao.UsersDao;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@WebServlet("/RemoveAdminMenu")
public class RemoveAdminMenu extends HttpServlet {
private String AdminEmailFromSession = null;
private AdminDao adminDao = new AdminDao();
private String adminUserName = null;
private int adminId = 0;
private List<Admin> adminInfoList = new ArrayList<>();
private List<Messaging> messagingList = new ArrayList<>();
private UsersDao usersDao = new UsersDao();
private int CountAdminMessages = 0;
private MenuDao menuDao = new MenuDao();
private String MenuIdString = null;
private int menuId = 0;
private List<Menu>menuAllList = new ArrayList<>();
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
removeAdminMenu(request, response);
} catch (SQLException e) {
e.printStackTrace();
}
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
removeAdminMenu(request, response);
} catch (SQLException e) {
e.printStackTrace();
}
}
private void removeAdminMenu(HttpServletRequest request, HttpServletResponse response) throws SQLException, ServletException, IOException {
getAdminSession(request);
getAdminFullInfo(AdminEmailFromSession);
getAdminId(AdminEmailFromSession);
checkEmailCount();
getParameters(request);
convertToInt(MenuIdString);
removeMenuFromData(menuId, request, response);
}
private int convertToInt(String MenuIdString) {
menuId = Integer.parseInt(MenuIdString);
return menuId;
}
private void removeMenuFromData(int menuId, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
int deletingMenu = menuDao.deleteMenu(menuId);
if (deletingMenu > 0) {
getMenuList();
String message = "something went wrong";
gotoPage(request, response, message);
} else {
getMenuList();
String message = "Menu Deleted";
gotoPage(request, response, message);
}
}
private List<Menu> getMenuList() {
menuAllList = menuDao.LoadAllMenu();
return menuAllList;
}
private void gotoPage(HttpServletRequest request, HttpServletResponse response, String message) throws ServletException, IOException {
request.setAttribute("message", message);
request.setAttribute("menuAllList",menuAllList);
request.setAttribute("CountAdminMessages", CountAdminMessages);
request.setAttribute("AdminEmail", adminId);
request.getRequestDispatcher("/WEB-INF/Admin/AdminShowAllMenu.jsp").forward(request, response);
}
private void getParameters(HttpServletRequest request) {
MenuIdString = request.getParameter("MenuId");
}
private int checkEmailCount() throws SQLException {
CountAdminMessages = 0;
messagingList = usersDao.getAdminMessages(adminId);
for (Messaging messaging : messagingList) {
if (messaging.getMessageRead().toLowerCase().trim().equals("false")) {
CountAdminMessages++;
}
}
return CountAdminMessages;
}
private int getAdminId(String adminEmailFromSession) {
adminInfoList = adminDao.LoadAdminByEmail(adminEmailFromSession);
for (int i = 0; i < adminInfoList.size(); i++) {
adminId = adminInfoList.get(i).getAdminId();
}
return adminId;
}
private String getAdminFullInfo(String adminEmailFromSession) {
adminInfoList = adminDao.LoadAdminByEmail(adminEmailFromSession);
for (int i = 0; i < adminInfoList.size(); i++) {
adminUserName = adminInfoList.get(i).getAdmin_Username();
}
return adminUserName;
}
private void getAdminSession(HttpServletRequest request) {
HttpSession session = request.getSession(false);
AdminEmailFromSession = String.valueOf(session.getAttribute("adminuser"));
System.out.println("adminuser : " + AdminEmailFromSession);
}
}
| [
"skhayalian@gmail.com"
] | skhayalian@gmail.com |
1eb309867ee77c29f34fafa3fc51c61511832934 | e4c8f47b59e3025d66089d8606db5d4311975b7f | /app/src/main/java/com/taran/instagram/MainActivity.java | 0d61fad599e0824f4dedaded6f160a6cdffdcb45 | [] | no_license | fatemehtaran/Instagram | 673995e5d6107f6a941aac1707fb593d91a1ab56 | db79b9d28d139ea05fd4ed2341dcd02c75950a76 | refs/heads/master | 2023-01-19T02:36:22.732739 | 2020-11-28T20:04:26 | 2020-11-28T20:04:26 | 316,812,599 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,069 | java | package com.taran.instagram;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private EditText edtUserNameL , edtPasswordL;
private Button btnLogInL , btnSignUpL;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setTitle("log in");
btnSignUpL = findViewById(R.id.btnSignUpL);
btnLogInL = findViewById(R.id.btnLogInL);
edtUserNameL = findViewById(R.id.edtUserNameL);
edtPasswordL = findViewById(R.id.edtPasswordL);
// btnLogInL.setOnClickListener(this);
btnSignUpL.setOnClickListener(this);
}
@Override
public void onClick(View view) {
Intent intent = new Intent(MainActivity.this,SignUp.class);
startActivity(intent);
}
} | [
"you@example.com"
] | you@example.com |
c98001641ebc6b8110145fabd73b73b4f77fc623 | 5da68cf6cbaa6f6235dcaf35a64c191e66789c53 | /src/test/java/com/green/jwt/controllers/LoginControllerTest.java | 15d80e63243a2d0953b09c5d2f456458d1a5b559 | [] | no_license | gaurav-bagga/SpringJWT | e74c8b6cf00c42532b5601ffb26b74012329cae0 | 59328e82c865d01ab39838a5470139202a818c3e | refs/heads/master | 2021-03-12T23:32:57.973236 | 2015-03-01T16:54:00 | 2015-03-01T16:54:00 | 31,083,269 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,534 | java | package com.green.jwt.controllers;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import java.util.Map;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import com.green.jwt.model.User;
import com.green.jwt.service.TokenService;
/**
* This class is responsible for testing the {@link LoginController}.
*
* @author gaurav.bagga
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:test-application-config.xml","file:src/main/webapp/WEB-INF/mvc-config.xml"})
@WebAppConfiguration
public class LoginControllerTest {
private MockMvc mockMvc;
@Autowired private WebApplicationContext webApplicationContext;
@Autowired private TokenService tokenService;
@Before
public void setUp() {
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build();
}
@Test
public void itShouldReturnJWTTokenForValidUser() throws Exception{
//given a user with valid credentials
User user = new User("james", "pass", null);
//when he logs into the system
MvcResult result = mockMvc.perform(post("/login")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(user)))
.andExpect(status().isOk())
.andDo(print())
.andReturn();
//he should get a valid JWT token
MockHttpServletResponse response = result.getResponse();
String token = response.getContentAsString();
Map<String, Object> params = tokenService.verify(token);
Assert.assertNotNull(token);
Assert.assertNotNull(params);
Assert.assertEquals("james", params.get("sub"));
}
@Test
public void itShouldReturn403ForInValidUser() throws Exception{
//given a user with in valid credentials
User user = new User("james", "pass123", null);
//when he logs into the system
MvcResult result = mockMvc.perform(post("/login")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(user)))
//then he should not get a status code unauthorized
.andExpect(status().isUnauthorized())
.andDo(print())
.andReturn();
//and no token should be returned
MockHttpServletResponse response = result.getResponse();
String token = response.getContentAsString();
try{
tokenService.verify(token);
Assert.fail();
}catch(Exception e){
}
}
}
| [
"gaurav.bagga@g.com"
] | gaurav.bagga@g.com |
38cdc1b8004a5c66fda764c6ce8617582995f12a | e84ee4e393ec074a8a0285aa05a88c45eaf4e5e9 | /src/03-Stacks-and-Queues/04-More-about-Leetcode/src/ArrayStack.java | 5bf9b26be6f43ca8e6c3b5029cec75a95daafd88 | [] | no_license | bianxinhuan/Play-with-Data-Structures | 8d29d20aedcc91c95722d16cef41b96dc4d92274 | 1d02fede2616bb422386a0b014d2b1ca5ba3475a | refs/heads/master | 2020-05-07T09:43:13.685279 | 2019-06-24T13:53:21 | 2019-06-24T13:53:21 | 180,388,749 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,180 | java | /**
* -
*
* @author bianxinhuan
* @date 2019-04-17 23:46:02
*/
public class ArrayStack<E> implements Stack<E> {
private Array<E> array;
public ArrayStack(int capacity) {
this.array = new Array<>(capacity);
}
public ArrayStack() {
this.array = new Array<>();
}
@Override
public int getSize() {
return array.getSize();
}
@Override
public boolean isEmpty() {
return array.isEmpty();
}
public int getCapacity() {
return array.getCapacity();
}
@Override
public void push(E e) {
array.addLast(e);
}
@Override
public E pop() {
return array.removeLast();
}
@Override
public E peek() {
return array.getLast();
}
@Override
public String toString() {
StringBuilder res = new StringBuilder();
res.append("Stack: ");
res.append('[');
for (int i = 0; i < array.getSize(); i++) {
res.append(array.get(i));
if (i != array.getSize() - 1) {
res.append(", ");
}
}
res.append("] top");
return res.toString();
}
}
| [
"bianxinhuan@gmail.com"
] | bianxinhuan@gmail.com |
f022352fdb028780fda2210a387fb3b203d2a2d5 | 0c6020d91a64abd35b7f4109c7fbef911f3b8783 | /src/database_instruments/Main.java | e11c011245c35103932a2b95a9636bca9f90f4d1 | [] | no_license | mishka251/JavaPostgres | 0d5bad4941f784bafcafbb0b1c236cd87a89804b | f310be6159f5a73c647aea57a9fe9452ea57d347 | refs/heads/master | 2022-08-16T01:18:33.333485 | 2020-06-22T09:05:44 | 2020-06-22T09:05:44 | 268,355,798 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,276 | java | package database_instruments;
import client_forms.LoginForm;
import javax.swing.*;
import java.sql.SQLException;
import java.util.Random;
public class Main {
static void createDB(PosgtresDB db) throws SQLException {
db.createTable("faculty",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("name", "VARCHAR (100)"),
});
db.createTable("department",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("name", "VARCHAR (100)"),
new TableColumn("faculty_id", "INTEGER", "REFERENCES faculty (id)")
});
db.createTable("group",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("name", "VARCHAR (100)"),
new TableColumn("speciality", "VARCHAR (100)"),
new TableColumn("number", "VARCHAR (100)"),
new TableColumn("word_code", "VARCHAR (100)"),
new TableColumn("number_code", "VARCHAR (100)"),
new TableColumn("department_id", "INTEGER", "REFERENCES department (id)")
});
db.createTable("student",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("name", "VARCHAR (100)"),
new TableColumn("surname", "VARCHAR (100)"),
new TableColumn("patronymic", "VARCHAR (100)"),
new TableColumn("no_zk", "VARCHAR (100)"),
new TableColumn("group_id", "INTEGER", "REFERENCES [group] (id)")
});
db.createTable("subjects",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("name", "VARCHAR (100)"),
});
db.createTable("user",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("name", "VARCHAR (100)"),
new TableColumn("surname", "VARCHAR (100)"),
new TableColumn("patronymic", "VARCHAR (100)"),
new TableColumn("position", "VARCHAR (100)"),
new TableColumn("email", "VARCHAR (100)"),
new TableColumn("phone", "VARCHAR (100)"),
new TableColumn("login", "VARCHAR (100)"),
new TableColumn("password", "VARCHAR (100)"),
});
db.createTable("register",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("control_type", "VARCHAR (100)"),
new TableColumn("date", "DATE"),
new TableColumn("subject_id", "INTEGER", "REFERENCES subjects (id)"),
new TableColumn("group_id", "INTEGER", "REFERENCES [group] (id)"),
new TableColumn("teacher_id", "INTEGER", "REFERENCES user (id)"),
});
db.createTable("rating",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("number", "INTEGER"),
new TableColumn("student_marks", "STRING"),
new TableColumn("group_id", "INTEGER", "REFERENCES [group] (id)"),
});
db.createTable("report",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("excellent_percent", "DOUBLE"),
new TableColumn("strikers_percent", "DOUBLE"),
new TableColumn("threesome_percent", "DOUBLE"),
new TableColumn("loosers_percent", "DOUBLE"),
new TableColumn("group_id", "INTEGER", "REFERENCES [group] (id)"),
new TableColumn("subject_id", "INTEGER", "REFERENCES subjects (id)"),
});
db.createTable("student_mark_in_register",
new TableColumn[]{
new TableColumn("id", "INTEGER", "PRIMARY KEY AUTOINCREMENT"),
new TableColumn("mark", "INTEGER"),
new TableColumn("student_id", "INTEGER", "REFERENCES student (id)"),
new TableColumn("register_id", "INTEGER", "REFERENCES register (id)"),
});
}
static void createUsers(PosgtresDB db) throws SQLException {
db.insert("user", new String[]{
"login",
"password",
"position"
},
new Object[]{
"teacher",
"teacher",
"teacher",
});
db.insert("user", new String[]{
"login",
"password",
"position",
},
new Object[]{
"decanat",
"decanat",
"decanat",
});
db.insert("user", new String[]{
"login",
"password",
"position",
},
new Object[]{
"admin",
"admin",
"admin",
});
}
static String getRandomName() {
String[] names = new String[]{
"Иван", "Петр", "Сидор", "Вася", "Саша", "Азат"
};
Random r = new Random();
return names[r.nextInt(names.length)];
}
static String getRandomSurname() {
String[] names = new String[]{
"Иванов", "Петров", "Сидоров", "Васильев", "Чернов", "Юсупов"
};
Random r = new Random();
return names[r.nextInt(names.length)];
}
static void createStudents(PosgtresDB db) throws SQLException {
long fac_id = db.insert("faculty", new String[]{"name"}, new Object[]{"ФИРТ"});
long caf_id = db.insert("department", new String[]{
"name",
"faculty_id"
},
new Object[]{
"ВИиК",
fac_id
});
String[] groupNames = new String[]{
"ЭАС",
"ПИ-1",
"ПИ-2"
};
String[] groupNumbers = new String[]{
"1",
"1",
"2"
};
String[] groupSpecs = new String[]{
"ЭАС",
"ПИ",
"ПИ"
};
long[] groups = new long[groupNames.length];
for (int i = 0; i < groupNames.length; i++) {
groups[i] = db.insert("group", new String[]{
"name",
"number",
"speciality",
"department_id"
},
new Object[]{
groupNames[i],
groupNumbers[i],
groupSpecs[i],
caf_id
});
}
for (long group : groups) {
for (int i = 0; i < 20; i++) {
db.insert("student", new String[]{
"name",
"surname",
"group_id"
},
new Object[]{
getRandomName(),
getRandomSurname(),
group
});
}
}
db.insert("subjects",
new String[]{"name"},
new Object[]{"матан"});
db.insert("subjects",
new String[]{"name"},
new Object[]{"физра"});
}
public static void main(String[] args) {
PosgtresDB db = new PosgtresDB();
db.connect();
try {
db.select("user");
} catch (Exception _ex) {
try {
Main.createDB(db);
Main.createUsers(db);
Main.createStudents(db);
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, ex.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE);
return;
}
}
new LoginForm(db);
}
}
| [
"mishkabelka251@gmail.com"
] | mishkabelka251@gmail.com |
fb53c729500c11d8d3323914b54771a133c4633b | 6c4b3ce3e12c5a8ceda91006dfaceddbcd5908aa | /biz/systempartners/reports/S13Analysis.java | 3d188d2ef50214d14929e9e421f7ee67cf58c03d | [] | no_license | josefloso/FunsoftHMIS | a34bcc6f88c15e85069804814ecef1f9738d7576 | 0ba481260737382e57ac2c674acd03e00e9dde90 | refs/heads/master | 2021-01-15T22:20:32.504511 | 2015-12-01T07:02:42 | 2015-12-01T07:02:42 | 50,920,224 | 1 | 0 | null | 2016-02-02T12:49:53 | 2016-02-02T12:49:53 | null | UTF-8 | Java | false | false | 15,124 | java | /*
* ReportIntfr.java
*
* Created on July 6, 2008, 4:40 PM
*/
package biz.systempartners.reports;
/**
*
* @author funsoft
*/
public class S13Analysis extends javax.swing.JInternalFrame {
java.sql.Connection connectDB = null;
/** Creates new form ReportIntfr */
public S13Analysis(java.sql.Connection connDb) {
connectDB = connDb;
initComponents();
// loadReport();
}
/** 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.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
reportBodyPanel = new javax.swing.JPanel();
reportBodyJscrollPane = new javax.swing.JScrollPane();
reportBodyTable = new com.afrisoftech.dbadmin.JTable();
buttonPanel = new javax.swing.JPanel();
closeBtn = new javax.swing.JButton();
spaceLable = new javax.swing.JLabel();
headerPanel = new javax.swing.JPanel();
endDatePicker = new com.afrisoftech.lib.DatePicker();
stratDatePicker = new com.afrisoftech.lib.DatePicker();
beginDateLbl = new javax.swing.JLabel();
endDateLbl = new javax.swing.JLabel();
persupplierComboBox = new javax.swing.JComboBox();
jLabel1 = new javax.swing.JLabel();
perLPOComboBox = new javax.swing.JComboBox();
jLabel2 = new javax.swing.JLabel();
perDNOTEComboBox = new javax.swing.JComboBox();
jButton1 = new javax.swing.JButton();
setClosable(true);
setIconifiable(true);
setMaximizable(true);
setResizable(true);
setTitle("S13 Analysis");
try {
setSelected(true);
} catch (java.beans.PropertyVetoException e1) {
e1.printStackTrace();
}
setVisible(true);
getContentPane().setLayout(new java.awt.GridBagLayout());
reportBodyPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder()));
reportBodyPanel.setLayout(new java.awt.GridBagLayout());
reportBodyTable.setForeground(new java.awt.Color(0, 0, 255));
reportBodyJscrollPane.setViewportView(reportBodyTable);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
reportBodyPanel.add(reportBodyJscrollPane, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 200.0;
getContentPane().add(reportBodyPanel, gridBagConstraints);
buttonPanel.setLayout(new java.awt.GridBagLayout());
closeBtn.setMnemonic('l');
closeBtn.setText("Close Reporter");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
buttonPanel.add(closeBtn, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 100.0;
gridBagConstraints.weighty = 1.0;
buttonPanel.add(spaceLable, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
getContentPane().add(buttonPanel, gridBagConstraints);
headerPanel.setLayout(new java.awt.GridBagLayout());
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
headerPanel.add(endDatePicker, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
headerPanel.add(stratDatePicker, gridBagConstraints);
beginDateLbl.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
beginDateLbl.setText("PER LPO NO");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
headerPanel.add(beginDateLbl, gridBagConstraints);
endDateLbl.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
endDateLbl.setText("Date(Period)");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
headerPanel.add(endDateLbl, gridBagConstraints);
persupplierComboBox.setModel(com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(connectDB, " SELECT distinct supplier FROM st_stock_cardex where transaction_type='Receiving' ")
);
persupplierComboBox.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
persupplierComboBoxItemStateChanged(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
headerPanel.add(persupplierComboBox, gridBagConstraints);
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel1.setText("PER Supplier");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
headerPanel.add(jLabel1, gridBagConstraints);
perLPOComboBox.setModel(com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(connectDB, "SELECT distinct order_no FROM st_stock_cardex where transaction_type='Receiving' "));
perLPOComboBox.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
perLPOComboBoxItemStateChanged(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 2;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
headerPanel.add(perLPOComboBox, gridBagConstraints);
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel2.setText("PER S13 (SERIAL NO)");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
headerPanel.add(jLabel2, gridBagConstraints);
perDNOTEComboBox.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
perDNOTEComboBoxItemStateChanged(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 3;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
headerPanel.add(perDNOTEComboBox, gridBagConstraints);
jButton1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jButton1.setText("RE-PRINT S13");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 20);
headerPanel.add(jButton1, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
getContentPane().add(headerPanel, gridBagConstraints);
setBounds(0, 0, 643, 306);
}// </editor-fold>//GEN-END:initComponents
private void persupplierComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_persupplierComboBoxItemStateChanged
if(persupplierComboBox.getSelectedIndex()>=0){
try{
reportBodyTable.setModel(com.afrisoftech.dbadmin.TableModel.createTableVectors(connectDB,""
+ "SELECT grn_no as S13,order_no,delivery_note_no,supplier,item,item_code,SUM(quantity_required)as QTY_Required,SUM(quantity_received) as QTY_Supplied, " +
"price_per_item,sum(debit) as Amount FROM st_stock_cardex "
+ "where supplier='"+persupplierComboBox.getSelectedItem().toString()+"' "
+ " and date between '"+com.afrisoftech.lib.SQLDateFormat.getSQLDate(stratDatePicker.getDate())+"' and '"+com.afrisoftech.lib.SQLDateFormat.getSQLDate(endDatePicker.getDate())+"' "
+"GROUP BY grn_no,order_no,delivery_note_no,supplier,item,price_per_item,item_code having sum(debit-quantity_ordered)>0 ORDER BY grn_no,order_no,delivery_note_no,item_code"));
perLPOComboBox.setModel(com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(connectDB,""
+ " SELECT distinct order_no FROM st_stock_cardex where transaction_type='Receiving' "
+ " AND supplier='"+persupplierComboBox.getSelectedItem().toString()+"' "));
}
catch(Exception ex){
System.err.println("the store error is "+ex);
}
}
}//GEN-LAST:event_persupplierComboBoxItemStateChanged
private void perLPOComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_perLPOComboBoxItemStateChanged
{
try{ reportBodyTable.setModel(com.afrisoftech.dbadmin.TableModel.createTableVectors(connectDB,""
+ "SELECT grn_no as S13,order_no,delivery_note_no,supplier,item,item_code,SUM(quantity_required)as QTY_Required,SUM(quantity_received) as QTY_Supplied, " +
"price_per_item,sum(debit) as Amount FROM st_stock_cardex "
+ "where ORDER_NO='"+perLPOComboBox.getSelectedItem().toString()+"' "
+ " and date between '"+com.afrisoftech.lib.SQLDateFormat.getSQLDate(stratDatePicker.getDate())+"' and '"+com.afrisoftech.lib.SQLDateFormat.getSQLDate(endDatePicker.getDate())+"' "
+"GROUP BY grn_no,order_no,delivery_note_no,supplier,item,price_per_item,item_code having sum(debit-quantity_ordered)>0 ORDER BY grn_no,order_no,delivery_note_no,item_code"));
perDNOTEComboBox.setModel(com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(connectDB,""
+ " SELECT distinct grn_no FROM st_stock_cardex where transaction_type='Receiving' and "
+ " order_no='"+perLPOComboBox.getSelectedItem().toString()+"' "));
}
catch(Exception ex){
System.err.println("the category error is "+ex);
}
}
}//GEN-LAST:event_perLPOComboBoxItemStateChanged
private void perDNOTEComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_perDNOTEComboBoxItemStateChanged
{
{
try{ reportBodyTable.setModel(com.afrisoftech.dbadmin.TableModel.createTableVectors(connectDB,""
+ "SELECT grn_no as S13,order_no,delivery_note_no,supplier,item,item_code,SUM(quantity_required)as QTY_Required,SUM(quantity_received) as QTY_Supplied, " +
"price_per_item,sum(debit) as Amount FROM st_stock_cardex "
+ "where ORDER_NO='"+perLPOComboBox.getSelectedItem().toString()+"' and grn_no='"+perDNOTEComboBox.getSelectedItem().toString()+"' "
+ " and date between '"+com.afrisoftech.lib.SQLDateFormat.getSQLDate(stratDatePicker.getDate())+"' and '"+com.afrisoftech.lib.SQLDateFormat.getSQLDate(endDatePicker.getDate())+"' "
+"GROUP BY grn_no,order_no,delivery_note_no,supplier,item,price_per_item,item_code having sum(debit-quantity_ordered)>0 ORDER BY grn_no,order_no,delivery_note_no,item_code"));
}
catch(Exception ex){
System.err.println("the item error is "+ex);
}
}
}
}//GEN-LAST:event_perDNOTEComboBoxItemStateChanged
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
com.afrisoftech.hospinventory.mtrhreports.SthirteenPdf policy = new com.afrisoftech.hospinventory.mtrhreports.SthirteenPdf();
// policy.SthirteenPdf(connectDB, this.stratDatePicker.getDate().toLocaleString(), this.endDatePicker.getDate().toLocaleString(), reportBodyTable.getValueAt(reportBodyTable.getSelectedRow(), 3).toString(), reportBodyTable.getValueAt(reportBodyTable.getSelectedRow(), 2).toString());
}//GEN-LAST:event_jButton1ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel beginDateLbl;
private javax.swing.JPanel buttonPanel;
private javax.swing.JButton closeBtn;
private javax.swing.JLabel endDateLbl;
private com.afrisoftech.lib.DatePicker endDatePicker;
private javax.swing.JPanel headerPanel;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JComboBox perDNOTEComboBox;
private javax.swing.JComboBox perLPOComboBox;
private javax.swing.JComboBox persupplierComboBox;
public static javax.swing.JScrollPane reportBodyJscrollPane;
public static javax.swing.JPanel reportBodyPanel;
public static javax.swing.JTable reportBodyTable;
private javax.swing.JLabel spaceLable;
private com.afrisoftech.lib.DatePicker stratDatePicker;
// End of variables declaration//GEN-END:variables
}
| [
"Charles@Funsoft"
] | Charles@Funsoft |
ee18df09065251604ee4a62fc4b6cc445c934da6 | 21da7cf6320f92bba261bbe471485f69d4a5744b | /src/main/java/com/softeng/conorredington/assignment1/Course.java | bd240bdd3ddb76141967048d4603165b745dfa21 | [] | no_license | conorRed/CT417 | 2c63b75cd6d362f2d65c78d9af0d1763043fdd16 | 158ef8d33156e1ae83e9134f030931b3a840938f | refs/heads/master | 2020-04-02T06:48:10.244265 | 2018-10-27T12:20:36 | 2018-10-27T12:20:36 | 154,168,814 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,220 | java | package com.softeng.conorredington.assignment1;
import java.util.ArrayList;
import org.joda.time.DateTime;
/*
* @Author Conor Redington
*/
public class Course {
private String name;
private ArrayList<Module> modules;
private ArrayList<Student> students;
private DateTime startDate, endDate;
public Course(String name, ArrayList<Module> modules, ArrayList<Student> students, DateTime start, DateTime end) {
this.name = name;
this.modules = modules;
this.students = students;
this.startDate = start;
this.endDate = end;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ArrayList<Module> getModules() {
return modules;
}
public void setModules(ArrayList<Module> modules) {
this.modules = modules;
}
public ArrayList<Student> getStudents() {
return students;
}
public void setStudents(ArrayList<Student> students) {
this.students = students;
}
public DateTime getStartDate() {
return startDate;
}
public void setStartDate(DateTime startDate) {
this.startDate = startDate;
}
public DateTime getEndDate() {
return endDate;
}
public void setEndDate(DateTime endDate) {
this.endDate = endDate;
}
}
| [
"conorredington@gmail.com"
] | conorredington@gmail.com |
3e684306bc15ef0cc4bfb35e818c14e6637725e6 | aca3e9948b81d516a0bb2580ddeac06732e49f52 | /Exercises_3.java/Test/PersonTest.java | f0eefadc2d34dd7e58bea9bd0badc3c81465aae0 | [] | no_license | mhoang17/OOP | f7b2ce29dc55beb982081a11b341e68a2425a99f | 84c6b2f9d8b1115a19eac7ed337073ac4fc546fe | refs/heads/master | 2021-04-25T09:37:02.456490 | 2018-03-11T13:22:07 | 2018-03-11T13:22:07 | 121,944,146 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 459 | java | import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
class PersonTest {
@Test
public void equalsTest() {
Person person = new Person("Hans", "Ole", 24, 1489374);
Person person2 = new Person("Hans", "Ole", 24, 1489374);
assertEquals(person,person2);
assertTrue(person.hashCode() == person2.hashCode());
}
} | [
"mhoang17@github.com"
] | mhoang17@github.com |
48c788cfa029167f18d834b46ca8d7d9b3cf7bb2 | 4190d949e54321e80d9d7d076506a902037046e8 | /Solutions/src/segments/NorthwestwardWind.java | 914f26f24a06b61851999a587f2f301441240f7a | [] | no_license | hyunjongpark/algorithm_study | f1bae88a32a3c59f3e4623aa2642faaec5e5a0ec | f2ee4973d628d4d50d09328140ba78131d8474ef | refs/heads/master | 2022-04-02T03:45:48.972960 | 2020-01-17T02:26:38 | 2020-01-17T02:26:38 | 104,432,728 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,923 | java | package segments;
/*
* https://www.acmicpc.net/problem/5419
*/
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;
public class NorthwestwardWind {
static int pointCount;
static public class Point {
public int x;
public int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
}
static Point[] pList;
static int leafNodeCount = 0;
static long[] tree;
static public void main(String[] args) throws NumberFormatException, IOException {
System.setIn(new FileInputStream("northwind"));
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
int tc = Integer.parseInt(br.readLine());
for (int i = 0; i < tc; i++) {
pointCount = Integer.parseInt(br.readLine());
pList = new Point[pointCount];
for (int j = 0; j < pointCount; j++) {
StringTokenizer st = new StringTokenizer(br.readLine());
int x = Integer.parseInt(st.nextToken());
int y = Integer.parseInt(st.nextToken());
pList[j] = new Point(x, y);
}
Arrays.sort(pList, new Comparator<Point>() {
@Override
public int compare(Point arg0, Point arg1) {
if (arg0.y < arg1.y) {
return -1;
} else if (arg0.y > arg1.y) {
return 1;
} else {
return 0;
}
}
});
adjX();
tree = new long[(leafNodeCount + 1) * 4];
call();
}
}
static public void adjX() {
leafNodeCount = 0;
int temp = 0;
for (int i = 0; i < pList.length; i++) {
Point p = pList[i];
if (temp != p.y) {
leafNodeCount++;
}
temp = p.y;
p.y = leafNodeCount;
}
}
static public void call() {
Arrays.sort(pList, new Comparator<Point>() {
@Override
public int compare(Point arg0, Point arg1) {
if (arg0.x > arg1.x) {
return -1;
} else if (arg0.x < arg1.x) {
return 1;
} else {
if (arg0.y > arg1.y) {
return 1;
} else {
return -1;
}
}
}
});
long result = 0;
for (int i = 0; i < pList.length; i++) {
Point p = pList[i];
result += getSum(1, 0, leafNodeCount, 0, p.y);
update(1, 0, leafNodeCount, p.y);
}
System.out.println(result);
}
static long getSum(int node, int start, int end, int left, int right) {
if (right < start || end < left) {
return 0;
}
if (left <= start && end <= right) {
return tree[node];
}
int mid = (start + end) / 2;
return getSum(node * 2, start, mid, left, right) + getSum(node * 2 + 1, mid + 1, end, left, right);
}
static void update(int node, int start, int end, int index) {
if (index < start || end < index) {
return;
}
tree[node] += 1;
if (start == end) {
return;
}
int mid = (start + end) / 2;
update(node * 2, start, mid, index);
update(node * 2 + 1, mid + 1, end, index);
}
}
| [
"paulhj.park@samsung.com"
] | paulhj.park@samsung.com |
8afcf94e385610553af59822c8f48d19f6a1901a | 8f6cae24251002b188f00a1983a787f877d6fc55 | /aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/UpdateGcmChannelResult.java | 2cafe70d197717b0f736950a93baf96796ddcaea | [
"Apache-2.0"
] | permissive | vipsql/aws-sdk-java | a0a2d0f4f15edf3c030f68e76f701efe4c80427c | 9cac4759453cfbd189fb33be8d1cac0a48415744 | refs/heads/master | 2020-03-27T07:09:28.248543 | 2016-12-23T07:52:33 | 2016-12-23T07:52:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,232 | java | /*
* Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.pinpoint.model;
import java.io.Serializable;
/**
*
*/
public class UpdateGcmChannelResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {
private GCMChannelResponse gCMChannelResponse;
/**
* @param gCMChannelResponse
*/
public void setGCMChannelResponse(GCMChannelResponse gCMChannelResponse) {
this.gCMChannelResponse = gCMChannelResponse;
}
/**
* @return
*/
public GCMChannelResponse getGCMChannelResponse() {
return this.gCMChannelResponse;
}
/**
* @param gCMChannelResponse
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateGcmChannelResult withGCMChannelResponse(GCMChannelResponse gCMChannelResponse) {
setGCMChannelResponse(gCMChannelResponse);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getGCMChannelResponse() != null)
sb.append("GCMChannelResponse: ").append(getGCMChannelResponse());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateGcmChannelResult == false)
return false;
UpdateGcmChannelResult other = (UpdateGcmChannelResult) obj;
if (other.getGCMChannelResponse() == null ^ this.getGCMChannelResponse() == null)
return false;
if (other.getGCMChannelResponse() != null && other.getGCMChannelResponse().equals(this.getGCMChannelResponse()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getGCMChannelResponse() == null) ? 0 : getGCMChannelResponse().hashCode());
return hashCode;
}
@Override
public UpdateGcmChannelResult clone() {
try {
return (UpdateGcmChannelResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}
| [
""
] | |
988c6d5671cba523ab35ea553b883c99831ca27d | 3b796acb962d6615606cdae273be3023f45ebf27 | /core-Java-Basic-WS/coreJavaBasicExample/src/com/memoryCollection/GarbageCollection/NullifyingObject.java | f54ef1d9dc508eba67f3cc75b30c9a8d5e2d521f | [] | no_license | indranilsharma/coreJava | 051820708a4b9b5478da49a5f3b6b337cb41fbe3 | 299f50ee5eca877f844fe6e02ca0fac148a0ceab | refs/heads/master | 2021-10-13T13:25:28.780069 | 2021-09-28T16:41:25 | 2021-09-28T16:41:25 | 239,985,492 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 659 | java | package com.memoryCollection.GarbageCollection;
public class NullifyingObject {
NullifyingObject i;
public static void main(String[] args) {
NullifyingObject o1 = new NullifyingObject();
NullifyingObject o2 = new NullifyingObject();
NullifyingObject o3 = new NullifyingObject();
o1.i = o2;
o2.i = o3;
o3.i = o1;
Runtime.getRuntime().gc();
System.out.println(Runtime.getRuntime().freeMemory());
// object eligible for gc
o1 = null;
System.out.println(Runtime.getRuntime().freeMemory());
o2 = null;
// after this 3 object eligible for gc
System.gc();
System.out.println(Runtime.getRuntime().freeMemory());
o3 = null;
}
}
| [
"indranilsharma123@gmail.com"
] | indranilsharma123@gmail.com |
f545c55f2e322fbfc259b38cc74faf8018560bc9 | 2f267fb656312a0fd6dba8b639e1845630c081af | /test-maven-gwt-modular/trunk/app-module4/src/main/java/org/stbland/test/mavengwtmodular/module4/client/mappers/animation/phone/TabletMainAnimationMapper.java | 5d7d9b97f462cb53bd4e3895adbefe1d35d0aea9 | [] | no_license | stbland/stbland | 88e949616b5c2db1343a817c4633364449e4d89c | 39e32c398d41cef3109dcfb21c7635b4884b5a90 | refs/heads/master | 2020-06-04T05:55:21.817441 | 2014-04-08T11:45:58 | 2014-04-08T11:45:58 | 32,307,696 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 444 | java | package org.stbland.test.mavengwtmodular.module4.client.mappers.animation.phone;
import org.stbland.test.mavengwtmodular.module4.client.mappers.animation.JQMTransitionMapper;
import com.google.gwt.place.shared.Place;
import com.sksamuel.jqm4gwt.Transition;
public class TabletMainAnimationMapper implements JQMTransitionMapper {
@Override
public Transition getTransition(Place oldPlace, Place newPlace) {
return Transition.FADE;
}
}
| [
"stbland@f6deccbe-e060-11de-8d18-5b59c22968bc"
] | stbland@f6deccbe-e060-11de-8d18-5b59c22968bc |
808a3fe1a52693a63f2e941a9120c14767dc079e | 0e8890391facc930e91e07e6e1481a384750e67d | /OCP/OCPStrategy/src/src/impl/GBDatePrinter.java | 7257d24507d5c2dccdd592ad5f3956cb7a2d106f | [] | no_license | noavarice/solid | c70ba79ed06dfe713221c042ac26adc46693a275 | cd9470f0628fecf145572f3973f32734c10a149c | refs/heads/master | 2021-08-28T23:25:24.978987 | 2017-12-13T08:33:13 | 2017-12-13T08:33:13 | 112,929,840 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 570 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package src.impl;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import src.IDatePrinter;
/**
*
* @author alexrazinkov
*/
public class GBDatePrinter implements IDatePrinter {
@Override
public String getDate(Date date) {
final DateFormat df = new SimpleDateFormat("dd/MM/YYYY");
return df.format(date);
}
}
| [
"noavarice@gmail.com"
] | noavarice@gmail.com |
99f58d5fb25d9e3b3f9d54c5cd1bf78cfa96385e | 6da91037bbe82153f35154ef504d494b24aebe86 | /src/main/java/com/simonbaars/clonerefactor/refactoring/enums/MethodType.java | 8f831f3ada742c3d2a8241d2f192a97aa1733ada | [
"MIT"
] | permissive | software-improvement-group-research/CloneRefactor | 0c8f02c04bbc2c609d7945c96d95b5b84d11a78f | caec155c9820f3775b011c8565ac2c32b827ea7e | refs/heads/master | 2021-07-08T19:25:08.739015 | 2020-11-13T15:25:59 | 2020-11-13T15:25:59 | 207,491,509 | 0 | 0 | MIT | 2020-11-13T15:26:00 | 2019-09-10T07:22:41 | null | UTF-8 | Java | false | false | 332 | java | package com.simonbaars.clonerefactor.refactoring.enums;
public enum MethodType {
VOID("Void"),
RETURNSASSIGNEDVARIABLE("Assign"),
RETURNSDECLAREDVARIABLE("Declare"),
RETURNS("Return");
private String name;
private MethodType(String name) {
this.name=name;
}
@Override
public String toString() {
return name;
}
}
| [
"simon.mailadres@gmail.com"
] | simon.mailadres@gmail.com |
b7319adb06718c1dd3aba1bfb4ea2dfa84079066 | 7dccb79b9804d8d9459c86ba9721e1197f59b865 | /de.fhdo.lemma.intermediate.transformations/xtend-gen/de/fhdo/lemma/intermediate/transformations/AbstractEmftvmIntermediateModelTransformationStrategy.java | bbb20362e12da94ebf337f4fed24687d6ab786c8 | [
"MIT"
] | permissive | SeelabFhdo/lemma | a668854675d50d3f3cad56eb5e3961b683d0f70a | 2e9ccc882352116b253a7700b5ecf2c9316a5829 | refs/heads/main | 2023-08-28T18:04:56.990603 | 2023-03-24T08:03:13 | 2023-03-24T08:03:13 | 204,692,764 | 32 | 9 | MIT | 2022-10-25T12:25:06 | 2019-08-27T11:54:43 | Java | UTF-8 | Java | false | false | 9,131 | java | package de.fhdo.lemma.intermediate.transformations;
import de.fhdo.lemma.utils.LemmaUtils;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import org.eclipse.m2m.atl.emftvm.EmftvmFactory;
import org.eclipse.m2m.atl.emftvm.ExecEnv;
import org.eclipse.m2m.atl.emftvm.Metamodel;
import org.eclipse.m2m.atl.emftvm.Model;
import org.eclipse.m2m.atl.emftvm.impl.resource.EMFTVMResourceFactoryImpl;
import org.eclipse.m2m.atl.emftvm.util.DefaultModuleResolver;
import org.eclipse.m2m.atl.emftvm.util.TimingData;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.Functions.Function2;
import org.eclipse.xtext.xbase.lib.MapExtensions;
/**
* Abstract strategy for model-to-model transformations relying on ATL's EMFTVM.
*
* @author <a href="mailto:florian.rademacher@fh-dortmund.de">Florian Rademacher</a>
*/
@SuppressWarnings("all")
public abstract class AbstractEmftvmIntermediateModelTransformationStrategy extends AbstractIntermediateModelTransformationStrategy<Model, Model> {
private EmftvmFactory emftvmFactory;
private ExecEnv executionEnvironment;
private ResourceSet resourceSet;
private Map<TransformationModelDescription, Model> potentialOutputModels = CollectionLiterals.<TransformationModelDescription, Model>newHashMap();
/**
* Get the platform path to the folder that holds the transformation model file
*/
public abstract String getModelTransformationFilePlatformFolder();
/**
* Get the name of the transformation model file
*/
public abstract String getModelTransformationFileName();
/**
* Constructor
*/
public AbstractEmftvmIntermediateModelTransformationStrategy() {
super();
this.emftvmFactory = EmftvmFactory.eINSTANCE;
this.executionEnvironment = this.emftvmFactory.createExecEnv();
this.resourceSet = this.setupResourceSet();
}
/**
* Helper to create the resource set used by the transformation
*/
private ResourceSet setupResourceSet() {
final ResourceSetImpl rs = new ResourceSetImpl();
final Map<String, Object> extensionToFactoryMap = rs.getResourceFactoryRegistry().getExtensionToFactoryMap();
XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl();
extensionToFactoryMap.put("xmi", _xMIResourceFactoryImpl);
EMFTVMResourceFactoryImpl _eMFTVMResourceFactoryImpl = new EMFTVMResourceFactoryImpl();
extensionToFactoryMap.put("emftvm", _eMFTVMResourceFactoryImpl);
EcoreResourceFactoryImpl _ecoreResourceFactoryImpl = new EcoreResourceFactoryImpl();
extensionToFactoryMap.put("ecore", _ecoreResourceFactoryImpl);
return rs;
}
/**
* Prepare model transformation
*/
@Override
protected void beforeTransformationHook(final Map<TransformationModelDescription, IFile> inputModelFiles, final Map<TransformationModelDescription, String> outputModelPaths) {
final Function1<IFile, String> _function = (IFile it) -> {
return LemmaUtils.getAbsolutePath(it);
};
final Map<TransformationModelDescription, String> absoluteInputModelPaths = MapExtensions.<TransformationModelDescription, IFile, String>mapValues(inputModelFiles, _function);
final Set<TransformationModelDescription> modelDescriptions = absoluteInputModelPaths.keySet();
final HashSet<String> registeredMetamodels = CollectionLiterals.<String>newHashSet();
final Consumer<TransformationModelDescription> _function_1 = (TransformationModelDescription it) -> {
final TransformationModelType modelType = this.modelTypes.get(it);
final String namespaceUri = modelType.getNamespaceUri();
boolean _contains = registeredMetamodels.contains(namespaceUri);
boolean _not = (!_contains);
if (_not) {
final Metamodel metamodel = EmftvmFactory.eINSTANCE.createMetamodel();
metamodel.setResource(modelType.getEcorePackage().eResource());
this.executionEnvironment.registerMetaModel(it.getReferenceModelName(), metamodel);
registeredMetamodels.add(namespaceUri);
}
};
modelDescriptions.forEach(_function_1);
}
/**
* Create transformation-technology-specific input model instance
*/
@Override
protected Model createTransformationInputModel(final TransformationModelDescription modelDescription, final Resource resource) {
final Model model = this.emftvmFactory.createModel();
model.setResource(resource);
TransformationModelDirection _direction = modelDescription.getDirection();
boolean _tripleEquals = (_direction == TransformationModelDirection.INOUT);
if (_tripleEquals) {
this.potentialOutputModels.put(modelDescription, model);
}
return model;
}
/**
* Create transformation-technology-specific output model instance
*/
@Override
protected Model createTransformationOutputModel(final TransformationModelDescription modelDescription, final String outputPath) {
Model _xifexpression = null;
boolean _containsKey = this.potentialOutputModels.containsKey(modelDescription);
boolean _not = (!_containsKey);
if (_not) {
Model _xblockexpression = null;
{
final Model model = EmftvmFactory.eINSTANCE.createModel();
model.setResource(this.resourceSet.createResource(URI.createURI(outputPath)));
this.potentialOutputModels.put(modelDescription, model);
_xblockexpression = model;
}
_xifexpression = _xblockexpression;
} else {
_xifexpression = null;
}
return _xifexpression;
}
/**
* Execute EMFTVM transformation
*/
@Override
protected Map<TransformationModelDescription, Resource> transformation(final Map<TransformationModelDescription, Model> transformationInputModels, final Map<TransformationModelDescription, Model> transformationOutputModels) {
this.registerModels(transformationInputModels);
this.registerModels(transformationOutputModels);
String _modelTransformationFilePlatformFolder = this.getModelTransformationFilePlatformFolder();
final DefaultModuleResolver moduleResolver = new DefaultModuleResolver(_modelTransformationFilePlatformFolder,
this.resourceSet);
final TimingData timingData = new TimingData();
this.executionEnvironment.loadModule(moduleResolver, this.getModelTransformationFileName());
timingData.finishLoading();
this.executionEnvironment.run(timingData);
timingData.finish();
final Function2<TransformationModelDescription, Model, Boolean> _function = (TransformationModelDescription description, Model model) -> {
boolean _xifexpression = false;
Resource _resource = model.getResource();
EList<EObject> _contents = null;
if (_resource!=null) {
_contents=_resource.getContents();
}
boolean _tripleNotEquals = (_contents != null);
if (_tripleNotEquals) {
boolean _isEmpty = model.getResource().getContents().isEmpty();
_xifexpression = (!_isEmpty);
} else {
_xifexpression = false;
}
return Boolean.valueOf(_xifexpression);
};
final Function1<Model, Resource> _function_1 = (Model it) -> {
return it.getResource();
};
return MapExtensions.<TransformationModelDescription, Model, Resource>mapValues(MapExtensions.<TransformationModelDescription, Model>filter(this.potentialOutputModels, _function), _function_1);
}
/**
* Helper to register models and their descriptions in EMFTVM's execution environment
*/
private void registerModels(final Map<TransformationModelDescription, Model> models) {
final BiConsumer<TransformationModelDescription, Model> _function = (TransformationModelDescription description, Model model) -> {
this.registerModel(description.getNameInModelTransformation(), description.getDirection(), model);
};
models.forEach(_function);
}
/**
* Helper to register a single model in EMFTVM's execution environment
*/
private void registerModel(final String nameInModelTransformation, final TransformationModelDirection direction, final Model model) {
if (direction != null) {
switch (direction) {
case IN:
this.executionEnvironment.registerInputModel(nameInModelTransformation, model);
break;
case OUT:
this.executionEnvironment.registerOutputModel(nameInModelTransformation, model);
break;
case INOUT:
this.executionEnvironment.registerInOutModel(nameInModelTransformation, model);
break;
default:
break;
}
}
}
}
| [
"florian.rademacher@fh-dortmund.de"
] | florian.rademacher@fh-dortmund.de |
4b7004c154a19df9a2a73969041e1a39e22d3f3a | 9b140f7af881f7e7149b7963abd407e4764c688a | /src/twelveengine/script/ScriptCallBegin.java | 5388beeeb768ec4e02adb8f7a955ec89b211181c | [] | no_license | infernoplus/12D-Client | 5e275cd7c66758f9f694d4b4655354d1ca3e257b | d5ddbea12a2db943d0462c49416eb0020644b740 | refs/heads/master | 2020-12-24T14:45:12.739076 | 2014-06-23T02:54:25 | 2014-06-23T02:54:25 | 20,868,507 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,572 | java | package twelveengine.script;
//Abstract-ish class. This is a super for every type of call in a script. Everything from constants to functions that return strings are a sub class of this.
//If you want to add a new script function then it'll be a subclass of this.
public class ScriptCallBegin extends ScriptCall {
private final String name = "Begin"; //For debugging. Just a name to identify this call by.
public ScriptCallBegin(ScriptManager m,int c, ScriptCall a[]) {
super(m, c, a);
}
private int e = 0;
private boolean wait = false;
public void step() {
if(!done) {
if(e < calls.length) {
if(wait) {
if(calls[e].done) {
wait = false;
e++;
}
else
calls[e].step();
}
else {
while(e < calls.length && calls[e].done) {
calls[e].executeVoid();
if(calls[e].done)
e++;
else
wait = true;
}
}
}
}
if(e >= calls.length) {
done = true;
}
}
//Returns void
public void executeVoid() {
done = false;
e = 0;
wait = false;
}
//Returns a bool
public boolean executeBool() {
return false;
}
//Returns a int
public int executeInt() {
return 0;
}
//Returns a float
public float executeFloat() {
return 0;
}
//Returns a string
public String executeString() {
return "";
}
public void debugTree(int i) {
int j = 0;
while(j < i) {
System.out.print("-");
j++;
}
j = 0;
System.out.println(" Call:" + name + " ID#" + cid + " Src: " + code);
while(j < calls.length) {
calls[j].debugTree(i+1);
j++;
}
}
} | [
"linklinker42@gmail.com"
] | linklinker42@gmail.com |
3cdc00b91f44b09ba347b87a0bb8786b03270396 | c4930499ef0ac6bf7af134df12bd94b85f9a7478 | /build/generated/source/r/release/com/wcsmobile/R.java | 405887bf2ef83656e8299e1108f52e65a63b9dea | [] | no_license | 185368123/shuorigf_green_ver | 4a63342dc72ae740d89aacb76f8e1fe99893536d | 4bba2b85d706a1e3292302828dccb5a67a12e348 | refs/heads/master | 2020-03-22T19:27:27.959109 | 2018-08-21T10:15:03 | 2018-08-21T10:15:03 | 140,529,003 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 109,778 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.wcsmobile;
public final class R {
public static final class attr {
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int addition=0x7f010000;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int additionBottom=0x7f010001;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int additionLeft=0x7f010002;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int additionRight=0x7f010003;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int additionTop=0x7f010004;
/** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int kswAnimationDuration=0x7f010024;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int kswBackColor=0x7f010021;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int kswBackDrawable=0x7f010020;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int kswBackMeasureRatio=0x7f010023;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswBackRadius=0x7f01001f;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int kswFadeBack=0x7f010022;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int kswTextMarginH=0x7f010028;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int kswTextOff=0x7f010027;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int kswTextOn=0x7f010026;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int kswThumbColor=0x7f010016;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int kswThumbDrawable=0x7f010015;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswThumbHeight=0x7f01001d;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswThumbMargin=0x7f010017;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswThumbMarginBottom=0x7f010019;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswThumbMarginLeft=0x7f01001a;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswThumbMarginRight=0x7f01001b;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswThumbMarginTop=0x7f010018;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswThumbRadius=0x7f01001e;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
*/
public static final int kswThumbWidth=0x7f01001c;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int kswTintColor=0x7f010025;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int lineColor=0x7f010029;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int peng_drawableBottom=0x7f01000e;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int peng_drawableBottomHeight=0x7f010008;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int peng_drawableBottomWith=0x7f010007;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int peng_drawableLeft=0x7f010010;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int peng_drawableLeftHeight=0x7f01000c;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int peng_drawableLeftWith=0x7f01000b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int peng_drawableRight=0x7f01000f;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int peng_drawableRightHeight=0x7f01000a;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int peng_drawableRightWith=0x7f010009;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int peng_drawableTop=0x7f01000d;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int peng_drawableTopHeight=0x7f010006;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int peng_drawableTopWith=0x7f010005;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int sc_border_width=0x7f010012;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int sc_checked_text_color=0x7f010014;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int sc_corner_radius=0x7f010011;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int sc_tint_color=0x7f010013;
}
public static final class color {
public static final int alpha=0x7f070000;
public static final int app_background=0x7f070001;
public static final int app_background1=0x7f070002;
public static final int app_background_no=0x7f070003;
public static final int battery_charging_state_text_color=0x7f070004;
public static final int battery_esidual_capacity_text_color=0x7f070005;
public static final int battery_temperature_text_color=0x7f070006;
public static final int black=0x7f070007;
public static final int blue=0x7f070008;
public static final int blue_dark=0x7f070009;
public static final int blue_medium=0x7f07000a;
public static final int bottombar_textcolor_selector=0x7f070030;
public static final int cancel_text_color=0x7f07000b;
public static final int dark=0x7f07000c;
public static final int fragment_background=0x7f07000d;
public static final int gray=0x7f07000e;
public static final int gray_dim=0x7f07000f;
public static final int gray_light=0x7f070010;
public static final int half_alpha=0x7f070011;
public static final int half_half_alpha=0x7f070012;
public static final int ksw_md_back_color=0x7f070031;
public static final int ksw_md_ripple_checked=0x7f070013;
public static final int ksw_md_ripple_normal=0x7f070014;
public static final int ksw_md_solid_checked=0x7f070015;
public static final int ksw_md_solid_checked_disable=0x7f070016;
public static final int ksw_md_solid_disable=0x7f070017;
public static final int ksw_md_solid_normal=0x7f070018;
public static final int ksw_md_solid_shadow=0x7f070019;
public static final int lightBlueColor=0x7f07001a;
public static final int light_gray=0x7f07001b;
public static final int light_gray_color=0x7f07001c;
public static final int light_gray_line=0x7f07001d;
public static final int light_gray_line_ba=0x7f07001e;
public static final int light_yellow=0x7f07001f;
public static final int light_yellow1=0x7f070020;
public static final int orange=0x7f070021;
public static final int province_line_border=0x7f070022;
public static final int radio_button_selected_color=0x7f070023;
public static final int radio_button_unselected_color=0x7f070024;
public static final int radio_colors=0x7f070032;
public static final int realtime_battery_layout_text_title=0x7f070025;
public static final int realtime_down_frame_color=0x7f070026;
public static final int realtime_mid_frame_color=0x7f070027;
public static final int realtime_parameter_title=0x7f070028;
public static final int realtime_up_frame_color=0x7f070029;
public static final int red=0x7f07002a;
public static final int red_dark=0x7f07002b;
public static final int transparent=0x7f07002c;
public static final int transparent_background=0x7f07002d;
public static final int weibo_listtab_off=0x7f07002e;
public static final int white=0x7f07002f;
}
public static final class dimen {
public static final int activity_horizontal_margin=0x7f050001;
public static final int activity_vertical_margin=0x7f050002;
public static final int btnTextSize=0x7f050000;
public static final int ksw_md_thumb_ripple_size=0x7f050003;
public static final int ksw_md_thumb_shadow_inset=0x7f050004;
public static final int ksw_md_thumb_shadow_inset_bottom=0x7f050005;
public static final int ksw_md_thumb_shadow_inset_top=0x7f050006;
public static final int ksw_md_thumb_shadow_offset=0x7f050007;
public static final int ksw_md_thumb_shadow_size=0x7f050008;
public static final int ksw_md_thumb_solid_inset=0x7f050009;
public static final int ksw_md_thumb_solid_size=0x7f05000a;
public static final int radio_button_conner_radius=0x7f05000b;
public static final int radio_button_stroke_border=0x7f05000c;
}
public static final class drawable {
public static final int bg_fuzai=0x7f020000;
public static final int bg_navigation_bar=0x7f020001;
public static final int bg_style_corner_popwin=0x7f020002;
public static final int bg_swich_button_selector=0x7f020003;
public static final int bg_switch=0x7f020004;
public static final int bg_switch_off=0x7f020005;
public static final int bg_switch_on=0x7f020006;
public static final int bg_tabbar=0x7f020007;
public static final int bg_taiyangnengdianchiban=0x7f020008;
public static final int bg_xudianchi=0x7f020009;
public static final int bottombar_itembg_selector=0x7f02000a;
public static final int btn_affirm_drawable=0x7f02000b;
public static final int btn_back_drawable=0x7f02000c;
public static final int btn_cancel_drawable=0x7f02000d;
public static final int btn_historical_into_chart=0x7f02000e;
public static final int btn_last_day_drawable=0x7f02000f;
public static final int btn_next_day_drawable=0x7f020010;
public static final int btn_switch=0x7f020011;
public static final int button_text_color=0x7f020012;
public static final int color_line=0x7f020013;
public static final int content_bg=0x7f020014;
public static final int device_info_selector=0x7f020015;
public static final int et_round_bg=0x7f020016;
public static final int f_btn_style_head=0x7f020017;
public static final int historical_data_selector=0x7f020018;
public static final int ic_launcher=0x7f020019;
public static final int ico_canshushezhi_nor=0x7f02001a;
public static final int ico_canshushezhi_sel=0x7f02001b;
public static final int ico_chongdianzhong=0x7f02001c;
public static final int ico_chongidancuowu=0x7f02001d;
public static final int ico_dianliang=0x7f02001e;
public static final int ico_dianliu=0x7f02001f;
public static final int ico_dianya=0x7f020020;
public static final int ico_fuzai=0x7f020021;
public static final int ico_gonglv=0x7f020022;
public static final int ico_lishishuju_nor=0x7f020023;
public static final int ico_lishishuju_sel=0x7f020024;
public static final int ico_more_nor=0x7f020025;
public static final int ico_more_sel=0x7f020026;
public static final int ico_more_selector=0x7f020027;
public static final int ico_shebeixinxi_nor=0x7f020028;
public static final int ico_shebeixinxi_sel=0x7f020029;
public static final int ico_shishijiankong_nor=0x7f02002a;
public static final int ico_shishijiankong_sel=0x7f02002b;
public static final int ico_taiyangnengban=0x7f02002c;
public static final int ico_weichongdian=0x7f02002d;
public static final int ico_wendu=0x7f02002e;
public static final int ico_xudianchi=0x7f02002f;
public static final int icon_accumulator_01=0x7f020030;
public static final int icon_accumulator_02=0x7f020031;
public static final int icon_accumulator_03=0x7f020032;
public static final int icon_accumulator_04=0x7f020033;
public static final int icon_accumulator_05=0x7f020034;
public static final int icon_accumulator_06=0x7f020035;
public static final int icon_add=0x7f020036;
public static final int icon_affirm=0x7f020037;
public static final int icon_affirm_elected=0x7f020038;
public static final int icon_back=0x7f020039;
public static final int icon_back_elected=0x7f02003a;
public static final int icon_backwards=0x7f02003b;
public static final int icon_backwards_elected=0x7f02003c;
public static final int icon_cancel=0x7f02003d;
public static final int icon_cancel_elected=0x7f02003e;
public static final int icon_data=0x7f02003f;
public static final int icon_data_elected=0x7f020040;
public static final int icon_energy_01=0x7f020041;
public static final int icon_energy_02=0x7f020042;
public static final int icon_energy_03=0x7f020043;
public static final int icon_energy_04=0x7f020044;
public static final int icon_forward=0x7f020045;
public static final int icon_forward_elected=0x7f020046;
public static final int icon_information=0x7f020047;
public static final int icon_information_elected=0x7f020048;
public static final int icon_link=0x7f020049;
public static final int icon_link_elected=0x7f02004a;
public static final int icon_load_01=0x7f02004b;
public static final int icon_load_02=0x7f02004c;
public static final int icon_load_03=0x7f02004d;
public static final int icon_load_04=0x7f02004e;
public static final int icon_load_05=0x7f02004f;
public static final int icon_monitoring=0x7f020050;
public static final int icon_monitoring_elected=0x7f020051;
public static final int icon_off=0x7f020052;
public static final int icon_on=0x7f020053;
public static final int icon_option=0x7f020054;
public static final int icon_option_01=0x7f020055;
public static final int icon_option_01elected=0x7f020056;
public static final int icon_option_02=0x7f020057;
public static final int icon_option_02elected=0x7f020058;
public static final int icon_option_03=0x7f020059;
public static final int icon_search=0x7f02005a;
public static final int icon_settings=0x7f02005b;
public static final int icon_settings_elected=0x7f02005c;
public static final int icon_shade=0x7f02005d;
public static final int icon_spread=0x7f02005e;
public static final int icon_triangle=0x7f02005f;
public static final int ksw_md_thumb=0x7f020060;
public static final int layout_selector=0x7f020061;
public static final int linearlayout_background=0x7f020062;
public static final int marker=0x7f020063;
public static final int marker1=0x7f020064;
public static final int marker2=0x7f020065;
public static final int param_setting_selector=0x7f020066;
public static final int popupview_bg=0x7f020067;
public static final int pressed_backgorund_corner=0x7f020068;
public static final int radio_checked=0x7f020069;
public static final int radio_unchecked=0x7f02006a;
public static final int real_time_monitoring_selector=0x7f02006b;
public static final int segment_button=0x7f02006c;
public static final int segment_grey=0x7f02006d;
public static final int segment_grey_focus=0x7f02006e;
public static final int segment_grey_press=0x7f02006f;
public static final int segment_radio_grey_left=0x7f020070;
public static final int segment_radio_grey_left_focus=0x7f020071;
public static final int segment_radio_grey_left_press=0x7f020072;
public static final int segment_radio_grey_middle=0x7f020073;
public static final int segment_radio_grey_middle_focus=0x7f020074;
public static final int segment_radio_grey_middle_press=0x7f020075;
public static final int segment_radio_grey_right=0x7f020076;
public static final int segment_radio_grey_right_focus=0x7f020077;
public static final int segment_radio_grey_right_press=0x7f020078;
public static final int segment_radio_left=0x7f020079;
public static final int segment_radio_middle=0x7f02007a;
public static final int segment_radio_right=0x7f02007b;
public static final int segment_radio_white_left=0x7f02007c;
public static final int segment_radio_white_left_focus=0x7f02007d;
public static final int segment_radio_white_left_press=0x7f02007e;
public static final int segment_radio_white_middle=0x7f02007f;
public static final int segment_radio_white_middle_focus=0x7f020080;
public static final int segment_radio_white_middle_press=0x7f020081;
public static final int segment_radio_white_right=0x7f020082;
public static final int segment_radio_white_right_focus=0x7f020083;
public static final int segment_radio_white_right_press=0x7f020084;
public static final int segment_white=0x7f020085;
public static final int segment_white_focus=0x7f020086;
public static final int sel_shape_common_style=0x7f020087;
public static final int start_logo=0x7f020088;
public static final int switch_device_status_drawable=0x7f020089;
public static final int switch_thumb=0x7f02008a;
public static final int switch_thumb_button=0x7f02008b;
public static final int switch_track_off=0x7f02008c;
public static final int switch_track_off_button=0x7f02008d;
public static final int switch_track_off_p=0x7f02008e;
public static final int switch_track_on=0x7f02008f;
public static final int switch_track_on_button=0x7f020090;
public static final int switch_track_on_p=0x7f020091;
public static final int tab_func=0x7f020092;
public static final int tab_func2=0x7f020093;
public static final int test=0x7f020094;
public static final int weibo_detail_bottom_bg=0x7f020095;
public static final int weibo_detail_buttombar_itembg_on=0x7f020096;
public static final int wheel_bg=0x7f020097;
public static final int wheel_val=0x7f020098;
}
public static final class id {
public static final int btnAdd=0x7f09000a;
public static final int btnCancel=0x7f090016;
public static final int btnConfirm=0x7f090017;
public static final int btnExit=0x7f090000;
public static final int btnLastDay=0x7f090047;
public static final int btnNextDay=0x7f090049;
public static final int btn_dialog_input_cancle=0x7f090019;
public static final int btn_dialog_input_confirm=0x7f09001a;
public static final int btn_disconnected_device=0x7f090030;
public static final int btn_read=0x7f090070;
public static final int btn_recovery_device=0x7f09002e;
public static final int btn_scan_device=0x7f090031;
public static final int btn_set_date=0x7f090007;
public static final int btn_setting=0x7f090071;
public static final int chart1=0x7f090011;
public static final int chart2=0x7f09003f;
public static final int content=0x7f090009;
public static final int current_amp_hour_layout=0x7f090050;
public static final int current_max_power_layout=0x7f090056;
public static final int current_power_layout=0x7f09004a;
public static final int current_voltage_layout=0x7f09005c;
public static final int disconnect_device_btn_layout=0x7f09002f;
public static final int et_affirmpwd=0x7f09008a;
public static final int et_dialog_input=0x7f090018;
public static final int et_newpwd=0x7f090089;
public static final int et_oldpwd=0x7f090088;
public static final int imgbtn_current_amp_hour=0x7f090051;
public static final int imgbtn_current_max_power=0x7f090057;
public static final int imgbtn_current_power=0x7f09004b;
public static final int imgbtn_current_voltage=0x7f09005d;
public static final int item_add_device=0x7f0900cb;
public static final int item_check_update=0x7f0900cc;
public static final int layoutContent=0x7f090012;
public static final int layout_picker=0x7f090014;
public static final int linearLayout=0x7f090010;
public static final int lvDeviceInfo=0x7f090015;
public static final int lvInfo=0x7f09001b;
public static final int rb_devinfo=0x7f09000f;
public static final int rb_historical_data=0x7f09000d;
public static final int rb_monitoring=0x7f09000c;
public static final int rb_param_set=0x7f09000e;
public static final int rdbtn_all=0x7f090005;
public static final int rdbtn_battery_parameters=0x7f090072;
public static final int rdbtn_load_parameters=0x7f090073;
public static final int rdbtn_month=0x7f090003;
public static final int rdbtn_year=0x7f090004;
public static final int recovery_device_btn_layout=0x7f09002d;
public static final int rg_tab=0x7f09000b;
public static final int sb_load_switch_status=0x7f090080;
public static final int scrollView1=0x7f090046;
public static final int segment_Group=0x7f090002;
public static final int switch_device_status=0x7f090029;
public static final int tvAddDevice=0x7f0900c7;
public static final int tvCheckUpdate=0x7f0900ca;
public static final int tvContent=0x7f090013;
public static final int tvDateTime=0x7f090048;
public static final int tvGetAdmin=0x7f0900c8;
public static final int tvModifyPwd=0x7f0900c9;
public static final int tvTitle=0x7f090001;
public static final int tv_all_consumption_power_title=0x7f09006e;
public static final int tv_all_consumption_power_value=0x7f09006f;
public static final int tv_all_production_power_title=0x7f09006c;
public static final int tv_all_production_power_value=0x7f09006d;
public static final int tv_all_run_days_title=0x7f090062;
public static final int tv_all_run_days_value=0x7f090063;
public static final int tv_balanced_charge_voltage_set_title=0x7f090097;
public static final int tv_battery_all_discharge_times_title=0x7f090064;
public static final int tv_battery_all_discharge_times_value=0x7f090065;
public static final int tv_battery_charge_all_apm_hour_title=0x7f090068;
public static final int tv_battery_charge_all_apm_hour_value=0x7f090069;
public static final int tv_battery_charge_full_times_title=0x7f090066;
public static final int tv_battery_charge_full_times_value=0x7f090067;
public static final int tv_battery_charging_state_value=0x7f09007e;
public static final int tv_battery_discharge_all_apm_hour_title=0x7f09006a;
public static final int tv_battery_discharge_all_apm_hour_value=0x7f09006b;
public static final int tv_battery_electricity_value=0x7f09007b;
public static final int tv_battery_esidual_capacity_value=0x7f09007c;
public static final int tv_battery_state_value=0x7f090079;
public static final int tv_battery_temperature_value=0x7f09007d;
public static final int tv_battery_type_set_title=0x7f090090;
public static final int tv_battery_voltage_value=0x7f09007a;
public static final int tv_charge_imit_oltage_set_title=0x7f090095;
public static final int tv_day_battery_max_voltage_title=0x7f090060;
public static final int tv_day_battery_max_voltage_value=0x7f090061;
public static final int tv_day_battery_min_voltage_title=0x7f09005e;
public static final int tv_day_battery_min_voltage_value=0x7f09005f;
public static final int tv_day_charge_amp_hour_title=0x7f090052;
public static final int tv_day_charge_amp_hour_value=0x7f090053;
public static final int tv_day_charge_max_power_title=0x7f090058;
public static final int tv_day_charge_max_power_value=0x7f090059;
public static final int tv_day_consumption_power_title=0x7f09004e;
public static final int tv_day_consumption_power_value=0x7f09004f;
public static final int tv_day_discharge_amp_hour_title=0x7f090054;
public static final int tv_day_discharge_amp_hour_value=0x7f090055;
public static final int tv_day_discharge_max_power_title=0x7f09005a;
public static final int tv_day_discharge_max_power_value=0x7f09005b;
public static final int tv_day_production_power_title=0x7f09004c;
public static final int tv_day_production_power_value=0x7f09004d;
public static final int tv_device_connect_state_title=0x7f090026;
public static final int tv_device_connect_state_value=0x7f090027;
public static final int tv_device_id_title=0x7f09001e;
public static final int tv_device_id_value=0x7f09001f;
public static final int tv_device_name=0x7f090085;
public static final int tv_device_name_change=0x7f09002c;
public static final int tv_device_name_title=0x7f09002a;
public static final int tv_device_name_value=0x7f09002b;
public static final int tv_device_sn_code_title=0x7f090024;
public static final int tv_device_sn_code_value=0x7f090025;
public static final int tv_device_status_title=0x7f090028;
public static final int tv_device_type_title=0x7f090020;
public static final int tv_device_type_value=0x7f090021;
public static final int tv_device_version_title=0x7f090022;
public static final int tv_device_version_value=0x7f090023;
public static final int tv_discharge_limit_voltage_set_title=0x7f0900a5;
public static final int tv_down_historicalchart_ave_value_title=0x7f090042;
public static final int tv_down_historicalchart_ave_value_value=0x7f090043;
public static final int tv_down_historicalchart_current_value=0x7f09003d;
public static final int tv_down_historicalchart_layout=0x7f09003b;
public static final int tv_down_historicalchart_max_value=0x7f09003e;
public static final int tv_down_historicalchart_max_value_title=0x7f090044;
public static final int tv_down_historicalchart_max_value_value=0x7f090045;
public static final int tv_down_historicalchart_min_value_title=0x7f090040;
public static final int tv_down_historicalchart_min_value_value=0x7f090041;
public static final int tv_down_historicalchart_title=0x7f09003c;
public static final int tv_equalization_charging_time_set_title=0x7f0900a9;
public static final int tv_equilibrium_charge_interval_set_title=0x7f0900ad;
public static final int tv_first_working_power_set_title=0x7f0900b9;
public static final int tv_first_working_time_set_title=0x7f0900b7;
public static final int tv_float_charging_voltage_set_title=0x7f09009b;
public static final int tv_historicalchart_date=0x7f090008;
public static final int tv_historicalchart_title=0x7f090006;
public static final int tv_item_title=0x7f090086;
public static final int tv_lift_charge_return_voltage_set_title=0x7f09009d;
public static final int tv_lift_charge_voltage_set_title=0x7f090099;
public static final int tv_load=0x7f09007f;
public static final int tv_load_electricity_value=0x7f090083;
public static final int tv_load_operating_mode_set_title=0x7f0900b1;
public static final int tv_load_power_value=0x7f090084;
public static final int tv_load_state_value=0x7f090081;
public static final int tv_load_voltage_value=0x7f090082;
public static final int tv_morning_working_power_set_title=0x7f0900c5;
public static final int tv_morning_working_time_set_title=0x7f0900c3;
public static final int tv_nominal_capacity_of_battery_set_title=0x7f09008e;
public static final int tv_optical_control_delay_time_set_title=0x7f0900b3;
public static final int tv_optical_control_voltage_set_title=0x7f0900b5;
public static final int tv_over_discharge_delay_time_set_title=0x7f0900a7;
public static final int tv_over_discharge_return_voltage_set_title=0x7f09009f;
public static final int tv_over_discharge_voltage_set_title=0x7f0900a3;
public static final int tv_over_voltage_voltage_set_title=0x7f090093;
public static final int tv_parameter_balanced_charge_voltage_set_value=0x7f090098;
public static final int tv_parameter_battery_type_set_value=0x7f090091;
public static final int tv_parameter_charge_imit_oltage_set_value=0x7f090096;
public static final int tv_parameter_discharge_limit_voltage_set_value=0x7f0900a6;
public static final int tv_parameter_equalization_charging_time_set_value=0x7f0900aa;
public static final int tv_parameter_equilibrium_charge_interval_set_value=0x7f0900ae;
public static final int tv_parameter_first_working_power_set_value=0x7f0900ba;
public static final int tv_parameter_first_working_time_set_value=0x7f0900b8;
public static final int tv_parameter_float_charging_voltage_set_value=0x7f09009c;
public static final int tv_parameter_lift_charge_return_voltage_set_value=0x7f09009e;
public static final int tv_parameter_lift_charge_voltage_set_value=0x7f09009a;
public static final int tv_parameter_load_operating_mode_set_value=0x7f0900b2;
public static final int tv_parameter_morning_working_power_set_value=0x7f0900c6;
public static final int tv_parameter_morning_working_time_set_value=0x7f0900c4;
public static final int tv_parameter_optical_control_delay_time_set_value=0x7f0900b4;
public static final int tv_parameter_optical_control_voltage_set_value=0x7f0900b6;
public static final int tv_parameter_over_discharge_delay_time_set_value=0x7f0900a8;
public static final int tv_parameter_over_discharge_return_voltage_set_value=0x7f0900a0;
public static final int tv_parameter_over_discharge_voltage_set_value=0x7f0900a4;
public static final int tv_parameter_over_voltage_voltage_set_value=0x7f090094;
public static final int tv_parameter_promote_charging_time_set_value=0x7f0900ac;
public static final int tv_parameter_second_working_power_set_value=0x7f0900be;
public static final int tv_parameter_second_working_time_set_value=0x7f0900bc;
public static final int tv_parameter_set_in_common_use_param_title=0x7f09008b;
public static final int tv_parameter_set_in_senior_use_param_title=0x7f090092;
public static final int tv_parameter_set_nominal_capacity_of_battery_set_value=0x7f09008f;
public static final int tv_parameter_set_system_voltage_set_value=0x7f09008d;
public static final int tv_parameter_temperature_compensation_coefficient_set_value=0x7f0900b0;
public static final int tv_parameter_third_working_power_set_value=0x7f0900c2;
public static final int tv_parameter_third_working_time_set_value=0x7f0900c0;
public static final int tv_parameter_warning_under_voltage_set_value=0x7f0900a2;
public static final int tv_promote_charging_time_set_title=0x7f0900ab;
public static final int tv_second_working_power_set_title=0x7f0900bd;
public static final int tv_second_working_time_set_title=0x7f0900bb;
public static final int tv_solar_panel_charging_power_value=0x7f090078;
public static final int tv_solar_panel_electricity_value=0x7f090077;
public static final int tv_solar_panel_state_value=0x7f090075;
public static final int tv_solar_panel_voltage_value=0x7f090076;
public static final int tv_system_voltage_set_title=0x7f09008c;
public static final int tv_temperature_compensation_coefficient_set_title=0x7f0900af;
public static final int tv_third_working_power_set_title=0x7f0900c1;
public static final int tv_third_working_time_set_title=0x7f0900bf;
public static final int tv_up_historicalchart_ave_value_title=0x7f090037;
public static final int tv_up_historicalchart_ave_value_value=0x7f090038;
public static final int tv_up_historicalchart_current_value=0x7f090033;
public static final int tv_up_historicalchart_max_value=0x7f090034;
public static final int tv_up_historicalchart_max_value_title=0x7f090039;
public static final int tv_up_historicalchart_max_value_value=0x7f09003a;
public static final int tv_up_historicalchart_min_value_title=0x7f090035;
public static final int tv_up_historicalchart_min_value_value=0x7f090036;
public static final int tv_up_historicalchart_title=0x7f090032;
public static final int tv_warning_under_voltage_set_title=0x7f0900a1;
public static final int update_pwd_dialog=0x7f090087;
public static final int viewFlipper=0x7f090074;
public static final int wvMonth=0x7f09001d;
public static final int wvYear=0x7f09001c;
}
public static final class layout {
public static final int activity_historical_data=0x7f030000;
public static final int activity_main=0x7f030001;
public static final int activity_start=0x7f030002;
public static final int custom_marker_view=0x7f030003;
public static final int dialog_add_device=0x7f030004;
public static final int dialog_input=0x7f030005;
public static final int dialog_list_item_select=0x7f030006;
public static final int dialog_normal=0x7f030007;
public static final int dialog_set_date=0x7f030008;
public static final int dialog_show_soft_version_info=0x7f030009;
public static final int fragment_device_info=0x7f03000a;
public static final int fragment_historical_chart=0x7f03000b;
public static final int fragment_historical_data=0x7f03000c;
public static final int fragment_param_setting=0x7f03000d;
public static final int fragment_realtime_monitor=0x7f03000e;
public static final int item_device_info=0x7f03000f;
public static final int item_list_info=0x7f030010;
public static final int item_popup_listview=0x7f030011;
public static final int update_password_dialog=0x7f030012;
public static final int view_battery_parameters=0x7f030013;
public static final int view_load_parameters=0x7f030014;
public static final int view_popup=0x7f030015;
}
public static final class menu {
public static final int main=0x7f080000;
}
public static final class string {
public static final int action_settings=0x7f040000;
public static final int added_device=0x7f040001;
public static final int all=0x7f040002;
public static final int all_chart_summary=0x7f040003;
public static final int all_consumption_power=0x7f040004;
public static final int all_production_power=0x7f040005;
public static final int all_run_days=0x7f040006;
public static final int apm_hour=0x7f040007;
public static final int app_name=0x7f040008;
public static final int automatic_recognition=0x7f040009;
public static final int ave_value=0x7f04000a;
public static final int balanced_charge_voltage_set=0x7f04000b;
public static final int base_month_chart_summary=0x7f04000c;
public static final int base_year_chart_summary=0x7f04000d;
public static final int battery=0x7f04000e;
public static final int battery_all_discharge_times=0x7f04000f;
public static final int battery_board_parameter=0x7f040010;
public static final int battery_charge_all_apm_hour=0x7f040011;
public static final int battery_charge_full_times=0x7f040012;
public static final int battery_discharge_all_apm_hour=0x7f040013;
public static final int battery_esidual_capacity=0x7f040014;
public static final int battery_parameters=0x7f040015;
public static final int battery_plate_state=0x7f040016;
public static final int battery_state=0x7f040017;
public static final int battery_state_val00h=0x7f040018;
public static final int battery_state_val01h=0x7f040019;
public static final int battery_state_val02h=0x7f04001a;
public static final int battery_state_val03h=0x7f04001b;
public static final int battery_state_val04h=0x7f04001c;
public static final int battery_state_val05h=0x7f04001d;
public static final int battery_state_val06h=0x7f04001e;
public static final int battery_temperature=0x7f04001f;
public static final int battery_type_set=0x7f040020;
public static final int battery_type_val00h=0x7f040021;
public static final int battery_type_val01h=0x7f040022;
public static final int battery_type_val02h=0x7f040023;
public static final int battery_type_val03h=0x7f040024;
public static final int battery_type_val04h=0x7f040025;
public static final int battery_voltage=0x7f040026;
public static final int can_not_connect_device_info=0x7f040027;
public static final int cancel=0x7f040028;
public static final int capacity=0x7f040029;
public static final int centigrade=0x7f04002a;
public static final int change_device_name=0x7f04002b;
public static final int change_device_name_=0x7f04002c;
public static final int charge_apm_hour=0x7f04002d;
public static final int charge_imit_oltage_set=0x7f04002e;
public static final int charge_max_power=0x7f04002f;
public static final int charging_electricity=0x7f040030;
public static final int charging_power=0x7f040031;
public static final int charging_state=0x7f040032;
public static final int check_update=0x7f040033;
public static final int closed=0x7f040034;
public static final int confirm=0x7f040035;
public static final int connect_device_device_success=0x7f040036;
public static final int consumption_power=0x7f040037;
public static final int controller_info_byte0=0x7f040038;
public static final int controller_info_byte1=0x7f040039;
public static final int controller_info_byte10=0x7f04003a;
public static final int controller_info_byte11=0x7f04003b;
public static final int controller_info_byte12=0x7f04003c;
public static final int controller_info_byte13=0x7f04003d;
public static final int controller_info_byte14=0x7f04003e;
public static final int controller_info_byte2=0x7f04003f;
public static final int controller_info_byte3=0x7f040040;
public static final int controller_info_byte4=0x7f040041;
public static final int controller_info_byte5=0x7f040042;
public static final int controller_info_byte6=0x7f040043;
public static final int controller_info_byte7=0x7f040044;
public static final int controller_info_byte8=0x7f040045;
public static final int controller_info_byte9=0x7f040046;
public static final int controller_info_none=0x7f040047;
public static final int correct_password=0x7f040048;
public static final int current_version_info=0x7f040049;
public static final int day=0x7f04004a;
public static final int day_battery_max_voltage=0x7f04004b;
public static final int day_battery_min_voltage=0x7f04004c;
public static final int day_charge_amp_hour=0x7f04004d;
public static final int day_charge_max_power=0x7f04004e;
public static final int day_consumption_power=0x7f04004f;
public static final int day_discharge_amp_hour=0x7f040050;
public static final int day_discharge_max_power=0x7f040051;
public static final int day_production_power=0x7f040052;
public static final int device_connect_state=0x7f040053;
public static final int device_connected=0x7f040054;
public static final int device_disconnected=0x7f040055;
public static final int device_id=0x7f040056;
public static final int device_info=0x7f040057;
public static final int device_name=0x7f040058;
public static final int device_name_exists=0x7f040059;
public static final int device_name_set_failed=0x7f04005a;
public static final int device_name_set_sucess=0x7f04005b;
public static final int device_not_link=0x7f04005c;
public static final int device_param_getting_failed=0x7f04005d;
public static final int device_param_getting_success=0x7f04005e;
public static final int device_param_setting_failed=0x7f04005f;
public static final int device_param_setting_nothing=0x7f040060;
public static final int device_param_setting_success=0x7f040061;
public static final int device_sn_code=0x7f040062;
public static final int device_status=0x7f040063;
public static final int device_type=0x7f040064;
public static final int device_version=0x7f040065;
public static final int discharge_apm_hour=0x7f040066;
public static final int discharge_limit_voltage_set=0x7f040067;
public static final int discharge_max_power=0x7f040068;
public static final int disconnect_device_info=0x7f040069;
public static final int disconnected_device=0x7f04006a;
public static final int electricity=0x7f04006b;
public static final int electricity_colon=0x7f04006c;
public static final int electricity_load=0x7f04006d;
public static final int equalization_charging_time_set=0x7f04006e;
public static final int equilibrium_charge_interval_set=0x7f04006f;
public static final int first_working_power_set=0x7f040070;
public static final int first_working_time_set=0x7f040071;
public static final int float_charging_voltage_set=0x7f040072;
public static final int get_admin=0x7f040073;
public static final int historical_data=0x7f040074;
public static final int in_common_use_param=0x7f040075;
public static final int in_senior_use_param=0x7f040076;
public static final int incorrect_password=0x7f040077;
public static final int init_null_charter=0x7f040078;
public static final int last_day=0x7f040079;
public static final int lift_charge_return_voltage_set=0x7f04007a;
public static final int lift_charge_voltage_set=0x7f04007b;
public static final int load=0x7f04007c;
public static final int load_electricity=0x7f04007d;
public static final int load_operating_mode_set=0x7f04007e;
public static final int load_operating_mode_val00h=0x7f04007f;
public static final int load_operating_mode_val01h=0x7f040080;
public static final int load_operating_mode_val02h=0x7f040081;
public static final int load_operating_mode_val03h=0x7f040082;
public static final int load_operating_mode_val04h=0x7f040083;
public static final int load_operating_mode_val05h=0x7f040084;
public static final int load_operating_mode_val06h=0x7f040085;
public static final int load_operating_mode_val07h=0x7f040086;
public static final int load_operating_mode_val08h=0x7f040087;
public static final int load_operating_mode_val09h=0x7f040088;
public static final int load_operating_mode_val0ah=0x7f040089;
public static final int load_operating_mode_val0bh=0x7f04008a;
public static final int load_operating_mode_val0ch=0x7f04008b;
public static final int load_operating_mode_val0dh=0x7f04008c;
public static final int load_operating_mode_val0eh=0x7f04008d;
public static final int load_operating_mode_val0fh=0x7f04008e;
public static final int load_operating_mode_val10h=0x7f04008f;
public static final int load_operating_mode_val11h=0x7f040090;
public static final int load_parameters=0x7f040091;
public static final int load_power=0x7f040092;
public static final int load_state=0x7f040093;
public static final int load_switch=0x7f040094;
public static final int load_voltage=0x7f040095;
public static final int max_value=0x7f040096;
public static final int min_value=0x7f040097;
public static final int month=0x7f040098;
public static final int more_high_voltage=0x7f040099;
public static final int more_low_voltage=0x7f04009a;
public static final int more_new_soft_version_info=0x7f04009b;
public static final int morning_working_power_set=0x7f04009c;
public static final int morning_working_time_set=0x7f04009d;
public static final int new_password=0x7f04009e;
public static final int next_day=0x7f04009f;
public static final int nominal_capacity_of_battery_set=0x7f0400a0;
public static final int old_password=0x7f0400a1;
public static final int opened=0x7f0400a2;
public static final int optical_control_delay_time_set=0x7f0400a3;
public static final int optical_control_voltage_set=0x7f0400a4;
public static final int over_discharge_delay_time_set=0x7f0400a5;
public static final int over_discharge_return_voltage_set=0x7f0400a6;
public static final int over_discharge_voltage_set=0x7f0400a7;
public static final int over_voltage_voltage_set=0x7f0400a8;
public static final int param_setting=0x7f0400a9;
public static final int please_get_admin=0x7f0400aa;
public static final int please_input_the_password=0x7f0400ab;
public static final int please_select_fixed_sys_vol=0x7f0400ac;
public static final int production_power=0x7f0400ad;
public static final int promote_charging_time_set=0x7f0400ae;
public static final int prompt=0x7f0400af;
public static final int readin=0x7f0400b0;
public static final int reaffirm_new_password=0x7f0400b1;
public static final int real_time_monitoring=0x7f0400b2;
public static final int realtime_monitor=0x7f0400b3;
public static final int recovery_device=0x7f0400b4;
public static final int restore_factory_failed=0x7f0400b5;
public static final int restore_factory_success=0x7f0400b6;
public static final int scan_device=0x7f0400b7;
public static final int scan_device_dialog_title=0x7f0400b8;
public static final int second_working_power_set=0x7f0400b9;
public static final int second_working_time_set=0x7f0400ba;
public static final int setting=0x7f0400bb;
public static final int solar_panel=0x7f0400bc;
public static final int solar_panel_electricity=0x7f0400bd;
public static final int solar_panel_voltage=0x7f0400be;
public static final int state_colon=0x7f0400bf;
public static final int system_voltage_set=0x7f0400c0;
public static final int temperature=0x7f0400c1;
public static final int temperature_compensation_coefficient_set=0x7f0400c2;
public static final int third_working_power_set=0x7f0400c3;
public static final int third_working_time_set=0x7f0400c4;
public static final int times=0x7f0400c5;
public static final int update_password=0x7f0400c6;
public static final int update_password_fail=0x7f0400c7;
public static final int update_password_success=0x7f0400c8;
public static final int v_power=0x7f0400c9;
public static final int voltage=0x7f0400ca;
public static final int voltage_colon=0x7f0400cb;
public static final int warning_under_voltage_set=0x7f0400cc;
public static final int year=0x7f0400cd;
public static final int your_device_bluetooth_not_supported=0x7f0400ce;
public static final int your_device_not_supported=0x7f0400cf;
}
public static final class style {
/** API 11 theme customizations can go here.
API 14 theme customizations can go here.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
*/
public static final int AppBaseTheme=0x7f060000;
/** All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f060001;
public static final int PageTitle=0x7f060002;
public static final int Theme=0x7f060003;
public static final int Theme_Transparent=0x7f060004;
public static final int app_text_title_bold_style=0x7f060005;
public static final int battery_layout_text_content_style=0x7f060006;
public static final int battery_layout_text_title_bold_style=0x7f060007;
public static final int battery_layout_text_title_style=0x7f060008;
public static final int battery_linear_layout_horizontal_style=0x7f060009;
public static final int device_info_layout_left_text_style=0x7f06000a;
public static final int device_info_layout_right_text_style=0x7f06000b;
public static final int historical_data_layout_text_title_bold_center_style=0x7f06000c;
public static final int historical_data_layout_text_title_left_style=0x7f06000d;
public static final int historical_data_layout_text_title_style=0x7f06000e;
public static final int historical_layout_text_title_style=0x7f06000f;
public static final int historical_linear_layout_horizontal_style=0x7f060010;
public static final int historical_right_imagebtn_layout_style=0x7f060011;
public static final int historicalchart_layout_text_title_style=0x7f060012;
public static final int historicalchart_text_current_value_style=0x7f060013;
public static final int historicalchart_text_min_value_title_style=0x7f060014;
public static final int historicalchart_text_min_value_value_style=0x7f060015;
public static final int historicalchart_text_title_style=0x7f060016;
public static final int item_device_info_text_style=0x7f060017;
public static final int item_popup_layout_text_content_style=0x7f060018;
public static final int light_tab=0x7f060019;
public static final int list_item__info_text_style=0x7f06001a;
public static final int more_new_soft_version_info_style=0x7f06001b;
public static final int param_set_layout_text_title_bold_style=0x7f06001c;
public static final int realtime_left_image_layout_style=0x7f06001d;
public static final int realtime_monitor_ex_text_style=0x7f06001e;
public static final int realtime_monitor_horizontal_line_style=0x7f06001f;
public static final int realtime_monitor_text_style=0x7f060020;
public static final int realtime_monitor_text_value_style=0x7f060021;
public static final int scan_device_dialog_title_style=0x7f060022;
public static final int tabbar_radio_button_style=0x7f060023;
public static final int tv_parameter_set_param_name_title_left_style=0x7f060024;
public static final int tv_parameter_set_param_name_title_style=0x7f060025;
public static final int tv_parameter_set_param_title_style=0x7f060026;
public static final int tv_parameter_set_param_value_title_right_style=0x7f060027;
public static final int tv_parameter_set_param_value_title_style=0x7f060028;
}
public static final class styleable {
/** Attributes that can be used with a LargeTouchableAreaView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #LargeTouchableAreaView_addition com.wcsmobile:addition}</code></td><td></td></tr>
<tr><td><code>{@link #LargeTouchableAreaView_additionBottom com.wcsmobile:additionBottom}</code></td><td></td></tr>
<tr><td><code>{@link #LargeTouchableAreaView_additionLeft com.wcsmobile:additionLeft}</code></td><td></td></tr>
<tr><td><code>{@link #LargeTouchableAreaView_additionRight com.wcsmobile:additionRight}</code></td><td></td></tr>
<tr><td><code>{@link #LargeTouchableAreaView_additionTop com.wcsmobile:additionTop}</code></td><td></td></tr>
</table>
@see #LargeTouchableAreaView_addition
@see #LargeTouchableAreaView_additionBottom
@see #LargeTouchableAreaView_additionLeft
@see #LargeTouchableAreaView_additionRight
@see #LargeTouchableAreaView_additionTop
*/
public static final int[] LargeTouchableAreaView = {
0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
0x7f010004
};
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#addition}
attribute's value can be found in the {@link #LargeTouchableAreaView} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:addition
*/
public static final int LargeTouchableAreaView_addition = 0;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#additionBottom}
attribute's value can be found in the {@link #LargeTouchableAreaView} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:additionBottom
*/
public static final int LargeTouchableAreaView_additionBottom = 1;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#additionLeft}
attribute's value can be found in the {@link #LargeTouchableAreaView} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:additionLeft
*/
public static final int LargeTouchableAreaView_additionLeft = 2;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#additionRight}
attribute's value can be found in the {@link #LargeTouchableAreaView} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:additionRight
*/
public static final int LargeTouchableAreaView_additionRight = 3;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#additionTop}
attribute's value can be found in the {@link #LargeTouchableAreaView} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:additionTop
*/
public static final int LargeTouchableAreaView_additionTop = 4;
/** Attributes that can be used with a PengRadioButton.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableBottom com.wcsmobile:peng_drawableBottom}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableBottomHeight com.wcsmobile:peng_drawableBottomHeight}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableBottomWith com.wcsmobile:peng_drawableBottomWith}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableLeft com.wcsmobile:peng_drawableLeft}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableLeftHeight com.wcsmobile:peng_drawableLeftHeight}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableLeftWith com.wcsmobile:peng_drawableLeftWith}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableRight com.wcsmobile:peng_drawableRight}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableRightHeight com.wcsmobile:peng_drawableRightHeight}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableRightWith com.wcsmobile:peng_drawableRightWith}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableTop com.wcsmobile:peng_drawableTop}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableTopHeight com.wcsmobile:peng_drawableTopHeight}</code></td><td></td></tr>
<tr><td><code>{@link #PengRadioButton_peng_drawableTopWith com.wcsmobile:peng_drawableTopWith}</code></td><td></td></tr>
</table>
@see #PengRadioButton_peng_drawableBottom
@see #PengRadioButton_peng_drawableBottomHeight
@see #PengRadioButton_peng_drawableBottomWith
@see #PengRadioButton_peng_drawableLeft
@see #PengRadioButton_peng_drawableLeftHeight
@see #PengRadioButton_peng_drawableLeftWith
@see #PengRadioButton_peng_drawableRight
@see #PengRadioButton_peng_drawableRightHeight
@see #PengRadioButton_peng_drawableRightWith
@see #PengRadioButton_peng_drawableTop
@see #PengRadioButton_peng_drawableTopHeight
@see #PengRadioButton_peng_drawableTopWith
*/
public static final int[] PengRadioButton = {
0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008,
0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c,
0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010
};
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableBottom}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.wcsmobile:peng_drawableBottom
*/
public static final int PengRadioButton_peng_drawableBottom = 9;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableBottomHeight}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:peng_drawableBottomHeight
*/
public static final int PengRadioButton_peng_drawableBottomHeight = 3;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableBottomWith}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:peng_drawableBottomWith
*/
public static final int PengRadioButton_peng_drawableBottomWith = 2;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableLeft}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.wcsmobile:peng_drawableLeft
*/
public static final int PengRadioButton_peng_drawableLeft = 11;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableLeftHeight}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:peng_drawableLeftHeight
*/
public static final int PengRadioButton_peng_drawableLeftHeight = 7;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableLeftWith}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:peng_drawableLeftWith
*/
public static final int PengRadioButton_peng_drawableLeftWith = 6;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableRight}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.wcsmobile:peng_drawableRight
*/
public static final int PengRadioButton_peng_drawableRight = 10;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableRightHeight}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:peng_drawableRightHeight
*/
public static final int PengRadioButton_peng_drawableRightHeight = 5;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableRightWith}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:peng_drawableRightWith
*/
public static final int PengRadioButton_peng_drawableRightWith = 4;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableTop}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.wcsmobile:peng_drawableTop
*/
public static final int PengRadioButton_peng_drawableTop = 8;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableTopHeight}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:peng_drawableTopHeight
*/
public static final int PengRadioButton_peng_drawableTopHeight = 1;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#peng_drawableTopWith}
attribute's value can be found in the {@link #PengRadioButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:peng_drawableTopWith
*/
public static final int PengRadioButton_peng_drawableTopWith = 0;
/** Attributes that can be used with a SegmentedGroup.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #SegmentedGroup_sc_border_width com.wcsmobile:sc_border_width}</code></td><td></td></tr>
<tr><td><code>{@link #SegmentedGroup_sc_checked_text_color com.wcsmobile:sc_checked_text_color}</code></td><td></td></tr>
<tr><td><code>{@link #SegmentedGroup_sc_corner_radius com.wcsmobile:sc_corner_radius}</code></td><td></td></tr>
<tr><td><code>{@link #SegmentedGroup_sc_tint_color com.wcsmobile:sc_tint_color}</code></td><td></td></tr>
</table>
@see #SegmentedGroup_sc_border_width
@see #SegmentedGroup_sc_checked_text_color
@see #SegmentedGroup_sc_corner_radius
@see #SegmentedGroup_sc_tint_color
*/
public static final int[] SegmentedGroup = {
0x7f010011, 0x7f010012, 0x7f010013, 0x7f010014
};
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#sc_border_width}
attribute's value can be found in the {@link #SegmentedGroup} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:sc_border_width
*/
public static final int SegmentedGroup_sc_border_width = 1;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#sc_checked_text_color}
attribute's value can be found in the {@link #SegmentedGroup} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:sc_checked_text_color
*/
public static final int SegmentedGroup_sc_checked_text_color = 3;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#sc_corner_radius}
attribute's value can be found in the {@link #SegmentedGroup} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:sc_corner_radius
*/
public static final int SegmentedGroup_sc_corner_radius = 0;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#sc_tint_color}
attribute's value can be found in the {@link #SegmentedGroup} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:sc_tint_color
*/
public static final int SegmentedGroup_sc_tint_color = 2;
/** Attributes that can be used with a SwitchButton.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #SwitchButton_kswAnimationDuration com.wcsmobile:kswAnimationDuration}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswBackColor com.wcsmobile:kswBackColor}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswBackDrawable com.wcsmobile:kswBackDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswBackMeasureRatio com.wcsmobile:kswBackMeasureRatio}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswBackRadius com.wcsmobile:kswBackRadius}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswFadeBack com.wcsmobile:kswFadeBack}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswTextMarginH com.wcsmobile:kswTextMarginH}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswTextOff com.wcsmobile:kswTextOff}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswTextOn com.wcsmobile:kswTextOn}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbColor com.wcsmobile:kswThumbColor}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbDrawable com.wcsmobile:kswThumbDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbHeight com.wcsmobile:kswThumbHeight}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbMargin com.wcsmobile:kswThumbMargin}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbMarginBottom com.wcsmobile:kswThumbMarginBottom}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbMarginLeft com.wcsmobile:kswThumbMarginLeft}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbMarginRight com.wcsmobile:kswThumbMarginRight}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbMarginTop com.wcsmobile:kswThumbMarginTop}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbRadius com.wcsmobile:kswThumbRadius}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswThumbWidth com.wcsmobile:kswThumbWidth}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchButton_kswTintColor com.wcsmobile:kswTintColor}</code></td><td></td></tr>
</table>
@see #SwitchButton_kswAnimationDuration
@see #SwitchButton_kswBackColor
@see #SwitchButton_kswBackDrawable
@see #SwitchButton_kswBackMeasureRatio
@see #SwitchButton_kswBackRadius
@see #SwitchButton_kswFadeBack
@see #SwitchButton_kswTextMarginH
@see #SwitchButton_kswTextOff
@see #SwitchButton_kswTextOn
@see #SwitchButton_kswThumbColor
@see #SwitchButton_kswThumbDrawable
@see #SwitchButton_kswThumbHeight
@see #SwitchButton_kswThumbMargin
@see #SwitchButton_kswThumbMarginBottom
@see #SwitchButton_kswThumbMarginLeft
@see #SwitchButton_kswThumbMarginRight
@see #SwitchButton_kswThumbMarginTop
@see #SwitchButton_kswThumbRadius
@see #SwitchButton_kswThumbWidth
@see #SwitchButton_kswTintColor
*/
public static final int[] SwitchButton = {
0x7f010015, 0x7f010016, 0x7f010017, 0x7f010018,
0x7f010019, 0x7f01001a, 0x7f01001b, 0x7f01001c,
0x7f01001d, 0x7f01001e, 0x7f01001f, 0x7f010020,
0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024,
0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028
};
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswAnimationDuration}
attribute's value can be found in the {@link #SwitchButton} array.
<p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:kswAnimationDuration
*/
public static final int SwitchButton_kswAnimationDuration = 15;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswBackColor}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.wcsmobile:kswBackColor
*/
public static final int SwitchButton_kswBackColor = 12;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswBackDrawable}
attribute's value can be found in the {@link #SwitchButton} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.wcsmobile:kswBackDrawable
*/
public static final int SwitchButton_kswBackDrawable = 11;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswBackMeasureRatio}
attribute's value can be found in the {@link #SwitchButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:kswBackMeasureRatio
*/
public static final int SwitchButton_kswBackMeasureRatio = 14;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswBackRadius}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswBackRadius
*/
public static final int SwitchButton_kswBackRadius = 10;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswFadeBack}
attribute's value can be found in the {@link #SwitchButton} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:kswFadeBack
*/
public static final int SwitchButton_kswFadeBack = 13;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswTextMarginH}
attribute's value can be found in the {@link #SwitchButton} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:kswTextMarginH
*/
public static final int SwitchButton_kswTextMarginH = 19;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswTextOff}
attribute's value can be found in the {@link #SwitchButton} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:kswTextOff
*/
public static final int SwitchButton_kswTextOff = 18;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswTextOn}
attribute's value can be found in the {@link #SwitchButton} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:kswTextOn
*/
public static final int SwitchButton_kswTextOn = 17;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbColor}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.wcsmobile:kswThumbColor
*/
public static final int SwitchButton_kswThumbColor = 1;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbDrawable}
attribute's value can be found in the {@link #SwitchButton} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.wcsmobile:kswThumbDrawable
*/
public static final int SwitchButton_kswThumbDrawable = 0;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbHeight}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswThumbHeight
*/
public static final int SwitchButton_kswThumbHeight = 8;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbMargin}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswThumbMargin
*/
public static final int SwitchButton_kswThumbMargin = 2;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbMarginBottom}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswThumbMarginBottom
*/
public static final int SwitchButton_kswThumbMarginBottom = 4;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbMarginLeft}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswThumbMarginLeft
*/
public static final int SwitchButton_kswThumbMarginLeft = 5;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbMarginRight}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswThumbMarginRight
*/
public static final int SwitchButton_kswThumbMarginRight = 6;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbMarginTop}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswThumbMarginTop
*/
public static final int SwitchButton_kswThumbMarginTop = 3;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbRadius}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswThumbRadius
*/
public static final int SwitchButton_kswThumbRadius = 9;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswThumbWidth}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
@attr name com.wcsmobile:kswThumbWidth
*/
public static final int SwitchButton_kswThumbWidth = 7;
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#kswTintColor}
attribute's value can be found in the {@link #SwitchButton} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.wcsmobile:kswTintColor
*/
public static final int SwitchButton_kswTintColor = 16;
/** Attributes that can be used with a dashedline.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #dashedline_lineColor com.wcsmobile:lineColor}</code></td><td></td></tr>
</table>
@see #dashedline_lineColor
*/
public static final int[] dashedline = {
0x7f010029
};
/**
<p>This symbol is the offset where the {@link com.wcsmobile.R.attr#lineColor}
attribute's value can be found in the {@link #dashedline} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.wcsmobile:lineColor
*/
public static final int dashedline_lineColor = 0;
};
}
| [
"185368123@qq.com"
] | 185368123@qq.com |
f37b3155a6d7dc84cc3e35068d8246fb437df4f7 | c410683a9d08113e4aaeebc4690822977a5cf680 | /src/fsm/excelToolkit/hmi/Window.java | 8a3faf9bb99695c70f68b1be5e3781eb2ca14c37 | [] | no_license | fivestarmoon/ExcelToolkit | 2f5e7f78366cb1813039fa64eafc362a95501b53 | c3cb8e8f1d4d0fef829083801eb60884a8a19b85 | refs/heads/master | 2023-07-22T02:42:43.314932 | 2019-08-11T02:25:48 | 2019-08-11T02:25:48 | 150,911,276 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,319 | java | package fsm.excelToolkit.hmi
;
import java.awt.Container;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDragEvent;
import java.awt.dnd.DropTargetDropEvent;
import java.awt.dnd.DropTargetEvent;
import java.awt.dnd.DropTargetListener;
import java.awt.event.*;
import java.io.File;
import java.io.IOException;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import fsm.common.FsmResources;
import fsm.common.Log;
import fsm.common.parameters.Parameters;
import fsm.common.utils.FileModifiedListener;
import fsm.common.utils.FileModifiedMonitor;
import fsm.excelToolkit.Main;
import fsm.excelToolkit.generic.GenericSheetPanel;
import fsm.excelToolkit.hmi.table.TableSpreadsheet;
import fsm.excelToolkit.jira.JiraSummaryPanel;
import fsm.excelToolkit.loading.LoadingSummaryPanel;
import fsm.excelToolkit.wpsr.WpsrSummaryPanel;
@SuppressWarnings("serial")
public class Window extends JFrame
implements WindowListener, DropTargetListener, FileModifiedListener
{
public void createAndShowGUI()
{
// Create and set up the window.
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Set the main window frame's title
setTitle("Excel Toolkit");
setResizable(true);
// Set the window size
setSize(new Dimension(700,700));
setLocation(new Point(100,100));
addWindowListener(this);
// Create the menu
JMenuBar menuBar = new JMenuBar();
// File menu
JMenu fileMenu = new JMenu("File");
fileMenu.setMnemonic(KeyEvent.VK_F);
// File > Open
{
JMenuItem menuItem = new JMenuItem(
"Open JSON file ...",
FsmResources.getIconResource("file_empty.png"));
menuItem.setMnemonic(KeyEvent.VK_O);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK));
menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
JFileChooser chooser = new JFileChooser(".");
chooser.addChoosableFileFilter(new FileNameExtensionFilter("Excel tool kit files", "extk"));
chooser.addChoosableFileFilter(new FileNameExtensionFilter("Text files", "txt"));
int returnVal = chooser.showOpenDialog(Window.this);
if(returnVal == JFileChooser.APPROVE_OPTION)
{
processNewParameterFile(chooser.getSelectedFile().getAbsolutePath());
}
}
});
fileMenu.add(menuItem);
}
// File > Reload
{
JMenuItem menuItem = new JMenuItem(
"Reload JSON file",
FsmResources.getIconResource("program_refresh.png"));
menuItem.setMnemonic(KeyEvent.VK_R);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.CTRL_MASK));
menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
if ( lastFile_.length() > 0 )
{
processNewParameterFile(lastFile_);
}
}
});
fileMenu.add(menuItem);
}
// File > Edit
{
JMenuItem menuItem = new JMenuItem(
"Edit JSON file ...",
FsmResources.getIconResource("file_paste.png"));
menuItem.setMnemonic(KeyEvent.VK_E);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_MASK));
menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
try
{
if ( lastFile_.length() > 0 )
{
Desktop.getDesktop().open(new File(lastFile_));
}
}
catch (IOException e1)
{
Log.severe("Could not open file with desktop", e1);
}
}
});
fileMenu.add(menuItem);
}
// File > Exit
{
JMenuItem menuItem = new JMenuItem(
"Exit",
FsmResources.getIconResource("program_exit.png"));
menuItem.setMnemonic(KeyEvent.VK_X);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK));
menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
Window.this.dispatchEvent(new WindowEvent(Window.this, WindowEvent.WINDOW_CLOSING));
}
});
fileMenu.add(menuItem);
}
// Help menu
JMenu helpMenu = new JMenu("Help");
helpMenu.setMnemonic(KeyEvent.VK_H);
// Help > View Log
{
JMenuItem menuItem = new JMenuItem(
"View log ...");
menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
try
{
Desktop.getDesktop().open(new File(Main.GetLogFileName_s()));
}
catch (IOException e1)
{
Log.severe("Could not open file with desktop", e1);
}
}
});
helpMenu.add(menuItem);
}
// Help > About
{
JMenuItem menuItem = new JMenuItem(
"About");
menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
JOptionPane.showMessageDialog(Window.this, "Excel Toolkit\nKurt Hagen\n" + Main.GetBuildDate_s());
}
});
helpMenu.add(menuItem);
}
// Add menus to the bar
menuBar.add(fileMenu);
menuBar.add(Box.createHorizontalGlue());
menuBar.add(helpMenu);
// Add menu bar
setJMenuBar(menuBar);
// Display the window.
title_ = "";
showContent(new JLabel("Nothing to display ..."));
setVisible(true);
}
public void showContent(Container content)
{
setTitle("Excel Toolkit [" + title_ + "]");
setContentPane(content);
new DropTarget(content, this);
revalidate();
repaint();
}
public void processNewParameterFile(String absolutePath)
{
try
{
// Update the working directory
File file = new File(absolutePath);
String path = file.getParent();
if ( path != null )
{
System.setProperty("user.dir", path);
}
if ( fileModifiedMonitor_ != null )
{
fileModifiedMonitor_.stop();
fileModifiedMonitor_ = null;
}
lastFile_ = absolutePath;
params_ = new Parameters(absolutePath);
if ( table_ != null )
{
table_.destroyTable();
}
String type = params_.getReader().getStringValue("type", "");
if ( "wpsr_summary".equalsIgnoreCase(type) )
{
setSize(new Dimension(
(int) params_.getReader().getLongValue("width", 700),
(int) params_.getReader().getLongValue("height", 700)));
title_ = new File(absolutePath).getName();
showContent(new JLabel("Loading WPSR summary ..."));
table_ = new WpsrSummaryPanel();
table_.createTable(this, params_); // eventually calls showContent
}
else if ( "loading".equalsIgnoreCase(type) )
{
setSize(new Dimension(
(int) params_.getReader().getLongValue("width", 700),
(int) params_.getReader().getLongValue("height", 700)));
title_ = new File(absolutePath).getName();
showContent(new JLabel("Loading spreadsheet loading ..."));
table_ = new LoadingSummaryPanel();
table_.createTable(this, params_); // eventually calls showContent
}
else if ( "jira_summary".equalsIgnoreCase(type) )
{
setSize(new Dimension(
(int) params_.getReader().getLongValue("width", 700),
(int) params_.getReader().getLongValue("height", 700)));
title_ = new File(absolutePath).getName();
showContent(new JLabel("Loading JIRA summary ..."));
table_ = new JiraSummaryPanel();
table_.createTable(this, params_); // eventually calls showContent
}
else if ( "spreadsheets".equalsIgnoreCase(type) )
{
setSize(new Dimension(
(int) params_.getReader().getLongValue("width", 700),
(int) params_.getReader().getLongValue("height", 700)));
title_ = new File(absolutePath).getName();
showContent(new JLabel("Loading generic spreadsheets ..."));
table_ = new GenericSheetPanel();
table_.createTable(this, params_); // eventually calls showContent
}
else
{
showContent(new JLabel("Did not recogonize json \"type\" [" + type + "]"));
}
}
catch (Exception e)
{
showContent(new JLabel("Error in json " + absolutePath + ". See log for more information."));
return;
}
fileModifiedMonitor_ = new FileModifiedMonitor(new File(absolutePath), this);
}
@Override
public void windowOpened(WindowEvent e)
{
}
@Override
public void windowClosing(WindowEvent e)
{
Log.info("closing window ...");
}
@Override
public void windowClosed(WindowEvent e)
{
Log.info("done.");
}
@Override
public void windowIconified(WindowEvent e)
{
}
@Override
public void windowDeiconified(WindowEvent e)
{
}
@Override
public void windowActivated(WindowEvent e)
{
}
@Override
public void windowDeactivated(WindowEvent e)
{
}
@Override
public void dragEnter(DropTargetDragEvent dtde)
{
}
@Override
public void dragOver(DropTargetDragEvent dtde)
{
}
@Override
public void dropActionChanged(DropTargetDragEvent dtde)
{
}
@Override
public void dragExit(DropTargetEvent dte)
{
}
@Override
public void drop(DropTargetDropEvent dtde)
{
try
{
// Ok, get the dropped object and try to figure out what it is
Transferable tr = dtde.getTransferable();
DataFlavor[] flavors = tr.getTransferDataFlavors();
for (int i = 0; i < flavors.length; i++)
{
System.out.println("Possible flavor: " + flavors[i].getMimeType());
// Check for file lists specifically
if (flavors[i].isFlavorJavaFileListType())
{
// Great! Accept copy drops...
dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
System.out.println("Successful file list drop.");
// And add the list of file names to our text area
@SuppressWarnings("unchecked")
java.util.List<Object> list = (java.util.List<Object>)tr.getTransferData(flavors[i]);
if ( list.size() >= 1)
{
String files[] = new String[list.size()];
for ( int ii=0; ii<files.length; ii++ )
{
files[ii] = list.get(ii).toString();
}
processNewParameterFile(files[0]);
dtde.dropComplete(true);
return;
}
}
}
// User must not have dropped a file list
Log.info("Drop failed: " + dtde);
dtde.rejectDrop();
}
catch (Exception e)
{
Log.severe("Drop exception: ", e);
}
}
@Override
public void fileModified()
{
SwingUtilities.invokeLater(
new Runnable()
{
public void run()
{
processNewParameterFile(lastFile_);
}
});
}
// PROTECTED
// PRIVATE
private Parameters params_;
private TableSpreadsheet table_;
private String title_ = "";
private String lastFile_ = "";
private FileModifiedMonitor fileModifiedMonitor_ = null;
}
| [
"fivestarmoon@live.ca"
] | fivestarmoon@live.ca |
92c702bfe6784f0172f04d4aaf6967c4ae6e4364 | 8748a3d45cacf26a4f24266f44ce22adbee266bb | /src/main/java/com/ls/constant/RedisConstant.java | 427cfd5901a14de3535e1b72b2e63a114a9888bd | [] | no_license | ls909074489/sell | 89e7b061e2287c2180c5c514224943e5024c57cc | 733064a9af5cd8eb3ed0f633ac1b000ac65b4772 | refs/heads/master | 2020-03-21T12:08:12.465364 | 2018-08-16T02:13:41 | 2018-08-16T02:13:41 | 138,537,373 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 205 | java | package com.ls.constant;
/**
* redis常量
* Created by 廖师兄
* 2017-07-30 16:22
*/
public interface RedisConstant {
String TOKEN_PREFIX = "token_%s";
Integer EXPIRE = 7200; //2小时
}
| [
"ls909074489@gmail.com"
] | ls909074489@gmail.com |
fb377cc96526ff726d0af7e971ed01bf99316134 | 52214e49b30b28f063b85eb6ea307e17b931caa6 | /app/src/androidTest/java/com/example/derek/justjava/ApplicationTest.java | e853057ffc7af5c35bc8fcca0fe7642a3997d47d | [] | no_license | dhaughton99/JustJava_Test | 141f7c71b48734ab4a913aba7afa3738e6c1af98 | 867fd2bfaf3c102448f0e5a74441c25d96ca638d | refs/heads/master | 2021-01-10T12:02:04.092505 | 2016-01-16T21:44:34 | 2016-01-16T21:44:34 | 49,792,238 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | package com.example.derek.justjava;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | [
"dhaughton99@gmail.com"
] | dhaughton99@gmail.com |
7cbfa7fe99a9d9e26681abc134c6bcc12e3f2bd1 | cfaa8a7cd0db41123849719c4be095f65927b22b | /read/src/main/java/com/read/mobile/beans/MultySearchRequest.java | ece6e4935af8dbfee32277b9f7a85a816cb81eeb | [] | no_license | wuyoujian0313/Read-android | 9ae543316a580bc4794732e54ad5abbffab70463 | ab8bd6a9efe7c7692fdc882ecb54a86f7d148310 | refs/heads/master | 2021-09-03T11:21:23.016544 | 2018-01-08T16:54:56 | 2018-01-08T16:54:56 | 110,246,410 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 834 | java | package com.read.mobile.beans;
import com.ngc.corelib.http.bean.BaseRequest;
public class MultySearchRequest extends BaseRequest {
/**
*
*/
private static final long serialVersionUID = -7052993329468263369L;
private String age;// 年龄范围
private String type;// 图书类型
private String offset;//
private String length;//
public String getAge() {
return age;
}
public void setAge(String age) {
this.age = age;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getOffset() {
return offset;
}
public void setOffset(String offset) {
this.offset = offset;
}
public String getLength() {
return length;
}
public void setLength(String length) {
this.length = length;
}
}
| [
"youjian.wu@qunar.com"
] | youjian.wu@qunar.com |
fc48c8f582eeb73b698af9c9d964d483b5f7f1dc | 8f0d58b0256f270e9ef4c7305d2b65ac4a3e4852 | /src/main/java/com/CursoEducaWeb/course/entities/Product.java | 3d67dc2b45094ef3ec7d360fc1545c2d88fc8ae6 | [] | no_license | PauloMiron/course-springboot-2-java-11 | b1ad864804ac548bb290760389c20ce68a61813f | d06ea128b9efa26bb45c62ecb16fc1b38a0caec9 | refs/heads/master | 2023-03-31T14:32:06.587497 | 2021-03-26T16:57:36 | 2021-03-26T16:57:36 | 351,093,263 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,508 | java | package com.CursoEducaWeb.course.entities;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.aspectj.weaver.ast.Or;
import org.springframework.context.annotation.Profile;
import javax.persistence.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
@Entity
@Table(name = "tb_product")
public class Product implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String description;
private Double price;
private String imgUrl;
@ManyToMany
@JoinTable(name = "tb_product_category",
joinColumns = @JoinColumn(name = "product_id"),
inverseJoinColumns = @JoinColumn(name = "category_id"))
private Set<Category> categories = new HashSet<>();
@OneToMany(mappedBy = "id.product")
private Set<OrderItem> items = new HashSet<>();
public Product (){}
public Product(Long id, String name, String description, Double price, String imgUrl) {
this.id = id;
this.name = name;
this.description = description;
this.price = price;
this.imgUrl = imgUrl;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Double getPrice() {
return price;
}
public void setPrice(Double price) {
this.price = price;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
public Set<Category> getCategories() {
return categories;
}
@JsonIgnore
public Set<Order> getOrders(){
Set<Order> set = new HashSet<>();
for(OrderItem x : items){
set.add(x.getOrder());
}
return set;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Product product = (Product) o;
return Objects.equals(id, product.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
}
| [
"paulomiron16@gmail.com"
] | paulomiron16@gmail.com |
26cfd5dede2a79b08c939b8d8b7c00b3a8020751 | 2928930eea35eaba07bcce68f8d0752021efcf7b | /NYTimesSearch/app/src/main/java/com/codepath/week1/nytimessearch/activities/ArticleActivity.java | 59564412bfe15871960554a0a52c0e8e38d572b9 | [
"Apache-2.0"
] | permissive | sanaltsk/codepath-nytimes | 20033350b85b8bd8724aea98d9bf099d251a8a57 | 09cc885ae6a67369a06540438a78fb1136f3a2ca | refs/heads/master | 2021-05-05T10:05:23.650005 | 2017-09-25T01:19:01 | 2017-09-25T01:19:01 | 104,020,970 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,338 | java | package com.codepath.week1.nytimessearch.activities;
import android.content.Intent;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.ShareActionProvider;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.codepath.week1.nytimessearch.R;
import com.codepath.week1.nytimessearch.model.Article;
public class ArticleActivity extends AppCompatActivity {
private ShareActionProvider miShareAction;
private Intent shareIntent;
private String url;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_article);
final Article article = (Article) getIntent().getParcelableExtra("article");
WebView webView = (WebView)findViewById(R.id.wvArticle);
webView.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
url = article.getLink();
attachShareIntent(url);
webView.loadUrl(url);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.article_menu, menu);
MenuItem item = menu.findItem(R.id.action_share);
miShareAction = (ShareActionProvider) MenuItemCompat.getActionProvider(item);
attachShareIntentAction();
return true;
}
public void attachShareIntentAction() {
if (miShareAction != null && shareIntent != null)
miShareAction.setShareIntent(shareIntent);
}
public void attachShareIntent(String url) {
shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, url);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_share) {
startActivity(Intent.createChooser(shareIntent, "Share link using"));
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"sanat@cisco.com"
] | sanat@cisco.com |
773125c7b71a981cc56b269a2dde029ad547900b | 9d22f98297e4461e9b08b1f1b1ab418a4a2158e6 | /dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HXmlData.java | 88c67e3958a171c1df9ccc54aed0d44dbf8c7cb6 | [
"CDDL-1.0",
"LicenseRef-scancode-proprietary-license",
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | wso2/wso2-ode | b530fda4a33701ab367bde4b2639f8b9f1be3a26 | 50dfe2b027d398ce8f26593b99d614a07a06d0c2 | refs/heads/master | 2023-08-29T12:44:37.595022 | 2022-10-11T14:06:49 | 2022-10-11T14:06:49 | 16,887,937 | 34 | 45 | Apache-2.0 | 2023-07-07T21:14:38 | 2014-02-16T15:55:47 | Java | UTF-8 | Java | false | false | 3,753 | 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.ode.daohib.bpel.hobj;
import java.util.Collection;
import java.util.HashSet;
/**
* @hibernate.class table="BPEL_XML_DATA"
* @hibernate.query name="SELECT_XMLDATA_IDS_BY_INSTANCES" query="select id from HXmlData as x where x.instance in (:instances)"
*/
public class HXmlData extends HObject {
public static final String SELECT_XMLDATA_IDS_BY_INSTANCES = "SELECT_XMLDATA_IDS_BY_INSTANCES";
private boolean _simpleType;
private byte[] _data;
private Collection<HVariableProperty> _properties = new HashSet<HVariableProperty>();
private String _name;
private String _simpleValue;
private HScope _scope;
private HProcessInstance _instance;
/** Constructor. */
public HXmlData() {
super();
}
/**
* @hibernate.property type="org.apache.ode.daohib.bpel.hobj.GZipDataType"
*
* @hibernate.column name="DATA" sql-type="blob(2G)"
*/
public byte[] getData() {
return _data;
}
public void setData(byte[] data) {
_data = data;
}
/**
* @hibernate.property
* column="NAME"
* type="string"
* length="255"
* not-null="true"
*/
public String getName() {
return _name;
}
public void setName(String name) {
_name = name;
}
/**
* @hibernate.property
* column="SIMPLE_VALUE"
* type="string"
* length="255"
* not-null="false"
*/
public String getSimpleValue() {
return _simpleValue;
}
public void setSimpleValue(String simpleValue) {
_simpleValue = simpleValue;
}
/**
* @hibernate.bag
* lazy="true"
* inverse="true"
* cascade="delete"
* @hibernate.collection-key column="XML_DATA_ID" foreign-key="none"
* @hibernate.collection-one-to-many
* class="org.apache.ode.daohib.bpel.hobj.HVariableProperty"
*/
public Collection<HVariableProperty> getProperties() {
return _properties;
}
public void setProperties(Collection<HVariableProperty> properties) {
_properties = properties;
}
/**
* @hibernate.many-to-one column="SCOPE_ID" foreign-key="none"
*/
public HScope getScope() {
return _scope;
}
public void setScope(HScope scope) {
_scope = scope;
if(scope != null) {
setInstance(scope.getInstance());
}
}
/**
* @hibernate.many-to-one
* column="PIID" foreign-key="none"
*/
public HProcessInstance getInstance() {
return _instance;
}
public void setInstance(HProcessInstance instance) {
_instance = instance;
}
/**
* @hibernate.property
* column="IS_SIMPLE_TYPE"
*/
public boolean isSimpleType() {
return _simpleType;
}
public void setSimpleType(boolean simpleType) {
_simpleType = simpleType;
}
}
| [
"thilini@thilini.(none)"
] | thilini@thilini.(none) |
42b5b8707da32323359a6020c609022eb390fd95 | c632be558f680f86b59ea15feddce48ea05a4f60 | /수정본_13/JiManagement/app/src/main/java/com/example/park/management/GalleryActivity.java | 5bec3bf7f815273fe64a41008fc0bafd45c7c44f | [] | no_license | jisung0920/project_alpa | 854ec9e6163d3b19032e287e5aae83e174b86172 | 9156faefb7ccb48c841d3e8846cffff2724659f6 | refs/heads/master | 2021-01-12T00:22:56.511593 | 2017-02-26T16:17:59 | 2017-02-26T16:17:59 | 78,716,251 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,545 | java | package com.example.park.management;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class GalleryActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gallery);
final WebView web = (WebView)findViewById(R.id.instaView);
final String instaURL="https://www.instagram.com/explore/tags/alpa1104/?hl=nl";
web.loadUrl(instaURL);
web.getSettings().setJavaScriptEnabled(true);
web.setWebViewClient(new WebViewClient());
web.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction()!=KeyEvent.ACTION_DOWN)
return true;
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (web.getUrl().equals(instaURL)){}
else if (web.canGoBack()) {
web.goBack();
}
return true;
}
return false;
}
});
}
public void imageClick(View v){
Intent intent = new Intent(GalleryActivity.this, MainActivity.class);
GalleryActivity.this.startActivity(intent);
}
}
| [
"club20608@gmail.com"
] | club20608@gmail.com |
124eaa78c0a866fc5a3c186c553285f1fc6acfb0 | 2e90e8c829218e2dc596ca23af4e58d5ed088582 | /snippets/graph_lca.java | 566f70002ea16451b0d385125e47188a523bb08c | [] | no_license | shifona1/SCP | 688247a4f0da010d77ba659ca3d44a7717eb4e4f | 4f87f6d3e5d58c884fa82e33fe7bff0e274a71ab | refs/heads/master | 2021-09-07T20:30:15.802568 | 2018-02-28T15:32:29 | 2018-02-28T15:32:29 | 122,855,433 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,206 | java |
class Graph
{
ArrayList<ArrayList<Pair<Integer,Integer>>> a=new ArrayList<ArrayList<Pair<Integer,Integer>>>();
int[] flag;
int[] marked;
int[] distance;
int[] parent;
int[] depth;
int counter=0;
int LG = 30;
int[][] parents;
TreeSet<Pair<Integer,Integer>> pq;
// int[] distances;
void creategraph(int n)
{
a.clear();
flag=new int[n];
distance=new int[n];
Arrays.fill(distance,Integer.MAX_VALUE);
for(int i=0;i<n;i++)
{
a.add(new ArrayList<Pair<Integer,Integer>>());
}
pq=new TreeSet<Pair<Integer,Integer>>();
parent=new int[n];
parents = new int[LG][n];
for (int i=0;i<LG ;i++ ) {
Arrays.fill(parents[i],-1);
}
}
void addEdge(int u,int v,int cost)
{
a.get(u).add(new Pair<Integer,Integer>(v,cost));
}
void dfs(int s,int p)
{
if(flag[s]!=0) return;
else
flag[s]=counter;
parent[s]=p;
depth[s]=depth[p]+1;
ArrayList<Pair<Integer,Integer>> temp=a.get(s);
for(int i=0;i<temp.size();i++)
{
dfs(temp.get(i).a,s);
}
}
void dijkshtra(int s)
{
Pair<Integer,Integer> current;
marked = new int[a.size()];
while(pq.size()>0) {
current = pq.first();
pq.pollFirst();
if(marked[current.b]>0)
continue;
marked[current.b]=1;
ArrayList<Pair<Integer,Integer>> arr=a.get(current.b);
for(Pair<Integer,Integer> k:arr)
{
if(distance[current.b]+k.b<distance[k.a])
{
distance[k.a]=distance[current.b]+k.b;
pq.add(new Pair<Integer,Integer>(distance[k.a],k.a));
}
}
}
}
int lca(int n1,int n2)
{
int h1=depth[n1];
int h2=depth[n2];
if(h2<h1) // swap(n1,n2)
{
int t=n2;
n2=n1;
n1=t;
}
n2=kthParent(n2,h2-h1);
for(int i=LG-1;i>=0;i--)
{
int p1=parents[i][n1];
int p2=parents[i][n2];
if(p1!=p2)
{
n1=p1;
n2=p2;
}
}
return parents[1][n1];
}
int kthParent(int n,int k)
{
for (int i=0;k>0 && n>=0 ;i++,k>>=1 ) {
if((k&1)>0)
n=parents[i][n];
}
return n;
}
void build_lca(int root)
{
parents[0]=parent;
// parents[i][n] using parents[i-1][x]
for (int i=1; i<LG;i++ )
for(int n=0;n<parent.length;n++)
{
int pi_1=parents[i-1][n];
if(pi_1>=0)
parents[i][n]=parents[i-1][pi_1];
}
}
} | [
"shivanikrishgarg@gmail.com"
] | shivanikrishgarg@gmail.com |
d4a12feba0583a09bfcca1a59bae0e08005239ee | 778968fa32b556d865e977f635d5ff815ebe4dc6 | /Advanced Programming Methods/Laboratoare/Lab/Lab2/src/runner/StrategyTaskRunner.java | c5135de4f50a4f9745ad22c1ffcd54166bc7189c | [] | no_license | katybucsa/faculty | cf29148329e8630c096de4aa53ef2b7cc271a53e | a7172e4e8433caca86021c74ce4961df477a535f | refs/heads/master | 2023-02-12T01:58:17.841213 | 2021-01-07T15:27:08 | 2021-01-07T15:47:28 | 327,284,764 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 745 | java | package runner;
import domain.Strategy;
import domain.Task;
import factory.Container;
import factory.TaskContainerFactory;
public class StrategyTaskRunner implements TaskRunner {
private Container container;
public StrategyTaskRunner(Strategy s){
container= TaskContainerFactory.getInstance().createContainer(s);
}
public void executeOneTask(){
if(!container.isEmpty()){
Task t=container.remove();
t.execute();
}
}
public void executeAll(){
while (!container.isEmpty()){
executeOneTask();
}
}
public void addTask(Task t){
container.add(t);
}
public boolean hasTask(){
return !container.isEmpty();
}
}
| [
"katybucsa@github.com"
] | katybucsa@github.com |
6864359d8f012caf7f68b798067612f82bc94228 | ed1fa5ecd717b065b617f75de1e7be430c7f18cd | /SmartDelivery(Final)/src/com/frame/OrDependenciesBiz.java | b658050b7a605d6e10a163dc208ed5e73ab4c408 | [] | no_license | bookkg2/Smart_Delivery_plus | 8c4a6c08f308b5aa11ebbbefd9182e3d85073a77 | 0de23b26320244bed7cedaf4cdf4dffec3a7aa07 | refs/heads/master | 2022-12-24T21:18:35.997094 | 2019-11-07T08:45:52 | 2019-11-07T08:45:52 | 213,577,656 | 1 | 1 | null | 2022-12-16T07:48:41 | 2019-10-08T07:36:33 | CSS | UTF-8 | Java | false | false | 613 | java | package com.frame;
import java.util.ArrayList;
import org.springframework.transaction.annotation.Transactional;
import com.vo.Order;
public interface OrDependenciesBiz<K,V> {
@Transactional
public void register(V v) throws Exception;
@Transactional
public void modify(V v) throws Exception;
@Transactional
public void remove(K k) throws Exception;
public ArrayList<V> get(K k) throws Exception;
public ArrayList<V> get() throws Exception;
//Specialized
public V oidmaxselect() throws Exception;
public V select_oid(String obj) throws Exception;
public V select_rec(String obj) throws Exception;
}
| [
"bookkg2@naver.com"
] | bookkg2@naver.com |
63237825382bd507b936491a45f747e862b5634e | 6d75d4faed98defc08e9ac9cd2cb47b79daa77cd | /achieve-parent/achieve-summary/src/main/java/com/wei/designmodel/construction/proxy/dynamicproxy/cglibproxy/CGlibMeipo.java | eaeb3d00914875c3d7081677dfb4af52e91fa453 | [] | no_license | xingxingtx/common-parent | e37763444332ddb2fbca4254a9012226ab48ed76 | a6b26cf88fc94943881b6cba2aecaf2b19a93755 | refs/heads/main | 2023-06-16T20:23:45.412285 | 2021-07-14T12:04:07 | 2021-07-14T12:04:07 | 352,091,214 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,154 | java | package com.wei.designmodel.construction.proxy.dynamicproxy.cglibproxy;
import org.springframework.cglib.proxy.Enhancer;
import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;
import java.lang.reflect.Method;
/**
* @Author wei.peng on 2019/3/11.
*/
public class CGlibMeipo implements MethodInterceptor {
public Object getInstance(Class<?> clazz) throws Exception{
//相当于Proxy,代理的工具类
Enhancer enhancer = new Enhancer();
enhancer.setSuperclass(clazz);
enhancer.setCallback(this);
return enhancer.create();
}
@Override
public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
before();
Object obj = methodProxy.invokeSuper(o,objects);
after();
return obj;
}
private void before(){
System.out.println("我是媒婆,我要给你找对象,现在已经确认你的需求");
System.out.println("开始物色");
}
private void after(){
System.out.println("OK的话,准备办事");
}
}
| [
"982084398@qq.com"
] | 982084398@qq.com |
73e0ce7d11ee540b8b6568fcffdc3a20648e3f05 | d97af3db60df4fd365fefb9f761aea98441a87fa | /app/src/main/java/com/ximai/savingsmore/save/activity/IssueCommentActivity.java | a5bf92d50ccdf30e770d8785ce4af72f9de9f79b | [] | no_license | liufanglin/jianjian_shengyousheng | efd1eb3f070ff6ad1f206a7d1d90a0306ec6c353 | 763b1d45157e9c1011e92fd39e49471a7c91b3df | refs/heads/master | 2020-04-08T18:19:44.545286 | 2019-03-24T07:11:58 | 2019-03-24T07:11:58 | 159,603,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 26,649 | java | package com.ximai.savingsmore.save.activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.AbsListView;
import android.widget.BaseAdapter;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.request.RequestOptions;
import com.ximai.savingsmore.R;
import com.ximai.savingsmore.library.net.MyAsyncHttpResponseHandler;
import com.ximai.savingsmore.library.net.RequestParamsPool;
import com.ximai.savingsmore.library.net.URLText;
import com.ximai.savingsmore.library.net.WebRequestHelper;
import com.ximai.savingsmore.library.toolbox.GsonUtils;
import com.ximai.savingsmore.save.common.BaseActivity;
import com.ximai.savingsmore.save.modle.Images;
import com.ximai.savingsmore.save.modle.UpPhoto;
import com.ximai.savingsmore.save.modle.UploadGoodsBean;
import com.ximai.savingsmore.save.view.GlideRoundTransform;
import com.ximai.savingsmore.save.view.MyGridView;
import com.ximai.savingsmore.save.view.imagepicker.PhotoPreviewActivity;
import com.ximai.savingsmore.save.view.imagepicker.PhotoSelectorActivity;
import com.ximai.savingsmore.save.view.imagepicker.model.PhotoModel;
import com.ximai.savingsmore.save.view.imagepicker.util.CommonUtils;
import com.ximai.savingsmore.save.view.imagepicker.util.Config;
import com.ximai.savingsmore.save.view.imagepicker.util.DbTOPxUtils;
import com.ximai.savingsmore.save.view.imagepicker.util.FileUtils;
import org.apache.http.Header;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* Created by caojian on 16/12/1.
*/
public class IssueCommentActivity extends BaseActivity implements View.OnClickListener {
private ImageView cha, yiban, mangyi, henmangyi, qianglie;
private ImageView kouwei1, kouwei2, kouwei3, kouwei4, kouwei5;
private ImageView fuwu1, fuwu2, fuwu3, fuwu4, fuwu5;
private ImageView huanjing1, huanjing2, huanjing3, huanjing4, huanjing5;
private List<Images> images = new ArrayList<Images>();
private MyGridView my_goods_GV;
private String goodId;
private String productScore;
private String sellerScore1, sellerScore2, sellerScore3;
private String Content;
private boolean IsAnonymous;
private EditText comment_conent;
private TextView wenzi_number;
private ImageView select;
private RelativeLayout back;
private RelativeLayout title_right;
private int screen_widthOffset;
private GridImgAdapter gridImgAdapter;
private ArrayList<UploadGoodsBean> img_uri = new ArrayList<>();//方格图片展示的图片数据
private List<PhotoModel> single_photos = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.issue_comment_activity);
initView();
initData();
initEvent();
}
/**
* view
*/
private void initView() {
toolbar.setVisibility(View.GONE);
select = (ImageView) findViewById(R.id.select);
back = (RelativeLayout) findViewById(R.id.back);
title_right = (RelativeLayout) findViewById(R.id.title_right);
comment_conent = (EditText) findViewById(R.id.comment_conent);
wenzi_number = (TextView) findViewById(R.id.wenzi_number);
cha = (ImageView) findViewById(R.id.cha);
yiban = (ImageView) findViewById(R.id.yiban);
mangyi = (ImageView) findViewById(R.id.mangyi);
henmangyi = (ImageView) findViewById(R.id.henmangyi);
qianglie = (ImageView) findViewById(R.id.qinglie);
my_goods_GV = (MyGridView) findViewById(R.id.myGridview);
kouwei1 = (ImageView) findViewById(R.id.kouwei1);
kouwei2 = (ImageView) findViewById(R.id.kouwei2);
kouwei3 = (ImageView) findViewById(R.id.kouwei3);
kouwei4 = (ImageView) findViewById(R.id.kouwei4);
kouwei5 = (ImageView) findViewById(R.id.kouwei5);
fuwu1 = (ImageView) findViewById(R.id.fuwu1);
fuwu2 = (ImageView) findViewById(R.id.fuwu2);
fuwu3 = (ImageView) findViewById(R.id.fuwu3);
fuwu4 = (ImageView) findViewById(R.id.fuwu4);
fuwu5 = (ImageView) findViewById(R.id.fuwu5);
huanjing1 = (ImageView) findViewById(R.id.huanjing1);
huanjing2 = (ImageView) findViewById(R.id.huanjing2);
huanjing3 = (ImageView) findViewById(R.id.huanjing3);
huanjing4 = (ImageView) findViewById(R.id.huanjing4);
huanjing5 = (ImageView) findViewById(R.id.huanjing5);
}
/**
* event
*/
private void initEvent() {
select.setOnClickListener(this);
title_right.setOnClickListener(this);
back.setOnClickListener(this);
cha.setOnClickListener(this);
yiban.setOnClickListener(this);
henmangyi.setOnClickListener(this);
mangyi.setOnClickListener(this);
qianglie.setOnClickListener(this);
kouwei1.setOnClickListener(this);
kouwei2.setOnClickListener(this);
kouwei3.setOnClickListener(this);
kouwei4.setOnClickListener(this);
kouwei5.setOnClickListener(this);
fuwu1.setOnClickListener(this);
fuwu2.setOnClickListener(this);
fuwu3.setOnClickListener(this);
fuwu4.setOnClickListener(this);
fuwu5.setOnClickListener(this);
huanjing1.setOnClickListener(this);
huanjing2.setOnClickListener(this);
huanjing3.setOnClickListener(this);
huanjing4.setOnClickListener(this);
huanjing5.setOnClickListener(this);
comment_conent.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (comment_conent.length() <= 15) {
wenzi_number.setText("还需要输入" + (15 - comment_conent.length()) + "个字,即可发表");
} else {
wenzi_number.setText("还需要输入0个字,即可发表");
}
}
@Override
public void afterTextChanged(Editable s) {}
});
}
/**
* data
*/
private void initData() {
goodId = getIntent().getStringExtra("id");
gridImgAdapter = new GridImgAdapter();
/**
* grdview加载
*/
Config.ScreenMap = Config.getScreenSize(this, this);
WindowManager windowManager = getWindowManager();
Display display = windowManager.getDefaultDisplay();
screen_widthOffset = (display.getWidth() - (5* DbTOPxUtils.dip2px(this, 2)))/5;
my_goods_GV.setAdapter(gridImgAdapter);
img_uri.add(null);
gridImgAdapter.notifyDataSetChanged();
}
/**
* 事件处理
* @param v
*/
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.back:
finish();
break;
case R.id.title_right:
if (null != comment_conent) {
Content = comment_conent.getText().toString();
}
if (null != Content && Content.length() > 15) {
if (null != productScore && !TextUtils.isEmpty(productScore) && null != Content && !TextUtils.isEmpty(Content)) {
comitComment(goodId, productScore, sellerScore1, sellerScore2, sellerScore3, Content, images, IsAnonymous);
} else {
Toast.makeText(IssueCommentActivity.this, "信息没有填写完整", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(IssueCommentActivity.this, "评论内容不能少于15个字", Toast.LENGTH_SHORT).show();
}
break;
case R.id.select:
if (IsAnonymous) {
select.setImageResource(R.mipmap.kuang);
IsAnonymous = false;
} else {
select.setImageResource(R.mipmap.select_kuang);
IsAnonymous = true;
}
break;
case R.id.cha:
productScore = "1";
cha.setBackgroundResource(R.mipmap.cha3);
yiban.setBackgroundResource(R.mipmap.yiban13);
mangyi.setBackgroundResource(R.mipmap.manyi13);
henmangyi.setBackgroundResource(R.mipmap.henmanyi13);
qianglie.setBackgroundResource(R.mipmap.qianglietuijian13);
break;
case R.id.yiban:
productScore = "2";
cha.setBackgroundResource(R.mipmap.cha13);
yiban.setBackgroundResource(R.mipmap.yiban3);
mangyi.setBackgroundResource(R.mipmap.manyi13);
henmangyi.setBackgroundResource(R.mipmap.henmanyi13);
qianglie.setBackgroundResource(R.mipmap.qianglietuijian13);
break;
case R.id.mangyi:
productScore = "3";
cha.setBackgroundResource(R.mipmap.cha13);
yiban.setBackgroundResource(R.mipmap.yiban13);
mangyi.setBackgroundResource(R.mipmap.manyi3);
henmangyi.setBackgroundResource(R.mipmap.henmanyi13);
qianglie.setBackgroundResource(R.mipmap.qianglietuijian13);
break;
case R.id.henmangyi:
productScore = "4";
cha.setBackgroundResource(R.mipmap.cha13);
yiban.setBackgroundResource(R.mipmap.yiban13);
mangyi.setBackgroundResource(R.mipmap.manyi13);
henmangyi.setBackgroundResource(R.mipmap.henmanyi3);
qianglie.setBackgroundResource(R.mipmap.qianglietuijian13);
break;
case R.id.qinglie:
productScore = "5";
cha.setBackgroundResource(R.mipmap.cha13);
yiban.setBackgroundResource(R.mipmap.yiban13);
mangyi.setBackgroundResource(R.mipmap.manyi13);
henmangyi.setBackgroundResource(R.mipmap.henmanyi13);
qianglie.setBackgroundResource(R.mipmap.qianglietuijian3);
break;
case R.id.kouwei1:
sellerScore1 = "1";
kouwei1.setBackgroundResource(R.mipmap.xiaolian3);
kouwei2.setBackgroundResource(R.mipmap.xiaolian13);
kouwei3.setBackgroundResource(R.mipmap.xiaolian13);
kouwei4.setBackgroundResource(R.mipmap.xiaolian13);
kouwei5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.kouwei2:
sellerScore1 = "2";
kouwei1.setBackgroundResource(R.mipmap.xiaolian3);
kouwei2.setBackgroundResource(R.mipmap.xiaolian3);
kouwei3.setBackgroundResource(R.mipmap.xiaolian13);
kouwei4.setBackgroundResource(R.mipmap.xiaolian13);
kouwei5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.kouwei3:
sellerScore1 = "3";
kouwei1.setBackgroundResource(R.mipmap.xiaolian3);
kouwei2.setBackgroundResource(R.mipmap.xiaolian3);
kouwei3.setBackgroundResource(R.mipmap.xiaolian3);
kouwei4.setBackgroundResource(R.mipmap.xiaolian13);
kouwei5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.kouwei4:
sellerScore1 = "4";
kouwei1.setBackgroundResource(R.mipmap.xiaolian3);
kouwei2.setBackgroundResource(R.mipmap.xiaolian3);
kouwei3.setBackgroundResource(R.mipmap.xiaolian3);
kouwei4.setBackgroundResource(R.mipmap.xiaolian3);
kouwei5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.kouwei5:
sellerScore1 = "5";
kouwei1.setBackgroundResource(R.mipmap.xiaolian3);
kouwei2.setBackgroundResource(R.mipmap.xiaolian3);
kouwei3.setBackgroundResource(R.mipmap.xiaolian3);
kouwei4.setBackgroundResource(R.mipmap.xiaolian3);
kouwei5.setBackgroundResource(R.mipmap.xiaolian3);
break;
case R.id.fuwu1:
sellerScore2 = "1";
fuwu1.setBackgroundResource(R.mipmap.xiaolian3);
fuwu2.setBackgroundResource(R.mipmap.xiaolian13);
fuwu3.setBackgroundResource(R.mipmap.xiaolian13);
fuwu4.setBackgroundResource(R.mipmap.xiaolian13);
fuwu5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.fuwu2:
sellerScore2 = "2";
fuwu1.setBackgroundResource(R.mipmap.xiaolian3);
fuwu2.setBackgroundResource(R.mipmap.xiaolian3);
fuwu3.setBackgroundResource(R.mipmap.xiaolian13);
fuwu4.setBackgroundResource(R.mipmap.xiaolian13);
fuwu5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.fuwu3:
sellerScore2 = "3";
fuwu1.setBackgroundResource(R.mipmap.xiaolian3);
fuwu2.setBackgroundResource(R.mipmap.xiaolian3);
fuwu3.setBackgroundResource(R.mipmap.xiaolian3);
fuwu4.setBackgroundResource(R.mipmap.xiaolian13);
fuwu5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.fuwu4:
sellerScore2 = "4";
fuwu1.setBackgroundResource(R.mipmap.xiaolian3);
fuwu2.setBackgroundResource(R.mipmap.xiaolian3);
fuwu3.setBackgroundResource(R.mipmap.xiaolian3);
fuwu4.setBackgroundResource(R.mipmap.xiaolian3);
fuwu5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.fuwu5:
sellerScore2 = "5";
fuwu1.setBackgroundResource(R.mipmap.xiaolian3);
fuwu2.setBackgroundResource(R.mipmap.xiaolian3);
fuwu3.setBackgroundResource(R.mipmap.xiaolian3);
fuwu4.setBackgroundResource(R.mipmap.xiaolian3);
fuwu5.setBackgroundResource(R.mipmap.xiaolian3);
break;
case R.id.huanjing1:
sellerScore3 = "1";
huanjing1.setBackgroundResource(R.mipmap.xiaolian3);
huanjing2.setBackgroundResource(R.mipmap.xiaolian13);
huanjing3.setBackgroundResource(R.mipmap.xiaolian13);
huanjing4.setBackgroundResource(R.mipmap.xiaolian13);
huanjing5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.huanjing2:
sellerScore3 = "2";
huanjing1.setBackgroundResource(R.mipmap.xiaolian3);
huanjing2.setBackgroundResource(R.mipmap.xiaolian3);
huanjing3.setBackgroundResource(R.mipmap.xiaolian13);
huanjing4.setBackgroundResource(R.mipmap.xiaolian13);
huanjing5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.huanjing3:
sellerScore3 = "3";
huanjing1.setBackgroundResource(R.mipmap.xiaolian3);
huanjing2.setBackgroundResource(R.mipmap.xiaolian3);
huanjing3.setBackgroundResource(R.mipmap.xiaolian3);
huanjing4.setBackgroundResource(R.mipmap.xiaolian13);
huanjing5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.huanjing4:
sellerScore3 = "4";
huanjing1.setBackgroundResource(R.mipmap.xiaolian3);
huanjing2.setBackgroundResource(R.mipmap.xiaolian3);
huanjing3.setBackgroundResource(R.mipmap.xiaolian3);
huanjing4.setBackgroundResource(R.mipmap.xiaolian3);
huanjing5.setBackgroundResource(R.mipmap.xiaolian13);
break;
case R.id.huanjing5:
sellerScore3 = "5";
huanjing1.setBackgroundResource(R.mipmap.xiaolian3);
huanjing2.setBackgroundResource(R.mipmap.xiaolian3);
huanjing3.setBackgroundResource(R.mipmap.xiaolian3);
huanjing4.setBackgroundResource(R.mipmap.xiaolian3);
huanjing5.setBackgroundResource(R.mipmap.xiaolian3);
break;
}
}
/**
* 回调
* @param requestCode
* @param resultCode
* @param data
*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
File srcFile = null;
File outPutFile = null;
Bitmap bm = null;
File temFile = null;
switch (requestCode) {
case 0: //店铺方格图片进行回调
if (data != null) {
List<String> paths = (List<String>) data.getExtras().getSerializable("photos");
if (img_uri.size() > 0) {
img_uri.remove(img_uri.size() - 1);
}
for (int i = 0; i < paths.size(); i++) {
img_uri.add(new UploadGoodsBean(paths.get(i), false));
//上传参数
}
for (int i = 0; i < paths.size(); i++) {
PhotoModel photoModel = new PhotoModel();
photoModel.setOriginalPath(paths.get(i));
photoModel.setChecked(true);
single_photos.add(photoModel);
}
if (img_uri.size() < 3) {
img_uri.add(null);
}
gridImgAdapter.notifyDataSetChanged();
/**
* 上传照片 -获取到本地的图片路径 - 转换成file - 进行上传
*/
if (paths.size() > 0) {
for (int i = 0; i < paths.size(); i++) {
upLoadImage(new File(paths.get(i)), "Comment");
}
}
}
break;
}
super.onActivityResult(requestCode, resultCode, data);
}
/**
* 提交评论
* @param Id
* @param ProductScore
* @param SellerScore
* @param SellerScore2
* @param SellerScore3
* @param Content
* @param images
* @param isAnonymous
*/
private void comitComment(String Id, String ProductScore, String SellerScore, String SellerScore2, String SellerScore3,
String Content, final List<Images> images, boolean isAnonymous) {
WebRequestHelper.json_post(IssueCommentActivity.this, URLText.SUBMIT_COMMENT, RequestParamsPool.submitComment(Id, ProductScore, SellerScore, SellerScore2, SellerScore3, Content, images, isAnonymous), new MyAsyncHttpResponseHandler(IssueCommentActivity.this) {
@Override
public void onResponse(int statusCode, Header[] headers, byte[] responseBody) {
JSONObject object = null;
try {
object = new JSONObject(new String(responseBody));
String IsSuccess = object.getString("IsSuccess");
String message = object.optString("Message");
if (IsSuccess.equals("true")) {
Intent intent = new Intent(IssueCommentActivity.this, CommentSuccessActivity.class);
if (images.size() > 0) {
intent.putExtra("jifen", "2");
}
startActivity(intent);
finish();
}
Toast.makeText(IssueCommentActivity.this, message, Toast.LENGTH_SHORT).show();
} catch (JSONException e) {
e.printStackTrace();
}
}
});
}
/**
* 上传图片
* @param file
* @param type
*/
private void upLoadImage(File file, final String type) {
// a++;
WebRequestHelper.post(URLText.UPLOAD_IMAGE, RequestParamsPool.upLoad(file, type), new MyAsyncHttpResponseHandler(IssueCommentActivity.this) {
@Override
public void onResponse(int statusCode, Header[] headers, byte[] responseBody) {
String result = new String(responseBody);
try {
// b++;
JSONObject jsonObject = new JSONObject(result);
UpPhoto upPhoto = GsonUtils.fromJson(jsonObject.optString("MainData"), UpPhoto.class);
Images images1 = new Images();
images1.ImageId = upPhoto.Id;
images1.ImagePath = upPhoto.FilePath;
images1.SortNo = upPhoto.SortNo;
images.add(images1);
gridImgAdapter.notifyDataSetChanged();
} catch (JSONException e) {
e.printStackTrace();
}
}
});
}
/**
* 方格店铺照片
*/
class GridImgAdapter extends BaseAdapter implements ListAdapter {
@Override
public int getCount() {
return img_uri.size();
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
convertView = LayoutInflater.from(IssueCommentActivity.this).inflate(R.layout.activity_addstory_img_item, null);
ViewHolder holder;
if(convertView!=null){
holder = new ViewHolder();
convertView = LayoutInflater.from(IssueCommentActivity.this).inflate(R.layout.activity_addstory_img_item,null);
convertView.setTag(holder);
}else{
holder = (ViewHolder) convertView.getTag();
}
holder.add_IB = (ImageView) convertView.findViewById(R.id.add_IB);
holder.delete_IV = (ImageView) convertView.findViewById(R.id.delete_IV);
AbsListView.LayoutParams param = new AbsListView.LayoutParams(screen_widthOffset, screen_widthOffset);
convertView.setLayoutParams(param);
RequestOptions options = new RequestOptions()
.centerCrop()
// .placeholder(R.mipmap.head_image)
// .error(R.mipmap.ic_launcher)
.priority(Priority.HIGH)
.transform(new GlideRoundTransform(IssueCommentActivity.this,5)).diskCacheStrategy(DiskCacheStrategy.ALL);
if (img_uri.get(position) == null) {
holder.delete_IV.setVisibility(View.GONE);
Glide.with(IssueCommentActivity.this).load(R.mipmap.achieve_icon_addphoto_default)
.apply(options).into(holder.add_IB);
holder.add_IB.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(IssueCommentActivity.this, PhotoSelectorActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
intent.putExtra("limit", 3 - (img_uri.size() - 1));
startActivityForResult(intent, 0);
}
});
} else {
Glide.with(IssueCommentActivity.this).load(img_uri.get(position).getUrl())
.apply(options).into(holder.add_IB);
holder.delete_IV.setOnClickListener(new View.OnClickListener() {
private boolean is_addNull;
@Override
public void onClick(View arg0) {
is_addNull = true;
String img_url = img_uri.remove(position).getUrl();
for (int i = 0; i < img_uri.size(); i++) {
if (img_uri.get(i) == null) {
is_addNull = false;
continue;
}
}
if (is_addNull) {
img_uri.add(null);
}
FileUtils.DeleteFolder(img_url);//删除在emulate/0文件夹生成的图片
images.remove(position);//这里添加对应的店铺展示图片集合
gridImgAdapter.notifyDataSetChanged();
}
});
holder.add_IB.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Bundle bundle = new Bundle();
bundle.putSerializable("photos",(Serializable)single_photos);
bundle.putInt("position", position);
bundle.putBoolean("isSave",false);
CommonUtils.launchActivity(IssueCommentActivity.this, PhotoPreviewActivity.class, bundle);
}
});
}
return convertView;
}
class ViewHolder {
ImageView add_IB;
ImageView delete_IV;
}
}
} | [
"fanglin.liu@24tidy.com"
] | fanglin.liu@24tidy.com |
24fc675baeb74ad6b4a8c863d16233a011a08204 | c1521274d80388722358ac54e8b9b323cefa09f2 | /Java-Homework-master/src/Inheritance/Calc1.java | f7de0dac8a3b93ef9f24a64ac690834a2382d4bc | [] | no_license | alishergil/Homework-master-Java | 53e4701ec0617d8507659f76f38676b41823956c | 5112b8ceb45290984e689b733d0e7d08f6ef247a | refs/heads/master | 2021-04-15T02:54:20.797553 | 2020-03-22T23:05:51 | 2020-03-22T23:05:51 | 249,289,284 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 381 | java | package Inheritance;
public class Calc1 {
public void add(int num1, int num2) {
int c = num1 + num2;
System.out.println("Addition of num1 and num2 is: " + c);
}
public void sub(int num1, int num2) {
int c = num1 - num2;
System.out.println("Subtraction of num1 and num2 is: " + c);
}
// some random code below
String a = "fddfgf";
String b = a.concat("dfgfg");
}
| [
"alishergil@gmail.com"
] | alishergil@gmail.com |
e52916ccda0389db154647e5180293c617ea1efd | 3aa6ef4ec0b52c5d8a1a34ec5d99a640bfe086e3 | /BackEnd/Advance/Spring/springcore/src/main/java/com/capgemini/springcore/interfaces/Animal.java | 42871cb44b64b13fe9add5033b6a311a27f02a82 | [] | no_license | jagnish1998/TY_CG_HTD_PuneMumbai_JFS_JagnishSharma | 7f37251e437119dd1381f9e34fd0ec9f61f7f0fa | 4b1f28bcdc020f840418491fedf08e0fe0974f6d | refs/heads/master | 2023-01-14T12:06:02.282243 | 2019-12-22T06:05:39 | 2019-12-22T06:05:39 | 225,846,035 | 0 | 0 | null | 2023-01-07T12:37:41 | 2019-12-04T11:00:47 | JavaScript | UTF-8 | Java | false | false | 138 | java | package com.capgemini.springcore.interfaces;
public interface Animal {
public void eat();
public void speak();
public void walk();
}
| [
"jagnish@gmail.com"
] | jagnish@gmail.com |
ffd34fbef71a809ab073315eeac997b60caf9b9f | 112f026ccd9b19f13440eb4707e39d1aad869647 | /back-end/src/main/java/amanda/biagi/unit/controllers/UserInfoController.java | fdf6c3d771fb210f467ef688a7efb8043f25f127 | [] | no_license | amandabiagi/UNIT | 412d9f1c3d7c5008e5e2bab101ff8846d801f85d | 80c32b912c3bb4834b9b39e4279dfdf203166ea1 | refs/heads/master | 2023-08-17T21:40:23.439169 | 2021-10-27T15:24:46 | 2021-10-27T15:24:46 | 419,788,866 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,307 | java | package amanda.biagi.unit.controllers;
import amanda.biagi.unit.models.Documento;
import amanda.biagi.unit.models.InfoUser;
import amanda.biagi.unit.models.UserDoc;
import amanda.biagi.unit.repositories.DocumentoRepository;
import amanda.biagi.unit.repositories.InfoUserRepository;
import amanda.biagi.unit.service.InfoUserService;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.websocket.server.PathParam;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@CrossOrigin(origins = "*", allowedHeaders = "*")
@RestController
@RequestMapping("/info")
public class UserInfoController {
private Integer idDoc = 0;
List<InfoUser> listaHomologacao = new ArrayList<>();
List<UserDoc> listaUserDoc = new ArrayList<>();
// List<Documento> listaDocumentos = new ArrayList<>();
@Autowired
public InfoUserRepository infoUserRepository;
@Autowired
public DocumentoRepository documentoRepository;
@Autowired
public InfoUserService infoUserService;
@PostMapping("/enviar")
public ResponseEntity<List<UserDoc>> enviar( @RequestParam String infoUserStr, MultipartFile pdf){
//Recebendo uma string por parametro e transformando em um objeto json
JSONObject jsonObject = new JSONObject(infoUserStr);
//Convertendo o objeto json em um objeto.
UserDoc userDoc = new UserDoc(jsonObject.getLong("ra"),
jsonObject.getString("nomeAluno"),
jsonObject.getString("quantidadeHoras"),
jsonObject.getString("atividade"));
userDoc.setNomeDocumento(pdf.getOriginalFilename());
idDoc ++;
userDoc.setId(idDoc);
listaUserDoc.add(userDoc);
infoUserService.salvarPDF(pdf);
return ResponseEntity.created(null).body(listaUserDoc);
}
@GetMapping("/exibir")
public ResponseEntity exibir(){
if (listaUserDoc.isEmpty()){
return ResponseEntity.noContent().build();
}
return ResponseEntity.ok(listaUserDoc);
}
@PostMapping("/salvar")
public ResponseEntity salvar(@RequestBody List<UserDoc> userDocs){
InfoUser infoUser = new InfoUser();
Documento documento = new Documento();
if (userDocs.isEmpty()){
return ResponseEntity.noContent().build();
}
for (UserDoc userDoc: userDocs) {
//Criando um documento
documento.setId(userDoc.getId());
documento.setNomeDocumento(userDoc.getNomeDocumento());
documento.setAtividade(userDoc.getAtividade());
documento.setQuantidadeHoras(userDoc.getQuantidadeHoras());
documento.setHomologado(userDoc.getHomologado());
//Criando um usuário
infoUser.setNomeAluno(userDoc.getNomeAluno());
infoUser.setRa(userDoc.getRa());
//Criando o relacionamento
documento.setFkAluno(infoUser);
infoUserRepository.save(infoUser);
documentoRepository.save(documento);
listaUserDoc.removeIf(u -> Objects.equals(u.getId(), userDoc.getId()));
}
return ResponseEntity.accepted().body(listaUserDoc);
}
@GetMapping(value = "/download/{nomeDoc}", produces = "application/pdf")
public ResponseEntity baixar(@PathVariable String nomeDoc) throws FileNotFoundException {
String caminho = ("src/main/resources/static/imagem/") + nomeDoc;
HttpHeaders headers = new HttpHeaders();
return new ResponseEntity( new FileSystemResource(caminho), headers, HttpStatus.OK);
}
@GetMapping("buscar-ra/")
public ResponseEntity buscarRa(@RequestParam String ra){
InfoUser infoUser = infoUserRepository.findByRa(Long.parseLong(ra));
if (infoUser == null){
return ResponseEntity.noContent().build();
}
return ResponseEntity.ok(infoUser);
}
}
| [
"amanda.biagi@bandtec.com.br"
] | amanda.biagi@bandtec.com.br |
5692f1210319190cb445d0d3742e323094a72ba3 | 36e635f029b51790076da90bb9f67fd475820c41 | /src/main/java/ir/javacup/banking/Branch.java | da9973618e6a0ab9ddf1297269a65c176d0033e5 | [] | no_license | alirezaAsadi2018/java-problems | 78cde8528b6419921576edeb01023cf0b86090ea | 4a9062aa21637eee14b179ce1b534a0ccd2284e9 | refs/heads/master | 2023-08-08T14:57:59.115544 | 2019-09-27T18:12:42 | 2019-09-27T18:12:42 | 211,307,088 | 1 | 0 | null | 2023-07-22T17:20:11 | 2019-09-27T11:46:10 | Java | UTF-8 | Java | false | false | 508 | java | package ir.javacup.banking;
public class Branch {
private String code;
private String city;
private int rate;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public int getRate() {
return rate;
}
public void setRate(int rate) {
this.rate = rate;
}
} | [
"44492608+alirezaAsadi2018@users.noreply.github.com"
] | 44492608+alirezaAsadi2018@users.noreply.github.com |
e971e14dbc0203b5d9e1695d0db7b039ad59ae17 | 7af3a3cd6d1ae32a86ec85498588638727ae5f28 | /app/src/main/java/com/project/mypetsphuket/Spare/ViewHolder/MyAdepter.java | f29463347c81f2f9b10fede0ea6ff85e3f15d441 | [] | no_license | bubblebao/My-Pets | 44328c4abf234f5b718db9d37ed38f1ed73c1136 | e98c971070088f2b4c6941658e87c73e42d9c10c | refs/heads/master | 2022-06-21T03:45:18.836273 | 2020-05-08T02:17:02 | 2020-05-08T02:17:02 | 206,859,534 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,836 | java | package com.project.mypetsphuket.Spare.ViewHolder;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.project.mypetsphuket.Spare.Profile;
import com.project.mypetsphuket.R;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
public class MyAdepter extends RecyclerView.Adapter<MyAdepter.MyViewHolder> {
private Context context;
private ArrayList<Profile> profiles;
public MyAdepter(Context c , ArrayList<Profile> p)
{
context = c;
profiles = p;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new MyViewHolder(LayoutInflater.from(context).inflate(R.layout.cardview,parent,false));
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
holder.name.setText(profiles.get(position).getName());
holder.email.setText(profiles.get(position).getEmail());
Picasso.get().load(profiles.get(position).getProfilePic()).into(holder.profilePic);
/* if(profiles.get(position).isPermission()) {
} */
}
@Override
public int getItemCount() {
return profiles.size();
}
class MyViewHolder extends RecyclerView.ViewHolder {
TextView name,email;
ImageView profilePic;
private MyViewHolder(@NonNull View itemView) {
super(itemView);
name = itemView.findViewById(R.id.name);
email = itemView.findViewById(R.id.email);
profilePic = itemView.findViewById(R.id.profilePic);
}
}
}
| [
"mongkonrat.nsw@gmail.com"
] | mongkonrat.nsw@gmail.com |
7b57449a83c88c3a97397ac1518d7e59b82f71c7 | 1aecbb6166b090e749054fe7b92bced0227268dd | /ProyectoWebSenaSalud/src/entidades/Usuario.java | 5e170544bae90ac9780585f7fcb76ef48698cdc1 | [] | no_license | dahianaGrajales08/Sena-Salud | 60d6dc15c9b94729f8938dca57670d5b75463150 | c0b53e92e962a79f5c6fb7f38ce1ceb18c9b62ee | refs/heads/master | 2021-01-23T13:29:00.874898 | 2017-11-14T21:46:16 | 2017-11-14T21:46:16 | 102,663,469 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,513 | java | package entidades;
// Generated 28-ago-2017 10:11:09 by Hibernate Tools 5.2.0.CR1
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* Usuario generated by hbm2java
*/
@Entity
@Table(name = "usuario", catalog = "bd_aprendices")
public class Usuario implements java.io.Serializable {
private int uno;
private Integer codigo;
private String user;
private String pass;
private boolean editable;
public Usuario() {
}
public Usuario(String user, String pass) {
this.user = user;
this.pass = pass;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "codigo", unique = true, nullable = false)
public Integer getCodigo() {
return this.codigo;
}
public void setCodigo(Integer codigo) {
this.codigo = codigo;
}
@Column(name = "user", nullable = false, length = 15)
public String getUser() {
return this.user;
}
public void setUser(String user) {
this.user = user;
}
@Column(name = "pass", nullable = false, length = 15)
public String getPass() {
return this.pass;
}
public void setPass(String pass) {
this.pass = pass;
}
@Transient
public boolean isEditable() {
return editable;
}
public void setEditable(boolean editable) {
this.editable = editable;
}
}
| [
"dahiana grajales@10.71.141.36"
] | dahiana grajales@10.71.141.36 |
45cdc88381e5d28d538bf819448d565711ea672f | bb4640ca2dd2a1a5ffb3794454cdbb94398731cd | /MyApplication/app/src/main/java/com/haste/lv/faith/ui/maintab/TabMoreFragment.java | bf32cd096809f4e4f952d7f956cba1a64fdb24cf | [] | no_license | 568/appDarkDemo | 4f39cf610a428f87f66dc92a4792f4835949cbee | 1510f579933be3b2f9f870de8d563823247614ba | refs/heads/master | 2020-04-07T15:48:54.193200 | 2019-12-20T02:29:06 | 2019-12-20T02:29:06 | 158,502,059 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,841 | java | package com.haste.lv.faith.ui.maintab;
import android.app.Activity;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import com.gyf.immersionbar.ImmersionBar;
import com.haste.lv.faith.FirstActivity;
import com.haste.lv.faith.R;
import com.haste.lv.faith.mvpvm.base.BaseAbsLifecycleFragment;
import com.haste.lv.faith.ui.BaseLazyRxFragment;
import com.haste.lv.faith.ui.maintab.adapter.TabMoreAdapter;
import com.haste.lv.faith.ui.maintab.bean.SettingHeaderItem;
import com.haste.lv.faith.ui.maintab.bean.SettingItem;
import com.haste.lv.faith.ui.maintab.childs.AboutFragment;
import com.haste.lv.faith.ui.maintab.viewmodel.SettingViewModel;
import com.haste.lv.faith.ui.maintab.views.PullZoomRecyclerView;
import com.haste.lv.faith.ui.video.VideoDetailsActivity;
import com.haste.lv.faith.uiviews.recyclerview.adapter.BaseRecyclerViewAdapter;
import com.haste.lv.faith.uiviews.recyclerview.divider.XHorizontalDividerItemDecoration;
import com.haste.lv.faith.utils.SharedPreferencesHelper;
import java.util.ArrayList;
/**
* Created by lv on 18-11-30.
* 更多tab
*/
public class TabMoreFragment extends BaseAbsLifecycleFragment implements View.OnClickListener {
private PullZoomRecyclerView refreshRecyclerView;
private SettingViewModel mSettingViewModel;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_maintab_my_layout, container, false);
refreshRecyclerView = view.findViewById(R.id.recyclerview_content);
return view;
}
@Override
public void loadData(long id) {
}
TabMoreAdapter mTabMoreAdapter;
@Override
protected void onFragmentFirstVisible() {
super.onFragmentFirstVisible();
//观察者注册
mSettingViewModel = ViewModelProviders.of(this).get(SettingViewModel.class);
// 订阅LiveData中当前SettingItem数据变化
mSettingViewModel.getCurrentSettingData().observe(this, new Observer<SettingItem>() {
@Override
public void onChanged(@Nullable SettingItem settingItem) {
if (settingItem.isChecked) {
if (!SharedPreferencesHelper.getBoolean("APP_NIGHT_MODE", false)) {
SharedPreferencesHelper.applyBoolean("APP_NIGHT_MODE", true);
nightView = changeActNightMode(getActivity());
}
} else {
if (SharedPreferencesHelper.getBoolean("APP_NIGHT_MODE", false)) {
SharedPreferencesHelper.applyBoolean("APP_NIGHT_MODE", false);
removeActNightMode(getActivity(), nightView);
}
}
}
});
//列表适配器设定
ArrayList<SettingItem> dataList = new ArrayList<>();
mTabMoreAdapter = new TabMoreAdapter(dataList, getContext());
mTabMoreAdapter.init(refreshRecyclerView, mSettingViewModel);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
refreshRecyclerView.setAdapter(mTabMoreAdapter);
refreshRecyclerView.setLayoutManagerAndDivider(layoutManager, new XHorizontalDividerItemDecoration.Builder(getContext()).color(0xffeaeaea).startSkipCount(1).build());
mTabMoreAdapter.setOnItemClickListener(new BaseRecyclerViewAdapter.OnItemClickListener<SettingItem>() {
@Override
public void onItemClick(View view, SettingItem item, int position) {
if (position == 1) {
Intent intent = new Intent(getContext(), FirstActivity.class);
startActivity(intent);
} else if (position == 3) {
startContainerActivity(AboutFragment.class.getCanonicalName());
}else if (position == 4) {
Intent intent = new Intent(getContext(), VideoDetailsActivity.class);
startActivity(intent);
}
}
});
//页面列表数据
SettingItem header = new SettingHeaderItem();
header.itemType = 100;
SettingItem item1 = new SettingItem();
item1.itemType = 1;
item1.title = "夜间模式";
SettingItem item2 = new SettingItem();
item2.itemType = 2;
item2.title = "账号信息";
SettingItem item3 = new SettingItem();
item3.itemType = 2;
item3.title = "关于我们";
SettingItem item4 = new SettingItem();
item4.itemType = 2;
item4.title = "视频测试";
dataList.add(header);
dataList.add(item2);
dataList.add(item1);
dataList.add(item3);
dataList.add(item4);
}
@Override
public void onClick(View view) {
}
View nightView;
private View changeActNightMode(Activity activity) {
WindowManager mWindowManager = activity.getWindowManager();//(WindowManager) getSystemService(Context.WINDOW_SERVICE);
WindowManager.LayoutParams nightViewParam = new WindowManager.LayoutParams(
WindowManager.LayoutParams.TYPE_APPLICATION,
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
PixelFormat.TRANSPARENT);
nightViewParam.width = ViewGroup.LayoutParams.MATCH_PARENT;
nightViewParam.height = ViewGroup.LayoutParams.MATCH_PARENT;
nightViewParam.gravity = Gravity.CENTER;
View nightView = new View(getContext());
nightView.setBackgroundColor(0x66000000);
mWindowManager.addView(nightView, nightViewParam);
return nightView;
}
private void removeActNightMode(Activity activity, View view) {
if (null == view)
return;
WindowManager mWindowManager = activity.getWindowManager();// (WindowManager) getSystemService(Context.WINDOW_SERVICE);
mWindowManager.removeViewImmediate(view);
}
@Override
protected boolean useLoadManager() {
return false;
}
@Override
public boolean immersionBarEnabled() {
return false;
}
}
| [
"lv@haoyunma.com"
] | lv@haoyunma.com |
54d571e2baf7e02dd7f907a044cc43e4771b5a4a | 03ecfb945a3971024b45d92d277e1c7a718daa9b | /src/main/java/com/soict/reviewshopfood/dao/ILikeDAO.java | b1190e16e9825b9b7f75c7fea549befd6de496fa | [] | no_license | VincentLong73/Review-Shop-Food | 010f0ab425ad2e5d4d3412399fff9345d47e88e8 | 00a7ea509fd9898953f7a3734b88bc322e152802 | refs/heads/master | 2023-02-26T02:04:57.155007 | 2021-01-19T04:20:02 | 2021-01-19T04:20:02 | 318,532,268 | 0 | 0 | null | 2021-01-19T04:20:04 | 2020-12-04T13:57:00 | Java | UTF-8 | Java | false | false | 426 | java | package com.soict.reviewshopfood.dao;
import java.util.List;
import javax.transaction.Transactional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.soict.reviewshopfood.entity.Liked;
@Repository
@Transactional
public interface ILikeDAO extends JpaRepository<Liked, Integer>{
List<Liked> getLikedByCommentId(int commentId);
}
| [
"longngodaugo.1202@gmail.com"
] | longngodaugo.1202@gmail.com |
ab444eb3ea8139fe11f58a628b640364831f3841 | 235f821eaec46fd6d87bd916535a9f5f7250778c | /src/main/java/com/poraan/Learn/Spring/repository/TeacherRepository.java | 5decec8d57d57873bbe3984cc089232e6a52793a | [] | no_license | timorshahtahib/Save-Complaint | 30fc08615109ed532cbf1faf452ebe0d4142b8f3 | 6547e97611eb6d6728da483d018fd49c7278599c | refs/heads/master | 2020-07-28T12:34:27.184388 | 2019-09-18T22:06:40 | 2019-09-18T22:06:40 | 209,411,904 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 296 | java | package com.poraan.Learn.Spring.repository;
import com.poraan.Learn.Spring.model.Teacher;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface TeacherRepository extends JpaRepository<Teacher, Long> {
}
| [
"timorshahtahib@gmail.com"
] | timorshahtahib@gmail.com |
9b9220bce994c20dd522890ba99938163a06960c | 8fa221482da055f4c8105b590617a27595826cc3 | /sources/net/gogame/gopay/sdk/support/C1030q.java | de04676d24bac97c28936072e1f0a530de2b985b | [] | no_license | TehVenomm/sauceCodeProject | 4ed2f12393e67508986aded101fa2db772bd5c6b | 0b4e49a98d14b99e7d144a20e4c9ead408694d78 | refs/heads/master | 2023-03-15T16:36:41.544529 | 2018-10-08T03:44:58 | 2018-10-08T03:44:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 210 | java | package net.gogame.gopay.sdk.support;
import android.graphics.Bitmap;
/* renamed from: net.gogame.gopay.sdk.support.q */
public interface C1030q {
/* renamed from: a */
void mo4403a(Bitmap bitmap);
}
| [
"gabrielbrazs@gmail.com"
] | gabrielbrazs@gmail.com |
d7096da37b25d50dbe7af645b48423d6b6e2f372 | 3d7c4f495ee4717ec2cef74a36347ad5d71e2e03 | /src/main/java/se/tarlinder/opengl/Camera.java | 9c04d8f73dc87dfe0ad8da8dd7c1c923699596c1 | [] | no_license | alexander-t/learning-opengl-in-java | 4b4343e1f60949bba2f4d46891762d62f4e5a013 | 57cc9d8440a6f4fe5b291c2582bf31d929a74ae6 | refs/heads/master | 2020-10-01T17:45:45.261675 | 2019-12-14T00:02:10 | 2019-12-14T00:02:10 | 227,590,487 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,250 | java | package se.tarlinder.opengl;
import org.joml.Matrix4f;
import org.joml.Quaternionf;
import org.joml.Vector3f;
public class Camera {
private Vector3f position = new Vector3f(0, 0, 0);
private Quaternionf rotation = new Quaternionf();
private Matrix4f projection = new Matrix4f();
// Used in temporary operations to avoid creating a new object
private final Quaternionf tmpQuaternionf = new Quaternionf();
private final Vector3f tmpVector3f = new Vector3f();
public Camera(float width, float height) {
// Just hard code some reasonable values for now
projection.setPerspective((float) Math.toRadians(70), width / height, 0.01f, 1000f);
}
public void setPosition(Vector3f position) {
this.position = position;
}
public void setRotation(Quaternionf rotation) {
this.rotation = rotation;
}
public Vector3f getPosition() {
return position;
}
public Matrix4f getProjection() {
return projection;
}
public Matrix4f getTransform() {
Matrix4f transform = new Matrix4f();
transform.rotate(rotation.conjugate(tmpQuaternionf));
transform.translate(position.mul(-1, tmpVector3f));
return transform;
}
}
| [
"alexander.tarlinder@crisp.se"
] | alexander.tarlinder@crisp.se |
68fc4199506d4698020682567d476ef73b4bf273 | 284b8f72bb4a29bc47286e634cc1be19baf58e1c | /de/folt/models/applicationmodel/guimodel/support/OpenTMSStyleRangeProperty.java | 994f7b456f0279a482e8766e6201978cdd4159d2 | [] | no_license | MittagQI/src | be708b8a204a6916e5b84fadcc6aac41494c6ab6 | c4b1efe4845a559d5eeb88ce8efb1047622bc193 | refs/heads/master | 2021-01-24T04:08:40.447496 | 2014-01-15T07:19:12 | 2014-01-15T07:19:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,133 | java | /*
* Created on 06.10.2009
*
* To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package de.folt.models.applicationmodel.guimodel.support;
/**
* This class implements simple properties for a StyleRange. Currently it just
* supports the type bEditable, this determines if a given Style Range can be
* edited or not. Default is false
*
* @author klemens
*/
public class OpenTMSStyleRangeProperty
{
/**
* main
*
* @param args
*/
public static void main(String[] args)
{
}
private boolean bEditable = false;
/**
* @param editable
* the bEditable to set - set to true if style range is editable
*/
public OpenTMSStyleRangeProperty(boolean editable)
{
super();
bEditable = editable;
}
/**
* @return the bEditable - is this an editable StyleRange? True if yes
*/
public boolean isBEditable()
{
return bEditable;
}
/**
* @param editable
* the bEditable to set - set to true if style range is editable
*/
public void setBEditable(boolean editable)
{
bEditable = editable;
}
}
| [
"info@heartsome.de"
] | info@heartsome.de |
22e12f3ee40080514570abf1620bb61c577554a7 | ab4a854c69dc9c7e37f57fc2a21a11cd87743d86 | /test/java/org/testory/TestComparingArrays.java | 5c01bc38e6158566b5eabc426cde7088b4d88494 | [
"Apache-2.0"
] | permissive | maciejmikosik/testory | 03b1c685aa889e31af5132ce9deabbe7a90c9cbc | 558523be532bfe0667b9398d7ad405f4c37a3dbf | refs/heads/master | 2022-04-03T21:41:05.060666 | 2018-02-22T23:20:27 | 2018-02-22T23:21:05 | 13,142,766 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,027 | java | package org.testory;
import static org.junit.Assert.assertSame;
import static org.testory.Testory.a;
import static org.testory.Testory.given;
import static org.testory.Testory.mock;
import static org.testory.Testory.thenCalled;
import static org.testory.Testory.thenEqual;
import static org.testory.Testory.thenReturned;
import static org.testory.Testory.when;
import static org.testory.Testory.willReturn;
import static org.testory.testing.Fakes.newObject;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
public class TestComparingArrays {
private List<?> mock;
private int index;
private Object object;
@Before
public void before() {
mock = mock(List.class);
index = 123;
object = newObject("object");
}
@Test
public void then_equals_uses_deep_equals() {
thenEqual(new Object[] { new Object[] { object } }, new Object[] { new Object[] { object } });
}
@Test
public void then_returned_uses_deep_equals() {
when(new Object[] { new Object[] { object } });
thenReturned(new Object[] { new Object[] { object } });
}
@Test
public void matcherizing_during_stubbing_uses_deep_equals() {
given(willReturn(index), mock).indexOf(new Object[] { new Object[] { object } });
assertSame(index, mock.indexOf(new Object[] { new Object[] { object } }));
}
@Test
public void matcherizing_during_stubbing_with_any_uses_deep_equals() {
given(willReturn(index), mock).indexOf(a(new Object[] { new Object[] { object } }));
assertSame(index, mock.indexOf(new Object[] { new Object[] { object } }));
}
@Test
public void matcherizing_during_verification_uses_deep_equals() {
mock.indexOf(new Object[] { new Object[] { object } });
thenCalled(mock).indexOf(new Object[] { new Object[] { object } });
}
@Test
public void matcherizing_during_verification_with_any_uses_deep_equals() {
mock.indexOf(new Object[] { new Object[] { object } });
thenCalled(mock).indexOf(a(new Object[] { new Object[] { object } }));
}
}
| [
"maciej@mikosik.com"
] | maciej@mikosik.com |
8cd3596c116d427203ec53477e4421d117a0cf80 | 953bb078a907c516394dc2c1f4fe1fdd98392f7c | /qxcmp-core/src/main/java/com/qxcmp/web/view/modules/table/AbstractTableCell.java | 41329190ecd556912dadd14ab0365f850c4c537d | [
"MIT"
] | permissive | guoyu07/qxcmp-framework | 97625017c0eadad66418b3be0e34b1ba2f098d61 | e53ef2fc24f1faa166d086d735ff808bd063eddb | refs/heads/master | 2020-03-18T13:32:34.473937 | 2018-03-30T08:51:01 | 2018-03-30T08:51:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,711 | java | package com.qxcmp.web.view.modules.table;
import com.google.common.collect.Lists;
import com.qxcmp.web.view.Component;
import com.qxcmp.web.view.support.Alignment;
import com.qxcmp.web.view.support.VerticalAlignment;
import com.qxcmp.web.view.support.Wide;
import lombok.Getter;
import lombok.Setter;
import java.util.Collection;
import java.util.List;
/**
* 数据表格单元格抽象类
*
* @author Aaric
*/
@Getter
@Setter
public abstract class AbstractTableCell extends AbstractTableComponent {
/**
* 单元格内容
*/
private List<Component> components = Lists.newArrayList();
/**
* 单元格文本
* <p>
* 当单元格未设置内容时,将使用单元格文本作为内容填充
*/
private String content;
/**
* 行跨度
*/
private int rowSpan;
/**
* 列跨度
*/
private int colSpan;
/**
* 是否为正确状态
*/
private boolean positive;
/**
* 是否为不正确状态
*/
private boolean negative;
/**
* 是否为错误状态
*/
private boolean error;
/**
* 是否为警告状态
*/
private boolean warning;
/**
* 是否为激活状态
*/
private boolean active;
/**
* 是否为禁用状态
*/
private boolean disabled;
/**
* 是否为崩塌
* <p>
* 该属性会让单元格只占用实际宽度
*/
private boolean collapsing;
/**
* 对齐方式
*/
private Alignment alignment = Alignment.NONE;
/**
* 垂直对齐方式
*/
private VerticalAlignment verticalAlignment = VerticalAlignment.NONE;
/**
* 是否为可选择
* <p>
* 在鼠标悬浮的时候高亮显示
* <p>
* 如果使用 a 超链接作为单元格内容,则会让整个单元格都可点击
*/
private boolean selectable;
/**
* 单元格宽度
*/
private Wide wide = Wide.NONE;
public AbstractTableCell() {
}
public AbstractTableCell(String content) {
this.content = content;
}
public AbstractTableCell(Component component) {
this.components.add(component);
}
public AbstractTableCell addComponent(Component component) {
this.components.add(component);
return this;
}
public AbstractTableCell addComponents(Collection<? extends Component> components) {
this.components.addAll(components);
return this;
}
@Override
public String getClassContent() {
final StringBuilder stringBuilder = new StringBuilder();
if (positive) {
stringBuilder.append(" positive");
}
if (negative) {
stringBuilder.append(" negative");
}
if (error) {
stringBuilder.append(" error");
}
if (warning) {
stringBuilder.append(" warning");
}
if (active) {
stringBuilder.append(" active");
}
if (disabled) {
stringBuilder.append(" disabled");
}
if (collapsing) {
stringBuilder.append(" collapsing");
}
if (selectable) {
stringBuilder.append(" selectable");
}
return stringBuilder.append(alignment).append(verticalAlignment).append(wide).toString();
}
public AbstractTableCell setRowSpan(int rowSpan) {
this.rowSpan = rowSpan;
return this;
}
public AbstractTableCell setColSpan(int colSpan) {
this.colSpan = colSpan;
return this;
}
public AbstractTableCell setPositive() {
setPositive(true);
return this;
}
public AbstractTableCell setNegative() {
setNegative(true);
return this;
}
public AbstractTableCell setError() {
setError(true);
return this;
}
public AbstractTableCell setWarning() {
setWarning(true);
return this;
}
public AbstractTableCell setActive() {
setActive(true);
return this;
}
public AbstractTableCell setDisabled() {
setDisabled(true);
return this;
}
public AbstractTableCell setCollapsing() {
setCollapsing(true);
return this;
}
public AbstractTableCell setSelectable() {
setSelectable(true);
return this;
}
public AbstractTableCell setAlignment(Alignment alignment) {
this.alignment = alignment;
return this;
}
public AbstractTableCell setVerticalAlignment(VerticalAlignment verticalAlignment) {
this.verticalAlignment = verticalAlignment;
return this;
}
}
| [
"aaricchen@foxmail.com"
] | aaricchen@foxmail.com |
db813ef87bdf607f373f72fbe86853e0bd6c06ae | 9b0252866b88b5a723cec489a9f27ff8a7433ec7 | /test/src/test/java/org/easit/test/AllTest.java | 7ab9a58c3d008d7eed043b21d00879822b075881 | [
"BSD-3-Clause"
] | permissive | giron3s/easit4all | a71ce9578ed6ebc4377ef8fecef38e19d130bcfa | fbeb0be1cc60c3cce392d85ee5bc0937e9f6ad7f | refs/heads/master | 2021-01-15T08:32:17.939385 | 2015-01-26T09:02:29 | 2015-01-26T09:02:29 | 26,434,543 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 231 | java | package org.easit.test;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class AllTest {
@Test
public void test() {
fail("Not yet implemented");
}
}
| [
"xavi.rafael@rutesadojo.com"
] | xavi.rafael@rutesadojo.com |
3ba7f5313e02f86ec68f3d844cdbfc5bf9926c3a | 551110b7ef1c8e2f51f051400f801adaf0025530 | /ProjectSocialNetwork/projectSocialNetwork/src/main/java/com/solvd/projectSocialNetwork/dao/IUserFriendsDAO.java | 2ba7e843af9f44304ff491e885a46188e1d184d3 | [] | no_license | Pastor01/Solvd | 0d8d81f13b7f460c9fef0c793bae5cf3846f8787 | 471591ef945cc2cab5d4f2f1a63d8909cb7c0143 | refs/heads/master | 2023-04-30T05:14:03.235239 | 2021-05-19T20:13:00 | 2021-05-19T20:13:00 | 359,921,043 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 247 | java | package com.solvd.projectSocialNetwork.dao;
import java.util.List;
import com.solvd.projectSocialNetwork.model.UserFriends;
public interface IUserFriendsDAO extends IGenericDAO<UserFriends>{
public List<Long> getFriendFromUserId(long id);
}
| [
"nicoherge@gmail.com"
] | nicoherge@gmail.com |
d77d03c66e00286ddb160f9a1ff606e93f102dbe | e3afbae09e041b2b01f814ea718aa8e472391400 | /org.slive.tr069.bundle/src/org/slive/tr069/model/SoftwareProp.java | 84ae61e2b0c3355c7e5ff6ee5892521b29c61a2d | [] | no_license | faithsmile/tr069 | cd246b4da6e5542a762ddf71ee53531c71b17d6e | 366514e84f210241a9a84f9d448e64407534747b | refs/heads/master | 2020-07-04T15:53:53.731219 | 2016-08-17T03:35:32 | 2016-08-17T03:35:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,200 | java | package org.slive.tr069.model;
import java.io.Serializable;
public class SoftwareProp implements Serializable
{
private static final long serialVersionUID = 1L;
private java.lang.String hardware;
private java.lang.String version;
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
public SoftwareProp()
{
}
public SoftwareProp(String h, String v)
{
hardware = h;
version = v;
}
public boolean equals(java.lang.Object otherOb)
{
if (this == otherOb)
{
return true;
}
if (!(otherOb instanceof SoftwareProp))
{
return false;
}
SoftwareProp other = (SoftwareProp) otherOb;
return (
(hardware == null ? other.hardware == null
: hardware.equals(other.hardware)) && (version == null ? other.version == null
: version.equals(other.version)));
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
return (
(hardware == null ? 0 : hardware.hashCode()) ^ (version == null ? 0
: version.hashCode())
);
}
}
| [
"liangfengxx87@gmail.com"
] | liangfengxx87@gmail.com |
8a39782e891ca3ffe2730ed998c553593ee937fe | 09ad36fff996f4ab37cbac3d34c2143d33e8631d | /mq-client/src/main/java/com/qiuxs/rmq/log/dao/TransRevcDao.java | 4a37f58b4e26b3a59085494983bdd18363dd29e9 | [
"Apache-2.0"
] | permissive | largeTree/cute-framework | bd374d688ae88b16cf911ff03bdb6c6921d7e9c4 | 8c4924c144681d5d48ec331eb647fecc99b774e4 | refs/heads/master | 2021-06-01T10:38:57.318987 | 2021-01-14T05:03:50 | 2021-01-14T05:03:50 | 115,576,933 | 0 | 0 | Apache-2.0 | 2021-01-14T05:03:51 | 2017-12-28T02:36:59 | Java | UTF-8 | Java | false | false | 268 | java | package com.qiuxs.rmq.log.dao;
import com.qiuxs.cuteframework.tech.mybatis.dao.MyBatisRepository;
import com.qiuxs.rmq.log.entity.TransRevc;
@MyBatisRepository
public interface TransRevcDao {
public void insert(TransRevc bean);
public void get(Long txId);
}
| [
"qiuxs@qiuxs.com"
] | qiuxs@qiuxs.com |
91fd237b5ca7a126e2d51a85391c728237fdc1ef | 8b5dea22b373f0bd250e0faf10be72cc6af30c36 | /src/simple/language/psi/SimpleFile.java | 161907549c7c22e0147a4d7c4ba489723a853300 | [] | no_license | durkiewicz/simple-language | 2e73b6ca02af786819ee8cd0b5a0248e273b6a0b | 9511831a9ea872d96d176e62ad5d8e97e1a8b8e3 | refs/heads/master | 2021-01-01T19:41:52.518082 | 2017-08-11T20:20:28 | 2017-08-19T05:46:50 | 98,655,605 | 0 | 1 | null | 2017-08-19T05:46:51 | 2017-07-28T14:08:16 | Java | UTF-8 | Java | false | false | 793 | java | package simple.language.psi;
import com.intellij.extapi.psi.PsiFileBase;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.psi.FileViewProvider;
import simple.language.SimpleFileType;
import simple.language.SimpleLanguage;
import simple.language.*;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
public class SimpleFile extends PsiFileBase {
public SimpleFile(@NotNull FileViewProvider viewProvider) {
super(viewProvider, SimpleLanguage.INSTANCE);
}
@NotNull
@Override
public FileType getFileType() {
return SimpleFileType.INSTANCE;
}
@Override
public String toString() {
return "Simple File";
}
@Override
public Icon getIcon(int flags) {
return super.getIcon(flags);
}
}
| [
"durkiewicz@gmail.com"
] | durkiewicz@gmail.com |
e53792f6a3af683462d0ec5ab874c831b90a61a1 | c1d20e33891deb190d096f5a5ea0cf426b257069 | /newserver1/newserver1/src/com/mayhem/rs2/content/skill/farming/SpecialPlantOne.java | dae1103638e72d73d047a50426bbebca439e08df | [] | no_license | premierscape/NS1 | 72a5d3a3f2d5c09886b1b26f166a6c2b27ac695d | 0fb88b155b2abbb98fe3d88bb287012bbcbb8bf9 | refs/heads/master | 2020-04-07T00:46:08.175508 | 2018-11-16T20:06:10 | 2018-11-16T20:06:10 | 157,917,810 | 0 | 0 | null | 2018-11-16T20:44:52 | 2018-11-16T20:25:56 | Java | UTF-8 | Java | false | false | 28,929 | java | package com.mayhem.rs2.content.skill.farming;
import java.awt.Point;
import java.util.HashMap;
import java.util.Map;
import com.mayhem.core.task.Task;
import com.mayhem.core.task.TaskQueue;
import com.mayhem.core.task.Task.BreakType;
import com.mayhem.core.task.Task.StackType;
import com.mayhem.core.task.impl.TaskIdentifier;
import com.mayhem.core.util.GameDefinitionLoader;
import com.mayhem.core.util.Utility;
import com.mayhem.rs2.content.dialogue.DialogueManager;
import com.mayhem.rs2.content.membership.CreditPurchase;
import com.mayhem.rs2.content.skill.Skills;
import com.mayhem.rs2.entity.Animation;
import com.mayhem.rs2.entity.player.Player;
import com.mayhem.rs2.entity.player.controllers.Controller;
import com.mayhem.rs2.entity.player.controllers.ControllerManager;
import com.mayhem.rs2.entity.player.net.out.impl.SendConfig;
import com.mayhem.rs2.entity.player.net.out.impl.SendMessage;
public class SpecialPlantOne {
private Player player;
// set of global constants for Farming
private static final double COMPOST_CHANCE = 0.9;
private static final double SUPERCOMPOST_CHANCE = 0.7;
private static final double CLEARING_EXPERIENCE = 4;
public SpecialPlantOne(Player player) {
this.player = player;
}
// Farming data
public int[] specialPlantStages = new int[4];
public int[] specialPlantSaplings = new int[4];
public int[] specialPlantState = new int[4];
public long[] specialPlantTimer = new long[4];
public double[] diseaseChance = { 1, 1, 1, 1 };
public boolean[] hasFullyGrown = { false, false, false, false };
public static final int MAIN_SPECIAL_PLANT_CONFIG = 507;
/* This is the enum holding the saplings info */
public enum SpecialPlantData {
SPIRIT_TREE(5375, -1, 1, 83, 3680, 0.15, 199.5, 0, 0x09, 0x14, 0x2c, 19301.8, 12, 23),
CALQUAT_TREE(5503, 5980, 1, 72, 1200, 0.15, 129.5, 48.5, 0x04, 0x12, 0x22, 12096, 14, 20);
private int saplingId;
private int harvestId;
private int saplingAmount;
private int levelRequired;
private int growthTime;
private double diseaseChance;
private double plantingXp;
private double harvestXp;
private int startingState;
private int endingState;
private int checkHealthState;
private double checkHealthExperience;
private int diseaseDiffValue;
private int deathDiffValue;
private static Map<Integer, SpecialPlantData> saplings = new HashMap<Integer, SpecialPlantData>();
static {
for (SpecialPlantData data : SpecialPlantData.values()) {
saplings.put(data.saplingId, data);
}
}
SpecialPlantData(int saplingId, int harvestId, int saplingAmount, int levelRequired, int growthTime, double diseaseChance, double plantingXp, double harvestXp, int startingState, int endingState, int checkHealthState, double checkHealthExperience, int diseaseDiffValue, int deathDiffValue) {
this.saplingId = saplingId;
this.harvestId = harvestId;
this.saplingAmount = saplingAmount;
this.levelRequired = levelRequired;
this.growthTime = growthTime;
this.diseaseChance = diseaseChance;
this.plantingXp = plantingXp;
this.harvestXp = harvestXp;
this.startingState = startingState;
this.endingState = endingState;
this.checkHealthState = checkHealthState;
this.checkHealthExperience = checkHealthExperience;
this.diseaseDiffValue = diseaseDiffValue;
this.deathDiffValue = deathDiffValue;
}
public static SpecialPlantData forId(int saplingId) {
return saplings.get(saplingId);
}
public int getSapplingId() {
return saplingId;
}
public int getHarvestId() {
return harvestId;
}
public int getSeedAmount() {
return saplingAmount;
}
public int getLevelRequired() {
return levelRequired;
}
public int getGrowthTime() {
return growthTime;
}
public double getDiseaseChance() {
return diseaseChance;
}
public double getPlantingXp() {
return plantingXp;
}
public double getHarvestXp() {
return harvestXp;
}
public int getStartingState() {
return startingState;
}
public int getEndingState() {
return endingState;
}
public int getCheckHealthState() {
return checkHealthState;
}
public double getCheckHealthXp() {
return checkHealthExperience;
}
public int getDiseaseDiffValue() {
return diseaseDiffValue;
}
public int getDeathDiffValue() {
return deathDiffValue;
}
}
/* This is the enum data about the different patches */
public enum SpecialPlantFieldsData {
BRIMHAVEN(0, new Point[] { new Point(2801, 3202), new Point(2803, 3204) }, 5375),
KARAMJA(1, new Point[] { new Point(2795, 3100), new Point(2797, 3102) }, 5503),
DRAYNOR(2, new Point[] { new Point(3059, 3257), new Point(3061, 3259) }, 5375),
ETCETERIA(3, new Point[] { new Point(2612, 3857), new Point(2614, 3859) }, 5375);
private int specialPlantsIndex;
private Point[] specialPlantPosition;
private int seedId;
SpecialPlantFieldsData(int specialPlantsIndex, Point[] specialPlantPosition, int seedId) {
this.specialPlantsIndex = specialPlantsIndex;
this.specialPlantPosition = specialPlantPosition;
this.seedId = seedId;
}
public static SpecialPlantFieldsData forIdPosition(int x, int y) {
for (SpecialPlantFieldsData specialPlantFieldsData : SpecialPlantFieldsData.values()) {
if (FarmingConstants.inRangeArea(specialPlantFieldsData.getSpecialPlantPosition()[0], specialPlantFieldsData.getSpecialPlantPosition()[1], x, y)) {
return specialPlantFieldsData;
}
}
return null;
}
public int getSpecialPlantsIndex() {
return specialPlantsIndex;
}
public Point[] getSpecialPlantPosition() {
return specialPlantPosition;
}
public int getSaplingd() {
return seedId;
}
}
/* This is the enum that hold the different data for inspecting the plant */
public enum InspectData {
SPIRIT_TREE(5375, new String[][] { { "The spirit tree sapling has only just been planted. It has not grown yet." }, { "The spirit tree has grown slightly, and sprouted a few more leaves." }, { "Some dark spots have appeared on the trees trunk, and the leaves have grown longer." }, { "The tree has grown larger in all respects, and has grown more leaves." }, { "The spirit tree base has widened showing some roots, and the leaves have morphed into a small canopy.", "Two small branches have appeared on either side of the trunk." }, { "The spirit tree has grown wider in girth, but is still the same height as before.", "The base is larger as well." }, { "The spirit tree has grown larger in all respects.", "The trunk is more warped towards the west, and the roots are more visible" },
{ "The spirit tree is larger in all respects.", "The trunk has grown in a 'S' shape." }, { "The spirit tree has grown another knob on the trunk which will eventually become its nose.", "The tree is larger in all respects, and its branches are growing out to the sides more." }, { "The spirit tree canopy shifts the angle its inclining towards, and its branches are almost parallel to the ground.", "he nose is more defined, and the tree is slightly larger." }, { "The spirit tree branches are slightly angling towards the ground, and it is slightly larger than before." }, { "The spirit tree canopy is smaller, the face is fully defined and the texture of the tree has changed dramatically", "The Spirit tree is ready to be checked." } }),
CALQUAT_TREE(5503, new String[][] { { "The calquat sapling has only just been planted." }, { "The calquat tree grows another segment taller." }, { "The calquat tree grows another segment taller." }, { "The calquat tree grows another segment longer and starts a branch midway up its trunk." }, { "The calquat tree grows some leaves." }, { "The calquat tree grows another segment upside down and grows leaves on its mid-branch." }, { "The calquat tree grows towards the ground." }, { "The calquat tree is ready to be harvested." }, });
private int saplingId;
private String[][] messages;
private static Map<Integer, InspectData> saplings = new HashMap<Integer, InspectData>();
static {
for (InspectData data : InspectData.values()) {
saplings.put(data.saplingId, data);
}
}
InspectData(int saplingId, String[][] messages) {
this.saplingId = saplingId;
this.messages = messages;
}
public static InspectData forId(int saplingId) {
return saplings.get(saplingId);
}
public int getSeedId() {
return saplingId;
}
public String[][] getMessages() {
return messages;
}
}
/* update all the patch states */
public void updateSpecialPlants() {
// brimhaven - karamja - draynor - Etceteria
int[] configValues = new int[specialPlantStages.length];
int configValue;
for (int i = 0; i < specialPlantStages.length; i++) {
configValues[i] = getConfigValue(specialPlantStages[i], specialPlantSaplings[i], specialPlantState[i], i);
}
configValue = (configValues[0] << 16) + (configValues[1] << 8 << 16) + configValues[2] + (configValues[3] << 8);
player.send(new SendConfig(MAIN_SPECIAL_PLANT_CONFIG, configValue));
}
/* getting the different config values */
public int getConfigValue(int specialStage, int saplingId, int plantState, int index) {
SpecialPlantData specialPlantData = SpecialPlantData.forId(saplingId);
switch (specialStage) {
case 0:// weed
return 0x00;
case 1:// weed cleared
return 0x01;
case 2:
return 0x02;
case 3:
return 0x03;
}
if (specialPlantData == null) {
return -1;
}
if (specialStage > specialPlantData.getEndingState() - specialPlantData.getStartingState() - 1) {
hasFullyGrown[index] = true;
}
if (getPlantState(plantState, specialPlantData, specialStage) == 3)
return specialPlantData.getCheckHealthState();
return getPlantState(plantState, specialPlantData, specialStage);
}
/* getting the plant states */
public int getPlantState(int plantState, SpecialPlantData specialPlantData, int specialStage) {
int value = specialPlantData.getStartingState() + specialStage - 4;
switch (plantState) {
case 0:
return value;
case 1:
return value + specialPlantData.getDiseaseDiffValue();
case 2:
return value + specialPlantData.getDeathDiffValue();
case 3:
return specialPlantData.getCheckHealthState();
}
return -1;
}
/* calculating the disease chance and making the plant grow */
public void doCalculations() {
for (int i = 0; i < specialPlantSaplings.length; i++) {
if (specialPlantStages[i] > 0 && specialPlantStages[i] <= 3 && Farming.getMinutesCounter(player) - specialPlantTimer[i] >= 5) {
specialPlantStages[i]--;
specialPlantTimer[i] = Farming.getMinutesCounter(player);
updateSpecialPlants();
continue;
}
SpecialPlantData specialPlantData = SpecialPlantData.forId(specialPlantSaplings[i]);
if (specialPlantData == null) {
continue;
}
long difference = Farming.getMinutesCounter(player) - specialPlantTimer[i];
long growth = specialPlantData.getGrowthTime();
int nbStates = specialPlantData.getEndingState() - specialPlantData.getStartingState();
int state = (int) (difference * nbStates / growth);
if (specialPlantTimer[i] == 0 || specialPlantState[i] == 2 || specialPlantState[i] == 3 || (state > nbStates)) {
continue;
}
if (4 + state != specialPlantStages[i] && specialPlantStages[i] <= specialPlantData.getEndingState() - specialPlantData.getStartingState() + (specialPlantData == SpecialPlantData.SPIRIT_TREE ? 3 : -2)) {
if (specialPlantStages[i] == specialPlantData.getEndingState() - specialPlantData.getStartingState() + (specialPlantData == SpecialPlantData.SPIRIT_TREE ? 3 : -2)) {
specialPlantStages[i] = specialPlantData.getEndingState() - specialPlantData.getStartingState() + 7;
specialPlantState[i] = 3;
updateSpecialPlants();
return;
}
specialPlantStages[i] = 4 + state;
doStateCalculation(i);
updateSpecialPlants();
}
}
}
public void modifyStage(int i) {
SpecialPlantData specialPlantData = SpecialPlantData.forId(specialPlantSaplings[i]);
if (specialPlantData == null)
return;
long difference = Farming.getMinutesCounter(player) - specialPlantTimer[i];
long growth = specialPlantData.getGrowthTime();
int nbStates = specialPlantData.getEndingState() - specialPlantData.getStartingState();
int state = (int) (difference * nbStates / growth);
specialPlantStages[i] = 4 + state;
updateSpecialPlants();
}
/* calculations about the diseasing chance */
public void doStateCalculation(int index) {
if (specialPlantState[index] == 2) {
return;
}
// if the patch is diseased, it dies, if its watched by a farmer, it
// goes back to normal
if (specialPlantState[index] == 1) {
specialPlantState[index] = 2;
}
if (specialPlantState[index] == 5 && specialPlantStages[index] != 2) {
specialPlantState[index] = 0;
}
if (specialPlantState[index] == 0 && specialPlantStages[index] >= 5 && !hasFullyGrown[index]) {
SpecialPlantData specialPlantData = SpecialPlantData.forId(specialPlantSaplings[index]);
if (specialPlantData == null) {
return;
}
double chance = diseaseChance[index] * specialPlantData.getDiseaseChance();
int maxChance = (int) chance * 100;
if (Utility.random(100) < maxChance && !player.isCreditUnlocked(CreditPurchase.DISEASE_IMUNITY)) {
specialPlantState[index] = 1;
}
}
}
/* clearing the patch with a rake of a spade */
public boolean clearPatch(int objectX, int objectY, int itemId) {
if (player.getSkill().locked()) {
return false;
}
final SpecialPlantFieldsData hopsFieldsData = SpecialPlantFieldsData.forIdPosition(objectX, objectY);
int finalAnimation;
int finalDelay;
if (hopsFieldsData == null || (itemId != FarmingConstants.RAKE && itemId != FarmingConstants.SPADE)) {
return false;
}
if (specialPlantStages[hopsFieldsData.getSpecialPlantsIndex()] == 3) {
return true;
}
if (specialPlantStages[hopsFieldsData.getSpecialPlantsIndex()] <= 3) {
if (!player.getInventory().hasItemId(FarmingConstants.RAKE)) {
DialogueManager.sendStatement(player, "You need a rake to clear this path.");
return true;
} else {
finalAnimation = FarmingConstants.RAKING_ANIM;
finalDelay = 5;
}
} else {
if (!player.getInventory().hasItemId(FarmingConstants.SPADE)) {
DialogueManager.sendStatement(player, "You need a spade to clear this path.");
return true;
} else {
finalAnimation = FarmingConstants.SPADE_ANIM;
finalDelay = 3;
}
}
final int animation = finalAnimation;
player.getSkill().lock(finalDelay);
player.getUpdateFlags().sendAnimation(new Animation(animation));
Controller controller = player.getController();
player.setController(ControllerManager.FORCE_MOVEMENT_CONTROLLER);
TaskQueue.queue(new Task(player, finalDelay, false, StackType.NEVER_STACK, BreakType.NEVER, TaskIdentifier.FARMING) {
@Override
public void execute() {
player.getUpdateFlags().sendAnimation(new Animation(animation));
if (specialPlantStages[hopsFieldsData.getSpecialPlantsIndex()] <= 2) {
specialPlantStages[hopsFieldsData.getSpecialPlantsIndex()]++;
player.getInventory().add(6055, 1);
} else {
specialPlantStages[hopsFieldsData.getSpecialPlantsIndex()] = 3;
stop();
}
player.getSkill().addExperience(Skills.FARMING, CLEARING_EXPERIENCE);
player.skillPoints += 30;
player.sendMessage("You recieve skill points");
specialPlantTimer[hopsFieldsData.getSpecialPlantsIndex()] = Farming.getMinutesCounter(player);
updateSpecialPlants();
if (specialPlantStages[hopsFieldsData.getSpecialPlantsIndex()] == 3) {
stop();
return;
}
}
@Override
public void onStop() {
resetSpecialPlants(hopsFieldsData.getSpecialPlantsIndex());
player.send(new SendMessage("You clear the patch."));
player.getUpdateFlags().sendAnimation(new Animation(65535));
player.setController(controller);
}
});
return true;
}
/* planting the saplings */
public boolean plantSapling(int objectX, int objectY, final int saplingId) {
if (player.getSkill().locked()) {
return false;
}
final SpecialPlantFieldsData specialPlantFieldData = SpecialPlantFieldsData.forIdPosition(objectX, objectY);
final SpecialPlantData specialPlantData = SpecialPlantData.forId(saplingId);
if (specialPlantFieldData == null || specialPlantData == null || specialPlantFieldData.getSaplingd() != saplingId) {
return false;
}
if ((specialPlantStages[0] > 3 || specialPlantStages[2] > 3 || specialPlantStages[3] > 3) && (specialPlantFieldData.getSpecialPlantsIndex() != 1)) {
player.send(new SendMessage("You already have a spirit tree planted somewhere else."));
return true;
}
if (specialPlantStages[specialPlantFieldData.getSpecialPlantsIndex()] != 3) {
player.send(new SendMessage("You can't plant a sapling here."));
return true;
}
if (specialPlantData.getLevelRequired() > player.getLevels()[Skills.FARMING]) {
DialogueManager.sendStatement(player, "You need a farming level of " + specialPlantData.getLevelRequired() + " to plant this sapling.");
return true;
}
if (!player.getInventory().hasItemId(FarmingConstants.TROWEL)) {
DialogueManager.sendStatement(player, "You need a trowel to plant the sapling here.");
return true;
}
player.getUpdateFlags().sendAnimation(new Animation(FarmingConstants.PLANTING_POT_ANIM));
specialPlantStages[specialPlantFieldData.getSpecialPlantsIndex()] = 4;
player.getInventory().remove(saplingId, 1);
player.getSkill().lock(3);
Controller controller = player.getController();
player.setController(ControllerManager.FORCE_MOVEMENT_CONTROLLER);
TaskQueue.queue(new Task(player, 3, false, StackType.NEVER_STACK, BreakType.NEVER, TaskIdentifier.FARMING) {
@Override
public void execute() {
specialPlantState[specialPlantFieldData.getSpecialPlantsIndex()] = 0;
specialPlantSaplings[specialPlantFieldData.getSpecialPlantsIndex()] = saplingId;
specialPlantTimer[specialPlantFieldData.getSpecialPlantsIndex()] = Farming.getMinutesCounter(player);
player.getSkill().addExperience(Skills.FARMING, specialPlantData.getPlantingXp());
player.skillPoints += 50;
player.sendMessage("You recieve skill points");
stop();
}
@Override
public void onStop() {
updateSpecialPlants();
player.getUpdateFlags().sendAnimation(new Animation(65535));
player.setController(controller);
}
});
return true;
}
@SuppressWarnings("unused")
private void displayAll() {
for (int i = 0; i < specialPlantStages.length; i++) {
System.out.println("index : " + i);
System.out.println("state : " + specialPlantState[i]);
System.out.println("saplings : " + specialPlantSaplings[i]);
System.out.println("level : " + specialPlantStages[i]);
System.out.println("timer : " + specialPlantTimer[i]);
System.out.println("disease chance : " + diseaseChance[i]);
System.out.println("-----------------------------------------------------------------");
}
}
/* harvesting the plant resulted */
public boolean harvestOrCheckHealth(int objectX, int objectY) {
if (player.getSkill().locked()) {
return false;
}
final SpecialPlantFieldsData specialPlantFieldsData = SpecialPlantFieldsData.forIdPosition(objectX, objectY);
if (specialPlantFieldsData == null) {
return false;
}
final SpecialPlantData specialPlantData = SpecialPlantData.forId(specialPlantSaplings[specialPlantFieldsData.getSpecialPlantsIndex()]);
if (specialPlantData == null) {
return false;
}
if (specialPlantData == SpecialPlantData.SPIRIT_TREE && specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] != 3) {
handleSpiritTree();
return true;
}
if (player.getInventory().getFreeSlots() <= 0) {
player.send(new SendMessage("Not enough space in your inventory."));
return true;
}
player.getUpdateFlags().sendAnimation(new Animation(832));
player.getSkill().lock(2);
Controller controller = player.getController();
player.setController(ControllerManager.FORCE_MOVEMENT_CONTROLLER);
TaskQueue.queue(new Task(player, 2, false, StackType.NEVER_STACK, BreakType.NEVER, TaskIdentifier.FARMING) {
@Override
public void execute() {
if (player.getInventory().getFreeSlots() <= 0) {
stop();
return;
}
if (specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] == 3) {
player.send(new SendMessage("You examine the plant for signs of disease and find that it's in perfect health."));
player.getSkill().addExperience(Skills.FARMING, specialPlantData.getCheckHealthXp());
player.skillPoints += 50;
player.sendMessage("You recieve skill points");
specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] = 0;
hasFullyGrown[specialPlantFieldsData.getSpecialPlantsIndex()] = false;
specialPlantTimer[specialPlantFieldsData.getSpecialPlantsIndex()] = Farming.getMinutesCounter(player) - specialPlantData.getGrowthTime();
modifyStage(specialPlantFieldsData.getSpecialPlantsIndex());
stop();
return;
}
player.send(new SendMessage("You harvest the crop, and pick some " + GameDefinitionLoader.getItemDef(specialPlantData.getHarvestId()).getName().toLowerCase() + "."));
player.getInventory().add(specialPlantData.getHarvestId(), 1);
player.getSkill().addExperience(Skills.FARMING, specialPlantData.getHarvestXp());
player.skillPoints += 60;
player.sendMessage("You recieve skill points");
specialPlantStages[specialPlantFieldsData.getSpecialPlantsIndex()]--;
updateSpecialPlants();
stop();
}
@Override
public void onStop() {
player.getUpdateFlags().sendAnimation(new Animation(65535));
player.setController(controller);
}
});
return true;
}
private void handleSpiritTree() {
// SpiritTree.sendDialogue(player, 3636);
}
/* lowering the stage */
public void lowerStage(int index, int timer) {
hasFullyGrown[index] = false;
specialPlantTimer[index] -= timer;
}
/* putting compost onto the plant */
public boolean putCompost(int objectX, int objectY, final int itemId) {
if (player.getSkill().locked()) {
return false;
}
if (itemId != 6032 && itemId != 6034) {
return false;
}
final SpecialPlantFieldsData specialPlantFieldsData = SpecialPlantFieldsData.forIdPosition(objectX, objectY);
if (specialPlantFieldsData == null) {
return false;
}
if (specialPlantStages[specialPlantFieldsData.getSpecialPlantsIndex()] != 3 || specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] == 5) {
player.send(new SendMessage("This patch doesn't need compost."));
return true;
}
player.getInventory().remove(itemId, 1);
player.getInventory().add(1925, 1);
player.send(new SendMessage("You pour some " + (itemId == 6034 ? "super" : "") + "compost on the patch."));
player.getUpdateFlags().sendAnimation(new Animation(FarmingConstants.PUTTING_COMPOST));
player.getSkill().addExperience(Skills.FARMING, itemId == 6034 ? Compost.SUPER_COMPOST_EXP_USE : Compost.COMPOST_EXP_USE);
player.getSkill().lock(7);
Controller controller = player.getController();
player.setController(ControllerManager.FORCE_MOVEMENT_CONTROLLER);
TaskQueue.queue(new Task(player, 7, false, StackType.NEVER_STACK, BreakType.NEVER, TaskIdentifier.FARMING) {
@Override
public void execute() {
diseaseChance[specialPlantFieldsData.getSpecialPlantsIndex()] *= itemId == 6032 ? COMPOST_CHANCE : SUPERCOMPOST_CHANCE;
specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] = 5;
stop();
}
@Override
public void onStop() {
player.getUpdateFlags().sendAnimation(new Animation(65535));
player.setController(controller);
}
});
return true;
}
/* inspecting a plant */
public boolean inspect(int objectX, int objectY) {
if (player.getSkill().locked()) {
return false;
}
final SpecialPlantFieldsData specialPlantFieldsData = SpecialPlantFieldsData.forIdPosition(objectX, objectY);
if (specialPlantFieldsData == null) {
return false;
}
final InspectData inspectData = InspectData.forId(specialPlantSaplings[specialPlantFieldsData.getSpecialPlantsIndex()]);
final SpecialPlantData specialPlantData = SpecialPlantData.forId(specialPlantSaplings[specialPlantFieldsData.getSpecialPlantsIndex()]);
if (specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] == 1) {
DialogueManager.sendStatement(player, "This plant is diseased. Use a plant cure on it to cure it, ", "or clear the patch with a spade.");
return true;
} else if (specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] == 2) {
DialogueManager.sendStatement(player, "This plant is dead. You did not cure it while it was diseased.", "Clear the patch with a spade.");
return true;
} else if (specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] == 3) {
DialogueManager.sendStatement(player, "This plant has fully grown. You can check it's health", "to gain some farming experiences.");
return true;
}
if (specialPlantStages[specialPlantFieldsData.getSpecialPlantsIndex()] == 0) {
DialogueManager.sendStatement(player, "This is one of the special patches. The soil has not been treated.", "The patch needs weeding.");
} else if (specialPlantStages[specialPlantFieldsData.getSpecialPlantsIndex()] == 3) {
DialogueManager.sendStatement(player, "This is one of the special patches. The soil has not been treated.", "The patch is empty and weeded.");
} else if (inspectData != null && specialPlantData != null) {
player.send(new SendMessage("You bend down and start to inspect the patch..."));
player.getUpdateFlags().sendAnimation(new Animation(1331));
player.getSkill().lock(5);
Controller controller = player.getController();
player.setController(ControllerManager.FORCE_MOVEMENT_CONTROLLER);
TaskQueue.queue(new Task(player, 5, false, StackType.NEVER_STACK, BreakType.NEVER, TaskIdentifier.FARMING) {
@Override
public void execute() {
if (specialPlantStages[specialPlantFieldsData.getSpecialPlantsIndex()] - 4 < inspectData.getMessages().length - 2) {
DialogueManager.sendStatement(player, inspectData.getMessages()[specialPlantStages[specialPlantFieldsData.getSpecialPlantsIndex()] - 4]);
} else if (specialPlantStages[specialPlantFieldsData.getSpecialPlantsIndex()] < specialPlantData.getEndingState() - specialPlantData.getStartingState() + 2) {
DialogueManager.sendStatement(player, inspectData.getMessages()[inspectData.getMessages().length - 2]);
} else {
DialogueManager.sendStatement(player, inspectData.getMessages()[inspectData.getMessages().length - 1]);
}
stop();
}
@Override
public void onStop() {
player.getUpdateFlags().sendAnimation(new Animation(1332));
player.setController(controller);
}
});
}
return true;
}
/* Curing the plant */
public boolean curePlant(int objectX, int objectY, int itemId) {
if (player.getSkill().locked()) {
return false;
}
final SpecialPlantFieldsData specialPlantFieldsData = SpecialPlantFieldsData.forIdPosition(objectX, objectY);
if (specialPlantFieldsData == null || itemId != 6036) {
return false;
}
final SpecialPlantData specialPlantData = SpecialPlantData.forId(specialPlantSaplings[specialPlantFieldsData.getSpecialPlantsIndex()]);
if (specialPlantData == null) {
return false;
}
if (specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] != 1) {
player.send(new SendMessage("This plant doesn't need to be cured."));
return true;
}
player.getInventory().remove(itemId, 1);
player.getInventory().add(229, 1);
player.getUpdateFlags().sendAnimation(new Animation(FarmingConstants.CURING_ANIM));
player.getSkill().lock(7);
specialPlantState[specialPlantFieldsData.getSpecialPlantsIndex()] = 0;
Controller controller = player.getController();
player.setController(ControllerManager.FORCE_MOVEMENT_CONTROLLER);
TaskQueue.queue(new Task(player, 7, false, StackType.NEVER_STACK, BreakType.NEVER, TaskIdentifier.FARMING) {
@Override
public void execute() {
player.send(new SendMessage("You cure the plant with a plant cure."));
stop();
}
@Override
public void onStop() {
updateSpecialPlants();
player.getUpdateFlags().sendAnimation(new Animation(65535));
player.setController(controller);
}
});
return true;
}
private void resetSpecialPlants(int index) {
specialPlantSaplings[index] = 0;
specialPlantState[index] = 0;
diseaseChance[index] = 1;
hasFullyGrown[index] = false;
}
/* checking if the patch is raked */
public boolean checkIfRaked(int objectX, int objectY) {
final SpecialPlantFieldsData specialPlantFieldData = SpecialPlantFieldsData.forIdPosition(objectX, objectY);
if (specialPlantFieldData == null)
return false;
if (specialPlantStages[specialPlantFieldData.getSpecialPlantsIndex()] == 3)
return true;
return false;
}
}
| [
"brandon46142@icloud.com"
] | brandon46142@icloud.com |
9cdc254c6697eb0b6add187f4db68d04c30a5570 | cc2870388f7a582c03515effee958f7a04161d23 | /src/net/mizobogames/fhbgds/commands/CommandShutdown.java | bd50c09b4821cdaf247ea3c1fe13396a99f56ba0 | [] | no_license | fhbgds14531/BigSausage | b12dc527f4ae0a0e1e45c71f45127ed80e4e4c48 | 0f560db70a6ae619372b310952282fadb2be7e45 | refs/heads/master | 2022-01-09T01:35:21.009331 | 2019-05-14T08:07:56 | 2019-05-14T08:07:56 | 104,678,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 707 | java | package net.mizobogames.fhbgds.commands;
import java.util.List;
import net.mizobogames.fhbgds.BigSausage;
import net.mizobogames.fhbgds.Command;
import sx.blah.discord.handle.obj.IChannel;
import sx.blah.discord.handle.obj.IGuild;
import sx.blah.discord.handle.obj.IMessage;
import sx.blah.discord.handle.obj.IUser;
public class CommandShutdown extends Command {
public CommandShutdown(String commandString, String helpString) {
super(commandString, true, helpString);
}
@Override
public void execute(IChannel channel, IUser commandAuthor, IGuild guild, List<String> command, IMessage message) {
if(commandAuthor.getStringID().contentEquals(BigSausage.ME)){
BigSausage.shutdown();
}
}
}
| [
"rmshamannjam@gmail.com"
] | rmshamannjam@gmail.com |
6b133e2c788f2ae3305c74f85e82582ad2c85f26 | f24a26bff345c8b9e7f0a9c927d9463f0f2467cb | /0723_MVC_DynamicSQL/src/com/ict/model/DeleteCommand.java | 1f7ef8f2b037fd9ff5fd62bef2abd8a77f88304f | [] | no_license | wonhong1103/jspstudy | 05b249fb39c269760e509a20d51f99f5ef10daa6 | 4dcf02e8f256930435ef9fb27c4d793caf5d66f8 | refs/heads/master | 2023-01-05T21:09:39.081488 | 2020-10-26T03:31:38 | 2020-10-26T03:31:38 | 282,136,823 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 376 | java | package com.ict.model;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class DeleteCommand implements Command{
@Override
public String exec(HttpServletRequest request, HttpServletResponse response) {
String cPage =request.getParameter("cPage");
request.setAttribute("cPage", cPage);
return "view/delete.jsp";
}
}
| [
"https://github.com/wonhong1103/2020_java_-won"
] | https://github.com/wonhong1103/2020_java_-won |
4f96f643ccbd4de2343b489ac2cfd82635d9bf05 | 1cdeb6041e42eb6cb06e295314669ff4de441648 | /src/main/java/com/bpp/commondataservice/controller/CommonController.java | e1ca6e350249788324303fc25df21350234b5c53 | [] | no_license | tamiladal/CommonDataService | 5fdfc2a066d7e09455d95e6a20e1b84b8963b7d9 | 201190e8b06c95586db917a1031238f5417cbf1b | refs/heads/main | 2023-09-05T06:54:38.228461 | 2021-11-17T19:01:10 | 2021-11-17T19:01:10 | 429,165,491 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,278 | java | package com.bpp.commondataservice.controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bpp.commondataservice.dto.AgricultureProductDTO;
import com.bpp.commondataservice.dto.ClimaticConditionDTO;
import com.bpp.commondataservice.dto.CountryDTO;
import com.bpp.commondataservice.dto.CuisineDTO;
import com.bpp.commondataservice.dto.StateDTO;
import com.bpp.commondataservice.service.IAgricultureProductService;
import com.bpp.commondataservice.service.IClimaticConditionService;
import com.bpp.commondataservice.service.ICountryService;
import com.bpp.commondataservice.service.ICuisineService;
import com.bpp.commondataservice.service.IStateService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
/**
* @author Adalarasu
*
*/
@RestController
@CrossOrigin
@RequestMapping(path = "/common", produces = MediaType.APPLICATION_JSON_VALUE)
public class CommonController {
@Autowired
ICountryService countryService;
@Autowired
IStateService stateService;
@Autowired
IAgricultureProductService agricultureProductService;
@Autowired
IClimaticConditionService climaticConditionService;
@Autowired
ICuisineService cuisineService;
@GetMapping("/check/status")
public String checkStatus() {
return "Successfully Checked";
}
@GetMapping("/fetch/countries")
public List<CountryDTO> fetchAllCountries() {
return countryService.fetchAllCountries();
}
@GetMapping("/fetch/states")
public List<StateDTO> fetchAllStates() {
return stateService.fetchAllStates();
}
@GetMapping("/fetch/agricultureProducts")
public List<AgricultureProductDTO> fetchAllAgricultureProducts() {
return agricultureProductService.fetchAllAgricultureProducts();
}
@GetMapping("/fetch/climaticConditions")
public List<ClimaticConditionDTO> fetchAllClimaticConditions() {
return climaticConditionService.fetchAllClimaticConditions();
}
@GetMapping("/fetch/cuisines")
public List<CuisineDTO> fetchAllCuisines() {
return cuisineService.fetchAllCuisines();
}
}
| [
"tamiladal@gmail.com"
] | tamiladal@gmail.com |
aaabdb06894b739286a157bf84bbdfc3fcd54244 | dbae9c77e8488eb34066a202e57740ba5bb90161 | /src/main/java/com/mytest/board/qnaBoard/controller/QnABoardControllerImpl.java | 3811951667cf22be3a6d19c8a3b04ccb4fecc31e | [] | no_license | jhs7042/PLTproject | 7d0cbedec1b9f8654f6e778613c687aa7851f557 | 9066a852d1755881b1f02b5d7c0db8a3786e441c | refs/heads/master | 2022-12-09T01:10:01.574999 | 2020-09-11T07:30:03 | 2020-09-11T07:30:03 | 294,625,325 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,466 | java | package com.mytest.board.qnaBoard.controller;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.google.gson.JsonObject;
import com.mytest.board.qnaBoard.service.QnABoardService;
import com.mytest.board.qnaBoard.vo.ImageVO;
import com.mytest.board.qnaBoard.vo.QnABoardVO;
@Controller("qnaBoardController")
public class QnABoardControllerImpl implements QnABoardController{
private static String IMAGE_PATH = "C:/myJSP/pltImage";
@Autowired
private QnABoardService qnaBoardService;
@Autowired
private QnABoardVO qnaBoardVO;
@RequestMapping(value="/qnaBoard/listArticles.do", method= {RequestMethod.GET, RequestMethod.POST})
public ModelAndView listArticles(HttpServletRequest request, HttpServletResponse response) throws Exception{
String viewName = (String)request.getAttribute("viewName");
List<QnABoardVO> articlesList = qnaBoardService.listArticles();
// System.out.println("controller: "+articlesList);
ModelAndView mav = new ModelAndView(viewName);
mav.addObject("articlesList", articlesList);
return mav;
}
@RequestMapping(value="/qnaBoard/*Form.do", method= {RequestMethod.GET, RequestMethod.POST})
public ModelAndView Form(@ModelAttribute("qnaBoard") QnABoardVO qnaBoard, HttpServletRequest request, HttpServletResponse response) throws Exception{
// System.out.println(qnaBoard);
String viewName = (String)request.getAttribute("viewName");
ModelAndView mav = new ModelAndView();
mav.setViewName(viewName);
return mav;
}
@RequestMapping(value="/qnaBoard/insertArticle.do", method=RequestMethod.POST)
@ResponseBody
public ResponseEntity addNewArticle(@ModelAttribute QnABoardVO qnaBoard, HttpServletRequest request, HttpServletResponse response) throws Exception{
request.setCharacterEncoding("utf-8");
response.setContentType("text/html; charset=utf-8");
String message;
ResponseEntity resEnt = null;
HttpHeaders responseHeaders = new HttpHeaders();
responseHeaders.add("COntent-Type", "text/html; charset=utf-8");
try {
qnaBoardService.addNewArticle(qnaBoard);
message = "<script>";
message += " alert('글이 등록되었습니다.');";
message += " location.href='"+request.getContextPath()+"/qnaBoard/listArticles.do';";
message += " </script>";
resEnt = new ResponseEntity(message, responseHeaders, HttpStatus.CREATED);
}catch(Exception e) {
message = " <script>";
message += " alert('오류가 발생했습니다.');";
message += " location.href='"+request.getContextPath()+"/qnaBoard/articleForm.do';";
message +=" </script>";
resEnt = new ResponseEntity(message, responseHeaders, HttpStatus.CREATED);
e.printStackTrace();
}
return resEnt;
}
@RequestMapping(value="/qnaBoard/viewArticle.do", method=RequestMethod.GET)
public ModelAndView viewArticle(@RequestParam("articleNO") int articleNO, HttpServletRequest request, HttpServletResponse response) throws Exception{
String viewName = (String)request.getAttribute("viewName");
System.out.println("viewName : "+viewName);
qnaBoardVO = qnaBoardService.viewArticle(articleNO);
ModelAndView mav = new ModelAndView();
mav.setViewName(viewName);
mav.addObject("article", qnaBoardVO);
System.out.println(mav);
return mav;
}
@RequestMapping(value="/qnaBoard/imageUpload.do", method=RequestMethod.POST)
public void imageUpload(@RequestParam MultipartFile upload,
@RequestParam("id") String id,
MultipartHttpServletRequest request, HttpServletResponse response, MultipartHttpServletRequest multiFile) throws Exception{
UUID uid = UUID.randomUUID();
OutputStream out = null;
PrintWriter writer = null;
response.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=utf-8");
try {
String fileName = upload.getOriginalFilename();
byte[] bytes = upload.getBytes();
String path = IMAGE_PATH + "/" + id+"/";
String ckUploadPath = path + uid + "_" + fileName;
String name = uid + "_" + fileName;
File folder = new File(path);
if(!folder.exists()) {
try {
folder.mkdirs();
}catch(Exception e) {
e.getStackTrace();
}
}
out = new FileOutputStream(new File(ckUploadPath));
out.write(bytes);
out.flush();
// String callback = request.getParameter("CKEditorFuncNum");
writer = response.getWriter();
String fileUrl = request.getContextPath()+"/download.do?id="+id+"&imageFileName="+name;
// String fileUrl = ckUploadPath;
JsonObject json = new JsonObject();
json.addProperty("uploaded", 1);
json.addProperty("fileName", fileName);
json.addProperty("url", fileUrl);
writer.println(json);
// writer.println("{\"fileName\" : \""+fileName+"\", \"uploaded\" : 1, \"url\":\""+fileUrl+"\"}");
writer.flush();
}catch(Exception e) {
e.printStackTrace();
}finally {
try {
if(out != null) out.close();
if(writer != null) writer.close();
}catch(IOException e) {
e.printStackTrace();
}
}
return;
}
}
| [
"java14@java14"
] | java14@java14 |
81cbfb404ba2a9e99944dbba39c7f09d3358feea | a1ebbd8a8d9a530f9c2e7d3e74bd3f3de05bd615 | /app/src/main/java/com/example/emi/secActivity.java | fe31e7783f3604ca39fb8d448f99e590cf1d2a32 | [] | no_license | bindu007/EMI | ed27b39ce1763bc1d15b7eb10561685efcb0be9e | 7c43e2bb589c187d394a03e3d3afb049d5d091bb | refs/heads/master | 2020-08-12T04:51:01.286948 | 2019-10-12T09:32:20 | 2019-10-12T09:32:20 | 214,692,463 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,411 | java | package com.example.emi;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class secActivity extends AppCompatActivity {
Button b1;
EditText t1,t2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.seclay);
b1=(Button) findViewById(R.id.bt1);
t1=(EditText) findViewById(R.id.tv1);
t2=(EditText) findViewById(R.id.tv2);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=t1.getText().toString();
double d=Double.parseDouble(s1);
String s=t2.getText().toString();
if(s1.isEmpty()||s.isEmpty())
{
Toast.makeText(secActivity.this,"Please fill the details",Toast.LENGTH_SHORT).show();
}
else
{
Intent intent=new Intent (secActivity.this,thirdlay.class);
intent.putExtra("amount",d);
intent.putExtra("details",s);
startActivity(intent);
}
}
});
}
}
| [
"38523953+bindu007@users.noreply.github.com"
] | 38523953+bindu007@users.noreply.github.com |
d68527a79551b96968eef43eeecd0ab0024d0f2a | 1be076fc8a06ad9be6c06593752c212801e6c020 | /RecyclerView/app/src/main/java/com/example/recyclerview/MainActivity.java | 2023e7de4749833520eb4b4d3225550f1d61e042 | [] | no_license | rkibet/android-mini-projects | 7538bb5eba9e0aac1738df27d753bd0dbb39b20d | 784c6e3f252fe846a477e6731aba6bf1128c5e87 | refs/heads/master | 2023-01-03T08:45:56.296560 | 2020-11-07T08:08:10 | 2020-11-07T08:08:10 | 310,811,615 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,967 | java | package com.example.recyclerview;
import android.os.Bundle;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import java.util.LinkedList;
public class MainActivity extends AppCompatActivity {
private final LinkedList<String> mWordList = new LinkedList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = 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();
}
});
for (int i = 0; i<20; i++){
mWordList.addLast("Word "+i);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
} | [
"ronkibet2012@gmail.com"
] | ronkibet2012@gmail.com |
fb743380bb4872b52028627b7674c11c5bc3c658 | 01d6b951ce24b3d2c89b1ffa18fd79aaa9c4599c | /src/android/support/v4/c/h.java | 670cfdfbd1fcb5c5f5df72d735fdfd973ad3554f | [] | no_license | mohsenuss91/KGBANDROID | 1a5cc246bf17b85dae4733c10a48cc2c34f978fd | a2906e3de617b66c5927a4d1fd85f6a3c6ed89d0 | refs/heads/master | 2016-09-03T06:45:38.912322 | 2015-03-08T12:03:35 | 2015-03-08T12:03:35 | 31,847,141 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,171 | 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.c;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
// Referenced classes of package android.support.v4.c:
// f, c, j
final class h
implements Set
{
final f a;
h(f f1)
{
a = f1;
super();
}
public final boolean add(Object obj)
{
throw new UnsupportedOperationException();
}
public final boolean addAll(Collection collection)
{
int i = a.a();
java.util.Map.Entry entry;
for (Iterator iterator1 = collection.iterator(); iterator1.hasNext(); a.a(entry.getKey(), entry.getValue()))
{
entry = (java.util.Map.Entry)iterator1.next();
}
return i != a.a();
}
public final void clear()
{
a.c();
}
public final boolean contains(Object obj)
{
if (obj instanceof java.util.Map.Entry)
{
java.util.Map.Entry entry = (java.util.Map.Entry)obj;
int i = a.a(entry.getKey());
if (i >= 0)
{
return c.a(a.a(i, 1), entry.getValue());
}
}
return false;
}
public final boolean containsAll(Collection collection)
{
for (Iterator iterator1 = collection.iterator(); iterator1.hasNext();)
{
if (!contains(iterator1.next()))
{
return false;
}
}
return true;
}
public final boolean equals(Object obj)
{
return f.a(this, obj);
}
public final int hashCode()
{
int i = -1 + a.a();
int k = 0;
while (i >= 0)
{
Object obj = a.a(i, 0);
Object obj1 = a.a(i, 1);
int l;
int i1;
int j1;
if (obj == null)
{
l = 0;
} else
{
l = obj.hashCode();
}
if (obj1 == null)
{
i1 = 0;
} else
{
i1 = obj1.hashCode();
}
j1 = k + (i1 ^ l);
i--;
k = j1;
}
return k;
}
public final boolean isEmpty()
{
return a.a() == 0;
}
public final Iterator iterator()
{
return new j(a);
}
public final boolean remove(Object obj)
{
throw new UnsupportedOperationException();
}
public final boolean removeAll(Collection collection)
{
throw new UnsupportedOperationException();
}
public final boolean retainAll(Collection collection)
{
throw new UnsupportedOperationException();
}
public final int size()
{
return a.a();
}
public final Object[] toArray()
{
throw new UnsupportedOperationException();
}
public final Object[] toArray(Object aobj[])
{
throw new UnsupportedOperationException();
}
}
| [
"mohsenuss91@hotmail.com"
] | mohsenuss91@hotmail.com |
3025a68d6b305753b802984116f74eabd399e5e0 | ddc252a2277c299b1bf88b7e2336f1b43206b977 | /HLSchool/src/main/java/com/hl/service/mapper/CommentMapper.java | dd081134cb0963264ebeae6ad4fd0dd072f04dcd | [] | no_license | BulkSecurityGeneratorProject/HLSchool | a41ead9682fc3b638bfbe677a6f7c9cb70921023 | 6e1672802408c77ea0a675f941bf4b69379825ac | refs/heads/master | 2022-12-16T16:07:28.774814 | 2018-03-05T00:43:37 | 2018-03-05T00:43:37 | 296,613,450 | 0 | 0 | null | 2020-09-18T12:21:39 | 2020-09-18T12:21:39 | null | UTF-8 | Java | false | false | 886 | java | package com.hl.service.mapper;
import com.hl.domain.*;
import com.hl.service.dto.CommentDTO;
import org.mapstruct.*;
/**
* Mapper for the entity Comment and its DTO CommentDTO.
*/
@Mapper(componentModel = "spring", uses = {PostMapper.class, UserMapper.class})
public interface CommentMapper extends EntityMapper<CommentDTO, Comment> {
@Mapping(source = "post.id", target = "postId")
@Mapping(source = "user.id", target = "userId")
@Mapping(source = "user.login", target = "userLogin")
CommentDTO toDto(Comment comment);
@Mapping(source = "postId", target = "post")
@Mapping(source = "userId", target = "user")
Comment toEntity(CommentDTO commentDTO);
default Comment fromId(Long id) {
if (id == null) {
return null;
}
Comment comment = new Comment();
comment.setId(id);
return comment;
}
}
| [
"ngoalongtb001@gmail.com"
] | ngoalongtb001@gmail.com |
054ba2e337185caf27474f43b602d1247148d4b3 | f6de93aa9d3195dde928d653e97a644c62ce6e12 | /modules/core/classes/com/opengg/core/physics/collision/colliders/SphereCollider.java | 0090bc9d1c87d530a2b94dbe04dfe1a52a04c5f1 | [
"MIT"
] | permissive | OpenGGEngine/OpenGG-Project | 7fc9535dadfbfbccae5c1be90a2e918b41631c98 | fef30bab50017b30b19bf10a917755e4fa7e60c4 | refs/heads/dev | 2023-07-10T22:12:44.207518 | 2023-07-03T15:30:24 | 2023-07-03T15:30:24 | 42,323,675 | 10 | 3 | null | 2017-07-15T23:02:43 | 2015-09-11T17:50:18 | Java | UTF-8 | Java | false | false | 1,621 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.opengg.core.physics.collision.colliders;
import com.opengg.core.physics.collision.Collider;
import com.opengg.core.physics.collision.CollisionSolver;
import com.opengg.core.physics.collision.ContactManifold;
import com.opengg.core.util.GGInputStream;
import com.opengg.core.util.GGOutputStream;
import java.io.IOException;
import java.util.Optional;
/**
*
* @author Javier
*/
public class SphereCollider extends Collider {
float radius;
public SphereCollider(){
this(1);
}
public SphereCollider(float radius){
this.radius = radius;
}
public float getRadius() {
return radius;
}
@Override
public Optional<ContactManifold> collide(Collider c) {
if(c instanceof SphereCollider sh)
return CollisionSolver.SphereSphere(this, sh);
if(c instanceof CapsuleCollider cc)
return CollisionSolver.SphereCapsule(this, cc);
if(c instanceof ConvexHull ch)
return CollisionSolver.HullSphere(ch, this).map(ContactManifold::reverse);
return Optional.empty();
}
@Override
public void serialize(GGOutputStream stream) throws IOException{
super.serialize(stream);
stream.write(radius);
}
@Override
public void deserialize(GGInputStream stream) throws IOException{
super.deserialize(stream);
radius = stream.readFloat();
}
}
| [
"javster101@outlook.com"
] | javster101@outlook.com |
56dd325f1b4545bce795e3df5b05f6b03ff90a4b | 1d05d16c3da3a1dee199ef25ef8e7546f66be07d | /chapter_010/src/main/java/ru/job4j/safelist/ThreadSafeList.java | 1cf60117eb2ab6f45c295fb6871c60a64c3b86a9 | [
"Apache-2.0"
] | permissive | romaj4/job4j | 026d5b4b83d315311d8ea9fc7935831cfa5f0cb2 | 76bc9de173f0a199789d5fcdbdc95e49ce6e5c5d | refs/heads/master | 2022-09-28T21:10:38.056912 | 2020-05-09T11:48:02 | 2020-05-09T11:48:02 | 160,080,464 | 0 | 0 | Apache-2.0 | 2022-09-08T01:00:06 | 2018-12-02T19:10:02 | Java | UTF-8 | Java | false | false | 1,077 | java | package ru.job4j.safelist;
import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.ThreadSafe;
import ru.job4j.list.DynamicList;
import java.util.Iterator;
/**
* @author Roman Korolchuk (rom.kor@yandex.ru)
* @version $Id$
* @since 0.1
*/
@ThreadSafe
public class ThreadSafeList<E> implements Iterable<E> {
@GuardedBy("this")
private DynamicList<E> safeList;
private int size;
public ThreadSafeList(int size) {
this.size = size;
this.safeList = new DynamicList<>(size);
}
public synchronized boolean add(E value) {
return this.safeList.add(value);
}
public synchronized E get(int index) {
return this.safeList.get(index);
}
@Override
public synchronized Iterator<E> iterator() {
return copy(this.safeList).iterator();
}
private synchronized Iterable<E> copy(DynamicList<E> list) {
DynamicList<E> copyList = new DynamicList<>(this.size);
for (E value : this.safeList) {
copyList.add(value);
}
return copyList;
}
}
| [
"romat67c@yandex.ru"
] | romat67c@yandex.ru |
a9069bdf15926d2db4f9f7df2a690053a69b9bc6 | e6fa3964d7f41ae579cb1c93546e4a76c30cd914 | /taobao-sdk-java-auto_1479188381469-20210114-source/DingTalk/com/dingtalk/api/response/OapiProcessDeleteResponse.java | 8b1d82a2392234e808f8ff3c7c10c99243774821 | [] | no_license | devops-utils/dingtalk-sdk-java | 14c4eb565dc605e6a7469ea0a00416567278846d | 6381d0a22fdc948cba20fa0fc88c5818742177b7 | refs/heads/master | 2023-02-17T04:46:14.429121 | 2021-01-14T03:41:39 | 2021-01-14T03:41:39 | 329,497,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,086 | java | package com.dingtalk.api.response;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.TaobaoResponse;
/**
* TOP DingTalk-API: dingtalk.oapi.process.delete response.
*
* @author top auto create
* @since 1.0, null
*/
public class OapiProcessDeleteResponse extends TaobaoResponse {
private static final long serialVersionUID = 8257315925883445597L;
/**
* 错误码
*/
@ApiField("errcode")
private Long errcode;
/**
* 错误信息
*/
@ApiField("errmsg")
private String errmsg;
/**
* 成功标识
*/
@ApiField("success")
private Boolean success;
public void setErrcode(Long errcode) {
this.errcode = errcode;
}
public Long getErrcode( ) {
return this.errcode;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public String getErrmsg( ) {
return this.errmsg;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Boolean getSuccess( ) {
return this.success;
}
public boolean isSuccess() {
return getErrcode() == null || getErrcode().equals(0L);
}
}
| [
"zhangchunsheng423@gmail.com"
] | zhangchunsheng423@gmail.com |
b20bd6e48182a3afe47570b885f53e45087df387 | b4f7daa72ea0568ba4572126ea337856206d2004 | /src/main/resources/archetype-resources/webapp/src/main/java/webapp/fo/rest/support/FoCharsetResponseFilter.java | 2fe3a4554c9cb56dce42c4643fe32933cc87b50c | [
"Apache-2.0"
] | permissive | nbartels/srb4j | 94249914fb19c3d9243cf51c809db65ad847e321 | c2fe8f1db7255005126a101483fcd5cb202966f9 | refs/heads/master | 2022-03-05T23:14:24.344163 | 2019-12-08T07:17:26 | 2019-12-08T07:17:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 978 | java | package ${package}.webapp.fo.rest.support;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.ext.Provider;
import org.springframework.stereotype.Component;
/**
* <a href=
* "http://stackoverflow.com/questions/5514087/jersey-rest-default-character-encoding/20569571"
* >make sure utf8 is used in the response</a>
*
*
*
*/
@Provider
@Component
public class FoCharsetResponseFilter implements ContainerResponseFilter {
@Override
public void filter(ContainerRequestContext request,
ContainerResponseContext response) {
MediaType type = response.getMediaType();
if (type != null) {
String contentType = type.toString();
if (!contentType.contains("charset")) {
contentType = contentType + ";charset=utf-8";
response.getHeaders().putSingle("Content-Type", contentType);
}
}
}
} | [
"chenjianjx@gmail.com"
] | chenjianjx@gmail.com |
cffb3b0e34be09ba49df0166f7a2c661af4fcb47 | f2379c3e9280132a9d41b4be88341a6cafca3183 | /src/teststatic/Student9.java | faf057d71d7b8b8b4e6b9207eab4cbf963bb2508 | [] | no_license | sasukem193/backendJV | 03cf19d4e53f35fccbe92ac4fec65736ca70023a | eb0f3638404558046e086f5e4d8298335fad5136 | refs/heads/master | 2020-06-06T20:11:09.085777 | 2019-06-20T03:34:25 | 2019-06-20T03:34:25 | 192,842,362 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 645 | java | package teststatic;
public class Student9 {
int rollno;
String name;
static String college = "BachKhoa";
static void change() {
college = "QuocGia";
}
Student9(int r, String n) {
rollno = r;
name = n;
}
void display() {
System.out.println(rollno + " " + name + " " + college);
}
public static void main(String args[]) {
Student9.change();
Student9 s1 = new Student9(111, "Hoang");
Student9 s2 = new Student9(222, "Thanh");
Student9 s3 = new Student9(333, "Nam");
s1.display();
s2.display();
s3.display();
}
} | [
"nguyenphuthang73@gmail.com"
] | nguyenphuthang73@gmail.com |
7d401c74bfe47b42db64d31091752c25247f399d | bd418675d6bb77cf6c0912d44578f5896dd78f6d | /payment-service/src/main/java/com/example/paymentservice/service/PaymentService.java | f6f6c639008c8bb6d683c149decb99357918f861 | [] | no_license | Yohjis/Realtor-4 | c47d619ce1d58c01a2b3fcb8afa0d98003fbe4bf | 31e00225aa035e68aa085aefc188960f3023f3f0 | refs/heads/main | 2023-02-21T00:52:21.721914 | 2021-01-17T16:15:42 | 2021-01-17T16:15:42 | 330,418,798 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 509 | java | package com.example.paymentservice.service;
import com.example.paymentservice.service.models.Payment;
import java.util.List;
public interface PaymentService {
Payment createPayment(int desk, int hookahBalance);
Payment getPaymentById(String id);
Payment getPayment(Payment payment);
int getHookahBalance(Payment payment);
void replenishBalance(String id, int hookahBalance);
void deletePaymentById(String id);
List<Payment> getPayments();
String paymentsReview();
}
| [
"65607773+Yohjis@users.noreply.github.com"
] | 65607773+Yohjis@users.noreply.github.com |
deb954c6a1447fe965650f6152bf1dda54f48fca | 8812e6116e8b640ebabed1903bea96395fe64e38 | /abc/abc131/problemE/Main.java | b7cc7181ab22800ed60bd9ad9f86f388fe1c2524 | [] | no_license | schwarzahl/atcoder | 57f5cec5a35fbb00e8aaf2adaf677dd2f83e7a75 | 40813d90182f375d4334eb451035c7dd0b6d21b5 | refs/heads/master | 2022-11-17T09:59:33.126046 | 2022-11-11T10:18:08 | 2022-11-11T10:36:22 | 64,014,112 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,340 | java | package problemE;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.IntStream;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solve();
}
private void solve() {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
List<Edge> edges = new ArrayList<>();
for (int i = 2; i <= N; i++) {
edges.add(new Edge(1, i));
}
int ans = (N - 1) * (N - 2) / 2;
for (int i = 2; i < N; i++) {
for (int j = i + 1; j <= N; j++) {
if (ans > K) {
edges.add(new Edge(i, j));
ans--;
}
}
}
if (ans == K) {
System.out.println(edges.size());
for (Edge e : edges) {
System.out.println(e.a + " " + e.b);
}
} else {
System.out.println(-1);
}
}
class Edge {
int a;
int b;
public Edge(int a, int b) {
this.a = a;
this.b = b;
}
}
class Scanner {
private InputStream in;
private byte[] buffer = new byte[1024];
private int index;
private int length;
public Scanner(InputStream in) {
this.in = in;
}
private boolean isPrintableChar(int c) {
return '!' <= c && c <= '~';
}
private boolean isDigit(int c) {
return '0' <= c && c <= '9';
}
private boolean hasNextByte() {
if (index < length) {
return true;
} else {
try {
length = in.read(buffer);
index = 0;
} catch (IOException e) {
e.printStackTrace();
}
return length > 0;
}
}
private boolean hasNext() {
while (hasNextByte() && !isPrintableChar(buffer[index])) {
index++;
}
return hasNextByte();
}
private int readByte() {
return hasNextByte() ? buffer[index++] : -1;
}
public String next() {
if (!hasNext()) {
throw new RuntimeException("no input");
}
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) {
throw new RuntimeException("no input");
}
long value = 0L;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
while (isPrintableChar(b)) {
if (isDigit(b)) {
value = value * 10 + (b - '0');
}
b = readByte();
}
return minus ? -value : value;
}
public int nextInt() {
return (int)nextLong();
}
public double nextDouble() {
return Double.parseDouble(next());
}
}
interface CombCalculator {
long comb(int n, int m);
}
interface MobiusFunction {
int get(int n);
}
/**
* メビウス関数をエラトステネスの篩っぽく前計算するクラスです。
* 計算量はO(1)で、前計算でO(N logN)です。
*/
class SieveMobiusFunction implements MobiusFunction {
int size;
int[] mobiusFunctionValues;
public SieveMobiusFunction(int size) {
this.size = size;
mobiusFunctionValues = new int[size];
mobiusFunctionValues[0] = 0;
mobiusFunctionValues[1] = 1;
for (int i = 2; i < size; i++) {
mobiusFunctionValues[i] = 1;
}
for (int i = 2; i * i < size; i++) {
for (int k = 1; i * i * k < size; k++) {
mobiusFunctionValues[i * i * k] *= 0;
}
}
for (int i = 2; i < size; i++) {
if (mobiusFunctionValues[i] == 1) {
for (int k = 1; i * k < size; k++) {
mobiusFunctionValues[i * k] *= -2;
}
}
if (mobiusFunctionValues[i] > 1) {
mobiusFunctionValues[i] = 1;
}
if (mobiusFunctionValues[i] < -1) {
mobiusFunctionValues[i] = -1;
}
}
}
@Override
public int get(int n) {
if (n > size) {
throw new RuntimeException("n is greater than size.");
}
if (n < 0) {
return 0;
}
return mobiusFunctionValues[n];
}
}
/**
* メビウス関数を定義通り計算するクラスです。
* 計算量はO(logN)です。
*/
class PrimeFactorizationMobiusFunction implements MobiusFunction {
@Override
public int get(int n) {
if (n <= 0) {
return 0;
}
if (n == 1) {
return 1;
}
int num = 0;
for (int i = 2; i < n; i++) {
if (n % i == 0) {
n /= i;
num++;
if (n % i == 0) {
return 0;
}
}
}
return num % 2 == 0 ? -1 : 1;
}
}
/**
* 組み合わせ計算を階乗の値で行うクラスです(MOD対応)
* 階乗とその逆元は前計算してテーブルに格納します。
* C(N, N) % M の計算量は O(1)、 前計算でO(max(N, logM))です。
* sizeを1e8より大きい値で実行するとMLEの危険性があります。
* また素数以外のMODには対応していません(逆元の計算に素数の剰余環の性質を利用しているため)。
*/
class FactorialTableCombCalculator implements CombCalculator {
int size;
long[] factorialTable;
long[] inverseFactorialTable;
long mod;
public FactorialTableCombCalculator(int size, long mod) {
this.size = size;
factorialTable = new long[size + 1];
inverseFactorialTable = new long[size + 1];
this.mod = mod;
factorialTable[0] = 1L;
for (int i = 1; i <= size; i++) {
factorialTable[i] = (factorialTable[i - 1] * i) % mod;
}
inverseFactorialTable[size] = inverse(factorialTable[size], mod);
for (int i = size - 1; i >= 0; i--) {
inverseFactorialTable[i] = (inverseFactorialTable[i + 1] * (i + 1)) % mod;
}
}
private long inverse(long n, long mod) {
return pow(n, mod - 2, mod);
}
private long pow(long n, long p, long mod) {
if (p == 0) {
return 1L;
}
long half = pow(n, p / 2, mod);
long ret = (half * half) % mod;
if (p % 2 == 1) {
ret = (ret * n) % mod;
}
return ret;
}
@Override
public long comb(int n, int m) {
if (n > size) {
throw new RuntimeException("n is greater than size.");
}
if (n < 0 || m < 0 || n < m) {
return 0L;
}
return (((factorialTable[n] * inverseFactorialTable[m]) % mod) * inverseFactorialTable[n - m]) % mod;
}
}
/**
* 組み合わせ計算をテーブルで実装したクラスです(MOD対応)
* 前計算でO(N^2), combはO(1)で実行できます
* sizeを2 * 1e4より大きい値で実行するとMLEの危険性があります
*/
class TableCombCalculator implements CombCalculator {
long[][] table;
int size;
public TableCombCalculator(int size, long mod) {
this.size = size;
table = new long[size + 1][];
table[0] = new long[1];
table[0][0] = 1L;
for (int n = 1; n <= size; n++) {
table[n] = new long[n + 1];
table[n][0] = 1L;
for (int m = 1; m < n; m++) {
table[n][m] = (table[n - 1][m - 1] + table[n - 1][m]) % mod;
}
table[n][n] = 1L;
}
}
@Override
public long comb(int n, int m) {
if (n > size) {
throw new RuntimeException("n is greater than size.");
}
if (n < 0 || m < 0 || n < m) {
return 0L;
}
return table[n][m];
}
}
interface Graph {
void link(int from, int to, long cost);
Optional<Long> getCost(int from, int to);
int getVertexNum();
}
interface FlowResolver {
long maxFlow(int from, int to);
}
/**
* グラフの行列による実装
* 接点数の大きいグラフで使うとMLEで死にそう
*/
class ArrayGraph implements Graph {
private Long[][] costArray;
private int vertexNum;
public ArrayGraph(int n) {
costArray = new Long[n][];
for (int i = 0; i < n; i++) {
costArray[i] = new Long[n];
}
vertexNum = n;
}
@Override
public void link(int from, int to, long cost) {
costArray[from][to] = new Long(cost);
}
@Override
public Optional<Long> getCost(int from, int to) {
return Optional.ofNullable(costArray[from][to]);
}
@Override
public int getVertexNum() {
return vertexNum;
}
}
/**
* DFS(深さ優先探索)による実装
* 計算量はO(E*MaxFlow)のはず (E:辺の数, MaxFlow:最大フロー)
*/
class DfsFlowResolver implements FlowResolver {
private Graph graph;
public DfsFlowResolver(Graph graph) {
this.graph = graph;
}
/**
* 最大フロー(最小カット)を求める
* @param from 始点(source)のID
* @param to 終点(target)のID
* @return 最大フロー(最小カット)
*/
public long maxFlow(int from, int to) {
long sum = 0L;
long currentFlow;
do {
currentFlow = flow(from, to, Long.MAX_VALUE / 3, new boolean[graph.getVertexNum()]);
sum += currentFlow;
} while (currentFlow > 0);
return sum;
}
/**
* フローの実行 グラフの更新も行う
* @param from 現在いる節点のID
* @param to 終点(target)のID
* @param current_flow ここまでの流量
* @param passed 既に通った節点か否かを格納した配列
* @return 終点(target)に流した流量/戻りのグラフの流量
*/
private long flow(int from, int to, long current_flow, boolean[] passed) {
passed[from] = true;
if (from == to) {
return current_flow;
}
for (int id = 0; id < graph.getVertexNum(); id++) {
if (passed[id]) {
continue;
}
Optional<Long> cost = graph.getCost(from, id);
if (cost.orElse(0L) > 0) {
long nextFlow = current_flow < cost.get() ? current_flow : cost.get();
long returnFlow = flow(id, to, nextFlow, passed);
if (returnFlow > 0) {
graph.link(from, id, cost.get() - returnFlow);
graph.link(id, from, graph.getCost(id, from).orElse(0L) + returnFlow);
return returnFlow;
}
}
}
return 0L;
}
}
/**
* 1-indexedのBIT配列
*/
class BinaryIndexedTree {
private long[] array;
public BinaryIndexedTree(int size) {
this.array = new long[size + 1];
}
/**
* 指定した要素に値を加算する
* 計算量はO(logN)
* @param index 加算する要素の添字
* @param value 加算する量
*/
public void add(int index, long value) {
for (int i = index; i < array.length; i += (i & -i)) {
array[i] += value;
}
}
/**
* 1〜指定した要素までの和を取得する
* 計算量はO(logN)
* @param index 和の終端となる要素の添字
* @return 1〜indexまでの和
*/
public long getSum(int index) {
long sum = 0L;
for (int i = index; i > 0; i -= (i & -i)) {
sum += array[i];
}
return sum;
}
}
/**
* 1-indexedの2次元BIT配列
*/
class BinaryIndexedTree2D {
private long[][] array;
public BinaryIndexedTree2D(int size1, int size2) {
this.array = new long[size1 + 1][];
for (int i = 1; i <= size1; i++) {
this.array[i] = new long[size2 + 1];
}
}
/**
* 指定した要素に値を加算する
* 計算量はO(logN * logN)
* @param index1 加算する要素の1次元目の添字
* @param index2 加算する要素の2次元目の添字
* @param value 加算する量
*/
public void add(int index1, int index2, long value) {
for (int i1 = index1; i1 < array.length; i1 += (i1 & -i1)) {
for (int i2 = index2; i2 < array.length; i2 += (i2 & -i2)) {
array[i1][i2] += value;
}
}
}
/**
* (1,1)〜指定した要素までの矩形和を取得する
* 計算量はO(logN * logN)
* @param index1 和の終端となる要素の1次元目の添字
* @param index2 和の終端となる要素の2次元目の添字
* @return (1,1)〜(index1,index2)までの矩形和
*/
public long getSum(int index1, int index2) {
long sum = 0L;
for (int i1 = index1; i1 > 0; i1 -= (i1 & -i1)) {
for (int i2 = index2; i2 > 0; i2 -= (i2 & -i2)) {
sum += array[i1][i2];
}
}
return sum;
}
}
interface UnionFind {
void union(int A, int B);
boolean judge(int A, int B);
Set<Integer> getSet(int id);
}
/**
* ArrayUnionFindの拡張
* MapSetで根の添字から根にぶら下がる頂点の集合が取得できるようにした
* getSetメソッドをO(logN * logN)に落とせているはず
* ただしunionメソッドは2倍の計算量になっているので注意(オーダーは変わらないはず)
*/
class SetUnionFind extends ArrayUnionFind {
Map<Integer, Set<Integer>> map;
public SetUnionFind(int size) {
super(size);
map = new HashMap<>();
for (int i = 0; i < size; i++) {
map.put(i, new HashSet<>());
map.get(i).add(i);
}
}
@Override
protected void unionTo(int source, int dest) {
super.unionTo(source, dest);
map.get(dest).addAll(map.get(source));
}
@Override
public Set<Integer> getSet(int id) {
return map.get(root(id));
}
}
/**
* 配列によるUnionFindの実装
* getSetメソッドはO(NlogN)なのでTLEに注意
*/
class ArrayUnionFind implements UnionFind {
int[] parent;
int[] rank;
int size;
public ArrayUnionFind(int size) {
parent = new int[size];
for (int i = 0; i < size; i++) {
parent[i] = i;
}
rank = new int[size];
this.size = size;
}
@Override
public void union(int A, int B) {
int rootA = root(A);
int rootB = root(B);
if (rootA != rootB) {
if (rank[rootA] < rank[rootB]) {
unionTo(rootA, rootB);
} else {
unionTo(rootB, rootA);
if (rank[rootA] == rank[rootB]) {
rank[rootA]++;
}
}
}
}
protected void unionTo(int source, int dest) {
parent[source] = dest;
}
@Override
public boolean judge(int A, int B) {
return root(A) == root(B);
}
@Override
public Set<Integer> getSet(int id) {
Set<Integer> set = new HashSet<>();
IntStream.range(0, size).filter(i -> judge(i, id)).forEach(set::add);
return set;
}
protected int root(int id) {
if (parent[id] == id) {
return id;
}
parent[id] = root(parent[id]);
return parent[id];
}
}
/**
* 素数のユーティリティ
*/
class PrimeNumberUtils {
boolean[] isPrimeArray;
List<Integer> primes;
/**
* 素数判定の上限となる値を指定してユーティリティを初期化
* @param limit 素数判定の上限(この値以上が素数であるか判定しない)
*/
public PrimeNumberUtils(int limit) {
if (limit > 10000000) {
System.err.println("上限の値が高すぎるため素数ユーティリティの初期化でTLEする可能性が大変高いです");
}
primes = new ArrayList<>();
isPrimeArray = new boolean[limit];
if (limit > 2) {
primes.add(2);
isPrimeArray[2] = true;
}
for (int i = 3; i < limit; i += 2) {
if (isPrime(i, primes)) {
primes.add(i);
isPrimeArray[i] = true;
}
}
}
public List<Integer> getPrimeNumberList() {
return primes;
}
public boolean isPrime(int n) {
return isPrimeArray[n];
}
private boolean isPrime(int n, List<Integer> primes) {
for (int prime : primes) {
if (n % prime == 0) {
return false;
}
if (prime > Math.sqrt(n)) {
break;
}
}
return true;
}
}
interface BitSet {
void set(int index, boolean bit);
boolean get(int index);
void shiftRight(int num);
void shiftLeft(int num);
void or(BitSet bitset);
void and(BitSet bitset);
}
/**
* Longの配列によるBitSetの実装
* get/setはO(1)
* shift/or/andはO(size / 64)
*/
class LongBit implements BitSet {
long[] bitArray;
public LongBit(int size) {
bitArray = new long[((size + 63) / 64)];
}
@Override
public void set(int index, boolean bit) {
int segment = index / 64;
int inIndex = index % 64;
if (bit) {
bitArray[segment] |= 1L << inIndex;
} else {
bitArray[segment] &= ~(1L << inIndex);
}
}
@Override
public boolean get(int index) {
int segment = index / 64;
int inIndex = index % 64;
return (bitArray[segment] & (1L << inIndex)) != 0L;
}
@Override
public void shiftRight(int num) {
int shiftSeg = num / 64;
int shiftInI = num % 64;
for (int segment = 0; segment < bitArray.length; segment++) {
int sourceSeg = segment + shiftSeg;
if (sourceSeg < bitArray.length) {
bitArray[segment] = bitArray[sourceSeg] >>> shiftInI;
if (shiftInI > 0 && sourceSeg + 1 < bitArray.length) {
bitArray[segment] |= bitArray[sourceSeg + 1] << (64 - shiftInI);
}
} else {
bitArray[segment] = 0L;
}
}
}
@Override
public void shiftLeft(int num) {
int shiftSeg = num / 64;
int shiftInI = num % 64;
for (int segment = bitArray.length - 1; segment >= 0; segment--) {
int sourceSeg = segment - shiftSeg;
if (sourceSeg >= 0) {
bitArray[segment] = bitArray[sourceSeg] << shiftInI;
if (shiftInI > 0 && sourceSeg > 0) {
bitArray[segment] |= bitArray[sourceSeg - 1] >>> (64 - shiftInI);
}
} else {
bitArray[segment] = 0L;
}
}
}
public long getLong(int segment) {
return bitArray[segment];
}
@Override
public void or(BitSet bitset) {
if (!(bitset instanceof LongBit)) {
return;
}
for (int segment = 0; segment < bitArray.length; segment++) {
bitArray[segment] |= ((LongBit)bitset).getLong(segment);
}
}
@Override
public void and(BitSet bitset) {
if (!(bitset instanceof LongBit)) {
return;
}
for (int segment = 0; segment < bitArray.length; segment++) {
bitArray[segment] &= ((LongBit)bitset).getLong(segment);
}
}
}
} | [
"schwarzahl131072@gmail.com"
] | schwarzahl131072@gmail.com |
280174fd23e9808165fffa6c6c4f10cae7180a57 | 0335d26eea8b276371d2fb2c5b043859d061fce0 | /src/org/blazr/BuyVMServerInterface/main/java/MainWindow.java | 33a05c04118e42096abbffe3a5fc7328dfe30e89 | [] | no_license | HellUnit/BuyVMServerInterface | b75bb73b8668078b88c32c7d7863e98deb1ebc0e | 5bdf9e5bacb248cd2570e0a836f32eab892757d3 | refs/heads/master | 2020-04-05T23:17:22.724097 | 2014-08-10T19:40:34 | 2014-08-10T19:40:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,851 | java | package org.blazr.BuyVMServerInterface.main.java;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.border.BevelBorder;
import java.awt.Font;
import javax.swing.JScrollPane;
import java.awt.Cursor;
import org.blazr.Updater.main.java.AboutDialog;
import org.eclipse.wb.swing.FocusTraversalOnArray;
import java.awt.Component;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
public class MainWindow {
protected static void defaultText(final boolean defaultsNotify) {
if (!defaultsNotify) {
MainWindow.txtpnServerStatusGui.setText("BuyVM Server Interface v"
+ MainWindow.version + "\r\nDeveloped"
+ " by Antony Prince\r\nJanuary"
+ " 2014\r\nhttp://blazr.no-ip.org");
} else {
MainWindow.txtpnServerStatusGui.setText("BuyVM Server Interface v"
+ MainWindow.version + "\r\nDeveloped"
+ " by Antony Prince\r\nJanuary"
+ " 2014\r\nhttp://blazr.no-ip.org\n" + "WARNING!!!\n"
+ "Default values detected. Please set hash & key to"
+ " your info.");
}
}
protected static void disableAll(final boolean setKeyDisabled) {
MainWindow.getBtnNewButton().setEnabled(false);
// getBtnNewButton_1().setEnabled(false);
MainWindow.getBtnNewButton_2().setEnabled(false);
MainWindow.getBtnNewButton_3().setEnabled(false);
if (setKeyDisabled) {
MainWindow.getBtnNewButton_4().setEnabled(false);
}
}
protected static void enableAll(final boolean setKeyOnly) {
if (setKeyOnly) {
MainWindow.getBtnNewButton_4().setEnabled(true);
} else {
MainWindow.getBtnNewButton().setEnabled(true);
// getBtnNewButton_1().setEnabled(true);
MainWindow.getBtnNewButton_2().setEnabled(true);
MainWindow.getBtnNewButton_3().setEnabled(true);
MainWindow.getBtnNewButton_4().setEnabled(true);
}
}
protected static JButton getBtnNewButton() {
return MainWindow.btnNewButton;
}
protected static JButton getBtnNewButton_1() {
return MainWindow.btnNewButton_1;
}
protected static JButton getBtnNewButton_2() {
return MainWindow.btnNewButton_2;
}
protected static JButton getBtnNewButton_3() {
return MainWindow.btnNewButton_3;
}
protected static JButton getBtnNewButton_4() {
return MainWindow.btnNewButton_4;
}
protected static JTextArea getTxtpnServerStatusGui() {
return MainWindow.txtpnServerStatusGui;
}
protected static boolean hasDefaults() {
boolean hasDefaults = false;
if (MainWindow.key.contentEquals("EXAMP-LEKEY-XXXXX")
|| MainWindow.hash.contentEquals("XXXXXXXXXXXXXXXXXXXX")) {
hasDefaults = true;
}
return hasDefaults;
}
private JFrame frmServerStatus;
protected final static String version = "1.0.1";
protected static String key = "";
protected static String hash = "";
private final static String infoFileLoc = "." + File.separator
+ "infoFile.txt";
private static JButton btnNewButton;
private static JButton btnNewButton_1;
private static JButton btnNewButton_4;
private static JButton btnNewButton_2;
private static JButton btnNewButton_3;
protected static Operations ops = new Operations();
private JCheckBox chckbxNewCheckBox_1;
private JCheckBox chckbxNewCheckBox_2;
private JCheckBox chckbxNewCheckBox;
private JCheckBox chckbxStatus;
private static JTextArea txtpnServerStatusGui;
/**
* Launch the application.
*/
public static void main(final String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
final MainWindow window = new MainWindow();
window.frmServerStatus.setVisible(true);
} catch (final Exception e) {
e.printStackTrace();
}
}
});
}
private JCheckBox chckbxAllIps;
private JScrollPane scrollPane;
/**
* Create the application.
*/
public MainWindow() {
initialize();
}
protected JCheckBox getChckbxAllIps() {
return this.chckbxAllIps;
}
protected JCheckBox getChckbxNewCheckBox() {
return this.chckbxNewCheckBox;
}
protected JCheckBox getChckbxNewCheckBox_1() {
return this.chckbxNewCheckBox_1;
}
protected JCheckBox getChckbxNewCheckBox_2() {
return this.chckbxNewCheckBox_2;
}
protected JCheckBox getChckbxStatus() {
return this.chckbxStatus;
}
private String getExtraOptions() {
String extraOptions = "";
if (getChckbxNewCheckBox().isSelected()) {
extraOptions += "&mem=true";
}
if (getChckbxNewCheckBox_1().isSelected()) {
extraOptions += "&hdd=true";
}
if (getChckbxNewCheckBox_2().isSelected()) {
extraOptions += "&bw=true";
}
if (getChckbxStatus().isSelected()) {
extraOptions += "&status=true";
}
if (getChckbxAllIps().isSelected()) {
extraOptions += "&ipaddr=true";
}
return extraOptions;
}
/**
* Initialize the contents of the frame.
*/
private void initialize() {
this.frmServerStatus = new JFrame();
this.frmServerStatus.setResizable(false);
this.frmServerStatus.setTitle("BuyVM Server Interface");
this.frmServerStatus.setBounds(100, 100, 600, 420);
this.frmServerStatus.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.frmServerStatus.getContentPane().setLayout(null);
MainWindow.btnNewButton = new JButton("Start Server");
MainWindow.btnNewButton.setCursor(Cursor
.getPredefinedCursor(Cursor.HAND_CURSOR));
MainWindow.btnNewButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent arg0) {
startThread(1);
}
});
MainWindow.btnNewButton.setBounds(12, 39, 131, 37);
this.frmServerStatus.getContentPane().add(MainWindow.btnNewButton);
MainWindow.btnNewButton_1 = new JButton("Reboot Server");
MainWindow.btnNewButton_1.setCursor(Cursor
.getPredefinedCursor(Cursor.HAND_CURSOR));
MainWindow.btnNewButton_1.setEnabled(false);
MainWindow.btnNewButton_1.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
startThread(2);
}
});
MainWindow.btnNewButton_1.setBounds(12, 89, 131, 37);
this.frmServerStatus.getContentPane().add(MainWindow.btnNewButton_1);
MainWindow.btnNewButton_2 = new JButton("Stop Server");
MainWindow.btnNewButton_2.setCursor(Cursor
.getPredefinedCursor(Cursor.HAND_CURSOR));
MainWindow.btnNewButton_2.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
startThread(3);
}
});
MainWindow.btnNewButton_2.setBounds(155, 39, 131, 37);
this.frmServerStatus.getContentPane().add(MainWindow.btnNewButton_2);
MainWindow.btnNewButton_3 = new JButton("Server Info");
MainWindow.btnNewButton_3.setCursor(Cursor
.getPredefinedCursor(Cursor.HAND_CURSOR));
MainWindow.btnNewButton_3.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent arg0) {
startThread(4);
}
});
MainWindow.btnNewButton_3.setBounds(155, 89, 131, 37);
this.frmServerStatus.getContentPane().add(MainWindow.btnNewButton_3);
MainWindow.btnNewButton_4 = new JButton("Set Key/Hash");
MainWindow.btnNewButton_4.setCursor(Cursor
.getPredefinedCursor(Cursor.HAND_CURSOR));
MainWindow.btnNewButton_4.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent arg0) {
final SetKeyHashDialog dialog = new SetKeyHashDialog();
dialog.setVisible(true);
}
});
MainWindow.btnNewButton_4.setBounds(12, 139, 131, 37);
this.frmServerStatus.getContentPane().add(MainWindow.btnNewButton_4);
final JPanel panel = new JPanel();
panel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
panel.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null,
null));
panel.setBounds(401, 39, 183, 137);
this.frmServerStatus.getContentPane().add(panel);
panel.setLayout(null);
this.chckbxNewCheckBox_1 = new JCheckBox("HDD");
this.chckbxNewCheckBox_1.setSelected(true);
this.chckbxNewCheckBox_1.setBounds(8, 9, 114, 25);
panel.add(this.chckbxNewCheckBox_1);
this.chckbxNewCheckBox_2 = new JCheckBox("Bandwidth");
this.chckbxNewCheckBox_2.setSelected(true);
this.chckbxNewCheckBox_2.setBounds(8, 39, 113, 25);
panel.add(this.chckbxNewCheckBox_2);
this.chckbxNewCheckBox = new JCheckBox("Memory");
this.chckbxNewCheckBox.setSelected(true);
this.chckbxNewCheckBox.setBounds(8, 73, 113, 25);
panel.add(this.chckbxNewCheckBox);
this.chckbxStatus = new JCheckBox("Status");
this.chckbxStatus.setSelected(true);
this.chckbxStatus.setBounds(8, 103, 83, 25);
panel.add(this.chckbxStatus);
this.chckbxAllIps = new JCheckBox("All IP's");
this.chckbxAllIps.setBounds(95, 103, 80, 25);
panel.add(this.chckbxAllIps);
this.scrollPane = new JScrollPane();
this.scrollPane.setBounds(14, 189, 570, 185);
this.frmServerStatus.getContentPane().add(this.scrollPane);
MainWindow.txtpnServerStatusGui = new JTextArea();
this.scrollPane.setViewportView(MainWindow.txtpnServerStatusGui);
MainWindow.txtpnServerStatusGui.setFont(new Font("Tahoma", Font.PLAIN,
15));
MainWindow.txtpnServerStatusGui.setWrapStyleWord(true);
MainWindow.txtpnServerStatusGui.setLineWrap(true);
MainWindow.txtpnServerStatusGui.setEditable(false);
final JMenuBar menuBar = new JMenuBar();
menuBar.setBounds(0, 0, 594, 26);
this.frmServerStatus.getContentPane().add(menuBar);
final JMenu mnFile = new JMenu("File");
menuBar.add(mnFile);
final JMenuItem mntmExit = new JMenuItem("Exit");
mntmExit.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent arg0) {
System.exit(0);
}
});
mnFile.add(mntmExit);
final JMenu mnAbout = new JMenu("About");
mnAbout.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(final MouseEvent arg0) {
final AboutDialog dialog = new AboutDialog();
dialog.setProgramName("BuyVMServerInterface");
dialog.setText("BuyVM Server Interface", MainWindow.version);
dialog.setProgramVersion(MainWindow.version);
dialog.setExeDownloadEnabled(true);
dialog.setLocationRelativeTo(menuBar);
dialog.setVisible(true);
}
});
mnAbout.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent arg0) {
final AboutDialog dialog = new AboutDialog();
dialog.setProgramName("BuyVMServerInterface");
dialog.setText("BuyVM Server Interface", MainWindow.version);
dialog.setProgramVersion(MainWindow.version);
dialog.setExeDownloadEnabled(false);
dialog.setLocationRelativeTo(menuBar);
dialog.setVisible(true);
}
});
menuBar.add(mnAbout);
this.frmServerStatus.getContentPane().setFocusTraversalPolicy(
new FocusTraversalOnArray(new Component[] {
MainWindow.btnNewButton, MainWindow.btnNewButton_2,
MainWindow.btnNewButton_3, MainWindow.btnNewButton_4,
this.chckbxNewCheckBox_1, this.chckbxNewCheckBox_2,
this.chckbxNewCheckBox, this.chckbxStatus,
this.chckbxAllIps }));
this.frmServerStatus.setFocusTraversalPolicy(new FocusTraversalOnArray(
new Component[] { MainWindow.btnNewButton,
MainWindow.btnNewButton_2, MainWindow.btnNewButton_3,
MainWindow.btnNewButton_4, this.chckbxNewCheckBox_1,
this.chckbxNewCheckBox_2, this.chckbxNewCheckBox,
this.chckbxStatus, this.chckbxAllIps }));
try {
final File infoFile = new File(MainWindow.infoFileLoc);
boolean fileCreated;
fileCreated = infoFile.createNewFile();
if (fileCreated) {
MainWindow.ops.writeKeyHash("EXAMP-LEKEY-XXXXX",
"XXXXXXXXXXXXXXXXXXXX");
} else {
String sCurrentLine;
final BufferedReader br1 = new BufferedReader(new FileReader(
"." + File.separator + "infoFile.txt"));
while ((sCurrentLine = br1.readLine()) != null) {
if (sCurrentLine.startsWith("Key:")) {
MainWindow.key = sCurrentLine.substring(
sCurrentLine.indexOf(":") + 1).trim();
} else if (sCurrentLine.startsWith("Hash:")) {
MainWindow.hash = sCurrentLine.substring(
sCurrentLine.indexOf(":") + 1).trim();
} else {
MainWindow.getTxtpnServerStatusGui().setText(
"Invalid Data in infoFile.txt\n" + "\""
+ sCurrentLine + "\" is invalid.");
}
}
br1.close();
}
if (MainWindow.hasDefaults()) {
MainWindow.defaultText(true);
MainWindow.disableAll(false);
} else {
MainWindow.defaultText(false);
MainWindow.enableAll(false);
}
} catch (final IOException e) {
e.printStackTrace();
MainWindow.getTxtpnServerStatusGui().setText(
e.getStackTrace()[0].toString() + "\n"
+ e.getStackTrace()[1].toString() + "\n"
+ e.getStackTrace()[2].toString());
}
}
private void startThread(final int type) {
MainWindow.ops.startWaitThread();
final DataThread thread = new DataThread();
switch (type) {
case 1:
thread.args = "?key=" + MainWindow.key + "&hash=" + MainWindow.hash
+ "&action=boot" + getExtraOptions();
break;
case 2:
thread.args = "?key=" + MainWindow.key + "&hash=" + MainWindow.hash
+ "&action=reboot" + getExtraOptions();
break;
case 3:
thread.args = "?key=" + MainWindow.key + "&hash=" + MainWindow.hash
+ "&action=shutdown" + getExtraOptions();
break;
case 4:
thread.args = "?key=" + MainWindow.key + "&hash=" + MainWindow.hash
+ "&action=info" + getExtraOptions();
break;
default:
thread.args = "?key=" + MainWindow.key + "&hash=" + MainWindow.hash
+ "&action=info" + getExtraOptions();
break;
}
thread.start();
}
}
| [
"antony@blazr.no-ip.org"
] | antony@blazr.no-ip.org |
d793ebb6adb6e4b26b20adf4c673912623eaa4f5 | 8959e41407a5334396adab75f056068c0973f66f | /sp2p_jcjr1/.svn/pristine/68/6853495e41420d395c3d9694e111df2c0ec911ae.svn-base | 2675923352f85ea466345dbc8e840c44287b80bd | [] | no_license | xinyucmd/pysh | 6c9deb1509c3c3664f83044ccecfe005bfe17849 | ad11fc0cc267e9978635573db8db3284df881279 | refs/heads/master | 2020-06-11T09:26:47.592181 | 2016-12-06T08:38:58 | 2016-12-06T08:38:58 | 75,700,477 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,407 | package com.shove.config;
import java.io.UnsupportedEncodingException;
/* *
*类名:AlipayConfig
*功能:基础配置类
*详细:设置帐户有关信息及返回路径
*版本:3.2
*日期:2011-03-17
*说明:
*以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
*该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
*提示:如何获取安全校验码和合作身份者ID
*1.用您的签约支付宝账号登录支付宝网站(www.alipay.com)
*2.点击“商家服务”(https://b.alipay.com/order/myOrder.htm)
*3.点击“查询合作者身份(PID)”、“查询安全校验码(Key)”
*安全校验码查看时,输入支付密码后,页面呈灰色的现象,怎么办?
*解决方法:
*1、检查浏览器配置,不让浏览器做弹框屏蔽设置
*2、更换浏览器或电脑,重新登录查询。
*/
public class AlipayConfig {
//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
// 合作身份者ID,以2088开头由16位纯数字组成的字符串
public static String partner = "";
// 交易安全检验码,由数字和字母组成的32位字符串
public static String key = "";
// 签约支付宝账号或卖家收款支付宝帐户
public static String seller_email = "shove@3km.cc";
// 支付宝服务器通知的页面 要用 http://格式的完整路径,不允许加?id=123这类自定义参数
// 必须保证其地址能够在互联网中访问的到
// public static String notify_url = "http://www.xxx.cn/create_direct_pay_by_user_jsp_utf8/notify_url.jsp";
// 当前页面跳转后的页面 要用 http://格式的完整路径,不允许加?id=123这类自定义参数
// 域名不能写成http://localhost/create_direct_pay_by_user_jsp_utf8/return_url.jsp ,否则会导致return_url执行无效
// public static String return_url = "http://127.0.0.1:8088/create_direct_pay_by_user_jsp_utf8/return_url.jsp";
//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
// 调试用,创建TXT日志路径
public static String log_path = "D:\\alipay_log_" + System.currentTimeMillis()+".txt";
// 字符编码格式 目前支持 gbk 或 utf-8
public static String input_charset = "";
// 签名方式 不需修改
public static String sign_type = "";
//访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http
public static String transport = "";
public static String ALIPAY_GATEWAY_NEW = "";
public static String ses_key = "";
public static String return_url = "";
public static String notify_url = "";
static{
com.shove.io.file.PropertyFile pf;
try {
pf = new com.shove.io.file.PropertyFile();
partner = pf.read("partnerID");
key = pf.read("key");
seller_email = pf.read("seller_email");
input_charset = pf.read("input_charset");
sign_type = pf.read("sign_type");
transport = pf.read("transport");
ses_key = pf.read("ses_key");
ALIPAY_GATEWAY_NEW = pf.read("gateway");
return_url = pf.read("return_url");
notify_url = pf.read("notify_url");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
}
| [
"xinyucmd@163.com"
] | xinyucmd@163.com | |
be675cf9d5788cd2f75e156fac14fcbe1285e456 | 0ad1c4edf03e55f89a5b0c54880808539e91e078 | /src/com/epam/training/enums/CompareEnum.java | 00c01dd06a9221be64b5451da2ec119934152fdd | [] | no_license | valiktorus/reflection | 2de1e8043c276e934bdcaac1d6eef79b882e856b | 55c066d95ad3673c69d6784e9fae3014bd2b1133 | refs/heads/master | 2021-08-31T15:34:24.862383 | 2017-12-21T22:08:45 | 2017-12-21T22:08:45 | 114,882,650 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 883 | java | package com.epam.training.enums;
import java.util.function.BiFunction;
/**
* Created by Valiantsin Pshanichnik on 20.12.2017.
*/
public enum CompareEnum {
/**
* Reference defines comparing objects by reference.
*/
REFERENCE((x, y) -> x == y),
/**
* Value defines comparing objects by value.
*/
VALUE(Object::equals);
private final BiFunction<Object, Object, Boolean> comparator;
CompareEnum(final BiFunction<Object, Object, Boolean> comparator) {
this.comparator = comparator;
}
/**
* Compares two objects.
*
* @param firstObject the first object
* @param secondObject the second object
* @return boolean true if objects are equals
*/
public boolean compare(final Object firstObject, final Object secondObject) {
return comparator.apply(firstObject, secondObject);
}
}
| [
"valiktorus@mail.ru"
] | valiktorus@mail.ru |
07fdc1df9bb2b8ffc56301687235c8a2b9f5f842 | f793de82cd16de3996d33ff241a0f0fc7cb6e04d | /servicecomb-client-2/src/main/java/com/changqin/rpc/RpcService.java | a8682f14033b531f21f90eb5a0d7213c246ed417 | [
"Apache-2.0"
] | permissive | DongJigong/servicecomb | 72ed95ab685bc016a6bba546849fee27ca63d1c7 | ae62b17a5e598bd3803ad5f6226810ad2fa06c9d | refs/heads/master | 2021-06-19T18:07:41.558475 | 2021-03-24T08:58:56 | 2021-03-24T08:58:56 | 185,222,232 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 89 | java | package com.changqin.rpc;
public interface RpcService {
String say(String name);
}
| [
"532600519@qq.com"
] | 532600519@qq.com |
312bfeb5a6e73f7bcf637016971e74079d83ed14 | e108d65747c07078ae7be6dcd6369ac359d098d7 | /org/opencv/objdetect/CascadeClassifier.java | 5d18be3ac2bab26a14eef87c499ee347d7d3a730 | [
"MIT"
] | permissive | kelu124/pyS3 | 50f30b51483bf8f9581427d2a424e239cfce5604 | 86eb139d971921418d6a62af79f2868f9c7704d5 | refs/heads/master | 2020-03-13T01:51:42.054846 | 2018-04-24T21:03:03 | 2018-04-24T21:03:03 | 130,913,008 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,908 | java | package org.opencv.objdetect;
import org.opencv.core.Mat;
import org.opencv.core.MatOfDouble;
import org.opencv.core.MatOfInt;
import org.opencv.core.MatOfRect;
import org.opencv.core.Size;
public class CascadeClassifier {
protected final long nativeObj;
private static native long CascadeClassifier_0();
private static native long CascadeClassifier_1(String str);
private static native void delete(long j);
private static native void detectMultiScale_0(long j, long j2, long j3, double d, int i, int i2, double d2, double d3, double d4, double d5);
private static native void detectMultiScale_1(long j, long j2, long j3);
private static native void detectMultiScale_2(long j, long j2, long j3, long j4, long j5, double d, int i, int i2, double d2, double d3, double d4, double d5, boolean z);
private static native void detectMultiScale_3(long j, long j2, long j3, long j4, long j5);
private static native boolean empty_0(long j);
private static native boolean load_0(long j, String str);
protected CascadeClassifier(long addr) {
this.nativeObj = addr;
}
public CascadeClassifier() {
this.nativeObj = CascadeClassifier_0();
}
public CascadeClassifier(String filename) {
this.nativeObj = CascadeClassifier_1(filename);
}
public void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize) {
double d = scaleFactor;
int i = minNeighbors;
int i2 = flags;
detectMultiScale_0(this.nativeObj, image.nativeObj, objects.nativeObj, d, i, i2, minSize.width, minSize.height, maxSize.width, maxSize.height);
}
public void detectMultiScale(Mat image, MatOfRect objects) {
detectMultiScale_1(this.nativeObj, image.nativeObj, objects.nativeObj);
}
public void detectMultiScale(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels) {
double d = scaleFactor;
int i = minNeighbors;
int i2 = flags;
detectMultiScale_2(this.nativeObj, image.nativeObj, objects.nativeObj, rejectLevels.nativeObj, levelWeights.nativeObj, d, i, i2, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
}
public void detectMultiScale(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights) {
detectMultiScale_3(this.nativeObj, image.nativeObj, objects.nativeObj, rejectLevels.nativeObj, levelWeights.nativeObj);
}
public boolean empty() {
return empty_0(this.nativeObj);
}
public boolean load(String filename) {
return load_0(this.nativeObj, filename);
}
protected void finalize() throws Throwable {
delete(this.nativeObj);
}
}
| [
"kelu124@gmail.com"
] | kelu124@gmail.com |
1048713826e753e97128a64c033e281d1b6df235 | 3199c350d9d9e13831f56450f417f8e691faa597 | /src/main/java/HttpClientTest.java | 91fc40624a759dd7016ccda7bb51c8b4bf7782a9 | [] | no_license | Ginsai/Spider | e7d99071e15bfa261080720eb7c4e52c387e9919 | 6cd5dd00808e27eefa7edd3bd4b2eb10b0e3fa27 | refs/heads/master | 2021-01-19T17:20:31.101334 | 2017-04-15T03:37:17 | 2017-04-15T03:37:17 | 88,318,357 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,182 | java |
import org.apache.http.HttpEntity;
import org.apache.http.client.*;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* Created by Administrator on 2017/4/7.
*/
public class HttpClientTest {
public static void downloadPage(String path){
InputStream inputStream=null;
OutputStream outputStream=null;
CloseableHttpClient httpClient= HttpClients.createDefault();
HttpGet get=new HttpGet(path);
try {
CloseableHttpResponse response = httpClient.execute(get);
HttpEntity entity = response.getEntity();
outputStream =new FileOutputStream("C:\\Users\\Administrator\\Desktop\\图片\\xx.html");
entity.writeTo(outputStream);
} catch (IOException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
downloadPage("http://www.baidu.com");
}
}
| [
"912686397@qq.com"
] | 912686397@qq.com |
a094e6e057bc1c51df64b469bf6f6018f1dcf61d | b09444e568c6790e6b3eafe16d5518ba23f7389d | /src/main/java/com/wy/yubiao/thread/cas/atomic/AtomicFloat1.java | 1f4d37b20998019c8644b89983a61f41f56da5b7 | [] | no_license | Jyub/thread | f9717cef27a08b2ac94eb53929efea54b583a7b6 | 324c67c7ece49ebae5d12bf8c07d8ee762fcd2b7 | refs/heads/master | 2020-06-13T11:29:10.446373 | 2019-08-19T09:56:51 | 2019-08-19T09:56:51 | 194,639,256 | 0 | 0 | null | 2019-10-30T11:22:47 | 2019-07-01T09:11:07 | Java | UTF-8 | Java | false | false | 2,166 | java | package com.wy.yubiao.thread.cas.atomic;
import java.util.concurrent.atomic.AtomicInteger;
/**
* @version v1.0
* @author: yubiao
* @date: 2019/7/15 15:32
* @description: TODO
*/
public class AtomicFloat1 extends Number {
private AtomicInteger bits;
public AtomicFloat1() {
this(0f);
}
public AtomicFloat1(float initialValue) {
bits = new AtomicInteger(Float.floatToIntBits(initialValue));
}
public final float addAndGet(float delta){
float expect;
float update;
do {
expect = get();
update = expect + delta;
} while(!this.compareAndSet(expect, update));
return update;
}
public final float getAndAdd(float delta){
float expect;
float update;
do {
expect = get();
update = expect + delta;
} while(!this.compareAndSet(expect, update));
return expect;
}
public final float getAndDecrement(){
return getAndAdd(-1);
}
public final float decrementAndGet(){
return addAndGet(-1);
}
public final float getAndIncrement(){
return getAndAdd(1);
}
public final float incrementAndGet(){
return addAndGet(1);
}
public final float getAndSet(float newValue) {
float expect;
do {
expect = get();
} while(!this.compareAndSet(expect, newValue));
return expect;
}
public final boolean compareAndSet(float expect, float update) {
return bits.compareAndSet(Float.floatToIntBits(expect), Float.floatToIntBits(update));
}
public final void set(float newValue) {
bits.set(Float.floatToIntBits(newValue));
}
public final float get() {
return Float.intBitsToFloat(bits.get());
}
public float floatValue() {
return get();
}
public double doubleValue() {
return (double) floatValue();
}
public int intValue() {
return (int) get();
}
public long longValue() {
return (long) get();
}
public String toString() {
return Float.toString(get());
}
}
| [
"literyu@foxmail.com"
] | literyu@foxmail.com |
f22fbd7f61fee1edfac829e0b9fa2d1f9b7f7a1d | 7a1c0d948c2b914f954b2f2ec5092bab250ad0e8 | /app/src/main/java/com/trannguyentanthuan2903/yourfoods/category/view/CategoryListFragment.java | d3604903f771d1c4a1703b3c578881c1934ec0c7 | [] | no_license | Testtaccount/YourFoods-master | 649323eb52cb899947db08ddaaf422895682891f | 91f09d241d975371e3afbb84a5c6fea13df64d27 | refs/heads/master | 2020-03-27T11:02:54.590050 | 2018-08-28T14:41:30 | 2018-08-28T14:41:30 | 146,461,615 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,093 | java | package com.trannguyentanthuan2903.yourfoods.category.view;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.trannguyentanthuan2903.yourfoods.R;
import com.trannguyentanthuan2903.yourfoods.category.model.Category;
import com.trannguyentanthuan2903.yourfoods.category.model.CategoryListAdapter;
import com.trannguyentanthuan2903.yourfoods.utility.Constain;
import java.util.ArrayList;
/**
* Created by Administrator on 10/16/2017.
*/
public class CategoryListFragment extends Fragment {
private RecyclerView recyclerCategory;
private ArrayList<Category> arrCategory;
private CategoryListAdapter adapter;
private LinearLayoutManager mManager;
private DatabaseReference mData;
private String idStore;
private ImageView imgCreate;
//Contructor
public CategoryListFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
private void addEvents() {
imgCreate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getActivity(), CreateCategory.class);
intent.putExtra(Constain.ID_STORE, idStore);
startActivity(intent);
}
});
}
private void initInfo() {
try {
mData.child(Constain.STORES).child(idStore).child(Constain.CATEGORY).addValueEventListener( new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
if (dataSnapshot.getValue() != null) {
arrCategory.clear();
for (DataSnapshot dt : dataSnapshot.getChildren()) {
try {
Category category = dt.getValue(Category.class);
arrCategory.add(category);
adapter.notifyDataSetChanged();
} catch (Exception ex) {
}
}
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
recyclerCategory.setLayoutManager(mManager);
} catch (Exception ex) {
ex.printStackTrace();
}
}
private void addControls() {
imgCreate = (ImageView) getActivity().findViewById(R.id.imgCreateCategoryFrag);
mData = FirebaseDatabase.getInstance().getReference();
Intent intent = getActivity().getIntent();
idStore = intent.getStringExtra(Constain.ID_STORE);
//List Category
mManager = new LinearLayoutManager(getActivity());
recyclerCategory = (RecyclerView) getActivity().findViewById(R.id.recyclerCategory);
arrCategory = new ArrayList<>();
adapter = new CategoryListAdapter(arrCategory, getActivity(), idStore);
recyclerCategory.setAdapter(adapter);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_category_list, container, false);
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
addControls();
initInfo();
addEvents();
}
}
| [
"avetik.avetik@gmail.com"
] | avetik.avetik@gmail.com |
155533e475da161dc9693dd6c0d5901c095def6f | 5977b27be4348487eea70bc08196f5a6d80ad62e | /mypage/src/main/java/rentcar/PolicyHandler.java | 4c056ed3dfd755eae9b53977d614c2f514b92c4f | [] | no_license | shockism123/rentcar | 44ab31da96e9533dc4c226bb03be75bffa3070e5 | d2a180b1ced02f0248da639de930a93bdf35cee9 | refs/heads/main | 2023-06-11T05:59:35.842025 | 2021-07-06T07:56:03 | 2021-07-06T07:56:03 | 383,036,172 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 384 | java | package rentcar;
import rentcar.config.kafka.KafkaProcessor;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Service;
@Service
public class PolicyHandler{
@StreamListener(KafkaProcessor.INPUT)
public void whatever(@Payload String eventString){}
}
| [
"09585@skcc.com"
] | 09585@skcc.com |
f328ef8b3dfda902ae43721240bd7954be596639 | 347a860bbd72b5a5a370da669453705c8fb69d9f | /app/src/main/java/com/yaokantv/yaokanui/key/SpDeviceCurtainDataKey.java | 15a638cee213ed0e2ba7155dfc13c8bbdd2c64d9 | [] | no_license | yaokantv/YaokanSDK3-Android | 0f723f2e5d8093fc8489b28917880e7e4c58943c | 2f9323881593c7252422029f6250cb269c6c5ee1 | refs/heads/master | 2023-08-05T20:47:51.361341 | 2023-07-28T06:42:46 | 2023-07-28T06:42:46 | 200,211,372 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 747 | java | package com.yaokantv.yaokanui.key;
import java.util.ArrayList;
import java.util.List;
/**
* Created by liujiayu on 2018/5/21.
*/
public enum SpDeviceCurtainDataKey {
ON("open"), OFF("close"), STOP("pause");
private String key;
// 构造方法
SpDeviceCurtainDataKey(String key) {
this.key = key;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public static List<SpDeviceCurtainDataKey> getKeys() {
List<SpDeviceCurtainDataKey> keys = new ArrayList<>();
keys.add(SpDeviceCurtainDataKey.OFF);
keys.add(SpDeviceCurtainDataKey.ON);
keys.add(SpDeviceCurtainDataKey.STOP);
return keys;
}
}
| [
"peerlessyutou@gmai.com"
] | peerlessyutou@gmai.com |
5a3ef417c618b04c43e3c568ac9295424c00942b | b9f9e9debaa4d2d024bc21ff2b2b3cb9dfb2918c | /trunk/zing/ZingWeb/src/com/iLabs/spice/common/servicelocator/ServiceLocator.java | 129f861fb682c43ca5c07e8dbe8e0a6a2f92d9db | [
"Apache-2.0",
"CC-BY-2.5"
] | permissive | BGCX261/zing-svn-to-git | bbe059b19324d1d1ceb5e8661a28baa1fac14ee2 | 43c7c1227e85053e965e9d88d375a0622dd4bf3a | refs/heads/master | 2020-04-04T01:04:29.530120 | 2015-08-25T15:16:18 | 2015-08-25T15:16:18 | 41,590,300 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,011 | java | /*
* Copyright 2008 Impetus Infotech.
*
* 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.iLabs.spice.common.servicelocator;
import java.lang.reflect.InvocationTargetException;
import com.iLabs.spice.common.exception.SysException;
/**
* This class provides a mechanism to lookup to a service by name and
* optionally by the name of the implementation.
*/
public class ServiceLocator {
/**
* This is the constructor of the class.
*/
public ServiceLocator() {
}
/**
* This method returns an instance of a service that has been looked up by name.
*
* @param svcName This is the the name of the service as given in the services configuration
* @return If a service is successfully located, it is returned.
* @throws SysException
*/
public static Object getService(String svcName) throws SysException {
return getService(svcName,null);
}
/**
* This method returns an instance of a service that has been looked up by
* service name and implementation name.
* @param svcName This is the the name of the service as given in the
* services configuration
* @param implName This is the the name of the service implementation
* as given in the services configuration
* @return If a service is successfully located , it is returned.
* @throws SysException
*/
public static Object getService(String svcName, String implName) throws SysException {
Object svc = null;
try {
Class svcFactoryClass=Class.forName("com.iLabs.spice.common.core.ServiceFactory");
Object svcFactory=svcFactoryClass.getMethod("getInstance",null).invoke(null,null);
if (implName==null || implName.trim().length()==0) {
implName = "default";
}
Class[] paramTypes = {String.class,String.class};
Object[] paramValues = {svcName,implName};
svc=svcFactory.getClass().getMethod("getService", paramTypes).invoke(svcFactory, paramValues);
} catch (ClassNotFoundException classNotFoundException) {
throw new SysException("SL001", classNotFoundException);
} catch (IllegalAccessException illegalAccessException) {
throw new SysException("SL001", illegalAccessException);
} catch (InvocationTargetException invocationTargetException) {
throw new SysException("SL001", invocationTargetException);
} catch (NoSuchMethodException noSuchMethodException) {
throw new SysException("SL001", noSuchMethodException);
}
return svc;
}
}
| [
"you@example.com"
] | you@example.com |
216d98b52a058d01219b1f41bc07cefe957e8b8c | 805b2a791ec842e5afdd33bb47ac677b67741f78 | /Mage.Sets/src/mage/sets/planechase2012/SeeBeyond.java | 7c56cd48dfc16d02ea3f8f4c2aaf2d665aef7c42 | [] | no_license | klayhamn/mage | 0d2d3e33f909b4052b0dfa58ce857fbe2fad680a | 5444b2a53beca160db2dfdda0fad50e03a7f5b12 | refs/heads/master | 2021-01-12T19:19:48.247505 | 2015-08-04T20:25:16 | 2015-08-04T20:25:16 | 39,703,242 | 2 | 0 | null | 2015-07-25T21:17:43 | 2015-07-25T21:17:42 | null | UTF-8 | Java | false | false | 2,172 | java | /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.planechase2012;
import java.util.UUID;
/**
*
* @author * @author LevelX2
*/
public class SeeBeyond extends mage.sets.riseoftheeldrazi.SeeBeyond {
public SeeBeyond(UUID ownerId) {
super(ownerId);
this.cardNumber = 25;
this.expansionSetCode = "PC2";
}
public SeeBeyond(final SeeBeyond card) {
super(card);
}
@Override
public SeeBeyond copy() {
return new SeeBeyond(this);
}
}
| [
"ludwig.hirth@online.de"
] | ludwig.hirth@online.de |
76fa8199d339905bdba71091153536931a5b04a6 | d33d41d75ed7cbfa677af3883cec33b225773b39 | /src/main/java/com/sunrider/parfume/repository/OrderRepository.java | cbe608cca0196e38a9b4079300718743613a6c34 | [] | no_license | Sunrider37/e-commerce-store | 59c111317d0219a3a7ebab36c9adb6316c875b7d | e5451a71679eaf2e57f589cb5964e621a435ed59 | refs/heads/master | 2023-07-11T16:00:16.447590 | 2021-09-05T12:04:13 | 2021-09-05T12:04:13 | 401,746,683 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 327 | java | package com.sunrider.parfume.repository;
import com.sunrider.parfume.model.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface OrderRepository extends JpaRepository<Order, Long> {
List<Order> findAllByOrderByIdAsc();
List<Order> findByEmail(String email);
}
| [
"sunriderr37@gmail.com"
] | sunriderr37@gmail.com |
f90ea48b89319b07bd84c94218ab9fcc53a10d6b | b6618b68bcfde72a71cd50bc22b76f34e3e528c0 | /tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java | ec2cee7bb65d9afc1a0f407c427482431d6981a8 | [] | no_license | ibuziuk/jbosstools-integration-tests | 55549324de5070d27255a88f369993c95a07484d | c832194438546d43f79abebe603d718583472582 | refs/heads/master | 2021-01-24T05:05:33.995094 | 2015-08-20T15:26:26 | 2015-08-31T12:20:50 | 41,677,117 | 1 | 0 | null | 2015-08-31T13:33:43 | 2015-08-31T13:33:43 | null | UTF-8 | Java | false | false | 4,159 | java | /*******************************************************************************
* Copyright (c) 2007-2011 Exadel, Inc. and Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.vpe.ui.bot.test.editor.tags;
import org.jboss.tools.ui.bot.ext.Timing;
/**
* Tests Rich Faces InplaceSelectInput Tag behavior
* @author vlado pakan
*
*/
public class InplaceSelectInputTagTest extends AbstractTagTest{
private static final String defaultLabel = "DefaultLabel";
private static final String option1 = "Option 1";
private static final String option2 = "Option 2";
@Override
protected void initTestPage() {
initTestPage(TestPageType.JSP,
"<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
"<html>\n" +
" <head>\n" +
" </head>\n" +
" <body>\n" +
" <f:view>\n" +
" <rich:inplaceSelect value=\"0\" defaultLabel=\"" + defaultLabel + "\">\n"+
" <f:selectItem itemValue=\"0\" itemLabel=\"" + option1 +"\" />\n" +
" <f:selectItem itemValue=\"1\" itemLabel=\"" + option2 +"\" />\n" +
" </rich:inplaceSelect>\n" +
" </f:view>\n" +
" </body>\n" +
"</html>");
}
@Override
protected void verifyTag() {
assertVisualEditorContains(getVisualEditor(),
"SPAN",
new String[]{"vpe-user-toggle-id","title","class"},
new String[]{"false","rich:inplaceSelect value: 0 defaultLabel: " + defaultLabel,"rich-inplace-select rich-inplace-select-view"},
getTestPageFileName());
assertVisualEditorContainsNodeWithValue(getVisualEditor(),
defaultLabel,
getTestPageFileName());
// check tag selection
getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("SPAN",2), 0);
bot.sleep(Timing.time3S());
String selectedText = getSourceEditor().getSelection();
final String hasToStartWith = "<rich:inplaceSelect value=\"0\" defaultLabel=\"" + defaultLabel + "\">";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
selectedText.trim().startsWith(hasToStartWith));
final String hasEndWith = "</rich:inplaceSelect>";
assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
"\nbut it is '" + selectedText + "'",
selectedText.trim().endsWith(hasEndWith));
// Click on tag and check correct tag displaying
getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("SPAN",2));
bot.sleep(Timing.time3S());
assertVisualEditorContains(getVisualEditor(),
"SPAN",
new String[]{"vpe-user-toggle-id","class"},
new String[]{"true","rich-inplace-select rich-inplace-select-edit"},
getTestPageFileName());
assertVisualEditorContainsNodeWithValue(getVisualEditor(),
option1,
getTestPageFileName());
assertVisualEditorContainsNodeWithValue(getVisualEditor(),
option2,
getTestPageFileName());
assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
defaultLabel,
getTestPageFileName());
selectedText = getSourceEditor().getSelection();
// check tag selection
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
selectedText.trim().startsWith(hasToStartWith));
assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
"\nbut it is '" + selectedText + "'",
selectedText.trim().endsWith(hasEndWith));
}
}
| [
"vpakan@redhat.com"
] | vpakan@redhat.com |
64a2562cd09db9839aa22bd7be6ce7898566dccb | 54030d34015acec3ec288f2d2b442abd85e905b8 | /zoo/src/main/Kangaroo.java | f5c7d22532ac9bb06d59ae287c0c7d7517f14d1c | [] | no_license | Dorian2121/learning | 0485c0646f2d72cfc1d0d12f6a1fef6ecdec2a6b | efb797aaf4140b4b02e850f1d625bf3489b325ed | refs/heads/master | 2023-06-15T03:51:18.340723 | 2021-07-05T16:57:51 | 2021-07-05T16:57:51 | 378,980,504 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 112 | java | package main;
public class Kangaroo extends Animal {
public Kangaroo(String action) {
super(action);
}
}
| [
"User@DESKTOP-TQKM56U"
] | User@DESKTOP-TQKM56U |
f7694619e82fd438723a74d3f23836d62f61f922 | 8a0908b4f97542b4033e72f84f5bae9b180db25c | /src/main/java/com/operontech/redblocks/playerdependent/Permission.java | 9a1799d4e7e3846bd00f44bea5fae4472a6c7426 | [] | no_license | Techzune/Bukkit-RedBlocks | c0b0d2603bfc7ef20d0149f33915369823ffc737 | d4bb20ad76f2878d013def731f28ddc531f23dfd | refs/heads/master | 2021-01-20T01:28:25.073198 | 2017-04-24T20:23:00 | 2017-04-24T20:23:00 | 89,283,034 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 852 | java | package com.operontech.redblocks.playerdependent;
import org.bukkit.command.CommandSender;
public enum Permission {
USE("use"),
ANIMATIONS("animations"),
RELOAD("reload"),
WORLDEDIT("worldedit"),
DELAY("delay"),
CREATEANDDESTROY("createanddestroy"),
BYPASS_PROTECT("bypass.protect"),
BYPASS_WEMAX("bypass.WEMax"),
BYPASS_MAXBLOCKSPER("bypass.maxBlocksPer"),
BYPASS_MAXREDBLOCKSPER("bypass.maxRedBlocksPer"),
OPTIONS_PROTECT("options.protect"),
OPTIONS_INVERTED("options.inverted"),
OPTIONS_OWNER("options.owner");
private String pString;
private Permission(final String pString) {
this.pString = pString;
}
public String getPermission() {
return "redblocks." + pString.toLowerCase();
}
public boolean check(final CommandSender s) {
return s.isOp() || s.hasPermission(getPermission());
}
}
| [
"techzune@operontech.com"
] | techzune@operontech.com |
9f17be99f0b5f8ccd2c0b4074eee048dfd2fbeed | 9192ca4079977637555847016fb4296715d9cb05 | /src/main/java/com/example/demo/blog/controller/UserController.java | 055c35ebbe075175dc8afd260205135b29068eab | [] | no_license | 614015759/xzy_testDemo | 8fc86d6f9b1c6b98ef39198d1e00aedaef9dd50e | c106274617b9ee92ff999fc7330ca388615868c5 | refs/heads/master | 2022-12-26T15:04:07.843857 | 2020-10-09T00:53:32 | 2020-10-09T00:53:32 | 277,211,193 | 2 | 1 | null | 2020-10-09T00:49:22 | 2020-07-05T01:26:51 | Java | UTF-8 | Java | false | false | 338 | java | package com.example.demo.blog.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author lingzun
* @since 2020-07-02
*/
@RestController
@RequestMapping("/blog/user")
public class UserController {
}
| [
"614015759@qq.com"
] | 614015759@qq.com |
42372122461e60c820b70c94b245c837c44d814e | d5db23a575749de0c88387537e3d05ce0d2ba24d | /android/src/com/insertnamehere/AndroidLauncher.java | 4f85c17e5a789ace54a7830d7ad5fa0dba82cec7 | [] | no_license | dritchie1031/InsertNameHere | 8c0efd4b1962dda7dae8ca1de70f8c4487876414 | fd9056023fdbf20fd925f2f36be3bb8447da3c11 | refs/heads/master | 2020-04-04T09:26:00.689613 | 2019-07-21T23:58:23 | 2019-07-21T23:58:23 | 155,817,773 | 1 | 3 | null | 2019-07-21T23:58:24 | 2018-11-02T05:23:18 | Java | UTF-8 | Java | false | false | 577 | java | package com.insertnamehere;
import android.os.Bundle;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.insertnamehere.INHCore;
public class AndroidLauncher extends AndroidApplication {
@Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
config.useAccelerometer = false;
config.useCompass = false;
initialize(new INHCore(), config);
}
}
| [
"dritchie1031@gmail.com"
] | dritchie1031@gmail.com |
85d1c7226336aee3e82847d4bd7e484251376819 | f766baf255197dd4c1561ae6858a67ad23dcda68 | /app/src/main/java/com/tencent/mm/ui/ar.java | e32cb55386475c71a7f45c2a93c33b0e6d6d2d19 | [] | no_license | jianghan200/wxsrc6.6.7 | d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849 | eb6c56587cfca596f8c7095b0854cbbc78254178 | refs/heads/master | 2020-03-19T23:40:49.532494 | 2018-06-12T06:00:50 | 2018-06-12T06:00:50 | 137,015,278 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,284 | java | package com.tencent.mm.ui;
import android.content.Context;
import android.graphics.Point;
import android.os.Build.VERSION;
import android.view.Display;
import android.view.WindowManager;
import java.lang.reflect.Method;
public final class ar
{
public static Point gu(Context paramContext)
{
Point localPoint = new Point();
paramContext = ((WindowManager)paramContext.getSystemService("window")).getDefaultDisplay();
if (Build.VERSION.SDK_INT >= 17)
{
paramContext.getRealSize(localPoint);
return localPoint;
}
if (Build.VERSION.SDK_INT >= 14) {
try
{
Method localMethod = Display.class.getMethod("getRawHeight", new Class[0]);
localPoint.x = ((Integer)Display.class.getMethod("getRawWidth", new Class[0]).invoke(paramContext, new Object[0])).intValue();
localPoint.y = ((Integer)localMethod.invoke(paramContext, new Object[0])).intValue();
return localPoint;
}
catch (Exception localException) {}
}
paramContext.getSize(localPoint);
return localPoint;
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes3-dex2jar.jar!/com/tencent/mm/ui/ar.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"526687570@qq.com"
] | 526687570@qq.com |
f8f4195ef82eb42614c7d6ce2f46b99612ea4b83 | 4f251effbc77205d87042b2961c42440544d5e9d | /app/src/main/java/com/cryogenius/popularmovies/Bus/Messages/Actions/GetMovieDetailTrailerListAction.java | c933b2f69e364c6d32f0fae6d86e9843035e513f | [] | no_license | Leorisha/PopularMovies | d2850bac37d6b751b0f7ac5a73e7e5b49001e94c | a3ed37a3023660638c9120578aaf46ff68ac80c5 | refs/heads/master | 2021-03-19T17:55:45.492402 | 2017-04-11T08:52:35 | 2017-04-11T08:52:35 | 83,224,033 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 502 | java | package com.cryogenius.popularmovies.Bus.Messages.Actions;
/**
* Created by Ana Neto on 01/03/2017.
*/
public class GetMovieDetailTrailerListAction {
private int selectedIndex;
public GetMovieDetailTrailerListAction(int selectedIndex){
this.selectedIndex = selectedIndex;
}
public int getSelectedIndex() {
return selectedIndex;
}
public void setSelectedIndex(int selectedIndex) {
this.selectedIndex = selectedIndex;
}
}
| [
"ateresa.neto@gmail.com"
] | ateresa.neto@gmail.com |
cc990f5330b91dd7e725f90ab060046f78ba54ec | 0a89f3083de672bb566776ed2592c23b41ebb8ce | /cjjd_ssm/src/main/java/cn/ysu/auth/service/PrivilegeService.java | 2fad979bf2c4e9d7e27bbb59273497fe02c3414f | [] | no_license | 1041787154/cjjd_ssm | dadf4f5b9be57772aa9eb1458c711f3ea0c7ae86 | 1d8eb2a99f1dc00cd65dfca2570f51a69f248359 | refs/heads/master | 2020-03-24T11:41:33.080535 | 2018-07-28T16:24:57 | 2018-07-28T16:24:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 74 | java | package cn.ysu.auth.service;
public interface PrivilegeService {
}
| [
"1041787154@qq.com"
] | 1041787154@qq.com |
de949b21e2147e674788c5b6ceb1aca51501938d | dc0beecadd0404435e6fea1a49f2014f85b4c004 | /test/net/ion/framework/parse/html/HTMLTest.java | 52ad2993f6e6f80c903817cde9cda0cc30aa03dc | [] | no_license | bleujin/ionframework | 6295ef747429b6d80b52c5372f54ad0aff461f43 | bf1c5c5a2d46985a81114a9578adfb5823887350 | refs/heads/master | 2022-11-20T10:53:20.831425 | 2016-10-10T07:14:41 | 2016-10-10T07:14:41 | 1,971,241 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,896 | java | package net.ion.framework.parse.html;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.StringReader;
import java.net.URL;
import java.util.Date;
import java.util.Iterator;
import org.apache.http.impl.cookie.DateUtils;
import junit.framework.TestCase;
import net.htmlparser.jericho.Element;
import net.htmlparser.jericho.Segment;
import net.htmlparser.jericho.Source;
import net.htmlparser.jericho.StartTag;
import net.htmlparser.jericho.Tag;
import net.ion.framework.util.DateUtil;
import net.ion.framework.util.Debug;
import net.ion.framework.util.FileUtil;
import net.ion.framework.util.IOUtil;
public class HTMLTest extends TestCase {
public void testInsensitive() throws Exception {
String str = "<Hello Attr='Tag'>Hello</hello>";
StringReader reader = new StringReader(str);
HTag root = GeneralParser.parseHTML(reader);
assertEquals("hello", root.getTagName());
assertEquals("Tag", root.getAttributeValue("attr"));
}
public void testEmpty() throws Exception {
String str = "";
StringReader reader = new StringReader(str);
HTag root = GeneralParser.parseHTML(reader);
}
private String html = "<!DOCTYPE html>" + "<script atrr='a1'>Bla Bla</script>" + "<html><head><title>TITLE</title></head><body></body></html>";
public void testDocType() throws Exception {
HTag root = GeneralParser.parseHTML(new StringReader(html));
assertEquals("TITLE", root.getChild("head/title").getOnlyText());
}
public void testOnlyText() throws Exception {
HTag root = GeneralParser.parseHTML(new StringReader(html));
assertEquals("TITLE", root.getOnlyText());
assertEquals("TITLE", root.getChild("head").getOnlyText());
assertEquals("TITLE", root.getChild("head/title").getOnlyText());
}
public void testPrefix() throws Exception {
HTag root = GeneralParser.parseHTML(new StringReader(html));
assertEquals(true, root.getPrefixTag().hasChild());
}
public void testContent() throws Exception {
HTag root = GeneralParser.parseHTML(new StringReader(html));
HTag script = root.getPrefixTag().getChildren().get(1);
assertEquals("<script atrr='a1'>Bla Bla</script>", script.getContent());
assertEquals(false, script.hasChild());
assertEquals(0, script.getChildren().size());
}
public void testTagText() throws Exception {
HTag root = GeneralParser.parseHTML(new StringReader(html));
HTag script = root.getPrefixTag().getChildren().get(1);
assertEquals("Bla Bla", script.getTagText());
assertEquals("<head><title>TITLE</title></head><body></body>", root.getTagText());
}
public void testDepth() throws Exception {
HTag root = GeneralParser.parseHTML(new StringReader(html));
assertEquals(0, root.getDepth());
}
public void testGetValue() throws Exception {
String s = "<root abcd='d'><abc><center atr='3'>gacdd</center><br><br><br></abc><pd></pd></root>";
HTag root = HTag.createGeneral(new StringReader(s), "root");
assertEquals("gacdd", root.getValue("abc/center"));
assertEquals("3", root.getValue("abc/center@atr"));
assertEquals("d", root.getValue("@abcd"));
// assertEquals("3", root.getValue("p/center/@a")) ;
}
public void testChild() throws Exception {
String s = "<root><p><center><img src=''/>gacdd</center><br><br><br></p><p></p></root>";
HTag root = GeneralParser.parseHTML(new StringReader(s));
Debug.debug(DateUtils.formatDate(new Date(), "yyyyMMdd") + "/DEFAULT");
for (HTag child : root.getChildren()) {
Element celement = child.getElement();
Debug.debug(child, celement.getDebugInfo(), celement.getEndTag(), celement.getBegin(), celement.getEnd());
}
}
public void xtestBigParse() throws Exception {
try {
HTag root = HTag.createGeneral(new BufferedReader(new FileReader(new File("c:/temp/BookItem2nd.aspx"))), "html");
Debug.line(root.getChild("/html/head"));
} catch (Throwable e) {
e.printStackTrace();
}
}
public void xtestStack() throws Exception {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 900; i++) {
sb.append("<span href=\"" + i + "\">");
sb.append("0123456789ABCDEF ");
sb.append("<span href=\"" + i + ".1\">");
sb.append("first");
sb.append("</span>");
sb.append("<span href=\"" + i + ".2\">");
sb.append("second");
sb.append("</span>");
sb.append("<span href=\"" + i + ".3\"/>");
sb.append("</span>");
}
Source source = new Source(sb);
// Debug.line(source.getMaxDepthIndicator());
//
// int maxDepth=0;
// int depth=0;
// for (Tag tag : source.getAllTags()) {
// if (tag instanceof StartTag) {
// if (!((StartTag) tag).isEmptyElementTag()) {
// depth++;
// if (depth > maxDepth)
// maxDepth++;
// }
// } else {
// depth--;
// }
//
// }
// Debug.line(maxDepth, depth) ;
HTag root = HTag.createGeneral(new StringReader(sb.toString()), "html");
// Debug.line(source.getAllElements().size());
}
}
| [
"bleujin@gmail.com"
] | bleujin@gmail.com |
c1cb6994eec544ed7a09b23f70bf989b81899045 | 1a78482833832b3d302bef2e1c96a2f97ba2751e | /src/main/java/com/kelv1n/ReplaceType.java | 9278c51893d8d38780dd2f38197f39656f5faa2e | [] | no_license | Kelv1nYu/ReadCache | 3799d72867b7e964286f12f644e8c64118e9a936 | 49cb4285445aafe55d207a7975ec02ab58d50392 | refs/heads/master | 2020-05-15T11:46:30.576441 | 2019-04-19T10:07:24 | 2019-04-19T10:07:24 | 182,244,676 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 568 | java | package com.kelv1n;
import java.util.Locale;
public enum ReplaceType {
/**
* First in first out
*/
FIFO,
/**
* Least Recently Used
*/
LRU,
/**
* Least Frequently Used
*/
LFU,
/**
* Random replace
*/
RANDOM,
/**
* LRU + LFU with special weight
*/
LRFU,
/**
* Null model
*/
NULL;
private final String name;
ReplaceType(){
this.name = this.name().toLowerCase(Locale.ROOT);
}
public String getName(){
return name;
}
}
| [
"ykq1312@126.com"
] | ykq1312@126.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.