blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 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 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 131 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 32 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 313 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fadbec33d1da1dfb6ef0dc6d476b7c9a5ed6a922 | 38b42efb3f009b02690a5b7abf7bb2679ebe635c | /app/src/main/java/cn/phoenixsky/interview/BindView.java | 31840f4c0832e801c6cf6813dcab58df10a3b4ca | [] | no_license | phoenixsky/Interview | 3e59ab29bc959d700680ee6f2eed207d8bbe62d0 | 26d3f3265f72fe209afbd243decf1349dad38d18 | refs/heads/master | 2020-09-21T15:11:37.441591 | 2019-12-23T05:21:37 | 2019-12-23T05:21:37 | 224,827,224 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 293 | java | package cn.phoenixsky.interview;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface BindView {
}
| [
"122086517@qq.com"
] | 122086517@qq.com |
1ee5651407976986c32b8351457f132424ced5fe | bd22f491aa2b2a27f48244901dff12271404f7c8 | /src/main/java/com/jjj/products/errors/exceptions/ProductNotFoundException.java | 7e8b71c175118cb4e6fa5d8125a3cbadaa235806 | [] | no_license | JoeyJohnJo/Products-API | 1175de9631c7717990260548e081b457025a9018 | 2a81e7fbe38102741012a911fb4f89f70529e6d1 | refs/heads/master | 2022-11-10T01:53:28.917628 | 2020-07-02T12:49:52 | 2020-07-02T12:49:52 | 276,228,911 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 224 | java | package com.jjj.products.errors.exceptions;
public class ProductNotFoundException extends RuntimeException {
public ProductNotFoundException(Long id) {
super("Produto não encontrado com o id: " + id);
}
}
| [
"gustavorocha.gr2002@gmail.com"
] | gustavorocha.gr2002@gmail.com |
bcce4974ad1ade8d3de5088e0c447652e16cb397 | e349397bed07c832972dba9997594e3566a59970 | /src/com/chatovich/movie/command/GetAllMoviesCommand.java | a737edc22cbd4d2c3857d577bc1ab134aa8f7079 | [] | no_license | chatovich/movierate | e49c4c19141469252246c354ec0c4fa80086cf95 | eaba129e3263b949968c36f437a77b54acc0d2a7 | refs/heads/master | 2020-06-21T13:44:55.767986 | 2017-02-27T12:24:34 | 2017-02-27T12:24:34 | 74,787,210 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,393 | java | package com.chatovich.movie.command;
import com.chatovich.movie.constant.PagePath;
import com.chatovich.movie.constant.Parameters;
import com.chatovich.movie.entity.Movie;
import com.chatovich.movie.exception.ServiceException;
import com.chatovich.movie.service.IMovieService;
import com.chatovich.movie.service.ServiceFactory;
import com.chatovich.movie.service.impl.MovieServiceImpl;
import com.chatovich.movie.util.QueryUtil;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* command that gets all movies from the db
*/
public class GetAllMoviesCommand implements ICommand {
private static final Logger LOGGER = LogManager.getLogger(GetAllMoviesCommand.class);
@Override
public String execute(HttpServletRequest request) {
IMovieService movieServiceImpl = ServiceFactory.getInstance().getMovieService();
List<Movie> movies;
try {
movies = movieServiceImpl.getAllMovies();
request.setAttribute(Parameters.CHOOSE_MOVIE, true);
request.setAttribute(Parameters.MOVIES, movies);
} catch (ServiceException e) {
LOGGER.log(Level.ERROR, e.getMessage());
return PagePath.ERROR_PAGE;
}
return PagePath.USER_PAGE;
}
}
| [
"chatovich@gmail.com"
] | chatovich@gmail.com |
badcfd6559dabc1912953ed6337c6bfcf49fd476 | f5f1eec27fe1bdeb58da42124760479ce82e6dd1 | /uyaki-swagger3/src/main/java/com/uyaki/swagger3/UyakiSwagger3Application.java | d41fe05ea975f7dc383fb3eb809ab489d1cbd944 | [
"MIT"
] | permissive | uyaki/spring-uyaki | d79eef82bd59fac661ede04ece4cdbb06e41b2f8 | 4321a61dcd00bd8ae717fa797404fcdaf2f8330e | refs/heads/master | 2023-02-17T06:42:45.791320 | 2021-01-08T18:10:50 | 2021-01-08T18:10:50 | 273,118,977 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 587 | java | package com.uyaki.swagger3;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import springfox.documentation.oas.annotations.EnableOpenApi;
/**
* The type Uyaki swagger 3 application.
*
* @date 2020 /07/17
*/
@EnableOpenApi
@SpringBootApplication
public class UyakiSwagger3Application {
/**
* The entry point of application.
*
* @param args the input arguments
*/
public static void main(String[] args) {
SpringApplication.run(UyakiSwagger3Application.class, args);
}
}
| [
"737376326@qq.com"
] | 737376326@qq.com |
23a92c84dde6cc8000a91dfcd7b1bc06047286ce | b99ed31c84cef930ccc32f7dce286ddabbfe335b | /FileUtil.java | 5a4ccdc1dfaec37bcb71740659c102a672fbdd32 | [] | no_license | YMYZEROYMY/lexical-analyzer | 8854317855b439041fe911f34af05e2214bc5cb8 | d2ba7b8f4b19eea982d64a3c5bb912ca382dd126 | refs/heads/master | 2020-05-20T12:30:56.277693 | 2019-05-08T11:25:17 | 2019-05-08T11:25:17 | 185,573,594 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,700 | java | package 编译原理实验课.实验1.version1;
import java.io.*;
/**
* 文件操作
*
* @author ymy
*/
public class FileUtil {
private static final String outputPath = "E:\\Java程序\\BookTest\\src\\编译原理实验课\\实验1\\version1\\output.dyd";
private static final String errorPath = "E:\\Java程序\\BookTest\\src\\编译原理实验课\\实验1\\version1\\error.err";
private FileReader fileReader;
private BufferedReader bufferedReader;
public FileUtil(String filePath) throws FileNotFoundException {
fileReader = new FileReader(filePath);
bufferedReader = new BufferedReader(fileReader);
clearFile();
}
/**
* 文件读取到缓冲区
*
* @param buffer 缓冲区
* false : filed
*/
public boolean readFile(StringBuffer buffer) {
try {
String temp;
if ((temp = bufferedReader.readLine()) != null) {
buffer.append(temp);
return true;
}
} catch (IOException e) {
e.printStackTrace();
}
return false;
}
private static void singleWriteFile(String str,String filePath){
try {
File file = new File(filePath);
FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(str);
bw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* 追加方式写文件
*
* @param args 需要写入字符串
* false : filed
*/
public static void writeFile(String args,int choose) {
if(choose==1){
singleWriteFile(args,outputPath);
}else if(choose==2){
singleWriteFile(args,errorPath);
}
}
/**
* 清空文件
*/
public static void clearFile() {
singleClearFile(outputPath);
singleClearFile(errorPath);
}
private static void singleClearFile(String filePath){
try {
File file = new File(filePath);
if (!file.exists()) {
if(!file.createNewFile()){
System.out.println("创建文件失败");
System.exit(0);
}
}
FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
bw.write("");
bw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"1442420334@qq.com"
] | 1442420334@qq.com |
e7b7d0e05acfe8f4341f8f81ea7538ccff3774b0 | 6273601dafb7784d8397987279028ce55308c600 | /02_PruebasPOO/src/com/sinensia/poo_avanzado/Tucan.java | 9ef22a969f81776160c6d4fbf54236c87a44545d | [] | no_license | dfernandezr2020/curso_java_spring | d35bbd77312d9214282c5276aaf132f01dbfc72e | 7be10e49edb2daa268cd4fd4ad0684048a7d1ce0 | refs/heads/master | 2020-05-20T04:47:46.407795 | 2019-05-14T08:25:22 | 2019-05-14T08:25:22 | 185,391,312 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 476 | java | package com.sinensia.poo_avanzado;
public class Tucan extends AnimalSalvaje {
public Tucan(String nombre, float tamanho) {
super(2, true, false, nombre, tamanho);
}
@Override
public void mover() {
System.out.println(nombre + " Valoando voy!");
}
@Override
public void comer() {
System.out.println(nombre + " Come alpiste..");
}
public void volar() {
System.out.println(nombre + " Si vuela");
}
}
| [
"rpires7@hotmail.com"
] | rpires7@hotmail.com |
90074123090bdd4940d081ea49eded05ec5c9a84 | 558cbbd837c2a68d60f8a73c73296ac16ccb19e6 | /src/MainClass.java | d28194bd8646022aa771ea6bed557ac300316ebc | [] | no_license | STIW3064-A191/TeamA2 | b014973370e995d02694b4d21be47927f873f431 | fc8845db13b67a998bcae87171bcfc155176dfc3 | refs/heads/master | 2020-09-25T12:30:58.707482 | 2019-12-14T05:48:20 | 2019-12-14T05:48:20 | 226,002,647 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,776 | java |
import java.util.Scanner;
public class MainClass {
static int UserInput;
public static void main(String[] args) {
System.out.print("Enter the number: ");
Scanner s = new Scanner(System.in);
UserInput = s.nextInt();
boolean FinalResult = IsPalindrome(UserInput);
if (FinalResult == true) {
System.out.println(UserInput + " Is a Palindrome.");
} else if (FinalResult == false) {
System.out.println(UserInput + " Is NOT a Palindrome.");
}
}
//Function for reversing string entries.
static String ReverseString(String value) {
byte[] strAsByteArray = value.getBytes();
byte[] result = new byte[strAsByteArray.length];
// Store result in reverse order into the
// result byte[]
for (int i = 0; i < strAsByteArray.length; i++) {
result[i] = strAsByteArray[strAsByteArray.length - i - 1];
}
return new String(result);
}
//Function for converting a numeric value to String.
static String IntToString(int value) {
return String.valueOf(value);
}
//Function for converting a String value to a number.
static int StringToInt(String value) {
return Integer.parseInt(value);
}
//Function for checking if the number is palindromic.
static boolean IsPalindrome(float value) {
String IntString = IntToString(UserInput);
String ReversedValue = ReverseString(IntString);
return ReversedValue.equals(IntToString(UserInput));
}
}
| [
"noreply@github.com"
] | STIW3064-A191.noreply@github.com |
78a4c87b1050d2bf71432b8bbb5d34222e34b858 | 8e7b42b8de3c3de29850ee8f060851881b5134ec | /fast-family-security/src/main/java/com/fast/family/security/mobile/SmsCodeAuthenticationConfigurer.java | 9ab2caf5dbb43aa50aa3759f6143142625010982 | [
"Apache-2.0"
] | permissive | houshengtao/fast-family-master | afb7fc0a41cd93f395a46df2f9cb259c7bca2de5 | cc0c703e91b59c8f7f2785545e224a9ad5bcd476 | refs/heads/master | 2020-03-31T16:39:23.199132 | 2018-10-08T11:29:34 | 2018-10-08T11:29:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,565 | java | package com.fast.family.security.mobile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.web.DefaultSecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.stereotype.Component;
/**
* @author 张顺
* @version 1.0
* @created 2018/9/27-21:22
*/
@Component
public class SmsCodeAuthenticationConfigurer extends SecurityConfigurerAdapter<DefaultSecurityFilterChain,HttpSecurity>{
@Autowired
private UserDetailsService userDetailsService;
@Override
public void configure(HttpSecurity builder) throws Exception {
SmsCodeAuthenticationFilter smsCodeAuthenticationFilter = new SmsCodeAuthenticationFilter();
smsCodeAuthenticationFilter.setAuthenticationManager(builder.getSharedObject(AuthenticationManager.class));
SmsCodeAuthenticationProvider smsCodeAuthenticationProvider = new SmsCodeAuthenticationProvider();
smsCodeAuthenticationProvider.setUserDetailsService(userDetailsService);
builder.authenticationProvider(smsCodeAuthenticationProvider)
.addFilterAfter(smsCodeAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
}
}
| [
"616394599@qq.com"
] | 616394599@qq.com |
5bf7990674f318dd6bb6b47b6d8dd4bc5e825333 | b523acde9b0bfe039cb1e1dbe8afcba6e0928c84 | /nmp-web/src/main/java/com/hdvon/nmp/client/TestRetryer.java | 29494e8e5ca0c1b3d420631a138d8a9913b2dc18 | [] | no_license | haohao360/video_cloud | 906bbb7e0be404b68b79271d1b1727076384690a | d4703caccdd37d90dca4e8566e414a5ce4ff50b0 | refs/heads/master | 2023-09-05T11:56:21.331221 | 2018-11-29T13:56:39 | 2018-11-29T13:56:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,673 | java | package com.hdvon.nmp.client;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.github.rholder.retry.Retryer;
import com.github.rholder.retry.RetryerBuilder;
import com.github.rholder.retry.StopStrategies;
import com.github.rholder.retry.WaitStrategies;
import com.hdvon.nmp.vo.sip.InviteOptionVo;
public class TestRetryer {
private static SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss,SSS");
private static String matrixIp = "192.168.2.65";
private static Integer matrixPort = 8888;
public static void main(String[] args) {
Retryer<Boolean> retryer = RetryerBuilder.<Boolean>newBuilder()
.retryIfExceptionOfType(IOException.class)
.withWaitStrategy(WaitStrategies.fixedWait(10,TimeUnit.SECONDS))
.withStopStrategy(StopStrategies.stopAfterAttempt(5))
.build();
System.out.println("begin..." + df.format(new Date()));
try {
retryer.call(buildTask());
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("end..." + df.format(new Date()));
}
private static Callable<Boolean> buildTask() {
return new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
InviteOptionVo vo = new InviteOptionVo();
vo.setChannelId("34020000001310000001");
vo.setDeviceCode("340200000013300000001");
boolean b = new WallVedioRpcClient(matrixIp, matrixPort).upOrPollingWallVedio(vo);
if(!b) {
System.out.println("IO异常........");
throw new IOException();
}else {
throw new NullPointerException();
}
}
};
}
}
| [
"everhow1314@hotmail.com"
] | everhow1314@hotmail.com |
cc21a4a481344348a54ec93d24ce9d0cd2bef94e | 083d72ab12898894f0efa87b73ad4b59d46fdda3 | /trunk/source/InvariantSynthesis/src/de/uni_freiburg/informatik/ultimate/plugins/generator/invariantsynthesis/preferences/InvariantSynthesisPreferenceInitializer.java | 0f3a0b322b0eaf131dd03eda889201417b36908a | [] | no_license | utopia-group/SmartPulseTool | 19db821090c3a2d19bad6de690b5153bd55e8a92 | 92c920429d6946ff754c3d307943bcaeceba9a40 | refs/heads/master | 2023-06-09T04:10:52.900609 | 2021-06-06T18:30:15 | 2021-06-06T18:30:15 | 276,487,368 | 8 | 6 | null | null | null | null | UTF-8 | Java | false | false | 6,194 | java | /*
* Copyright (C) 2013-2015 Daniel Dietsch (dietsch@informatik.uni-freiburg.de)
* Copyright (C) 2012-2015 Matthias Heizmann (heizmann@informatik.uni-freiburg.de)
* Copyright (C) 2015 University of Freiburg
*
* This file is part of the ULTIMATE InvariantSynthesis plug-in.
*
* The ULTIMATE InvariantSynthesis plug-in is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The ULTIMATE InvariantSynthesis plug-in is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the ULTIMATE InvariantSynthesis plug-in. If not, see <http://www.gnu.org/licenses/>.
*
* Additional permission under GNU GPL version 3 section 7:
* If you modify the ULTIMATE InvariantSynthesis plug-in, or any covered work, by linking
* or combining it with Eclipse RCP (or a modified version of Eclipse RCP),
* containing parts covered by the terms of the Eclipse Public License, the
* licensors of the ULTIMATE InvariantSynthesis plug-in grant you additional permission
* to convey the resulting work.
*/
package de.uni_freiburg.informatik.ultimate.plugins.generator.invariantsynthesis.preferences;
import de.uni_freiburg.informatik.ultimate.core.lib.preferences.UltimatePreferenceInitializer;
import de.uni_freiburg.informatik.ultimate.core.model.preferences.BaseUltimatePreferenceItem.PreferenceType;
import de.uni_freiburg.informatik.ultimate.core.model.preferences.UltimatePreferenceItem;
import de.uni_freiburg.informatik.ultimate.plugins.generator.invariantsynthesis.Activator;
import de.uni_freiburg.informatik.ultimate.plugins.generator.traceabstraction.pathinvariants.internal.KindOfInvariant;
/**
* @author Matthias Heizmann (heizmann@informatik.uni-freiburg.de)
*/
public class InvariantSynthesisPreferenceInitializer extends UltimatePreferenceInitializer {
public enum IncreasingStrategy {
Conservative,
Medium,
IncrOnlyConjunctsAfterMaxDisjuncts,
Aggressive,
ExponentialConjuncts,
ConjunctsPriorized
}
/*
* labels for the different preferencess
*/
public static final String LABEL_KIND_INVARIANT = "Kind of invariant";
public static final String LABEL_UNSAT_CORES = "Use unsat cores";
public static final String LABEL_INITIAL_DISJUNCTS = "Initial disjuncts";
public static final String LABEL_INITIAL_CONJUNCTS = "Initial conjuncts";
public static final String LABEL_STEP_DISJUNCTS = "Step to increase disjuncts";
public static final String LABEL_STEP_CONJUNCTS = "Step to increase conjuncts";
public static final String LABEL_NONLINEAR_CONSTRAINTS =
"Nonlinear constraints";
public static final String LABEL_EXTERNAL_SMT_SOLVER = "Use external solver (z3)";
public static final String LABEL_SOLVER_TIMEOUT = "Solver timeout (sec)";
public static final String LABEL_LARGE_BLOCK_ENCODING = "Large-Block-Encoding";
public static final String LABEL_INCR_STRATEGY = "Increasing strategy";
public static final String LABEL_DANGER_INVARIANT_GUESSING = "Guess danger invariant";
public static final String LABEL_USE_ABSTRACT_INTERPRETATION = "Use abstract interpretation";
/*
* default values for the different preferences
*/
public static final KindOfInvariant DEF_KIND_INVARIANT = KindOfInvariant.SAFETY;
public static final boolean DEF_UNSAT_CORES = true;
public static final boolean DEF_NONLINEAR_CONSTRAINTS = false;
public static final boolean DEF_LARGE_BLOCK_ENCODING = true;
public static final int DEF_INITIAL_DISJUNCTS = 1;
public static final int DEF_INITIAL_CONJUNCTS = 1;
public static final int DEF_STEP_DISJUNCTS = 1;
public static final int DEF_STEP_CONJUNCTS = 1;
public static final boolean DEF_EXTERNAL_SMT_SOLVER = true;
public static final int DEF_SOLVER_TIMEOUT = 15; // in seconds
public static final IncreasingStrategy DEF_INCR_STRATEGY = IncreasingStrategy.Conservative;
public static final boolean DEF_DANGER_INVARIANT_GUESSING = false;
public static final boolean DEF_USE_ABSTRACT_INTERPRETATION = false;
/**
* Constructor.
*/
public InvariantSynthesisPreferenceInitializer() {
super(Activator.PLUGIN_ID, "Invariant Synthesis");
}
@Override
protected UltimatePreferenceItem<?>[] initDefaultPreferences() {
return new UltimatePreferenceItem<?>[] {
new UltimatePreferenceItem<>(LABEL_KIND_INVARIANT, DEF_KIND_INVARIANT, PreferenceType.Combo, KindOfInvariant.values()),
new UltimatePreferenceItem<>(LABEL_UNSAT_CORES, DEF_UNSAT_CORES, PreferenceType.Boolean),
new UltimatePreferenceItem<>(LABEL_NONLINEAR_CONSTRAINTS, DEF_NONLINEAR_CONSTRAINTS, PreferenceType.Boolean),
new UltimatePreferenceItem<>(LABEL_LARGE_BLOCK_ENCODING, DEF_LARGE_BLOCK_ENCODING, PreferenceType.Boolean),
new UltimatePreferenceItem<>(LABEL_INITIAL_DISJUNCTS, DEF_INITIAL_DISJUNCTS, PreferenceType.Integer),
new UltimatePreferenceItem<>(LABEL_STEP_DISJUNCTS, DEF_STEP_DISJUNCTS, PreferenceType.Integer),
new UltimatePreferenceItem<>(LABEL_INITIAL_CONJUNCTS, DEF_INITIAL_CONJUNCTS, PreferenceType.Integer),
new UltimatePreferenceItem<>(LABEL_STEP_CONJUNCTS, DEF_STEP_CONJUNCTS, PreferenceType.Integer),
new UltimatePreferenceItem<>(LABEL_INCR_STRATEGY, DEF_INCR_STRATEGY, PreferenceType.Combo, IncreasingStrategy.values()),
new UltimatePreferenceItem<>(LABEL_EXTERNAL_SMT_SOLVER, DEF_EXTERNAL_SMT_SOLVER, PreferenceType.Boolean),
new UltimatePreferenceItem<>(LABEL_SOLVER_TIMEOUT, DEF_SOLVER_TIMEOUT, PreferenceType.Integer),
new UltimatePreferenceItem<>(LABEL_DANGER_INVARIANT_GUESSING, DEF_DANGER_INVARIANT_GUESSING, PreferenceType.Boolean),
new UltimatePreferenceItem<>(LABEL_USE_ABSTRACT_INTERPRETATION, DEF_USE_ABSTRACT_INTERPRETATION, PreferenceType.Boolean),
};
};
}
| [
"jon@users-MacBook-Pro.local"
] | jon@users-MacBook-Pro.local |
b939167c5ecdcc9c90ad52da04b10cad741b8d5b | 41db5ae1c28fb2c0cac322db4b91620fbcc9c996 | /src/main/java/com/example/springboot_poi/SpringbootPoiApplication.java | da7c002baa5c1b98e578ff1e1c95eb564299d09d | [] | no_license | charlie-ch/springboot_poi | ef2dde31626cc7111f76ab10191966bda3dfe906 | 515ac40e1f46338da4ad6104e1f509f7c2913f12 | refs/heads/master | 2020-03-16T19:18:24.463585 | 2018-05-10T14:35:13 | 2018-05-10T14:35:13 | 132,909,659 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 344 | java | package com.example.springboot_poi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringbootPoiApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootPoiApplication.class, args);
}
}
| [
"434534658@qq.com"
] | 434534658@qq.com |
e0c7b63e7230f0b90f4fa8610c399d0e03d35131 | d8e70dced8155eaca2ebdb0c5447dfa7624c7c14 | /springBoot-covidApp/src/main/java/com/example/covidApp/repository/DonorRepository.java | 69df0180b076b43da9e0e67d5617a52188e62597 | [] | no_license | Jayanta98/SpringBoot-CovidTrackingSystem | cdd074ac72884ba800c15d615f0632d801140af1 | 2933a8ef984e351ea3c2cfa4b3729cca38d45c28 | refs/heads/main | 2023-05-28T13:43:43.345010 | 2021-06-13T07:25:22 | 2021-06-13T07:25:22 | 376,469,236 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 224 | java | package com.example.covidApp.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import com.example.covidApp.entity.Donor;
public interface DonorRepository extends JpaRepository<Donor, Integer> {
}
| [
"jg.16u10555@btech.nitdgp.ac.in"
] | jg.16u10555@btech.nitdgp.ac.in |
83ff2344c4c47498e30722179c7a94f521a2a23e | 5c9aa80659ce753cb819c71e269fe1b99bb50550 | /src/main/java/org/thema/graphab/pointset/PointsetLayer.java | 466f46a59dafddb47ec8ca2f973ab1c9e6c27045 | [] | no_license | SoftwareImpacts/SIMPAC-2021-11 | c4eb927872883af27c6f1a4332f9724e8ba851de | bf16dd74e0edac2f6d74d51f78efa6f69c6807ba | refs/heads/master | 2023-03-05T23:44:51.219097 | 2021-01-27T07:39:32 | 2021-01-27T07:39:32 | 336,268,697 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,266 | java | /*
* Copyright (C) 2014 Laboratoire ThéMA - UMR 6049 - CNRS / Université de Franche-Comté
* http://thema.univ-fcomte.fr
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.thema.graphab.pointset;
import au.com.bytecode.opencsv.CSVWriter;
import java.awt.event.ActionEvent;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.AbstractAction;
import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;
import org.geotools.feature.SchemaException;
import org.thema.common.Util;
import org.thema.data.feature.DefaultFeature;
import org.thema.data.feature.Feature;
import org.thema.drawshape.layer.FeatureLayer;
import org.thema.graphab.Project;
import org.thema.graphab.graph.GraphGenerator;
/**
* A layer representing a pointset.
*
* @author Gilles Vuidel
*/
public class PointsetLayer extends FeatureLayer {
private final Pointset pointset;
private final Project project;
/**
* Creates a new PointsetLayer
* @param pointset the pointset
* @param project the project containing this pointset
*/
public PointsetLayer(Pointset pointset, Project project) {
super(pointset.getName(), pointset.getFeatures(), null, project.getCRS());
this.project = project;
this.pointset = pointset;
}
@Override
public JPopupMenu getContextMenu() {
JPopupMenu menu = super.getContextMenu();
menu.add(new AbstractAction(java.util.ResourceBundle.getBundle("org/thema/graphab/Bundle").getString("Export_all")) {
@Override
public void actionPerformed(ActionEvent e) {
GraphGenerator gen = (GraphGenerator) JOptionPane.showInputDialog(null, java.util.ResourceBundle.getBundle("org/thema/graphab/Bundle").getString("Select_graph"), java.util.ResourceBundle.getBundle("org/thema/graphab/Bundle").getString("Export..."), JOptionPane.PLAIN_MESSAGE, null, project.getGraphs().toArray(), null);
if (gen == null) {
return;
}
File f = Util.getFileSave(".csv");
if (f == null) {
return;
}
try (final CSVWriter w = new CSVWriter(new FileWriter(f))) {
List<DefaultFeature> exoData = pointset.getFeatures();
List<String> attrNames = new ArrayList<>(exoData.get(0).getAttributeNames());
attrNames.addAll(project.getPatches().iterator().next().getAttributeNames());
attrNames.addAll(gen.getComponentFeatures().get(0).getAttributeNames());
attrNames.add(0, "id");
w.writeNext(attrNames.toArray(new String[attrNames.size()]));
String[] attrs = new String[attrNames.size()];
for (Feature exo : exoData) {
int n = exo.getAttributeNames().size()+1;
attrs[0] = exo.getId().toString();
for (int i = 1; i < n; i++) {
attrs[i] = exo.getAttribute(i-1) != null ? exo.getAttribute(i-1).toString() : null;
}
Feature patch = project.getPatch((Integer) exo.getAttribute(Project.EXO_IDPATCH));
for (int i = 0; i < patch.getAttributeNames().size(); i++) {
attrs[i + n] = patch.getAttribute(i).toString();
}
n += patch.getAttributeNames().size();
Feature comp = gen.getComponentFeature(patch);
for (int i = 0; i < comp.getAttributeNames().size(); i++) {
attrs[i + n] = comp.getAttribute(i).toString();
}
w.writeNext(attrs);
}
} catch (IOException ex) {
Logger.getLogger(Project.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
menu.add(new AbstractAction(java.util.ResourceBundle.getBundle("org/thema/graphab/Bundle").getString("DISTANCE MATRIX")) {
@Override
public void actionPerformed(ActionEvent e) {
new PointsetDistanceDialog(null, project, pointset).setVisible(true);
}
});
menu.add(new AbstractAction(java.util.ResourceBundle.getBundle("org/thema/graphab/Bundle").getString("Remove...")) {
@Override
public void actionPerformed(ActionEvent e) {
int res = JOptionPane.showConfirmDialog(null, java.util.ResourceBundle.getBundle("org/thema/graphab/Bundle").getString("Do_you_want_to_remove_the_dataset_") + getName() + " ?");
if (res != JOptionPane.YES_OPTION) {
return;
}
try {
project.removePointset(pointset.getName());
project.getPointsetLayers().removeLayer(PointsetLayer.this);
} catch (IOException | SchemaException ex) {
Logger.getLogger(Project.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
menu.add(new AbstractAction(java.util.ResourceBundle.getBundle("org/thema/graphab/Bundle").getString("Properties...")) {
@Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null, pointset.getInfo());
}
});
return menu;
}
}
| [
"none@none"
] | none@none |
06a52dcd03d34309be12363f990d169e3eb742f1 | cc528ea3ad451e48be64f380015242b4591d50cc | /MovieInterface.java | 3faca5656b489f36f95ebe86adac5c158b8b7b0a | [] | no_license | x12hengyu/CS400GroupProject1 | f1890bca1f84d15987bdbdfc9c487b97d60e215e | de6953f1b1cdb3385f573982443c8b7f03552a2f | refs/heads/main | 2023-03-16T07:09:18.880917 | 2021-03-03T02:25:06 | 2021-03-03T02:25:06 | 343,356,457 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 347 | java | import java.util.List;
public interface MovieInterface extends Comparable<Movie> {
public String getTitle();
public Integer getYear();
public List<String> getGenres();
public String getDirector();
public String getDescription();
public Float getAvgVote();
// from super interface Comparable
public int compareTo(Movie otherMovie);
}
| [
"noreply@github.com"
] | x12hengyu.noreply@github.com |
1f0439fd795639ff6dbaef35738af070fcd61158 | d6092bd0cc8d0fe968b122aebc17e251b89b66e0 | /app/src/main/java/de/habibhaidari/foodcart/callback/model/DestroyCallback.java | ea9bbdf7312841244372a2c8b12ed6cd030d9ec6 | [] | no_license | eiwuert/foodcart-admin | 8611ffaae0474915243ef200b82bd391243c4741 | 3b84f64d812d45ade0f4fd55fe07de6bc054fef3 | refs/heads/master | 2023-03-01T02:30:48.488325 | 2021-02-05T17:57:29 | 2021-02-05T17:57:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 148 | java | package de.habibhaidari.foodcart.callback.model;
public interface DestroyCallback {
void onDestroyed(Boolean destroyed, String identifier);
}
| [
"habibhaidari@outlook.com"
] | habibhaidari@outlook.com |
bc6b3d7c9b5dbf1c21432cebf00a143e1211c2da | 240a0a8d295a8c3cf1c04eceedae03d1d47f95f4 | /r-dubbo-rpc/src/main/java/com/renxy/rdubbo/rpc/ExporterListener.java | e9d0163ec5ee6adf16ce65e38872923dea0fa812 | [] | no_license | redmaple1/r-dubbo | 95e2736b35e60c2c6a51cc04309eed854662b4f5 | 94a8997aed4e400141de7e9cf10e73b5a60c0e2c | refs/heads/master | 2022-11-17T22:31:15.756869 | 2020-07-15T11:02:08 | 2020-07-15T11:02:08 | 279,843,555 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 465 | java | package com.renxy.rdubbo.rpc;
/**
* Exporter listener
*
* @author renxiaoya
* @date 2020-07-13
**/
public interface ExporterListener {
/**
* when exporter exported
*
* @param exporter exporter
* @throws RpcException Rpc exception
*/
void exported(Exporter<?> exporter) throws RpcException;
/**
* when exporter un exported
*
* @param exporter exporter
*/
void unExported(Exporter<?> exporter);
}
| [
"renxiaoya168@163.com"
] | renxiaoya168@163.com |
fe10ad48403e5a23967c7a8706e790a1d9489179 | f2d0fd6374cb74f85bd85caa3b401fff815c3110 | /app/src/main/java/com/example/bios/crypton/navfragments/WalletFragment.java | 44d8e0d5f4bc1a92824492744b456514be37da65 | [] | no_license | bios1337/Crypton | eaeaaf9d2a68683aa402f16125789dc99d54919a | 794471bb010442c106d431f4a290b4cbddf67ece | refs/heads/master | 2021-04-18T03:33:14.938055 | 2020-03-23T17:43:24 | 2020-03-23T17:43:24 | 249,492,581 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,483 | java | package com.example.bios.crypton.navfragments;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import com.example.bios.crypton.BottomNavigationActivity;
import com.example.bios.crypton.CoinDetailActivity;
import com.example.bios.crypton.R;
import com.example.bios.crypton.adapters.CryptocurrencyAdapter;
import com.example.bios.crypton.pojos.Currency;
import com.example.bios.crypton.pojos.UserFavorite;
import com.example.bios.crypton.viewmodels.BottomNavigationViewModel;
import com.example.bios.crypton.viewpager.BottomNavigationViewPager;
import com.google.firebase.auth.FirebaseAuth;
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 java.util.ArrayList;
import java.util.List;
public class WalletFragment extends Fragment implements CryptocurrencyAdapter.CryptocurrencyAdapterClickHandler {
private static final String SAVED_LAYOUT_MANAGER = "layout_manager";
private static final String WALLET_REFERENCE = "wallet";
private static final String USER_REFERENCE = "users";
private static final int NUM_COLOMNS = 2;
private static Bundle mBundleRecyclerViewState;
RecyclerView mRecyclerView;
CryptocurrencyAdapter mAdapter;
RecyclerView.LayoutManager mLayoutManager;
private ProgressBar progressBar;
private List<Currency> favCurrencies;
private FirebaseAuth auth;
private DatabaseReference mDatabase;
private List<Currency> allCurrencies;
private BottomNavigationViewPager viewPager;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_wallet, container, false);
mRecyclerView = view.findViewById(R.id.wallet_recycler_view);
auth = FirebaseAuth.getInstance();
mDatabase = FirebaseDatabase.getInstance().getReference(USER_REFERENCE);
if (getActivity() instanceof BottomNavigationActivity) {
progressBar = ((BottomNavigationActivity) getActivity()).getProgressBar();
viewPager = ((BottomNavigationActivity) getActivity()).getViewPager();
}
BottomNavigationViewModel model = ViewModelProviders.of(getActivity()).get(BottomNavigationViewModel.class);
model.getCurrencies().observe(this, new Observer<List<Currency>>() {
@Override
public void onChanged(@Nullable List<Currency> currencies) {
allCurrencies = currencies;
progressBar.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE);
if (isPortrait())
mLayoutManager = new LinearLayoutManager(view.getContext(), LinearLayoutManager.VERTICAL, false);
else
mLayoutManager = new GridLayoutManager(view.getContext(), NUM_COLOMNS);
mAdapter = new CryptocurrencyAdapter(loadWalletCurrencies(), WalletFragment.this);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setLayoutManager(mLayoutManager);
mRecyclerView.setHasFixedSize(true);
}
});
return view;
}
private List<Currency> loadWalletCurrencies() {
final List<Currency> walletCurrencies = new ArrayList<>();
mDatabase.child(auth.getUid()).child(WALLET_REFERENCE).addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
walletCurrencies.clear();
UserFavorite userFav = dataSnapshot.getValue(UserFavorite.class);
if (userFav != null) {
List<Currency> favCurrencies = userFav.getFavCoins();
for (Currency s : favCurrencies) {
for (Currency curr : allCurrencies) {
if (curr.getId().equals(s.getId())) {
walletCurrencies.add(curr);
}
}
}
setFavCurrencies(walletCurrencies);
mAdapter.notifyDataSetChanged();
if (mBundleRecyclerViewState != null && mLayoutManager != null) {
Parcelable listState = mBundleRecyclerViewState.getParcelable(SAVED_LAYOUT_MANAGER);
mLayoutManager.onRestoreInstanceState(listState);
}
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
return walletCurrencies;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
}
@Override
public void onCryptoClick(int position) {
Intent intent = new Intent(getActivity(), CoinDetailActivity.class);
intent.putExtra(Currency.class.getSimpleName(), favCurrencies.get(position));
startActivity(intent);
}
@Override
public void onPause() {
super.onPause();
mBundleRecyclerViewState = new Bundle();
mBundleRecyclerViewState.putParcelable(SAVED_LAYOUT_MANAGER, mRecyclerView.getLayoutManager().onSaveInstanceState());
}
public void setFavCurrencies(List<Currency> favCurrencies) {
this.favCurrencies = favCurrencies;
}
public boolean isPortrait() {
return getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT;
}
public CryptocurrencyAdapter getmAdapter() {
return mAdapter;
}
}
| [
"10359444+bios1337@users.noreply.github.com"
] | 10359444+bios1337@users.noreply.github.com |
c9555146fab0093b9cda368f5b1959f9f1661544 | eaeae43c5749fb232d0027519e4d4ed11ffeba85 | /src/main/java/com/first/vertx/EventBus/PointToPoint.java | 1bac30ca7e33f8a33d759a78e4e6f85205b29d73 | [] | no_license | Prabhu4452/vertx-core-examples | 9a4aa65f7981eba2fb9c38c5793df8a35ed4a56b | 51483c26c8d6ca9fea64b66bb269b65a040f4eb6 | refs/heads/master | 2023-07-08T10:53:09.941109 | 2021-08-26T07:08:10 | 2021-08-26T07:08:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,535 | java | package com.first.vertx.EventBus;
import com.first.vertx.eventloops.EventLoopExample;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import org.apache.log4j.BasicConfigurator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PointToPoint {
private static final Logger log = LoggerFactory.getLogger(EventLoopExample.class);
public static void main(String[] args) {
BasicConfigurator.configure();
Vertx vertx = Vertx.vertx();
vertx.deployVerticle(new Sender());
vertx.deployVerticle(new Receiver());
}
static class Sender extends AbstractVerticle {
@Override
public void start(Promise<Void> startPromise) throws Exception {
startPromise.complete();
vertx.setPeriodic(1000, id -> { //Periodic prop sends message every one sec.
String message = "Hello Prabs, It's message from Prabhu...";
log.debug("Sending message: {}", message);
vertx.eventBus().send(Sender.class.getName(), message); //First param is address of sender and second param is message to be sent
});
}
}
static class Receiver extends AbstractVerticle {
@Override
public void start(Promise<Void> startPromise) throws Exception {
startPromise.complete();
vertx.eventBus().<String>consumer(Sender.class.getName(), message -> {
log.debug("Received from sender: {}", message.body());
message.reply("Thank you Prabhu, I have received your message");
});
}
}
}
| [
"prabhu@artpark.in"
] | prabhu@artpark.in |
342e97ff304808fd8d1b5822ad0d9a118edd6d6a | d1e27692c858fbd3a2433fd6e8ed15f86050a642 | /Renowalk_Backup_09292016/HomeDepot_Renowalk/src-botched/com/qc/IKPIFactory.java | cb521a8abbaa6a2194e32407212a0c2920180108 | [] | no_license | saikrishna89/IndeedProject | 7d734aebd18713e48f2db7460503a7892d1b19a1 | e68d284e5f0294af42c3247905e98909269018de | refs/heads/master | 2021-01-23T03:34:35.490743 | 2017-12-21T06:07:07 | 2017-12-21T06:07:07 | 86,095,699 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 226 | java | package com.qc ;
import com4j.*;
/**
* For HP use. Represents a KPI Factory.
*/
@IID("{5EC0A34E-A6CB-477A-8789-E10C4469795C}")
public interface IKPIFactory extends com.qc.IBaseFactoryEx {
// Methods:
// Properties:
}
| [
"abhi.madhireddy@gmail.com"
] | abhi.madhireddy@gmail.com |
76a347dcde5b2ffdd2721fae3bde87dfc35fe1c7 | a6c14716a0233e6ec25ef18244a4986989043722 | /SpringBootTddApplication/src/main/java/com/demo/tdd/gg/model/Car.java | 56db10362a48065d3549b2421f27f83f9dfbc4d0 | [] | no_license | pacegiffgaff/Sandeep_Prakash_Code_Repo | 2ac71aee53dca9b10f85c213a8d8f482ffa5ae5d | ca643004dee59d5568cd46be711fd97269567c3f | refs/heads/master | 2022-12-23T22:18:22.482167 | 2020-05-19T14:45:23 | 2020-05-19T14:45:23 | 241,822,402 | 0 | 0 | null | 2022-12-16T01:54:01 | 2020-02-20T07:39:50 | Java | UTF-8 | Java | false | false | 1,021 | java | package com.demo.tdd.gg.model;
import javax.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "cars")
public class Car {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
@Column(name = "name")
private String name;
@Column(name = "type")
private String type;
public Car() {
}
public Car(String name, String type) {
this.name = name;
this.type = type;
}
public String getName() {
return name;
}
public String getType() {
return type;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Car car = (Car) o;
return Objects.equals(id, car.id) &&
Objects.equals(name, car.name) &&
Objects.equals(type, car.type);
}
@Override
public int hashCode() {
return Objects.hash(id, name, type);
}
}
| [
"Prakash.badisa@nttdata.com"
] | Prakash.badisa@nttdata.com |
80fb4831b4f4c2f94b2c1cef70d9163cdaf0fdb5 | 69ee0508bf15821ea7ad5139977a237d29774101 | /cmis-core/src/main/java/vmware/vim25/ProfileExecuteError.java | 610c9539cca817b6617de76bcd88ce6d798df4dd | [] | no_license | bhoflack/cmis | b15bac01a30ee1d807397c9b781129786eba4ffa | 09e852120743d3d021ec728fac28510841d5e248 | refs/heads/master | 2021-01-01T05:32:17.872620 | 2014-11-17T15:00:47 | 2014-11-17T15:00:47 | 8,852,575 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,108 | java |
package vmware.vim25;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ProfileExecuteError complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ProfileExecuteError">
* <complexContent>
* <extension base="{urn:vim25}DynamicData">
* <sequence>
* <element name="path" type="{urn:vim25}ProfilePropertyPath" minOccurs="0"/>
* <element name="message" type="{urn:vim25}LocalizableMessage"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ProfileExecuteError", propOrder = {
"path",
"message"
})
public class ProfileExecuteError
extends DynamicData
{
protected ProfilePropertyPath path;
@XmlElement(required = true)
protected LocalizableMessage message;
/**
* Gets the value of the path property.
*
* @return
* possible object is
* {@link ProfilePropertyPath }
*
*/
public ProfilePropertyPath getPath() {
return path;
}
/**
* Sets the value of the path property.
*
* @param value
* allowed object is
* {@link ProfilePropertyPath }
*
*/
public void setPath(ProfilePropertyPath value) {
this.path = value;
}
/**
* Gets the value of the message property.
*
* @return
* possible object is
* {@link LocalizableMessage }
*
*/
public LocalizableMessage getMessage() {
return message;
}
/**
* Sets the value of the message property.
*
* @param value
* allowed object is
* {@link LocalizableMessage }
*
*/
public void setMessage(LocalizableMessage value) {
this.message = value;
}
}
| [
"brh@melexis.com"
] | brh@melexis.com |
53c6588eb8f877e2defcf889dc07708605eec574 | 3d98ef8b8233b18fa285c9eeaa2c0a23a21bb956 | /src/keon/ldtest/entity/tile/TileStillWater.java | 0401a3266dcdf55932c30903a3ab37917128e11c | [] | no_license | KaiaSky/LudumJam_BeneathTheSurface_Lava | d828ca06dbe0c50d7be825703069ce5c73126682 | 4dce353a867974bf2b1f95e5cdbc83bac4fa7ecd | refs/heads/master | 2021-05-26T18:21:16.175934 | 2014-05-06T20:37:25 | 2014-05-06T20:37:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 279 | java | package keon.ldtest.entity.tile;
import keon.ldtest.entity.TileWorld;
import keon.ldtest.entity.tiledata.TileData;
public class TileStillWater extends BasicTile {
@Override
public void update(int x, int y, TileWorld w, TileData data)
{
w.setTileAt((char)2, x, y);
}
}
| [
"kprater3.14@gmail.com"
] | kprater3.14@gmail.com |
d6ef21a27633880a52f344591cac2d14e180f8a0 | 8e7cd5d0a702ef8e717745e31d05da1abeee567e | /src/com/yulinoo/plat/life/net/reqbean/AdvertiseReq.java | 2df4a3e5df9b31cb05450a1cbafae9a434008bf5 | [] | no_license | lyxwll/NewMyLife | ab4a99b219dcbbde3d857b15e5db3794c866fd43 | 1b6a7261d95e22e829cd8004c1712b115fd61398 | refs/heads/master | 2021-01-25T10:21:15.504903 | 2015-08-05T09:13:51 | 2015-08-05T09:13:51 | 40,235,979 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 598 | java | package com.yulinoo.plat.life.net.reqbean;
//取消关注小区
public class AdvertiseReq {
private Integer position;
private Long categorySid;
private Long areaSid;
public Integer getPosition() {
return position;
}
public void setPosition(Integer position) {
this.position = position;
}
public Long getCategorySid() {
return categorySid;
}
public void setCategorySid(Long categorySid) {
this.categorySid = categorySid;
}
public Long getAreaSid() {
return areaSid;
}
public void setAreaSid(Long areaSid) {
this.areaSid = areaSid;
}
}
| [
"jyu4228716@163.com"
] | jyu4228716@163.com |
925ed60b3d4f8919f035bd9c8f8458c466c71e69 | fd84d7b4e9a40b9de6790d16116e9aa46fd4b601 | /src/main/java/com/whitecitycode/aida/AccServiceRateType.java | b14652984d3806016f887c274ed468571c103403 | [] | no_license | rredpoppy/aida | 2dbb9ff56569d57d32c011e79825cde7e9d1d155 | 24759b16049b95df302d86ace29561a0b9149d27 | refs/heads/master | 2021-01-17T17:21:20.493653 | 2017-02-22T08:12:13 | 2017-02-22T08:12:13 | 82,778,122 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,226 | java |
package com.whitecitycode.aida;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* Represents an extension of the service price rate, which applies only for accommodation services.
*
* <p>Java class for AccServiceRateType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AccServiceRateType">
* <complexContent>
* <extension base="{http://aida.dcsplus.net/ws/2010}ServiceRateWithPriceType">
* <sequence>
* <element name="SpecialOffers" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SpecialOffer" type="{http://aida.dcsplus.net/ws/2010}ServiceSpecialOfferWithPriceType" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AccServiceRateType", propOrder = {
"specialOffers"
})
public class AccServiceRateType
extends ServiceRateWithPriceType
{
@XmlElement(name = "SpecialOffers")
protected AccServiceRateType.SpecialOffers specialOffers;
/**
* Gets the value of the specialOffers property.
*
* @return
* possible object is
* {@link AccServiceRateType.SpecialOffers }
*
*/
public AccServiceRateType.SpecialOffers getSpecialOffers() {
return specialOffers;
}
/**
* Sets the value of the specialOffers property.
*
* @param value
* allowed object is
* {@link AccServiceRateType.SpecialOffers }
*
*/
public void setSpecialOffers(AccServiceRateType.SpecialOffers value) {
this.specialOffers = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SpecialOffer" type="{http://aida.dcsplus.net/ws/2010}ServiceSpecialOfferWithPriceType" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"specialOffer"
})
public static class SpecialOffers {
@XmlElement(name = "SpecialOffer", required = true)
protected List<ServiceSpecialOfferWithPriceType> specialOffer;
/**
* Gets the value of the specialOffer property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the specialOffer property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSpecialOffer().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ServiceSpecialOfferWithPriceType }
*
*
*/
public List<ServiceSpecialOfferWithPriceType> getSpecialOffer() {
if (specialOffer == null) {
specialOffer = new ArrayList<ServiceSpecialOfferWithPriceType>();
}
return this.specialOffer;
}
}
}
| [
"adrian.rosian@gmail.com"
] | adrian.rosian@gmail.com |
7c9dc91cb0e6a82d38e03aa4ea2981eba45c3bc4 | e40c440ef40147a14a56460a563eebb05de69748 | /src/db/DbRepToleranciaIndividual.java | f691c8d9492d108a6d42b5508500e7880d9a1c1c | [] | no_license | witzkito/RacoopMC | 960eee58e1899a0815b63863616df064ab33eceb | 748f34c769a3b05db412709aae2fe045d1a35c77 | refs/heads/master | 2021-01-22T11:51:56.665086 | 2014-07-24T21:29:30 | 2014-07-24T21:29:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,651 | java | package db;
import java.sql.SQLException;
public class DbRepToleranciaIndividual {
//Atributos
private Coneccion con;
//Constructor
public DbRepToleranciaIndividual(Coneccion con){
this.con = con;
}
//Metodos
/**
* Metodo que inserta un registro en la Base de Datoss
* @param numero long
* @param nombre String
* @param nombreVariedad String
* @param hectareas String
* @param lote String
* @param kgCensado String
* @param kgEntregado String
*/
public void Insert(long numero, String nombre,String nombreVariedad,
String hectareas, String lote, String cubierto, String kgCensado, String kgEntregado,
String totalTolerancia){
String sql;
sql = "INSERT INTO RepToleranciaIndividual(numero, nomApe, nomVariedad, hectareas, " +
"lote, cubierto, kgCensado, kgEntregado, tolerancia) VALUES(" + numero + ", '" + nombre + "', '" + nombreVariedad +
"','" + hectareas + "', '" + lote + "', '" + cubierto + "', '" + kgCensado + "','" + kgEntregado + "','" +
totalTolerancia + "')";
try{
con.insert(sql);
}catch(Exception ex){
System.out.println("Error Insertando datos en la Base de Datos - DbRepToleranciaIndividual - " + ex);
}
}
/**
* Borra todos los registros de la tabla
*/
public void borrarAll(){
String sql;
sql = "DELETE FROM RepToleranciaIndividual";
try{
con.delete(sql);
}catch(SQLException ex){
System.out.println("Error Borrando Datos - DbRepIndividual - " + ex.getMessage());
}
}
}
| [
"witzkito@gmail.com"
] | witzkito@gmail.com |
955137d2c03805829fe1f61ac85b17b3dc4380e9 | 151544b4976a7868ce5f9d3cff7654564bfc005a | /src/com/forestry/dao/sys/FundDao.java | eb46fa24c4e0a04e1ef216c82e8bc37fdbcb98b2 | [] | no_license | tongxinwudi/xz | da6b6d004a0d39d1ed11b1463956257228750caf | d6ca5825e605a70bcd2eeca89cd97bc10d33dc85 | refs/heads/master | 2021-01-10T22:48:00.464070 | 2016-10-09T04:25:29 | 2016-10-09T04:25:29 | 70,376,014 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,807 | java | package com.forestry.dao.sys;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.hibernate.Query;
import com.forestry.model.sys.Forestry;
import com.forestry.model.sys.Fund;
import com.forestry.model.sys.FundHold;
import com.forestry.model.sys.FundLimit;
import com.forestry.model.sys.Profit;
import core.dao.Dao;
/**
* @author Yang Tian
* @email 1298588579@qq.com
*/
public interface FundDao extends Dao<Fund> {
List<Fund> getFundList(Fund fund);
List<Fund> getFundLimitGraphList(Fund fund);
long getFundListCount(Fund fund);
List<Fund> getFundFrequencyList(Fund fund);
long getFundFrequencyCount(Fund fund);
void statistic_month_limit();
List<FundLimit> getFundlimtLineGraph(FundLimit fundLimit);
/**
* 单只基金,一次或多次申购,一次全部赎回的基金和金额
* @return
*/
List getSaleAllOnceFund();
/**
* 单只基金,一次或多次申购,一次全部赎回的基金持有时间
* @return
*/
Map<String,Integer> getSaleAllOnceFundHoldTime();
/**
* 单只基金,一次或多次申购,一次赎回部分基金
* @return
*/
List getSalePartOnceFund();
/**
* 单只基金,一次或多次申购,一次全部赎回的基金持有时间
* @return
*/
Map<String,Integer> getSalePartOnceFundHoldTime();
/**
* 单只基金,一次或多次申购,未赎回的基金
* @return
*/
List getNoSaleFund();
/**
* 单只基金,一次或多次申购,未赎回基金的持有时间
* @return
*/
Map<String,Integer> getNoSaleFundHoldTime();
/**
* 单只基金,一次或多次申购,多次赎回
* @return
*/
List getSaleMoreThanOnceFund();
/**
* 根据基金号和用户编号返回对应类型的基金操作记录
* @param fdcode,基金号
* @param uid,用户编码
* @param operate,操作类型
* @return
*/
List<FundHold> getFundByCodeAndUid(String fdcode,String uid,int operate);
/**
* 根据基金号和用户编号返回对应类型的早于给定id的基金操作记录
* @param fdcode
* @param uid
* @param operate
* @param opid
* @return
*/
Map<Double,Date> getEarlierFundBuyShare(String fdcode,String uid,int operate,long startId,long endId);
/**
* 保存基金的持有时间
*/
void saveFundHoldTime();
/**
* 获取所有基金的持有时间
* @return
*/
List<FundHold> getAllFundHoldTime(FundHold fundHold);
/**
* 获取所有基金数量
* @return
*/
int getAllFundCount(FundHold fundHold);
/**
* 现金宝,一次或多次申购,一次全部赎回的基金持有时间
* @return
*/
int getSaleAllOnceCashbaoHoldTime();
/**
* 现金宝,一次或多次申购,只赎回过一次,但是没有完全赎回
* @return
*/
int getSalePartOnceCashbaoHoldTime();
/**
* 现金宝,一次或多次申购,一次都没有赎回的持有时间
* @return
*/
int getNoSaleCashbaoHoldTime();
/**
* 现金宝,一次或多次申购,多次赎回的用户
* @return
*/
List getSaleMoreThanOnceCashbao();
/**
* 返回对应类型的早于给定id的用户现金宝操作记录
* @param uid
* @param operate
* @param opid
* @return
*/
Map<Double, Date> getEarlierCashbaoBuyShare(String uid, int operate,
long startId, long endId);
/**
* 根据现金宝用户的操作记录
* @param uid,用户编码
* @param operate,操作类型
* @return
*/
List<FundHold> getCashbaoByUid(String uid, int operate);
/**
* 按月份统计基金的总申购频率
* @return
*/
List getFundFrequencyMonth();
/**
* 按月份统计投资组合的总申购频率
* @return
*/
List getAssemblyFrequencyMonth();
/**
* 按月份统计现金宝的总申购频率
* @return
*/
List getCashbaoFrequencyMonth();
}
| [
"xtong@niub.la"
] | xtong@niub.la |
dfa32aba0b474c01f24603c2ae06221734c26cca | 3650ed995c0c1a3835e1905a66bc45d8850d2be0 | /maxdenytcz/src/com/taocz/citystory/txweibo/beans/OAuth.java | 13b6b65efed09c20a3ee4e01b648a94480f39077 | [] | no_license | maxdeny/test | 7d38f42296822dc4174e25f2e056ef09c2374d9f | 1408429cbf5cc896cf4dfaeb21c6c6faaa9932c7 | refs/heads/master | 2021-01-10T07:25:33.543500 | 2016-04-08T06:00:10 | 2016-04-08T06:00:10 | 55,743,264 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,616 | java | package com.taocz.citystory.txweibo.beans;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import com.taocz.citystory.txweibo.constants.OAuthConstants;
/**
* OAuth鉴权信息通用部分
*/
public class OAuth implements Serializable{
private static final long serialVersionUID = -6939447877705891817L;
protected String seqid=null;
protected String clientIP="127.0.0.1";
protected String appFrom=null;//android应用应该设置为 android-sdk-1.0
protected String openid= null;//用户统一标识
protected String openkey= null;
protected String oauthVersion = OAuthConstants.OAUTH_VERSION_1;// OAuth鉴权的版本 1.0 或 2.a
protected String scope = "all"; // 授权范围
protected int status = 0;// 认证状态,0:成功,1:获取Request失败 2:获取授权码失败, 3:获取Access失败
protected String msg = null;//服务器返回的消息
protected Random random = new Random();
public List<NameValuePair> getCommonParamsList(){
seqid=this.generateSeqId();
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
// parameters.add(new BasicNameValuePair("seqid", seqid));
parameters.add(new BasicNameValuePair("clientip",clientIP));
// parameters.add(new BasicNameValuePair("appfrom",appFrom));
// parameters.add(new BasicNameValuePair("openid", openid));
return parameters;
}
/**
* 生成seqId,12位随机数
* @return
*/
public String generateSeqId(){
String result="";
for(int i=0;i<2;i++){
result=String.valueOf(random.nextInt(1000000))+result;
for(;result.length()<(i+1)*6;result="0"+result);
}
return result;
}
/**请求码*/
public String getSeqId() {
return seqid;
}
/**请求码,使用 {@link #generateSeqId()} 生成 */
public void setSeqId(String seqId) {
this.seqid = seqId;
}
/**用户真实IP,需自行取得*/
public String getClientIP() {
return clientIP;
}
/**请设置用户真实IP,避免使用内网IP,缺省值为"127.0.0.1" */
public void setClientIP(String clientIP) {
this.clientIP = clientIP;
}
/**应用所使用的SDK版本*/
public String getAppFrom() {
return appFrom;
}
/**应用所使用的SDK版本,请从 {@link com.tencent.weibo.constants.OAuthConstants#APP_FROM_ANDROID_SDK_1} 与
* {@link com.tencent.weibo.constants.OAuthConstants#APP_FROM_JAVA_SDK_2} 中选择 */
public void setAppFrom(String appFrom) {
this.appFrom = appFrom;
}
/**用户登录态*/
public String getOpenid() {
return openid;
}
/**该值在用户授权过程中取得,标记用户登录态*/
public void setOpenid(String openid) {
this.openid = openid;
}
/**与openid对应的Key*/
public String getOpenkey() {
return openkey;
}
/**该值在用户授权后取得,与openid对应*/
public void setOpenkey(String openkey) {
this.openkey = openkey;
}
/**使用的OAuth授权的版本*/
public String getOauthVersion() {
return oauthVersion;
}
/**请从 {@link com.tencent.weibo.constants.OAuthConstants#OAUTH_VERSION_1} 与
* {@link com.tencent.weibo.constants.OAuthConstants#OAUTH_VERSION_2_A} 中选择 */
public void setOauthVersion(String oauthVersion) {
this.oauthVersion = oauthVersion;
}
/**授权范围 */
public String getScope() {
return scope;
}
/**授权范围 */
public void setScope(String scope) {
this.scope = scope;
}
/**认证状态:<br>
* <li>0:成功,
* <li>1:Request失败,
* <li>2:获取验证码失败,
* <li>3:Access失败
*/
public int getStatus() {
return status;
}
/**认证状态:<br>
* <li>0:成功,
* <li>1:Request失败,
* <li>2:获取验证码失败,
* <li>3:Access失败
*/
public void setStatus(int status) {
this.status = status;
}
/**服务器返回的消息*/
public String getMsg() {
return msg;
}
/**服务器返回的消息*/
public void setMsg(String msg) {
this.msg = msg;
}
}
| [
"iamzhuolei@gmail.com"
] | iamzhuolei@gmail.com |
09db2516578b669c3536019618554650aa45be71 | 14b86c1810dd2f93e681ed2cd81222b920cb936a | /src/main/java/zh/learn/javafx/ch12control/chooser/FileChooserTest.java | 1f7e6f33c3bfe797df09cb21107300119c497e3e | [] | no_license | dzheleznyakov/LearningJavaFx | 26b7fa8940c8670233c60ebb2ff5704635c9683c | d5feaf5ed716aee9308c9d481e10403e63a84982 | refs/heads/master | 2021-07-08T05:42:23.347341 | 2019-12-18T17:36:49 | 2019-12-18T17:36:49 | 200,179,208 | 0 | 0 | null | 2020-10-13T15:27:52 | 2019-08-02T06:34:10 | Java | UTF-8 | Java | false | false | 2,423 | java | package zh.learn.javafx.ch12control.chooser;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.web.HTMLEditor;
import javafx.stage.FileChooser;
import javafx.stage.Stage;
import zh.learn.javafx.Aux;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
public class FileChooserTest extends Application {
private Stage primaryStage;
private HTMLEditor resumeEditor;
private final FileChooser fileDialog = new FileChooser();
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) {
primaryStage = stage;
resumeEditor = new HTMLEditor();
resumeEditor.setPrefSize(600, 300);
fileDialog.getExtensionFilters()
.add(new FileChooser.ExtensionFilter("HTML Files", "*.html", "*.html"));
Button openBtn = new Button("Open");
Button saveBtn = new Button("Save");
Button closeBtn = new Button("Close");
openBtn.setOnAction(e -> openFile());
saveBtn.setOnAction(e -> saveFile());
closeBtn.setOnAction(e -> stage.close());
HBox buttons = new HBox(20, openBtn, saveBtn, closeBtn);
buttons.setAlignment(Pos.CENTER_RIGHT);
VBox root = new VBox(resumeEditor, buttons);
root.setSpacing(20);
Aux.style(root);
Aux.showStage(stage, root, "Editing Resume in HTML Format");
}
private void openFile() {
fileDialog.setTitle("Open Resume");
File file = fileDialog.showOpenDialog(primaryStage);
if (file == null) {
return;
}
try {
byte[] resume = Files.readAllBytes(file.toPath());
resumeEditor.setHtmlText(new String(resume));
} catch (IOException e) {
e.printStackTrace();
}
}
private void saveFile() {
fileDialog.setTitle("Save Resume");
fileDialog.setInitialFileName("untitled.htm");
File file = fileDialog.showSaveDialog(primaryStage);
if (file == null) {
return;
}
try {
String html = resumeEditor.getHtmlText();
Files.write(file.toPath(), html.getBytes());
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"zheleznyakov.dmitry@gmail.com"
] | zheleznyakov.dmitry@gmail.com |
f3a3b8a73005356374e60d14778c29fd3b230d44 | 33d46d49846b0864337e1765607a094a6ef3ae84 | /approval/src/main/java/com/shine/approval/service/IApprovalOptimizeService.java | 7b3af758dae22deb09326beeb08712897c9844e3 | [
"Apache-2.0"
] | permissive | ShineXxx/zhengwu | fa37a5a752d3749b763d742b48228e7089f61f50 | 9cc896b849f0c152f954488982dbfadb5e75e66c | refs/heads/main | 2023-08-13T12:44:40.312576 | 2021-09-23T14:51:43 | 2021-09-23T14:51:43 | 407,781,020 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 939 | java | package com.shine.approval.service;
import com.shine.approval.module.vo.ClassificationVo;
import com.shine.approval.module.vo.InfoExtraVo;
import com.shine.approval.module.vo.OcrVo;
import com.shine.approval.module.vo.RuleEngineVo;
/**
* 预审优化版 接口 (实现任务分片)
*
* @author zhaoyao
*/
public interface IApprovalOptimizeService {
/**
* 图片OCR任务
*
* @param ocrVo
* @return
*/
String ocrTask(OcrVo ocrVo);
/**
* 图片分类任务
*
* @param classificationVo
* @return
*/
String classificationTask(ClassificationVo classificationVo);
/**
* 信息提取任务
*
* @param infoExtraVo
* @return
*/
String informationExtractionTask(InfoExtraVo infoExtraVo);
/**
* 规则引擎任务
*
* @param ruleEngineVo
* @return
*/
String ruleEngineTask(RuleEngineVo ruleEngineVo);
}
| [
"zhaohaijin@seassoon.com"
] | zhaohaijin@seassoon.com |
2275bab98d37b9be078e83a9d0a2ba9eaf5a6eed | c86dcd5e3364805e2c0ffe01f50334e316db08bb | /classpractice11/src/test/java/com/example/inspiron/classpractice11/ExampleUnitTest.java | 317039a85e9219bd2d33edbf56e96aaca3e256b3 | [] | no_license | manroopsingh/MAC | bab07c0cc400daf7626150c9ed528c1f022856d8 | 7d4a04bb0f4ebe15299279bd6f5f1508db511967 | refs/heads/master | 2021-01-18T22:22:21.251107 | 2017-01-25T22:13:38 | 2017-01-25T22:13:38 | 76,473,927 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 414 | java | package com.example.inspiron.classpractice11;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"manroopmsingh@gmail.com"
] | manroopmsingh@gmail.com |
cf8547eb24a52ee74186d2aa53141c0ed54e8d8b | 7fadecd4cb03199a3efddc6ef6f6151c4eaf061d | /classmonitor/video_processor/src/main/java/service/impl/SelfstudyImpl.java | aa07aff019c77f8e0a22121a0f1b5c861f2afd03 | [] | no_license | Pangyk/LBAIS | b63536d83cff11d5de36d1602ba46fe98a14a0a8 | d55499809f6277df93919225425ca87fe432754b | refs/heads/master | 2022-04-05T22:56:56.455854 | 2020-01-28T03:31:37 | 2020-01-28T03:31:37 | 236,650,208 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 19,014 | java | package service.impl;
import java.awt.geom.Point2D;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import service.entity.Behavior;
import service.entity.study.Alarm;
import service.entity.study.Pattern;
import service.entity.study.TempState;
import service.model.ActionInfo;
import service.model.InitInfo;
import service.model.StateHelper;
import service.repository.BehaviorRepository;
import service.repository.StudentRepository;
import service.repository.study.AlarmRepository;
import service.repository.study.PatternRepository;
import service.repository.study.TempStateRepository;
import service.service.SelfstudyService;
import service.tool.SeatHelper;
import sun.applet.Main;
@Service
public class SelfstudyImpl implements SelfstudyService {
@Autowired
private AlarmRepository alarm;
@Autowired
private PatternRepository pattern;
@Autowired
private TempStateRepository tempstate;
@Autowired
private BehaviorRepository behavior;
@Autowired
private StudentRepository stu_repo;
HashMap alarm_value = new HashMap() {
{
put("正常", 0.0);
put("迟到", 1.0);
put("缺席", 2.0);
put("离开", 3.0);
put("早退", 3.0);
put("站立", 3.0);
put("游荡", 4.0);
put("睡觉", 1.0);
}
};
public static final double alarm_stan = 6.0;
@Override
public void test1960() throws Exception {
// TODO Auto-generated method stub
int num = 1960;
int cid = 2;
int max_seq = tempstate.getMaxSeq(num, cid);
int sequence = 1;
int sum = 16;
ArrayList<StateHelper> list = new ArrayList<StateHelper>();
for (int i = 0; i < 16; i++) {
StateHelper temp = new StateHelper();
temp.setCid(cid);
temp.setSid(i + 1);
list.add(temp);
}
int alarm_id = 0;
int alarm_num = 0;
for (; sequence <= max_seq; sequence++) {
List<TempState> state_list = tempstate.findByNumAndCidAndSequence(num, cid, sequence);
for (int i = 0; i < state_list.size(); i++) {
TempState current = state_list.get(i);
int sid = current.getSid();
String current_state = current.getState();
String orig_state = list.get(sid - 1).getState();
// 状态不变化
if (current_state.equals(orig_state) && current_state.equals("坐"))
continue;
int target = checkBehaviour(list.get(sid - 1), current_state, sequence);
}
// add alarm
if (checkAlarm(list) == 1 && alarm_id == 0) {
alarm_num++;
Alarm temp = new Alarm();
temp.setClass_id(cid);
temp.setStart(sequence);
temp.setId(0);
String path = "../video/alarm1.mp4";
//getVedio(sequence, path);
temp.setVedio_path(path);
Date day = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
temp.setDate(Integer.parseInt(df.format(day)));
df = new SimpleDateFormat("HH:mm:ss");
temp.setTime(df.format(day));
String destribution = "";
for (int i = 0; i < list.size(); i++) {
if (!list.get(i).getDescription().equals("正常"))
destribution = destribution + list.get(i).getSid() + "号同学" + list.get(i).getDescription() + ";";
}
temp.setDestribute(destribution);
System.out.println(temp.getTime() + " : " + temp.getDestribute());
Alarm result = alarm.save(temp);
alarm_id = result.getId();
sendPost("http://localhost:10002/study/alertAlarm?alarm_id"+alarm_id, "");
}
if (checkAlarm(list) == 0&&alarm_id!=0){
sendPost("http://localhost:10002/study/alertAlarm?alarm_id="+alarm_id, "");
alarm_id=0;
}
}
//checkPattern();
}
public int addBehavior(StateHelper orig, int sequence, String state) {
int between = sequence - orig.getStart_seq();
if (orig.getBeh_id() == 0) {
Behavior target = new Behavior();
target.setId(0);
target.setCid(orig.getCid());
target.setSid(orig.getSid());
target.setTotal_time(between);
Date day = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
target.setDate(df.format(day));
df = new SimpleDateFormat("HH:mm:ss");
target.setEnd(df.format(day));
Calendar calendar = Calendar.getInstance();
calendar.setTime(day);
calendar.add(Calendar.SECOND, between * -1);
target.setStart(df.format(calendar.getTime()));
target.setAction(state);
target.setStatus("未请假");
target.setTid(2);
target.setPlace("");
return behavior.save(target).getId();
} else {
SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
Calendar calendar = Calendar.getInstance();
String end = df.format(calendar.getTime());
// behavior.updateById(orig.getBeh_id(),end,"未请假",state,between);
return orig.getBeh_id();
}
}
/*
* 站立 3s 室外 15s内短期离开,15s外长期离开 迟到 15s记为缺席 睡觉 10s 游荡 5s
*/
public int checkBehaviour(StateHelper orig, String cur_state, int sequence) {
// 迟到缺勤
if (sequence == 1 && cur_state.equals("室外")) {
orig.setState(cur_state);
orig.setBeh_id(addBehavior(orig, sequence, "迟到"));
orig.setDescription("迟到");
return 1;
}
if (cur_state.equals("室外") && (orig.getDescription().equals("迟到"))) {
if (sequence >= 15) {
addBehavior(orig, sequence, "缺席");
} else {
addBehavior(orig, sequence, "迟到");
}
if (sequence == 15) {
orig.setDescription("迟到");
return 1;
}
return 0;
}
int key = 5;
// 改成不良状态
if (orig.getState().equals("坐")) {
orig.setState(cur_state);
orig.setStart_seq(sequence);
return 0;
}
// 站立
key = 5;
if (orig.getState().equals("站立") && (cur_state.equals("站立"))) {
if (sequence - orig.getStart_seq() > key) {
orig.setBeh_id(addBehavior(orig, sequence, "站立"));
}
if (sequence - orig.getStart_seq() == key) {
orig.setDescription("站立");
return 1;
}
return 0;
}
// 睡觉
key = 10;
if (orig.getState().equals("睡觉") && (cur_state.equals("睡觉"))) {
if (sequence - orig.getStart_seq() > key) {
orig.setBeh_id(addBehavior(orig, sequence, "睡觉"));
}
if (sequence - orig.getStart_seq() == key) {
orig.setDescription("睡觉");
return 1;
}
return 0;
}
// 游荡
key = 5;
if (orig.getState().equals("游荡")) {
if (sequence - orig.getStart_seq() > key) {
orig.setBeh_id(addBehavior(orig, sequence, "游荡"));
}
if (sequence - orig.getStart_seq() == key) {
orig.setDescription("游荡");
return 1;
}
return 0;
}
// 早退
if (cur_state.equals("室外") && (sequence == 92) && (orig.getDescription().equals("离开"))) {
orig.setBeh_id(addBehavior(orig, sequence, "早退"));
return 0;
}
// 室外
key = 15;
if (cur_state.equals("室外")) {
if (sequence - orig.getStart_seq() < key) {
orig.setBeh_id(addBehavior(orig, sequence, "短时离开"));
} else {
orig.setBeh_id(addBehavior(orig, sequence, "离开"));
}
if (sequence - orig.getStart_seq() == key) {
orig.setDescription("离开");
}
if (sequence - orig.getStart_seq() <= key)
return 1;
return 0;
}
// 坐
if (cur_state.equals("坐")) {
orig.setState(cur_state);
orig.setBeh_id(0);
orig.setDescription("正常");
return 0;
}
return 0;
}
public int checkAlarm(ArrayList<StateHelper> list) {
double value = 0.0;
for (int i = 0; i < list.size(); i++) {
value += (double) alarm_value.get(list.get(i).getDescription());
}
System.out.println("value=" + value);
if (value >= alarm_stan)
return 1;
return 0;
}
@Override
public void checkPattern(int cid) throws Exception {
Calendar calendar = Calendar.getInstance();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String today = df.format(calendar.getTime());
calendar.add(Calendar.DATE, -3);
String threeday = df.format(calendar.getTime());
calendar.add(Calendar.DATE, -4);
String week = df.format(calendar.getTime());
List<Integer> student=behavior.getByDateStu(cid, today);
ArrayList<Integer> team=new ArrayList<Integer>();
for(int i=0;i<student.size();i++){
int sid=student.get(i);
String sname=stu_repo.getName(cid,sid);
List<Behavior> Oneday=behavior.getByDate(cid,today,sid);
List<Behavior> Threeday=behavior.getByDate(cid,threeday,sid);
List<Behavior> Weekday=behavior.getByDate(cid,week,sid);
String description="";
//某个同学在一天内超过五次出现异常情况;
if(Oneday.size()>=5) {
for(int k=0;k<Oneday.size();k++){
description=description+Oneday.get(i).getDate()+" "+
Oneday.get(i).getStart()+" "+Oneday.get(k).getAction()+";<br>";
}
addPattern(cid,sname+"同学在1天内出现"+Oneday.size()+"次异常行为:<br>"+description);
}
//某个同学在一天内的超过三个时段 睡觉;
int sleep=0;
description="";
for(int k=0;k<Oneday.size();k++){
String action=Oneday.get(k).getAction();
if(action.equals("睡觉")) {
description=description+Oneday.get(k).getDate()+" "+
Oneday.get(k).getStart()+" "+action+";<br>";
sleep++;
}
}
if(sleep>=3)
addPattern(cid,sname+"号同学在1天内出现"+sleep+"次睡觉行为:<br>"+description);
//某个同学在一天内的超过三个时段出教室出教室(包括短时离开);
int leave=0;
description="";
for(int k=0;k<Oneday.size();k++){
String action=Oneday.get(k).getAction();
if(action.contains("离开")||action.equals("早退")){
description=description+Oneday.get(k).getDate()+" "+
Oneday.get(k).getStart()+" "+action+";";
leave++;
}
}
if(leave>=3)
addPattern(cid,sname+"号同学在1天内出现"+leave+"次离开教室的行为:<br>"+description);
//某个同学在三天内超过十次出现异常情况;
if(Threeday.size()>=10){
description="";
for(int k=0;k<Threeday.size();k++){
description=description+Threeday.get(i).getDate()+" "+
Threeday.get(i).getStart()+" "+Threeday.get(k).getAction()+";<br>";
}
addPattern(cid,sname+"同学在3天内出现"+Threeday.size()+"次异常行为:<br>"+description);
}
//某个同学在一周内超过 三个时段迟到或者缺勤。
int late=0;
description="";
for(int k=0;k<Weekday.size();k++){
String action=Weekday.get(k).getAction();
if(action.equals("迟到")||action.equals("缺勤")){
late++;
description=description+Weekday.get(i).getDate()+" "+
Weekday.get(i).getStart()+" "+Weekday.get(k).getAction()+";<br>";
}
}
if(late>=3)
addPattern(cid,sname+"同学在一周内出现"+late+"次迟到或者是缺勤行为:<br>"+description);
}
//某两位同学在一周内超过三个时段内先后出教室;考虑几次相差的时间均不超过xx
if(team.size()>1){
for(int i=0;i<team.size()-1;i++){
for(int j=i+1;j<team.size();j++){
getTeam(cid,i,j,week);
}
}
}
}
public static final int space=60; //只允许两个离开行为之间最多相差60s
public int getTeam(int cid,int s1,int s2,String date) throws Exception{
List<Behavior> Week1=behavior.getByDate(cid,date,s1);
ArrayList<Behavior> beh1=new ArrayList<Behavior>();
List<Behavior> Week2=behavior.getByDate(cid,date,s1);
ArrayList<Behavior> beh2=new ArrayList<Behavior>();
String description="";
for(int i=0;i<Week1.size();i++){
String action=Week1.get(i).getAction();
if(action.contains("离开")||action.equals("早退")){
beh1.add(Week1.get(i));
}
}
for(int i=0;i<Week2.size();i++){
String action=Week2.get(i).getAction();
if(action.contains("离开")||action.equals("早退")){
beh2.add(Week2.get(i));
}
}
//不足次数考虑提前放弃
if(beh1.size()<=2||beh2.size()<=3) return 0;
int key=0;
for(int i=0;i<beh1.size();i++){
Behavior temp=beh1.get(i);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String day=temp.getDate();
String cl1=day+" "+temp.getStart();
Calendar t1=Calendar.getInstance();
t1.setTime(sdf.parse(cl1));
long begin = t1.getTimeInMillis();
for(int k=0;k<beh2.size();k++){
if(beh2.get(k).getDate().equals(day)){
String cl2=day+" "+beh2.get(k).getStart();
Calendar t2=Calendar.getInstance();
t2.setTime(sdf.parse(cl2));
long end = t2.getTimeInMillis();
long between=(end - begin)/(1000);
if(between>-1*space&&between<space) {
key++;
Behavior temp1=beh1.get(i);
Behavior temp2=beh2.get(k);
description=description+temp1.getDate()+" "+stu_repo.findName(cid, s1)+
" "+temp1.getStart()+"-"+temp1.getEnd()+";"+stu_repo.findName(cid, s2)+
" "+temp2.getStart()+"-"+temp2.getEnd()+";<br>";
}
}
}
}
if(key>3){
addPattern(cid,stu_repo.getName(cid, s1)+"号同学和"+stu_repo.getName(cid, s2)+"号同学在最近一周内"+key+"次先后出教室,建议了解相关情况。");
return 1;
}
return 0;
}
public void addPattern(int cid,String destribute){
Pattern temp = new Pattern();
temp.setClass_id(cid);
temp.setId(0);
Date day = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
temp.setDate(Integer.parseInt(df.format(day)));
temp.setIsHandle(0);
temp.setDestribute(destribute);
System.out.println(cid+":"+destribute);
pattern.save(temp);
}
public void getVedio(int sequence, String name) throws InterruptedException {
// TODO Auto-generated method stub
String input = "C:\\Users\\dell\\Desktop\\vedio\\1960.mp4";
String output = "F:\\java_neon_work\\LBAIS\\classmonitor\\presentation\\src\\main\\resources\\static\\video\\"
+ name;
String commands = "ffmpeg -ss 0:1:" + sequence + " -t 0:0:20 -i " + input + " -vcodec copy -acodec copy "
+ output;
ProcessBuilder builder = new ProcessBuilder();
builder.command(commands);
// Thread.sleep(3000);
}
public void getVedio(int sequence,int end, String name) throws InterruptedException {
// TODO Auto-generated method stub
String input = "C:\\Users\\dell\\Desktop\\vedio\\1960.mp4";
String output = "F:\\java_neon_work\\LBAIS\\classmonitor\\presentation\\src\\main\\resources\\static\\video\\"
+ name;
int between=end-sequence;
String a=Integer.toString(between/3600)+":"+Integer.toString(between/60-(between/3600)*60)+":"+Integer.toString(between%60);
String commands = "ffmpeg -ss 0:1:" + sequence + " -t "+a+" -i " + input + " -vcodec copy -acodec copy "
+ output;
ProcessBuilder builder = new ProcessBuilder();
builder.command(commands);
// Thread.sleep(3000);
}
public static String sendPost(String url, String param) throws Exception {
PrintWriter out = null;
BufferedReader in = null;
String result = "";
try {
URL realUrl = new URL(url);
URLConnection conn = realUrl.openConnection();
conn.setConnectTimeout(5000);
conn.setReadTimeout(10 * 1000);
conn.setDoOutput(true); // 发送POST请求必须设置如下两行
conn.setDoInput(true);
out = new PrintWriter(conn.getOutputStream());
out.print(param);
out.flush();
in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
} catch (Exception e) {
throw e; // 异常外抛
} finally {
try {
if (out != null)
out.close();
if (in != null)
in.close();
} catch (Exception ex) {
}
}
return result;
}
private static int interval = 90; // 90帧,1s30帧即每三秒判定一次
private static double rate = 0.3; // 精度90帧内有30%检测不到即认为不在
private static Map<Integer, ActionInfo> map=new HashMap<>();
private static Map<Integer,String> beh=new HashMap<>();
@Override
public void takeClass(String path,int cid,String video) throws Exception {
int alarm_id=0;
double alarm_num=0.0;
String description="";
File file = new File(path);
String[] fileName = file.list();
String pathStart=path + "\\" + fileName[0];
pathStart=pathStart.substring(0,pathStart.length()-19);
//初始化位置信息
SeatHelper.init();
InitInfo initInfo = new InitInfo();
initInfo.setSeatTable(SeatHelper.getInitalSeatArea());
initInfo.setCid(2);
initInfo.setDate("2018-05-17");
initInfo.setTid(1);
initInfo.setPlace("语文");
// new AbsenteeImpl().analyseAbsentee(IOHelper.dealWithJson(), initInfo);
//初始化状态信息
beh=new HashMap<>();
int start=0;
List<List<Point2D>> temp=TempImpl.getData(start,pathStart);
map = TempImpl.setInitalStatus(temp, initInfo);
// for (Integer key : map.keySet()) {
// System.out.println(key+":"+map.get(key).getName());
// }
//循环信息
start+=90;
for(;start<fileName.length-90;start+=90){
System.out.println(start+" !!!!!!!!!!!!!!!");
alarm_num=0.0;
description="";
temp=TempImpl.getData(start,pathStart);
Map<Integer, String> result=TempImpl.updateStatus(start,temp, initInfo, map);
for (Integer key : result.keySet()) {
alarm_num=alarm_num+(double)alarm_value.get(result.get(key));
//description=description+key+"号同学"+result.get(key)+";";
description=description+stu_repo.getName(cid, key)+"同学"+result.get(key)+";";
}
if(alarm_num>=18) {
alarm_num=0;
description="";
result=new HashMap();
}
Map<Integer, String> sleep=TempImpl.getSleep(start,pathStart);
for (Integer key : sleep.keySet()) {
if(!result.keySet().contains(key)){
alarm_num=alarm_num+(double)alarm_value.get("睡觉");
//description=description+key+"号同学"+result.get(key)+";";
description=description+stu_repo.getName(cid, key)+"同学"+result.get(key)+";";
}
}
if(alarm_num>=alarm_stan && alarm_id == 0){
Alarm temp_a = new Alarm();
temp_a.setClass_id(cid);
temp_a.setStart(start/30);
temp_a.setId(0);
temp_a.setVedio_path(video);
Date day = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
temp_a.setDate(Integer.parseInt(df.format(day)));
df = new SimpleDateFormat("HH:mm:ss");
temp_a.setTime(df.format(day));
temp_a.setDestribute(description);
Alarm turnvalue = alarm.save(temp_a);
alarm_id = turnvalue.getId();
sendPost("http://localhost:10002/study/alertAlarm?alarm_id="+alarm_id, "");
System.out.println(start/30+" "+alarm_num+" "+description);
}else if(alarm_num<alarm_stan && alarm_id !=0){
sendPost("http://localhost:10002/study/closeAlarm?alarm_id="+alarm_id, "");
alarm_id=0;
}
}
}
public static void main(String[] args) throws Exception {
new SelfstudyImpl().takeClass("E:\\百度云下载\\2018.5.4\\jsonOut\\IMG_1960",2,"../video/alarm1.mp4");
}
}
| [
"1403842152@qq.com"
] | 1403842152@qq.com |
9bfca409bde6f84d87cf31d4a7bee179c4046dde | 7b4914bf95af54caa07050e3cf23ebf47b590af9 | /WEB-INF/src/com/bureaueye/beacon/action/edi/pdf/ReportEdifactIftminEndPage.java | 64df88bdca2583b61983aeb7ede60f6d64c9870e | [
"Apache-2.0"
] | permissive | avesus/beacon | fd1874799f91c7b84e5244eb9b3e8e243a81c3c8 | d6626f97153acc8c1eb0f0c5d51f5693c9815a06 | refs/heads/master | 2022-01-08T11:52:49.468174 | 2019-07-08T08:02:03 | 2019-07-08T08:02:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,211 | java | package com.bureaueye.beacon.action.edi.pdf;
import java.util.Date;
import com.bureaueye.beacon.util.Util;
import com.itextpdf.text.Document;
import com.itextpdf.text.ExceptionConverter;
import com.itextpdf.text.Font;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfPageEventHelper;
import com.itextpdf.text.pdf.PdfWriter;
public class ReportEdifactIftminEndPage extends PdfPageEventHelper {
Font font;
Font fontBold;
Font fontBoldLarge;
Font fontSmall;
Font fontSmallBold;
public ReportEdifactIftminEndPage() {
try {
//init default fonts for document type
BaseFont baseFont = BaseFont.createFont(com.bureaueye.beacon.bean.Constants.FONT_NAME, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
font=new Font(
//Font.FontFamily.COURIER,
baseFont,
com.bureaueye.beacon.bean.Constants.FONT_SIZE,
com.bureaueye.beacon.bean.Constants.FONT_STYLE
);
fontBold = new Font(font.getFamily(), font.getSize(), Font.BOLD);
fontBoldLarge = new Font(font.getFamily(), font.getSize()+2, fontBold.getStyle());
fontSmall = new Font(font.getFamily(), font.getSize()-3, font.getStyle());
fontSmallBold = new Font(fontSmall.getFamily(), fontSmall.getSize(), Font.BOLD);
} catch (Exception e) {
}
}
/**
* @see com.lowagie.text.pdf.PdfPageEventHelper#onEndPage(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document)
*/
public void onEndPage(PdfWriter writer, Document document) {
try {
Rectangle page = document.getPageSize();
PdfPTable head = new PdfPTable(1);
head.getDefaultCell().setBorder(0);
head.addCell(new Phrase("INSTRUCTION MESSAGE REPORT",fontBold));
head.addCell(new Phrase("Run on "+Util.dateTextFormat2(new Date()),fontBold));
//head.addCell(new Phrase("Run at "+Util.dateTimeFormat(new Date()),fontBold));
head.addCell(new Phrase("",fontBold));
head.addCell(new Phrase("",fontBold));
//for (int k = 1; k <= 6; ++k)
//head.addCell("" + k);
head.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());
head.writeSelectedRows(0, -1, document.leftMargin(), page.getHeight() - document.topMargin() + head.getTotalHeight(),
writer.getDirectContent());
PdfPTable foot = new PdfPTable(1);
foot.getDefaultCell().setBorder(0);
foot.addCell(new Phrase("",fontBold));
foot.addCell(new Phrase("",fontBold));
foot.addCell(new Phrase("Page "+document.getPageNumber(),fontBold));
//for (int k = 1; k <= 6; ++k)
//foot.addCell("" + k);
foot.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());
foot.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin(),
writer.getDirectContent());
}
catch (Exception e) {
throw new ExceptionConverter(e);
}
}
}
| [
"nicktankard@gmail.com"
] | nicktankard@gmail.com |
580815e745cab1283f7fcb679af5477f94fd4953 | 250fc55f02f1a06ac2c410288ba8c677442cbd3f | /ABCAndroid/src/me/longerian/abcandroid/tiledview/TiledLayoutActivity.java | 4bbd1ed67555c15618638e4b221d96101bab77b6 | [] | no_license | NightOfTwelve/longerian | 30795338c0bf1f502ba98bda4c07c4675335594b | 88468f0b8fcc5955c214528e71aff2466ca2b935 | refs/heads/master | 2020-05-17T01:53:01.269632 | 2015-03-12T09:56:05 | 2015-03-12T09:56:05 | 38,750,596 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,690 | java | package me.longerian.abcandroid.tiledview;
import me.longerian.abcandroid.R;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.TextView;
public class TiledLayoutActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tiled_view);
TiledLayout tl = (TiledLayout) findViewById(R.id.container);
TextView tv = new TextView(getApplicationContext());
tv.setText("钛备份");
tv.setBackgroundColor(Color.rgb(198, 201, 203));
tv.setPadding(5, 5, 5, 5);
tl.addView(tv, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
TextView tv1 = new TextView(getApplicationContext());
tv1.setText("360安全卫士");
tv1.setBackgroundColor(Color.rgb(198, 201, 203));
tv1.setPadding(5, 5, 5, 5);
tl.addView(tv1, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
TextView tv2 = new TextView(getApplicationContext());
tv2.setText("微信");
tv2.setBackgroundColor(Color.rgb(198, 201, 203));
tv2.setPadding(5, 5, 5, 5);
tl.addView(tv2, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
TextView tv3 = new TextView(getApplicationContext());
tv3.setText("大智慧");
tv3.setBackgroundColor(Color.rgb(198, 201, 203));
tv3.setPadding(5, 5, 5, 5);
tl.addView(tv3, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}
}
| [
"xlhongultimate@gmail.com"
] | xlhongultimate@gmail.com |
6e57394a1232ce0170a0b34f0435449cb3262fc9 | 5c8fad57efae4f327229aecb87ba1a0160843869 | /src/Panneau1.java | ccf17a142a389c4c691c3256f52fc2b5e1386a7c | [] | no_license | simven/bomberman | ad4764e604975ff89a4c59749b136bf07458a140 | c9f0c3f71544aef57b6f163a931fb8f7f42c2a19 | refs/heads/master | 2020-11-27T23:00:42.106617 | 2020-05-02T16:03:00 | 2020-05-02T16:03:00 | 229,638,432 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,266 | java | import java.awt.Graphics;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import java.awt.Dimension;
import javax.imageio.ImageIO;
import javax.swing.JPanel;
import java.awt.Dimension;
public class Panneau1 extends JPanel{
/**
*
*/
private static final long serialVersionUID = 1L;
Button boutonPlay,boutonSettings,boutonCredits;
Image fond;
Dimension dimension = getToolkit().getScreenSize();
int width,height;
public Panneau1() {
width=(int)dimension.getWidth();
height=(int)dimension.getHeight();
setSize(width,height);
setLayout(null);
try {
fond = ImageIO.read(new File("Ressources/fondmenu.jpg").getAbsoluteFile());
}
catch (IOException e) {
e.printStackTrace();
}
boutonPlay = new Button("PLAY");
boutonPlay.setBounds((width/10), 5*(height/12),width/6,height/6);
this.add(boutonPlay);
boutonSettings= new Button("SETTINGS");
boutonSettings.setBounds((width/10), 7*(height/10), width/4,height/6);
this.add(boutonSettings);
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.drawImage(fond,0,0,width,height,this);
}
// setBounds(xPosition, yPosition, width, height);
}
| [
"noreply@github.com"
] | simven.noreply@github.com |
b3c686a53ddfbc6d2688e29945124ca93eb1c940 | e53a857f8cc946cc9bd46ace470159549b412fa3 | /resources/test/TestRHelper.java | eca8ebccdf8817a9053e1bc61523e7753348ac57 | [] | no_license | Ser87ch/SABS_proj_rft | 519e6eb9f90e12e57ed41ac1afc3be55bb4e1104 | eb3e897c0149f0bbf3b6f64971617702ab4cff47 | refs/heads/master | 2016-09-05T11:45:23.444412 | 2013-12-13T09:00:35 | 2013-12-13T09:00:35 | null | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 1,380 | java | // DO NOT EDIT: This file is automatically generated.
//
// Only the associated template file should be edited directly.
// Helper class files are automatically regenerated from the template
// files at various times, including record actions and test object
// insertion actions. Any changes made directly to a helper class
// file will be lost when automatically updated.
package resources.test;
import com.rational.test.ft.object.interfaces.*;
import com.rational.test.ft.object.interfaces.SAP.*;
import com.rational.test.ft.object.interfaces.WPF.*;
import com.rational.test.ft.object.interfaces.siebel.*;
import com.rational.test.ft.object.interfaces.flex.*;
import com.rational.test.ft.object.interfaces.dojo.*;
import com.rational.test.ft.object.interfaces.generichtmlsubdomain.*;
import com.rational.test.ft.script.*;
import com.rational.test.ft.vp.IFtVerificationPoint;
import com.ibm.rational.test.ft.object.interfaces.sapwebportal.*;
/**
* Script Name : <b>TestR</b><br>
* Generated : <b>2013/06/04 14:15:23</b><br>
* Description : Helper class for script<br>
* Original Host : Windows XP x86 5.1 build 2600 Service Pack 3 <br>
*
* @since èþíÿ 04, 2013
* @author Admin
*/
public abstract class TestRHelper extends RationalTestScript
{
protected TestRHelper()
{
setScriptName("test.TestR");
}
}
| [
"ser4@me.com"
] | ser4@me.com |
6c85693cf109fae7acef7ec0e5e1968e246c0da0 | 3f0ddf5aa27e72ece5285affab2a63612f56af05 | /game-server/game-gateway-config/src/main/java/com/game/gateway/lock/Lock.java | 08c4b6f23697aabd2d8948c8ff21bf2e9910843a | [] | no_license | wangxingman/game-server | cdf6a5cf038ba4f99a5818cbe6bbc90c658783a1 | c0be3be0c3e84bb4d8152c0f3c17f66ffa70534d | refs/heads/master | 2022-12-30T11:59:19.532655 | 2019-10-30T05:51:48 | 2019-10-30T05:51:48 | 185,502,910 | 1 | 0 | null | 2022-12-16T00:35:50 | 2019-05-08T01:17:02 | Java | UTF-8 | Java | false | false | 502 | java | package com.game.gateway.lock;
import java.io.Serializable;
/**
* @Author : wx
* @Desc :
* @Date : 下午 3:26 2019/7/9 0009
* @explain : 全局锁,包括锁的名称
*/
public class Lock implements Serializable {
private String name;
private String value;
public Lock(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public String getValue() {
return value;
}
}
| [
"wangxingstudy@163.com"
] | wangxingstudy@163.com |
389da6ee5fc5de8fd48739aa6b0168ac298c4b14 | 263a7b5c76ccb72a4f6fb27e649843e9d7edcbc8 | /consumidor-two/src/main/java/br/com/fiap/consumidortwo/config/ConfigMainApp.java | 404149e1ed4dc987f3e0c34a1f454f8e5a60d508 | [] | no_license | diegolribeiro/projeto_kafka | 04319168da0d53a78f59e1b0d8a5ecc8600aef99 | a99475cdbad59f94446436a55928c5fe129edd5a | refs/heads/master | 2020-12-15T03:07:04.037159 | 2020-02-03T00:07:14 | 2020-02-03T00:07:14 | 234,974,523 | 0 | 0 | null | 2020-02-03T00:07:15 | 2020-01-19T22:01:13 | null | UTF-8 | Java | false | false | 1,001 | java | package br.com.fiap.consumidortwo.config;
import java.util.List;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@EnableWebMvc
@Configuration
@ComponentScan("br.com.fiap.consumidortwo")
public class ConfigMainApp implements WebMvcConfigurer {
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
builder.indentOutput(true);
converters.add(new MappingJackson2HttpMessageConverter(builder.build()));
}
}
| [
"33814620+diegolribeiro@users.noreply.github.com"
] | 33814620+diegolribeiro@users.noreply.github.com |
ce3946ea2797a6b16bffea1f67300289a0ae0d1f | 1abb9c01a756335c7fb8057336e2d292e2eeaa61 | /app/src/main/java/com/magdales/swoosh/LeagueScreen.java | 47c87a9764665a402d894120a844f7db4f057749 | [] | no_license | alyssamgdls/Swoosh | 77818a676385bc044a11119f5c571cfe583e2079 | 78521285180b607270bb1858b38174df587b944f | refs/heads/master | 2021-01-15T23:59:24.190786 | 2017-08-11T14:17:06 | 2017-08-11T14:17:06 | 99,918,961 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,211 | java | package com.magdales.swoosh;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class LeagueScreen extends AppCompatActivity {
private Button btnLeague1;
private Button btnLeague2;
private Button btnLeague3;
private Button btnNext;
private TextView iAmA;
private TextView skillDisplay;
public static final int request_code = 2;
private int flag = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_league_screen);
btnNext = (Button) findViewById(R.id.next_btn);
btnLeague1 = (Button) findViewById(R.id.desired_league_button_1);
btnLeague2 = (Button) findViewById(R.id.desired_league_button_2);
btnLeague3 = (Button) findViewById(R.id.desired_league_button_3);
iAmA = (TextView) findViewById(R.id.iAm);
skillDisplay = (TextView) findViewById(R.id.skill);
btnLeague1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
btnNext.setEnabled(true);
btnNext.setAlpha(1);
flag = 1;
}
});
btnLeague2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
btnNext.setEnabled(true);
btnNext.setAlpha(1);
flag = 2;
}
});
btnLeague3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
btnNext.setEnabled(true);
btnNext.setAlpha(1);
flag = 3;
}
});
btnNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i = new Intent(view.getContext(), SkillScreen.class);
startActivityForResult(i, request_code);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
if (requestCode == request_code) {
String message = data.getStringExtra(SkillScreen.skill_choice);
iAmA.setVisibility(View.VISIBLE);
skillDisplay.setVisibility(View.VISIBLE);
skillDisplay.setText(message);
btnNext.setVisibility(View.GONE);
if (flag != 1) {
btnLeague1.setAlpha(0.50f);
btnLeague1.setEnabled(false);
}
if (flag != 2) {
btnLeague2.setAlpha(0.50f);
btnLeague2.setEnabled(false);
}
if (flag != 3) {
btnLeague3.setAlpha(0.50f);
btnLeague3.setEnabled(false);
}
}
}
}
}
| [
"magdalesalyssa@yahoo.com"
] | magdalesalyssa@yahoo.com |
0d02011f43f3ef1de582fd6358bb059f556fa151 | 03855ad31e76be086bab7127dae9763cd9f97965 | /src/main/java/frc/robot/commands/drive/RotateToVisionTargetCommand.java | f9fd61d183806d7ae9fad5f9d0861e08e8310ef4 | [] | no_license | WolverineRobotics/FRC_2021_Robot | 2564c37c40d0b51f65ec783ecc62af2bdab257e5 | 6e3a56ced36c6fa0107930d58cae54a13347455c | refs/heads/master | 2022-07-12T10:58:30.398751 | 2020-05-15T15:43:09 | 2020-05-15T15:43:09 | 264,232,867 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,538 | java | package frc.robot.commands.drive;
import edu.wpi.first.wpilibj.smartdashboard.SendableBuilder;
import edu.wpi.first.wpilibj2.command.CommandBase;
import edu.wpi.first.wpiutil.math.MathUtil;
import frc.robot.constants.RobotConst.DriveConst;
import frc.robot.constants.RobotConst.PIDConst;
import frc.robot.exceptions.NTNullEntryException;
import frc.robot.subsystems.CameraSubsystem;
import frc.robot.subsystems.CameraSubsystem.CameraMode;
import frc.robot.subsystems.CameraSubsystem.LEDMode;
import frc.robot.subsystems.DriveSubsystem;
public class RotateToVisionTargetCommand extends RotateToHeadingProfiledCommand {
private final CameraSubsystem s_camera;
private final DriveSubsystem s_drive;
// private final MedianPercentileFilter xMedianFilter;
// private final MedianPercentileFilter yMedianFilter;
private double kP = 0.016*1;
private double kI = PIDConst.DRIVE_TURN_KI*6*10;
private double kD = PIDConst.DRIVE_TURN_KD*3*4;
// private final int MEDIAN_FILTER_ENTRIES = 10;
protected final int CYCLES_UNTIL_CHECK_FINISHED = 10;
private final double MIN_PERCENT_TARGETS_FOUND = 0.8;
// private final double MAX_IQR_X = 20;
/**
* The max acceptable error, in degree. If the error is below this, it will be
* concidered on target (although it may still try to correct that error).
*/
private final double TARGET_ERROR = 0.9;
// Any targets with y-values below this value will be treated as false
// positives.
// private final double Y_VALUE_CUTOFF = -20;
protected int totalCycles = 0;
protected int numFound = 0;
private boolean finished = false;
public RotateToVisionTargetCommand(CameraSubsystem cameraSubsystem, DriveSubsystem driveSubsystem) {
// System.out.println("STARTING ROTATE TO VISION TARGET COMMAND =============================");
super(driveSubsystem, 0);
s_camera = cameraSubsystem;
s_drive = driveSubsystem;
addRequirements(cameraSubsystem);
// addRequirements(driveSubsystem);
// xMedianFilter = new MedianPercentileFilter(MEDIAN_FILTER_ENTRIES);
// yMedianFilter = new MedianPercentileFilter(MEDIAN_FILTER_ENTRIES);
s_drive.setDeadband(0);
}
@Override
public void initialize() {
super.initialize();
s_camera.setLEDMode(LEDMode.ON);
s_camera.setCameraMode(CameraMode.VISION);
getController().setSetpoint(0);
getController().setPID(kP, kI, kD);
getController().setTolerance(0.6, 0.2);
}
// Called every time the scheduler runs while the command is scheduled.
// @Override
// public void execute() {
// // System.out.println("ROTATE TO VISION TARGET COMMAND");
// try {
// double xDegOff = s_camera.getXDegOff();
// // double yDegOff = s_camera.getYDegOff();
// // Test if target is within acceptable y values. If not, mark and return.
// // if (yDegOff < Y_VALUE_CUTOFF) {
// // noValidTargetFound(true);
// // return;
// // }
// // double xGyroHeading = Util.addGyroValues(xDegOff, s_drive.getPigeonHeading());
// // double xMedian, yMedian;
// // xMedian = xMedianFilter.calculate(xGyroHeading);
// // yMedian = yMedianFilter.calculate(yDegOff);
// // xMedian = xDegOff;
// // yMedian = yDegOff;
// // Pass xMedian to gyro PID
// // s_drive.rotateGyroAngle(xMedian);
// // double angleDifferance = Util.subtractGyroValues(xMedian, s_drive.getPigeonHeading());
// double angleDifferance = xDegOff;
// // double pGain = calculatePGain(angleDifferance);
// // pGain += 0.068 * Math.signum(pGain);
// // pGain = MathUtil.clamp(pGain, -.4, .4);
// // s_drive.arcadeDrive(0, - pGain, false);
// } catch (NTNullEntryException exception) {
// System.out.println(exception.getMessage());
// noValidTargetFound(false);
// }
// }
@Override
public double getCurrentAngle() {
try{
return s_camera.getXDegOff();
}catch(Exception e){
System.err.println("No Vision Target Found");
return 0;
}
}
private double calculatePGain(double gyroError){
return gyroError * kP;
}
public boolean isOnTarget() {
// Could alternatively use the medianFilter for this
try {
double xError = Math.abs(s_camera.getXDegOff());
return xError < TARGET_ERROR;
} catch (NTNullEntryException e) {
return false;
}
}
private double updatePercentTargets(boolean found) {
totalCycles++;
if (found) {
numFound++;
}
return numFound / totalCycles;
}
private double getPercentTargets() {
return numFound / totalCycles;
}
/**
* Called when no vision target was found.
*
* @param invalidTarget True if a target was found but concidered invalid
*/
private void noValidTargetFound(boolean invalidTarget) {
updatePercentTargets(false);
}
/**
* Call when you want this command to finish. If it can find a vision target, it
* will continue rotating to it until this is called. If it can't find a vision
* target, it will finish on its own
*/
public void setFinished() {
finished = true;
}
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
s_drive.setForwardSpeed(0);
s_drive.setDeadband(DriveConst.DRIVE_THORTTLE_TRIGGER_VALUE);
s_camera.setLEDMode(LEDMode.OFF);
s_camera.setCameraMode(CameraMode.DRIVER);
}
// Returns true when the command should end.
@Override
public boolean isFinished() {
// Code if no vision target
if (totalCycles >= CYCLES_UNTIL_CHECK_FINISHED) {
if (getPercentTargets() < MIN_PERCENT_TARGETS_FOUND) {
return true;
}
// Ends if IQR is above a certain range
// if (xMedianFilter.getInterquartileRange() > MAX_IQR_X) {
// return true;
// }
}
return finished;
}
@Override
public void initSendable(SendableBuilder builder) {
super.initSendable(builder);
}
}
| [
"thomasjosif@users.noreply.github.com"
] | thomasjosif@users.noreply.github.com |
4b584ebb1c5b25faa94db9b5473755d16f211af8 | 3abb649178da276b48ed8dcd40fe36595b55153e | /Code demos/CS417EnumerationsCreationalPatterns/src/edu/ccsu/cs417/builder/vehicle/MotorVehicleDirector.java | aa4a3384aa0be564d29530b642051870f7660df2 | [
"MIT"
] | permissive | CCSU-CS417F17/CS417F17CourseInfo | b088809c38cf946677bc04365c0dd75f4c8cffaf | abea16783c917cb6eb8eba242b2f8ab0e2d97871 | refs/heads/master | 2021-01-19T18:25:31.933700 | 2017-11-27T21:24:11 | 2017-11-27T21:24:11 | 101,135,446 | 6 | 2 | null | 2017-11-08T19:49:54 | 2017-08-23T03:52:39 | Java | UTF-8 | Java | false | false | 1,937 | java | package edu.ccsu.cs417.builder.vehicle;
import java.util.Set;
/**
* Specifies how to con
*
* @author cw1491
*/
public class MotorVehicleDirector {
public static void build2DoorCar(MotorizedVehicle.MotorizedVehicleBuilder builder, Set<VehicleEnhancement> vehicleEnhancements) {
builder.addAxel(2);
builder.addAxel(2);
builder.addDoors(2);
builder.addSeats(2);
for (VehicleEnhancement e : vehicleEnhancements) {
builder.addEnhancement(e);
}
}
public static void build4DoorCar(MotorizedVehicle.MotorizedVehicleBuilder builder, Set<VehicleEnhancement> vehicleEnhancements) {
builder.addAxel(2);
builder.addAxel(2);
builder.addDoors(4);
builder.addSeats(4);
builder.addStorage(10);
for (VehicleEnhancement e : vehicleEnhancements) {
builder.addEnhancement(e);
}
}
public static void build18Wheeler(MotorizedVehicle.MotorizedVehicleBuilder builder, Set<VehicleEnhancement> vehicleEnhancements) {
builder.addAxel(2);
builder.addAxel(4);
builder.addAxel(4);
builder.addAxel(4);
builder.addAxel(4);
builder.addDoors(2);
builder.addSeats(2);
builder.addStorage(1000);
for (VehicleEnhancement e : vehicleEnhancements) {
builder.addEnhancement(e);
}
}
public static void buildMotorcycle(MotorizedVehicle.MotorizedVehicleBuilder builder, Set<VehicleEnhancement> vehicleEnhancements) {
builder.addAxel(1);
builder.addAxel(1);
builder.addSeats(1);
for (VehicleEnhancement e : vehicleEnhancements) {
builder.addEnhancement(e);
}
}
public static void buildHatchback(MotorizedVehicle.MotorizedVehicleBuilder builder, Set<VehicleEnhancement> vehicleEnhancements) {
builder.addAxel(2);
builder.addAxel(2);
builder.addDoors(5);
builder.addSeats(4);
builder.addStorage(30);
for (VehicleEnhancement e : vehicleEnhancements) {
builder.addEnhancement(e);
}
}
}
| [
"chadgit13@gmail.com"
] | chadgit13@gmail.com |
e780179460fe45878155b6c809576c4ccfa15146 | a358b9752152f6e37c5788516d710f65aa70b823 | /app/src/main/java/com/vivid/myshop/foryou/foryouAdopter.java | 9751a4403864e2b046c0e416431fc3a58c2b9613 | [] | no_license | anilkr1997/MyShop | fadd4fbc6c68d37421d9150d37d33745bf192ab1 | eba355febadd294ca405fb168cc03f224bf29391 | refs/heads/master | 2022-12-17T23:31:58.979933 | 2020-09-24T11:31:02 | 2020-09-24T11:31:02 | 298,258,576 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 743 | java | package com.vivid.myshop.foryou;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
public class foryouAdopter extends RecyclerView.Adapter<foryouAdopter.MyViewHolder> {
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return null;
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return 0;
}
public class MyViewHolder extends RecyclerView.ViewHolder {
public MyViewHolder(@NonNull View itemView) {
super(itemView);
}
}
}
| [
"49671388+anilkr1997@users.noreply.github.com"
] | 49671388+anilkr1997@users.noreply.github.com |
d25f8f6e6c9daf8c08a75fe5baca4e2dd74a4d16 | 9ba92e356a58ad003941f886c9d4a1f386b16d85 | /src/main/java/com/dmavrotas/pts/api/models/VisitLog.java | a7fb319e2e084900f77d174edb447e49f600e89d | [] | no_license | dmavrotas/pts-api | 1c51a1b50ca6d46f477ddca24f00750df70f6570 | a8fcc2e667c6f287ec7205947fbdbf52ce8710e1 | refs/heads/master | 2022-02-25T20:32:03.939424 | 2022-02-13T19:23:30 | 2022-02-13T19:23:30 | 236,802,294 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,600 | java | package com.dmavrotas.pts.api.models;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import javax.persistence.*;
import java.time.LocalDateTime;
@Entity
@Table(name = "visit_log")
public class VisitLog extends AbstractEntity
{
@ManyToOne
@JoinColumn(name = "parking_id")
private Parking parking;
@ManyToOne
@JoinColumn(name = "car_id")
private Car car;
@Column(name = "entry_time")
private LocalDateTime entryTime;
@Column(name = "exit_time")
private LocalDateTime exitTime;
public Parking getParking()
{
return parking;
}
public void setParking(Parking parking)
{
this.parking = parking;
}
public Car getCar()
{
return car;
}
public void setCar(Car car)
{
this.car = car;
}
public LocalDateTime getEntryTime()
{
return entryTime;
}
public void setEntryTime(LocalDateTime entryTime)
{
this.entryTime = entryTime;
}
public LocalDateTime getExitTime()
{
return exitTime;
}
public void setExitTime(LocalDateTime exitTime)
{
this.exitTime = exitTime;
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (!(o instanceof VisitLog))
{
return false;
}
VisitLog visitLog = (VisitLog) o;
return new EqualsBuilder()
.append(id, visitLog.id)
.append(parking, visitLog.parking)
.append(car, visitLog.car)
.append(entryTime, visitLog.entryTime)
.append(exitTime, visitLog.exitTime)
.isEquals();
}
@Override
public int hashCode()
{
return new HashCodeBuilder(17, 37)
.append(id)
.append(parking)
.append(car)
.append(entryTime)
.append(exitTime)
.toHashCode();
}
@Override
public String toString()
{
return new ToStringBuilder(this)
.append("id", id)
.append("parking", parking)
.append("car", car)
.append("entryTime", entryTime)
.append("exitTime", exitTime)
.toString();
}
}
| [
"dionysios.mavrotas@kcitylabs.fr"
] | dionysios.mavrotas@kcitylabs.fr |
cfcf0e22c5e052e99f7307185c41977b40f4e9f8 | 802103b5bc696ebe934be7a9761cd247a31d6c47 | /src/main/java/com/dp/behavioural/strategy/BubbleSort.java | a8a991ef30a9a78cf5ed23613ce67c1a14717d13 | [] | no_license | KetanMirg/DesignPatternRepo | c331d88dabc64c6746aa9a0168eba50d98f8d44e | def34f4561a4ea28a3799e3b1ccb3ed28202a1d5 | refs/heads/master | 2022-04-13T18:01:52.159508 | 2020-04-14T10:09:44 | 2020-04-14T10:09:44 | 255,576,907 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 182 | java | package com.dp.behavioural.strategy;
public class BubbleSort implements SortStratergy{
@Override
public void sort() {
System.out.println("BubbleSort.sort");
}
}
| [
"ketan.mirg@kronos.com"
] | ketan.mirg@kronos.com |
1f579f606191c8c83cf933b9e7e2044dc0fc253a | b7b4b08c9a6c20aca394390ce93687e484a3cfa7 | /Last Group Project/mastermind2.java | 24e1faa62eb9de17102dd8aa931e48140b71bbfb | [] | no_license | moonkhan12/Projects | fc494d3d2d1b1ad3393563ede71e85a5d0ce2bcd | 8b1fe6191480c75b8dbebfa58adb24193ec373c7 | refs/heads/main | 2023-04-26T20:18:00.478533 | 2021-05-27T17:53:04 | 2021-05-27T17:53:04 | 357,923,902 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 19,473 | java | // Simulation of the Mastermind game
import java.awt.*;
import java.io.*;
import java.applet.*;
public class mastermind2 extends Applet
{
private Button Game1,Game2;
final int INITIAL_MODE = 1;
final int PLAYER_GUESSES = 2;
final int COMPUTER_GUESSES1 = 3;
final int COMPUTER_GUESSES2 = 4;
final int COMPUTER_GUESSES3 = 5;
private int mode = INITIAL_MODE;
static final Font textFont=new Font("Helvetica", Font.PLAIN, 14);
int actual = 0; // The actual combination
// These variables are used when the player makes an attempt at a colour combination
int colourChosen = 0; // Which colour the player has chosen when assembly his/her try
int[] choice = new int[4];
int numBlacks, numWhites;
int guessesSoFar[] = new int[20]; // Previous guesses by the user are stored here
int scoresSoFar[] = new int[20]; // ... along with the scores they elicited
int numSoFar = -1; // The number of previous guesses stored (-1 means "none")
boolean found = false;
// These variables are used when the computer makes an attempt at a colour combination
int myGuess;
boolean firstTime = true;
int possibles[] = new int[700]; // Store the possible combination identities ready for pruning
int numPossibles = 0;
int base = 0; // Base index when displaying list of possible combinations
public void init ()
{ setBackground(Color.white);
setFont(textFont);
Game1 = new Button("I try to guess your combination");
add(Game1);
Game2 = new Button("You try to guess my combination");
add(Game2);
for (int i = 0; i < 4; i++)
choice[i] = 0;
}
//////////////// THE FOLLOWING METHODS HANDLE THE DISPLAY SCREENS //////////////
public void paint (Graphics g)
{ switch (mode)
{ case INITIAL_MODE : display_initial_screen(g); break;
case COMPUTER_GUESSES1 : display_computer_guesses_screen1(g); break;
case COMPUTER_GUESSES2 : display_computer_guesses_screen2(g); break;
case COMPUTER_GUESSES3 : display_computer_guesses_screen3(g); break;
case PLAYER_GUESSES : display_player_guesses(g); break;
}
}
public void display_initial_screen (Graphics g)
{ g.drawString("Please click on one of the icons above.",100,100);
g.drawString("The left icon lets you think of a combination,",100,130);
g.drawString("and then the computer tries to guess it.",100,150);
g.drawString("The right icon gets the computer to think",100,180);
g.drawString("of a combination and you have to guess it.",100,200);
}
// This is the initial screen telling the player to pick a combination
public void display_computer_guesses_screen1 (Graphics g)
{ g.drawString("Right, please think of a combination of four colours.",30,100);
g.drawString("You can use",30,115);
g.drawString("You can the colours more than once.",30,130);
g.drawString("When you have thought of your combination, write it down",30,190);
g.drawString("and click here!",100,220);
g.drawRect(98,205,100,20);
g.setColor(Color.red);
g.drawString("red",120,115);
g.setColor(Color.yellow);
g.drawString("yellow",160,115);
g.setColor(Color.green);
g.drawString("green",200,115);
g.setColor(Color.blue);
g.drawString("blue",240,115);
g.setColor(Color.magenta);
g.drawString("pink",280,115);
g.setColor(Color.gray);
g.drawString("grey",320,115);
}
// This is the screen where the computer displays its guess of the player's combination
public void display_computer_guesses_screen2 (Graphics g)
{ displayPattern(g,myGuess,200,50);
g.setColor(Color.black);
g.drawString("Here's my guess. Please tell me what it scores.",300,65);
g.drawString("You increase/decrease the number of black and white pegs",200,100);
g.drawString("using the arrows. Click on Done when the figures are right.",200,115);
g.drawString("Black pegs (right colour in the right place)",200,150);
leftArrow(g,500,135);
//g.drawRect(500,135,20,20);
//g.drawLine(520,135,500,145);
//g.drawLine(500,145,520,155);
rightArrow(g,550,135);
//g.drawRect(550,135,20,20);
//g.drawLine(550,135,570,145);
//g.drawLine(570,145,550,155);
g.drawString(Integer.toString(numBlacks),535,150);
g.drawString("White pegs (right colour in the wrong place)",200,180);
leftArrow(g,500,165);
// g.drawRect(500,165,20,20);
//g.drawLine(520,165,500,175);
//g.drawLine(500,175,520,185);
rightArrow(g,550,165);
//g.drawRect(550,165,20,20);
//g.drawLine(550,165,570,175);
//g.drawLine(570,175,550,185);
g.drawString(Integer.toString(numWhites),535,180);
g.drawString("Done",540,210);
g.drawRect(538,197,40,16);
if (firstTime == false)
displayGuesses(g);
}
// Draw a left-pointing arrow at a given top-left x,y co-ordinate
public void leftArrow (Graphics g, int x, int y)
{ g.drawRect(x,y,20,20);
g.drawLine(x+20,y,x,y+10);
g.drawLine(x,y+10,x+20,y+20);
}
// Ditto a right-pointing arrow
public void rightArrow (Graphics g, int x, int y)
{ g.drawRect(x,y,20,20);
g.drawLine(x,y,x+20,y+10);
g.drawLine(x+20,y+10,x,y+20);
}
// Display the (still) compatible possibility list. The player can click on Done to move on
public void display_computer_guesses_screen3 (Graphics g)
{ g.setColor(Color.black);
switch (numPossibles)
{ case 1 : g.drawString("Hooray! I have found it!",200,50);
displayPattern(g,possibles[0],400,50);
g.setColor(Color.black);
g.drawString("If this isn't your combination, you must have made a mistake!",200,100);
g.drawString("Please click on a button above to play another game.",200,150);
break;
case 0 : g.drawString("You must have made a mistake!",200,100);
g.drawString("Please click on a button above to play another game.",200,150);
break;
default :
g.drawString("I have ruled it down to " + Integer.toString(numPossibles) + " possibilities.",200,50);
// Display the first X possible combinations
for (int x = 0; x < 4; x++)
for (int y = 0; y < 6; y++)
{ int which = x*6 + y;
if (which + base < numPossibles)
displayPattern(g,possibles[which + base], 200 + 95 * x, 60 + 32 * y);
}
g.setColor(Color.black);
if (numPossibles > 24)
{ leftArrow(g,200,255);
rightArrow(g,480,255);
g.drawString("Click on the arrows to see more, or on Done to continue",200,295);
}
else
g.drawString("Click on Done to continue",200,295);
g.drawString("Done",320,270);
g.drawRect(317,257,40,16);
displayGuesses(g);
}
}
public void display_player_guesses (Graphics g)
{ int i;
g.drawString("I have thought of a combination. Can you work it out?",10,50);
for (i = 0; i < 4; i++)
{ g.setColor(Color.black);
g.drawRect(300+20*i,100,20,20);
if (choice[i] > 0)
{ setTheColor(g,choice[i]);
g.fillRect(301+20*i,101,18,18);
}
}
if (found == false)
{ g.setColor(Color.black);
g.drawString("Click on colours below,",300,140);
g.drawString("then on the squares",300,155);
g.drawString("above to set the pattern",300,170);
g.drawString("Then click on Done.",300,185);
for (i = 1; i < 7; i++)
{ setTheColor(g,i);
g.fillRect(280+20*i,200,20,20);
}
g.setColor(Color.black);
g.drawString("Done",302,238);
g.drawRect(300,225,40,16);
if (colourChosen > 0)
{ int x = 280+20*colourChosen;
g.drawLine(x,200,x+20,220);
g.drawLine(x,220,x+20,200);
}
}
else
{ g.setColor(Color.black);
g.drawString("Well done! You have found",300,140);
g.drawString("my combination.",300,155);
g.drawString("Click on one of the buttons",300,170);
g.drawString("above to play again.",300,185);
}
displayGuesses(g); // Display any previous guesses the player has made.
}
// Display the list of guesses tried so far together with their scores
public void displayGuesses (Graphics g)
{ if (numSoFar > -1)
{ g.setColor(Color.black);
if (mode < COMPUTER_GUESSES1)
g.drawString("Your guess Score",10,70);
else
g.drawString("My guess Score",10,70);
for (int i = 0; i <= numSoFar; i++)
{ displayPattern(g,guessesSoFar[i],10,75 + 28 * i);
displayScore(g,scoresSoFar[i],110,78 + 28 * i);
}
}
}
// Display a chosen pattern encoded as a number at a given x,y position
public void displayPattern (Graphics g, int value, int x, int y)
{ int v[] = new int[4];
int i;
// Firstly decode the encoded pattern
for (i = 0; i < 4; i++)
{ v[i] = value % 10;
value /= 10;
}
g.setColor(Color.black);
g.drawRect(x,y,90,24);
// Now draw the spots themselves
for (i = 0; i < 4; i++)
if (v[i] > 0)
{ setTheColor(g,v[i]);
g.fillOval(x + 2 + 22 * i,y + 2,20,20);
}
}
// Display a score encoded in the form of 10*blacks+whites at position x,y
public void displayScore (Graphics g, int value, int x, int y)
{ int b = value / 10, w = value % 10;
int i;
g.setColor(Color.black);
for (i = 0; i < b+w; i++)
if (i < b)
g.fillOval(x+i*10 + 3,y+5,8,8);
else
g.drawOval(x+i*10 + 3,y+5,8,8);
g.drawRect(x,y,45,18);
}
public void setTheColor (Graphics g, int colour)
{ switch (colour)
{ case 1 : g.setColor(Color.red); break;
case 2 : g.setColor(Color.yellow); break;
case 3 : g.setColor(Color.green); break;
case 4 : g.setColor(Color.blue); break;
case 5 : g.setColor(Color.magenta); break;
case 6 : g.setColor(Color.lightGray); break;
}
}
///// END OF THE DISPLAY METHODS. THE FOLLOWING METHODS HAND BUTTON CLICKS ////////
public boolean action (Event e, Object arg)
{ if (e.target == Game1)
{ mode = COMPUTER_GUESSES1;
myGuess = randomCombination(); // The computer's first guess is always random
firstTime = true; // The computer behaves differently for the first guess
numSoFar = -1; // Computer stores its guesses just as the human does
repaint();
}
if (e.target == Game2)
{ mode = PLAYER_GUESSES;
actual = randomCombination();
numSoFar = -1;
found = false;
for (int i = 0; i < 4; i++)
choice[i] = 0;
repaint();
}
return true;
}
// The exact function of this method depends on the screen mode
public boolean mouseDown (Event event,int x, int y)
{ switch (mode)
{ case COMPUTER_GUESSES1 : cgMouseDown1(x,y); break;
case COMPUTER_GUESSES2 : cgMouseDown2(x,y); break;
case COMPUTER_GUESSES3 : if (numPossibles > 1)
cgMouseDown3(x,y); break;
case PLAYER_GUESSES : pgMouseDown(x,y); break;
}
return true;
}
// Deal with button clicks when the computer is guessing the pattern. This tackles the initial
// screen telling the player to pick a combination. There is only one place the player can click
public void cgMouseDown1 (int x, int y)
{ if (x > 98 && y > 205 && x < 198 && y < 225)
{ mode = COMPUTER_GUESSES2;
numBlacks = numWhites = 0;
repaint();
}
}
// Get the player to click on arrows to specify the number of blacks and whites, then on Done
public void cgMouseDown2 (int x, int y)
{ boolean redraw = false; // True if the screen needs to be redrawn as a result of this
if (x > 500 && y > 135 && x < 520 && y < 155 && numBlacks > 0)
{ numBlacks--;
redraw = true;
}
if (x > 550 && y > 135 && x < 570 && y < 155 && numBlacks+numWhites < 4)
{ numBlacks++;
redraw = true;
}
if (x > 500 && y > 165 && x < 520 && y < 185 && numWhites > 0)
{ numWhites--;
redraw = true;
}
if (x > 550 && y > 165 && x < 570 && y < 185 && numBlacks+numWhites < 4)
{ numWhites++;
redraw = true;
}
if (x > 538 && y > 197 && x < 578 && y < 213)
{ mode = COMPUTER_GUESSES3; // Moved on to the next stage
redraw = true;
storeGuess(myGuess); // Store the guess ready for displaying next time
if (firstTime == true)
constructListOfPossibles();
else
pruneListOfPossibles();
firstTime = false;
base = 0; // Ready for next display
}
if (redraw == true)
repaint();
}
// The players is viewing the list of possibles, click on the arrows to move or on Done
public void cgMouseDown3 (int x, int y)
{ boolean redraw = false;
if (x > 200 && y > 255 && x < 220 && y < 275 && base > 23) // Left arrow
{ base -= 24;
redraw = true;
}
int lim = (numPossibles / 24) * 24; // numPossibles rounded down to nearest multiple of 24
if (x > 480 && y > 255 && x < 500 && y < 275 && base < lim) // Right arrow
{ base += 24;
redraw = true;
}
if (x > 320 && y > 260 && x < 360 && y < 376) // Clicked on Done, so present new combination
{ mode = COMPUTER_GUESSES2;
myGuess = possibles[0]; // New combination is first of the possible list
redraw = true;
}
numBlacks = numWhites = 0; // Ready for the next guess
if (redraw == true)
repaint();
}
// Construct the list of possible combinations based on myGuess, numBlacks and numWhites
public void constructListOfPossibles ()
{ numPossibles = 0;
int tempBlacks = numBlacks; // Keep a copy of these as numBlacks, numWhites will be changed
int tempWhites = numWhites;
for (int col1 = 1; col1 <= 6; col1++)
for (int col2 = 1; col2 <= 6; col2++)
for (int col3 = 1; col3 <= 6; col3++)
for (int col4 = 1; col4 <= 6; col4++)
{ int encoded = 1000 * col1 + 100 * col2 + 10 * col3 + col4;
compare(encoded,myGuess); // Is my current guess compatible with that combination?
if (numBlacks == tempBlacks && numWhites == tempWhites)
{ numPossibles++; // If so, add it to the list
possibles[numPossibles-1] = encoded;
}
}
numBlacks = tempBlacks; // Restore these values
numWhites = tempWhites;
}
// Prune the existing list of possible combinations based on myGuess, numBlacks and numWhites
public void pruneListOfPossibles ()
{ int index = 0;
int tempBlacks = numBlacks, tempWhites = numWhites; // Store copy as originals will be changed
while (index < numPossibles)
{ compare(possibles[index],myGuess);
if (tempBlacks != numBlacks || tempWhites != numWhites) // Not compatible, so delete
{ if (index < numPossibles-1) // If not at end of list, shuffling necessary
for (int x = index; x < numPossibles-1; x++)
possibles[x] = possibles[x+1];
numPossibles--; // One fewer item on the list
}
else
index++; // Otherwise, move to next item and compare that
}
numBlacks = tempBlacks; // Restore original values
numWhites = tempWhites;
}
// Deal with button clicks when the player is guessing the pattern
public void pgMouseDown (int x, int y)
{ // Firstly decide whether the mouse has been clicked on the colour palette
int i;
boolean redraw = false; // True if the screen has to be redrawn
for (i = 1; i < 7; i++)
if (x > 280+20*i && y > 200 && x < 300+20*i && y < 320 && found == false)
{ colourChosen = i;
redraw = true;
}
// Now decide if it has been clicked over place where player's choice is built up
for (i = 0; i < 4; i++)
if (x > 300+20*i && y > 100 && x < 320+20*i && y < 120 && colourChosen > 0 && found == false)
{ choice[i] = colourChosen;
redraw = true;
}
// Detect whether mouse has been clicked over Done. If so, encode the player's pattern,
// perform the comparison, and display the results
if (x > 300 && y > 225 && x < 340 && y < 241 && found == false)
{ int encoded = 1000 * choice[3] + 100 * choice[2] + 10 * choice[1] + choice[0];
compare(actual,encoded);
storeGuess(encoded); // Add the pattern and the score to the list of guesses and scores so far
if (numBlacks == 4)
found = true;
redraw = true;
}
if (redraw == true)
repaint();
}
// Add the guess and score, whether human's or computer's, to the list of guesses & scores so far.
public void storeGuess (int encoded)
{ if (numSoFar < 7)
numSoFar++;
else
for (int i = 0; i < 7; i++) // Reached the end so shuffle them all up
{ guessesSoFar[i] = guessesSoFar[i+1];
scoresSoFar[i] = scoresSoFar[i+1];
}
guessesSoFar[numSoFar] = encoded;
scoresSoFar[numSoFar] = 10 * numBlacks + numWhites;
}
///// END OF THE BUTTON CLICK METHODS. THE FOLLOWING HANDLE THE GAME ITSELF ////////////
// Compare the actual and a test combination
// The number of blacks and whites are stored as global variables as Java doesn't seem to have
// reference variable passing &likethis.
public void compare (int actual, int test)
{ // Firstly decode actual and test patterns
int a[] = new int[4];
int t[] = new int[4];
int i,j;
for (i = 0; i < 4; i++)
{ a[i] = actual % 10;
actual /= 10;
t[i] = test % 10;
test /= 10;
}
// Check for blacks
numBlacks = 0;
for (i = 0; i < 4; i++)
if (a[i] == t[i])
{ numBlacks++;
a[i] = 43; // Dummy values
t[i] = 159;
}
// Check for whites
numWhites = 0;
for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++)
if (a[i] == t[j])
{ numWhites++;
a[i] = 197;
t[j] = 253;
}
}
public int randomCombination ()
{ int v = 0;
for (int i = 0; i < 4; i++)
v = v * 10 + (int)(Math.random() * 6 + 1);
return v;
}
} | [
"noreply@github.com"
] | moonkhan12.noreply@github.com |
889b7c7b93a2271bbbd1635841e8efa8e83dc96a | 5e589e41845737ee8df7530037f9217974e91ce3 | /Labs/Objective4Lab1.java | 2c9881062154619ffc25253d8732b2ff6d37fb62 | [] | no_license | CAS2015/SDPre | 73580c26d7b554be8388f64c7cb16524f1615392 | acd885189d115685ce8f3f3244af26f165878e83 | refs/heads/main | 2023-02-04T19:00:01.972140 | 2020-12-15T19:21:29 | 2020-12-15T19:21:29 | 318,646,176 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,055 | java | import java.util.Scanner;
public class Objective4Lab1 {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
String fName = "";
String lName = "";
String favoriteAnimal = "";
String favoriteFood = "";
String favoriteSong = "";
System.out.println("What is your first name?");
fName = keyboard.nextLine();
System.out.println("What is your last name?");
lName = keyboard.nextLine();
System.out.println("What is your favorite animal?");
favoriteAnimal = keyboard.nextLine();
System.out.println("What is your favorite food?");
favoriteFood = keyboard.nextLine();
System.out.println("What is your favorite song?");
favoriteSong = keyboard.nextLine();
System.out.println("My name is " + fName + " " + lName + ".");
System.out.println("My favorite animal is the " + favoriteAnimal + ".");
System.out.println("My favorite food is " + favoriteFood + ".");
System.out.println("My favorite song is " + favoriteSong + ".");
keyboard.close();
}
}
| [
"chelseyann2119@gmail.com"
] | chelseyann2119@gmail.com |
5a82284afb5066092a4640d7b13fa6af931e97fc | 929b89bb64145b35d4c35e8aabd8d309cffd0140 | /src/edu/ufp/inf/sd/rmi/_06_visitor/server/ElementsFoldersServer.java | 15d80063e3cf4ce8ad7bbf2743a2df3671a1976b | [] | no_license | ppinheiro99/SD | f457105436c597afb32590312bca3db8af076808 | b1a9b299b08b4ba6954bc432ceb61bc0698b6309 | refs/heads/master | 2023-06-01T13:18:04.076393 | 2021-05-21T19:32:09 | 2021-05-21T19:32:09 | 368,160,367 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,731 | java | package edu.ufp.inf.sd.rmi._06_visitor.server;
import edu.ufp.inf.sd.rmi.util.rmisetup.SetupContextRMI;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.rmi.RemoteException;
import java.rmi.registry.Registry;
import java.util.Properties;
import java.util.function.BiConsumer;
import java.util.logging.Level;
import java.util.logging.Logger;
/* public class ElementsFoldersServer {
public static final String SERVICE_NAME_ELEMENT_STATE_BOOKS = "rmi://localhost:1098/VisitorBooksService";
public static final String SERVICE_NAME_ELEMENT_STATE_MAGAZINES = "rmi://localhost:1098/VisitorMagazinesService";
public ElementFolderRI elementBooksRI;
public ElementFolderRI elementMagazinesRI;
public static void main(String[] args) {
try {
// Create and install a security manager
if(System.getSecurityManager() == null){
System.setSecurityManager(new SecurityManager());
}
// String hostIP = InetAddress.getLocalHost().getHostAdress();
System.out.println("ElementFolderServer - Constructor(): register " + SERVICE_NAME_ELEMENT_STATE_BOOKS);
System.out.println("ElementFolderServer - Constructor(): register " + SERVICE_NAME_ELEMENT_STATE_MAGAZINES);
Naming.rebind(SERVICE_NAME_ELEMENT_STATE_BOOKS, elementBooksRI);
Naming.rebind(SERVICE_NAME_ELEMENT_STATE_MAGAZINES, elementMagazinesRI);
System.out.println("ElementFolderServer - Constructor(): waiting for visitors...");
} catch (RemoteException | MalformedURLException e) {
Logger.getLogger(ElementsFoldersServer.class.getName()).log(Level.WARNING,e.toString());
}
}
*/
public class ElementsFoldersServer {
public static final String SERVICE_NAME_ELEMENT_STATE_BOOKS = "rmi://localhost:1098/VisitorBooksService";
public static final String SERVICE_NAME_ELEMENT_STATE_MAGAZINES = "rmi://localhost:1098/VisitorMagazinesService";
public ElementFolderRI elementBooksRI;
public ElementFolderRI elementMagazinesRI;
private SetupContextRMI contextRMI;
public static void main(String[] args) {
if (args != null && args.length < 3) {
System.err.println("usage: java [options] edu.ufp.sd._01_helloworld.server.HelloWorldServer <rmi_registry_ip> <rmi_registry_port> <service_name>");
System.exit(-1);
} else {
//1. ============ Create Servant ============
ElementsFoldersServer hws = new ElementsFoldersServer(args);
//2. ============ Rebind servant on rmiregistry ============
hws.rebindService();
}
}
public ElementsFoldersServer(String args[]) {
try {
//============ List and Set args ============
SetupContextRMI.printArgs(this.getClass().getName(), args);
String registryIP = args[0];
String registryPort = args[1];
String serviceName = args[2];
//============ Create a context for RMI setup ============
contextRMI = new SetupContextRMI(this.getClass(), registryIP, registryPort, new String[]{serviceName});
} catch (RemoteException e) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, e);
}
}
private void rebindService() {
try {
//Get proxy MAIL_TO_ADDR rmiregistry
Registry registry = contextRMI.getRegistry();
//Bind service on rmiregistry and wait for calls
if (registry != null) {
//============ Create Servant ============
elementBooksRI = new ConcreteElementFolderBooksImpl("C:\\Users\\ppinh\\IdeaProjects\\SD\\test\\Books");
//elementMagazinesRI = new ConcreteElementFolderMagazinesImpl("C:/Users/ppinh/IdeaProjects/SD/test/Magazines");
//Get service url (including servicename)
String serviceUrl = contextRMI.getServicesUrl(0);
Logger.getLogger(this.getClass().getName()).log(Level.INFO, "going MAIL_TO_ADDR rebind service @ {0}", serviceUrl);
//============ Rebind servant ============
//Naming.bind(serviceUrl, helloWorldRI);
registry.rebind(serviceUrl, elementBooksRI);
Logger.getLogger(this.getClass().getName()).log(Level.INFO, "service bound and running. :)");
} else {
//System.out.println("HelloWorldServer - Constructor(): create registry on port 1099");
Logger.getLogger(this.getClass().getName()).log(Level.INFO, "registry not bound (check IPs). :(");
//registry = LocateRegistry.createRegistry(1099);
}
} catch (RemoteException ex) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex);
}
}
private static void loadProperties() throws IOException {
Logger.getLogger(Thread.currentThread().getName()).log(Level.INFO, "goig MAIL_TO_ADDR load props...");
// create and load default properties
Properties defaultProps = new Properties();
FileInputStream in = new FileInputStream("defaultproperties.txt");
defaultProps.load(in);
in.close();
BiConsumer<Object, Object> bc = (key, value) ->{
System.out.println(key.toString()+"="+value.toString());
};
defaultProps.forEach(bc);
// create application properties with default
Properties props = new Properties(defaultProps);
FileOutputStream out = new FileOutputStream("defaultproperties2.txt");
props.store(out, "---No Comment---");
out.close();
}
}
| [
"ppinheiro99@hotmail.com"
] | ppinheiro99@hotmail.com |
28c9d05e26700401e78cfa2320a844fb8777b1ac | 1102652887cde253009db3b88e9295007735d79e | /src/main/java/com/noticeBoard/app/web/controllers/action/AddMessageController.java | 2cde7eb11ce0210fd08008f11bacfe01371960e4 | [] | no_license | h3tom/NoticeBoard | 9a62aaf4cfa5b5169f4f8d077a7c2ab767726c30 | 6ef7200c23b9b40a494e9a879fbabeb60e1cf87d | refs/heads/master | 2022-12-21T03:13:51.450200 | 2019-12-05T15:47:47 | 2019-12-05T15:47:47 | 208,603,946 | 0 | 0 | null | 2022-11-24T09:26:52 | 2019-09-15T14:12:48 | Java | UTF-8 | Java | false | false | 1,697 | java | package com.noticeBoard.app.web.controllers.action;
import com.noticeBoard.app.dto.AddMessageDTO;
import com.noticeBoard.app.services.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.security.Principal;
@Controller
@RequestMapping("/add-message")
public class AddMessageController {
private MessageService messageService;
@Autowired
public AddMessageController(MessageService messageService) {
this.messageService = messageService;
}
@GetMapping("/{receiver}")
public String prepareAddMessage(@PathVariable String receiver, Model model, Principal principal) {
AddMessageDTO messageDTO = new AddMessageDTO();
messageDTO.setSender(principal.getName());
messageDTO.setReceiver(receiver);
model.addAttribute("messageData", messageDTO);
return "addMessage";
}
@PostMapping
public String processAddMessage(@ModelAttribute("messageData") @Valid AddMessageDTO messageDTO,
BindingResult result) {
if (messageDTO.getReceiver().equals(messageDTO.getSender())) {
result.rejectValue("title",
null,
"You cannot send message to yourself");
return "addMessage";
}
if (result.hasErrors()) {
return "addMessage";
}
messageService.saveMessage(messageDTO);
return "redirect:/user-page/profile";
}
}
| [
"hein.tomasz@gmail.com"
] | hein.tomasz@gmail.com |
87dfb0764895d28411401e8b363bb019ff7eef8a | aa3ab3cff116e6d2fedcdc31b039ff678023b431 | /workspace/base/src/main/java/com/csys/parametrageachat/domain/GenericBaremeAppelOffre.java | fd0851a43835d676e76c288678328e455826b2e3 | [] | no_license | HassenBenSlima/Mini-Project-Java | 623981e9e6196996ec5be0cf1908fea26e64921d | cd5cf3c56229a1660898dce0b929fdbb791010ca | refs/heads/master | 2022-12-22T18:39:42.857902 | 2019-10-08T22:30:26 | 2019-10-08T22:30:26 | 133,140,428 | 0 | 0 | null | 2022-12-16T05:46:31 | 2018-05-12T11:38:47 | TSQL | UTF-8 | Java | false | false | 3,967 | 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.csys.parametrageachat.domain;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MapsId;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
/**
*
* @author Farouk
*/
@Entity
@Table(name = "generic_bareme_appel_offre")
@NamedQueries({
@NamedQuery(name = "GenericBaremeAppelOffre.findAll", query = "SELECT g FROM GenericBaremeAppelOffre g")})
public class GenericBaremeAppelOffre implements Serializable {
private static final long serialVersionUID = 1L;
@EmbeddedId
protected GenericBaremeAppelOffrePK genericBaremeAppelOffrePK;
@Basic(optional = false)
@NotNull
@Column(name = "note")
private int note;
@JoinColumn(name = "fk_bareme_appel_offre", referencedColumnName = "code", insertable = false, updatable = false)
@ManyToOne(optional = false)
private BaremeAppelOffre baremeAppelOffre;
@MapsId(value = "fkGenericCode")
@JoinColumn(name = "fk_generic_code", referencedColumnName = "code")
@ManyToOne(cascade = {CascadeType.PERSIST,CascadeType.MERGE})
private Generic generic;
public GenericBaremeAppelOffre() {
}
public GenericBaremeAppelOffre(GenericBaremeAppelOffrePK genericBaremeAppelOffrePK) {
this.genericBaremeAppelOffrePK = genericBaremeAppelOffrePK;
}
public GenericBaremeAppelOffre(GenericBaremeAppelOffrePK genericBaremeAppelOffrePK, int note) {
this.genericBaremeAppelOffrePK = genericBaremeAppelOffrePK;
this.note = note;
}
public GenericBaremeAppelOffre(int fkGenericCode, int fkBaremeAppelOffre) {
this.genericBaremeAppelOffrePK = new GenericBaremeAppelOffrePK(fkGenericCode, fkBaremeAppelOffre);
}
public GenericBaremeAppelOffrePK getGenericBaremeAppelOffrePK() {
return genericBaremeAppelOffrePK;
}
public void setGenericBaremeAppelOffrePK(GenericBaremeAppelOffrePK genericBaremeAppelOffrePK) {
this.genericBaremeAppelOffrePK = genericBaremeAppelOffrePK;
}
public int getNote() {
return note;
}
public void setNote(int note) {
this.note = note;
}
public BaremeAppelOffre getBaremeAppelOffre() {
return baremeAppelOffre;
}
public void setBaremeAppelOffre(BaremeAppelOffre baremeAppelOffre) {
this.baremeAppelOffre = baremeAppelOffre;
}
public Generic getGeneric() {
return generic;
}
public void setGeneric(Generic generic) {
this.generic = generic;
}
@Override
public int hashCode() {
int hash = 0;
hash += (genericBaremeAppelOffrePK != null ? genericBaremeAppelOffrePK.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof GenericBaremeAppelOffre)) {
return false;
}
GenericBaremeAppelOffre other = (GenericBaremeAppelOffre) object;
if ((this.genericBaremeAppelOffrePK == null && other.genericBaremeAppelOffrePK != null) || (this.genericBaremeAppelOffrePK != null && !this.genericBaremeAppelOffrePK.equals(other.genericBaremeAppelOffrePK))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.csys.parametrageachat.domain.GenericBaremeAppelOffre[ genericBaremeAppelOffrePK=" + genericBaremeAppelOffrePK + " ]";
}
}
| [
"Hassen.BenSlima"
] | Hassen.BenSlima |
79971235b9d31369116ddcf4b397846331105c43 | 4fa0e661abebcf27560baa5e1d8fd398074be95a | /src/kap6/Man.java | 8b95da848e5f40d17802a763d21ce71f9998a592 | [] | no_license | tfla/cs_eda016 | 66259c871b8be3cee553db7be288559faeba0251 | 432de36a2654d56d8f7ae4621bb14a4f4f9dd906 | refs/heads/master | 2021-01-25T07:34:56.501313 | 2013-02-17T20:58:53 | 2013-02-17T20:58:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 713 | java | import java.util.Random;
public class Man {
private static Random rand = new Random();
private double up;
private int startPos;
private int stopPos;
private int nbrSteps;
public Man(double upProb) {
up = upProb;
}
public void climb(int n) {
startPos = 2+rand.nextInt(n-2);
nbrSteps = 0;
int pos = startPos;
while (pos != 1 && pos != n) {
if (rand.nextDouble() < up) {
pos++;
}
else {
pos--;
}
nbrSteps++;
}
stopPos = pos;
}
public void report() {
System.out.println("Mannen började klättra på pinne " + startPos + ".");
System.out.println("Han slutade på pinne " + stopPos + ".");
System.out.println("Då hade han tagit " + nbrSteps + " steg.");
}
}
| [
"timmy@jotunheim.(none)"
] | timmy@jotunheim.(none) |
620b821d4831d25b42cf52d9937e537273bb8da6 | 95a6640659fdfd02709d3fc4a9e9f6ef516c79c4 | /server_open/TextClientThread.java | 34386d93eb0bd8e5e6c9ca7bfe09bc8e67f09dd2 | [] | no_license | nomadsystem/NOMADS | 1c2fffc0f55cd5a8f1b65cc5e393515453b93789 | 2ab738a023915f7e66f443bfaa3112266bc39cfe | refs/heads/master | 2021-05-01T00:12:48.664523 | 2013-11-16T19:47:26 | 2013-11-16T19:47:26 | 4,654,612 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,022 | java | import java.net.*;
import java.io.*;
public class TextClientThread extends Thread
{ private Socket socket = null;
private TextClient client = null;
private DataInputStream streamIn = null;
public TextClientThread(TextClient _client, Socket _socket)
{ client = _client;
socket = _socket;
open();
start();
}
public void open()
{ try
{ streamIn = new DataInputStream(socket.getInputStream());
}
catch(IOException ioe)
{ System.out.println("Error getting input stream: " + ioe);
client.stop();
}
}
public void close()
{ try
{ if (streamIn != null) streamIn.close();
}
catch(IOException ioe)
{ System.out.println("Error closing input stream: " + ioe);
}
}
public void run()
{ while (true)
{ try
{ client.handle(streamIn.readByte());
}
catch(IOException ioe)
{ System.out.println("Listening error: " + ioe.getMessage());
client.stop();
}
}
}
}
| [
"djtopper@gmail.com"
] | djtopper@gmail.com |
771f3cca2b0b78af8c51bc0b5faf30bfec53ae2a | cbe0129f7b3d137218274d9f5a5c26fb72743c54 | /SpringBoot企业级开发/源码/blog-comment/src/main/java/com/waylau/spring/boot/blog/service/CommentServiceImpl.java | 09f2eff98e452c6292d63f0af6af8878a7b7e83c | [] | no_license | TronQuick/Spring-Boot | 246fbf8f270b0391d70774a0cfd38eb21155c67f | d16fe030da76a3f975f5b2182707f3e9aaa08dd0 | refs/heads/master | 2022-06-27T07:11:39.140687 | 2019-08-07T09:28:55 | 2019-08-07T09:28:55 | 201,000,600 | 2 | 0 | null | 2022-06-21T01:37:06 | 2019-08-07T07:50:35 | JavaScript | UTF-8 | Java | false | false | 870 | java | package com.waylau.spring.boot.blog.service;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.waylau.spring.boot.blog.domain.Comment;
import com.waylau.spring.boot.blog.repository.CommentRepository;
/**
* Comment 服务.
*
* @since 1.0.0 2017年4月9日
* @author <a href="https://waylau.com">Way Lau</a>
*/
@Service
public class CommentServiceImpl implements CommentService {
@Autowired
private CommentRepository commentRepository;
/* (non-Javadoc)
* @see com.waylau.spring.boot.blog.service.CommentService#removeComment(java.lang.Long)
*/
@Override
@Transactional
public void removeComment(Long id) {
commentRepository.delete(id);
}
@Override
public Comment getCommentById(Long id) {
return commentRepository.findOne(id);
}
}
| [
"707500781@qq.com"
] | 707500781@qq.com |
8a8a96444041188efa6c233ec2d7e2dc8323abce | 9b01ffa3db998c4bca312fd28aa977f370c212e4 | /app/src/streamB/java/com/loki/singlemoduleapp/stub/SampleClass3419.java | a65fb24b91075de84a6bdccc5c22d92c7038a78f | [] | no_license | SergiiGrechukha/SingleModuleApp | 932488a197cb0936785caf0e73f592ceaa842f46 | b7fefea9f83fd55dbbb96b506c931cc530a4818a | refs/heads/master | 2022-05-13T17:15:21.445747 | 2017-07-30T09:55:36 | 2017-07-30T09:56:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package stub;
public class SampleClass3419 {
private SampleClass3420 sampleClass;
public SampleClass3419(){
sampleClass = new SampleClass3420();
}
public String getClassName() {
return sampleClass.getClassName();
}
} | [
"sergey.grechukha@gmail.com"
] | sergey.grechukha@gmail.com |
314a4615e0db072300b8e812b8256553acf0ac2a | c82f89b0e6d1547c2829422e7de7664b378c1039 | /src/com/hongyu/service/impl/SpecialtyPriceServiceImpl.java | 08e13c6d34f0107e1559cbc0c89221285bacebc0 | [] | no_license | chenxiaoyin3/shetuan_backend | 1bab5327cafd42c8086c25ade7e8ce08fda6a1ac | e21a0b14a2427c9ad52ed00f68d5cce2689fdaeb | refs/heads/master | 2022-05-15T14:52:07.137000 | 2022-04-07T03:30:57 | 2022-04-07T03:30:57 | 250,762,749 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 623 | java | package com.hongyu.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.grain.dao.BaseDao;
import com.grain.service.impl.BaseServiceImpl;
import com.hongyu.entity.SpecialtyPrice;
import com.hongyu.service.SpecialtyPriceService;
@Service("specialtyPriceServiceImpl")
public class SpecialtyPriceServiceImpl extends BaseServiceImpl<SpecialtyPrice, Long> implements SpecialtyPriceService {
@Resource(name="specialtyPriceDaoImpl")
public void setBaseDao(BaseDao<SpecialtyPrice, Long> baseDao) {
// TODO Auto-generated method stub
super.setBaseDao(baseDao);
}
}
| [
"925544714@qq.com"
] | 925544714@qq.com |
ba6624657b92c6ba82a50e7f0eb27ce9dc67a123 | 228826bd500f2dfe3ee3864df411729c25d977e1 | /ncyp/ncyp-company/scyp-common-sharding/src/main/java/com/ceying/common/enums/OrgLevelEnum.java | f3b4ccd2afe180553a8bb6c96502cff25629d84b | [] | no_license | jack-zdl/spring-cloud | af77c688b9b71569465239d48337fa18e8767a40 | 802a1ed0ef397123181ab183b35f729ed170354e | refs/heads/master | 2021-01-20T09:36:49.819289 | 2018-06-28T00:51:26 | 2018-06-28T00:51:26 | 90,262,017 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 726 | java | package com.ceying.common.enums;
/**
* Created by mzq on 2018/2/27.
*/
public enum OrgLevelEnum implements BaseEnum<OrgLevelEnum, String>{
//组织级别
PLATFORM("0","平台"),
LEVEL1("1","一级"),
LEVEL2("2","二级"),
LEVEL3("3","三级"),
LEVEL4("4","四级");
String key;
String value;
private OrgLevelEnum(String key, String value) {
this.key=key;
this.value=value;
}
@Override
public String getKey() {
return key;
}
public void setKey(String value) {
this.key = key;
}
@Override
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
| [
"zhangdelei000@gmail.com"
] | zhangdelei000@gmail.com |
4cde7a0acb478b06f9cca6b095cf682cedd55bda | 7ab46c8b4cc1f041d7a08f959c16b8b7dc353e2f | /appium-junit4-examples/src/test/java/com/web/pagemethods/HomePageMethods.java | b65825e0896609c29b0e3a7bcfbedeae1ba816e9 | [
"MIT"
] | permissive | sanchit1309/demo-java | 60e5e84f02e7caeca7a9d9f313877ce05e904382 | 1c4eda7a89692de3261c985c52965fea611d4d06 | refs/heads/master | 2023-03-07T04:35:46.665856 | 2021-02-17T13:04:09 | 2021-02-17T13:04:09 | 338,725,877 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 28,662 | java | package com.web.pagemethods;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.PageFactory;
import common.launchsetup.Config;
import common.utilities.ExcelUtil;
import common.utilities.VerificationUtil;
import common.utilities.WaitUtil;
import web.pageobjects.HomePageObjects;
public class HomePageMethods {
private WebDriver driver;
private HomePageObjects homePageObjects;
public HomePageMethods(WebDriver driver) {
this.driver = driver;
homePageObjects = PageFactory.initElements(driver, HomePageObjects.class);
WaitUtil.waitForAdToDisappear(driver);
}
public HomePageObjects getHomePageObjects() {
return homePageObjects;
}
public boolean clickFirstNews() {
boolean flag = false;
try {
WebBaseMethods.clickElementUsingJSE(homePageObjects.getFirstArticleLink());
WaitUtil.sleep(5000);
WebBaseMethods.switchChildIfPresent();
System.out.println(driver.getCurrentUrl());
if (driver.getCurrentUrl().contains("articleshow")) {
flag = true;
} else if (driver.getCurrentUrl().contains("primeshow")) {
WebBaseMethods.switchToParentClosingChilds();
WebBaseMethods.clickElementUsingJSE(homePageObjects.getArticleShowFromHomepage().get(0));
WaitUtil.sleep(5000);
WebBaseMethods.switchChildIfPresent();
if (driver.getCurrentUrl().contains("articleshow")) {
flag = true;
}
}
} catch (Exception e) {
e.printStackTrace();
}
return flag;
}
public List<String> getFirstFewHeadlines() {
List<String> newsUrls = new ArrayList<>();
List<WebElement> newsLink = new ArrayList<>();
try {
newsLink.add(homePageObjects.getFirstArticleLink());
newsLink.addAll(homePageObjects.getTopNewsLHS());
for (WebElement link : newsLink) {
newsUrls.add(link.getAttribute("href"));
}
} catch (Exception e) {
e.printStackTrace();
}
return newsUrls;
}
public boolean clickTopNewsMoreLink() {
boolean flag = false;
try {
WebBaseMethods.clickElementUsingJSE(homePageObjects.getTopNewsMoreLink());
WaitUtil.waitForLoad(driver);
WaitUtil.sleep(2000);
WebBaseMethods.scrollToBottom();
flag = true;
} catch (WebDriverException e) {
}
return flag;
}
public int getTopHeadlineDivs(String action) {
return homePageObjects.getTopHeadlinesDivs(action).size();
}
public int getTopSectionsArticleList(String action) {
return homePageObjects.getTopSectionsText(action).size();
}
public int checkLatestNewsListSize() {
int latestNewsListSize = 0;
try {
WaitUtil.explicitWaitByVisibilityOfAllElements(driver, 20, homePageObjects.getLatestNewsList());
latestNewsListSize = homePageObjects.getLatestNewsList().size();
} catch (WebDriverException e) {
e.printStackTrace();
}
return latestNewsListSize;
}
public List<String> getLatestNewsStories() {
List<String> titles = new ArrayList<>();
List<WebElement> li = homePageObjects.getLatestNewsList();
titles = VerificationUtil.getLinkHrefList(li);
return titles;
}
public void clickLatestNewsTab() {
WebBaseMethods.clickElementUsingJSE(homePageObjects.getLatestNewsTab());
}
public void clickMoreLatestNews() {
WebBaseMethods.clickElementUsingJSE(homePageObjects.getLatestNewsMoreLink());
WaitUtil.waitForLoad(driver);
}
public int checkMoreFromLatestNewsPage() {
WebBaseMethods.switchToChildWindow(1500);
WaitUtil.waitForLoad(driver);
WaitUtil.sleep(2000);
WebBaseMethods.scrollToBottom();
int size = homePageObjects.getMostViewedBusinessNews().size();
WebBaseMethods.switchToParentClosingChilds();
return size;
}
public void clickTopNewsSection() {
WebBaseMethods.clickElementUsingJSE(homePageObjects.getTopNewsTab());
}
public int checkTopNewsSectionSize() {
int size = 0;
try {
// WaitUtil.explicitWaitByVisibilityOfAllElements(driver, 20,
// homePageObjects.getTopNewsList());
size = homePageObjects.getTopNewsList().size();
} catch (Exception e) {
}
return size;
}
public List<String> getTopNewsStories() {
return VerificationUtil.getLinkHrefList(homePageObjects.getTopNewsList());
}
public List<Boolean> checkMoreFromTopNewsPage() {
Map<String, String> testData = ExcelUtil.getTestDataRow("TestDataSheet", "VerifySectionTopNews", 1);
String[] tabName = new String[] { testData.get("Text") };
List<Boolean> flags = new ArrayList<>();
try {
homePageObjects.getTopNewsMoreLink().click();
WaitUtil.waitForLoad(driver);
for (int i = 0; i < tabName.length; i++) {
try {
flags.add(true);
} catch (NoSuchElementException e) {
flags.add(false);
}
}
} finally {
flags.add(false);
}
return flags;
}
public int getArticleCountTopShared() {
int size = 0;
try {
WaitUtil.sleep(3000);
size = homePageObjects.getTopMostShared().size();
} catch (Exception e) {
}
return size;
}
public int getArticleCountTopCommented() {
int size = 0;
try {
WaitUtil.sleep(3000);
size = homePageObjects.getTopMostCommented().size();
} catch (Exception e) {
}
return size;
}
public List<String> getTopSharedStories() {
List<String> topSharedText = new LinkedList<>();
try {
List<WebElement> topShared = homePageObjects.getTopMostShared();
topSharedText = VerificationUtil.getLinkHrefList(topShared);
} catch (Exception e) {
}
return topSharedText;
}
public List<String> getTopCommentedStories() {
List<String> topMostCommentedText = new LinkedList<>();
try {
List<WebElement> topCommented = homePageObjects.getTopMostCommented();
topMostCommentedText = VerificationUtil.getLinkHrefList(topCommented);
} catch (Exception e) {
}
return topMostCommentedText;
}
public void clickTopSharedTab() {
WebBaseMethods.clickElementUsingJSE(homePageObjects.getMostSharedLinkHomepage());
}
public void clickTopCommentedTab() {
WebBaseMethods.clickElementUsingJSE(homePageObjects.getMostCommentedLinkHomepage());
}
public String clickMoreTopShared() {
String currentUrl = driver.getCurrentUrl();
WebBaseMethods.clickElementUsingJSE(homePageObjects.getMoreMostShared());
WaitUtil.waitforUrlToChange(driver, currentUrl, 20);
WaitUtil.waitForLoad(driver);
return driver.getCurrentUrl();
}
public String clickMoreTopCommented() {
try {
String currentUrl = driver.getCurrentUrl();
WebBaseMethods.clickElementUsingJSE(homePageObjects.getMoreMostCommented());
WaitUtil.waitforUrlToChange(driver, currentUrl, 20);
WebBaseMethods.switchChildIfPresent();
WaitUtil.waitForLoad(driver);
return driver.getCurrentUrl();
} catch (Exception e) {
return "exception while clicking more top commented";
}
}
public List<String> getArticleListMoreTopShared() {
WaitUtil.waitForLoad(driver);
WaitUtil.sleep(2000);
for (int i = 0; i < 5; i++) {
WebBaseMethods.scrollToBottom();
WaitUtil.sleep(5000);
}
List<String> we = new LinkedList<>();
try {
we = WebBaseMethods.getListHrefUsingJSE(homePageObjects.getMostViewedBusinessNews());
} finally {
driver.navigate().back();
}
return we;
}
public int getMostReadArticleList() {
List<WebElement> we = new LinkedList<>();
try {
WebBaseMethods.clickElementUsingJSE(homePageObjects.getMostReadTabHomePage());
we = homePageObjects.getTopMostRead();
} catch (Exception e) {
}
return we.size();
}
public List<String> getTopMostReadStories() {
List<String> topMostStories = new LinkedList<>();
try {
List<WebElement> topRead = homePageObjects.getTopMostRead();
topMostStories = VerificationUtil.getLinkHrefList(topRead);
} catch (Exception e) {
// TODO: handle exception
}
return topMostStories;
}
public String clickMoreTopRead() {
String currentUrl = driver.getCurrentUrl();
WebBaseMethods.scrollElementIntoViewUsingJSE(homePageObjects.getMoreMostRead());
WebBaseMethods.clickElementUsingJSE(homePageObjects.getMoreMostRead());
WaitUtil.waitforUrlToChange(driver, currentUrl, 20);
WebBaseMethods.switchChildIfPresent();
WaitUtil.waitForLoad(driver);
return driver.getCurrentUrl();
}
public List<String> getArticleCountMoreTopRead() {
WaitUtil.waitForLoad(driver);
WaitUtil.sleep(2000);
for (int i = 0; i < 5; i++) {
WebBaseMethods.scrollToBottom();
WaitUtil.sleep(2000);
}
List<String> stories = new LinkedList<>();
try {
stories = WebBaseMethods.getListHrefUsingJSE(homePageObjects.getMostViewedBusinessNews());
} catch (Exception e) {
}
WebBaseMethods.navigateBackTimeOutHandle();
return stories;
}
public boolean verifyEditorPickArticles() {
boolean flag = false;
ArrayList<String> title = new ArrayList<>();
for (WebElement we : homePageObjects.getEditorPickArticleTitle()) {
String[] href = we.getAttribute("href").split("/");
int size = href.length;
System.out.println(href[size - 1]);
title.add(href[size - 1]);
}
for (int i = 0; i < 4; i++) {
homePageObjects.getEditorPickArticleTitle().get(i).click();
String[] title1 = driver.getCurrentUrl().split("/");
int size1 = title1.length;
driver.get(Config.fetchConfigProperty("WebUrl"));
WaitUtil.waitForLoad(driver);
if (title1[size1 - 1].equalsIgnoreCase(title.get(i))) {
flag = true;
} else {
return false;
}
}
return flag;
}
public List<String> getStoriesEditorsPick() {
WebElement el;
List<WebElement> listEl = new LinkedList<>();
ArrayList<String> titles = new ArrayList<>();
try {
el = homePageObjects.getEditorPickArticleHeadings().get(0);
WebBaseMethods.scrollElementIntoViewUsingJSE(el);
listEl = homePageObjects.getEditorPickArticleHeadings();
} catch (Exception e) {
}
for (WebElement we : listEl) {
listEl = homePageObjects.getEditorPickArticleHeadings();
titles.add(WebBaseMethods.getTextUsingJSE(we));
}
return titles;
}
public void clickPaginationEditorsSection() {
WebElement el;
try {
el = homePageObjects.getEditorSectionPagination().get(0);
WebBaseMethods.scrollElementIntoViewUsingJSE(el);
WebBaseMethods.clickElementUsingJSE(el);
} catch (Exception e) {
}
WaitUtil.sleep(2000);
}
public List<String> getLeftSideStories() {
List<String> titles = new ArrayList<>();
List<WebElement> el = new LinkedList<WebElement>();
try {
el = homePageObjects.getLeftSideHeadLineList();
System.out.println(el.size());
if (el.size() > 0)
WebBaseMethods.scrollElementIntoViewUsingJSE(el.get(0));
titles = VerificationUtil.getLinkTextList(el);
} catch (Exception e) {
}
return titles;
}
public List<String> getLeftSideStoriesHref() {
List<String> titles = new ArrayList<>();
List<WebElement> el = new LinkedList<WebElement>();
try {
el = homePageObjects.getLeftSideHeadLineList();
titles = VerificationUtil.getLinkHrefList(el);
} catch (Exception e) {
e.printStackTrace();
}
return titles;
}
public List<String> getTopFlashNews() {
List<String> liHeadlines = new ArrayList<>();
List<WebElement> li = new LinkedList<WebElement>();
try {
li = homePageObjects.getLatestNewsOnBandLink();
li.forEach(action -> {
liHeadlines.add(WebBaseMethods.getTextUsingJSE(action));
});
} catch (Exception e) {
}
return liHeadlines;
}
public List<String> getVoiceNews() {
List<String> liHeadlines = new ArrayList<>();
WebBaseMethods.scrollToMiddle();
WebBaseMethods.scrollElementIntoViewUsingJSE(homePageObjects.getVoicesWidget());
try {
List<WebElement> li = homePageObjects.getVoicesWidgetStories();
liHeadlines = WebBaseMethods.getListTextUsingJSE(li);
} catch (Exception e) {
}
return liHeadlines;
}
public List<WebElement> getIndustryNewsTabList() {
return homePageObjects.getNewsByIndusrtyTabs();
}
public List<String> getNewsByIndusrtyTabsLink(int tabId) {
List<String> headlines = new LinkedList<>();
if (homePageObjects.getNewsByIndusrtyTabsLink(tabId).size() > 0) {
WaitUtil.explicitWaitByPresenceOfElement(driver, 20,
homePageObjects.getNewsByIndusrtyTabsLink(tabId).get(0));
homePageObjects.getNewsByIndusrtyTabsLink(tabId).forEach(action -> {
headlines.add(WebBaseMethods.getTextUsingJSE(action));
});
} else
headlines.add(",Tab is going blank");
return headlines;
}
public List<String> getSpotLightImageList() {
List<String> srcImages = new LinkedList<>();
try {
srcImages.add(homePageObjects.getSpotLightLargeImage().getAttribute("src"));
srcImages.add(homePageObjects.getSpotLightSmallImage().getAttribute("src"));
} catch (Exception e) {
}
return srcImages;
}
public List<String> getSpotLightAllNews() {
List<String> hrefText = new LinkedList<>();
try {
hrefText = WebBaseMethods.getListHrefUsingJSE(homePageObjects.getSpotlightNews());
} catch (Exception e) {
}
return hrefText;
}
public String getSpotLightHeadLine() {
return WebBaseMethods.getTextUsingJSE(homePageObjects.getSpotlightDisplayedArticleHeadline());
}
public void clickNextSpotLight() {
WebBaseMethods.scrollElementIntoViewUsingJSE(homePageObjects.getSpotlightSection());
WebBaseMethods.clickElementUsingJSE(homePageObjects.getSpotlightNext());
WaitUtil.sleep(2000);
}
public String getPancheHeadingLink() {
WebElement widget = homePageObjects.getPanacheWidget();
String headingText = "";
try {
By heading = WebBaseMethods.getLocatorByWebElement(homePageObjects.getWidgetHeadings().get(0));
headingText = widget.findElement(heading).findElement(By.tagName("a")).getAttribute("href");
} catch (Exception e) {
}
return headingText;
}
public List<String> getPanacheHeadlinesText() {
List<String> headlineText = new LinkedList<>();
try {
homePageObjects.getPanacheHeadlines().forEach(action -> {
headlineText.add(WebBaseMethods.getTextUsingJSE(action));
});
} catch (Exception e) {
}
return headlineText;
}
public List<String> getTopGainerList() {
List<String> topGainers = new LinkedList<>();
try {
WebBaseMethods.scrollElementIntoViewUsingJSE(homePageObjects.getMarketNewsLink());
topGainers = WebBaseMethods.getListHrefUsingJSE(homePageObjects.getTopGainersList());
} catch (WebDriverException e) {
}
return topGainers;
}
public String getMoreMarketNewsHref() {
String href = "";
try {
href = homePageObjects.getMarketMoreNews().getAttribute("href");
} catch (NoSuchElementException e) {
}
return href;
}
public List<String> getPancheKeywordsHref() {
List<String> href = new LinkedList<>();
try {
href = VerificationUtil.getLinkHrefList(homePageObjects.getPanacheTaggedKeywords());
} catch (NoSuchElementException e) {
}
return href;
}
public List<String> getPancheSpotLightHref() {
List<String> href = new LinkedList<>();
try {
href = VerificationUtil.getLinkHrefList(homePageObjects.getPanacheSpotlightStories());
} catch (NoSuchElementException e) {
}
return href;
}
public String getMarketsNewsLink() {
String href = "";
try {
href = homePageObjects.getMarketNewsLink().getAttribute("href");
} catch (NoSuchElementException e) {
}
return href;
}
public List<WebElement> getMarketsNewsHeadlines() {
return homePageObjects.getMarketNewsHeadlineList();
}
public WebElement getDateTimeTab() {
return homePageObjects.getDateTimetab();
}
public List<String> getMarketsTop10Href() {
List<String> href = new LinkedList<>();
try {
href = VerificationUtil.getLinkHrefList(homePageObjects.getMarketTop10());
} catch (NoSuchElementException e) {
}
return href;
}
public String getPoliticsNationLink() {
String href = "";
try {
href = homePageObjects.getPoliticsNationLink().getAttribute("href");
} catch (NoSuchElementException e) {
}
return href;
}
public List<WebElement> getPoliticsNationHeadlines() {
return homePageObjects.getPoliticsNationHeadlines();
}
public String getEconomyLink() {
String href = "";
try {
href = homePageObjects.getEconomyLink().getAttribute("href");
} catch (NoSuchElementException e) {
}
return href;
}
public List<WebElement> getEconomyHeadlines() {
return homePageObjects.getEconomyHeadLineList();
}
public String getEconomyMoreHref() {
String href = "";
try {
href = homePageObjects.getMoreEconomyLink().getAttribute("href");
} catch (NoSuchElementException e) {
}
return href;
}
public String getSmallBizLink() {
String href = "";
try {
href = homePageObjects.getSmallBizLink().getAttribute("href");
} catch (NoSuchElementException e) {
}
return href;
}
public List<WebElement> getSmallBizHeadlines() {
return homePageObjects.getSmallBizHeadlineList();
}
public List<WebElement> getSmallBizSpotLightHeadlines() {
return homePageObjects.getSmallBizSpotlight();
}
public String getSmallBizMoreHref() {
String href = "";
try {
href = homePageObjects.getSmallBizMore().getAttribute("href");
} catch (NoSuchElementException e) {
}
return href;
}
public List<WebElement> getTopSliderLinks() {
return homePageObjects.getTopSlider();
}
public String getWealthLink() {
WebBaseMethods.scrollToMiddle();
String href = "";
try {
href = homePageObjects.getWealthLink().getAttribute("href");
} catch (Exception e) {
}
return href;
}
public String getWealthMoreHref() {
String href = "";
try {
href = homePageObjects.getWealthMoreLink().getAttribute("href");
} catch (Exception e) {
}
return href;
}
public List<WebElement> getWealthHeadlines() {
return homePageObjects.getWealthHeadlineList();
}
public WebElement getMutualFundWidget() {
return homePageObjects.getMutualFundsWidget();
}
public String getMutualFundsLink() {
String href = "";
try {
href = homePageObjects.getMutualfundLink().getAttribute("href");
} catch (NoSuchElementException e) {
}
return href;
}
public String getMutualFundsMoreHref() {
String href = "";
try {
href = homePageObjects.getMutualfundMoreLink().getAttribute("href");
} catch (Exception e) {
}
return href;
}
public List<WebElement> getMutualFundsHeadlines() {
return homePageObjects.getMutualfundHeadlineList();
}
public boolean aroundWebIsDisplayed() {
return homePageObjects.getFromAroundWeb().size() > 0;
}
public List<WebElement> aroundWebAds() {
return homePageObjects.getFromAroundWeb().get(0).findElements(By.xpath("./..//a"));
}
public String getInfoTechLink() {
String href = "";
try {
href = homePageObjects.getInfotechLink().getAttribute("href");
} catch (Exception e) {
}
return href;
}
public String getInfoTechMoreHref() {
String href = "";
try {
href = homePageObjects.getInfoTechMoreLink().getAttribute("href");
} catch (Exception e) {
}
return href;
}
public List<WebElement> getInfoTechHeadlines() {
return homePageObjects.getInfotechHeadlineList();
}
public String getDefenceLink() {
WebBaseMethods.scrollToMiddle();
WaitUtil.waitForLoad(driver);
String href = "";
try {
WebBaseMethods.scrollElementIntoViewUsingJSE(homePageObjects.getDefenceLink());
href = homePageObjects.getDefenceLink().getAttribute("href");
} catch (Exception e) {
}
return href;
}
public String getDefenceMoreHref() {
String href = "";
try {
href = WebBaseMethods.getHrefUsingJSE(homePageObjects.getDefenceMoreLink());
} catch (Exception e) {
}
return href;
}
public List<WebElement> getDefenceHeadlines() {
return homePageObjects.getDefenceHeadlineList();
}
public List<WebElement> getTopLeadStories() {
return homePageObjects.getTopSlider();
}
public List<WebElement> getSlidesVideoTopLinks() {
return homePageObjects.getSlideVideoLink();
}
public List<WebElement> getSlideVideoStories() {
return homePageObjects.getSlideShowList();
}
public WebElement getPrevNextSlides() {
return homePageObjects.getSlideShowPrevNext();
}
public WebElement getOpinionLink() {
WebElement el = null;
try {
WebBaseMethods.scrollToBottom();
WebBaseMethods.scrollElementIntoViewUsingJSE(homePageObjects.getOpinionLink());
el = homePageObjects.getOpinionLink();
} catch (Exception e) {
}
return el;
}
public WebElement getOpinionMoreLink() {
return homePageObjects.getOpinionMoreLink();
}
public WebElement getInterviewsLink() {
return homePageObjects.getInterviewsLink();
}
public WebElement getInterviewsMoreLink() {
return homePageObjects.getInterviewsMoreLink();
}
public WebElement getBlogsLink() {
return homePageObjects.getBlogsLink();
}
public WebElement getBlogsMoreLink() {
return homePageObjects.getBlogsMoreLink();
}
public List<WebElement> getOpinionIntervBlogLinks() {
return homePageObjects.getOpinionIntervBlogList();
}
public int getTopMutualFundsList() {
WebElement el;
try {
el = homePageObjects.getTopMutualFundsList().get(0);
WebBaseMethods.scrollElementIntoViewUsingJSE(el);
} catch (IndexOutOfBoundsException | WebDriverException e) {
return 0;
}
return homePageObjects.getTopMutualFundsList().size();
}
public List<String> getTopCommentedStoryLink() {
return WebBaseMethods.getListHrefUsingJSE(homePageObjects.getTopMostCommented());
}
public String getStoryHeadline() {
try {
return homePageObjects.getPrimeStoryHeading().getText();
} catch (WebDriverException e) {
e.printStackTrace();
return null;
}
}
public String getStorySummary() {
try {
return homePageObjects.getPrimeStorySummary().getText();
} catch (WebDriverException e) {
e.printStackTrace();
return null;
}
}
public String getStoryBody() {
try {
return homePageObjects.getPrimeStoryBody().getText();
} catch (WebDriverException e) {
e.printStackTrace();
return null;
}
}
public String getAuthorName() {
try {
return homePageObjects.getPrimeAuthorName().getText();
} catch (WebDriverException e) {
e.printStackTrace();
return null;
}
}
public String getPublishDate() {
try {
return homePageObjects.getPrimePublishDate().getText();
} catch (WebDriverException e) {
e.printStackTrace();
return null;
}
}
public String getCvrImageDimensions() {
int height = 0;
int width = 0;
try {
height = homePageObjects.getPrimeCoverImage().getSize().getHeight();
width = homePageObjects.getPrimeCoverImage().getSize().getWidth();
System.out.println("Cover image Dimensions: " + height + "x" + width);
} catch (Exception e) {
}
return height + "x" + width;
}
public WebElement getEtPrimeTab() {
return homePageObjects.getEtPrimeTab();
}
public String getGoToPrimeLink() {
String link = null;
try {
link = homePageObjects.getGoToPrimeLink().getAttribute("href");
} catch (WebDriverException e) {
}
return link;
}
public List<WebElement> getPrimeHeadlines() {
return homePageObjects.getPrimeHeadlines();
}
public String getHomepagePollQuestion() {
return homePageObjects.getHomePagePollQuestion().getText();
}
public List<WebElement> getAllAssemblyElectionsNews() {
return homePageObjects.getElectionNews();
}
public WebElement getMoreAssemblyElectionLink() {
// TODO Auto-generated method stub
return homePageObjects.getElectionsMore();
}
public WebElement getAssemblyElectionSectionHeading() {
// TODO Auto-generated method stub
return homePageObjects.getElectionsSectionHead();
}
public List<String> getAllHrefWithJse() {
List<String> allHref = new ArrayList<>();
allHref = WebBaseMethods.getListHrefUsingJSE(homePageObjects.getAllHref());
return allHref;
}
public List<String> getAllHref() {
List<String> allHref = new ArrayList<>();
allHref = VerificationUtil.getLinkHrefList(homePageObjects.getAllHref());
return allHref;
}
public List<String> getAllRelNavLinks() {
List<String> allHref = new ArrayList<>();
allHref = VerificationUtil.getLinkHrefList(homePageObjects.getAllRelativeNavLinks());
// allHref =
// WebBaseMethods.getListHrefUsingJSE(homePageObjects.getAllRelativeNavLinks());
return allHref;
}
public List<String> getAllPrimeShowLinks() {
List<String> primeUrls = new LinkedList<>();
ArrayList<String> newList = new ArrayList<String>();
try {
primeUrls = WebBaseMethods.getListHrefUsingJSE(homePageObjects.getAllPrimeShowLinks());
for (String element : primeUrls) {
if (!newList.contains(element)) {
newList.add(element);
}
}
} catch (Exception ee) {
ee.printStackTrace();
}
System.out.println(newList);
return newList;
}
public List<String> getArticleshowLinksFromHomePage() {
List<String> articleUrls = new LinkedList<>();
ArrayList<String> newList = new ArrayList<String>();
try {
articleUrls = WebBaseMethods.getListHrefUsingJSE(homePageObjects.getAllArticleshowFromHomePage());
for (String element : articleUrls) {
if (!newList.contains(element)) {
newList.add(element);
}
}
} catch (Exception ee) {
ee.printStackTrace();
}
System.out.println(newList);
return newList;
}
public String getInternationalLink() {
WebBaseMethods.scrollToMiddle();
WaitUtil.waitForLoad(driver);
String href = "";
try {
WebBaseMethods.scrollElementIntoViewUsingJSE(homePageObjects.getInternationalSectionLink());
href = homePageObjects.getInternationalSectionLink().getAttribute("href");
} catch (Exception e) {
}
return href;
}
public String getInternationalMoreHref() {
String href = "";
try {
href = WebBaseMethods.getHrefUsingJSE(homePageObjects.getInternationalMoreLink());
} catch (Exception e) {
}
return href;
}
public List<WebElement> getInternationalHeadlines() {
return homePageObjects.getInternationalStories();
}
public String getJobsNCareersLink() {
WebBaseMethods.scrollToMiddle();
WaitUtil.waitForLoad(driver);
String href = "";
try {
WebBaseMethods.scrollElementIntoViewUsingJSE(homePageObjects.getJobsNCareersSectionLink());
href = homePageObjects.getJobsNCareersSectionLink().getAttribute("href");
} catch (Exception e) {
}
return href;
}
public String getJobsNCareersMoreHref() {
String href = "";
try {
href = WebBaseMethods.getHrefUsingJSE(homePageObjects.getJobNCareersMoreLink());
} catch (Exception e) {
}
return href;
}
public List<WebElement> getJobsNCareersHeadlines() {
return homePageObjects.getJobsStories();
}
public List<String> getAllShowHref() {
List<String> allHref = new ArrayList<>();
try {
allHref = VerificationUtil.getLinkHrefList(homePageObjects.getAllShowHref());
} catch (Exception ee) {
ee.printStackTrace();
}
return allHref;
}
public int getPrimeSectionStoriesSize() {
int size = 0;
try {
size = homePageObjects.getAllPrimeSectionStories().size();
} catch (Exception e)
{
System.out.println(e.getMessage());
}
return size;
}
public boolean clickPrimeStoryOfIndex(int index) {
boolean flag = false;
try {
//WebBaseMethods.clickElementUsingJSE(homePageObjects.clickPrimeStoryOfIndex(index));
WebBaseMethods.moveToElementAndClick(homePageObjects.getPrimeStoryOfIndex(index));
flag = true;
} catch(Exception e)
{
System.out.println(e.getMessage());
}
return flag;
}
public boolean isPrimeStoryOfIndexDisplayed(int index) {
boolean flag = false;
try {
flag = WebBaseMethods.isDisplayed(homePageObjects.getPrimeStoryOfIndex(index), 4);
} catch(Exception e)
{
System.out.println(e.getMessage());
}
return flag;
}
}
| [
"sanchitrathi@rediff.com"
] | sanchitrathi@rediff.com |
7f347250004c930d77a3b1b4be454ee19da1fc8c | 03772edd7913eb319d5a9e409c75c303d5378a37 | /src/com/serviceobjects/GetPossibleMatchesSingleLineDELETE.java | cfe4149f2e4fdffe2ec4b929809b93bb66b0ef14 | [] | no_license | npgarcia/CloudMSC | e247c98b13c4bc3e69bef8380fe75d8b39f668a5 | 8cfbbd088b3480e0045b36f1590e0219bae7c225 | refs/heads/master | 2021-01-22T03:05:37.698512 | 2015-02-10T01:30:59 | 2015-02-10T01:30:59 | 30,568,608 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,637 | java |
package com.serviceobjects;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="LicenseKey" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"address",
"licenseKey"
})
@XmlRootElement(name = "GetPossibleMatchesSingleLine_DELETE")
public class GetPossibleMatchesSingleLineDELETE {
@XmlElementRef(name = "Address", namespace = "http://www.serviceobjects.com", type = JAXBElement.class, required = false)
protected JAXBElement<String> address;
@XmlElementRef(name = "LicenseKey", namespace = "http://www.serviceobjects.com", type = JAXBElement.class, required = false)
protected JAXBElement<String> licenseKey;
/**
* Gets the value of the address property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getAddress() {
return address;
}
/**
* Sets the value of the address property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setAddress(JAXBElement<String> value) {
this.address = value;
}
/**
* Gets the value of the licenseKey property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getLicenseKey() {
return licenseKey;
}
/**
* Sets the value of the licenseKey property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setLicenseKey(JAXBElement<String> value) {
this.licenseKey = value;
}
}
| [
"ngarcia@tacitknowledge.com"
] | ngarcia@tacitknowledge.com |
088956bfc4a7f04b13c6d51e5df01463b8d7b77b | edfd5f25fb6478b2a1d783276d442391ee88db43 | /src/st/rattmuffen/jsub/client/QueryResult.java | f6c46df9a94299f1d3e9c1e2241b0702708c5c7e | [] | no_license | rattmuffen/jSub | 0dd440980e1915701187c878693777486b456deb | 70a273ad4bb25796f08051b2b29a524efed26b01 | refs/heads/master | 2021-01-01T19:11:31.066979 | 2013-08-13T09:18:23 | 2013-08-13T09:18:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 684 | java | package st.rattmuffen.jsub.client;
import java.io.File;
import java.util.HashMap;
/**
* Wrapper class for query result from OpenSubtitles.org API.
* @version 0.3
* @author rattmuffen
*/
public class QueryResult extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
public File sourceFile;
public static enum Result_Type {
RESULT_MESSAGE,
ERROR_MESSAGE
};
public Result_Type type = Result_Type.RESULT_MESSAGE;
public String message = "";
public boolean downloadFirst = false;
public QueryResult(Object o) {
if (o instanceof HashMap) {
HashMap<String, Object> hm = (HashMap<String, Object>)o;
this.putAll(hm);
}
}
}
| [
"rattmuffen@gmail.com"
] | rattmuffen@gmail.com |
a9afb55c323e3f4033088680ea215dfd695a6cd6 | bf35ac9fc1aa10420d265c063a911f147c9cee99 | /app/src/main/java/com/guochuang/mimedia/tools/calendar/CalendarBean.java | 06094204bea3c8c3dbfc0b932b250b692686f26f | [] | no_license | qqjq547/ksredpacket | 766cc7e033f20cac0ef677f9d1b2abfb366be54c | afad59b54d82d1ff5baf4b1bbc6c9cf01ddf7d1f | refs/heads/master | 2020-08-06T04:30:01.624426 | 2019-10-04T14:36:23 | 2019-10-04T14:36:23 | 212,830,429 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,098 | java | package com.guochuang.mimedia.tools.calendar;
public class CalendarBean {
public int year;
public int month;
public int day;
public int week;
//-1,0,1
public int mothFlag;
public CalendarBean(int year, int month, int day) {
this.year = year;
this.month = month;
this.day = day;
}
public String getDisplayWeek(){
String s="";
switch(week){
case 1:
s="星期日";
break;
case 2:
s="星期一";
break;
case 3:
s="星期二";
break;
case 4:
s="星期三";
break;
case 5:
s="星期四";
break;
case 6:
s="星期五";
break;
case 7:
s="星期六";
break;
}
return s ;
}
@Override
public String toString() {
String s=year+"/"+ month +"/"+day;
return s;
}
} | [
"qqjq6457547"
] | qqjq6457547 |
ea4a5710342d572daada3dd6ff89c216aa902d7b | ab751fef4faf9f7a5291cbb65d969b74b7b6372a | /game/model/Requirement.java | cdddd89d25adc1f610632096cb06d40ee16c23b4 | [
"MIT"
] | permissive | css4143/The-Valley | 15df28e1d85f1b9130eae86cf40851a9a5ca91c0 | 49971f547b5682a8c2f96394289a4676335c9487 | refs/heads/master | 2021-06-28T11:04:05.770823 | 2017-09-17T18:32:42 | 2017-09-17T18:32:42 | 103,769,167 | 1 | 1 | null | 2017-09-16T17:29:55 | 2017-09-16T17:03:52 | null | UTF-8 | Java | false | false | 3,215 | java | package game.model;
import java.util.ArrayList;
import java.util.List;
/**
* This class represents a requirement within an event or a choice. Its
* conditions must be met for the event to be triggered, or for the event to
* occur once its been triggered, or for an option to appear.
*
* healthReq, moneyReq, and satisfactionReq should be 0 if they do not have an
* associated requisite. If they are a positive number, then that means that
* the requirement is greater than that number. If they are a negative number, it
* means that the requirement is less than the absolute value of that number.
*
* @author Connor Seiden
*
*/
public class Requirement {
//healthReq, moneyReq, and satisfactionReq should be 0 if they do not
//have an associated requisite. If they are a positive number, then that means that t
//choiceReq will be null if it has no associated requisite.
private int healthReq;
private int moneyReq;
private int satisfactionReq;
//job req is 0 for doesn't matter, 1 for no job, and 2 for job
private int jobReq;
//A list of String arrays (all size 2) that represent previous choices
//that can be referenced in the player choices dictionary.
private List<String[]> choiceReq;
public Requirement(){
this.healthReq = 0;
this.moneyReq = 0;
this.satisfactionReq = 0;
this.jobReq = 0;
this.choiceReq = new ArrayList<String[]>();
}
public Requirement(int healthReq, int moneyReq, int satisfactionReq,
int jobReq, List<String[]> choiceReq) {
this.healthReq = healthReq;
this.moneyReq = moneyReq;
this.satisfactionReq = satisfactionReq;
this.jobReq = jobReq;
this.choiceReq = choiceReq;
}
public int getJobReq() {
return jobReq;
}
public void setJobReq(int jobReq) {
this.jobReq = jobReq;
}
public int gethealthReq() {
return healthReq;
}
public void sethealthReq(int healthReq) {
this.healthReq = healthReq;
}
public int getMoneyReq() {
return moneyReq;
}
public void setMoneyReq(int moneyReq) {
this.moneyReq = moneyReq;
}
public int getSatisfactionReq() {
return satisfactionReq;
}
public void setSatisfactionReq(int satisfactionReq) {
this.satisfactionReq = satisfactionReq;
}
public List<String[]> getChoiceReq() {
return choiceReq;
}
public void setChoiceReq(List<String[]> choiceReq) {
this.choiceReq = choiceReq;
}
//Returns true if requirement is met, false otherwise.
public boolean check(Player player){
boolean met = (reqCheck(player.getHealth(), healthReq) &&
reqCheck(player.getMoney(), moneyReq) &&
reqCheck(player.getSatisfaction(), satisfactionReq));
if((jobReq == 1 && player.getJob()) || (jobReq == 2 && !player.getJob())){
met = false;
}
if(choiceReq != null){
for(String[] choice: choiceReq){
if(!choice[1].equals(player.getChoice(choice[0]))){
met = false;
}
}
}
return met;
}
private boolean reqCheck(int base, int req){
if(req == 0){
return true;
}
if(req > 0 && base >= req){
return true;
}
else if(req < 0 && base <= Math.abs(req)){
return true;
}
return false;
}
}
| [
"noreply@github.com"
] | css4143.noreply@github.com |
82cbdb4c76ee868f25cc373c534952a52f27eb2a | 0a17ddae5294941f2cdd3fb05226e3e811e2af5e | /src/main/java/com/imooc/service/VideoService.java | a8a9deb6d516a2ccc41923a21cac519d8876fed7 | [] | no_license | xzjAries/imooc-springboot-starter | c78a3d6a64d4d912205f04b98a44e73f0ce478d2 | 5797a09f233bea2ae4faa72b6a617fe6bcdfda75 | refs/heads/master | 2020-03-19T02:45:37.394177 | 2018-06-15T09:18:20 | 2018-06-15T09:18:20 | 135,658,163 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 607 | java | package com.imooc.service;
import java.util.List;
import com.imooc.pojo.Videos;
public interface VideoService {
public void saveVideo(Videos videos) throws Exception;
public void saveVideoTransactional(Videos videos) throws Exception;
public void deleteVideo(Videos videos);
public void updateVideo(Videos videos);
public Videos queryVideoById(String id);
public List<Videos> queryVideoList(Videos videos);
public List<Videos> queryvideoListPaged(Videos videos,Integer pageIndex,Integer pageSize);
public Videos queryUserByIdCustom(String userId,String audioId);
}
| [
"1050077383@qq.com"
] | 1050077383@qq.com |
a61ffba6f66b97fc4e6868bd54cfbac5793adc23 | 70f91957d10020fd61d1e05abe9bb2ee22e6b37a | /src/main/java/com/prb/erp/domain/code/master/BasicCodeMasterRepository.java | f23185aa71474a443d057bfd4702d0e17e4a73b8 | [] | no_license | deepstudyDev/prb_erp_api | a4e00c93eaf69ebc2b8a36f47856270d729fac81 | 42895ef14382f1c693e0b667052fef5f3e7d396f | refs/heads/master | 2020-04-12T19:15:17.805284 | 2019-03-20T00:16:33 | 2019-03-20T00:16:33 | 161,093,008 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 334 | java | package com.prb.erp.domain.code.master;
import org.springframework.stereotype.Repository;
import com.chequer.axboot.core.domain.base.AXBootJPAQueryDSLRepository;
@Repository
public interface BasicCodeMasterRepository extends AXBootJPAQueryDSLRepository<BasicCodeMaster, BasicCodeMaster.BasicCodeMasterId> {
} | [
"admin@ideepstudy.com"
] | admin@ideepstudy.com |
7ced59d87d5c64f1e4696984e85082052af35192 | f20478d37c49f14ceaa36f8b958d76fc7498ecd3 | /src/com/lam/android/attackhelicopter2/WelcomeDialog.java | 8e7ad32313d6fa638c100d4781913ebf4d6c6044 | [] | no_license | mmingfeilam/AttackHelicopter2 | 7d66c63b22fa5b7e6beb4b78fd88694d87086771 | 3ac0f502a1bff5b114476a0473d8075934a4e4ec | refs/heads/master | 2021-01-22T03:06:09.607072 | 2015-02-04T05:38:34 | 2015-02-04T05:38:34 | 30,283,412 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,054 | java | package com.lam.android.attackhelicopter2;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
/**
* When the game starts, the user is welcomed with a message, and buttons for
* starting a new game, or getting instructions about the game.
*/
public class WelcomeDialog extends Dialog implements View.OnClickListener {
private final NewGameCallback mCallback;
private View mNewGame;
public WelcomeDialog(Context context, NewGameCallback callback) {
super(context);
mCallback = callback;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.app_name);
setContentView(R.layout.welcome_dialog);
mNewGame = findViewById(R.id.newGame);
mNewGame.setOnClickListener(this);
}
/** {@inheritDoc} */
public void onClick(View v) {
if (v == mNewGame) {
mCallback.onNewGame();
dismiss();
}
}
}
| [
"mmingfeilam@gmail.com"
] | mmingfeilam@gmail.com |
18118147992cc5ee13c28df43af9b2372f09e32d | 0292e15a4e7ac692519415de01d924a4b00b8683 | /microservices-sample-users/src/test/java/com/example/MicroservicesSampleUsersApplicationTests.java | 3d37454a005d47412ae50a967424e28c53a2c109 | [] | no_license | japuga/microservices-sample | 721473c17f3923b3945162c1a486e38806fe2ae8 | f1b77b226c949fe79722ba40fc2541208cce2433 | refs/heads/master | 2021-01-11T02:38:45.348907 | 2017-05-19T03:51:25 | 2017-05-19T03:51:25 | 70,945,221 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,414 | java | package com.example;
import static org.junit.Assert.assertTrue;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import com.model.User;
import com.service.UserService;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = MicroservicesSampleUsersApplication.class)
@WebAppConfiguration
public class MicroservicesSampleUsersApplicationTests {
@Autowired
UserService userService;
//UserService userService = new UserServiceImpl();
@Test
public void testSave(){
User user = new User();
user.setFirstName("Merry");
user.setLastName("Michael");
user.setId((long) 1000);
userService.save(user);
//System.out.println("user name: "+ userService.getUserById((long) 100).getLastName());
assertTrue(userService.getUserById((long) 1000).getFirstName().equals("Merry"));
}
@Test
public void testSave1(){
System.out.println("Output from Test1 user name: "+ userService.getUserById((long) 100).getLastName());
assertTrue(userService.getUserById((long) 100).getFirstName().equals("James"));
}
}
| [
"akolom.gebre@gmail.com"
] | akolom.gebre@gmail.com |
4f1b6d6a8a829cdea6ed0f1bc78a025a0fc19fbf | 73721ac441b25d17bfcec5ffe368089050114020 | /mps-execution-deprecated/languages/deprecated/source_gen/jetbrains/mps/execution/configurations/deprecated/behavior/OnChangeNodeBlock_BehaviorDescriptor.java | a58a556b6c1a821a9552ed1a2e233989ca73dd61 | [] | no_license | JetBrains/MPS-Contrib | c7fa7ce6892f79f36b74cc3157ff992129c1a10a | 6bb663e130842c3649bc03fecfb1436db95b9ddb | refs/heads/master | 2023-05-29T09:43:05.356423 | 2023-03-06T12:52:56 | 2023-03-06T12:52:56 | 10,595,762 | 3 | 5 | null | null | null | null | UTF-8 | Java | false | false | 1,044 | java | package jetbrains.mps.execution.configurations.deprecated.behavior;
/*Generated by MPS */
import jetbrains.mps.baseLanguage.behavior.ConceptFunction_BehaviorDescriptor;
import java.util.List;
import org.jetbrains.mps.openapi.model.SNode;
import org.jetbrains.mps.openapi.language.SConcept;
public class OnChangeNodeBlock_BehaviorDescriptor extends ConceptFunction_BehaviorDescriptor implements IOnChangeEditorBlock_BehaviorDescriptor {
public OnChangeNodeBlock_BehaviorDescriptor() {
}
public List<SNode> virtual_getApplicableConceptFunctionParameter_3044950653914717136(SConcept thisConcept) {
return OnChangeNodeBlock_Behavior.virtual_getApplicableConceptFunctionParameter_3044950653914717136(thisConcept);
}
public boolean virtual_showName_1262430001741498082(SConcept thisConcept) {
return OnChangeNodeBlock_Behavior.virtual_showName_1262430001741498082(thisConcept);
}
@Override
public String getConceptFqName() {
return "jetbrains.mps.execution.configurations.deprecated.structure.OnChangeNodeBlock";
}
}
| [
"Mihail.Muhin@jetbrains.com"
] | Mihail.Muhin@jetbrains.com |
6a0349250751e6903f25944945483ba4689295a3 | 60282a55340d75325bb96e95e86381a12d66c006 | /src/main/java/io/webfolder/cdp/type/network/BlockedSetCookieWithReason.java | 138715f00d00dbd28d0a98babda42eab1c2e3fb4 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | Billesper/cdp4j | f7aee808f5d1833d83b113bd63f2ed61cbb3abb9 | d94a69195b4e8874f42e30dc69b97b61dade4015 | refs/heads/master | 2022-11-25T16:23:51.822342 | 2020-08-03T18:34:41 | 2020-08-03T18:34:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,848 | java | /**
* cdp4j Commercial License
*
* Copyright 2017, 2020 WebFolder OÜ
*
* Permission is hereby granted, to "____" obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy, modify, merge,
* publish, distribute and sublicense of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package io.webfolder.cdp.type.network;
import io.webfolder.cdp.annotation.Experimental;
/**
* A cookie which was not stored from a response with the corresponding reason
*/
@Experimental
public class BlockedSetCookieWithReason {
private SetCookieBlockedReason blockedReasons;
private String cookieLine;
private Cookie cookie;
/**
* The reason(s) this cookie was blocked.
*/
public SetCookieBlockedReason getBlockedReasons() {
return blockedReasons;
}
/**
* The reason(s) this cookie was blocked.
*/
public void setBlockedReasons(SetCookieBlockedReason blockedReasons) {
this.blockedReasons = blockedReasons;
}
/**
* The string representing this individual cookie as it would appear in the header.
* This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
*/
public String getCookieLine() {
return cookieLine;
}
/**
* The string representing this individual cookie as it would appear in the header.
* This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
*/
public void setCookieLine(String cookieLine) {
this.cookieLine = cookieLine;
}
/**
* The cookie object which represents the cookie which was not stored. It is optional because
* sometimes complete cookie information is not available, such as in the case of parsing
* errors.
*/
public Cookie getCookie() {
return cookie;
}
/**
* The cookie object which represents the cookie which was not stored. It is optional because
* sometimes complete cookie information is not available, such as in the case of parsing
* errors.
*/
public void setCookie(Cookie cookie) {
this.cookie = cookie;
}
}
| [
"support@webfolder.io"
] | support@webfolder.io |
086df8aee366c00ae9d18e5d6ad6c41da82e1b4b | 3ad6aec14c9a6f453cc0b8478c4b6bfc77861ff6 | /app/src/main/java/com/example/j2/myapplication2019/MainActivity.java | 057a5116473fb8d0bc9165b8e6a4fd12e97b997b | [] | no_license | cdwyer900/MyApplication2019 | 2562bb6bb133321c7c77a154838b9871fabca66b | 46c3f71d2f0a37d76b01f77872a6fe4eab2d71c0 | refs/heads/master | 2020-08-05T02:17:36.672837 | 2019-10-02T14:18:32 | 2019-10-02T14:18:32 | 212,360,024 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package com.example.j2.myapplication2019;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
| [
"cdwyer900@gmail.com"
] | cdwyer900@gmail.com |
fec4a57c398330b8f688a57093f9c2ea0d567a03 | aa40327130026e8603012de27fbfca725e6904c6 | /spring-pet-clinic-data/src/main/java/com/nursh/petclinic/model/Pet.java | c59f24d40cd509af65d3b075b293f0fd0552388d | [] | no_license | nursh/Spring-Pet-Clinic | 7fb85f8b3f16a59066d6f705c0383a606db40cf5 | c4ca8273c1fe0efdf7cf005fbbee625af9ea71f0 | refs/heads/master | 2020-05-20T09:22:58.691773 | 2019-06-24T00:52:29 | 2019-06-24T00:52:29 | 185,498,528 | 0 | 0 | null | 2019-06-23T05:25:38 | 2019-05-08T00:35:41 | Java | UTF-8 | Java | false | false | 1,010 | java | package com.nursh.petclinic.model;
import lombok.*;
import javax.persistence.*;
import java.time.LocalDate;
import java.util.HashSet;
import java.util.Set;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "pets")
public class Pet extends BaseEntity {
@ManyToOne
@JoinColumn(name = "owner_id")
private Owner owner;
@Column(name = "name")
private String name;
@Column(name = "birth_date")
private LocalDate birthDate;
@ManyToOne
@JoinColumn(name = "type_id")
private PetType petType;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "pet")
private Set<Visit> visits = new HashSet<>();
@Builder
public Pet(Long id, Owner owner, String name, LocalDate birthDate, PetType petType, Set<Visit> visits) {
super(id);
this.owner = owner;
this.name = name;
this.birthDate = birthDate;
this.petType = petType;
if (visits == null || visits.size() > 0) this.visits = visits;
}
}
| [
"nsheikhmohammed@yahoo.com"
] | nsheikhmohammed@yahoo.com |
c1b4dcffaa97b32fcd6a9db6587465ccc2c73e81 | 67951bf47dc797eeac61ef534ddca863abe3ee68 | /BigBasket/obj/Debug/81/android/src/md52621cc1567152f304567299e7e3e2344/RegisterActivity.java | c74134695fb158583a722f9bb4273f5a08270bea | [] | no_license | tejurajurkar/bigbasket | 5d05e4959163ae53c4384db4f4c20f58541b222e | a6cf320eba632382f379d8789eee085ab8ae432f | refs/heads/master | 2022-11-14T22:13:52.537027 | 2020-07-10T11:38:25 | 2020-07-10T11:38:25 | 278,619,123 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,079 | java | package md52621cc1567152f304567299e7e3e2344;
public class RegisterActivity
extends android.app.Activity
implements
mono.android.IGCUserPeer
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"n_onCreate:(Landroid/os/Bundle;)V:GetOnCreate_Landroid_os_Bundle_Handler\n" +
"";
mono.android.Runtime.register ("BigBasket.Resources.RegisterActivity, BigBasket", RegisterActivity.class, __md_methods);
}
public RegisterActivity ()
{
super ();
if (getClass () == RegisterActivity.class)
mono.android.TypeManager.Activate ("BigBasket.Resources.RegisterActivity, BigBasket", "", this, new java.lang.Object[] { });
}
public void onCreate (android.os.Bundle p0)
{
n_onCreate (p0);
}
private native void n_onCreate (android.os.Bundle p0);
private java.util.ArrayList refList;
public void monodroidAddReference (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void monodroidClearReferences ()
{
if (refList != null)
refList.clear ();
}
}
| [
"tejurajurkar@gmail.com"
] | tejurajurkar@gmail.com |
c4da4bc1c362e5958dcd8a4e1081d1133379618e | 7d1efda4c3712eadbb7123866246a0a6eb640d1a | /study/project/Test/src/main/java/com/test/demo/HandleExceptionDemo.java | d1f7810d9eeb874f1a9a4444f7ea1433cb1d4a70 | [] | no_license | wangjun811/learngit | 577c784248e877e67b5b18f83d415a74250adf04 | e0bdcf3883ea3021c5e1447dbdca9b4da26d7a53 | refs/heads/master | 2022-12-21T23:42:09.156785 | 2020-02-09T05:23:53 | 2020-02-09T05:23:53 | 139,411,744 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 462 | java | package com.test.demo;
public class HandleExceptionDemo {
public static void main(String[] args) throws Exception {
HandleExceptionDemo demo = new HandleExceptionDemo();
int result = demo.test1();
System.out.println(result);
}
public int test1() throws Exception {
int i;
try {
i = 2 / 0;
return i;
} catch (Exception e) {
// throw new Exception(e);
return 6;
} finally {
System.out.println("finally...");
return 2;
}
}
}
| [
"wang_jun6@hoperun.com"
] | wang_jun6@hoperun.com |
b9ee6ba273af010e14d2b26d4ec0f65aba4454fd | 341832b10a6e753ea8e46f6e9d89b26f503fa8c7 | /src/main/java/com/gmail/maksimus40a/test/stand/aop/logging/LoggingAspect.java | b7788ff3b383bf12f3554e9586b3f1836b4ce8dd | [] | no_license | OlexandrHychka/test-stand | 40aca120ee9717175e33f8d828d004e6af0273e5 | e4d48fc39808b65242f90aa267523c0da02e7fa0 | refs/heads/master | 2021-05-20T23:40:36.840283 | 2018-08-17T11:32:33 | 2018-08-17T11:32:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,651 | java | package com.gmail.maksimus40a.test.stand.aop.logging;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.util.Arrays;
@Aspect
@Component
public class LoggingAspect {
private final Logger log = LoggerFactory.getLogger(this.getClass());
@Pointcut("within(@org.springframework.stereotype.Repository *)" +
" || within(@org.springframework.stereotype.Service *)" +
" || within(@org.springframework.web.bind.annotation.RestController * )")
public void springBeanPointcut() {
}
@Pointcut("within(com.gmail.maksimus40a.test.stand.features.book.controllers..*) " +
" || within(com.gmail.maksimus40a.test.stand.features.employee.controllers..*)")
public void controllersPointcut() {
}
@Around("controllersPointcut()")
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
if (log.isDebugEnabled()) {
log.debug("Enter: {}.{}() with argument[s] = {}",
joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(),
Arrays.toString(joinPoint.getArgs()));
}
try {
Object result = joinPoint.proceed();
if (log.isDebugEnabled()) {
log.debug("Exit: {}.{}() with result = {}",
joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(),
result);
}
return result;
} catch (IllegalArgumentException e) {
log.error("Illegal argument: {} in {}.{}()",
Arrays.toString(joinPoint.getArgs()),
joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName());
throw e;
}
}
@AfterThrowing(pointcut = "controllersPointcut() && springBeanPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
log.error("Exception in {}.{}() with cause = {}, args = {}",
joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(),
e.getCause() != null ? e.getCause() : "NULL",
Arrays.toString(joinPoint.getArgs()));
}
} | [
"max40a@mail.ru"
] | max40a@mail.ru |
57c5004e9f7b2483d0f6e68e4095ccb6a64d5818 | c9373ea120ddc5d91f081a7c6b1d39d515dd91c8 | /src/hot/py/fpuna/lcca/util/parse/StructureElement.java | 67c6d2f0070df8307bc825f1281a419ae5064cf3 | [] | no_license | sveraaquino/wepi_conacyt | bf0e248166356efb7ed61a48e3d5d9b103e82c38 | 54a4ea457322b607e7b3f52403727b935af2989a | refs/heads/master | 2021-01-19T20:18:19.906745 | 2015-09-19T16:07:28 | 2015-09-19T16:07:28 | 42,778,618 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 16,261 | java | /*
* StructureElement.java
*
* @version 1.1.0; 16 Nov 2003
*
* @author Dimiter Prodanov
* @author University of Leiden
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package py.fpuna.lcca.util.parse;
import java.util.*;
import ij.*;
public class StructureElement implements Constants {
private int[] mask;
private int width=1;
private int height=1;
private double radius = 0;
private int[][] vect;
private int[] offset = OFFSET0;
private int shift=1;
public int type=FREE;
public boolean offsetmodified=false;
final static String EOL =
System.getProperty("line.separator");
public StructureElement(int[] amask, int width){
// this.width=(int) Math.sqrt(amask.length);
this.width=width;
this.height=amask.length/width;
this.shift=0;
setMask(amask);
vect= calcVect(mask,width);
}
public StructureElement(String tokenString){
this.shift=0;
this.type=FREE;
mask=inputMask(tokenString);
vect= calcVect(mask,width);
}
/** Creates a new instance of a StructureElement */
public StructureElement(int type, int shift, float radius, int[] offset ) {
// this.width=(int)(2*radius+2*shift);
int r=0;
// this.width= ((int)(radius+shift+0.5))*2 + 1;
// this.height=width;
this.shift=shift;
this.radius=radius;
if ((offset[0]*offset[0]+offset[1]*offset[1])>=radius/2) {
offset=OFFSET0;
}
this.offset=offset;
this.type=type;
switch (type) {
case CIRCLE: {
mask=createCircularMask(shift, radius,offset);
break;}
case DIAMOND:{
mask=createDiamondMask(shift, radius,offset);
break;}
case SQARE:{
mask=createSquareMask(shift, 2*radius,offset);
break;}
case HLINE:{
//this.height=1;
this.shift=1;
mask=createLineMask(shift, 2*radius, 0,offset);
break;
}
case VLINE:{
//this.height=width;
// this.width=1;
this.shift=1;
mask=createLineMask(shift, 2*radius, Math.PI/2,offset);
break;
}
case HPOINTS:
r=(int)radius;
this.width=r+2;
this.height=1;
mask=new int[width];
mask[1]=255;
mask[width-1]=255;
break;
case VPOINTS:
r=(int)radius;
this.height=r+2;
this.width=1;
mask=new int[height];
mask[1]=255;
mask[height-1]=255;
break;
case RING:
default:
;//mask=inputStrEl();
}
vect= calcVect(mask,width);
}
private int[] createCircularMask(int shift, double radius, int[] offset ) {
// if (radius<=2.0) {
// this.width= ((int)(radius+shift+0.5))*2 ;
//offset= SWGRAD;
//}
//else
this.width= ((int)(radius+shift+0.5))*2 + 1;
// this.width= ((int)(radius+shift))*2 + 1;
this.height=width;
// IJ.log("w="+width);
int[] mask = new int[this.width*this.width];
double r = width/2.0-0.5;
//if ((radius==1.5) && (r==3)) r=3.5;
double r2 = radius*radius+1 ;
// IJ.log("radius "+radius+" r "+r +" r2 "+r2);
int index=0;
for (double x=-r; x<=r; x++)
for (double y=-r; y<=r; y++) {
//int index= (int)(r+x+width*(r+y));
// if (x*x+y*y<r2){
if ((x-offset[0])*(x-offset[0])+(y-offset [1])*(y-offset [1])<r2 ) {
mask[index]=255;
}
index++;
}
// return mask;
return mask;
}
private int[] createDiamondMask(int shift, double radius, int[] offset ) {
this.width= ((int)(radius+shift+0.5))*2 + 1;
this.height=width;
int[] mask = new int[this.width*this.width];
// int[] mask = new int[width*width];
int r = width/2;
// double r = width/2.0-0.5;
for (int x=-r; x<=r; x++)
for (int y=-r; y<=r; y++)
if (Math.abs(x-offset[0])+Math.abs(y-offset [1])<=radius)
mask[r+x+(r+y)*width]=255;
return mask;
}
private int[] createSquareMask(int shift, double radius, int[] offset ) {
if (radius==0) radius=0.5;
int r,c=0;
this.width=(int)(2*radius+2*shift);
this.height=width;
int sz=this.width*this.height;
int[] mask = new int[sz];
// for (int r=shift;r<height-shift-1;r++)
// for (int c=shift;c<width-shift;c++) {
for ( int counter=0; counter<sz; counter++){
r=counter/width;
c=counter%width;
if ((r>shift) || (r<height-shift) || (c>shift) || (c<width-shift))
// try {
mask[counter]=255;
// }
// catch (Exception ex) {
// System.out.println("mask: "+mask.length);
// System.out.println("r: "+r);
// System.out.println("c: "+ c);
// }
}
return mask;
}
private int[] createLineMask(int shift, double l, double alpha, int[] offset ) {
//int width=(int)(2*radius+2*shift);
int r = (int)(l/2.0f-1);
//valida que alpha no sea multiplo entero de pi ni negativo
if (validate((float)(alpha/Math.PI),1)) alpha=0;
//this.width=(int)(2*radius*Math.cos(alpha)+2*shift);
//this.height=(int)(2*radius*Math.sin(alpha)+2*shift);
this.width=(int)((l+2*shift)*Math.cos(alpha));
this.height=(int)((l+2*shift)*Math.sin(alpha));
if (width==0) width++;
if (height==0) height++;
int sz=this.width*this.height;
int[] mask = new int[sz];
if ((alpha==0) || (alpha==Math.PI)) {
//for (int i=0;i<height-1;i++)
// IJ.log("shift "+shift);
for (int j=shift;j<width-shift;j++)
mask[j]=255;
}
else if (alpha==Math.PI/2)
for (int i=shift;i<height-shift;i++)
//for (int j=0;j<width;j++)
mask[i]=255;
else
for (int x=r-shift; x<=r-shift; x++) {
for (int y=r-shift; y<=r-shift; y++) {
if (Math.abs(alpha)<Math.PI/2) {
if (y-Math.tan(alpha)*x==0)
mask[r+x-offset[0]+(r+y-offset[1])*width]=255;
}
else {
if (Math.tan(Math.PI/2-alpha)*y-x==0)
mask[r+x-offset[0]+(r+y-offset[1])*width]=255;
}
}
}
return mask;
}
private int[] inputMask(String tokenString){
StringTokenizer st = new StringTokenizer(tokenString);
int n = st.countTokens();
// System.out.println("tokens: "+n);
int kw = (int)Math.sqrt(n);
int kh = kw;
int sz = kw*kh;
//System.out.println("size: "+sz);
int[] k = new int[sz];
for (int i=0; i<sz; i++)
k[i] = (int)getNum(st);
//this.mask=k;
this.width=kw;
this.height=width;
return k;
}
public int[] getMask(){
return mask;
}
public int getMaskAt(int index){
if (index<=mask.length)
return mask[index];
else
return -1;
}
public int getMaskAt(int x, int y){
if (x<=0) x = 0;
if (x>height) x = height;
if (y<=0) y = 0;
if (y>=width) y = width-1;
int index=x+this.width*y;
// if (index<=this.width*this.width) {
return mask[index];
// }
// else return -1;
}
public void setMask(int[] amask){
this.mask=amask;
}
public int getWidth(){
return width;
}
public int getHeight(){
return height;
}
public int getShift(){
return shift;
}
public double getR(){
return radius;
}
public int getType(){
return type;
}
public void setType(int type){
this.type=type;
}
public int[] getOffset(){
return this.offset;
}
public void setOffset(int[] offset){
this.offset=offset;
offsetmodified=true;
}
double getNum(StringTokenizer st) {
Double d;
String token = st.nextToken();
try {d = new Double(token);}
catch (NumberFormatException e){d = null;}
if (d!=null)
return(d.doubleValue());
else
return 0.0;
}
private static boolean validate( float var, int k){
float a=k*var;
int b=(int) (k* var);
if ((a-b==0)||(var<0))
return true;
else return false;
}
public int[] T(int[] h){
int m,n,index,ind;
// int[] strel=new int[width*width];
int[] strel=new int[mask.length];
for (int i=0; i<height-1;i++){
for (int j=0;j<width;j++){
m=i+h[0]; // y - direction
n=j+h[1]; // x - direction
if (m<0) m=0;
if (n<0) n=0;
if (n>width) n=width;
if (m>(width-1)) m=width-1;
index=n+width*m;
ind=j+width*i;
try {
// if (index>width*width) index=width*width;
strel[ind]=mask[index];
}
catch (ArrayIndexOutOfBoundsException ex) {
IJ.log("mask: "+mask.length);
IJ.log("index2: "+index);
IJ.log("index1: "+ ind);
}
}
}
return strel;
}
public StructureElement Tr(int[] h) {
return new StructureElement(T(h),this.width);
}
public int[] Delta(int[] offset){
int[] astrel=this.T(offset);
//int index=0;
// for (int i=0; i<this.width-1;i++){
// for (int j=0;j<this.width;j++){
for (int index=0;index<mask.length;index++) {
// for (int i=0;i<height-1;i++){
// for (int j=0; j<width;j++){
// int i=c/width;
//int j=c%width;
// index=j+this.width*i;
astrel[index]=mask[index]-astrel[index];
//}
}
return astrel;
}
public int[] H(int[]strel, int sign){
// int[] strel=new int[width*width];
for (int i=0; i<strel.length;i++){
if (strel[i]*sign>=0) strel[i]=0;
else strel[i]=255;
}
return strel;
}
public int getArea() {
int maskSize = 0;
for (int i=0; i<mask.length; i++)
if (mask[i]!=0) maskSize++;
return maskSize;
}
public int[] getBorder() {
int sz=this.mask.length;
int[] perim=new int[sz];
int k,l,m,n=-1;
int i,j=0;
for (int c=0;c<sz;c++) {
// for (int i=0;i<height-1;i++){
// for (int j=0; j<width;j++){
i=c/width;
j=c%width;
//System.out.println("i: "+i+ " j: "+j+"index: "+c);
if (j+1>width-1) {
k=0;
}
else {
k=mask[i*width+j+1];
}
if (i+1>height-1) {
l=0;
}
else {
l=mask[(i+1)*width+j];
}
if (j==0) {
m=0;
}
else {
m=mask[i*width+j-1];
}
if (i==0) {
n=0;
}
else {
n=mask[(i-1)*width+j];
}
// if (i*width+j<=mask.length)
// if (mask[i*width+j]>k || mask[i*width+j]>m || mask[i*width+j]>l || mask[i*width+j]>n)
if (mask[c]>k || mask[c]>m || mask[c]>l || mask[c]>n) {
// perim[i*width+j]= mask[i*width+j];
perim[c]= mask[c];
//c++;
}
//System.out.println(perim[c]);
}
return perim;
}
private int[][] calcVect(int[] perim, int w){
int N=0;
int sz=perim.length;
for (int i=0;i<perim.length;i++) {
if (perim[i]>0) N++;
}
//System.out.println("nnz: "+N);
int h=sz/w;
int p=(int)Math.floor(h/2);
int q=(int)Math.floor(w/2);
// System.out.println("p: "+p);
// System.out.println("q: "+q);
int [][] pg=new int[N][4];
int i,j,counter=0;
// System.out.println("size:"+sz);
for ( int c=0; c<sz; c++){
// for (int i=0;i<h-1;i++) {
// for (int j=0;j<w;j++){
i=c/w;
j=c%w;
if (perim[c]>0) {
pg[counter][0]=i-p;
pg[counter][1]=j-q ;
pg[counter][2]=perim[c];
int[] a={pg[counter][1], pg[counter][0]};
double d=getDistance(a,this.type) ;
//System.out.println("i: "+pg[counter][0]+ " j: "+pg[counter][1] +"d: " +d);
pg[counter][3]=(int)Math.round(d);
// System.out.println("i: "+pg[counter][0]+ " j: "+pg[counter][1]+"index: "+counter);
counter++;
//int pp=i-p;
// int qq=j-q ;
}
//System.out.println("i: "+i+ " j: "+j+"index: "+c);
// }
}
return pg;
}
public double getDistance(int[]X, int metrics) {
double d=0d;
double g=0;
//System.out.println("type: " +metrics);
switch (metrics) {
case CIRCLE: {
g=X[0]*X[0]+X[1]*X[1];
d=Math.sqrt(g+1)+cor3 ;
// if (g==2) d=2.0d;
break;
}
case DIAMOND: {
d=(double)(Math.abs(X[0])+Math.abs(X[1]));
break;
}
case SQARE: {
d=Math.max(Math.abs(X[0]),Math.abs(X[1]));
break;
}
default: {
d=Math.sqrt(X[0]*X[0]+X[1]*X[1]);
}
}
return d;
}
public int[][] VectTransform(int opt) {
if (opt==PERIM)
return calcVect(getBorder() , this.width);
else
return calcVect(this.mask , this.width);
}
public int[][] getVect() {
return vect;//calcVect(this.mask , this.width);
}
}
| [
"sveraaquino@gmail.com"
] | sveraaquino@gmail.com |
27372bd64f6fd528a8f67f175616c6392c766e22 | 134482103ecae835cd7eec7a807a60981842d432 | /OthelloAction.java | 48936923881b477558ad00fed6c0e378769f0d44 | [] | no_license | Koenig82/Othello_ai | 05227abcf21fb47ae5b27513adb2090a60e7db51 | 09724afd22c149f3f378edb2935134f94fc3a71f | refs/heads/master | 2023-04-09T21:00:44.227569 | 2018-11-30T06:59:55 | 2018-11-30T06:59:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,870 | java |
/**
* This class represents a 'move' in a game. The move is simply represented by
* two integers: the row and the column where the player puts the marker. In
* addition, the <code>OthelloAction</code> has a field where the estimated
* value of the move can be stored during computations.
*
* @author Henrik Björklund
*/
public class OthelloAction {
/** The row where the marker is placed. */
protected int row = -1;
/** The column where the marker is placed. */
protected int column = -1;
/** The estimated value of the move. */
protected int value = 0;
/** True if the player has to pass, i.e., if there is no legal move. */
protected boolean pass = false;
/**
* Creates a new <code>OthelloAction</code> with row <code>r</code>, column
* <code>c</code>, and value 0.
*/
public OthelloAction(int r, int c) {
row = r;
column = c;
value = 0;
}
public OthelloAction(int r, int c, boolean p) {
row = r;
column = c;
value = 0;
pass = p;
}
public OthelloAction(String s) {
if (s.equals("pass")) {
row = 0;
column = 0;
value = 0;
pass = true;
} else {
row = Character.getNumericValue(s.charAt(1));
column = Character.getNumericValue(s.charAt(3));
value = 0;
}
}
/** Sets the estimated value of the move. */
public void setValue(int v) {
value = v;
}
/** Returns the estimated value of the move. */
public int getValue() {
return value;
}
/** Sets the column where the marker is to be placed. */
public void setColumn(int c) {
column = c;
}
/** Returns the column where the marker is to be placed. */
public int getColumn() {
return column;
}
/** Sets the row where the marker is to be placed. */
public void setRow(int r) {
row = r;
}
/** Returns the row where the marker is to be placed. */
public int getRow() {
return row;
}
/**
* Sets the boolean that indicates whether this is a pass move. This should only
* be true if there are no legal moves.
*/
public void setPassMove(boolean b) {
pass = b;
}
/**
* Returns true if this is a pass move, indicating that the player has no legal
* moves. Otherwise returns false.
*/
public boolean isPassMove() {
return pass;
}
public void print() {
if (pass) {
System.out.println("pass");
} else {
System.out.println("(" + row + "," + column + ")");
}
}
@Override
public String toString() {
return "{" +
"row=" + row +
", column=" + column +
'}';
}
}
| [
"noreply@github.com"
] | Koenig82.noreply@github.com |
099416bc223f9c3f9b24d01fb1eff2aa93df0a5b | dfbc143422bb1aa5a9f34adf849a927e90f70f7b | /Contoh Project/video walp/com/google/android/gms/ads/formats/NativeAppInstallAd.java | 4c0fcff7d4c09ce790e5b03858982a0405ac977b | [] | no_license | IrfanRZ44/Set-Wallpaper | 82a656acbf99bc94010e4f74383a4269e312a6f6 | 046b89cab1de482a9240f760e8bcfce2b24d6622 | refs/heads/master | 2020-05-18T11:18:14.749232 | 2019-05-01T04:17:54 | 2019-05-01T04:17:54 | 184,367,300 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,830 | java | package com.google.android.gms.ads.formats;
import android.os.Bundle;
import com.google.android.gms.ads.VideoController;
import java.util.List;
public abstract class NativeAppInstallAd
extends NativeAd
{
public static final String ASSET_ATTRIBUTION_ICON_IMAGE = "2009";
public static final String ASSET_BODY = "2004";
public static final String ASSET_CALL_TO_ACTION = "2002";
public static final String ASSET_HEADLINE = "2001";
public static final String ASSET_ICON = "2003";
public static final String ASSET_IMAGE = "2007";
public static final String ASSET_MEDIA_VIDEO = "2011";
public static final String ASSET_PRICE = "2006";
public static final String ASSET_STAR_RATING = "2008";
public static final String ASSET_STORE = "2005";
public abstract void destroy();
public abstract NativeAd.AdChoicesInfo getAdChoicesInfo();
public abstract CharSequence getBody();
public abstract CharSequence getCallToAction();
public abstract Bundle getExtras();
public abstract CharSequence getHeadline();
public abstract NativeAd.Image getIcon();
public abstract List<NativeAd.Image> getImages();
public abstract CharSequence getMediationAdapterClassName();
public abstract CharSequence getPrice();
public abstract Double getStarRating();
public abstract CharSequence getStore();
public abstract VideoController getVideoController();
public static abstract interface OnAppInstallAdLoadedListener
{
public abstract void onAppInstallAdLoaded(NativeAppInstallAd paramNativeAppInstallAd);
}
}
/* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar
* Qualified Name: com.google.android.gms.ads.formats.NativeAppInstallAd
* JD-Core Version: 0.7.0.1
*/ | [
"irfan.rozal44@gmail.com"
] | irfan.rozal44@gmail.com |
5e965741868a1ca055d9fbc732fe594db51d0caf | c565e65c6eaf6ad88f3a5f246796a88a2bb417f2 | /src/main/Java/com/pc/dao/OrderDAO.java | 8cc88a90ac1ebbc2d6db52fbfcdc5b225d0b917d | [] | no_license | jew3lz/ProductPurchaseManageSystem | dde4be198412ba123b2d379cfd087459a47eb9d7 | aec842e7716b309e5d91c8a72b9fd65540232195 | refs/heads/master | 2021-01-10T09:06:30.750622 | 2016-04-11T02:24:41 | 2016-04-11T02:24:41 | 53,925,300 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 570 | java | package com.pc.dao;
import com.pc.domain.dataobject.EmployeeDO;
import com.pc.domain.dataobject.OrderCountDO;
import com.pc.domain.dataobject.OrderDO;
import com.pc.query.OrderQuery;
import java.util.List;
/**
* Created by 吴振武 on 29/2/2016.
*/
public interface OrderDAO {
List<OrderDO> queryOrder(OrderQuery query);
void deleteOrder(String id);
void insertOrder(OrderDO orderDO);
void updateOrder(OrderDO orderDO);
List<EmployeeDO> selectEmployee(OrderQuery query);
List<OrderCountDO> query30DaysOrderCount(OrderQuery query);
}
| [
"wuzhenwu@meizu.com"
] | wuzhenwu@meizu.com |
21d9694d4c67781ad7949b9706c66441ab473aef | 1f37057c3dd5a1d3eaa16a9d961fcba5ad18c815 | /src/main/java/com/dongnao/jack/service/impl/JackServiceImpl.java | f5101adf69c2797204f25ff78aed2a70001280a0 | [] | no_license | zhangjianbin1024/dn-spring-framework | 173df82f2ac3719026bc561e8666a2b4aa87eed2 | 9c43d90664bf61fc217042fa51de74f04d362ef3 | refs/heads/master | 2022-12-22T13:09:50.049368 | 2021-05-13T08:51:33 | 2021-05-13T08:51:33 | 253,397,023 | 1 | 0 | null | 2022-12-16T08:58:38 | 2020-04-06T04:46:51 | Java | UTF-8 | Java | false | false | 532 | java | package com.dongnao.jack.service.impl;
import com.dongnao.jack.annotation.Service;
import com.dongnao.jack.service.JackService;
@Service("JackServiceImpl")
public class JackServiceImpl implements JackService {
public String query(String param) {
return this.getClass().getName() + "query";
}
public String insert(String param) {
return this.getClass().getName() + "insert";
}
public String update(String param) {
return this.getClass().getName() + "update";
}
}
| [
"xyz@163.com"
] | xyz@163.com |
c69559ffa0ce910c2032b3cb82e16c0cb66a2a49 | 26f22ccaa3ae43ac170fd8f732e5bc8620b409f6 | /src/main/java/kr/co/promptech/datamap/metadata/dto/dcat/Foaf.java | 824ffd5f4728889238048487edf8deedf20c4bfd | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | iskim1018/bigdata-metadata-api | dad722b98cd4474d7bf6592a0ac47ddd37b76d7d | cca537141dd562a2af4229548c62400c9fb2f094 | refs/heads/master | 2020-09-27T23:54:26.025981 | 2019-12-09T15:45:59 | 2019-12-09T15:45:59 | 226,639,860 | 2 | 2 | null | 2019-12-08T12:13:51 | 2019-12-08T08:57:51 | Java | UTF-8 | Java | false | false | 403 | java | package kr.co.promptech.datamap.metadata.dto.dcat;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@NoArgsConstructor
@ToString
public class Foaf {
@JacksonXmlProperty(namespace = "foaf", localName = "Organization")
FoafOrganization organization;
}
| [
"iskim1018@gmail.com"
] | iskim1018@gmail.com |
450d1d0eb9155640d13dd587da1869c6da5789ec | 35d5bc946c15c8f2104504e60c3788105d8fa2d2 | /src/main/java/http/requests/CreateUserInfo.java | e39bcd7bec6be5db43685914a30ad412df5cb6ee | [] | no_license | DTU-GROUP17/CDIO_3_Server | fb61cbdd97e50c4af1ee2a3b19e1c513c5ba137e | 7ebc4744becfaf4be6f700e2bfa4838a312caf02 | refs/heads/master | 2023-07-21T23:33:37.845315 | 2023-07-08T19:47:00 | 2023-07-08T19:47:00 | 85,588,267 | 0 | 0 | null | 2023-07-08T19:47:02 | 2017-03-20T14:41:34 | Java | UTF-8 | Java | false | false | 377 | java | package http.requests;
import lombok.Getter;
import java.util.Set;
public class CreateUserInfo {
@Getter private String name;
@Getter private String userName;
@Getter private String password;
@Getter private Set<String> roles;
public boolean isFull(){
return this.getName()!=null && this.getUserName()!=null && this.getPassword()!=null && this.getRoles()!=null;
}
}
| [
"ce.guldfisk@gmail.com"
] | ce.guldfisk@gmail.com |
3bf2d9c85b4cf0f17196a92004726484426489ff | ad246c2d1bc904cd6c7cc927844656108ebbe60e | /UJMP_src/org/ujmp/core/longmatrix/factory/LongMatrix2DFactory.java | 9662781456376876f3e709b3d4ce9d284a698b70 | [] | no_license | sudiptap/workspace_llorma_randomAnchorPoints | 0498e26ae3cfc743975a68a1ae21e59e56d5a50b | debb912d65686ad93a782ec0bc07d33e496b4006 | refs/heads/master | 2020-06-07T04:09:03.952830 | 2015-08-06T15:32:25 | 2015-08-06T15:32:25 | 40,312,616 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,347 | java | /*
* Copyright (C) 2008-2010 by Holger Arndt
*
* This file is part of the Universal Java Matrix Package (UJMP).
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership and licensing.
*
* UJMP is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* UJMP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with UJMP; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
package org.ujmp.core.longmatrix.factory;
import java.io.Serializable;
import org.ujmp.core.exceptions.MatrixException;
import org.ujmp.core.longmatrix.LongMatrix2D;
public interface LongMatrix2DFactory extends Serializable {
public LongMatrix2D dense(long rows, long columns) throws MatrixException;
public LongMatrix2D zeros(long rows, long columns) throws MatrixException;
}
| [
"sudipto.pathak@gmail.com"
] | sudipto.pathak@gmail.com |
358a83c8bcb073e425f45faa5100cc7e1ef24123 | 58b7529c06ee27c36b1ca67c07d93b993a819cbc | /src/main/java/com/jitendra/eduapp/dao/AuthenticationDao.java | d6c8c9897beeda145966d8b64c68c1298d52cba1 | [] | no_license | jitendrasagoriya/eduapp | 6dd54523bd614ca768efd8674edaded23f57a7c7 | 74f257dcebd57063e202f04c5a3674ff27d661a3 | refs/heads/master | 2020-03-30T07:21:13.362386 | 2018-11-25T18:13:39 | 2018-11-25T18:13:39 | 150,934,140 | 0 | 0 | null | 2018-11-25T18:13:40 | 2018-09-30T05:36:09 | Java | UTF-8 | Java | false | false | 592 | java | package com.jitendra.eduapp.dao;
import org.springframework.stereotype.Service;
import com.jitendra.eduapp.domin.Authentication;
import com.jitendra.eduapp.repository.AuthenticationRepository;
/**
* @author jitendra sagoriya
*
*/
@Service
public interface AuthenticationDao {
public AuthenticationRepository getRepository();
public Boolean checkAuthentication(String accessToken);
public Authentication getAuthentication(String accessToken);
public Boolean updateLastLogin(Long id);
public Boolean updateAccessTokenAndLastLogin(String newAccessToken,String accessToken);
}
| [
"jitendrasagoriya83@gmail.com"
] | jitendrasagoriya83@gmail.com |
5aeac48325600dccb4e3df943b41d05790ba5bb1 | 3ac2f87a7efb813366e5fbb73d4aeec903241858 | /EasyEngenhariaGWT/src/java/br/com/easynet/gwt/easyportal/client/display/easyEngenharia/easyconstru/uni_unidade/Uni_unidadeConsultGWT.java | e442c0e98405cdee178c236762e4be365bbad041 | [] | no_license | topfontes/EngenhariaSoluction | 97c1357803a781e4af94da9d3d0737058f01f840 | 36042f1099d058365f0d7db08a805c774542a194 | refs/heads/master | 2021-01-11T09:01:26.010283 | 2018-10-05T20:46:19 | 2018-10-05T20:46:19 | 77,538,830 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,664 | java | /*
* EasyNet JDragon
*/
package br.com.easynet.gwt.easyportal.client.display.easyEngenharia.easyconstru.uni_unidade;
import br.com.easynet.gwt.easyportal.client.Constantes;
import br.com.easynet.gwt.easyportal.client.EasyAccessURL;
import br.com.easynet.gwt.easyportal.client.EasyContainer;
import br.com.easynet.gwt.easyportal.client.IListenetResponse;
import br.com.easynet.gwt.easyportal.client.Portal2GWT;
import br.com.easynet.gwt.easyportal.client.display.easyEngenharia.easyconstru.transfer.*;
import com.google.gwt.json.client.JSONValue;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.Style.SelectionMode;
import com.extjs.gxt.ui.client.widget.TabItem;
import com.extjs.gxt.ui.client.event.SelectionEvent;
import com.extjs.gxt.ui.client.event.Listener;
import java.util.ArrayList;
import java.util.List;
import br.com.easynet.gwt.easyportal.client.ConsultaGWT;
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.extjs.gxt.ui.client.widget.grid.ColumnData;
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
import com.extjs.gxt.ui.client.widget.grid.Grid;
import com.extjs.gxt.ui.client.widget.grid.GridCellRenderer;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
import com.extjs.gxt.ui.client.widget.table.NumberCellRenderer;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import java.util.Date;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
import com.extjs.gxt.ui.client.event.GridEvent;
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.BoxComponent;
import com.extjs.gxt.ui.client.widget.grid.ColumnData;
import com.extjs.gxt.ui.client.widget.grid.GridCellRenderer;
import java.util.HashMap;
/**
*
* @author geoleite
*/
public class Uni_unidadeConsultGWT extends ConsultaGWT implements IListenetResponse {
public static final String PAGE = "easyEngenharia/easyconstru/uni_unidade/uni_unidadeConsultGWT.jsp";
private ContentPanel cp = new ContentPanel();
private List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
final Uni_unidadeConsultGWT consultGWT = this;
public Uni_unidadeConsultGWT() {
try {
this.setHeading("Unidades");
getDataNORTH().setSize(27);
getDataEAST().setHidden(true);
getDataWEST().setHidden(true);
this.setSize("600", "300");
final NumberFormat currency = NumberFormat.getCurrencyFormat();
final NumberFormat number = NumberFormat.getFormat("0.00");
final NumberCellRenderer<Grid<Uni_unidadeTGWT>> numberRenderer = new NumberCellRenderer<Grid<Uni_unidadeTGWT>>(currency);
/*
GridCellRenderer<Stock> change = new GridCellRenderer<Stock>() {
public String render(Stock model, String property, ColumnData config, int rowIndex,
int colIndex, ListStore<Stock> store) {
double val = (Double) model.get(property);
String style = val < 0 ? "red" : "green";
return "<span style='color:" + style + "'>" + number.format(val) + "</span>";
}
};
GridCellRenderer<Stock> gridNumber = new GridCellRenderer<Stock>() {
public String render(Stock model, String property, ColumnData config, int rowIndex,
int colIndex, ListStore<Stock> store) {
return numberRenderer.render(null, property, model.get(property));
}
};
*/
ColumnConfig column = null;
column = new ColumnConfig();
column.setId("uni_nr_id");
column.setHeader("Código");
column.setWidth(200);
column.setHidden(true);
column.setAlignment(HorizontalAlignment.LEFT);
configs.add(column);
column = new ColumnConfig();
column.setId("uni_tx_nome");
column.setHeader("Unidade");
column.setWidth(200);
column.setAlignment(HorizontalAlignment.LEFT);
configs.add(column);
GridCellRenderer<Uni_unidadeTGWT> btnDel = new GridCellRenderer<Uni_unidadeTGWT>() {
private boolean init;
public Object render(final Uni_unidadeTGWT model, String property, ColumnData config, final int rowIndex,
final int colIndex, ListStore<Uni_unidadeTGWT> store, Grid<Uni_unidadeTGWT> grid) {
if (!init) {
init = true;
grid.addListener(Events.ColumnResize, new Listener<GridEvent<Uni_unidadeTGWT>>() {
public void handleEvent(GridEvent<Uni_unidadeTGWT> be) {
for (int i = 0; i < be.getGrid().getStore().getCount(); i++) {
if (be.getGrid().getView().getWidget(i, be.getColIndex()) != null
&& be.getGrid().getView().getWidget(i, be.getColIndex()) instanceof BoxComponent) {
((BoxComponent) be.getGrid().getView().getWidget(i, be.getColIndex())).setWidth(be.getWidth() - 10);
}
}
}
});
}
com.extjs.gxt.ui.client.widget.button.Button btnCol = new com.extjs.gxt.ui.client.widget.button.Button("", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
try {
EasyAccessURL eaurl = new EasyAccessURL(consultGWT);
HashMap<String, String> param = new HashMap<String, String>();
param.put("op", "delete");
param.put("uni_unidadeT.uni_nr_id", model.getUni_nr_id() + "");
eaurl.accessJSonMap(Constantes.URL + PAGE, param);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
btnCol.setWidth(grid.getColumnModel().getColumnWidth(colIndex) - 10);
btnCol.setToolTip("Deletar");
btnCol.setIcon(ICONS.del());
return btnCol;
}
};
column = new ColumnConfig();
column.setId("del");
column.setHeader("");
column.setWidth(30);
column.setAlignment(HorizontalAlignment.LEFT);
column.setRenderer(btnDel);
configs.add(column);
load();
layout();
} catch (Exception ex) {
Window.alert(ex.getMessage());
}
}
public void read(JSONValue jsonValue) {
JSONObject jsonObject;
if (jsonValue != null && (jsonObject = jsonValue.isObject()) != null) {
//Set<String> keys = jsonObject.keySet();
//Window.alert(usuario);
JSONArray resultado = jsonObject.get("resultado").isArray();
ListStore<Uni_unidadeTGWT> store = new ListStore<Uni_unidadeTGWT>();
for (int i = 1; i < resultado.size(); i++) {
Uni_unidadeTGWT uni_unidadeTGWT = new Uni_unidadeTGWT();
JSONObject registro = resultado.get(i).isObject();
Integer uni_nr_id = Integer.parseInt(EasyContainer.clearAspas(registro.get("uni_nr_id").toString()));
uni_unidadeTGWT.setUni_nr_id(uni_nr_id);
String uni_tx_nome = EasyContainer.clearAspas(registro.get("uni_tx_nome").toString());
uni_unidadeTGWT.setUni_tx_nome(uni_tx_nome);
store.add(uni_unidadeTGWT);
}
ColumnModel cm = new ColumnModel(configs);
Grid<Uni_unidadeTGWT> grid = new Grid<Uni_unidadeTGWT>(store, cm);
grid.setLoadMask(true);
grid.setStyleAttribute("borderTop", "none");
// grid.setAutoExpandColumn("name");
grid.setBorders(true);
//final Uni_unidadeConsultGWT consultGWT = this;
grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
grid.addListener(Events.OnDoubleClick, new Listener<GridEvent<Uni_unidadeTGWT>>() {
public void handleEvent(GridEvent<Uni_unidadeTGWT> be) {
Uni_unidadeUpdateDeleteGWT uni_unidadeUpdateDeleteGWT = new Uni_unidadeUpdateDeleteGWT();
uni_unidadeUpdateDeleteGWT.load(be.getModel());
uni_unidadeUpdateDeleteGWT.setConsultGWT(consultGWT);
uni_unidadeUpdateDeleteGWT.show();
}
});
grid.setStripeRows(true);
getCpMaster().removeAll();
getCpMaster().add(grid);
this.layout();
doLayout();
}
}
@Override
public void btnNovoAction(ButtonEvent be) {
Uni_unidadeInsertGWT insert;
try {
insert = new Uni_unidadeInsertGWT();
insert.setConsultGWT(consultGWT);
insert.setModal(true);
insert.show();
} catch (Exception e) {
e.printStackTrace();
}
}
public void load() {
try {
EasyAccessURL eaurl = new EasyAccessURL(this);
eaurl.accessJSon(Constantes.URL + PAGE);//"portalgwt/exemplos/gridexemplo.jsp");
List list = getCpMaster().getItems();
getCpMaster().removeAll();
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"topfontes@gmail.com"
] | topfontes@gmail.com |
b4319e2db52be2736f93c5b84711332f78bb6bfc | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/30/30_959e5dc0332e6114e11f10ebdaa8bfc9868d49d4/MessageProcessor/30_959e5dc0332e6114e11f10ebdaa8bfc9868d49d4_MessageProcessor_t.java | 4c0e64a4cffd04c8c653803b168138ed4e28fe5c | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 8,793 | java | /*
* This file is part of ChatAutoComplete.
*
*
* ChatAutoComplete is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ChatAutoComplete is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ChatAutoComplete. If not, see <http://www.gnu.org/licenses/>.
*
*/
package de.neptune_whitebear.ChatAutoComplete;
import com.nijiko.permissions.PermissionHandler;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
class MessageProcessor
{
public MessageProcessor( ChatAutoComplete cPlugin, ChatAutoCompleteConfig config, PermissionHandler cPermHandler )
{
plugin = cPlugin;
charPrefix = config.getChatPrefix().charAt( 0 );
maxReplace = config.getMaxReplace();
// Convert color code to ChatColor
try
{
atSignColor = ChatColor.getByCode( Integer.parseInt( config.getAtSignColor(), 16 ) );
} catch( NumberFormatException ex )
{
atSignColor = null;
}
try
{
nickColor = ChatColor.getByCode( Integer.parseInt( config.getNickColor(), 16 ) );
} catch( NumberFormatException ex )
{
nickColor = null;
}
permHandler = cPermHandler;
spoutListener = plugin.getSpoutListener();
keepPrefix = config.getKeepPrefix();
searchType = config.getSearchType();
if( searchType != "start" && searchType != "end" && searchType != "contains")
{
plugin.consoleMsg("Invalid searchtype "+searchType+" defaulting to 'start'.");
searchType = "start";
}
ignoreSymbols = config.getIgnoreSymbols();
plugin.consoleMsg( "Ignored symbols: " + ignoreSymbols, true );
}
public String[] ProcessMessage( Player sender, String eMsg, String format, Event event )
{
plugin.consoleMsg( "Cancelled event test", true );
plugin.consoleMsg( "Passed test, event not cancelled yet", true );
// Escape if cancelled or doesn't have permissions
plugin.consoleMsg( "chatEvent", true );
if( permHandler != null )
{
plugin.consoleMsg( "Using PermHandler", true );
if( !permHandler.has( sender, "autocomp.autocomp" ) ) return new String[]{ eMsg, format };
} else if( !sender.hasPermission( "autocomp.autocomp" ) ) return new String[]{ eMsg, format };
plugin.consoleMsg( "Perms OK", true );
String msg = format;
boolean useFormat = true;
if( msg.contains( "%2$s" ) || msg.equals( "{default}" ) )
{
plugin.consoleMsg( "using real message", true );
useFormat = false;
msg = eMsg;
}
//Escape if msg doesn't contain the prefix
if( msg.indexOf( charPrefix ) == -1 ) return new String[]{ eMsg, format };
String[] msgSplit = msg.split( "\\s" );
Map<String, Player> playerMap = new HashMap<String, Player>();
Map<String, String> nameMap = new HashMap<String, String>();
int safeLoop = maxReplace;
StringBuilder builder = new StringBuilder();
for( String part : msgSplit )
{
if( part.charAt( 0 ) == charPrefix )
{
safeLoop--;
// cut off the prefix
String subName = part.substring( 1 );
String extName = subName;
plugin.consoleMsg( "Stripping name pre: " + subName, true );
subName = stripIgnoredSymbols( subName );
plugin.consoleMsg( "Stripping name post: " + subName, true );
// check cache first
if( nameMap.containsKey( subName ) )
{
if( nameMap.get( subName ) != null ) subName = nameMap.get( subName );
} else
{
//check for player
Player player = getPlayer( subName );
if( player != null )
{
if( !playerMap.containsKey( player.getName() ) )
{
playerMap.put( player.getName(), player );
}
nameMap.put( subName, player.getName() );
subName = player.getName();
} else
{
nameMap.put( subName, null );
}
}
if( playerMap.containsKey( subName ) || ( nameMap.containsKey( subName ) && nameMap.get( subName ) != null ) )
{
String prefix = getPrefix( playerMap.get( subName ) );
subName = extName.replaceAll( "(?<=([" + ignoreSymbols + "]|^))(\\w+)(.*\\w+)?(?=([" + ignoreSymbols + "]|$))", subName + ChatColor.WHITE );
StringBuilder sign = new StringBuilder();
if( keepPrefix )
{
sign.append( ( atSignColor == null ) ? "" : atSignColor )
.append( ( char ) charPrefix )
.append( ChatColor.WHITE );
}
builder.append( builder.length() == 0 ? "" : " " )
.append( sign.toString() )
.append( prefix )
.append( subName )
.append( ChatColor.WHITE );
} else
{
if( builder.length() != 0 ) part = " " + part;
builder.append( part );
}
} else
{
if( builder.length() != 0 ) part = " " + part;
builder.append( part );
}
if( safeLoop <= 0 ) break;
}
if( useFormat ) format = builder.toString();
else eMsg = builder.toString();
if( spoutListener != null ) spoutListener.passEvent( event, playerMap.values() );
return new String[]{ eMsg, format };
}
String stripIgnoredSymbols( String input )
{
Pattern regex = Pattern.compile( "(?<=([" + ignoreSymbols + "]|^))(\\w+)(.*\\w+)?(?=([" + ignoreSymbols + "]|$))" );
Matcher m = regex.matcher( input );
if( m.find() ) return m.group( 0 );
else return input;
}
Player getPlayer( String subName )
{
plugin.consoleMsg( "Searching for: " + subName + " (SearchMode="+searchType+")", true );
if( searchType.equals( "start" ) ) return plugin.getServer().getPlayer( subName );
else if( searchType.equals( "exact" ) ) return plugin.getServer().getPlayerExact( subName );
else if( searchType.equals( "end" ) || searchType.equals( "contains" ) )
{
for( Player player : plugin.getServer().getOnlinePlayers() )
{
if( searchType.equals( "end" ) && player.getName().toLowerCase().endsWith( subName.toLowerCase() ) ) return player;
else if( searchType.equals( "contains" ) && player.getName().toLowerCase().contains( subName.toLowerCase() ) ) return player;
}
}
return null;
}
String getPrefix( Player player )
{
if( permHandler != null ) return permHandler.getUserPrefix( player.getWorld().getName(), player.getName() );
plugin.consoleMsg( "using Nick Color", true );
if( nickColor == null ) return "";
plugin.consoleMsg( "using true Nick Color", true );
return nickColor.toString();
}
private final ChatAutoComplete plugin;
private final int charPrefix;
private final int maxReplace;
private ChatColor atSignColor;
private ChatColor nickColor;
private final PermissionHandler permHandler;
private final ChatAutoCompleteSpoutPlayerListener spoutListener;
private final boolean keepPrefix;
private String searchType;
private final String ignoreSymbols;
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
ff5c8eefe3a31e037bd136c18630216d1e551b19 | 6fa7d1e9624caf57b9e0373b37f27f5a4135e9bd | /src/java/modelo/MovimentoCaixa.java | 71fb5cc84bb3729937ed2543466f73689ab8498c | [] | no_license | Thiago89web/Pwmoto | bd73953fc08224317f0e414e7ede5f23756526fe | c7068242e871854c9c4603a9633dcad6daca6572 | refs/heads/master | 2023-04-20T01:11:35.116033 | 2021-04-28T18:35:27 | 2021-04-28T18:35:27 | 362,570,546 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,609 | 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 modelo;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author THIAGO
*/
@Entity
@Table(name = "movimento_caixa")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "MovimentoCaixa.findAll", query = "SELECT m FROM MovimentoCaixa m"),
@NamedQuery(name = "MovimentoCaixa.findByIdMovCaixa", query = "SELECT m FROM MovimentoCaixa m WHERE m.idMovCaixa = :idMovCaixa"),
@NamedQuery(name = "MovimentoCaixa.findByDataMovCaixa", query = "SELECT m FROM MovimentoCaixa m WHERE m.dataMovCaixa = :dataMovCaixa"),
@NamedQuery(name = "MovimentoCaixa.findByValorMovCaixa", query = "SELECT m FROM MovimentoCaixa m WHERE m.valorMovCaixa = :valorMovCaixa"),
@NamedQuery(name = "MovimentoCaixa.findByObsMovCaixa", query = "SELECT m FROM MovimentoCaixa m WHERE m.obsMovCaixa = :obsMovCaixa")})
public class MovimentoCaixa implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id_mov_caixa")
private Integer idMovCaixa;
@Size(max = 10)
@Column(name = "data_mov_caixa")
private String dataMovCaixa;
// @Max(value=?) @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
@Column(name = "valor_mov_caixa")
private Double valorMovCaixa;
@Size(max = 255)
@Column(name = "obs_mov_caixa")
private String obsMovCaixa;
@JoinColumn(name = "id_tipo_mov", referencedColumnName = "id_tipo_mov")
@ManyToOne(optional = false)
private TipoMovimento idTipoMov;
@JoinColumn(name = "id_pessoa", referencedColumnName = "id_pessoa")
@ManyToOne(optional = false)
private Pessoa idPessoa;
@JoinColumn(name = "id_emp", referencedColumnName = "id_emp")
@ManyToOne(optional = false)
private Empresa idEmp;
public MovimentoCaixa() {
}
public MovimentoCaixa(Integer idMovCaixa) {
this.idMovCaixa = idMovCaixa;
}
public Integer getIdMovCaixa() {
return idMovCaixa;
}
public void setIdMovCaixa(Integer idMovCaixa) {
this.idMovCaixa = idMovCaixa;
}
public String getDataMovCaixa() {
return dataMovCaixa;
}
public void setDataMovCaixa(String dataMovCaixa) {
this.dataMovCaixa = dataMovCaixa;
}
public Double getValorMovCaixa() {
return valorMovCaixa;
}
public void setValorMovCaixa(Double valorMovCaixa) {
this.valorMovCaixa = valorMovCaixa;
}
public String getObsMovCaixa() {
return obsMovCaixa;
}
public void setObsMovCaixa(String obsMovCaixa) {
this.obsMovCaixa = obsMovCaixa;
}
public TipoMovimento getIdTipoMov() {
return idTipoMov;
}
public void setIdTipoMov(TipoMovimento idTipoMov) {
this.idTipoMov = idTipoMov;
}
public Pessoa getIdPessoa() {
return idPessoa;
}
public void setIdPessoa(Pessoa idPessoa) {
this.idPessoa = idPessoa;
}
public Empresa getIdEmp() {
return idEmp;
}
public void setIdEmp(Empresa idEmp) {
this.idEmp = idEmp;
}
@Override
public int hashCode() {
int hash = 0;
hash += (idMovCaixa != null ? idMovCaixa.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof MovimentoCaixa)) {
return false;
}
MovimentoCaixa other = (MovimentoCaixa) object;
if ((this.idMovCaixa == null && other.idMovCaixa != null) || (this.idMovCaixa != null && !this.idMovCaixa.equals(other.idMovCaixa))) {
return false;
}
return true;
}
@Override
public String toString() {
return "modelo.MovimentoCaixa[ idMovCaixa=" + idMovCaixa + " ]";
}
}
| [
"virtualves@gmail.com"
] | virtualves@gmail.com |
5297ff01d2583f233d2095c2fa4e80b05a82bd57 | d5e5dd7a72bbe5446976f1688756f18bb83d1e46 | /Device/src/app2/Main.java | c3f970a3fcdbaecd83da46475829b63de5085cda | [] | no_license | DmytroKyslyak/Java1 | 13af4cb53fa38ff992efb336e28b07b210a45461 | b17fcec15b0a54eab288b03e26320b4984dd286b | refs/heads/master | 2020-04-16T13:56:13.652795 | 2019-01-14T11:22:04 | 2019-01-14T11:22:04 | 165,648,600 | 0 | 0 | null | null | null | null | WINDOWS-1251 | Java | false | false | 6,307 | java | package app2;
public class Main {
public static void main(String[] args) {
/*
Computer comp1 = new Server();
Computer comp2 = new Computer();
Computer comp3 = new Computer();
Device comp4 = new Notebook();
Server serv = new Server();
Server serv1 = new Server();
serv.setKolProc(20);
serv1.setKolProc(4);
System.out.println(Device.getCount());
//System.out.println(serv1.getCount());
//Перевод в Мб И Гб
Computer comp6 = new Computer();
comp6.setRam(2000000000);
System.out.println("Переводим в Мб " +comp6.perevodMb());
System.out.println("Переводим в Гб " +comp6.perevodGb());
//Device dev = new Device();
//dev = dev.createDevice(2,110);
//dev = dev.createDevice(3,220);
comp1.setRam(550);
comp2.setRam(30);
comp3.setPower(5);
comp4.setPower(3);
//Создайте несколько объектов этих классов и выведите информацию о них на экран.
//Предусмотрите возможность создания устройств без указания мощности и возможность изменения мощности
//уже созданным устройствам позднее. Создайте ноутбук без указания мощности и назначьте этому ноутбуку мощность.
//Создайте метод, устанавливающий мощность устройству. Метод должен возвращать само устройство.
//Переопределите этот метод для компьютеров.
//Создайте такой же метод, устанавливающий объём памяти для компьютеров.
//Используйте эти методы на практике.
System.out.println("Память сервера " +comp1.getRam());
System.out.println("Память компьютера " +comp2.getRam());
System.out.println("Мощность компьютера " +comp3.getPower());
System.out.println("Мощность ноутбука " +comp4.getPower());
//вывод метода количества процессоров
Device obj = new Device();
Device dev = obj.createDevice(3,220);
System.out.println(dev.getPower());
System.out.println(dev.getClass() +" "+ dev.getName() +" "+dev.getPower() );
//Создайте метод назначения уникальных идентификаторов для каждого устройства
//(подразумевается сквозная нумерация всех устройств). Для каждого запуска программы
//нумерация должна начинаться со случайного числа. Обеспечьте невозможность переопределения метода
//назначения уникальных идентфикаторов.
//Обеспечьте отсутствие возможности наследования классу плазменных телевизоров
//Создайте ограничения на объём памяти для компьютеров.
//Память должна быть не менее минимального значения и не более максимального значения.
//При попытке создать компьютер(или изменить существующий) с неправильной памятью – выдавать предупреждение
//и не вносить данные о такой памяти. Ограничения должны быть известны создателю нового компьютера до его создания
*/
/*
Computer comp7 = new Server();
comp7.setRam(Computer.ram);
System.out.println("Память сервера " +comp7.getRam()+" ID: "+comp7.createId());
Device comp9 = new Tv();
System.out.println(comp9 +" ID: "+comp9.createId());
Device comp10 = new Tv();
System.out.println(comp10 +" ID: "+comp10.createId());
Device comp11 = new Tv();
System.out.println(comp11 +" ID: "+comp11.createId());
Device comp12 = new Tv();
System.out.println(comp11 +" ID: "+comp12.createId());
*/
/*
// Сумма Power
int n = 5;
Device dev[] = new Device[n];
Device devobj = new Device();
dev[0] = devobj.createDevice(1,5);
dev[1] = devobj.createDevice(2,6);
dev[2] = devobj.createDevice(1,7);
dev[3] = devobj.createDevice(2,8);
dev[4] = devobj.createDevice(3,9);
System.out.println("Сумарная мощность: "+devobj.sumPow(dev)); //сумарная мощность элементов массива
*/
//Сумма RAM
/*
int n = 3;
Device devobj = new Device();
Device dev[] = new Device[n];
dev[0] = devobj.createDevice(3,5);// явное преобразование
((Computer)dev[0]).setRam(10);
dev[1] = devobj.createDevice(2,6);
dev[2] = devobj.createDevice(1,7);
((Computer)dev[2]).setRam(20); // явное преобразование
System.out.println(devobj.getCounter(dev));
*/
//Сравнение двух устройств
// 1-е устройство
/*
Device devobj = new Device();
Device dev = new Device();
dev = devobj.createDevice(1,5);
((Computer)dev).setRam(564);
// 2-е устройство
Device dev1 = new Device();
dev1 = devobj.createDevice(3,15);
((Computer)dev1).setRam(256);
System.out.println("Результат сравнения: " +devobj.compDevs(dev, dev1));
*/
Device devobj = new Device();
Device dev = new Device();
dev = devobj.createDevice(1,5);
// 2-е устройство
Device dev1 = new Device();
dev1 = devobj.createDevice(4,15);
System.out.println("Результат сравнения: " +devobj.compDevs(dev, dev1));
/*
Device devobj = new Device();
Device dev = new Tv();
dev = devobj.createDevice(4,5);
((Tv)dev).setDiagonal(60);
// 2-е устройство
Device dev1 = new Tv();
dev1 = devobj.createDevice(4,15);
((Tv)dev1).setDiagonal(32);
System.out.println("Результат сравнения: " +devobj.compDevs(dev, dev1));
*/
}
}
| [
"dmytro.kyslyak@gmail.com"
] | dmytro.kyslyak@gmail.com |
f65df69a4c5f96bfa89269c3ae5a8f7656c36f9e | 4878a6f26e7af808606c8c48fe998434a3483af6 | /src/main/java/com/springjersey/rest/web/UserResource.java | 5dc19a79a28241f3f992fe84d33d0ac73c656239 | [] | no_license | lauriall/spring-jersey-rest | d1b2094a04f2c937e4fd9e918dc872879b00b14b | b2af18f6846062acd5224025bc82f621ea71a35a | refs/heads/master | 2020-05-20T01:25:52.645448 | 2016-08-09T13:22:02 | 2016-08-09T13:22:02 | 31,561,181 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,716 | java | package com.springjersey.rest.web;
import com.springjersey.rest.usermanagement.entity.User;
import com.springjersey.rest.usermanagement.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.ArrayList;
import java.util.List;
@Path("/users")
@Produces("application/json")
@Controller
public class UserResource {
@Autowired
private UserService userService;
@GET
@Path("/")
public Response getUsers() {
List<User> userList = userService.readAll();
return Response.status(200).entity(userList).build();
}
@GET
@Path("/{id}")
public Response getUser(@PathParam("id") long id) {
User u = userService.read(id);
return Response.status(200).entity(u).build();
}
@GET
@Path("/name/{name}")
public Response findUser(@PathParam("name") String name) {
User u = userService.readUser(name);
return Response.ok().entity(u).build();
}
@POST
@Path("/")
@Consumes(MediaType.APPLICATION_JSON)
public Response addUser(User u) {
User user = userService.saveUser(u);
return Response.ok().entity(user).build();
}
@PUT
@Path("/")
@Consumes(MediaType.APPLICATION_JSON)
public Response updateUser(User u) {
User user = userService.saveUser(u);
return Response.ok().entity(user).build();
}
@DELETE
@Path("/{id}")
public Response deleteUser(@PathParam("id") long id) {
userService.deleteUserById(id);
return Response.ok().build();
}
}
| [
"mail.lauri.all@gmail.com"
] | mail.lauri.all@gmail.com |
05af540ea7efd8f66247bc522f275a0c81a2ec99 | a3a8a9c09350349dcbf3d889ee94d3c77e1e94e1 | /src/main/java/com/parkinglot/constants/Constants.java | 3b65f940ed4371f3968d63ccf933e198b40dac86 | [] | no_license | VinodKandula/parkinglot | 16d47429a4ae84c3713e1f794e39a19fa5cad52f | 0799c26c8e7fa5f13bbb559dea888389a1270687 | refs/heads/master | 2022-12-27T03:38:10.306920 | 2020-07-15T18:29:06 | 2020-07-15T18:29:06 | 279,946,078 | 0 | 1 | null | 2020-10-13T23:36:13 | 2020-07-15T18:26:40 | Java | UTF-8 | Java | false | false | 812 | java | package com.parkinglot.constants;
/**
* @author Vinod Kandula
*/
public interface Constants {
public static final String CREATE_PARKING_LOT = "create_parking_lot";
public static final String PARK = "park";
public static final String LEAVE = "leave";
public static final String STATUS = "status";
public static final String REG_NUMBER_FOR_CARS_WITH_COLOR = "registration_numbers_for_cars_with_colour";
public static final String SLOTS_NUMBER_FOR_CARS_WITH_COLOR = "slot_numbers_for_cars_with_colour";
public static final String SLOTS_NUMBER_FOR_REG_NUMBER = "slot_number_for_registration_number";
public static final int NOT_AVAILABLE = -1;
public static final int VEHICLE_ALREADY_EXIST = -2;
public static final int NOT_FOUND = -1;
}
| [
"vinod.kandula@dharbor.com"
] | vinod.kandula@dharbor.com |
264254b680b4dd013171a3538c96d26254a7be83 | 75b0f2fceb9d1786d64cac831326354d431a8a32 | /com/planet_ink/coffee_mud/Abilities/Prayers/Prayer_RemoveInhibitions.java | fa64df7f6864b861f915bafb3273c5ac1e0985dd | [
"Apache-2.0"
] | permissive | thierrylach/CoffeeMud | f41857a8106706530c794d377bfb81b6458a847a | 83101f209d8875ec2bbaf6c623d520a30cd3cc8d | refs/heads/master | 2022-09-20T17:14:07.782102 | 2022-08-29T22:07:57 | 2022-08-29T22:07:57 | 113,072,543 | 0 | 0 | null | 2017-12-04T17:20:51 | 2017-12-04T17:20:51 | null | UTF-8 | Java | false | false | 3,926 | java | package com.planet_ink.coffee_mud.Abilities.Prayers;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2019-2022 Bo Zimmerman
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.
*/
public class Prayer_RemoveInhibitions extends Prayer
{
@Override
public String ID()
{
return "Prayer_RemoveInhibitions";
}
private final static String localizedName = CMLib.lang().L("Remove Inhibitions");
@Override
public String name()
{
return localizedName;
}
@Override
public int classificationCode()
{
return Ability.ACODE_PRAYER|Ability.DOMAIN_EVANGELISM;
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_OK_OTHERS;
}
@Override
public long flags()
{
return Ability.FLAG_CHAOS;
}
@Override
public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel)
{
final MOB target=this.getTarget(mob,commands,givenTarget);
if(target==null)
return false;
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
final boolean success=proficiencyCheck(mob,0,auto);
CMMsg msg2=null;
if((mob!=target)&&(!mob.getGroupMembers(new HashSet<MOB>()).contains(target)))
msg2=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto)|CMMsg.MASK_MALICIOUS,L("<T-NAME> do(es) not seem to like <S-NAME> messing with <T-HIS-HER> head."));
if(success&&(CMLib.factions().getFaction(CMLib.factions().getInclinationID())!=null))
{
final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),
L(auto?"<T-NAME> feel(s) more chaotic.":"^S<S-NAME> @x1 to remove more inhibitions from <T-YOUPOSS> mind!^?",prayWord(mob)));
if((mob.location().okMessage(mob,msg))
&&((msg2==null)||(mob.location().okMessage(mob,msg2))))
{
mob.location().send(mob,msg);
if((msg.value()<=0)&&((msg2==null)||(msg2.value()<=0)))
{
target.tell(L("Chaotic, disorderly thoughts fill your head."));
final int lawfulness=CMLib.dice().roll(10,adjustedLevel(mob,asLevel),10*super.getXLEVELLevel(mob))*-1;
CMLib.factions().postSkillFactionChange(target,this, CMLib.factions().getInclinationID(), lawfulness);
}
if(msg2!=null)
mob.location().send(mob,msg2);
}
}
else
{
if((msg2!=null)&&(mob.location().okMessage(mob,msg2)))
mob.location().send(mob,msg2);
return beneficialWordsFizzle(mob,target,L("<S-NAME> point(s) at <T-NAMESELF> and @x1, but nothing happens.",prayWord(mob)));
}
// return whether it worked
return success;
}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
b774cb94ddd964515b34320aac0db388ac7aefd3 | 5ed707de9f3de6044543886ea91bde39879bfae6 | /ASFantasy/ASFJava/Source/UI/ASFantasyGameResultNonePnl.java | 4d7777e4430c066baa9c5a7bb04b96de501d59be | [] | no_license | grtvd/asifantasysports | 9e472632bedeec0f2d734aa798b7ff00148e7f19 | 76df32c77c76a76078152c77e582faa097f127a8 | refs/heads/master | 2020-03-19T02:25:23.901618 | 1999-12-31T16:00:00 | 2018-05-31T19:48:19 | 135,627,290 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,285 | java | /* ASFantasyGameResultNonePnl.java */
/******************************************************************************/
/******************************************************************************/
import java.awt.*;
import java.util.*;
import jclass.bwt.*;
import jclass.util.*;
/******************************************************************************/
public class ASFantasyGameResultNonePnl extends ASFantasyGameResultPnl
{
//{{DECLARE_CONTROLS
symantec.itools.awt.BorderPanel fBorderPnl;
jclass.bwt.JCLabel fNoResultsLbl;
//}}
/**************************************************************************/
public ASFantasyGameResultNonePnl()
{
}
/**************************************************************************/
public void open()
{
//{{INIT_CONTROLS
setLayout(null);
addNotify();
resize(550,260);
setFont(new Font("Helvetica", Font.BOLD, 12));
setBackground(new Color(12632256));
fBorderPnl = new symantec.itools.awt.BorderPanel();
fBorderPnl.setLayout(null);
fBorderPnl.reshape(0,0,550,260);
fBorderPnl.setFont(new Font("Helvetica", Font.PLAIN, 12));
add(fBorderPnl);
fBorderPnl.setPaddingTop(1);
fBorderPnl.setPaddingBottom(1);
fBorderPnl.setPaddingLeft(1);
fBorderPnl.setPaddingRight(1);
fBorderPnl.setBevelStyle(symantec.itools.awt.BorderPanel.BEVEL_RAISED);
fNoResultsLbl = new jclass.bwt.JCLabel();
fNoResultsLbl.reshape(4,6,300,18);
fNoResultsLbl.setFont(new Font("Helvetica", Font.BOLD, 14));
fBorderPnl.add(fNoResultsLbl);
fNoResultsLbl.setAlignment(jclass.bwt.JCLabel.MIDDLELEFT);
{
java.lang.String[] tempString = new java.lang.String[1];
tempString[0] = new java.lang.String("No Game Results");
fNoResultsLbl.setTextList(tempString);
}
//}}
}
/**************************************************************************/
protected void loadData(ScheduleDayStatus status,TeamInfoName visitTeam,
short visitScore,PlayerInfoVector visitPlayerVector,
TeamInfoName homeTeam,short homeScore,
PlayerInfoVector homePlayerVector)
{
}
}
/******************************************************************************/
/******************************************************************************/
| [
"grtvd@users.noreply.github.com"
] | grtvd@users.noreply.github.com |
c736e2b03ac36d79cf702900e8d71b7565131b95 | 28532fec96dbad006a2de0debf222527bd454f50 | /app/src/main/java/com/lxl/mineutil/bean/SendMsmBean.java | c44b7dc48089789d3fa86c5fd109adb9c20d9aa8 | [] | no_license | womendeaitaiwunai/MineUtil | 50ba10b6ffc26ba238a7e7b9edf1f6f6661c2fa1 | 8d844182c3150324081a79242ba176c32cfaa976 | refs/heads/master | 2020-12-30T16:03:11.396494 | 2017-08-25T08:57:31 | 2017-08-25T08:57:31 | 90,959,904 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 694 | java | package com.lxl.mineutil.bean;
/**
* Created by lxl on 2017/5/15.
*/
public class SendMsmBean {
/**
* msg : 该设备没有在云端注册
* result : -2
* version : 5.4.9.021
*/
private String msg;
private int result;
private String version;
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getResult() {
return result;
}
public void setResult(int result) {
this.result = result;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}
| [
"535783654@qq.com"
] | 535783654@qq.com |
174529b0d5291f1b0b977c9367817344cf3ec55a | 305a1f59ad8eafa93f6dcce41c0d2ead25e89687 | /src/com/hyxbiao/voicecontrol/command/VoiceCommand.java | 15d958457c87c1184e430c053eafcbe19f8cbf26 | [] | no_license | hyxbiao/VoiceControl | ae62ed616dba09f41f71d3a087c8f8d121c45984 | 0bada9c6be6d4fbc65e36256dd21e4db11445026 | refs/heads/master | 2021-03-12T23:41:08.794944 | 2013-07-12T10:08:45 | 2013-07-12T10:08:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,313 | java | package com.hyxbiao.voicecontrol.command;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import com.hyxbiao.voicecontrol.exception.UnRecognitionException;
import com.hyxbiao.voicecontrol.lib.Algorithm;
import com.hyxbiao.voicecontrol.lib.PinyinUtil;
import android.content.Context;
import android.util.Log;
public class VoiceCommand {
private static final String TAG = "VoiceCommand";
protected HashMap<String, Command> mCommandMap;
private Context mContext = null;
public VoiceCommand(Context context) {
mCommandMap = new HashMap<String, Command>();
mContext = context;
}
public void addCommand(String desc, int code, VoiceCommandListener listener) {
mCommandMap.put(desc, new Command(desc, code, listener));
}
public void execute(String txt) throws UnRecognitionException {
Command cmd = mCommandMap.get(txt);
if(cmd == null) {
String desc = recognize(txt);
if(desc == null) {
Log.w(TAG, "no recognize cmd: " + txt);
throw new UnRecognitionException(txt);
}
cmd = mCommandMap.get(desc);
}
cmd.execute(mContext);
}
private String recognize(String txt) {
String best = null;
float bestScore = 0;
String pinyin = PinyinUtil.spell(txt);
Iterator<Entry<String, Command>> iter = mCommandMap.entrySet().iterator();
while(iter.hasNext()) {
Entry<String, Command> pair = (Entry<String, Command>)iter.next();
String desc = (String)pair.getKey();
Command cmd = (Command)pair.getValue();
String cmdPinyin = cmd.getPinyin();
Log.d(TAG, "cmd[" + desc + "], pinyin[" + cmdPinyin + "]");
float score = 0;
score = Algorithm.levenshtein(cmdPinyin, pinyin);
Log.d(TAG, "txt[" + txt + "], pinyin[" + pinyin + "], similarity[" + score + "]");
if(score > bestScore) {
bestScore = score;
best = desc;
}
}
return best;
}
private class Command {
private String mCmd;
private int mCode;
private VoiceCommandListener mListener;
private String mPinyin;
public Command(String cmd, int code, VoiceCommandListener listener) {
mCmd = cmd;
mCode = code;
mListener = listener;
mPinyin = PinyinUtil.spell(cmd);
}
public String getPinyin() {
return mPinyin;
}
public void execute(Context context) {
mListener.onExecute(context, mCmd, mCode);
}
}
}
| [
"hyxbiao@gmail.com"
] | hyxbiao@gmail.com |
1637b974477cb23c494dfa5d935d2f2a967a286b | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/appbrand/jsapi/video/i.java | 08211414448f389faed630994d583220d71c3839 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 2,122 | java | package com.tencent.mm.plugin.appbrand.jsapi.video;
import android.view.View;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.jsapi.base.b;
import com.tencent.mm.plugin.appbrand.jsapi.coverview.CoverViewContainer;
import com.tencent.mm.plugin.appbrand.jsapi.e;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.al;
import org.json.JSONObject;
public final class i extends b
{
private static final int CTRL_INDEX = 7;
public static final String NAME = "removeVideoPlayer";
public final boolean b(e parame, int paramInt, View paramView, JSONObject paramJSONObject)
{
AppMethodBeat.i(126567);
ab.i("MicroMsg.JsApiRemoveVideoPlayer", "onRemoveView videoPlayerId=%d", new Object[] { Integer.valueOf(paramInt) });
boolean bool;
if (!(paramView instanceof CoverViewContainer))
{
ab.w("MicroMsg.JsApiRemoveVideoPlayer", "the view(%s) is not a instance of CoverViewContainer", new Object[] { Integer.valueOf(paramInt) });
AppMethodBeat.o(126567);
bool = false;
}
while (true)
{
return bool;
AppBrandVideoView localAppBrandVideoView = (AppBrandVideoView)((CoverViewContainer)paramView).ah(AppBrandVideoView.class);
if (localAppBrandVideoView == null)
{
ab.w("MicroMsg.JsApiRemoveVideoPlayer", "onRemoveView not AppBrandVideoView");
AppMethodBeat.o(126567);
bool = false;
}
else
{
al.d(new i.1(this, localAppBrandVideoView));
super.b(parame, paramInt, paramView, paramJSONObject);
AppMethodBeat.o(126567);
bool = true;
}
}
}
public final int r(JSONObject paramJSONObject)
{
AppMethodBeat.i(126566);
int i = paramJSONObject.optInt("videoPlayerId", 0);
AppMethodBeat.o(126566);
return i;
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.video.i
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
0c134e4b78bc9729d7bc7314099991eefdab4512 | d2b07a946c10c7ea1b879344619cc71c84e05217 | /src/main/java/ua/com/papers/pojo/entities/ContactEntity.java | bb018df44ad3ccaf93002858c1e33c99cb3eaa1c | [] | no_license | glibovet/papers | b6b303803558945c1d681d78d68aa1f307d83fff | 78fb9bfbb5fb2bf07e84354c783ac6965c806050 | refs/heads/master | 2020-04-12T05:34:19.145805 | 2018-10-13T08:19:19 | 2018-10-13T08:19:19 | 64,323,173 | 0 | 0 | null | 2017-04-13T18:41:43 | 2016-07-27T16:09:28 | Java | UTF-8 | Java | false | false | 2,704 | java | package ua.com.papers.pojo.entities;
import org.hibernate.annotations.Type;
import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name = "contacts")
public class ContactEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private int id;
@Column(name = "isAccepted")
@Type(type = "org.hibernate.type.NumericBooleanType")
private boolean isAccepted;
@Column(name = "attachment")
private String attachment;
@Column(name = "message")
private String message;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "user_from")
private UserEntity userFrom;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "user_to")
private UserEntity userTo;
@Column(name="date")
@Temporal(TemporalType.TIMESTAMP)
private Date date;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public UserEntity getUserFrom() {
return userFrom;
}
public void setUserFrom(UserEntity userFrom) {
this.userFrom = userFrom;
}
public UserEntity getUserTo() {
return userTo;
}
public void setUserTo(UserEntity userTo) {
this.userTo = userTo;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getAttachment() {
return attachment;
}
public void setAttachment(String attachment) {
this.attachment = attachment;
}
public boolean isAccepted() {
return isAccepted;
}
public void setAccepted(boolean accepted) {
isAccepted = accepted;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ContactEntity that = (ContactEntity) o;
//TODO all fields
return id != that.id;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (message != null ? message.hashCode() : 0);
//TODO all fields
return result;
}
@Override
public String toString() {
return "ContactEntity{" +
"id=" + id +
", isAccepted=" + isAccepted +
", attachment='" + attachment + '\'' +
", message='" + message + '\'' +
", userFrom=" + userFrom +
", userTo=" + userTo +
'}';
}
}
| [
"isaiev.artem@gmail.com"
] | isaiev.artem@gmail.com |
98a92e665c07a4ef484bd603aa0b875c34b1ea73 | cd02e8fb1df7f1bc72a429b4361c2319f716aaf6 | /Notes/sf-security-example/sf-security-hibernate4-full/src/main/java/in/spring4buddies/application/dao/UserProfileDaoImpl.java | f6bc047eadceebf898df220a7c8a6e17e7b79589 | [] | no_license | santosh32/spring-blog | 5c08229d135177d8003eca3547ee7898876de999 | 65af4b0f734b34d462dac7075cdd8fc3c2ef53df | refs/heads/master | 2021-01-16T23:44:32.300684 | 2018-01-04T16:29:45 | 2018-01-04T16:29:45 | 44,607,911 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 864 | java | package in.spring4buddies.application.dao;
import in.spring4buddies.application.model.UserProfile;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
@Repository("userProfileDao")
public class UserProfileDaoImpl extends AbstractDao<Integer, UserProfile>implements UserProfileDao{
public UserProfile findById(int id) {
return getByKey(id);
}
public UserProfile findByType(String type) {
Criteria crit = createEntityCriteria();
crit.add(Restrictions.eq("type", type));
return (UserProfile) crit.uniqueResult();
}
@SuppressWarnings("unchecked")
public List<UserProfile> findAll(){
Criteria crit = createEntityCriteria();
crit.addOrder(Order.asc("type"));
return (List<UserProfile>)crit.list();
}
}
| [
"santosh.spring32@gmail.com"
] | santosh.spring32@gmail.com |
e3d147244a3a48bea27539ce79db1b89c956be9d | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-12919-2-25-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/query/jpql/internal/JPQLParser_ESTest_scaffolding.java | 80def61c7786edb1f8c294e2895910189c7d51f6 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 16,390 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 08:53:21 UTC 2020
*/
package org.xwiki.query.jpql.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class JPQLParser_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.xwiki.query.jpql.internal.JPQLParser";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JPQLParser_ESTest_scaffolding.class.getClassLoader() ,
"org.xwiki.query.jpql.node.Token",
"org.xwiki.query.jpql.node.AConditionalFactor",
"org.xwiki.query.jpql.node.APathSimpleSelectExpression",
"org.xwiki.query.jpql.node.PIsExpression",
"org.xwiki.query.jpql.node.TLength",
"org.xwiki.query.jpql.node.PSelectList",
"org.xwiki.query.jpql.node.AFunctimeArithmeticPrimary",
"org.xwiki.query.jpql.node.APathCountArg",
"org.xwiki.query.jpql.node.PComparisonExpression",
"org.xwiki.query.jpql.node.TEmpty",
"org.xwiki.query.jpql.node.TBy",
"org.xwiki.query.jpql.node.PFromList",
"org.xwiki.query.jpql.node.ANullIsExpression",
"org.xwiki.query.jpql.node.AInConditionWithNotExpression",
"org.xwiki.query.jpql.node.PJoinSpec",
"org.xwiki.query.jpql.node.PSimpleSelectExpression",
"org.xwiki.query.jpql.node.TLocate",
"org.xwiki.query.jpql.node.ABetweenExpression",
"org.xwiki.query.jpql.node.TSelect",
"org.xwiki.query.jpql.node.PGroupbyClause",
"org.xwiki.query.jpql.node.PConditionalPrimary",
"org.xwiki.query.jpql.node.ABoolLiteral",
"org.xwiki.query.jpql.node.ANumLiteral",
"org.xwiki.query.jpql.node.AObjectSelectExpression",
"org.xwiki.query.jpql.node.ASingleSelectList",
"org.xwiki.query.jpql.analysis.AnalysisAdapter",
"org.xwiki.query.jpql.node.PSubquery",
"org.xwiki.query.jpql.node.PAllanyExpression",
"org.xwiki.query.jpql.node.ABetweenConditionWithNotExpression",
"org.xwiki.query.jpql.node.TMember",
"org.xwiki.query.jpql.node.TWhite",
"org.xwiki.query.jpql.node.AAllanyExpression",
"org.xwiki.query.jpql.node.AAsSubselectIdentificationVariableDeclaration",
"org.xwiki.query.jpql.node.PJoin",
"org.xwiki.query.jpql.node.ASelectList",
"org.xwiki.query.jpql.node.APathSelectExpression",
"org.xwiki.query.jpql.node.ALengthFunctionsReturningNumerics",
"org.xwiki.query.jpql.node.TLike",
"org.xwiki.query.jpql.node.AOrderbyItem",
"org.xwiki.query.jpql.node.AGroupbyList",
"org.xwiki.query.jpql.node.AEmptyIsExpression",
"org.xwiki.query.jpql.node.AXAbstractSchemaName",
"org.xwiki.query.jpql.node.TInputParameter",
"org.xwiki.query.jpql.node.AJoin",
"org.xwiki.query.jpql.node.ASubstringFunctionsReturningStrings",
"org.xwiki.query.jpql.node.ATrimCharacter",
"org.xwiki.query.jpql.node.TNull",
"org.xwiki.query.jpql.node.TExists",
"org.xwiki.query.jpql.node.AEscapeSpec",
"org.xwiki.query.jpql.node.TCount",
"org.xwiki.query.jpql.node.TDot",
"org.xwiki.query.jpql.node.PSimpleSelectClause",
"org.xwiki.query.jpql.node.PInItem",
"org.xwiki.query.jpql.node.PConditionalExpression",
"org.xwiki.query.jpql.node.ASingleSimpleArithmeticExpression",
"org.xwiki.query.jpql.node.AModFunctionsReturningNumerics",
"org.xwiki.query.jpql.node.PSimpleArithmeticExpression",
"org.xwiki.query.jpql.node.ASimpleArithmeticExpression",
"org.xwiki.query.jpql.node.AEscapeCharacter",
"org.xwiki.query.jpql.node.ASingleGroupbyList",
"org.xwiki.query.jpql.node.AUpperFunctionsReturningStrings",
"org.xwiki.query.jpql.node.TOrderbySpec",
"org.xwiki.query.jpql.node.TFrom",
"org.xwiki.query.jpql.node.TAs",
"org.xwiki.query.jpql.node.POrderbyClause",
"org.xwiki.query.jpql.node.ATrimFunctionsReturningStrings",
"org.xwiki.query.jpql.node.PAbstractSchemaName",
"org.xwiki.query.jpql.node.TBooleanLiteral",
"org.xwiki.query.jpql.node.ABrConditionalPrimary",
"org.xwiki.query.jpql.node.AStrLiteral",
"org.xwiki.query.jpql.node.APathComparableItem",
"org.xwiki.query.jpql.node.AConstStringPrimary",
"org.xwiki.query.jpql.node.AFuncnumComparableItem",
"org.xwiki.query.jpql.node.APathArithmeticPrimary",
"org.xwiki.query.jpql.lexer.LexerException",
"org.xwiki.query.jpql.node.TFloatLiteral",
"org.xwiki.query.jpql.parser.State",
"org.xwiki.query.jpql.node.POrderbyList",
"org.xwiki.query.jpql.node.PSubqueryFromClause",
"org.xwiki.query.jpql.node.ALeftJoinSpec",
"org.xwiki.query.jpql.node.PNumericLiteral",
"org.xwiki.query.jpql.node.ALowerFunctionsReturningStrings",
"org.xwiki.query.jpql.node.PRangeVariableDeclaration",
"org.xwiki.query.jpql.node.TComma",
"org.xwiki.query.jpql.node.PSimpleCondExpression",
"org.xwiki.query.jpql.node.PNullComparisonExpression",
"org.xwiki.query.jpql.node.ANullComparisonExpression",
"org.xwiki.query.jpql.node.TMulDiv",
"org.xwiki.query.jpql.node.PFunctionsReturningStrings",
"org.xwiki.query.jpql.node.PConditionWithNotExpression",
"org.xwiki.query.jpql.node.PCountExpression",
"org.xwiki.query.jpql.node.AAgrSimpleSelectExpression",
"org.xwiki.query.jpql.node.PEmptyCollectionComparisonExpression",
"org.xwiki.query.jpql.node.AHavingClause",
"org.xwiki.query.jpql.node.AAgrArithmeticPrimary",
"org.xwiki.query.jpql.node.PConditionalFactor",
"org.xwiki.query.jpql.node.THaving",
"org.xwiki.query.jpql.node.TSqrt",
"org.xwiki.query.jpql.node.PVariable",
"org.xwiki.query.jpql.node.PTrimDesc",
"org.xwiki.query.jpql.node.AConditionalTerm",
"org.xwiki.query.jpql.node.TAddSub",
"org.xwiki.query.jpql.node.AInnerJoinSpec",
"org.xwiki.query.jpql.node.AAgrFunctionsReturningNumerics",
"org.xwiki.query.jpql.node.ALikeConditionWithNotExpression",
"org.xwiki.query.jpql.node.ARangeVariableDeclaration",
"org.xwiki.query.jpql.node.ALocateFunctionsReturningNumerics",
"org.xwiki.query.jpql.node.PSelectClause",
"org.xwiki.query.jpql.node.ASelectStatement",
"org.xwiki.query.jpql.node.TInner",
"org.xwiki.query.jpql.node.TLbr",
"org.xwiki.query.jpql.node.TComparisonOperator",
"org.xwiki.query.jpql.node.AOrderbyList",
"org.xwiki.query.jpql.node.ACmpSimpleConditionalExpressionRemainder",
"org.xwiki.query.jpql.node.PStatement",
"org.xwiki.query.jpql.node.ASingleArithmeticTerm",
"org.xwiki.query.jpql.node.PFromClause",
"org.xwiki.query.jpql.node.TTJoin",
"org.xwiki.query.jpql.node.Switch",
"org.xwiki.query.jpql.node.PAggregateExpression",
"org.xwiki.query.jpql.node.PFunctionsReturningNumerics",
"org.xwiki.query.jpql.node.ABrArithmeticPrimary",
"org.xwiki.query.jpql.node.ACollectionMemberExpression",
"org.xwiki.query.jpql.analysis.Analysis",
"org.xwiki.query.jpql.node.AMemberSubselectIdentificationVariableDeclaration",
"org.xwiki.query.jpql.node.PInExpression",
"org.xwiki.query.jpql.node.PIdentificationVariableDeclaration",
"org.xwiki.query.jpql.parser.ParserException",
"org.xwiki.query.jpql.node.TAnd",
"org.xwiki.query.jpql.node.TBetween",
"org.xwiki.query.jpql.node.ASingleFromList",
"org.xwiki.query.jpql.node.PPath",
"org.xwiki.query.jpql.node.AAasComparisonExpressionRightOperand",
"org.xwiki.query.jpql.node.PCollectionMemberExpression",
"org.xwiki.query.jpql.node.AArithmeticExpression",
"org.xwiki.query.jpql.node.AMemberConditionWithNotExpression",
"org.xwiki.query.jpql.node.TFunctionsReturningDatetime",
"org.xwiki.query.jpql.node.ASimpleCondExpression",
"org.xwiki.query.jpql.node.PArithmeticFactor",
"org.xwiki.query.jpql.node.TConcat",
"org.xwiki.query.jpql.node.AArithmeticTerm",
"org.xwiki.query.jpql.node.TDistinct",
"org.xwiki.query.jpql.node.AStartSpec",
"org.xwiki.query.jpql.node.TAbs",
"org.xwiki.query.jpql.node.PCollectionMemberDeclaration",
"org.xwiki.query.jpql.node.AXPath",
"org.xwiki.query.jpql.node.ALitInItem",
"org.xwiki.query.jpql.node.AFuncAggregateExpression",
"org.xwiki.query.jpql.node.PEscapeCharacter",
"org.xwiki.query.jpql.node.AArithmeticFactor",
"org.xwiki.query.jpql.node.APathStringPrimary",
"org.xwiki.query.jpql.node.AFromList",
"org.xwiki.query.jpql.node.PPatternValue",
"org.xwiki.query.jpql.node.APathSubselectIdentificationVariableDeclaration",
"org.xwiki.query.jpql.node.EOF",
"org.xwiki.query.jpql.node.AConditionalExpression",
"org.xwiki.query.jpql.node.AFunctimeComparableItem",
"org.xwiki.query.jpql.node.ASimpleSelectClause",
"org.xwiki.query.jpql.node.TGroup",
"org.xwiki.query.jpql.node.AAbstractSchemaName",
"org.xwiki.query.jpql.node.ASingleConditionalExpression",
"org.xwiki.query.jpql.node.PXClassName",
"org.xwiki.query.jpql.node.ATrimDesc",
"org.xwiki.query.jpql.node.TEscape",
"org.xwiki.query.jpql.node.ANotSimpleConditionalExpressionRemainder",
"org.xwiki.query.jpql.node.Switchable",
"org.xwiki.query.jpql.node.AInExpression",
"org.xwiki.query.jpql.node.ASubquery",
"org.xwiki.query.jpql.node.AMemberFromList",
"org.xwiki.query.jpql.node.AFuncstrArithmeticPrimary",
"org.xwiki.query.jpql.node.TIntegerLiteral",
"org.xwiki.query.jpql.node.PSelectStatement",
"org.xwiki.query.jpql.node.ASingleConditionalTerm",
"org.xwiki.query.jpql.node.PConditionalTerm",
"org.xwiki.query.jpql.node.PLiteral",
"org.xwiki.query.jpql.node.ASelectClause",
"org.xwiki.query.jpql.node.AOrderbyClause",
"org.xwiki.query.jpql.node.TId",
"org.xwiki.query.jpql.node.AQuotedXClassName",
"org.xwiki.query.jpql.node.TTrimSpecification",
"org.xwiki.query.jpql.node.PBetweenExpression",
"org.xwiki.query.jpql.node.ASubqueryArithmeticExpression",
"org.xwiki.query.jpql.node.TFetch",
"org.xwiki.query.jpql.node.APath",
"org.xwiki.query.jpql.node.PGroupbyList",
"org.xwiki.query.jpql.node.AIsSimpleConditionalExpressionRemainder",
"org.xwiki.query.jpql.node.TRbr",
"org.xwiki.query.jpql.node.TIs",
"org.xwiki.query.jpql.node.TIn",
"org.xwiki.query.jpql.node.TOrder",
"org.xwiki.query.jpql.node.POrderbyItem",
"org.xwiki.query.jpql.node.PXObjectDecl",
"org.xwiki.query.jpql.node.AXClassName",
"org.xwiki.query.jpql.node.TSubstring",
"org.xwiki.query.jpql.parser.Parser",
"org.xwiki.query.jpql.node.AXObjectDecl",
"org.xwiki.query.jpql.node.PArithmeticTerm",
"org.xwiki.query.jpql.node.ACountAggregateExpression",
"org.xwiki.query.jpql.node.AFuncstrComparableItem",
"org.xwiki.query.jpql.node.TWhere",
"org.xwiki.query.jpql.node.AParamArithmeticPrimary",
"org.xwiki.query.jpql.node.AComparisonExpression",
"org.xwiki.query.jpql.node.AConcatFunctionsReturningStrings",
"org.xwiki.query.jpql.node.ALikeExpression",
"org.xwiki.query.jpql.node.PEscapeSpec",
"org.xwiki.query.jpql.lexer.Lexer$State",
"org.xwiki.query.jpql.node.PArithmeticPrimary",
"org.xwiki.query.jpql.node.AIdentificationVariableDeclaration",
"org.xwiki.query.jpql.node.AAbsFunctionsReturningNumerics",
"org.xwiki.query.jpql.node.AConditionalPrimary",
"org.xwiki.query.jpql.node.PComparableItem",
"org.xwiki.query.jpql.node.AFromClause",
"org.xwiki.query.jpql.node.AParamPatternValue",
"org.xwiki.query.jpql.node.PWhereClause",
"org.xwiki.query.jpql.node.Start",
"org.xwiki.query.jpql.node.AConstantArithmeticPrimary",
"org.xwiki.query.jpql.node.TUpper",
"org.xwiki.query.jpql.node.TOf",
"org.xwiki.query.jpql.node.AStrPatternValue",
"org.xwiki.query.jpql.node.TOuter",
"org.xwiki.query.jpql.node.PSimpleConditionalExpressionRemainder",
"org.xwiki.query.jpql.node.PArithmeticExpression",
"org.xwiki.query.jpql.node.AGroupbyClause",
"org.xwiki.query.jpql.node.AFuncnumArithmeticPrimary",
"org.xwiki.query.jpql.node.PLikeExpression",
"org.xwiki.query.jpql.node.AAgrSelectExpression",
"org.xwiki.query.jpql.node.AMathComparisonExpressionRightOperand",
"org.xwiki.query.jpql.node.TMod",
"org.xwiki.query.jpql.node.ASingleInList",
"org.xwiki.query.jpql.node.AInList",
"org.xwiki.query.jpql.node.PExistsExpression",
"org.xwiki.query.jpql.node.AWhereClause",
"org.xwiki.query.jpql.node.TAllAnySome",
"org.xwiki.query.jpql.node.AFuncStringPrimary",
"org.xwiki.query.jpql.node.TOr",
"org.xwiki.query.jpql.node.PStartSpec",
"org.xwiki.query.jpql.node.ASubqueryInList",
"org.xwiki.query.jpql.node.TStringLiteral",
"org.xwiki.query.jpql.node.ASingleSubselectFromList",
"org.xwiki.query.jpql.node.AExistsExpression",
"org.xwiki.query.jpql.node.PComparisonExpressionRightOperand",
"org.xwiki.query.jpql.node.Node",
"org.xwiki.query.jpql.node.PSubselectFromList",
"org.xwiki.query.jpql.node.PCountArg",
"org.xwiki.query.jpql.node.ASizeFunctionsReturningNumerics",
"org.xwiki.query.jpql.node.AVariable",
"org.xwiki.query.jpql.node.ASubqueryFromClause",
"org.xwiki.query.jpql.node.PSubselectIdentificationVariableDeclaration",
"org.xwiki.query.jpql.node.AFloatNumericLiteral",
"org.xwiki.query.jpql.node.PGroupbyItem",
"org.xwiki.query.jpql.node.AParamStringPrimary",
"org.xwiki.query.jpql.node.TLeft",
"org.xwiki.query.jpql.node.TSize",
"org.xwiki.query.jpql.node.AIntegerNumericLiteral",
"org.xwiki.query.jpql.node.ASubselectFromList",
"org.xwiki.query.jpql.node.TObject",
"org.xwiki.query.jpql.node.AStatement",
"org.xwiki.query.jpql.node.PHavingClause",
"org.xwiki.query.jpql.internal.JPQLParser",
"org.xwiki.query.jpql.lexer.Lexer",
"org.xwiki.query.jpql.node.PStringPrimary",
"org.xwiki.query.jpql.node.ASingleOrderbyList",
"org.xwiki.query.jpql.node.ACollectionMemberDeclaration",
"org.xwiki.query.jpql.node.AGroupbyItem",
"org.xwiki.query.jpql.node.ASqrtFunctionsReturningNumerics",
"org.xwiki.query.jpql.node.PTrimCharacter",
"org.xwiki.query.jpql.node.PSelectExpression",
"org.xwiki.query.jpql.parser.TokenIndex",
"org.xwiki.query.jpql.node.TNot",
"org.xwiki.query.jpql.node.AFetchJoin",
"org.xwiki.query.jpql.node.ACountCountExpression",
"org.xwiki.query.jpql.node.AEmptyCollectionComparisonExpression",
"org.xwiki.query.jpql.node.TAggregateFunc",
"org.xwiki.query.jpql.node.TLower",
"org.xwiki.query.jpql.node.TTrim",
"org.xwiki.query.jpql.node.AParamInItem",
"org.xwiki.query.jpql.node.PInList"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
6f3130b11993eacd244560b7f320019ff983ae18 | a421952582df2ddc5fb9b54d420420755c430886 | /src/main/java/me/wonwoo/netty/NettyServer.java | 47e59d5640093ec31228ffd4cba8231bc0047ae5 | [] | no_license | vrudikov/netty-study-1 | b48eba76cd30647af38aba642a6e3826ed57ecb5 | dbc0880836d992fb78063a6094e6a3229fb5c96f | refs/heads/master | 2020-03-20T20:29:49.373891 | 2017-03-21T12:50:15 | 2017-03-21T12:50:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,289 | java | package me.wonwoo.netty;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
/**
* Created by wonwoo on 2016. 3. 26..
*/
public class NettyServer {
public static void main(String[] args) {
EventLoopGroup bossGroup = new NioEventLoopGroup(1);
EventLoopGroup workerGroup = new NioEventLoopGroup();
try {
ServerBootstrap b = new ServerBootstrap();
b.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class)
.childHandler(new ChannelInitializer<SocketChannel>() {
protected void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
p.addLast(new LoggingHandler(LogLevel.INFO));
p.addLast(new EchoServiceHandler());
}
});
Channel ch = b.bind(8080).sync().channel();
ch.closeFuture().sync();
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
workerGroup.shutdownGracefully();
workerGroup.shutdownGracefully();
}
}
}
| [
"admin@example.com"
] | admin@example.com |
f7baa2b3e0bf9a86067b74afc3893827aafea89d | 737832236ec33e0b820b7a094efbf6fc71523a60 | /src/Logica/Armamento/Arma.java | f23608fa5e8f1079f67aa286b8258c439926ed68 | [] | no_license | LPacione/Project-TDP | 559be843ba4405c372b2bceccfcb20a6f7e405ca | 3f4c10f6b01e5a62be8e657171b564abbbbe860e | refs/heads/master | 2020-03-27T14:03:38.007385 | 2018-09-18T14:23:05 | 2018-09-18T14:23:05 | 146,642,067 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package Logica.Armamento;
import Logica.Disparo.Disparo;
public abstract class Arma {
protected Disparo disparo;
protected Arma() {
disparo=new Disparo(25,600);
}
public void setDisparo(Disparo d) {
disparo=d;
}
public Disparo getDisparo() {
return disparo;
}
public abstract void disparar();
}
| [
"luchypacione@gmail.com"
] | luchypacione@gmail.com |
a10e9f027bc6a9b352b5b9b1ebb9c1ab65d3ad3b | 4e1c326c2046f99d8722015ed31e962838ac38e9 | /src/day1/Operators.java | aee18216c12eb1bd2e682a53b07174446db52479 | [] | no_license | KGBALA/1-My-first-program | 45fe68de9c1f97b6227839ae7b3e4c05ee326a54 | ed5f5ad86564024922ae8d4884dbfba866615db1 | refs/heads/master | 2020-04-06T12:32:39.020651 | 2018-11-14T03:52:48 | 2018-11-14T03:52:48 | 157,459,985 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 387 | java | package day1;
public class Operators {
public static void main(String[] args) {
// ++ increment operator
//-- decrement operator
int i=54;
System.out.println(i==54);
String name="James";
System.out.println(name.equals("James"));
double num =20;
double num2=80;
double num3=25;
double num4=(num+num2)*num3;
System.out.println(num4);
}
}
| [
"edilmasimov@10.1.10.188"
] | edilmasimov@10.1.10.188 |
bb2ac0884e57afe8da03405d143f05eaedca0e0b | 0d2f741d3425df7ebc3257459afb2205d6d2f6f5 | /src/H2O/H2OTest.java | ee72c40335247c37b5df8c6d8959dc9e2f7b1d4f | [] | no_license | 13046434521/LeetCode4Thread | 2f7c7335b1c9fb059f8cff8aa97416d4ce8672f4 | ce8f01549599bdd46a2e56bc9913717f550ff004 | refs/heads/master | 2022-06-17T14:39:41.921462 | 2020-05-11T10:46:59 | 2020-05-11T10:46:59 | 262,959,778 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,356 | java | package H2O;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* @author jtl
* @date 2020/4/30 17:45
*/
class H2OTest {
private static String H2O = "HOHHHOHHHHHHHHOOOO";
public static void main(String[] args) {
IH2O IH2O = new H2O_2();
Runnable runnableH = new Runnable() {
@Override
public void run() {
System.out.print("H");
}
};
Runnable runnableO = new Runnable() {
@Override
public void run() {
System.out.print("O");
}
};
ExecutorService executors = Executors.newFixedThreadPool(H2O.length());
for (int i = 0; i < H2O.length(); i++) {
String data = String.valueOf(H2O.charAt(i));
executors.execute(new Runnable() {
@Override
public void run() {
try {
if (data.equals("H")) {
IH2O.hydrogen(runnableH);
} else if (data.equals("O")) {
IH2O.oxygen(runnableO);
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});
}
}
}
| [
"604872657@qq.com"
] | 604872657@qq.com |
043ab46708399ffdea77e69ee6ab9efbe3380fd7 | 238b826c6b620d7c5bba9c2b967debda5b40bfbf | /jnf-parent/jnf-bean/src/main/java/com/jsjn/jnf/bean/dto/withhold/.svn/text-base/InvestorChannelDto.java.svn-base | d5616a29281945738261fe5a661e61a88b8d7654 | [] | no_license | rankyangel2014/Spring | 6972acd9dd806a8d6b98d110603dca389083f64d | ecef7e8c6b0b38bad430946d09bbfc699f2de815 | refs/heads/master | 2021-01-22T04:24:21.988756 | 2017-09-22T09:28:01 | 2017-09-22T09:28:01 | 92,461,626 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,342 | package com.jsjn.jnf.bean.dto.withhold;
import java.util.List;
import com.jsjn.jnf.bean.dto.base.BaseDTO;
/**
* 投资人与渠道关系表
*
* @author Ghost
*
*/
public class InvestorChannelDto extends BaseDTO<InvestorChannelDto> {
private static final long serialVersionUID = 1L;
private String id;// ID
private String recId;// ID
private String mId;// mid
private String custId;// 投资人用户编号
private String custName;// 投资人用户名称
private String channelId;// 渠道编号
private String channelName;// 渠道名称
private String state;// 状态
private String bindAccNo;// 绑定账户号码
private String key;// 秘钥
private String created;// 创建时间
private String modified;// 更新时间
private String cardNo;// 提现卡号
private String businessType;//业务类型 1:代扣,2:代付
private String transCardNo;// 转账卡号
private String transCardName;// 转账户名
private List<InvestorChannelDto> recList;
public String getCustId() {
return custId;
}
public void setCustId(String custId) {
this.custId = custId;
}
public String getCustName() {
return custName;
}
public void setCustName(String custName) {
this.custName = custName;
}
public String getChannelId() {
return channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getBindAccNo() {
return bindAccNo;
}
public void setBindAccNo(String bindAccNo) {
this.bindAccNo = bindAccNo;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getModified() {
return modified;
}
public void setModified(String modified) {
this.modified = modified;
}
public List<InvestorChannelDto> getRecList() {
return recList;
}
public void setRecList(List<InvestorChannelDto> recList) {
this.recList = recList;
}
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public String getRecId() {
return recId;
}
public void setRecId(String recId) {
this.recId = recId;
}
public String getMId() {
return mId;
}
public void setMId(String mId) {
this.mId = mId;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTransCardNo() {
return transCardNo;
}
public void setTransCardNo(String transCardNo) {
this.transCardNo = transCardNo;
}
public String getTransCardName() {
return transCardName;
}
public void setTransCardName(String transCardName) {
this.transCardName = transCardName;
}
public String getBusinessType() {
return businessType;
}
public void setBusinessType(String businessType) {
this.businessType = businessType;
}
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName;
}
}
| [
"xie_kx@xie-kx.centit.com"
] | xie_kx@xie-kx.centit.com | |
33299091cd1d00b663b365f39f70acba1b812f44 | fed939980a448715b2100dcd729025b13154342e | /src/main/java/reflect/ReflectDemo6.java | f38981e6bfb13658d491ee6eb1e4ae0567a22c0f | [] | no_license | heyunfei-yunfei/JSD2011_SE | cb4f20e7a1fdc251eb56faf2c7088ebca13c6dec | 6f6048c9276dfd4ca202a6a4112d9d8778213f05 | refs/heads/master | 2023-04-22T04:27:31.859112 | 2021-05-14T12:51:20 | 2021-05-14T12:51:20 | 367,361,649 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 710 | java | package reflect;
import java.lang.reflect.Method;
//调用私有成员
public class ReflectDemo6 {
public static void main(String[] args) {
//Person p = new Person();
//p.hello();;//编译不通过!
try{
Class cls = Class.forName("reflect.Person");
Object o = cls.newInstance();
//获取方法hello
// Method m = cls.getDeclaredMethod("hello);//读取不到私有方法
//获取本类定义的方法,包含私有方法
Method m = cls.getDeclaredMethod("hello");
m.setAccessible(true);
m.invoke(o);
}catch (Exception e){
e.printStackTrace();
}
}
}
| [
"adohit@163.com"
] | adohit@163.com |
d89ac36d4b03a0a33cf7c515784fc4c7f2e12bc8 | 4ace82e3ff8cb453b2720a2f786f0711d91bc0f5 | /SunrinTons/app/src/main/java/com/example/jungjune/sunrintons/Activitys/GongooRegisterActivity.java | ffc0e7d95ee8bc949c90555f53ed227a971e0d80 | [] | no_license | willtriti03/99inJosun | 8f0fbd0e9d1f9e6b2c21dfded9481852b60edeb3 | abed37033734d5872caf471a102f43797335adea | refs/heads/master | 2020-12-24T12:40:23.515535 | 2016-11-06T02:41:22 | 2016-11-06T02:41:22 | 72,965,351 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,544 | java | package com.example.jungjune.sunrintons.Activitys;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.Toast;
import com.example.jungjune.sunrintons.Network.ApiClient;
import com.example.jungjune.sunrintons.R;
import com.loopj.android.http.AsyncHttpResponseHandler;
import com.loopj.android.http.RequestParams;
import org.json.JSONException;
import org.json.JSONObject;
import cz.msebera.android.httpclient.Header;
/**
* Created by jungjune on 2016-07-23.
*/
public class GongooRegisterActivity extends AppCompatActivity {
protected ImageButton mBackBtn;
protected ImageButton mCheckBtn;
protected EditText mNameEdit;
protected EditText mLocationEdit;
protected EditText mBillEdit;
protected EditText mInfoEdit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gonggo_register);
mBackBtn= (ImageButton)findViewById(R.id.arrow);
mCheckBtn=(ImageButton)findViewById(R.id.check);
mNameEdit=(EditText)findViewById(R.id.name_gongoo_register);
mLocationEdit=(EditText)findViewById(R.id.location_gongoo_register);
mBillEdit=(EditText)findViewById(R.id.money_gongoo_register);
mInfoEdit=(EditText)findViewById(R.id.info_gongoo_register);
mCheckBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RequestParams params = new RequestParams();
params.put("id", UserInfo.id);
params.put("title","");
params.put("image","");
params.put("name", mNameEdit.getText().toString());
params.put("location", mLocationEdit.getText().toString());
params.put("money", mBillEdit.getText().toString());
params.put("info", mInfoEdit.getText().toString());
params.put("complete", false);
ApiClient.post("/notices/posting", params, new AsyncHttpResponseHandler() {
@Override
public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {
switch (statusCode) {
case 200:
Toast.makeText(getApplicationContext(), "등록 성공", Toast.LENGTH_LONG).show();
finish();
break;
case 304:
case 403:
Toast.makeText(getApplicationContext(), "글 등록 실패", Toast.LENGTH_LONG).show();
break;
}
}
@Override
public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {
Toast.makeText(getApplicationContext(), "글 등록 실패", Toast.LENGTH_LONG).show();
}
});
mBackBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
});
}
}
| [
"willtriti03@naver.com"
] | willtriti03@naver.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.