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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7aba13b7334f3da38d5d28c5058f2d7ac404db8d | 19902afba2d60a336ffa39eb91572a42d00048e8 | /app/src/main/java/org/xiaofeng/playground/ImageUtil.java | ddf6fca669bae042536cd355b0b7416de3a14ca0 | [] | no_license | xhan-ri/playground | 2afaffd56a74a1a8478a410ddd37fc2c3e2ad4c6 | bf12e7eb1b4b723e8250ebe9f49a4aa41059bea8 | refs/heads/master | 2021-01-17T07:25:37.686938 | 2016-07-26T21:04:48 | 2016-07-26T21:04:48 | 37,885,072 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 126 | java | package org.xiaofeng.playground;
/**
* Created by xhan on 12/21/15.
*/
public class ImageUtil {
public void test() {
}
}
| [
"xhan@rhapsody.com"
] | xhan@rhapsody.com |
5bae28abb1c16974e18f7e36ff87eba85c0b5c2e | 9ed2265e5935cb057f095f8a37125d38197079de | /straw-gateway/src/main/java/com/bambi/straw/gateway/service/UserDetailsServiceImpl.java | c2e1dab89f5ea1fb6f4e21e539923a7b53581243 | [] | no_license | RichardReindeer/HGC_Q-A | 0c97370393ec4947100b2ada05e030e55e604257 | 86ffb697d4922715b4d33f1d5df61e40f5014000 | refs/heads/main | 2023-08-25T15:40:07.598372 | 2021-10-07T13:52:46 | 2021-10-07T13:52:46 | 413,245,112 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,596 | java | package com.bambi.straw.gateway.service;
import com.bambi.straw.commons.model.Permission;
import com.bambi.straw.commons.model.Role;
import com.bambi.straw.commons.model.User;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
/**
* 业务逻辑层特征:
* 被控制层调用
* 调用数据访问层
*/
@Component
@Slf4j
public class UserDetailsServiceImpl implements UserDetailsService {
private static Logger logger = LoggerFactory.getLogger(UserDetailsServiceImpl.class);
@Resource
private RestTemplate restTemplate;
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
//1.调用根据用户名获得用户对象的rest接口
//{1} 1为参数
String url = "http://sys-service/v1/auth/user?username={1}";
//从第三个开始,就开始给参数赋值了哦 ,看源码, 因为传入的参数是可变参数
/*
getForObject 方法第三个参数开始时传入url{}占位符用的
*/
User user = restTemplate.getForObject(url, User.class, username);
log.debug("查询出用户:{}", user);
//2.判单用户不为空
if (user == null) {
//自带异常
throw new UsernameNotFoundException("用户名或密码错误");
}
//3.调用根据用户id获得用户权限的Rest接口
url = "http://sys-service/v1/auth/permissions?userId={1}";
//凡是Rest接口返回List格式的,调用的时候使用对应泛型的数组类型接收
//因为传递过程中数据是json格式,json格式是js代码, js代码没有List类型,只有数组类型
Permission[] permissions = restTemplate.getForObject(url, Permission[].class, user.getId());
logger.debug("这是获取到的数组 :{}", Arrays.toString(permissions));
//4.调用根据用户id获取的用户角色的Rest接口
url = "http://sys-service/v1/auth/roles?userId={1}";
Role[] roles = restTemplate.getForObject(url, Role[].class, user.getId());
//5.将权限和角色赋值到auth数组中
if (permissions == null || roles == null) {
throw new UsernameNotFoundException("权限或角色身份异常");
}
//声明保存所有权限和角色的数组
String[] auth = new String[permissions.length + roles.length];
int index = 0;
for(Permission permission : permissions){
//赋权限
auth[index++] = permission.getName();
}
for(Role role:roles){
auth[index++] = role.getName();
}
//6.构造UserDetails对象 并返回
UserDetails userDetails = org.springframework.security.core.userdetails.User.builder()
.username(user.getUsername())
.password(user.getPassword())
.authorities(auth)
.accountLocked(user.getLocked()==1)
.disabled(user.getEnabled()==0)
.build();
logger.info("获取到的userDetails对象 {}",userDetails.getUsername());
return userDetails;
}
}
| [
"44000760+RichardReindeer@users.noreply.github.com"
] | 44000760+RichardReindeer@users.noreply.github.com |
835c403dd63a711c5a49aec475752d614c5a9637 | 9b4d8489750ad92220535d4029b20d8179b429e2 | /src/main/java/com/example/gh20111/Gh20111Application.java | 5547cc488d1969392a9d9e719da4559145c04ccf | [] | no_license | snicoll-scratches/gh-20111 | 0aed068a71958f4d5d3665a771981405031b8d0a | b0c266e7c569877441c92ce96a4c5b4bc04887e1 | refs/heads/main | 2021-07-07T23:58:39.356430 | 2020-02-11T16:21:09 | 2020-02-11T16:21:09 | 239,808,127 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,041 | java | package com.example.gh20111;
import java.io.IOException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.FileSystemResource;
import org.springframework.ws.config.annotation.EnableWs;
import org.springframework.ws.soap.security.wss4j2.support.CryptoFactoryBean;
@EnableWs
@Configuration
@SpringBootApplication
public class Gh20111Application {
public static void main(String[] args) {
SpringApplication.run(Gh20111Application.class, args);
}
@Bean
public CryptoFactoryBean cryptoFactoryBean() throws IOException {
final CryptoFactoryBean cryptoFactoryBean = new CryptoFactoryBean();
cryptoFactoryBean.setKeyStoreLocation(new FileSystemResource("/Users/snicoll/test.p12"));
cryptoFactoryBean.setKeyStorePassword("private");
cryptoFactoryBean.setKeyStoreType("PKCS12");
return cryptoFactoryBean;
}
}
| [
"snicoll@pivotal.io"
] | snicoll@pivotal.io |
e4fdfe8aae6555d890f27a87a711a68e159f51b9 | 317e7665ba90403f2ca394b9a0c298d861df98c5 | /src/main/java/com/decipher/dao/Connection.java | 2444edb86b27e870643ada23092ea546b7d4be30 | [] | no_license | yogesh2020/springcrud | 74a9a6c49577fd257bd2212a2aaec47ce3ccb28e | 438967afabd68f4f261a782f8821fe54964635dc | refs/heads/master | 2022-12-27T07:04:57.653405 | 2019-11-18T05:14:11 | 2019-11-18T05:14:11 | 222,369,008 | 0 | 0 | null | 2022-12-15T23:31:02 | 2019-11-18T05:17:26 | Java | UTF-8 | Java | false | false | 562 | java |
package com.decipher.dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.MongoClient;
@Component
public class Connection {
@Autowired
MongoClient conn;
public DBCollection getCollection() {
DBCollection col = null;
try {
@SuppressWarnings("deprecation")
DB db = conn.getDB("EMPLOYEE");
col = db.getCollection("employee");
}
catch (Exception e) {
e.printStackTrace();
}
return col;
}
}
| [
"yogesh04aug@gmail.com"
] | yogesh04aug@gmail.com |
3300a57d7ab28837d6f17d0ca82849cf00b4fbaf | 59c21dac9336fbb8713ec627a6fe026f2e8c1ccf | /src/main/java/lv/tsi/javaweb/seabattle/model/Player.java | ea78560e353bca135a385ca554e4a20b3d3fafee | [] | no_license | vikky69/cowsBulls | 7ea129af51f023ba78b04fb49cf98a33b526322d | 502baa5d9c16343f9b6949777a8d6fd86754279e | refs/heads/master | 2021-05-09T18:46:50.834055 | 2018-01-27T14:48:03 | 2018-01-27T14:48:03 | 119,172,822 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 335 | java | package lv.tsi.javaweb.seabattle.model;
/**
* @author Dimitrijs Fedotovs <a href="http://www.bug.guru">www.bug.guru</a>
* @version 1.0
* @since 1.0
*/
public class Player {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
| [
"dima@fedoto.ws"
] | dima@fedoto.ws |
9cbeffcd95a56bd50eede54b3b0d88746c25a049 | 5d627d3b2031cc3438024fde00f7afe11798a49a | /src/main/java/com/vmware/avi/ui/application/config/LocaleConfiguration.java | 9f423728b0dd7bc1772aa521ed70d7fd24399b58 | [] | no_license | avishrimali/avi-Micro-Service-ui | 26b181b5423d099869ab9b83a24bad5d00e364ad | cd8e8e687e1b4b4dc0df8f91cecf1acbc62b2602 | refs/heads/master | 2020-03-30T07:41:39.960071 | 2018-09-30T10:57:37 | 2018-09-30T10:57:37 | 150,959,335 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,072 | java | package com.vmware.avi.ui.application.config;
import io.github.jhipster.config.locale.AngularCookieLocaleResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.*;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
@Configuration
public class LocaleConfiguration implements WebMvcConfigurer {
@Bean(name = "localeResolver")
public LocaleResolver localeResolver() {
AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver();
cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY");
return cookieLocaleResolver;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
registry.addInterceptor(localeChangeInterceptor);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
1b259dc5b0d94016fd33a20df8a1c955a1de935d | cf4c8207381f2cacbc288968b7dbdcf516f65754 | /ReadIn.java | 7b616a1e1702996e840d528a391d229760c40a75 | [] | no_license | geek-win/java-day19 | a2f5b0ab91ac99f7613b7ab8790f5a3b4513b798 | 0d20ec674e7a1eb64ded09609d3079007cb476a5 | refs/heads/master | 2021-07-05T10:19:07.949623 | 2017-09-28T14:42:03 | 2017-09-28T14:42:03 | 105,212,459 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,005 | java | /*
* System.in:final InputStream
* 键盘录入,到over停止录入
* */
import java.io.*;
class ReadIn
{
public static void main(String[] args)throws IOException
{
//System.in返回的是InputStream流对象
InputStream in = System.in;
//in接收的是键盘录入
//如果没有键盘录入,会一直等待,read方法是阻塞式方法
/*
int ch = 0;
while((ch = in.read()) != -1)
System.out.println((char)ch);
*/
/*
System.out.println(in.read());
System.out.println(in.read());
System.out.println(in.read());
*/
StringBuilder sb = new StringBuilder();
while(true)
{
//录入一个存一下,当敲回车的时候打印
//需要有缓冲区
int ch = in.read();
if(ch == '\n')
{
String s = sb.toString();
if("over".equals(s))
break;
System.out.println(s.toUpperCase());
//清空缓冲区
sb.delete(0, sb.length());
}
else
{
sb.append((char)ch);
}
}
//关闭流资源
in.close();
}
}
| [
"izsuestc@126.com"
] | izsuestc@126.com |
95248c1b7d2033a60a47f22ef2d6af1dc30160e5 | 42e5e856325e435e16bdfc3eba9a316aab611a9b | /src/main/java/br/univel/telas/TelaCadUsuario.java | 50aa0d261a70908303c093f36d2ac26681885536 | [] | no_license | thais2106/Trabalho4oBim | ca7ea50bde842b907eb39c628cb136affc8d8ea5 | 8123d93fc69b7caac103d31d6edf9a8c5a3c77fc | refs/heads/master | 2021-01-10T02:28:01.268960 | 2015-12-06T01:05:19 | 2015-12-06T01:05:19 | 45,071,404 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 600 | java | package br.univel.telas;
import java.awt.BorderLayout;
import java.sql.SQLException;
/**
* Classe que mostra os campos da tela de cadastro de usuarios na MolduraAbstra
* @author Thaís - 05/12/2015 - 13:40:53
*
*/
public class TelaCadUsuario extends MolduraAbstrata{
public TelaCadUsuario() {
super();
}
@Override
protected void configuraMiolo() throws SQLException {
MioloCadUsuario mcu = MioloCadUsuario.getInstance();
super.add(mcu, BorderLayout.CENTER);
super.setAcaoSalvar(mcu.getAcaoSalvar());
super.setAcaoExcluir(mcu.setAcaoExcluir());
}
}
| [
"Thaís@Thaís-PC"
] | Thaís@Thaís-PC |
6f9fee686ab9bb505d9bbe001c75b4367b029694 | 9e16750577275b8d4d3deb5ac2f66ed98ef6231f | /2016/[Day7]IPv7/Main.java | ca963ed7865814d5d6d97b6fa681308822ab0287 | [] | no_license | Sheimyn/Advent-of-Code | 7767edd60c44cd9820d5aaad8f11e2b24ffd25f1 | c4c726325616e0ca4050835785f07af7fb607925 | refs/heads/master | 2021-08-23T11:29:36.979798 | 2017-12-04T18:16:03 | 2017-12-04T18:16:03 | 112,759,089 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,130 | java | import java.util.Scanner;
import java.io.File;
import java.lang.Exception;
class Main {
private static File input;
private static Scanner scan;
public static void main(String[] args) {
init();
int validIPs = 0;
while (scan.hasNextLine()) {
String ip = scan.nextLine();
String[] splitIP = ip.replaceAll("\\[", "]").split("]");
boolean valid = false;
for (int i=0; i<splitIP.length; i++) {
if (isAbba(splitIP[i])) {
if (i%2 == 0)
valid = true;
else {
valid = false;
break;
}
}
}
if (valid)
validIPs++;
}
System.out.println("Valid IPs: " + validIPs);
}
private static boolean isAbba(String s) {
if (s.length() < 4)
return false;
char c1 = s.charAt(0);
char c2 = s.charAt(1);
for (int i=2; i<s.length(); i++) {
if (c1 != c2 && i+1 < s.length() && s.charAt(i) == c2 && s.charAt(i+1) == c1)
return true;
else {
c1 = c2;
c2 = s.charAt(i);
}
}
return false;
}
private static void init() {
try {
input = new File("./input");
scan = new Scanner(input);
}
catch (Exception e) {System.out.println(e);}
}
} | [
"k.klingestedt@gmail.com"
] | k.klingestedt@gmail.com |
8d516c3a449fe0ecf63168f709887857226ef342 | 14705308a14f43c8570fed0056d24207648ce2e2 | /src/main/java/com/csg/springdata/model/Order.java | b9ac131bfdbe6d0a6011c56c3d56f7b888dded8d | [] | no_license | CardinalNow/springDataQueries | 4cf7a30b8452ef9993aa59145513716b96d6f1fa | 11c38aa220013b7cb20752fdec1397c95b56cacb | refs/heads/master | 2021-01-10T18:13:26.696652 | 2015-11-13T15:14:35 | 2015-11-13T15:14:40 | 46,026,973 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 847 | java | package com.csg.springdata.model;
import org.springframework.data.jpa.domain.AbstractPersistable;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
* Created by rogerbowman on 11/9/15.
*/
@Entity
@Table(name = "customer_order")
public class Order extends AbstractPersistable<Integer> {
@ManyToOne
@JoinColumn(name = "customer_id")
private Customer customer;
@ManyToOne
@JoinColumn(name = "item_id")
private Item product;
public Item getProduct() {
return product;
}
public void setProduct(Item product) {
this.product = product;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
}
| [
"rbowman@cardinalsolutions.com"
] | rbowman@cardinalsolutions.com |
5f4f90a8714f6a431d9fd66f64da1a05f137d6c9 | 1b307344a0dd5590e204529b7cc7557bed02d2b9 | /sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStoreListResult.java | f382f98545c3f3c6c17b9f449990068b5096ea4e | [
"LGPL-2.1-or-later",
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"CC0-1.0",
"LicenseRef-scancode-generic-cla"
] | permissive | alzimmermsft/azure-sdk-for-java | 7e72a194e488dd441e44e1fd12c0d4c1cacb1726 | 9f5c9b2fd43c2f9f74c4f79d386ae00600dd1bf4 | refs/heads/main | 2023-09-01T00:13:48.628043 | 2023-03-27T09:00:31 | 2023-03-27T09:00:31 | 176,596,152 | 4 | 0 | MIT | 2023-03-08T18:13:24 | 2019-03-19T20:49:38 | Java | UTF-8 | Java | false | false | 2,206 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.appconfiguration.models;
import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.appconfiguration.fluent.models.ConfigurationStoreInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The result of a request to list configuration stores. */
@Fluent
public final class ConfigurationStoreListResult {
/*
* The collection value.
*/
@JsonProperty(value = "value")
private List<ConfigurationStoreInner> value;
/*
* The URI that can be used to request the next set of paged results.
*/
@JsonProperty(value = "nextLink")
private String nextLink;
/**
* Get the value property: The collection value.
*
* @return the value value.
*/
public List<ConfigurationStoreInner> value() {
return this.value;
}
/**
* Set the value property: The collection value.
*
* @param value the value value to set.
* @return the ConfigurationStoreListResult object itself.
*/
public ConfigurationStoreListResult withValue(List<ConfigurationStoreInner> value) {
this.value = value;
return this;
}
/**
* Get the nextLink property: The URI that can be used to request the next set of paged results.
*
* @return the nextLink value.
*/
public String nextLink() {
return this.nextLink;
}
/**
* Set the nextLink property: The URI that can be used to request the next set of paged results.
*
* @param nextLink the nextLink value to set.
* @return the ConfigurationStoreListResult object itself.
*/
public ConfigurationStoreListResult withNextLink(String nextLink) {
this.nextLink = nextLink;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (value() != null) {
value().forEach(e -> e.validate());
}
}
}
| [
"noreply@github.com"
] | alzimmermsft.noreply@github.com |
115df76d5677affacb5a2fc2764cdf948ce1b399 | 9d32980f5989cd4c55cea498af5d6a413e08b7a2 | /A92s_10_0_0/src/main/java/com/android/server/IPswAlarmManagerCallback.java | 0f000245f114454fb603c275d3aebeea43ba8fe9 | [] | no_license | liuhaosource/OppoFramework | e7cc3bcd16958f809eec624b9921043cde30c831 | ebe39acabf5eae49f5f991c5ce677d62b683f1b6 | refs/heads/master | 2023-06-03T23:06:17.572407 | 2020-11-30T08:40:07 | 2020-11-30T08:40:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,596 | java | package com.android.server;
import android.app.AlarmManager;
import android.app.IAlarmListener;
import android.app.PendingIntent;
import android.os.WorkSource;
import android.util.ArraySet;
import android.util.Pair;
import com.android.server.AlarmManagerService;
import java.util.ArrayList;
public interface IPswAlarmManagerCallback {
boolean IsBackgroundRestricted(AlarmManagerService.Alarm alarm);
long getWhileIdleMinIntervalLocked(int i);
boolean isBackgroundRestricted(AlarmManagerService.Alarm alarm);
boolean isExemptFromAppStandby(AlarmManagerService.Alarm alarm);
void onCalculateDeliveryPriorities(ArrayList<AlarmManagerService.Alarm> arrayList);
boolean onCheckAllowNonWakeupDelayLocked(long j);
void onClearPendingNonWakeupAlarmLocked(long j, ArrayList<AlarmManagerService.Alarm> arrayList);
void onDeliverAlarmsLocked(ArrayList<AlarmManagerService.Alarm> arrayList, long j);
void onPostDelayed(Runnable runnable, int i);
void onRebatchAllAlarmsLocked(boolean z);
void onReorderAlarmsBasedOnStandbyBuckets(ArraySet<Pair<String, Integer>> arraySet);
void onRescheduleKernelAlarmsLocked();
void onRestorePendingWhileIdleAlarmsLocked();
void onSetImplLocked(int i, long j, long j2, long j3, long j4, long j5, PendingIntent pendingIntent, IAlarmListener iAlarmListener, String str, int i2, boolean z, WorkSource workSource, AlarmManager.AlarmClockInfo alarmClockInfo, int i3, String str2);
void onSetImplLocked(AlarmManagerService.Alarm alarm, boolean z, boolean z2);
void onUpdateNextAlarmClockLocked();
}
| [
"dstmath@163.com"
] | dstmath@163.com |
8b0bbca4ee2a8c9c4151d0b8f82ac8a4844ce050 | d0a58bc05ff78f4990bf4a14bb23b8364458705d | /javaEX/src/com/javaex/jisu/practice/chapter04/IfDiceExample.java | c6470ef0843e5fe229ea3c6a81a2988381af4486 | [] | no_license | Jisu-Claire-Son/test | 40d841ebd94f312ec4dc0b1f8a6a5062d71df9e4 | 9c1ca0f555dd77249f22590067135b37a818049a | refs/heads/master | 2021-06-21T21:32:29.571405 | 2021-03-22T01:56:03 | 2021-03-22T01:56:03 | 204,125,148 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 586 | java | package com.javaex.jisu.practice.chapter04;
public class IfDiceExample {
public static void main(String[] args) {
int num = (int)(Math.random()*6 + 1);
if(num==1) {
System.out.println("1번이 나왔습니다.");
}else if(num==2) {
System.out.println("2번이 나왔습니다.");
}else if(num==3) {
System.out.println("3번이 나왔습니다.");
}else if(num==4) {
System.out.println("4번이 나왔습니다.");
}else if(num==5) {
System.out.println("5번이 나왔습니다.");
}else {
System.out.println("7번이 나왔습니다.");
}
}
}
| [
"sonjisuu@naver.com"
] | sonjisuu@naver.com |
d63e6e25416ebe03ec74c8e57e592725f9a39fc1 | a698c96413ebdd4956036d10dc3676f88ecbcb53 | /src/main/java/com/fatsecret/platform/utils/FoodUtility.java | b43a2500907e23b0e47a6fa9e3a02be4829aa6d6 | [
"Apache-2.0"
] | permissive | uomdhs/fatsecret4j | 0ff3a6f0445b3507fc12ddd644dee6d6f546917c | 0cdeb5eb0af29f8dd0dfa0c6d90c4caf12731fb3 | refs/heads/master | 2021-09-06T10:41:50.154288 | 2017-03-15T14:44:31 | 2017-03-15T14:44:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,635 | java | /*
* Copyright (C) 2016 Saurabh Rane
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.fatsecret.platform.utils;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONObject;
import com.fatsecret.platform.model.Food;
import com.fatsecret.platform.model.Serving;
import com.fatsecret.platform.model.CompactFood;
/**
* This utility class helps to get detailed information about food item(s) from fatsecret rest api
*
* @author Saurabh Rane
* @version 2.0
*/
public class FoodUtility {
/**
* Returns detailed information about the food
*
* @param json json object representing of the food
* @return detailed information about the food
*/
public static Food parseFoodFromJSONObject(JSONObject json) {
String name = json.getString("food_name");
String url = json.getString("food_url");
String type = json.getString("food_type");
Long id = Long.parseLong(json.getString("food_id"));
String brandName = "";
try {
brandName = json.getString("brand_name");
} catch(Exception ignore) {
}
JSONObject servingsObj = json.getJSONObject("servings");
JSONArray array = null;
List<Serving> servings = new ArrayList<Serving>();
try {
array = servingsObj.getJSONArray("serving");
servings = ServingUtility.parseServingsFromJSONArray(array);
} catch(Exception ignore) {
System.out.println("Servings not found");
array = null;
}
if(array == null) {
try {
JSONObject servingObj = servingsObj.getJSONObject("serving");
Serving serving = ServingUtility.parseServingFromJSONObject(servingObj);
servings.add(serving);
} catch(Exception ignore) {
System.out.println("Serving not found");
}
}
Food food = new Food();
food.setName(name);
food.setUrl(url);
food.setType(type);
food.setId(id);
food.setBrandName(brandName);
food.setServings(servings);
return food;
}
/**
* Returns information about the compact food
*
* @param json json object representing of the food
* @return compact food object from the json
*/
public static CompactFood parseCompactFoodFromJSONObject(JSONObject json) {
String name = json.getString("food_name");
String url = json.getString("food_url");
String type = json.getString("food_type");
String description = json.getString("food_description");
Long id = Long.parseLong(json.getString("food_id"));
CompactFood food = new CompactFood();
food.setName(name);
food.setUrl(url);
food.setType(type);
food.setDescription(description);
food.setId(id);
return food;
}
/**
* Returns a list of compact food items
*
* @param array json array representing a list of compact food
* @return list of compact food items
*/
public static List<CompactFood> parseCompactFoodListFromJSONArray(JSONArray array) {
List<CompactFood> foods = new ArrayList<CompactFood>();
for(int i = 0; i < array.length(); i++) {
JSONObject obj = array.getJSONObject(i);
CompactFood food = parseCompactFoodFromJSONObject(obj);
foods.add(food);
}
return foods;
}
}
| [
"saurabhrrane@gmail.com"
] | saurabhrrane@gmail.com |
c22c909ad91eaebbd486be6b9a6d0a5799111df2 | 13d4542523d95b0dca3ca9b77d3e3db16495bbea | /src/main/java/es/fernandopal/yato/files/Webserver.java | c6120733412b5d52593b776a2896568e3bd8e7e0 | [
"Apache-2.0"
] | permissive | fernandopal/yato | f8d48bcc06d20398b971088c806c60cf1c295b3f | d69f7d2390f8776067fb243211fa0968aad53962 | refs/heads/master | 2023-02-09T22:18:22.822721 | 2021-01-05T20:42:46 | 2021-01-05T20:42:46 | 309,767,951 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,670 | java | package es.fernandopal.yato.files;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileReader;
import java.util.ArrayList;
public class Webserver implements IConfigFile {
private static final Logger LOGGER = LoggerFactory.getLogger(Webserver.class);
private JSONObject jsonObject = null;
public Webserver() {
final JSONParser parser = new JSONParser();
try {
jsonObject = (JSONObject) parser.parse(new FileReader("webserver.json"));
} catch (Exception e) { e.printStackTrace(); }
}
public ArrayList<Object> getList(String key) {
ArrayList<Object> list = null;
if(jsonObject.containsKey(key)) {
final JSONArray jsonArray = (JSONArray) jsonObject.get(key);
list = new ArrayList<Object>(jsonArray);
} else {
missing(key);
}
return list;
}
public String getString(String key) {
String string = null;
if(jsonObject.containsKey(key)) {
string = jsonObject.get(key).toString();
} else {
missing(key);
}
return string;
}
public Integer getInt(String key) {
Integer integer = null;
if(jsonObject.containsKey(key)) {
integer = Integer.valueOf(jsonObject.get(key).toString());
} else {
missing(key);
}
return integer;
}
private void missing(String key) {
LOGGER.error("The key '" + key + "' is missing on the webserver.json file");
}
}
| [
"f.pal.moreno@gmail.com"
] | f.pal.moreno@gmail.com |
b639f817039ea7371ec32f2c3032f0ea2e76b4a3 | 9ff7fd9f8adabb71b1670c21b72a9ce2d6dbaf73 | /google-api-grpc/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/PostingRegion.java | f6a774d392a88585c75fb6dc10d66d67e747e7a3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | unbelievable1/google-cloud-java | 8993199bbd3043b08b11b56bfd5365b532580647 | feb3f6fdca2b100ef9573dce0cff721fb2db33a2 | refs/heads/master | 2020-05-27T07:31:09.514625 | 2019-05-24T20:31:36 | 2019-05-24T20:31:36 | 188,529,778 | 0 | 0 | Apache-2.0 | 2019-05-25T06:33:31 | 2019-05-25T06:33:31 | null | UTF-8 | Java | false | true | 6,270 | java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/talent/v4beta1/common.proto
package com.google.cloud.talent.v4beta1;
/**
*
*
* <pre>
* An enum that represents the job posting region. In most cases, job postings
* don't need to specify a region. If a region is given, jobs are
* eligible for searches in the specified region.
* </pre>
*
* Protobuf enum {@code google.cloud.talent.v4beta1.PostingRegion}
*/
public enum PostingRegion implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
* <pre>
* If the region is unspecified, the job is only returned if it
* matches the [LocationFilter][google.cloud.talent.v4beta1.LocationFilter].
* </pre>
*
* <code>POSTING_REGION_UNSPECIFIED = 0;</code>
*/
POSTING_REGION_UNSPECIFIED(0),
/**
*
*
* <pre>
* In addition to exact location matching, job posting is returned when the
* [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in the search query is in the same administrative area
* as the returned job posting. For example, if a `ADMINISTRATIVE_AREA` job
* is posted in "CA, USA", it's returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has
* "Mountain View".
* Administrative area refers to top-level administrative subdivision of this
* country. For example, US state, IT region, UK constituent nation and
* JP prefecture.
* </pre>
*
* <code>ADMINISTRATIVE_AREA = 1;</code>
*/
ADMINISTRATIVE_AREA(1),
/**
*
*
* <pre>
* In addition to exact location matching, job is returned when
* [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in search query is in the same country as this job.
* For example, if a `NATION_WIDE` job is posted in "USA", it's
* returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has 'Mountain View'.
* </pre>
*
* <code>NATION = 2;</code>
*/
NATION(2),
/**
*
*
* <pre>
* Job allows employees to work remotely (telecommute).
* If [locations][] are provided with this value, the job is
* considered as having a location, but telecommuting is allowed.
* </pre>
*
* <code>TELECOMMUTE = 3;</code>
*/
TELECOMMUTE(3),
UNRECOGNIZED(-1),
;
/**
*
*
* <pre>
* If the region is unspecified, the job is only returned if it
* matches the [LocationFilter][google.cloud.talent.v4beta1.LocationFilter].
* </pre>
*
* <code>POSTING_REGION_UNSPECIFIED = 0;</code>
*/
public static final int POSTING_REGION_UNSPECIFIED_VALUE = 0;
/**
*
*
* <pre>
* In addition to exact location matching, job posting is returned when the
* [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in the search query is in the same administrative area
* as the returned job posting. For example, if a `ADMINISTRATIVE_AREA` job
* is posted in "CA, USA", it's returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has
* "Mountain View".
* Administrative area refers to top-level administrative subdivision of this
* country. For example, US state, IT region, UK constituent nation and
* JP prefecture.
* </pre>
*
* <code>ADMINISTRATIVE_AREA = 1;</code>
*/
public static final int ADMINISTRATIVE_AREA_VALUE = 1;
/**
*
*
* <pre>
* In addition to exact location matching, job is returned when
* [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in search query is in the same country as this job.
* For example, if a `NATION_WIDE` job is posted in "USA", it's
* returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has 'Mountain View'.
* </pre>
*
* <code>NATION = 2;</code>
*/
public static final int NATION_VALUE = 2;
/**
*
*
* <pre>
* Job allows employees to work remotely (telecommute).
* If [locations][] are provided with this value, the job is
* considered as having a location, but telecommuting is allowed.
* </pre>
*
* <code>TELECOMMUTE = 3;</code>
*/
public static final int TELECOMMUTE_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/** @deprecated Use {@link #forNumber(int)} instead. */
@java.lang.Deprecated
public static PostingRegion valueOf(int value) {
return forNumber(value);
}
public static PostingRegion forNumber(int value) {
switch (value) {
case 0:
return POSTING_REGION_UNSPECIFIED;
case 1:
return ADMINISTRATIVE_AREA;
case 2:
return NATION;
case 3:
return TELECOMMUTE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<PostingRegion> internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<PostingRegion> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<PostingRegion>() {
public PostingRegion findValueByNumber(int number) {
return PostingRegion.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.talent.v4beta1.CommonProto.getDescriptor().getEnumTypes().get(6);
}
private static final PostingRegion[] VALUES = values();
public static PostingRegion valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private PostingRegion(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.talent.v4beta1.PostingRegion)
}
| [
"sduskis@google.com"
] | sduskis@google.com |
67c9ef96a0d8e5cb256373f831f557255ab3da30 | c3bbce4c8ea405783ca78ebe28837c8289baa961 | /Before Gradle/Pilot Guy-core/src/screens/Level7.java | 540e3528c783545601937734087343ac4a0eac78 | [] | no_license | theprofi/Pilot-Guy | 81b2ea88a46d7eafb7cdd54abbbc5e8c49543545 | a4daf983cc3b3a9c0e450a6293f4df99c3bbd092 | refs/heads/master | 2022-03-08T09:10:01.321456 | 2022-03-01T10:58:28 | 2022-03-01T10:58:28 | 92,102,429 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 75,014 | java | package screens;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;
import com.elkadakh.others.AssetLoader;
import com.elkadakh.others.DifficultyLevels;
import com.elkadakh.others.Helicopter;
import com.elkadakh.others.MovingLines;
import com.elkadakh.pilotguy.GameMainClass;
public class Level7 extends LevelBase {
protected static final int PLAY_AR_WID = 603, PLAY_AR_HEI = 440;
protected static final int targetX = 565, targetY = 368;
private boolean zeroAtY;
private boolean isFalling;
private boolean nextSound;
private MovingLines[] horLines;
private MovingLines[] horLinesDif1;
private MovingLines[] verLines;
private ShapeRenderer linesRenderer;
private float timer;
int widthOfTarget;
public Level7 (){
timer = 0;
heliPosX = 50;
heliPosY = 30;
super.CalculatePlayArRatio(PLAY_AR_WID, PLAY_AR_HEI); //Sets "lvsPlayAreaRatio"
helicopter = new Helicopter(super.lvsPlayAreaRatio);
super.SetScreenOptimizedLvsRes(PLAY_AR_WID, PLAY_AR_HEI); //Uses the ratio of screen/level
zeroAtY = (phoneHeight - super.playArNewHeight <= phoneWidth - super.playArNewWidth); //Place the lvl at x=0 or y=0
SetCenterCoords(); //To x or y
helicopter.SetPosition((float) (heliPosX*lvsPlayAreaRatio + xToCen), (float) (heliPosY*lvsPlayAreaRatio + yToCen));
borderLine = new boolean[PLAY_AR_HEI][PLAY_AR_WID];
playArrWid = PLAY_AR_WID;
playArrHeight = PLAY_AR_HEI;
isFalling = false;
nextSound = false;
nextLevelSuspend = 0; //2 secs
horLines = new MovingLines[3];
horLinesDif1 = new MovingLines[2];
verLines = new MovingLines[2];
linesRenderer = new ShapeRenderer();
horLines[0] = new MovingLines(156, 294, 1, 1, 45, lvsPlayAreaRatio, xToCen, yToCen, PLAY_AR_WID, PLAY_AR_HEI);
horLines[1] = new MovingLines(156, 294, 91, 91, 45, lvsPlayAreaRatio, xToCen, yToCen, PLAY_AR_WID, PLAY_AR_HEI);
horLines[2] = new MovingLines(156, 294, 181, 181, 45, lvsPlayAreaRatio, xToCen, yToCen, PLAY_AR_WID, PLAY_AR_HEI);
//horLines[3] = new MovingLines(156, 294, 272, 272, 50, lvsPlayAreaRatio, xToCen, yToCen, PLAY_AR_WID, PLAY_AR_HEI);
horLinesDif1[0] = new MovingLines(156, 294, 0, 0, 30, lvsPlayAreaRatio, xToCen, yToCen, PLAY_AR_WID, PLAY_AR_HEI);
horLinesDif1[1] = new MovingLines(156, 294, 150, 150, 30, lvsPlayAreaRatio, xToCen, yToCen, PLAY_AR_WID, PLAY_AR_HEI);
verLines[0] = new MovingLines(340, 340, 440, 327, 32, lvsPlayAreaRatio, xToCen, yToCen, PLAY_AR_WID, PLAY_AR_HEI);
verLines[1] = new MovingLines(490, 490, 440, 327, 32, lvsPlayAreaRatio, xToCen, yToCen, PLAY_AR_WID, PLAY_AR_HEI);
Add1();
Add2();
difLvls = new DifficultyLevels(drawToScreen,helicopter,phoneWidth,phoneHeight);
}
public void render(float delta){
if(newStart){
isFalling = false;
newStart = false;
difLvls.chosen = 2;
helicopter.SetMedium();
nextSound = false;
super.nextLevelSuspend = 0;
}
if(difLvls.chosen == 1)
MovingLines.isEasy = true;
else
MovingLines.isEasy = false;
super.isFalling = isFalling;
super.render(delta);
DrawLevel();
DrawTarget();
DrawGlass();
DrawBackButton();
float heliXtransed = (helicopter.GetX() - xToCen) / lvsPlayAreaRatio;
float heliYtransed = (helicopter.GetY() - yToCen) / lvsPlayAreaRatio;
//With the border
if((isCollision(borderLine, heliXtransed, heliYtransed) || isFalling) && !newStart){
timer+=delta;
if(!super.isFalling){
isFalling = true;
AssetLoader.propellorSpin.stop();
if(!GameMainClass.muteSound)
AssetLoader.crash.play();
}
super.startMovingHeli = false;
if(super.isFalling){
helicopter.SetRotation(helicopter.GetRotation() + 600/lvsPlayAreaRatio*delta);
helicopter.SetPosition(helicopter.GetX(), helicopter.GetY() - (phoneHeight/3)*delta);
}
if(helicopter.GetY() + 34*lvsPlayAreaRatio < 0 && !AssetLoader.crash.isPlaying() && timer >= 3){ //34*lvsPlayAreaRatio: helis height in the level
isFalling = false;
timer = 0;
helicopter.ResetVelocityRotation();
helicopter.SetPosition((float) (heliPosX*lvsPlayAreaRatio + xToCen), (float) (heliPosY*lvsPlayAreaRatio + yToCen));
nextSound = false;
}
}
//With the landing area
if(difLvls.chosen != 1 && isCollision(targetX,targetY, 35, 35, heliXtransed, heliYtransed)){
if(!nextSound){
//fa = false;
AssetLoader.propellorSpin.stop();
if(!GameMainClass.muteSound)
AssetLoader.nextLevel.play();
if(Menu.prefs.getInteger("lastPlayedLevel", 1) < 8)
Menu.SaveLevel(8);
super.SetStars(this);
nextSound = true;
}
nextLevelSuspend += delta;
if(super.nextLevelSuspend > 2){
GameMainClass.setCurScreen(8);
helicopter.ResetVelocityRotation();
helicopter.SetPosition((float) (heliPosX*lvsPlayAreaRatio + xToCen), (float) (heliPosY*lvsPlayAreaRatio + yToCen));
startMovingHeli = false;
super.nextLevelSuspend = 0;
heliXtransed = (helicopter.GetX() - xToCen) / lvsPlayAreaRatio;
heliYtransed = (helicopter.GetY() - yToCen) / lvsPlayAreaRatio;
}
}
//With horizontal moving border
for(int i= 0 ;i<horLines.length && difLvls.chosen != 1;i++){
if(isCollision((int) ((horLines[i].updatedX1 - xToCen)/lvsPlayAreaRatio),
(int) ((horLines[i].updatedY1 - yToCen)/lvsPlayAreaRatio), (int) ((horLines[i].updatedX2 - xToCen)/lvsPlayAreaRatio) - (int) ((horLines[i].updatedX1 - xToCen)/lvsPlayAreaRatio), 1, heliXtransed, heliYtransed)){
if(!super.isFalling){
isFalling = true;
AssetLoader.propellorSpin.stop();
if(!GameMainClass.muteSound)
AssetLoader.crash.play();
}
super.startMovingHeli = false;
}
}
for(int i= 0 ;i<horLinesDif1.length && difLvls.chosen == 1;i++){
if(isCollision((int) ((horLinesDif1[i].updatedX1 - xToCen)/lvsPlayAreaRatio),
(int) ((horLinesDif1[i].updatedY1 - yToCen)/lvsPlayAreaRatio), (int) ((horLinesDif1[i].updatedX2 - xToCen)/lvsPlayAreaRatio) - (int) ((horLinesDif1[i].updatedX1 - xToCen)/lvsPlayAreaRatio), 1, heliXtransed, heliYtransed)){
if(!super.isFalling){
isFalling = true;
AssetLoader.propellorSpin.stop();
if(!GameMainClass.muteSound)
AssetLoader.crash.play();
}
super.startMovingHeli = false;
}
}
//With vertical moving border
for(int i= 0 ;i<verLines.length && nextLevelSuspend == 0;i++){
if(isCollision((int) ((verLines[i].updatedX1 - xToCen)/lvsPlayAreaRatio),
(int) ((verLines[i].updatedY2 - yToCen)/lvsPlayAreaRatio), 1, (int) ((verLines[i].updatedY1 - yToCen)/lvsPlayAreaRatio) - (int) ((verLines[i].updatedY2 - yToCen)/lvsPlayAreaRatio), heliXtransed, heliYtransed)){
if(!super.isFalling){
isFalling = true;
AssetLoader.propellorSpin.stop();
AssetLoader.crash.play();
}
super.startMovingHeli = false;
}
}
DrawLines();
if(lvsPlayAreaRatio < 0.9f)
widthOfTarget = (int)(28*lvsPlayAreaRatio/0.8);
else
widthOfTarget = (int)(35*lvsPlayAreaRatio);
difLvls.DoThings(bgNum, startMovingHeli, widthOfTarget, (int)(targetX*lvsPlayAreaRatio + xToCen),(int)(targetY*lvsPlayAreaRatio + yToCen), delta, super.isFalling);
if(difLvls.chosen == 1){
verLines[0].speed = 20;
verLines[1].speed = 20;
}
else{
verLines[0].speed = 32;
verLines[1].speed = 32;
}
if(difLvls.chosen != 1){
horLines[0].UpdateForHor(delta);
horLines[1].UpdateForHor(delta);
horLines[2].UpdateForHor(delta);
}
//horLines[3].UpdateForHor(delta);
else{
horLinesDif1[0].UpdateForHor(delta);
horLinesDif1[1].UpdateForHor(delta);
}
verLines[0].UpdateForVer(delta, verLines[0]);
verLines[1].UpdateForVer(delta, verLines[0]);
}
private void DrawLines() {
Gdx.gl.glEnable(GL20.GL_BLEND);
Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
linesRenderer.begin(ShapeType.Line);
linesRenderer.setColor(new Color(255/100f, 255/100f, 255/100f, 200/255f));
if(difLvls.chosen != 1){
linesRenderer.line(horLines[0].updatedX1, horLines[0].updatedY1, horLines[0].updatedX2, horLines[0].updatedY2);
linesRenderer.line(horLines[1].updatedX1, horLines[1].updatedY1, horLines[1].updatedX2, horLines[1].updatedY2);
linesRenderer.line(horLines[2].updatedX1, horLines[2].updatedY1, horLines[2].updatedX2, horLines[2].updatedY2);
}
else{
linesRenderer.line(horLinesDif1[0].updatedX1, horLinesDif1[0].updatedY1, horLinesDif1[0].updatedX2, horLinesDif1[0].updatedY2);
linesRenderer.line(horLinesDif1[1].updatedX1, horLinesDif1[1].updatedY1, horLinesDif1[1].updatedX2, horLinesDif1[1].updatedY2);
}
//linesRenderer.line(horLines[3].updatedX1, horLines[3].updatedY1, horLines[3].updatedX2, horLines[3].updatedY2);
linesRenderer.line(verLines[0].updatedX1, verLines[0].updatedY1, verLines[0].updatedX2, verLines[0].updatedY2);
linesRenderer.line(verLines[1].updatedX1, verLines[1].updatedY1, verLines[1].updatedX2, verLines[1].updatedY2);
linesRenderer.end();
}
private void DrawLevel (){
drawToScreen.begin();
drawToScreen.draw(AssetLoader.level7, (int)xToCen, (int)yToCen, (int)(PLAY_AR_WID*lvsPlayAreaRatio),
(int)(PLAY_AR_HEI*lvsPlayAreaRatio), 0, 0, PLAY_AR_WID, PLAY_AR_HEI, false, false);
drawToScreen.end();
}
private void DrawTarget (){
drawToScreen.begin();
if(lvsPlayAreaRatio < 0.9f)
drawToScreen.draw(AssetLoader.targetSmall, (int)(xToCen + targetX*lvsPlayAreaRatio),(int)(yToCen + targetY*lvsPlayAreaRatio),
(int)(28*lvsPlayAreaRatio/0.8), (int)(28*lvsPlayAreaRatio/0.8),0,0,28,28,false,false);
else
drawToScreen.draw(AssetLoader.target, (int)(xToCen + targetX*lvsPlayAreaRatio),(int)(yToCen + targetY*lvsPlayAreaRatio),
(int)(35*lvsPlayAreaRatio), (int)(35*lvsPlayAreaRatio),0,0,35,35,false,false);//35 = texture width and height
if(difLvls.chosen == 1){
if(lvsPlayAreaRatio < 0.9f)
drawToScreen.draw(AssetLoader.targetSmallDif1, (int)(xToCen + targetX*lvsPlayAreaRatio),(int)(yToCen + targetY*lvsPlayAreaRatio),
(int)(28*lvsPlayAreaRatio/0.8), (int)(28*lvsPlayAreaRatio/0.8),0,0,28,28,false,false);
else
drawToScreen.draw(AssetLoader.targetDif1, (int)(xToCen + targetX*lvsPlayAreaRatio),(int)(yToCen + targetY*lvsPlayAreaRatio),
(int)(35*lvsPlayAreaRatio), (int)(35*lvsPlayAreaRatio),0,0,35,35,false,false);//35 = texture width and height
}
drawToScreen.end();
}
private void SetCenterCoords (){
if(zeroAtY){
yToCen = phoneHeight*(float)0.025;
xToCen = phoneWidth / 2 - PLAY_AR_WID * lvsPlayAreaRatio / 2;
}
else{
xToCen = phoneWidth*(float)0.025;
yToCen = phoneHeight / 2 - PLAY_AR_HEI * lvsPlayAreaRatio / 2;
}
}
private void Add1() {
borderLine[185] [0] = true;
borderLine[184] [0] = true;
borderLine[183] [0] = true;
borderLine[182] [0] = true;
borderLine[181] [0] = true;
borderLine[180] [0] = true;
borderLine[179] [0] = true;
borderLine[178] [0] = true;
borderLine[177] [0] = true;
borderLine[176] [0] = true;
borderLine[175] [0] = true;
borderLine[174] [0] = true;
borderLine[173] [0] = true;
borderLine[172] [0] = true;
borderLine[171] [0] = true;
borderLine[170] [0] = true;
borderLine[169] [0] = true;
borderLine[168] [0] = true;
borderLine[167] [0] = true;
borderLine[166] [0] = true;
borderLine[165] [0] = true;
borderLine[164] [0] = true;
borderLine[163] [0] = true;
borderLine[162] [0] = true;
borderLine[161] [0] = true;
borderLine[160] [0] = true;
borderLine[159] [0] = true;
borderLine[158] [0] = true;
borderLine[157] [0] = true;
borderLine[156] [0] = true;
borderLine[155] [0] = true;
borderLine[154] [0] = true;
borderLine[153] [0] = true;
borderLine[152] [0] = true;
borderLine[151] [0] = true;
borderLine[150] [0] = true;
borderLine[149] [0] = true;
borderLine[148] [0] = true;
borderLine[147] [0] = true;
borderLine[146] [0] = true;
borderLine[145] [0] = true;
borderLine[144] [0] = true;
borderLine[143] [0] = true;
borderLine[142] [0] = true;
borderLine[141] [0] = true;
borderLine[140] [0] = true;
borderLine[139] [0] = true;
borderLine[138] [0] = true;
borderLine[137] [0] = true;
borderLine[136] [0] = true;
borderLine[135] [0] = true;
borderLine[134] [0] = true;
borderLine[133] [0] = true;
borderLine[132] [0] = true;
borderLine[131] [0] = true;
borderLine[130] [0] = true;
borderLine[129] [0] = true;
borderLine[128] [0] = true;
borderLine[127] [0] = true;
borderLine[126] [0] = true;
borderLine[125] [0] = true;
borderLine[124] [0] = true;
borderLine[123] [0] = true;
borderLine[122] [0] = true;
borderLine[121] [0] = true;
borderLine[120] [0] = true;
borderLine[119] [0] = true;
borderLine[118] [0] = true;
borderLine[117] [0] = true;
borderLine[116] [0] = true;
borderLine[115] [0] = true;
borderLine[114] [0] = true;
borderLine[113] [0] = true;
borderLine[112] [0] = true;
borderLine[111] [0] = true;
borderLine[110] [0] = true;
borderLine[109] [0] = true;
borderLine[108] [0] = true;
borderLine[107] [0] = true;
borderLine[106] [0] = true;
borderLine[105] [0] = true;
borderLine[104] [0] = true;
borderLine[103] [0] = true;
borderLine[102] [0] = true;
borderLine[101] [0] = true;
borderLine[100] [0] = true;
borderLine[99] [0] = true;
borderLine[98] [0] = true;
borderLine[97] [0] = true;
borderLine[96] [0] = true;
borderLine[95] [0] = true;
borderLine[94] [0] = true;
borderLine[93] [0] = true;
borderLine[92] [0] = true;
borderLine[91] [0] = true;
borderLine[90] [0] = true;
borderLine[89] [0] = true;
borderLine[88] [0] = true;
borderLine[87] [0] = true;
borderLine[86] [0] = true;
borderLine[85] [0] = true;
borderLine[84] [0] = true;
borderLine[83] [0] = true;
borderLine[82] [0] = true;
borderLine[81] [0] = true;
borderLine[80] [0] = true;
borderLine[79] [0] = true;
borderLine[78] [0] = true;
borderLine[77] [0] = true;
borderLine[76] [0] = true;
borderLine[75] [0] = true;
borderLine[74] [0] = true;
borderLine[73] [0] = true;
borderLine[72] [0] = true;
borderLine[71] [0] = true;
borderLine[70] [0] = true;
borderLine[69] [0] = true;
borderLine[68] [0] = true;
borderLine[67] [0] = true;
borderLine[66] [0] = true;
borderLine[65] [0] = true;
borderLine[64] [0] = true;
borderLine[63] [0] = true;
borderLine[62] [0] = true;
borderLine[61] [0] = true;
borderLine[60] [0] = true;
borderLine[59] [0] = true;
borderLine[58] [0] = true;
borderLine[57] [0] = true;
borderLine[56] [0] = true;
borderLine[55] [0] = true;
borderLine[54] [0] = true;
borderLine[53] [0] = true;
borderLine[52] [0] = true;
borderLine[51] [0] = true;
borderLine[50] [0] = true;
borderLine[49] [0] = true;
borderLine[48] [0] = true;
borderLine[47] [0] = true;
borderLine[46] [0] = true;
borderLine[45] [0] = true;
borderLine[44] [0] = true;
borderLine[43] [0] = true;
borderLine[42] [0] = true;
borderLine[41] [0] = true;
borderLine[40] [0] = true;
borderLine[39] [0] = true;
borderLine[38] [0] = true;
borderLine[37] [0] = true;
borderLine[36] [0] = true;
borderLine[35] [0] = true;
borderLine[34] [0] = true;
borderLine[33] [0] = true;
borderLine[32] [0] = true;
borderLine[31] [0] = true;
borderLine[30] [0] = true;
borderLine[29] [0] = true;
borderLine[28] [0] = true;
borderLine[27] [0] = true;
borderLine[26] [0] = true;
borderLine[25] [0] = true;
borderLine[24] [0] = true;
borderLine[23] [0] = true;
borderLine[22] [0] = true;
borderLine[21] [0] = true;
borderLine[20] [0] = true;
borderLine[19] [0] = true;
borderLine[18] [0] = true;
borderLine[17] [0] = true;
borderLine[16] [0] = true;
borderLine[15] [0] = true;
borderLine[14] [0] = true;
borderLine[13] [0] = true;
borderLine[12] [0] = true;
borderLine[11] [0] = true;
borderLine[10] [0] = true;
borderLine[9] [0] = true;
borderLine[8] [0] = true;
borderLine[7] [0] = true;
borderLine[6] [0] = true;
borderLine[5] [0] = true;
borderLine[4] [0] = true;
borderLine[3] [0] = true;
borderLine[2] [0] = true;
borderLine[1] [0] = true;
borderLine[0] [0] = true;
borderLine[185] [1] = true;
borderLine[0] [1] = true;
borderLine[185] [2] = true;
borderLine[0] [2] = true;
borderLine[185] [3] = true;
borderLine[0] [3] = true;
borderLine[185] [4] = true;
borderLine[0] [4] = true;
borderLine[185] [5] = true;
borderLine[0] [5] = true;
borderLine[185] [6] = true;
borderLine[0] [6] = true;
borderLine[185] [7] = true;
borderLine[0] [7] = true;
borderLine[185] [8] = true;
borderLine[0] [8] = true;
borderLine[185] [9] = true;
borderLine[0] [9] = true;
borderLine[185] [10] = true;
borderLine[0] [10] = true;
borderLine[185] [11] = true;
borderLine[0] [11] = true;
borderLine[185] [12] = true;
borderLine[0] [12] = true;
borderLine[185] [13] = true;
borderLine[0] [13] = true;
borderLine[185] [14] = true;
borderLine[0] [14] = true;
borderLine[185] [15] = true;
borderLine[0] [15] = true;
borderLine[185] [16] = true;
borderLine[0] [16] = true;
borderLine[185] [17] = true;
borderLine[0] [17] = true;
borderLine[185] [18] = true;
borderLine[0] [18] = true;
borderLine[185] [19] = true;
borderLine[0] [19] = true;
borderLine[185] [20] = true;
borderLine[0] [20] = true;
borderLine[185] [21] = true;
borderLine[0] [21] = true;
borderLine[185] [22] = true;
borderLine[0] [22] = true;
borderLine[185] [23] = true;
borderLine[0] [23] = true;
borderLine[185] [24] = true;
borderLine[0] [24] = true;
borderLine[185] [25] = true;
borderLine[0] [25] = true;
borderLine[185] [26] = true;
borderLine[0] [26] = true;
borderLine[185] [27] = true;
borderLine[0] [27] = true;
borderLine[185] [28] = true;
borderLine[0] [28] = true;
borderLine[185] [29] = true;
borderLine[0] [29] = true;
borderLine[185] [30] = true;
borderLine[0] [30] = true;
borderLine[185] [31] = true;
borderLine[0] [31] = true;
borderLine[185] [32] = true;
borderLine[0] [32] = true;
borderLine[185] [33] = true;
borderLine[0] [33] = true;
borderLine[185] [34] = true;
borderLine[0] [34] = true;
borderLine[185] [35] = true;
borderLine[0] [35] = true;
borderLine[185] [36] = true;
borderLine[0] [36] = true;
borderLine[185] [37] = true;
borderLine[0] [37] = true;
borderLine[185] [38] = true;
borderLine[0] [38] = true;
borderLine[185] [39] = true;
borderLine[0] [39] = true;
borderLine[185] [40] = true;
borderLine[0] [40] = true;
borderLine[185] [41] = true;
borderLine[0] [41] = true;
borderLine[185] [42] = true;
borderLine[0] [42] = true;
borderLine[185] [43] = true;
borderLine[0] [43] = true;
borderLine[185] [44] = true;
borderLine[0] [44] = true;
borderLine[185] [45] = true;
borderLine[0] [45] = true;
borderLine[185] [46] = true;
borderLine[0] [46] = true;
borderLine[185] [47] = true;
borderLine[0] [47] = true;
borderLine[185] [48] = true;
borderLine[0] [48] = true;
borderLine[185] [49] = true;
borderLine[0] [49] = true;
borderLine[185] [50] = true;
borderLine[0] [50] = true;
borderLine[185] [51] = true;
borderLine[0] [51] = true;
borderLine[185] [52] = true;
borderLine[0] [52] = true;
borderLine[185] [53] = true;
borderLine[0] [53] = true;
borderLine[185] [54] = true;
borderLine[0] [54] = true;
borderLine[185] [55] = true;
borderLine[0] [55] = true;
borderLine[185] [56] = true;
borderLine[0] [56] = true;
borderLine[185] [57] = true;
borderLine[0] [57] = true;
borderLine[185] [58] = true;
borderLine[0] [58] = true;
borderLine[185] [59] = true;
borderLine[0] [59] = true;
borderLine[185] [60] = true;
borderLine[0] [60] = true;
borderLine[185] [61] = true;
borderLine[0] [61] = true;
borderLine[185] [62] = true;
borderLine[0] [62] = true;
borderLine[185] [63] = true;
borderLine[0] [63] = true;
borderLine[185] [64] = true;
borderLine[0] [64] = true;
borderLine[185] [65] = true;
borderLine[0] [65] = true;
borderLine[185] [66] = true;
borderLine[0] [66] = true;
borderLine[185] [67] = true;
borderLine[0] [67] = true;
borderLine[185] [68] = true;
borderLine[0] [68] = true;
borderLine[185] [69] = true;
borderLine[0] [69] = true;
borderLine[185] [70] = true;
borderLine[0] [70] = true;
borderLine[185] [71] = true;
borderLine[0] [71] = true;
borderLine[185] [72] = true;
borderLine[0] [72] = true;
borderLine[185] [73] = true;
borderLine[0] [73] = true;
borderLine[185] [74] = true;
borderLine[0] [74] = true;
borderLine[185] [75] = true;
borderLine[0] [75] = true;
borderLine[185] [76] = true;
borderLine[0] [76] = true;
borderLine[185] [77] = true;
borderLine[0] [77] = true;
borderLine[185] [78] = true;
borderLine[0] [78] = true;
borderLine[185] [79] = true;
borderLine[0] [79] = true;
borderLine[185] [80] = true;
borderLine[0] [80] = true;
borderLine[185] [81] = true;
borderLine[0] [81] = true;
borderLine[185] [82] = true;
borderLine[0] [82] = true;
borderLine[185] [83] = true;
borderLine[0] [83] = true;
borderLine[185] [84] = true;
borderLine[0] [84] = true;
borderLine[185] [85] = true;
borderLine[0] [85] = true;
borderLine[185] [86] = true;
borderLine[0] [86] = true;
borderLine[185] [87] = true;
borderLine[0] [87] = true;
borderLine[185] [88] = true;
borderLine[0] [88] = true;
borderLine[185] [89] = true;
borderLine[0] [89] = true;
borderLine[185] [90] = true;
borderLine[0] [90] = true;
borderLine[185] [91] = true;
borderLine[0] [91] = true;
borderLine[185] [92] = true;
borderLine[0] [92] = true;
borderLine[185] [93] = true;
borderLine[0] [93] = true;
borderLine[185] [94] = true;
borderLine[0] [94] = true;
borderLine[185] [95] = true;
borderLine[0] [95] = true;
borderLine[185] [96] = true;
borderLine[0] [96] = true;
borderLine[185] [97] = true;
borderLine[0] [97] = true;
borderLine[185] [98] = true;
borderLine[0] [98] = true;
borderLine[185] [99] = true;
borderLine[0] [99] = true;
borderLine[185] [100] = true;
borderLine[0] [100] = true;
borderLine[185] [101] = true;
borderLine[0] [101] = true;
borderLine[185] [102] = true;
borderLine[0] [102] = true;
borderLine[185] [103] = true;
borderLine[0] [103] = true;
borderLine[185] [104] = true;
borderLine[0] [104] = true;
borderLine[185] [105] = true;
borderLine[0] [105] = true;
borderLine[185] [106] = true;
borderLine[0] [106] = true;
borderLine[185] [107] = true;
borderLine[0] [107] = true;
borderLine[185] [108] = true;
borderLine[0] [108] = true;
borderLine[185] [109] = true;
borderLine[0] [109] = true;
borderLine[185] [110] = true;
borderLine[0] [110] = true;
borderLine[185] [111] = true;
borderLine[0] [111] = true;
borderLine[185] [112] = true;
borderLine[0] [112] = true;
borderLine[185] [113] = true;
borderLine[0] [113] = true;
borderLine[185] [114] = true;
borderLine[0] [114] = true;
borderLine[185] [115] = true;
borderLine[0] [115] = true;
borderLine[185] [116] = true;
borderLine[0] [116] = true;
borderLine[185] [117] = true;
borderLine[0] [117] = true;
borderLine[185] [118] = true;
borderLine[0] [118] = true;
borderLine[185] [119] = true;
borderLine[0] [119] = true;
borderLine[185] [120] = true;
borderLine[0] [120] = true;
borderLine[185] [121] = true;
borderLine[0] [121] = true;
borderLine[185] [122] = true;
borderLine[0] [122] = true;
borderLine[185] [123] = true;
borderLine[0] [123] = true;
borderLine[185] [124] = true;
borderLine[0] [124] = true;
borderLine[185] [125] = true;
borderLine[0] [125] = true;
borderLine[185] [126] = true;
borderLine[0] [126] = true;
borderLine[185] [127] = true;
borderLine[0] [127] = true;
borderLine[185] [128] = true;
borderLine[0] [128] = true;
borderLine[185] [129] = true;
borderLine[0] [129] = true;
borderLine[185] [130] = true;
borderLine[0] [130] = true;
borderLine[185] [131] = true;
borderLine[0] [131] = true;
borderLine[185] [132] = true;
borderLine[0] [132] = true;
borderLine[185] [133] = true;
borderLine[0] [133] = true;
borderLine[185] [134] = true;
borderLine[0] [134] = true;
borderLine[185] [135] = true;
borderLine[0] [135] = true;
borderLine[185] [136] = true;
borderLine[0] [136] = true;
borderLine[185] [137] = true;
borderLine[0] [137] = true;
borderLine[185] [138] = true;
borderLine[0] [138] = true;
borderLine[185] [139] = true;
borderLine[0] [139] = true;
borderLine[185] [140] = true;
borderLine[0] [140] = true;
borderLine[185] [141] = true;
borderLine[0] [141] = true;
borderLine[185] [142] = true;
borderLine[0] [142] = true;
borderLine[185] [143] = true;
borderLine[0] [143] = true;
borderLine[185] [144] = true;
borderLine[0] [144] = true;
borderLine[185] [145] = true;
borderLine[0] [145] = true;
borderLine[185] [146] = true;
borderLine[0] [146] = true;
borderLine[185] [147] = true;
borderLine[0] [147] = true;
borderLine[185] [148] = true;
borderLine[0] [148] = true;
borderLine[185] [149] = true;
borderLine[0] [149] = true;
borderLine[185] [150] = true;
borderLine[0] [150] = true;
borderLine[185] [151] = true;
borderLine[0] [151] = true;
borderLine[185] [152] = true;
borderLine[0] [152] = true;
borderLine[185] [153] = true;
borderLine[0] [153] = true;
borderLine[185] [154] = true;
borderLine[0] [154] = true;
borderLine[439] [155] = true;
borderLine[438] [155] = true;
borderLine[437] [155] = true;
borderLine[436] [155] = true;
borderLine[435] [155] = true;
borderLine[434] [155] = true;
borderLine[433] [155] = true;
borderLine[432] [155] = true;
borderLine[431] [155] = true;
borderLine[430] [155] = true;
borderLine[429] [155] = true;
borderLine[428] [155] = true;
borderLine[427] [155] = true;
borderLine[426] [155] = true;
borderLine[425] [155] = true;
borderLine[424] [155] = true;
borderLine[423] [155] = true;
borderLine[422] [155] = true;
borderLine[421] [155] = true;
borderLine[420] [155] = true;
borderLine[419] [155] = true;
borderLine[418] [155] = true;
borderLine[417] [155] = true;
borderLine[416] [155] = true;
borderLine[415] [155] = true;
borderLine[414] [155] = true;
borderLine[413] [155] = true;
borderLine[412] [155] = true;
borderLine[411] [155] = true;
borderLine[410] [155] = true;
borderLine[409] [155] = true;
borderLine[408] [155] = true;
borderLine[407] [155] = true;
borderLine[406] [155] = true;
borderLine[405] [155] = true;
borderLine[404] [155] = true;
borderLine[403] [155] = true;
borderLine[402] [155] = true;
borderLine[401] [155] = true;
borderLine[400] [155] = true;
borderLine[399] [155] = true;
borderLine[398] [155] = true;
borderLine[397] [155] = true;
borderLine[396] [155] = true;
borderLine[395] [155] = true;
borderLine[394] [155] = true;
borderLine[393] [155] = true;
borderLine[392] [155] = true;
borderLine[391] [155] = true;
borderLine[390] [155] = true;
borderLine[389] [155] = true;
borderLine[388] [155] = true;
borderLine[387] [155] = true;
borderLine[386] [155] = true;
borderLine[385] [155] = true;
borderLine[384] [155] = true;
borderLine[383] [155] = true;
borderLine[382] [155] = true;
borderLine[381] [155] = true;
borderLine[380] [155] = true;
borderLine[379] [155] = true;
borderLine[378] [155] = true;
borderLine[377] [155] = true;
borderLine[376] [155] = true;
borderLine[375] [155] = true;
borderLine[374] [155] = true;
borderLine[373] [155] = true;
borderLine[372] [155] = true;
borderLine[371] [155] = true;
borderLine[370] [155] = true;
borderLine[369] [155] = true;
borderLine[368] [155] = true;
borderLine[367] [155] = true;
borderLine[366] [155] = true;
borderLine[365] [155] = true;
borderLine[364] [155] = true;
borderLine[363] [155] = true;
borderLine[362] [155] = true;
borderLine[361] [155] = true;
borderLine[360] [155] = true;
borderLine[359] [155] = true;
borderLine[358] [155] = true;
borderLine[357] [155] = true;
borderLine[356] [155] = true;
borderLine[355] [155] = true;
borderLine[354] [155] = true;
borderLine[353] [155] = true;
borderLine[352] [155] = true;
borderLine[351] [155] = true;
borderLine[350] [155] = true;
borderLine[349] [155] = true;
borderLine[348] [155] = true;
borderLine[347] [155] = true;
borderLine[346] [155] = true;
borderLine[345] [155] = true;
borderLine[344] [155] = true;
borderLine[343] [155] = true;
borderLine[342] [155] = true;
borderLine[341] [155] = true;
borderLine[340] [155] = true;
borderLine[339] [155] = true;
borderLine[338] [155] = true;
borderLine[337] [155] = true;
borderLine[336] [155] = true;
borderLine[335] [155] = true;
borderLine[334] [155] = true;
borderLine[333] [155] = true;
borderLine[332] [155] = true;
borderLine[331] [155] = true;
borderLine[330] [155] = true;
borderLine[329] [155] = true;
borderLine[328] [155] = true;
borderLine[327] [155] = true;
borderLine[326] [155] = true;
borderLine[325] [155] = true;
borderLine[324] [155] = true;
borderLine[323] [155] = true;
borderLine[322] [155] = true;
borderLine[321] [155] = true;
borderLine[320] [155] = true;
borderLine[319] [155] = true;
borderLine[318] [155] = true;
borderLine[317] [155] = true;
borderLine[316] [155] = true;
borderLine[315] [155] = true;
borderLine[314] [155] = true;
borderLine[313] [155] = true;
borderLine[312] [155] = true;
borderLine[311] [155] = true;
borderLine[310] [155] = true;
borderLine[309] [155] = true;
borderLine[308] [155] = true;
borderLine[307] [155] = true;
borderLine[306] [155] = true;
borderLine[305] [155] = true;
borderLine[304] [155] = true;
borderLine[303] [155] = true;
borderLine[302] [155] = true;
borderLine[301] [155] = true;
borderLine[300] [155] = true;
borderLine[299] [155] = true;
borderLine[298] [155] = true;
borderLine[297] [155] = true;
borderLine[296] [155] = true;
borderLine[295] [155] = true;
borderLine[294] [155] = true;
borderLine[293] [155] = true;
borderLine[292] [155] = true;
borderLine[291] [155] = true;
borderLine[290] [155] = true;
borderLine[289] [155] = true;
borderLine[288] [155] = true;
borderLine[287] [155] = true;
borderLine[286] [155] = true;
borderLine[285] [155] = true;
borderLine[284] [155] = true;
borderLine[283] [155] = true;
borderLine[282] [155] = true;
borderLine[281] [155] = true;
borderLine[280] [155] = true;
borderLine[279] [155] = true;
borderLine[278] [155] = true;
borderLine[277] [155] = true;
borderLine[276] [155] = true;
borderLine[275] [155] = true;
borderLine[274] [155] = true;
borderLine[273] [155] = true;
borderLine[272] [155] = true;
borderLine[271] [155] = true;
borderLine[270] [155] = true;
borderLine[269] [155] = true;
borderLine[268] [155] = true;
borderLine[267] [155] = true;
borderLine[266] [155] = true;
borderLine[265] [155] = true;
borderLine[264] [155] = true;
borderLine[263] [155] = true;
borderLine[262] [155] = true;
borderLine[261] [155] = true;
borderLine[260] [155] = true;
borderLine[259] [155] = true;
borderLine[258] [155] = true;
borderLine[257] [155] = true;
borderLine[256] [155] = true;
borderLine[255] [155] = true;
borderLine[254] [155] = true;
borderLine[253] [155] = true;
borderLine[252] [155] = true;
borderLine[251] [155] = true;
borderLine[250] [155] = true;
borderLine[249] [155] = true;
borderLine[248] [155] = true;
borderLine[247] [155] = true;
borderLine[246] [155] = true;
borderLine[245] [155] = true;
borderLine[244] [155] = true;
borderLine[243] [155] = true;
borderLine[242] [155] = true;
borderLine[241] [155] = true;
borderLine[240] [155] = true;
borderLine[239] [155] = true;
borderLine[238] [155] = true;
borderLine[237] [155] = true;
borderLine[236] [155] = true;
borderLine[235] [155] = true;
borderLine[234] [155] = true;
borderLine[233] [155] = true;
borderLine[232] [155] = true;
borderLine[231] [155] = true;
borderLine[230] [155] = true;
borderLine[229] [155] = true;
borderLine[228] [155] = true;
borderLine[227] [155] = true;
borderLine[226] [155] = true;
borderLine[225] [155] = true;
borderLine[224] [155] = true;
borderLine[223] [155] = true;
borderLine[222] [155] = true;
borderLine[221] [155] = true;
borderLine[220] [155] = true;
borderLine[219] [155] = true;
borderLine[218] [155] = true;
borderLine[217] [155] = true;
borderLine[216] [155] = true;
borderLine[215] [155] = true;
borderLine[214] [155] = true;
borderLine[213] [155] = true;
borderLine[212] [155] = true;
borderLine[211] [155] = true;
borderLine[210] [155] = true;
borderLine[209] [155] = true;
borderLine[208] [155] = true;
borderLine[207] [155] = true;
borderLine[206] [155] = true;
borderLine[205] [155] = true;
borderLine[204] [155] = true;
borderLine[203] [155] = true;
borderLine[202] [155] = true;
borderLine[201] [155] = true;
borderLine[200] [155] = true;
borderLine[199] [155] = true;
borderLine[198] [155] = true;
borderLine[197] [155] = true;
borderLine[196] [155] = true;
borderLine[195] [155] = true;
borderLine[194] [155] = true;
borderLine[193] [155] = true;
borderLine[192] [155] = true;
borderLine[191] [155] = true;
borderLine[190] [155] = true;
borderLine[189] [155] = true;
borderLine[188] [155] = true;
borderLine[187] [155] = true;
borderLine[186] [155] = true;
borderLine[185] [155] = true;
borderLine[0] [155] = true;
borderLine[439] [156] = true;
borderLine[0] [156] = true;
borderLine[439] [157] = true;
borderLine[0] [157] = true;
borderLine[439] [158] = true;
borderLine[0] [158] = true;
borderLine[439] [159] = true;
borderLine[0] [159] = true;
borderLine[439] [160] = true;
borderLine[0] [160] = true;
borderLine[439] [161] = true;
borderLine[0] [161] = true;
borderLine[439] [162] = true;
borderLine[0] [162] = true;
borderLine[439] [163] = true;
borderLine[0] [163] = true;
borderLine[439] [164] = true;
borderLine[0] [164] = true;
borderLine[439] [165] = true;
borderLine[0] [165] = true;
borderLine[439] [166] = true;
borderLine[0] [166] = true;
borderLine[439] [167] = true;
borderLine[0] [167] = true;
borderLine[439] [168] = true;
borderLine[0] [168] = true;
borderLine[439] [169] = true;
borderLine[0] [169] = true;
borderLine[439] [170] = true;
borderLine[0] [170] = true;
borderLine[439] [171] = true;
borderLine[0] [171] = true;
borderLine[439] [172] = true;
borderLine[0] [172] = true;
borderLine[439] [173] = true;
borderLine[0] [173] = true;
borderLine[439] [174] = true;
borderLine[0] [174] = true;
borderLine[439] [175] = true;
borderLine[0] [175] = true;
borderLine[439] [176] = true;
borderLine[0] [176] = true;
borderLine[439] [177] = true;
borderLine[0] [177] = true;
borderLine[439] [178] = true;
borderLine[0] [178] = true;
borderLine[439] [179] = true;
borderLine[0] [179] = true;
borderLine[439] [180] = true;
borderLine[0] [180] = true;
borderLine[439] [181] = true;
borderLine[0] [181] = true;
borderLine[439] [182] = true;
borderLine[0] [182] = true;
borderLine[439] [183] = true;
borderLine[0] [183] = true;
borderLine[439] [184] = true;
borderLine[0] [184] = true;
borderLine[439] [185] = true;
borderLine[0] [185] = true;
borderLine[439] [186] = true;
borderLine[0] [186] = true;
borderLine[439] [187] = true;
borderLine[0] [187] = true;
borderLine[439] [188] = true;
borderLine[0] [188] = true;
borderLine[439] [189] = true;
borderLine[0] [189] = true;
borderLine[439] [190] = true;
borderLine[0] [190] = true;
borderLine[439] [191] = true;
borderLine[0] [191] = true;
borderLine[439] [192] = true;
borderLine[0] [192] = true;
borderLine[439] [193] = true;
borderLine[0] [193] = true;
borderLine[439] [194] = true;
borderLine[0] [194] = true;
borderLine[439] [195] = true;
borderLine[0] [195] = true;
borderLine[439] [196] = true;
borderLine[0] [196] = true;
borderLine[439] [197] = true;
borderLine[0] [197] = true;
borderLine[439] [198] = true;
borderLine[0] [198] = true;
borderLine[439] [199] = true;
borderLine[0] [199] = true;
borderLine[439] [200] = true;
borderLine[0] [200] = true;
borderLine[439] [201] = true;
borderLine[0] [201] = true;
borderLine[439] [202] = true;
borderLine[0] [202] = true;
borderLine[439] [203] = true;
borderLine[0] [203] = true;
borderLine[439] [204] = true;
borderLine[0] [204] = true;
borderLine[439] [205] = true;
borderLine[0] [205] = true;
borderLine[439] [206] = true;
borderLine[0] [206] = true;
borderLine[439] [207] = true;
borderLine[0] [207] = true;
borderLine[439] [208] = true;
borderLine[0] [208] = true;
borderLine[439] [209] = true;
borderLine[0] [209] = true;
borderLine[439] [210] = true;
borderLine[0] [210] = true;
borderLine[439] [211] = true;
borderLine[0] [211] = true;
borderLine[439] [212] = true;
borderLine[0] [212] = true;
borderLine[439] [213] = true;
borderLine[0] [213] = true;
borderLine[439] [214] = true;
borderLine[0] [214] = true;
borderLine[439] [215] = true;
borderLine[0] [215] = true;
borderLine[439] [216] = true;
borderLine[0] [216] = true;
borderLine[439] [217] = true;
borderLine[0] [217] = true;
borderLine[439] [218] = true;
borderLine[0] [218] = true;
borderLine[439] [219] = true;
borderLine[0] [219] = true;
borderLine[439] [220] = true;
borderLine[0] [220] = true;
borderLine[439] [221] = true;
borderLine[0] [221] = true;
borderLine[439] [222] = true;
borderLine[0] [222] = true;
borderLine[439] [223] = true;
borderLine[0] [223] = true;
borderLine[439] [224] = true;
borderLine[0] [224] = true;
borderLine[439] [225] = true;
borderLine[0] [225] = true;
borderLine[439] [226] = true;
borderLine[0] [226] = true;
borderLine[439] [227] = true;
borderLine[0] [227] = true;
borderLine[439] [228] = true;
borderLine[0] [228] = true;
borderLine[439] [229] = true;
borderLine[0] [229] = true;
borderLine[439] [230] = true;
borderLine[0] [230] = true;
borderLine[439] [231] = true;
borderLine[0] [231] = true;
borderLine[439] [232] = true;
borderLine[0] [232] = true;
borderLine[439] [233] = true;
borderLine[0] [233] = true;
borderLine[439] [234] = true;
borderLine[0] [234] = true;
borderLine[439] [235] = true;
borderLine[0] [235] = true;
borderLine[439] [236] = true;
borderLine[0] [236] = true;
borderLine[439] [237] = true;
borderLine[0] [237] = true;
borderLine[439] [238] = true;
borderLine[0] [238] = true;
borderLine[439] [239] = true;
borderLine[0] [239] = true;
borderLine[439] [240] = true;
borderLine[0] [240] = true;
borderLine[439] [241] = true;
borderLine[0] [241] = true;
borderLine[439] [242] = true;
borderLine[0] [242] = true;
borderLine[439] [243] = true;
borderLine[0] [243] = true;
borderLine[439] [244] = true;
borderLine[0] [244] = true;
borderLine[439] [245] = true;
borderLine[0] [245] = true;
borderLine[439] [246] = true;
borderLine[0] [246] = true;
borderLine[439] [247] = true;
borderLine[0] [247] = true;
borderLine[439] [248] = true;
borderLine[0] [248] = true;
borderLine[439] [249] = true;
borderLine[0] [249] = true;
borderLine[439] [250] = true;
borderLine[0] [250] = true;
borderLine[439] [251] = true;
borderLine[0] [251] = true;
borderLine[439] [252] = true;
borderLine[0] [252] = true;
borderLine[439] [253] = true;
borderLine[0] [253] = true;
borderLine[439] [254] = true;
borderLine[0] [254] = true;
borderLine[439] [255] = true;
borderLine[0] [255] = true;
borderLine[439] [256] = true;
borderLine[0] [256] = true;
borderLine[439] [257] = true;
borderLine[0] [257] = true;
borderLine[439] [258] = true;
borderLine[0] [258] = true;
borderLine[439] [259] = true;
borderLine[0] [259] = true;
borderLine[439] [260] = true;
borderLine[0] [260] = true;
borderLine[439] [261] = true;
borderLine[0] [261] = true;
borderLine[439] [262] = true;
borderLine[0] [262] = true;
borderLine[439] [263] = true;
borderLine[0] [263] = true;
borderLine[439] [264] = true;
borderLine[0] [264] = true;
borderLine[439] [265] = true;
borderLine[0] [265] = true;
borderLine[439] [266] = true;
borderLine[0] [266] = true;
borderLine[439] [267] = true;
borderLine[0] [267] = true;
borderLine[439] [268] = true;
borderLine[0] [268] = true;
borderLine[439] [269] = true;
borderLine[0] [269] = true;
borderLine[439] [270] = true;
borderLine[0] [270] = true;
borderLine[439] [271] = true;
borderLine[0] [271] = true;
borderLine[439] [272] = true;
borderLine[0] [272] = true;
borderLine[439] [273] = true;
borderLine[0] [273] = true;
borderLine[439] [274] = true;
borderLine[0] [274] = true;
borderLine[439] [275] = true;
borderLine[0] [275] = true;
borderLine[439] [276] = true;
borderLine[0] [276] = true;
borderLine[439] [277] = true;
borderLine[0] [277] = true;
borderLine[439] [278] = true;
borderLine[0] [278] = true;
borderLine[439] [279] = true;
borderLine[0] [279] = true;
borderLine[439] [280] = true;
borderLine[0] [280] = true;
borderLine[439] [281] = true;
borderLine[0] [281] = true;
borderLine[439] [282] = true;
borderLine[0] [282] = true;
borderLine[439] [283] = true;
borderLine[0] [283] = true;
borderLine[439] [284] = true;
borderLine[0] [284] = true;
borderLine[439] [285] = true;
borderLine[0] [285] = true;
borderLine[439] [286] = true;
borderLine[0] [286] = true;
borderLine[439] [287] = true;
borderLine[0] [287] = true;
borderLine[439] [288] = true;
borderLine[0] [288] = true;
borderLine[439] [289] = true;
borderLine[0] [289] = true;
borderLine[439] [290] = true;
borderLine[0] [290] = true;
borderLine[439] [291] = true;
borderLine[0] [291] = true;
borderLine[439] [292] = true;
borderLine[0] [292] = true;
borderLine[439] [293] = true;
borderLine[0] [293] = true;
borderLine[439] [294] = true;
borderLine[326] [294] = true;
borderLine[325] [294] = true;
borderLine[324] [294] = true;
borderLine[323] [294] = true;
borderLine[322] [294] = true;
borderLine[321] [294] = true;
borderLine[320] [294] = true;
borderLine[319] [294] = true;
borderLine[318] [294] = true;
borderLine[317] [294] = true;
borderLine[316] [294] = true;
borderLine[315] [294] = true;
borderLine[314] [294] = true;
borderLine[313] [294] = true;
borderLine[312] [294] = true;
borderLine[311] [294] = true;
borderLine[310] [294] = true;
borderLine[309] [294] = true;
borderLine[308] [294] = true;
borderLine[307] [294] = true;
borderLine[306] [294] = true;
borderLine[305] [294] = true;
borderLine[304] [294] = true;
borderLine[303] [294] = true;
borderLine[302] [294] = true;
borderLine[301] [294] = true;
borderLine[300] [294] = true;
borderLine[299] [294] = true;
borderLine[298] [294] = true;
borderLine[297] [294] = true;
borderLine[296] [294] = true;
borderLine[295] [294] = true;
borderLine[294] [294] = true;
borderLine[293] [294] = true;
borderLine[292] [294] = true;
borderLine[291] [294] = true;
borderLine[290] [294] = true;
borderLine[289] [294] = true;
borderLine[288] [294] = true;
borderLine[287] [294] = true;
borderLine[286] [294] = true;
borderLine[285] [294] = true;
borderLine[284] [294] = true;
borderLine[283] [294] = true;
borderLine[282] [294] = true;
borderLine[281] [294] = true;
borderLine[280] [294] = true;
borderLine[279] [294] = true;
borderLine[278] [294] = true;
borderLine[277] [294] = true;
borderLine[276] [294] = true;
borderLine[275] [294] = true;
borderLine[274] [294] = true;
borderLine[273] [294] = true;
borderLine[272] [294] = true;
borderLine[271] [294] = true;
borderLine[270] [294] = true;
borderLine[269] [294] = true;
borderLine[268] [294] = true;
borderLine[267] [294] = true;
borderLine[266] [294] = true;
borderLine[265] [294] = true;
borderLine[264] [294] = true;
borderLine[263] [294] = true;
borderLine[262] [294] = true;
borderLine[261] [294] = true;
borderLine[260] [294] = true;
borderLine[259] [294] = true;
borderLine[258] [294] = true;
borderLine[257] [294] = true;
borderLine[256] [294] = true;
borderLine[255] [294] = true;
borderLine[254] [294] = true;
borderLine[253] [294] = true;
borderLine[252] [294] = true;
borderLine[251] [294] = true;
borderLine[250] [294] = true;
borderLine[249] [294] = true;
borderLine[248] [294] = true;
borderLine[247] [294] = true;
borderLine[246] [294] = true;
borderLine[245] [294] = true;
borderLine[244] [294] = true;
borderLine[243] [294] = true;
borderLine[242] [294] = true;
borderLine[241] [294] = true;
borderLine[240] [294] = true;
borderLine[239] [294] = true;
borderLine[238] [294] = true;
borderLine[237] [294] = true;
borderLine[236] [294] = true;
borderLine[235] [294] = true;
borderLine[234] [294] = true;
borderLine[233] [294] = true;
borderLine[232] [294] = true;
borderLine[231] [294] = true;
borderLine[230] [294] = true;
borderLine[229] [294] = true;
borderLine[228] [294] = true;
borderLine[227] [294] = true;
borderLine[226] [294] = true;
borderLine[225] [294] = true;
borderLine[224] [294] = true;
borderLine[223] [294] = true;
borderLine[222] [294] = true;
borderLine[221] [294] = true;
borderLine[220] [294] = true;
borderLine[219] [294] = true;
borderLine[218] [294] = true;
borderLine[217] [294] = true;
borderLine[216] [294] = true;
borderLine[215] [294] = true;
borderLine[214] [294] = true;
borderLine[213] [294] = true;
borderLine[212] [294] = true;
borderLine[211] [294] = true;
borderLine[210] [294] = true;
borderLine[209] [294] = true;
borderLine[208] [294] = true;
borderLine[207] [294] = true;
borderLine[206] [294] = true;
borderLine[205] [294] = true;
borderLine[204] [294] = true;
borderLine[203] [294] = true;
borderLine[202] [294] = true;
borderLine[201] [294] = true;
borderLine[200] [294] = true;
borderLine[199] [294] = true;
borderLine[198] [294] = true;
borderLine[197] [294] = true;
borderLine[196] [294] = true;
borderLine[195] [294] = true;
borderLine[194] [294] = true;
borderLine[193] [294] = true;
borderLine[192] [294] = true;
borderLine[191] [294] = true;
borderLine[190] [294] = true;
borderLine[189] [294] = true;
borderLine[188] [294] = true;
borderLine[187] [294] = true;
borderLine[186] [294] = true;
borderLine[185] [294] = true;
borderLine[184] [294] = true;
borderLine[183] [294] = true;
borderLine[182] [294] = true;
borderLine[181] [294] = true;
borderLine[180] [294] = true;
borderLine[179] [294] = true;
borderLine[178] [294] = true;
borderLine[177] [294] = true;
borderLine[176] [294] = true;
borderLine[175] [294] = true;
borderLine[174] [294] = true;
borderLine[173] [294] = true;
borderLine[172] [294] = true;
borderLine[171] [294] = true;
borderLine[170] [294] = true;
borderLine[169] [294] = true;
borderLine[168] [294] = true;
borderLine[167] [294] = true;
borderLine[166] [294] = true;
borderLine[165] [294] = true;
borderLine[164] [294] = true;
borderLine[163] [294] = true;
borderLine[162] [294] = true;
borderLine[161] [294] = true;
borderLine[160] [294] = true;
borderLine[159] [294] = true;
borderLine[158] [294] = true;
borderLine[157] [294] = true;
borderLine[156] [294] = true;
borderLine[155] [294] = true;
borderLine[154] [294] = true;
borderLine[153] [294] = true;
}
private void Add2() {
borderLine[152] [294] = true;
borderLine[151] [294] = true;
borderLine[150] [294] = true;
borderLine[149] [294] = true;
borderLine[148] [294] = true;
borderLine[147] [294] = true;
borderLine[146] [294] = true;
borderLine[145] [294] = true;
borderLine[144] [294] = true;
borderLine[143] [294] = true;
borderLine[142] [294] = true;
borderLine[141] [294] = true;
borderLine[140] [294] = true;
borderLine[139] [294] = true;
borderLine[138] [294] = true;
borderLine[137] [294] = true;
borderLine[136] [294] = true;
borderLine[135] [294] = true;
borderLine[134] [294] = true;
borderLine[133] [294] = true;
borderLine[132] [294] = true;
borderLine[131] [294] = true;
borderLine[130] [294] = true;
borderLine[129] [294] = true;
borderLine[128] [294] = true;
borderLine[127] [294] = true;
borderLine[126] [294] = true;
borderLine[125] [294] = true;
borderLine[124] [294] = true;
borderLine[123] [294] = true;
borderLine[122] [294] = true;
borderLine[121] [294] = true;
borderLine[120] [294] = true;
borderLine[119] [294] = true;
borderLine[118] [294] = true;
borderLine[117] [294] = true;
borderLine[116] [294] = true;
borderLine[115] [294] = true;
borderLine[114] [294] = true;
borderLine[113] [294] = true;
borderLine[112] [294] = true;
borderLine[111] [294] = true;
borderLine[110] [294] = true;
borderLine[109] [294] = true;
borderLine[108] [294] = true;
borderLine[107] [294] = true;
borderLine[106] [294] = true;
borderLine[105] [294] = true;
borderLine[104] [294] = true;
borderLine[103] [294] = true;
borderLine[102] [294] = true;
borderLine[101] [294] = true;
borderLine[100] [294] = true;
borderLine[99] [294] = true;
borderLine[98] [294] = true;
borderLine[97] [294] = true;
borderLine[96] [294] = true;
borderLine[95] [294] = true;
borderLine[94] [294] = true;
borderLine[93] [294] = true;
borderLine[92] [294] = true;
borderLine[91] [294] = true;
borderLine[90] [294] = true;
borderLine[89] [294] = true;
borderLine[88] [294] = true;
borderLine[87] [294] = true;
borderLine[86] [294] = true;
borderLine[85] [294] = true;
borderLine[84] [294] = true;
borderLine[83] [294] = true;
borderLine[82] [294] = true;
borderLine[81] [294] = true;
borderLine[80] [294] = true;
borderLine[79] [294] = true;
borderLine[78] [294] = true;
borderLine[77] [294] = true;
borderLine[76] [294] = true;
borderLine[75] [294] = true;
borderLine[74] [294] = true;
borderLine[73] [294] = true;
borderLine[72] [294] = true;
borderLine[71] [294] = true;
borderLine[70] [294] = true;
borderLine[69] [294] = true;
borderLine[68] [294] = true;
borderLine[67] [294] = true;
borderLine[66] [294] = true;
borderLine[65] [294] = true;
borderLine[64] [294] = true;
borderLine[63] [294] = true;
borderLine[62] [294] = true;
borderLine[61] [294] = true;
borderLine[60] [294] = true;
borderLine[59] [294] = true;
borderLine[58] [294] = true;
borderLine[57] [294] = true;
borderLine[56] [294] = true;
borderLine[55] [294] = true;
borderLine[54] [294] = true;
borderLine[53] [294] = true;
borderLine[52] [294] = true;
borderLine[51] [294] = true;
borderLine[50] [294] = true;
borderLine[49] [294] = true;
borderLine[48] [294] = true;
borderLine[47] [294] = true;
borderLine[46] [294] = true;
borderLine[45] [294] = true;
borderLine[44] [294] = true;
borderLine[43] [294] = true;
borderLine[42] [294] = true;
borderLine[41] [294] = true;
borderLine[40] [294] = true;
borderLine[39] [294] = true;
borderLine[38] [294] = true;
borderLine[37] [294] = true;
borderLine[36] [294] = true;
borderLine[35] [294] = true;
borderLine[34] [294] = true;
borderLine[33] [294] = true;
borderLine[32] [294] = true;
borderLine[31] [294] = true;
borderLine[30] [294] = true;
borderLine[29] [294] = true;
borderLine[28] [294] = true;
borderLine[27] [294] = true;
borderLine[26] [294] = true;
borderLine[25] [294] = true;
borderLine[24] [294] = true;
borderLine[23] [294] = true;
borderLine[22] [294] = true;
borderLine[21] [294] = true;
borderLine[20] [294] = true;
borderLine[19] [294] = true;
borderLine[18] [294] = true;
borderLine[17] [294] = true;
borderLine[16] [294] = true;
borderLine[15] [294] = true;
borderLine[14] [294] = true;
borderLine[13] [294] = true;
borderLine[12] [294] = true;
borderLine[11] [294] = true;
borderLine[10] [294] = true;
borderLine[9] [294] = true;
borderLine[8] [294] = true;
borderLine[7] [294] = true;
borderLine[6] [294] = true;
borderLine[5] [294] = true;
borderLine[4] [294] = true;
borderLine[3] [294] = true;
borderLine[2] [294] = true;
borderLine[1] [294] = true;
borderLine[0] [294] = true;
borderLine[439] [295] = true;
borderLine[326] [295] = true;
borderLine[439] [296] = true;
borderLine[326] [296] = true;
borderLine[439] [297] = true;
borderLine[326] [297] = true;
borderLine[439] [298] = true;
borderLine[326] [298] = true;
borderLine[439] [299] = true;
borderLine[326] [299] = true;
borderLine[439] [300] = true;
borderLine[326] [300] = true;
borderLine[439] [301] = true;
borderLine[326] [301] = true;
borderLine[439] [302] = true;
borderLine[326] [302] = true;
borderLine[439] [303] = true;
borderLine[326] [303] = true;
borderLine[439] [304] = true;
borderLine[326] [304] = true;
borderLine[439] [305] = true;
borderLine[326] [305] = true;
borderLine[439] [306] = true;
borderLine[326] [306] = true;
borderLine[439] [307] = true;
borderLine[326] [307] = true;
borderLine[439] [308] = true;
borderLine[326] [308] = true;
borderLine[439] [309] = true;
borderLine[326] [309] = true;
borderLine[439] [310] = true;
borderLine[326] [310] = true;
borderLine[439] [311] = true;
borderLine[326] [311] = true;
borderLine[439] [312] = true;
borderLine[326] [312] = true;
borderLine[439] [313] = true;
borderLine[326] [313] = true;
borderLine[439] [314] = true;
borderLine[326] [314] = true;
borderLine[439] [315] = true;
borderLine[326] [315] = true;
borderLine[439] [316] = true;
borderLine[326] [316] = true;
borderLine[439] [317] = true;
borderLine[326] [317] = true;
borderLine[439] [318] = true;
borderLine[326] [318] = true;
borderLine[439] [319] = true;
borderLine[326] [319] = true;
borderLine[439] [320] = true;
borderLine[326] [320] = true;
borderLine[439] [321] = true;
borderLine[326] [321] = true;
borderLine[439] [322] = true;
borderLine[326] [322] = true;
borderLine[439] [323] = true;
borderLine[326] [323] = true;
borderLine[439] [324] = true;
borderLine[326] [324] = true;
borderLine[439] [325] = true;
borderLine[326] [325] = true;
borderLine[439] [326] = true;
borderLine[326] [326] = true;
borderLine[439] [327] = true;
borderLine[326] [327] = true;
borderLine[439] [328] = true;
borderLine[326] [328] = true;
borderLine[439] [329] = true;
borderLine[326] [329] = true;
borderLine[439] [330] = true;
borderLine[326] [330] = true;
borderLine[439] [331] = true;
borderLine[326] [331] = true;
borderLine[439] [332] = true;
borderLine[326] [332] = true;
borderLine[439] [333] = true;
borderLine[326] [333] = true;
borderLine[439] [334] = true;
borderLine[326] [334] = true;
borderLine[439] [335] = true;
borderLine[326] [335] = true;
borderLine[439] [336] = true;
borderLine[326] [336] = true;
borderLine[439] [337] = true;
borderLine[326] [337] = true;
borderLine[439] [338] = true;
borderLine[326] [338] = true;
borderLine[439] [339] = true;
borderLine[326] [339] = true;
borderLine[439] [340] = true;
borderLine[326] [340] = true;
borderLine[439] [341] = true;
borderLine[326] [341] = true;
borderLine[439] [342] = true;
borderLine[326] [342] = true;
borderLine[439] [343] = true;
borderLine[326] [343] = true;
borderLine[439] [344] = true;
borderLine[326] [344] = true;
borderLine[439] [345] = true;
borderLine[326] [345] = true;
borderLine[439] [346] = true;
borderLine[326] [346] = true;
borderLine[439] [347] = true;
borderLine[326] [347] = true;
borderLine[439] [348] = true;
borderLine[326] [348] = true;
borderLine[439] [349] = true;
borderLine[326] [349] = true;
borderLine[439] [350] = true;
borderLine[326] [350] = true;
borderLine[439] [351] = true;
borderLine[326] [351] = true;
borderLine[439] [352] = true;
borderLine[326] [352] = true;
borderLine[439] [353] = true;
borderLine[326] [353] = true;
borderLine[439] [354] = true;
borderLine[326] [354] = true;
borderLine[439] [355] = true;
borderLine[326] [355] = true;
borderLine[439] [356] = true;
borderLine[326] [356] = true;
borderLine[439] [357] = true;
borderLine[326] [357] = true;
borderLine[439] [358] = true;
borderLine[326] [358] = true;
borderLine[439] [359] = true;
borderLine[326] [359] = true;
borderLine[439] [360] = true;
borderLine[326] [360] = true;
borderLine[439] [361] = true;
borderLine[326] [361] = true;
borderLine[439] [362] = true;
borderLine[326] [362] = true;
borderLine[439] [363] = true;
borderLine[326] [363] = true;
borderLine[439] [364] = true;
borderLine[326] [364] = true;
borderLine[439] [365] = true;
borderLine[326] [365] = true;
borderLine[439] [366] = true;
borderLine[326] [366] = true;
borderLine[439] [367] = true;
borderLine[326] [367] = true;
borderLine[439] [368] = true;
borderLine[326] [368] = true;
borderLine[439] [369] = true;
borderLine[326] [369] = true;
borderLine[439] [370] = true;
borderLine[326] [370] = true;
borderLine[439] [371] = true;
borderLine[326] [371] = true;
borderLine[439] [372] = true;
borderLine[326] [372] = true;
borderLine[439] [373] = true;
borderLine[326] [373] = true;
borderLine[439] [374] = true;
borderLine[326] [374] = true;
borderLine[439] [375] = true;
borderLine[326] [375] = true;
borderLine[439] [376] = true;
borderLine[326] [376] = true;
borderLine[439] [377] = true;
borderLine[326] [377] = true;
borderLine[439] [378] = true;
borderLine[326] [378] = true;
borderLine[439] [379] = true;
borderLine[326] [379] = true;
borderLine[439] [380] = true;
borderLine[326] [380] = true;
borderLine[439] [381] = true;
borderLine[326] [381] = true;
borderLine[439] [382] = true;
borderLine[326] [382] = true;
borderLine[439] [383] = true;
borderLine[326] [383] = true;
borderLine[439] [384] = true;
borderLine[326] [384] = true;
borderLine[439] [385] = true;
borderLine[326] [385] = true;
borderLine[439] [386] = true;
borderLine[326] [386] = true;
borderLine[439] [387] = true;
borderLine[326] [387] = true;
borderLine[439] [388] = true;
borderLine[326] [388] = true;
borderLine[439] [389] = true;
borderLine[326] [389] = true;
borderLine[439] [390] = true;
borderLine[326] [390] = true;
borderLine[439] [391] = true;
borderLine[326] [391] = true;
borderLine[439] [392] = true;
borderLine[326] [392] = true;
borderLine[439] [393] = true;
borderLine[326] [393] = true;
borderLine[439] [394] = true;
borderLine[326] [394] = true;
borderLine[439] [395] = true;
borderLine[326] [395] = true;
borderLine[439] [396] = true;
borderLine[326] [396] = true;
borderLine[439] [397] = true;
borderLine[326] [397] = true;
borderLine[439] [398] = true;
borderLine[326] [398] = true;
borderLine[439] [399] = true;
borderLine[326] [399] = true;
borderLine[439] [400] = true;
borderLine[326] [400] = true;
borderLine[439] [401] = true;
borderLine[326] [401] = true;
borderLine[439] [402] = true;
borderLine[326] [402] = true;
borderLine[439] [403] = true;
borderLine[326] [403] = true;
borderLine[439] [404] = true;
borderLine[326] [404] = true;
borderLine[439] [405] = true;
borderLine[326] [405] = true;
borderLine[439] [406] = true;
borderLine[326] [406] = true;
borderLine[439] [407] = true;
borderLine[326] [407] = true;
borderLine[439] [408] = true;
borderLine[326] [408] = true;
borderLine[439] [409] = true;
borderLine[326] [409] = true;
borderLine[439] [410] = true;
borderLine[326] [410] = true;
borderLine[439] [411] = true;
borderLine[326] [411] = true;
borderLine[439] [412] = true;
borderLine[326] [412] = true;
borderLine[439] [413] = true;
borderLine[326] [413] = true;
borderLine[439] [414] = true;
borderLine[326] [414] = true;
borderLine[439] [415] = true;
borderLine[326] [415] = true;
borderLine[439] [416] = true;
borderLine[326] [416] = true;
borderLine[439] [417] = true;
borderLine[326] [417] = true;
borderLine[439] [418] = true;
borderLine[326] [418] = true;
borderLine[439] [419] = true;
borderLine[326] [419] = true;
borderLine[439] [420] = true;
borderLine[326] [420] = true;
borderLine[439] [421] = true;
borderLine[326] [421] = true;
borderLine[439] [422] = true;
borderLine[326] [422] = true;
borderLine[439] [423] = true;
borderLine[326] [423] = true;
borderLine[439] [424] = true;
borderLine[326] [424] = true;
borderLine[439] [425] = true;
borderLine[326] [425] = true;
borderLine[439] [426] = true;
borderLine[326] [426] = true;
borderLine[439] [427] = true;
borderLine[326] [427] = true;
borderLine[439] [428] = true;
borderLine[326] [428] = true;
borderLine[439] [429] = true;
borderLine[326] [429] = true;
borderLine[439] [430] = true;
borderLine[326] [430] = true;
borderLine[439] [431] = true;
borderLine[326] [431] = true;
borderLine[439] [432] = true;
borderLine[326] [432] = true;
borderLine[439] [433] = true;
borderLine[326] [433] = true;
borderLine[439] [434] = true;
borderLine[326] [434] = true;
borderLine[439] [435] = true;
borderLine[326] [435] = true;
borderLine[439] [436] = true;
borderLine[347] [436] = true;
borderLine[346] [436] = true;
borderLine[345] [436] = true;
borderLine[344] [436] = true;
borderLine[343] [436] = true;
borderLine[342] [436] = true;
borderLine[341] [436] = true;
borderLine[340] [436] = true;
borderLine[339] [436] = true;
borderLine[338] [436] = true;
borderLine[337] [436] = true;
borderLine[336] [436] = true;
borderLine[335] [436] = true;
borderLine[334] [436] = true;
borderLine[333] [436] = true;
borderLine[332] [436] = true;
borderLine[331] [436] = true;
borderLine[330] [436] = true;
borderLine[329] [436] = true;
borderLine[328] [436] = true;
borderLine[327] [436] = true;
borderLine[326] [436] = true;
borderLine[439] [437] = true;
borderLine[326] [437] = true;
borderLine[439] [438] = true;
borderLine[326] [438] = true;
borderLine[439] [439] = true;
borderLine[326] [439] = true;
borderLine[439] [440] = true;
borderLine[326] [440] = true;
borderLine[439] [441] = true;
borderLine[326] [441] = true;
borderLine[439] [442] = true;
borderLine[326] [442] = true;
borderLine[439] [443] = true;
borderLine[326] [443] = true;
borderLine[439] [444] = true;
borderLine[326] [444] = true;
borderLine[439] [445] = true;
borderLine[326] [445] = true;
borderLine[439] [446] = true;
borderLine[326] [446] = true;
borderLine[439] [447] = true;
borderLine[326] [447] = true;
borderLine[439] [448] = true;
borderLine[326] [448] = true;
borderLine[439] [449] = true;
borderLine[326] [449] = true;
borderLine[439] [450] = true;
borderLine[326] [450] = true;
borderLine[439] [451] = true;
borderLine[326] [451] = true;
borderLine[439] [452] = true;
borderLine[326] [452] = true;
borderLine[439] [453] = true;
borderLine[326] [453] = true;
borderLine[439] [454] = true;
borderLine[326] [454] = true;
borderLine[439] [455] = true;
borderLine[326] [455] = true;
borderLine[439] [456] = true;
borderLine[326] [456] = true;
borderLine[439] [457] = true;
borderLine[326] [457] = true;
borderLine[439] [458] = true;
borderLine[326] [458] = true;
borderLine[439] [459] = true;
borderLine[326] [459] = true;
borderLine[439] [460] = true;
borderLine[326] [460] = true;
borderLine[439] [461] = true;
borderLine[326] [461] = true;
borderLine[439] [462] = true;
borderLine[326] [462] = true;
borderLine[439] [463] = true;
borderLine[326] [463] = true;
borderLine[439] [464] = true;
borderLine[326] [464] = true;
borderLine[439] [465] = true;
borderLine[326] [465] = true;
borderLine[439] [466] = true;
borderLine[326] [466] = true;
borderLine[439] [467] = true;
borderLine[326] [467] = true;
borderLine[439] [468] = true;
borderLine[326] [468] = true;
borderLine[439] [469] = true;
borderLine[326] [469] = true;
borderLine[439] [470] = true;
borderLine[326] [470] = true;
borderLine[439] [471] = true;
borderLine[326] [471] = true;
borderLine[439] [472] = true;
borderLine[326] [472] = true;
borderLine[439] [473] = true;
borderLine[326] [473] = true;
borderLine[439] [474] = true;
borderLine[326] [474] = true;
borderLine[439] [475] = true;
borderLine[326] [475] = true;
borderLine[439] [476] = true;
borderLine[326] [476] = true;
borderLine[439] [477] = true;
borderLine[326] [477] = true;
borderLine[439] [478] = true;
borderLine[326] [478] = true;
borderLine[439] [479] = true;
borderLine[326] [479] = true;
borderLine[439] [480] = true;
borderLine[326] [480] = true;
borderLine[439] [481] = true;
borderLine[326] [481] = true;
borderLine[439] [482] = true;
borderLine[326] [482] = true;
borderLine[439] [483] = true;
borderLine[326] [483] = true;
borderLine[439] [484] = true;
borderLine[326] [484] = true;
borderLine[439] [485] = true;
borderLine[326] [485] = true;
borderLine[439] [486] = true;
borderLine[326] [486] = true;
borderLine[439] [487] = true;
borderLine[326] [487] = true;
borderLine[439] [488] = true;
borderLine[326] [488] = true;
borderLine[439] [489] = true;
borderLine[326] [489] = true;
borderLine[439] [490] = true;
borderLine[326] [490] = true;
borderLine[439] [491] = true;
borderLine[326] [491] = true;
borderLine[439] [492] = true;
borderLine[326] [492] = true;
borderLine[439] [493] = true;
borderLine[326] [493] = true;
borderLine[439] [494] = true;
borderLine[326] [494] = true;
borderLine[439] [495] = true;
borderLine[326] [495] = true;
borderLine[439] [496] = true;
borderLine[326] [496] = true;
borderLine[439] [497] = true;
borderLine[326] [497] = true;
borderLine[439] [498] = true;
borderLine[326] [498] = true;
borderLine[439] [499] = true;
borderLine[326] [499] = true;
borderLine[439] [500] = true;
borderLine[326] [500] = true;
borderLine[439] [501] = true;
borderLine[326] [501] = true;
borderLine[439] [502] = true;
borderLine[326] [502] = true;
borderLine[439] [503] = true;
borderLine[326] [503] = true;
borderLine[439] [504] = true;
borderLine[326] [504] = true;
borderLine[439] [505] = true;
borderLine[326] [505] = true;
borderLine[439] [506] = true;
borderLine[326] [506] = true;
borderLine[439] [507] = true;
borderLine[326] [507] = true;
borderLine[439] [508] = true;
borderLine[326] [508] = true;
borderLine[439] [509] = true;
borderLine[326] [509] = true;
borderLine[439] [510] = true;
borderLine[326] [510] = true;
borderLine[439] [511] = true;
borderLine[326] [511] = true;
borderLine[439] [512] = true;
borderLine[326] [512] = true;
borderLine[439] [513] = true;
borderLine[326] [513] = true;
borderLine[439] [514] = true;
borderLine[326] [514] = true;
borderLine[439] [515] = true;
borderLine[326] [515] = true;
borderLine[439] [516] = true;
borderLine[326] [516] = true;
borderLine[439] [517] = true;
borderLine[326] [517] = true;
borderLine[439] [518] = true;
borderLine[326] [518] = true;
borderLine[439] [519] = true;
borderLine[326] [519] = true;
borderLine[439] [520] = true;
borderLine[326] [520] = true;
borderLine[439] [521] = true;
borderLine[326] [521] = true;
borderLine[439] [522] = true;
borderLine[326] [522] = true;
borderLine[439] [523] = true;
borderLine[326] [523] = true;
borderLine[439] [524] = true;
borderLine[326] [524] = true;
borderLine[439] [525] = true;
borderLine[326] [525] = true;
borderLine[439] [526] = true;
borderLine[326] [526] = true;
borderLine[439] [527] = true;
borderLine[326] [527] = true;
borderLine[439] [528] = true;
borderLine[326] [528] = true;
borderLine[439] [529] = true;
borderLine[326] [529] = true;
borderLine[439] [530] = true;
borderLine[326] [530] = true;
borderLine[439] [531] = true;
borderLine[326] [531] = true;
borderLine[439] [532] = true;
borderLine[326] [532] = true;
borderLine[439] [533] = true;
borderLine[326] [533] = true;
borderLine[439] [534] = true;
borderLine[326] [534] = true;
borderLine[439] [535] = true;
borderLine[326] [535] = true;
borderLine[439] [536] = true;
borderLine[326] [536] = true;
borderLine[439] [537] = true;
borderLine[326] [537] = true;
borderLine[439] [538] = true;
borderLine[326] [538] = true;
borderLine[439] [539] = true;
borderLine[326] [539] = true;
borderLine[439] [540] = true;
borderLine[326] [540] = true;
borderLine[439] [541] = true;
borderLine[326] [541] = true;
borderLine[439] [542] = true;
borderLine[326] [542] = true;
borderLine[439] [543] = true;
borderLine[326] [543] = true;
borderLine[439] [544] = true;
borderLine[326] [544] = true;
borderLine[439] [545] = true;
borderLine[326] [545] = true;
borderLine[439] [546] = true;
borderLine[326] [546] = true;
borderLine[439] [547] = true;
borderLine[326] [547] = true;
borderLine[439] [548] = true;
borderLine[326] [548] = true;
borderLine[439] [549] = true;
borderLine[326] [549] = true;
borderLine[439] [550] = true;
borderLine[326] [550] = true;
borderLine[439] [551] = true;
borderLine[326] [551] = true;
borderLine[439] [552] = true;
borderLine[326] [552] = true;
borderLine[439] [553] = true;
borderLine[326] [553] = true;
borderLine[439] [554] = true;
borderLine[326] [554] = true;
borderLine[439] [555] = true;
borderLine[326] [555] = true;
borderLine[439] [556] = true;
borderLine[326] [556] = true;
borderLine[439] [557] = true;
borderLine[326] [557] = true;
borderLine[439] [558] = true;
borderLine[326] [558] = true;
borderLine[439] [559] = true;
borderLine[326] [559] = true;
borderLine[439] [560] = true;
borderLine[326] [560] = true;
borderLine[439] [561] = true;
borderLine[326] [561] = true;
borderLine[439] [562] = true;
borderLine[326] [562] = true;
borderLine[439] [563] = true;
borderLine[326] [563] = true;
borderLine[439] [564] = true;
borderLine[326] [564] = true;
borderLine[439] [565] = true;
borderLine[326] [565] = true;
borderLine[439] [566] = true;
borderLine[326] [566] = true;
borderLine[439] [567] = true;
borderLine[326] [567] = true;
borderLine[439] [568] = true;
borderLine[326] [568] = true;
borderLine[439] [569] = true;
borderLine[326] [569] = true;
borderLine[439] [570] = true;
borderLine[326] [570] = true;
borderLine[439] [571] = true;
borderLine[326] [571] = true;
borderLine[439] [572] = true;
borderLine[326] [572] = true;
borderLine[439] [573] = true;
borderLine[326] [573] = true;
borderLine[439] [574] = true;
borderLine[326] [574] = true;
borderLine[439] [575] = true;
borderLine[326] [575] = true;
borderLine[439] [576] = true;
borderLine[326] [576] = true;
borderLine[439] [577] = true;
borderLine[326] [577] = true;
borderLine[439] [578] = true;
borderLine[326] [578] = true;
borderLine[439] [579] = true;
borderLine[326] [579] = true;
borderLine[439] [580] = true;
borderLine[326] [580] = true;
borderLine[439] [581] = true;
borderLine[326] [581] = true;
borderLine[439] [582] = true;
borderLine[326] [582] = true;
borderLine[439] [583] = true;
borderLine[326] [583] = true;
borderLine[439] [584] = true;
borderLine[326] [584] = true;
borderLine[439] [585] = true;
borderLine[326] [585] = true;
borderLine[439] [586] = true;
borderLine[326] [586] = true;
borderLine[439] [587] = true;
borderLine[326] [587] = true;
borderLine[439] [588] = true;
borderLine[326] [588] = true;
borderLine[439] [589] = true;
borderLine[326] [589] = true;
borderLine[439] [590] = true;
borderLine[326] [590] = true;
borderLine[439] [591] = true;
borderLine[326] [591] = true;
borderLine[439] [592] = true;
borderLine[326] [592] = true;
borderLine[439] [593] = true;
borderLine[326] [593] = true;
borderLine[439] [594] = true;
borderLine[326] [594] = true;
borderLine[439] [595] = true;
borderLine[326] [595] = true;
borderLine[439] [596] = true;
borderLine[326] [596] = true;
borderLine[439] [597] = true;
borderLine[326] [597] = true;
borderLine[439] [598] = true;
borderLine[326] [598] = true;
borderLine[439] [599] = true;
borderLine[326] [599] = true;
borderLine[439] [600] = true;
borderLine[326] [600] = true;
borderLine[439] [601] = true;
borderLine[326] [601] = true;
}
} | [
"eli1mail1@gmail.com"
] | eli1mail1@gmail.com |
83acd9d614cdd7013e3532cf14217008d4a54c02 | 3a7834c9ec63d642ef8a71277226fb7f00f5a7a7 | /SmartLibrary/src/com/example/smartlibrary/RentInfo.java | 8f079558be605fc1709aa820eb636bd5f5e3220a | [] | no_license | kwonhak/SmartLibrary | a637030a00d1b6f0cd6c021dd8971f18d5be5ccf | 3c4081ec9d27f011eff7c9f7342be6a5ce1abfa2 | refs/heads/master | 2020-04-13T03:24:26.135085 | 2014-09-16T14:12:34 | 2014-09-16T14:12:34 | 21,654,752 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 740 | java | package com.example.smartlibrary;
import android.content.Context;
public class RentInfo {
private String isbn;
private String title;
private String card;
private String student;
private String startdate;
public RentInfo(Context context, String b_card, String b_student, String b_isbn, String b_startdate, String b_title ) {
isbn = b_isbn;
title = b_title;
card = b_card;
student = b_student;
startdate = b_startdate;
}
public String getIsbn() {
return isbn;
}
public String getCard() {
return card;
}
public String getTitle() {
return title;
}
public String getStudent() {
return student;
}
public String getStartdate() {
return startdate;
}
}
| [
"kwonhak@naver.com"
] | kwonhak@naver.com |
cd3f0b9d7ef4e4fda5ce299e3458feda85a11a77 | caf0a91142d30278503eaada8cbe866cdb01d287 | /aplicacion/java/es/upm/b105/instrumentos105/Receptor.java | fd1b5477f99ead1a415109a03b09d20c749832a6 | [] | no_license | mvillalbap/TFG_miguelvp | 8d2187e048ac51894cc9478dd9129be3e3996485 | fddfd03d1879c8f69ebaa66ea0b698609a45ef88 | refs/heads/master | 2021-01-01T04:48:52.750129 | 2017-07-14T15:40:26 | 2017-07-14T15:40:26 | 95,140,711 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 531 | java | package paquete;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
* Created by miguelvp on 01/03/2017.
* Clase que recibe y trata la señal de arranque del sistema operativo.
*/
public class Receptor extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
try{
context.startService(new Intent(context, Inicio.class));
}catch(Exception e){
e.printStackTrace();
}
}
}
| [
"miguel.villalba.perez@alumnos.upm.es"
] | miguel.villalba.perez@alumnos.upm.es |
f941865922305d8f4609d2ad9ba485c646b81c11 | e052e26e16ab25da5c88c712ae2e85cfa6888204 | /src/main/java/my/catalog/swing/actions/ShowFoldersButton.java | 37fabca8f148fb1fc7c4ff3fc7507373297b50e4 | [] | no_license | Arlam/Catalog | 2f125687cfe62374a180a4c3a7c3393695d3bfe7 | d8caaa91784d0b901f1737f73584e5d206314e0c | refs/heads/master | 2020-06-01T05:02:11.121345 | 2013-01-02T23:16:22 | 2013-01-02T23:16:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 765 | java | package my.catalog.swing.actions;
import java.awt.event.ActionEvent;
import javax.swing.JFrame;
import my.catalog.model.IAppModelFactory;
import my.catalog.swing.view.FoldersView;
public class ShowFoldersButton extends AbstractMenuButton {
private static final long serialVersionUID = 7257133639407938840L;
private static final String TOOL_TIP = "Open paths config";
private static final String IMG_NAME = "AddFolder.png";
private JFrame owner = null;
private IAppModelFactory modelsFactory;
public ShowFoldersButton(JFrame owner, IAppModelFactory factory) {
super(TOOL_TIP, IMG_NAME);
this.owner = owner;
this.modelsFactory = factory;
}
@Override
public void actionPerformed(ActionEvent arg0) {
new FoldersView(owner, modelsFactory);
}
}
| [
"arlam.ua@gmail.com"
] | arlam.ua@gmail.com |
f94954fb598cfca5db50e30b59c3f6c8ccf0a61f | 78b03f80b5a12e2da79057081919510ff48c7545 | /src/output/views/OutputViewPaneComponent.java | a703421e65a9caa1bf05e2c1707311f1671298af | [] | no_license | Dabic/ConcurrentFileCrunching | cd1a25315346bb2e8d02d202f6e91d97c0bb8ef4 | 5c7ff08f58900a742576bc58451d7f594af13e64 | refs/heads/master | 2022-11-13T18:15:31.344824 | 2020-06-21T16:36:12 | 2020-06-21T16:36:12 | 273,943,870 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,485 | java | package output.views;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import observers.ISubscriber;
import observers.notifications.CloseApplicationNotification;
import observers.notifications.CruncherStartedForOutputNotification;
import output.models.OutputPool;
public class OutputViewPaneComponent extends HBox implements ISubscriber {
private OutputListComponent outputListComponent;
private OutputPlotComponent outputPlotComponent;
public OutputViewPaneComponent(OutputPool outputPool) {
initComponents(outputPool);
addComponents();
}
public void initComponents(OutputPool outputPool) {
outputListComponent = new OutputListComponent(outputPool);
outputPlotComponent = new OutputPlotComponent();
outputListComponent.addSubscriber(outputPlotComponent);
outputPool.addSubscriber(outputPlotComponent);
outputPool.addSubscriber(outputListComponent);
}
public void addComponents() {
getChildren().add(outputPlotComponent);
getChildren().add(outputListComponent);
}
@Override
public void update(Object notification) {
if (notification instanceof CruncherStartedForOutputNotification) {
outputListComponent.addToList(((CruncherStartedForOutputNotification) notification).getOwner().toString());
} else if (notification instanceof CloseApplicationNotification) {
}
}
}
| [
"vladadabicpriv@gmail.com"
] | vladadabicpriv@gmail.com |
9b4d61306a955f4b6e8e089e947ebd34adff8846 | cd5fabc0c40608265e4bcd8c20e02156fa905580 | /src/propets/entities/GeneralPost.java | 003e39ce9e8f783bef45110d2ad206ae854efc69 | [] | no_license | YakovMarkovich/message-service | b6efa9dd1c47f48e49c13ace43af6a21ff586ae2 | 37761c67873e49564360dd85baf7a978233b74dc | refs/heads/master | 2022-12-28T17:46:44.605960 | 2020-10-18T13:22:23 | 2020-10-18T13:22:23 | 305,097,993 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,019 | java | package propets.entities;
import java.time.LocalDateTime;
import java.util.Arrays;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
@Document(collection="posts")
public class GeneralPost {
@Transient
public static final String SEQUENCE_NUMBER = "propets_sequence";
private Long id;
String userLogin;
String userName;
String avatar;
private String text;
@Indexed
private LocalDateTime datePost;
private String[] images;
public GeneralPost(){}
public GeneralPost(Long id, String userLogin, String userName, String avatar, String text, LocalDateTime datePost,
String[] images) {
super();
this.id = id;
this.userLogin = userLogin;
this.userName = userName;
this.avatar = avatar;
this.text = text;
this.datePost = datePost;
this.images = images;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUserLogin() {
return userLogin;
}
public void setUserLogin(String userLogin) {
this.userLogin = userLogin;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public LocalDateTime getDatePost() {
return datePost;
}
public void setDatePost(LocalDateTime datePost) {
this.datePost = datePost;
}
public String[] getImages() {
return images;
}
public void setImages(String[] images) {
this.images = images;
}
@Override
public String toString() {
return "GeneralPost [id=" + id + ", userLogin=" + userLogin + ", userName=" + userName + ", avatar=" + avatar
+ ", text=" + text + ", datePost=" + datePost + ", images=" + Arrays.toString(images) + "]";
}
}
| [
"yakob.markovich@gmail.com"
] | yakob.markovich@gmail.com |
093e5cc30a2960b0b1202d99443eb9f3dbc50cbf | 5b1af347de18604d46af059ac7fad787566a4844 | /src/main/java/com/agenda/api/service/dto/ContactDTO.java | 74dc96a7c1aee619628e13a41e3becc31dae2572 | [] | no_license | mylabdevs/agenda-api | 638ad5829b2d3d61eb538d68b13b2c54161a6be7 | a3ea7d1fad2237a12643e322ee8ad3b8a2693d1a | refs/heads/master | 2021-01-03T09:36:48.486281 | 2020-03-16T16:14:36 | 2020-03-16T16:14:36 | 240,023,969 | 2 | 0 | null | 2020-03-16T16:14:37 | 2020-02-12T13:49:01 | Java | UTF-8 | Java | false | false | 921 | java | package com.agenda.api.service.dto;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.hibernate.validator.constraints.Length;
import com.agenda.api.entity.Contact;
import lombok.Data;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ContactDTO {
private Long id;
@NotNull
@Length(min=3, max = 100, message = "O nome deve conter entre 3 e 50 caracteres")
private String name;
@NotNull
@Length(min=10, max = 100, message = "O telefone deve conter no minimo 9 caracteres")
private String phone;
@Email(message = "Email inválido")
private String email;
private Long userid;
public ContactDTO() {
}
public ContactDTO(Contact c) {
this.id = c.getId();
this.name = c.getName();
this.phone = c.getPhone();
this.email = c.getEmail();
this.userid = c.getUser().getId();
}
}
| [
"jaironsousa@gmail.com"
] | jaironsousa@gmail.com |
7fc984eca22a53f7a8dab68cf3e75b99e80a10eb | 31199675d17d6440c74284c8f9390bef80d2a9dc | /project/week1/StepOneStarterProgram/MovieRunnerAverage.java | 9ebc89b9dcce9676520020012122b3b05ed9f69b | [] | no_license | wrucool/Java-Certification | 1985a5df38a372bea647a6c05e4e4613d2f62c6f | 1f7b332b8717e891dd3145058f941a0a5c228080 | refs/heads/main | 2023-08-15T02:26:04.693614 | 2021-09-28T17:52:02 | 2021-09-28T17:52:02 | 410,988,353 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,443 | java |
import java.util.*;
public class MovieRunnerAverage {
public void printAverageRatings() {
//SecondRatings sr = new SecondRatings("data/ratedmovies_short.csv", "data/ratings_short.csv");
SecondRatings sr = new SecondRatings("data/ratedmoviesfull.csv", "data/ratings.csv");
System.out.println("The number of movies: " + sr.getMovieSize());
System.out.println("The number of raters: " + sr.getRaterSize());
//System.out.println(sr.getAverageByID("0068646", 4));
int minimalRaters =12;
ArrayList<Rating> ratings = sr.getAverageRatings(minimalRaters);
System.out.println(ratings.size());
Collections.sort(ratings);
for(int i=0;i<10;i++)
{
System.out.println(ratings.get(i).getValue() + " " + sr.getTitle(ratings.get(i).getItem()));
}
System.out.println(sr.getID("THE LIFE"));
}
public void getAverageRatingOneMovie() {
SecondRatings sr = new SecondRatings("data/ratedmoviesfull.csv", "data/ratings.csv");
//SecondRatings sr = new SecondRatings("data/ratedmovies_short.csv", "data/ratings_short.csv");
String movieTitle = "Vacation";
String movieID = sr.getID(movieTitle);
int minimalRaters = 0;
ArrayList<Rating> ratings = sr.getAverageRatings(minimalRaters);
for(Rating r: ratings) {
if(r.getItem().equals(movieID))
{
System.out.println("The average rating for the movie \"" + movieTitle + "\" is " + r.getValue());
}
}
}
} | [
"Kulkarniwrushali@gmail.com"
] | Kulkarniwrushali@gmail.com |
a257ba7b83693931823250ef3e35583b4fb569ba | 884056b6a120b2a4c1c1202a4c69b07f59aecc36 | /java projects/jtop/jtopas/versions.alt/orig/v3/src/de/susebox/java/util/PaxHeaders.74544/TokenizerException.java | 04e2668c8d8bd636ed5dc236fbf66fad979e13c3 | [
"MIT"
] | permissive | NazaninBayati/SMBFL | a48b16dbe2577a3324209e026c1b2bf53ee52f55 | 999c4bca166a32571e9f0b1ad99085a5d48550eb | refs/heads/master | 2021-07-17T08:52:42.709856 | 2020-09-07T12:36:11 | 2020-09-07T12:36:11 | 204,252,009 | 3 | 0 | MIT | 2020-01-31T18:22:23 | 2019-08-25T05:47:52 | Java | UTF-8 | Java | false | false | 60 | java | 30 atime=1476297918.526544779
30 ctime=1476297918.528029577
| [
"n.bayati20@gmail.com"
] | n.bayati20@gmail.com |
33bde6b05db11c6957e089404c9b80167bbc32b1 | 8ac74461e4388eaf5745cd7497eea35e0c79eb30 | /android/app/src/main/java/com/humanrace/SplashActivity.java | dad27bbc9405eb7896ea7fc9797adbf6dc3ab437 | [] | no_license | kapilvayuz/Human-Race_Mobile-App | 2bd8a00a24eb71fab4d7aafd4acc11f3195f8b56 | 0cabca094413276f9501dc41db14204d5d989cc9 | refs/heads/main | 2023-02-18T07:38:58.495623 | 2021-01-14T06:48:52 | 2021-01-14T06:48:52 | 329,248,395 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 421 | java | package com.humanrace;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
}
}
| [
"kapilverma0143@gmail.com"
] | kapilverma0143@gmail.com |
bb4c8f0cc91d77610c7c35c64dc0365ea191b100 | 400211f8ba8ee352ce4a63a8c0a768ecf46aca65 | /src/dao/cn/com/atnc/ioms/dao/phonemng/hibernate/AgentInfoDaoImpl.java | 46ff8d5c0649d4c3ccc1f1af53c8ff4cda3a27e9 | [] | no_license | jyf666/IOMS | 76003040489dc8f594c88ff35c07bd77d1447da4 | 6d3c8428c06298bee8d1f056aab7b21d81fd4ce2 | refs/heads/master | 2021-05-10T18:38:37.276724 | 2018-01-19T14:50:34 | 2018-01-19T14:50:34 | 118,130,382 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,577 | java | package cn.com.atnc.ioms.dao.phonemng.hibernate;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Repository;
import cn.com.atnc.ioms.dao.MyBaseDao;
import cn.com.atnc.ioms.dao.phonemng.IAgentInfoDao;
import cn.com.atnc.ioms.entity.phonemng.AgentInformation;
import cn.com.atnc.ioms.entity.phonemng.CallInformation;
import cn.com.atnc.ioms.model.phonemng.AgentQueryModel;
import cn.com.atnc.ioms.model.phonemng.CallInformationQueryModel;
@Repository("IAgentInfoDao")
public class AgentInfoDaoImpl extends MyBaseDao<AgentInformation> implements IAgentInfoDao{
public List<AgentInformation> getAgentState(AgentQueryModel qm) {
StringBuilder hql = new StringBuilder();
hql.append(" from AgentInformation where 1=1 ");
Map<String, Object> params = new HashMap<String, Object>();
hql.append("and agentState=:agentState");
params.put("agentState",qm.getAgentState());
return (List<AgentInformation>) super.queryList(hql.toString(),params);
}
public List<AgentInformation> viewAgentInfoByNumber(AgentQueryModel qm) {
StringBuilder hql = new StringBuilder();
hql.append(" from AgentInformation where 1=1 ");
Map<String, Object> params = new HashMap<String, Object>();
hql.append("and agentinfo=:agentinfo");
params.put("agentinfo",qm.getAgentinfo());
return (List<AgentInformation>) super.queryList(hql.toString(),params);
}
public List<AgentInformation> getAgentInfoByUser(AgentQueryModel qm){
StringBuilder hql = new StringBuilder();
hql.append(" from AgentInformation where 1=1 ");
Map<String, Object> params = new HashMap<String, Object>();
if(!StringUtils.isEmpty(qm.getUsername())){
hql.append("and username=:username");
params.put("username",qm.getUsername());
}
hql.append(" and agentState=:agentState");
params.put("agentState",qm.getAgentState());
return (List<AgentInformation>) super.queryList(hql.toString(),params);
}
public List<AgentInformation> getAgentListByAgent(AgentQueryModel qm){
StringBuilder hql = new StringBuilder();
hql.append(" from AgentInformation where 1=1 ");
Map<String, Object> params = new HashMap<String, Object>();
if(!StringUtils.isEmpty(qm.getAgentinfo())){
hql.append("and agentinfo !=:agentinfo");
params.put("agentinfo",qm.getAgentinfo());
}
hql.append(" order by agentinfo asc ");
return (List<AgentInformation>) super.queryList(hql.toString(),params);
}
}
| [
"1206146862@qq.com"
] | 1206146862@qq.com |
b7307466cd9636f63e6751e690f068eb9b67f5ff | b78f420fb2bb73472eeba6adb614e4d1d28eddbe | /src/com/se/controller/businesslogic/PayStrategy.java | 9501dbec36cd8b175c1dbf4d5c54bb12e632ad4d | [] | no_license | mohamed-dev01/online-pharmacy-se-project-2019 | 082a8a343b77ecaa4f5f72f318bb3b2978e4811b | 30b89a2a71be132f641fe32cc4cf7c97d23b5d16 | refs/heads/master | 2020-04-07T00:23:27.267237 | 2018-12-05T20:55:40 | 2018-12-05T20:55:40 | 157,897,695 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 197 | java | package com.se.controller.businesslogic;
/**
* @author Mohamed Hany
* @version 1.0
* @created 05-Dec-2018 10:14:58 PM
*/
public interface PayStrategy {
public void payBill();
} | [
"mohamed147124@bue.edu.eg"
] | mohamed147124@bue.edu.eg |
5ba9727eabe9cbb26dbdf4e843efe7605d5e9bb2 | 57f32fca4d3af3f35a419c8ceb99b0b55f4977ef | /hw2/src/main/java/ru/otus/hw2/i18n/InternalizationConfig.java | f067ebffd25b8a10c8b4fc858df38732795033ea | [] | no_license | Malamut54/springOtus2019 | 9cfaab56a9cef542a65547176774228403f47176 | c2808ef1a77a82de00cd29244f9d20964f3d4b90 | refs/heads/master | 2020-06-02T10:05:38.670098 | 2019-08-29T08:17:16 | 2019-08-29T08:17:16 | 191,122,464 | 0 | 0 | null | 2019-08-29T08:17:17 | 2019-06-10T07:52:39 | Java | UTF-8 | Java | false | false | 703 | java | package ru.otus.hw2.i18n;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import java.nio.charset.StandardCharsets;
@Configuration
public class InternalizationConfig {
@Bean
public MessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setDefaultEncoding(StandardCharsets.UTF_8.name());
messageSource.setBasename("classpath:/locales/bundle");
return messageSource;
}
}
| [
"bobrov.dmitriy@gmail.com"
] | bobrov.dmitriy@gmail.com |
763a2726a5ca1f3081a6de714a2bc6809e5e6e3f | 58a76c602dfaf55718481ca6f082c787e2c2e95e | /account-service/src/main/java/com/xiangzi/accountservice/service/AccountService.java | 8d6ab93ad9d8212b935ea30e576ed6a8fbd74c5f | [] | no_license | TodayIsSunShine/learn-spring-cloud-alibaba | f999fd6c4f739fee41146e2a412abce89552e116 | 4a57c96b437008265e8b85f45bed06d44b263457 | refs/heads/master | 2023-08-17T10:50:58.272701 | 2021-09-13T08:05:56 | 2021-09-13T08:05:56 | 266,748,995 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 164 | java | package com.xiangzi.accountservice.service;
import java.math.BigDecimal;
public interface AccountService {
Boolean debit(String userId, BigDecimal money);
}
| [
"qianjiu@email.com"
] | qianjiu@email.com |
4e8e061f364d392df9991da4918ee1cdc6c388a9 | be1dcfe0eb6d644d46c2e6b44dbe09909287738f | /src/main/java/br/com/airtongodoy/cursomc/repositories/ProdutoRepository.java | ee3b175a31dffdd1d7802a51af1aa6a137631661 | [] | no_license | airtongodoy/CursoMc | b80195b0b893ca09ed3def0fd5c404c7c0c12109 | 89caa4adf7a833e1834219330b11b68749670eca | refs/heads/master | 2021-04-15T12:46:52.142916 | 2018-04-27T03:16:10 | 2018-04-27T03:16:10 | 126,407,552 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 785 | java | package br.com.airtongodoy.cursomc.repositories;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import br.com.airtongodoy.cursomc.domain.Produto;
@Repository
public interface ProdutoRepository extends JpaRepository<Produto, Integer>{
/*
* Para Fixar:
* Quando faz o extends JpaRepository - Automáticamente temos acesso aos métodos principais de acesso a dados no Banco de Dados
* Não precisamos implementar e criar médotos desta Interface (CategoriaRepository), ja temos o que precisamos
*
* as informações <Produto, Integer>
* Produto representa o Bean a qual este Repository (DAO) irá tratar
* Integer é o Tipo do Atributo ID (Chave definida no Bean com anotação ID) da categoria
*/
}
| [
"dev@airtongodoy.com.br"
] | dev@airtongodoy.com.br |
8b1911e4c901278eb5d21bdfd9395270b98e1131 | c7933d4d31139677636c3242f8a160016f5ffb7e | /KNXLibrary/src/main/java/ch/eiafr/knx/utils/XMLGenerator.java | 1ea0878b546ceb3d96722efdb91788c5d70a8632 | [
"MIT"
] | permissive | heia-fr/wot_gateways | 716b5d5613baeacc610c7e6b018d241aee55a46a | c151c803183597427bd64e015f3cf8bd4a1db912 | refs/heads/master | 2021-01-10T10:40:04.133982 | 2015-05-28T06:25:35 | 2015-05-28T06:25:35 | 36,009,836 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,392 | java | package ch.eiafr.knx.utils;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamSource;
import org.jdom2.Document;
import org.jdom2.input.SAXBuilder;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;
import org.jdom2.transform.JDOMResult;
import org.jdom2.transform.JDOMSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class XMLGenerator {
private static final Logger logger = LoggerFactory
.getLogger(XMLGenerator.class);
/**
* Generate the xml file containing datapoints descriptions
*
* @param p_ETSProjectFile
* The path to the knxproj file
* @param p_TransformFile
* The path to the xsl file
* @param p_OutputFilePath
* The path where the xml file has to be written
* @throws Exception
*/
public static void generateXMLDatapoints(String p_ETSProjectFile,
String p_TransformFile, String p_OutputFilePath) throws Exception {
generateXMLDatapoints(p_ETSProjectFile, new FileInputStream(new File(p_TransformFile)), p_OutputFilePath);
}
/**
* Generate the xml file containing datapoints descriptions
*
* @param p_ETSProjectFile
* The path to the knxproj file
* @param p_TransformFileStream
* The stream to the xsl file
* @param p_OutputFilePath
* The path where the xml file has to be written
* @throws Exception
*/
public static void generateXMLDatapoints(String p_ETSProjectFile,
InputStream p_TransformFile, String p_OutputFilePath) throws Exception {
long startZip = System.currentTimeMillis();
String l_zipPath = unzipETSProject(p_ETSProjectFile);
long stopZip = System.currentTimeMillis();
logger.debug("ZIP Time: " + (stopZip - startZip));
long startXml = System.currentTimeMillis();
generateXML(l_zipPath, p_TransformFile, p_OutputFilePath);
long stopXml = System.currentTimeMillis();
logger.debug("XML Time: " + (stopXml - startXml));
}
/**
* Unzip the ETS project file
*
* @param p_ETSProjectFile
* The path to the knxproj file
* @return The path to the unzipped directory
* @throws Exception
*/
private static String unzipETSProject(String p_ETSProjectFile)
throws Exception {
if (p_ETSProjectFile == null || p_ETSProjectFile.equals("")) {
throw new Exception("The ETS project file is not specified");
}
String l_zipPath = null;
/*
* STEP 1 : Create directory with the name of the zip file
*
* For e.g. if we are going to extract c:/demo.zip create c:/demo
* directory where we can extract all the zip entries
*/
File l_sourceZip = new File(p_ETSProjectFile);
l_zipPath = p_ETSProjectFile
.substring(0, p_ETSProjectFile.length() - 8);
File l_temp = new File(l_zipPath);
l_temp.mkdir();
/*
* STEP 2 : Extract entries while creating required sub-directories
*/
ZipFile l_zipFile = new ZipFile(l_sourceZip);
Enumeration<? extends ZipEntry> l_entries = l_zipFile.entries();
while (l_entries.hasMoreElements()) {
ZipEntry l_entry = (ZipEntry) l_entries.nextElement();
File l_destinationFilePath = new File(l_zipPath, l_entry.getName());
// create directories if required.
l_destinationFilePath.getParentFile().mkdirs();
// if the entry is directory, leave it. Otherwise extract it.
if (l_entry.isDirectory()) {
continue;
} else {
/*
* Get the InputStream for current entry of the zip file using
*
* InputStream getInputStream(Entry entry) method.
*/
BufferedInputStream l_bis = new BufferedInputStream(
l_zipFile.getInputStream(l_entry));
int b;
byte l_buffer[] = new byte[1024];
/*
* read the current entry from the zip file, extract it and
* write the extracted file.
*/
FileOutputStream l_fos = new FileOutputStream(
l_destinationFilePath);
BufferedOutputStream l_bos = new BufferedOutputStream(l_fos,
1024);
while ((b = l_bis.read(l_buffer, 0, 1024)) != -1) {
l_bos.write(l_buffer, 0, b);
}
// flush the output stream and close it.
l_bos.flush();
l_bos.close();
// close the input stream.
l_bis.close();
}
}
return l_zipPath;
}
/**
* Do the xsl transformation
*
* @param p_KNXProjectPath
* The path to the unzipped project
* @param p_TransformFile
* The stream to the xsl file
* @param p_OutputFilePath
* The path where the xml file has to be written
* @throws Exception
*/
private static void generateXML(String p_KNXProjectPath,
InputStream p_TransformFile, String p_OutputFilePath) throws Exception {
// Find the P-**** directory
File l_path = new File(p_KNXProjectPath);
File[] l_dirs = l_path.listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
if (pathname.isDirectory()
&& pathname.getName().startsWith("P-"))
return true;
return false;
}
});
if (l_dirs.length == 0)
throw new Exception("Config file 0.xml not found");
JDOMResult l_documentResult = new JDOMResult();
Document l_document = null;
long first = System.currentTimeMillis();
// Copy the xsl file into the KNX project directory
copyfile(p_TransformFile, p_KNXProjectPath + "/KNXTransformer.xsl");
// Load the xsl file to create a transformer
TransformerFactory l_factory = TransformerFactory.newInstance();
Transformer l_transformer = l_factory.newTransformer(new StreamSource(
p_KNXProjectPath + "/KNXTransformer.xsl"));
long second = System.currentTimeMillis();
logger.debug("Load xsl " + (second - first));
// Load the source xml document
SAXBuilder l_sax = new SAXBuilder();
Document l_input = l_sax.build(new File(l_dirs[0].getAbsolutePath()
+ "/0.xml"));
long third = System.currentTimeMillis();
logger.debug("Load xml " + (third - second));
l_transformer.transform(new JDOMSource(l_input), l_documentResult);
long fourth = System.currentTimeMillis();
logger.debug("Transform xsl " + (fourth - third));
// Write the result into the destination file
l_document = l_documentResult.getDocument();
XMLOutputter l_outputter = new XMLOutputter(Format.getPrettyFormat());
l_outputter.output(l_document, new FileOutputStream(p_OutputFilePath));
long fifth = System.currentTimeMillis();
logger.debug("Write output " + (fifth - fourth));
}
private static void copyfile(String srFile, String dtFile)
throws IOException {
copyfile(new FileInputStream(new File(srFile)), dtFile);
}
private static void copyfile(InputStream in, String dtFile)
throws IOException {
File f2 = new File(dtFile);
// For Append the file.
// OutputStream out = new FileOutputStream(f2,true);
// For Overwrite the file.
OutputStream out = new FileOutputStream(f2);
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
System.out.println("File copied.");
}
}
| [
"gerome.bovet@hefr.ch"
] | gerome.bovet@hefr.ch |
b99818454ee464667e032ef97576873748c5c6e3 | a6cb7eafd7f0eeed9acb2e896bf04b3fbe8f915b | /app/src/test/java/com/example/faisal/blackjack/PlayerTest.java | b87c6cf7a534dde45c5ae2e7996ecd6bb8b0400d | [] | no_license | Faisal2017/blackjack_android | 03b0f6f48d99514cb7316018f24a2193c7db1f4a | c4de2cb0af048b545013515768dfb9fc19837e20 | refs/heads/master | 2020-06-26T08:18:05.406678 | 2017-07-12T19:44:47 | 2017-07-12T19:44:47 | 97,010,193 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 415 | java | package com.example.faisal.blackjack;
import static org.junit.Assert.*;
import org.junit.*;
import java.util.ArrayList;
/**
* Created by Faisal on 12/07/2017.
*/
public class PlayerTest {
private Player player;
@Before
public void Before() {
player = new Player("Player One");
}
@Test
public void testhasName() {
assertEquals("Player One", player.getName());
}
}
| [
"faisal_a@live.co.uk"
] | faisal_a@live.co.uk |
5d1b67ae6e5dbc4cc495194d4df7e6f6604174a4 | 99cd08ed416718eb0d634f131e13295b43f55edd | /wear/src/main/java/com/example/niels/healthcompanion/Stub_pas.java | 1131fb35f22394ffecbc411f58090281e435c7ef | [] | no_license | Nes280/HealthCompanion | 1fafe9847009f3310ab5140de3c0bdf25b174385 | 493f0fe1d86c5b01c332e33825109d804dc58dfc | refs/heads/master | 2021-01-12T06:35:03.912699 | 2017-01-25T15:31:05 | 2017-01-25T15:31:05 | 77,389,432 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 572 | java | package com.example.niels.healthcompanion;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
/**
* Created by S-Setsuna-F on 23/01/2017.
*/
public class Stub_pas extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent i = new Intent();
i.setAction("com.example.niels.healthcompanion.SHOW_NOTIFICATION");
i.putExtra(Receiver_pas.CONTENT_KEY, getString(R.string.title));
sendBroadcast(i);
finish();
}
}
| [
"sofien.benharchache@icloud.com"
] | sofien.benharchache@icloud.com |
0b762c3ed09d0c6bca31068d9965a1542a7732ad | 3316140f58fdea8c0fe6eefc611fe55c4b1a7e57 | /xwiki-platform-core/xwiki-platform-wikistream/xwiki-platform-wikistream-api/src/main/java/org/xwiki/wikistream/internal/output/DefaultOutputStreamOutputTarget.java | 41c68db3fe4145872de54adfc5f3954e7def2489 | [] | no_license | lqbilbo/xwiki-platform | bfb4d621abfee58fb3a2c4d8190a2834fc5001db | cedcb4d023e8eb06c85bb321661ae5a45f9d1479 | refs/heads/master | 2021-01-18T02:39:07.212256 | 2013-09-11T16:26:34 | 2013-09-11T16:26:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,687 | java | /*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.xwiki.wikistream.internal.output;
import java.io.IOException;
import java.io.OutputStream;
import org.xwiki.wikistream.output.OutputStreamOutputTarget;
/**
*
* @version $Id$
* @since 5.2M2
*/
public class DefaultOutputStreamOutputTarget implements OutputStreamOutputTarget
{
private final OutputStream outputStream;
public DefaultOutputStreamOutputTarget(OutputStream outputStream)
{
this.outputStream = outputStream;
}
public OutputStream getOutputStream()
{
return this.outputStream;
}
@Override
public void close() throws IOException
{
// Closing the stream is the responsibility of the caller
}
@Override
public String toString()
{
return this.outputStream.toString();
}
}
| [
"thomas.mortagne@gmail.com"
] | thomas.mortagne@gmail.com |
09ac76ba544aa56e8253b879e72cd047f77e8190 | 471f9c02ae78e1af581b3247115d2d1e28a87284 | /src/day56_abstraction/greeting/GreetingActions.java | 8ddeb1de141fad2996a5da6538bb4416898af283 | [] | no_license | rovshanAliyev/Java-programming102 | cc1d9894b380b26f5b8ca83dcdd48531e1939272 | 84bdd81c4186d9afa5ed37d733a8fe34a1216ce0 | refs/heads/master | 2023-06-22T18:28:33.875746 | 2021-07-20T20:48:51 | 2021-07-20T20:48:51 | 372,307,845 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 463 | java | package day56_abstraction.greeting;
public class GreetingActions {
public static void main(String[] args) {
AzerbaijanLanguage az = new AzerbaijanLanguage();
az.hi();
az.bye();
Greeting az2 = new AzerbaijanLanguage();
az2.hi();
az2.bye();
RussianLanguage rl = new RussianLanguage();
rl.hi();
rl.bye();
az2 = new RussianLanguage();
az2.hi();
az2.bye();
}
}
| [
"raliyev831@yahoo.com"
] | raliyev831@yahoo.com |
04d28efb1cd29cc909b0091d166b5d818b82895a | 6af751e80fcf9c07a4090f3aba7249fda74fb50d | /Java/src/de/apps/brewmaster/user_interface/control/MainUIController.java | fc1921a55c75445e98200007d4ec882447e8c8ad | [] | no_license | cknorr1/BrewMaster | 7dde9c86d06bed1e2574163bb6ee0746df3cbd21 | a9b0f232432664e997815594b603dbdf257acf87 | refs/heads/master | 2021-04-29T17:50:17.753908 | 2018-02-15T20:38:01 | 2018-02-15T20:38:01 | 121,679,150 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,317 | java | package de.apps.brewmaster.user_interface.control;
import java.awt.SplashScreen;
import java.io.IOException;
import java.net.URL;
import java.util.Random;
import java.util.ResourceBundle;
import java.util.Timer;
import java.util.TimerTask;
import de.apps.brewmaster.BrewMasterApplication;
import de.apps.brewmaster.hardware.SerialPortController;
import de.apps.brewmaster.user_interface.control.custom.DrinkPopUpController;
import de.apps.brewmaster.user_interface.control.custom.TemperatureLiveChart;
import de.apps.brewmaster.user_interface.control.step.BrewRecipeTreeView;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
/**
* Controls the main GUI of BrewMaster.
*
* @author Alexander Rohlfing(Original author)
*
*/
public final class MainUIController implements Initializable {
private class DrinkPopUpPresenter extends TimerTask {
@Override
public void run() {
Platform.runLater(new Runnable() {
@Override
public void run() {
new DrinkPopUpController().showAndWait();
timer.schedule(new DrinkPopUpPresenter(), getNextRandomTime());
}
});
}
}
/**
* FXML file name containing the static visible structure for the controlled
* GUI.
*/
private static final String fxmlName = "MainUI.fxml";
/**
* The unique singleton instance of this class.
*/
private static final MainUIController instance = new MainUIController();
private static final int SECONDS_CONST = 1000;
private static final int MINUTE_CONST = 60;
private static final int MIN_TIME = 10 * SECONDS_CONST * MINUTE_CONST;
private static final int MAX_TIME = 30 * SECONDS_CONST * MINUTE_CONST;
/**
* Returns the unique instance of this class.
*
* @return instance the unique {@code MainUIController}
*/
public static MainUIController getInstance() {
return instance;
}
// private final long startTime;
/**
* Root pane containing all {@code Controls}.
*/
@FXML
private AnchorPane rootPane;
@FXML
private TabPane tabPane;
@FXML
private Tab liveDataTab;
@FXML
private Tab brewStepTab;
/**
* The current {@code Stage}.
*/
private Stage stage;
private final Timer timer;
/**
* Private constructor to restrict access.
*/
private MainUIController() {
// Load FXML file for Main GUI
final FXMLLoader fxmlLoader = new FXMLLoader(
getClass().getResource(BrewMasterApplication.userInterfacePath + fxmlName));
fxmlLoader.setController(this);
try {
rootPane = fxmlLoader.load();
} catch (final IOException e) {
e.printStackTrace();
}
// rootPane.getStyleClass().add("pane");
// rootPane.getStylesheets().add(getClass().getResource("css/brew-step-tree.css").toExternalForm());
final String portName = "/dev/ttyS80";
final int baudRate = 115200;
SerialPortController.getInstance().connect(portName, baudRate);
timer = new Timer(true);
initRandomDrinkPopup();
}
private long getNextRandomTime() {
final Random random = new Random();
final long randomTime = MIN_TIME + random.nextInt(MAX_TIME - MIN_TIME);
System.out.println("waiting time: " + randomTime / 1000 / 60 + " min");
return randomTime;
}
public final Pane getRootPane() {
return rootPane;
}
private void initBrewStepTree() {
final BrewRecipeTreeView tree = new BrewRecipeTreeView();
brewStepTab.setContent(tree);
}
@Override
public void initialize(final URL location, final ResourceBundle resources) {
// Get the splashscreen
final SplashScreen splash = SplashScreen.getSplashScreen();
initTemperatureLiveChart();
initBrewStepTree();
// Close splashscreen
if (splash != null) {
splash.close();
}
}
private void initRandomDrinkPopup() {
timer.schedule(new DrinkPopUpPresenter(), getNextRandomTime());
}
private void initTemperatureLiveChart() {
liveDataTab.setContent(new TemperatureLiveChart());
}
public final void setStage(final Stage stage) {
this.stage = stage;
}
}
| [
"cknorr@mail.uni-paderborn.de"
] | cknorr@mail.uni-paderborn.de |
171a11c5df4d68cf53f474cf802847603693b5f2 | 0a14febd892e7c30f20fcaf9e3a8e2a98498bd6f | /tests/BinaryTrees/GenBinaryTreesTest.java | 23dc7edcdaed66548073f324b40943aac9fdcfd6 | [] | no_license | einez/codingGuideNotes | 46bac8ecb846477e62493dd731056b0ebf77650c | db96157aaec0d83fc7af7919d4c13c54195d7109 | refs/heads/master | 2021-01-20T13:13:26.560880 | 2017-09-08T03:40:08 | 2017-09-08T03:40:08 | 101,739,536 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 586 | java | package BinaryTrees;
import org.junit.Test;
import static BinaryTrees.GenBinaryTrees.genBinaryTree;
import static org.junit.Assert.*;
/**
* Created by einez on 8/11/2017.
*/
public class GenBinaryTreesTest {
@Test
public void printTree() throws Exception {
GenBinaryTrees.TreeNode node=genBinaryTree(3);
System.out.println(node);
System.out.println(GenBinaryTrees.printTree(node));
}
@Test
public void genBinaryTreeTest() throws Exception {
GenBinaryTrees.TreeNode node=genBinaryTree(3);
System.out.print(node);
}
} | [
"1.0eine.z@gmail.com"
] | 1.0eine.z@gmail.com |
0ce777ef058c5d3509fe150f4f06a704c7999052 | 043f48e0653cc765d0a2b02b9a1276f0caec295f | /javaprogramming_before_specialisation/week8programming/Week8/reflectionWeek8/ThermostatTest.java | 429c85629044349d146f87d37c8c9f01c85d0cb3 | [] | no_license | BartvaiErika/i4-backend | bfb9a3f9ffeae9c7dce875f6199e5303967bcbe7 | b7c751ad2cf7077e07a570ba5363b593da4700c5 | refs/heads/master | 2020-04-23T23:58:40.006446 | 2019-05-24T08:27:05 | 2019-05-24T08:27:05 | 171,551,423 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,069 | java | //package Week8.reflectionWeek8;
//
//import org.junit.jupiter.api.Assertions;
//import org.junit.jupiter.api.Test;
//
//class ThermostatTest {
// private Thermostat thermostat = new Thermostat(temp -> temp < 0, temp -> temp + " degrees Celsius.");
// private Thermostat thermostat2 = new Thermostat(temp -> temp >= 80, temp -> (temp + 273.15) + " degrees Kelvin.");
//
// @Test
// void testCold() {
// String message = thermostat.sense(12.3);
// String expected = "12.3 degrees Celsius.";
// Assertions.assertEquals(expected,message);
//
// message = thermostat.sense(-3.0);
// expected = "Warning!";
// Assertions.assertEquals(expected,message);
// }
//
// @Test
// void testHot() {
// String message = thermostat.sense(79.0);
// String expected = "Temperature is 352.15 degrees Kelvin.";
// Assertions.assertEquals(expected,message);
//
// message = thermostat.sense(80.0);
// expected = "Warning!";
// Assertions.assertEquals(expected,message);
// }
//}
//
| [
"erika.bartvai@gmail.com"
] | erika.bartvai@gmail.com |
cc89ed3a29f1441d46725868ecfc74f882c76d7a | 4397b4dd7923f2eae1dffae14268e604f2af8346 | /src/main/java/com/panda/dubboController/MenuController.java | 75d127bbc5e647815ab6cc294fa39fc0eb0da2c5 | [] | no_license | 196712yuxin/pandaweb | 8e28ea5fca05e3885008d68ad7fe9b2627c6cd06 | 639cbaada9782b6a5b0a529b0e153d90fa1e4f55 | refs/heads/master | 2020-05-22T13:12:50.437376 | 2019-05-13T05:53:24 | 2019-05-13T05:53:24 | 186,354,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,644 | java | package com.panda.dubboController;
import com.alibaba.dubbo.config.annotation.Reference;
import com.panda.framework.aspectj.lang.annotation.Log;
import com.panda.framework.aspectj.lang.enums.BusinessType;
import com.panda.framework.web.controller.BaseController;
import com.panda.framework.web.domain.AjaxResult;
import com.panda.project.dubboService.IMenuDubboService;
import com.panda.project.system.menu.domain.Menu;
import com.panda.project.system.menu.service.IMenuService;
import com.panda.project.system.role.domain.Role;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 菜单信息
*
* @author panda
*/
@Controller
@RequestMapping("/system/menu")
public class MenuController extends BaseController
{
private String prefix = "system/menu";
@Reference(version = "0.0.0")
private IMenuDubboService menuService;
@RequiresPermissions("system:menu:view")
@GetMapping()
public String menu()
{
return prefix + "/menu";
}
@RequiresPermissions("system:menu:list")
@GetMapping("/list")
@ResponseBody
public List<Menu> list(Menu menu)
{
List<Menu> menuList = menuService.selectMenuList(menu);
return menuList;
}
/**
* 删除菜单
*/
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
@RequiresPermissions("system:menu:remove")
@PostMapping("/remove/{menuId}")
@ResponseBody
public AjaxResult remove(@PathVariable("menuId") Long menuId)
{
if (menuService.selectCountMenuByParentId(menuId) > 0)
{
return error(1, "存在子菜单,不允许删除");
}
if (menuService.selectCountRoleMenuByMenuId(menuId) > 0)
{
return error(1, "菜单已分配,不允许删除");
}
return toAjax(menuService.deleteMenuById(menuId));
}
/**
* 新增
*/
@GetMapping("/add/{parentId}")
public String add(@PathVariable("parentId") Long parentId, ModelMap mmap)
{
Menu menu = null;
if (0L != parentId)
{
menu = menuService.selectMenuById(parentId);
}
else
{
menu = new Menu();
menu.setMenuId(0L);
menu.setMenuName("主目录");
}
mmap.put("menu", menu);
return prefix + "/add";
}
/**
* 新增保存菜单
*/
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
@RequiresPermissions("system:menu:add")
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(Menu menu)
{
return toAjax(menuService.insertMenu(menu));
}
/**
* 修改菜单
*/
@GetMapping("/edit/{menuId}")
public String edit(@PathVariable("menuId") Long menuId, ModelMap mmap)
{
mmap.put("menu", menuService.selectMenuById(menuId));
return prefix + "/edit";
}
/**
* 修改保存菜单
*/
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
@RequiresPermissions("system:menu:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(Menu menu)
{
return toAjax(menuService.updateMenu(menu));
}
/**
* 选择菜单图标
*/
@GetMapping("/icon")
public String icon()
{
return prefix + "/icon";
}
/**
* 校验菜单名称
*/
@PostMapping("/checkMenuNameUnique")
@ResponseBody
public String checkMenuNameUnique(Menu menu)
{
return menuService.checkMenuNameUnique(menu);
}
/**
* 加载角色菜单列表树
*/
@GetMapping("/roleMenuTreeData")
@ResponseBody
public List<Map<String, Object>> roleMenuTreeData(Role role)
{
List<Map<String, Object>> tree = menuService.roleMenuTreeData(role);
return tree;
}
/**
* 加载所有菜单列表树
*/
@GetMapping("/menuTreeData")
@ResponseBody
public List<Map<String, Object>> menuTreeData(Role role)
{
List<Map<String, Object>> tree = menuService.menuTreeData();
return tree;
}
/**
* 选择菜单树
*/
@GetMapping("/selectMenuTree/{menuId}")
public String selectMenuTree(@PathVariable("menuId") Long menuId, ModelMap mmap)
{
mmap.put("menu", menuService.selectMenuById(menuId));
return prefix + "/tree";
}
} | [
"yuxin196712"
] | yuxin196712 |
bcf6ea6f7a768b8a82fc9d1ee9ec95746226ce53 | e70abc02efbb8a7637eb3655f287b0a409cfa23b | /hyjf-mybatis/src/main/java/com/hyjf/mybatis/mapper/auto/ParamNameMapper.java | 84fd3ab743ecae32aadb76bb79f28b098d908563 | [] | no_license | WangYouzheng1994/hyjf | ecb221560460e30439f6915574251266c1a49042 | 6cbc76c109675bb1f120737f29a786fea69852fc | refs/heads/master | 2023-05-12T03:29:02.563411 | 2020-05-19T13:49:56 | 2020-05-19T13:49:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 958 | java | package com.hyjf.mybatis.mapper.auto;
import com.hyjf.mybatis.model.auto.ParamName;
import com.hyjf.mybatis.model.auto.ParamNameExample;
import com.hyjf.mybatis.model.auto.ParamNameKey;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ParamNameMapper {
int countByExample(ParamNameExample example);
int deleteByExample(ParamNameExample example);
int deleteByPrimaryKey(ParamNameKey key);
int insert(ParamName record);
int insertSelective(ParamName record);
List<ParamName> selectByExample(ParamNameExample example);
ParamName selectByPrimaryKey(ParamNameKey key);
int updateByExampleSelective(@Param("record") ParamName record, @Param("example") ParamNameExample example);
int updateByExample(@Param("record") ParamName record, @Param("example") ParamNameExample example);
int updateByPrimaryKeySelective(ParamName record);
int updateByPrimaryKey(ParamName record);
} | [
"heshuying@hyjf.com"
] | heshuying@hyjf.com |
262b62c785dcb0fe5ed39e23be38e6f7fb00f117 | 8046669cb438028b245629adeb6b84894fb051d9 | /Securiiitb/app/src/test/java/com/example/urja/securiiitb/ExampleUnitTest.java | e34cf0c60ffbbb9236798ed57766ddd3926b50d8 | [] | no_license | urjakothari/SecuredDecenteralizedTimestamp_Blockchain | 38ceb09e452a254cb0057c6af9a06725b5e6e72b | 2c22861c40a1ea64354b889e792450109b9a658e | refs/heads/master | 2020-03-09T01:30:01.514118 | 2018-04-25T08:24:43 | 2018-04-25T08:24:43 | 128,516,176 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 405 | java | package com.example.urja.securiiitb;
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);
}
} | [
"urjakothari5@gmail.com"
] | urjakothari5@gmail.com |
bf73dd1fbbfcb1d305b5a5a1b85bb78a44433b73 | 3b1120b2d246f999ce903d5b83967f5ff49299c7 | /src/test2.java | d6e458373c805bda75deda3b8226174c7daa76d3 | [] | no_license | nizamra/Learn_to_Program_in_Java | c18d74fad0c8a558f29ae32734560d1120e7722c | f0b3f52d0e51b2fc1cd82d30921a5c73cfe6ed40 | refs/heads/master | 2020-04-09T20:28:09.514749 | 2018-12-05T20:28:07 | 2018-12-05T20:28:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,116 | java | public class test2 {
/* public static void mystery(String foo, String bar, String zazz) {
System.out.println(zazz + " and " + foo + " like " + bar);
}
public static void main(String[] args) {
String foo = "peanuts";
String bar = "foo";
mystery(bar, foo, "John");
}
public static void main(String[] args) {
int x = 3;
doubleMe(x);
System.out.println("x doubled is " + x);
}
public static void doubleMe(int x) {
x = x * 2;
}
public static String makeFancy(String s) {
if (s.length() == 0) {
return "*";
}
return "*" + s.substring(0,1) + makeFancy(s.substring(0, s.length()-1));
}*/
public static void main(String[] args) {
//puzzle(22, 11);
//System.out.println(makeFancy("JAVA"));
System.out.println(puzzle(22, 11));
}
public static int puzzle(int i, int j) {
if (i == j) {
return 0;
} else {
return 1 + puzzle(i - 2, j - 1);
}
}
}
| [
"nizamra_95@hotmail.com"
] | nizamra_95@hotmail.com |
387ebe84b2d23e8fde9edbb15b4c361ad76cb63b | ea73bae10cad2b7f064ab7f81f27765c57e1cb0e | /helper/helper-common/src/main/java/com/linkedin/avroutil1/compatibility/SchemaValidator.java | 5084ff47fc3000228dfafc3ae113840f59a987de | [
"Apache-2.0",
"BSD-2-Clause"
] | permissive | majisourav99/li-avro-util | 3e34286409e00e3599404e9cef7b736a2e8717c4 | 1eb79315ae432a9365321f10b34ca0e1e2dce21e | refs/heads/master | 2021-05-24T16:28:17.025593 | 2020-04-04T03:56:13 | 2020-04-04T04:41:29 | 253,655,654 | 1 | 0 | BSD-2-Clause | 2020-04-07T01:46:39 | 2020-04-07T01:22:52 | Java | UTF-8 | Java | false | false | 6,286 | java | /*
* Copyright 2020 LinkedIn Corp.
* Licensed under the BSD 2-Clause License (the "License").
* See License in the project root for license information.
*/
package com.linkedin.avroutil1.compatibility;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import org.apache.avro.AvroTypeException;
import org.apache.avro.Schema;
import org.apache.avro.SchemaParseException;
import org.codehaus.jackson.JsonNode;
/**
* a utility class that (in combination with {@link AvroSchemaUtil#traverseSchema(Schema, SchemaVisitor)})
* can validate avro schemas vs the avro specification. <br>
* this class exists because historically avro has been very bad at validating its own specification
* and this allows proper validation under older (<1.9) versions of avro
*/
public class SchemaValidator implements SchemaVisitor {
private final static Set<Schema.Type> NAMED_TYPES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
Schema.Type.RECORD,
Schema.Type.ENUM,
Schema.Type.FIXED
)));
// private final static Pattern VALID_NAME_PATTERN = Pattern.compile("[A-Za-z_](A-Za-z0-9_)*");
private final SchemaParseConfiguration validationSpec;
private final Collection<Schema> grandfathered;
/**
* constructs a new validator
* @param validationSpec determines what should be validated
* @param grandfathered a set of schemas to be excluded from validation (if encountered)
*/
public SchemaValidator(SchemaParseConfiguration validationSpec, Collection<Schema> grandfathered) {
if (validationSpec == null) {
throw new IllegalArgumentException("validationSpec required");
}
this.validationSpec = validationSpec;
this.grandfathered = grandfathered != null && !grandfathered.isEmpty() ? grandfathered : Collections.emptySet();
}
@Override
public void visitSchema(Schema schema) {
if (grandfathered.contains(schema)) {
return;
}
if (!validationSpec.validateNames()) {
return;
}
Schema.Type type = schema.getType();
if (!NAMED_TYPES.contains(type)) {
return;
}
//TODO - avro only validates the SIMPLE name, so for now so do we.
//see https://issues.apache.org/jira/browse/AVRO-2742
String simpleName = schema.getName();
validateName(simpleName, " in " + type.name().toLowerCase(Locale.ROOT) + " " + schema.getFullName());
if (type == Schema.Type.ENUM) {
List<String> symbols = schema.getEnumSymbols();
for (String symbol : symbols) {
validateName(symbol, " in " + type.name().toLowerCase(Locale.ROOT) + " " + schema.getFullName());
}
}
}
@Override
public void visitField(Schema parent, Schema.Field field) {
if (grandfathered.contains(parent)) {
return;
}
if (validationSpec.validateNames()) {
String fieldName = field.name();
validateName(fieldName, " in field " + parent.getFullName() + "." + fieldName);
}
JsonNode defaultValue = field.defaultValue();
if (validationSpec.validateDefaultValues() && defaultValue != null) {
Schema fieldSchema = field.schema();
boolean validDefault = isValidDefault(fieldSchema, defaultValue);
if (!validDefault) {
//throw ~the same exception avro would
String message = "Invalid default for field " + parent.getFullName() + "." + field.name() + ": "
+ defaultValue + " not a " + fieldSchema;
throw new AvroTypeException(message);
}
}
}
/**
* validation logic taken out of class {@link Schema} with adaptations
* @param name name to be validated
* @throws SchemaParseException is name is invalid
*/
private static void validateName(String name, String suffix) {
int length = name.length();
if (length == 0) {
throw new SchemaParseException("Empty name" + suffix);
}
char first = name.charAt(0);
if (!(Character.isLetter(first) || first == '_')) {
throw new SchemaParseException("Illegal initial character: " + name + suffix);
}
for (int i = 1; i < length; i++) {
char c = name.charAt(i);
if (!(Character.isLetterOrDigit(c) || c == '_')) {
throw new SchemaParseException("Illegal character in: " + name + " ('" + c + "' at position " + i + ")" + suffix);
}
}
}
/**
* validation logic taken out of class {@link Schema} with adaptations
* @param schema schema (type) of a field
* @param defaultValue default value provided for said field in the parent schema
* @throws SchemaParseException is name is invalid
*/
private static boolean isValidDefault(Schema schema, JsonNode defaultValue) {
if (defaultValue == null) {
return false;
}
switch (schema.getType()) {
case STRING:
case BYTES:
case ENUM:
case FIXED:
return defaultValue.isTextual();
case INT:
case LONG:
case FLOAT:
case DOUBLE:
return defaultValue.isNumber();
case BOOLEAN:
return defaultValue.isBoolean();
case NULL:
return defaultValue.isNull();
case ARRAY:
if (!defaultValue.isArray()) {
return false;
}
for (JsonNode element : defaultValue) {
if (!isValidDefault(schema.getElementType(), element)) {
return false;
}
}
return true;
case MAP:
if (!defaultValue.isObject()) {
return false;
}
for (JsonNode value : defaultValue) {
if (!isValidDefault(schema.getValueType(), value)) {
return false;
}
}
return true;
case UNION: // union default: first branch
return isValidDefault(schema.getTypes().get(0), defaultValue);
case RECORD:
if (!defaultValue.isObject()) {
return false;
}
for (Schema.Field field : schema.getFields()) {
if (!isValidDefault(
field.schema(),
defaultValue.get(field.name()) != null ? defaultValue.get(field.name()) : field.defaultValue()
)) {
return false;
}
}
return true;
default:
return false;
}
}
}
| [
"noreply@github.com"
] | majisourav99.noreply@github.com |
7b5c8eff833707bbc76772f2f31e0474ca00660f | 00c2f33e037ad6c4bb2d6d916d45adfc94c520ae | /src/main/java/com/database/KnowledgeArea.java | 528cc90eb728c9ee321c2fbf2a8d93743cd43a13 | [] | no_license | Zoxir86/Ethelon_Project | 0317b83fc7ce37f75cb111c70091eb5622e695cb | c56e6c6f6343dd57a9ccfabe9ee0be2e729bc8ed | refs/heads/master | 2021-04-15T05:09:38.723847 | 2018-06-20T11:21:46 | 2018-06-20T11:21:46 | 126,374,631 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,174 | java | package com.database;
import javax.persistence.*;
@Table(name = "knowledgeArea")
@Entity(name="KnowledgeArea")
public class KnowledgeArea {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "Id", updatable = false, nullable = false) // A unique identification number in the database.
private int knowledgeAreaID;
@Column(name="DescriptionGreekUpperCase") // A string describing the Interest (greek, upper case).
private String descriptionGreekUpperCase = null;
@Column(name="DescriptionEnglishUpperCase") // A string describing the Interest (english, upper case).
private String descriptionEnglishUpperCase = null;
@Column(name="DescriptionGreekLowerCase") // A string describing the Interest (greek, lower case).
private String descriptionGreekLowerCase = null;
@Column(name="DescriptionEnglishLowerCase") // A string describing the Interest (english, lower case).
private String descriptionEnglishLowerCase = null;
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Constructors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public KnowledgeArea( ) {
super();
}
public KnowledgeArea(String descriptionGreekUpperCase, String descriptionEnglishUpperCase, String descriptionGreekLowerCase, String descriptionEnglishLowerCase) {
this.descriptionGreekUpperCase = descriptionGreekUpperCase;
this.descriptionEnglishUpperCase = descriptionEnglishUpperCase;
this.descriptionGreekLowerCase = descriptionGreekLowerCase;
this.descriptionEnglishLowerCase = descriptionEnglishLowerCase;
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public int getKnowledgeAreaID() {
return knowledgeAreaID;
}
public void setKnowledgeAreaID(int knowledgeAreaID) {
this.knowledgeAreaID = knowledgeAreaID;
}
public String getDescriptionGreekUpperCase() {
return descriptionGreekUpperCase;
}
public void setDescriptionGreekUpperCase(String descriptionGreekUpperCase) {
this.descriptionGreekUpperCase = descriptionGreekUpperCase;
}
public String getDescriptionEnglishUpperCase() {
return descriptionEnglishUpperCase;
}
public void setDescriptionEnglishUpperCase(String descriptionEnglishUpperCase) {
this.descriptionEnglishUpperCase = descriptionEnglishUpperCase;
}
public String getDescriptionGreekLowerCase() {
return descriptionGreekLowerCase;
}
public void setDescriptionGreekLowerCase(String descriptionGreekLowerCase) {
this.descriptionGreekLowerCase = descriptionGreekLowerCase;
}
public String getDescriptionEnglishLowerCase() {
return descriptionEnglishLowerCase;
}
public void setDescriptionEnglishLowerCase(String descriptionEnglishLowerCase) {
this.descriptionEnglishLowerCase = descriptionEnglishLowerCase;
}
}
| [
"a.despotopoulou@gmail.com"
] | a.despotopoulou@gmail.com |
dacd34582c962b4ef3ff9e0ea3f7ebe98e25e767 | dacae558f2f05204b02098492977ea17e43d3696 | /src/main/java/com/baoxue/concurrent/java7/chapter1/ch11/Task.java | 9dd5051e1dce22485f111caf4d8a86664a6c60bb | [] | no_license | pyhq2008/Java_Expert | 73cc4b882d45d9b0c57dc0a272a6467f18d5005d | 8a8d9d6706a3d606d9cc9318c1c1b624452d9456 | refs/heads/master | 2020-04-05T23:44:09.578930 | 2016-10-30T05:45:53 | 2016-10-30T05:45:53 | 25,616,288 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 731 | java | package com.baoxue.concurrent.java7.chapter1.ch11;
import java.util.Random;
/**
* Class that implements the concurrent task
*
*/
public class Task implements Runnable {
@Override
public void run() {
int result;
// Create a random number generator
Random random=new Random(Thread.currentThread().getId());
while (true) {
// Generate a random number a calculate 1000 divide by that random number
result=1000/((int)(random.nextInt()*1000));
System.out.printf("%s : %f\n",Thread.currentThread().getId(),result);
// Check if the Thread has been interrupted
if (Thread.currentThread().isInterrupted()) {
System.out.printf("%d : Interrupted\n",Thread.currentThread().getId());
return;
}
}
}
}
| [
"pyhq2006@126.com"
] | pyhq2006@126.com |
0d1308a28b85dbd88674bc3e12dcba9829d696bb | aaeef81ca196b5c58d63536ada4ca04eaa046d16 | /ipv-core/src/main/java/com/ibm/whc/deid/etl/objects/RandomReplacement.java | 74411165df16a2fae71808dfb03c0ad8d5046dc2 | [
"Apache-2.0"
] | permissive | de-identification/de-identification | 0083b66fa70903a79b9d369f791f93dfbf6ceee5 | 241e8710d7d24c9e0163b12a27373a6513218c41 | refs/heads/master | 2023-01-14T08:57:28.075658 | 2020-11-10T23:16:27 | 2020-11-11T16:10:29 | 311,763,874 | 0 | 1 | Apache-2.0 | 2020-11-11T16:10:31 | 2020-11-10T19:30:50 | null | UTF-8 | Java | false | false | 1,005 | java | /*
* (C) Copyright IBM Corp. 2016,2020
*
* SPDX-License-Identifier: Apache-2.0
*/
package com.ibm.whc.deid.etl.objects;
import com.ibm.whc.deid.etl.PipelineObject;
import com.ibm.whc.deid.util.RandomGenerators;
import com.ibm.whc.deid.util.Tuple;
public class RandomReplacement implements PipelineObject {
private final int offset;
private final int depth;
/**
* Instantiates a new Random replacement.
*
* @param offset the offset
* @param depth the depth
*/
public RandomReplacement(int offset, int depth) {
this.offset = offset;
this.depth = depth;
}
@Override
public Tuple<String, Boolean> apply(String input) {
int inputLength = input.length();
if (offset >= inputLength) {
return new Tuple(input, true);
}
int end = offset + depth;
if (end > inputLength) {
end = inputLength;
}
String maskedValue = RandomGenerators.randomReplacement(input.substring(offset, end));
return new Tuple(maskedValue, true);
}
}
| [
"dhwang@ca.ibm.com"
] | dhwang@ca.ibm.com |
bfbfb5ad6cdcb578dfa55f06c42005f7e886f421 | a0366106397b2fff8edaea72746148dad65dd307 | /sample2.5/src/MyThread1.java | e024acb97c5dfb9d19278dc6068304b3651942f0 | [] | no_license | Aurora418/MyThread-West2Online | a2784c385c1663ff162fbc3a2d0ef1d603130161 | 59778495051e07042a33d8bcf3937b1a421bef1e | refs/heads/main | 2023-02-27T12:03:13.002657 | 2021-02-05T13:04:45 | 2021-02-05T13:04:45 | 336,273,653 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 217 | java | public class MyThread1 implements Runnable{
@Override
public void run() {
for (int i = 0; i < 999999998; i++) {
System.out.println("新年快乐,孤寡孤寡");
}
}
}
| [
"noreply@github.com"
] | Aurora418.noreply@github.com |
0c7e5c52d191ccb3416ca7d19626758238f72e99 | 042324d7e27a3529b24ae5d182db3c9b6ab0313c | /src/main/java/ToDo.java | 42aab7cb3af6f00afc90ffc167f7cfe6f99bf80c | [] | no_license | ilya0407/REST_API | 17c7e0fad289b0661ea6b158a57f444b51864aa0 | 3ebc84842000ae0b507ac896da90c578a9dfc800 | refs/heads/master | 2023-05-11T04:20:28.904106 | 2021-05-28T09:01:52 | 2021-05-28T09:01:52 | 371,641,427 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 801 | java | import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.UUID;
public final class ToDo {
private UUID id;
private LocalDateTime dateCreated;
private boolean done;
private String task;
public ToDo(UUID id, LocalDateTime date_created, boolean done, String task) {
this.id = id;
this.dateCreated = date_created;
this.done = done;
this.task = task;
}
public ToDo(boolean done, String task) {
this(UUID.randomUUID(),LocalDateTime.now(),done,task);
}
public Object getId() {
return this.id;
}
public LocalDateTime getDateCreated() {
return this.dateCreated;
}
public boolean isDone() {
return done;
}
public String getTask() {
return task;
}
}
| [
"42876117+ilya0407@users.noreply.github.com"
] | 42876117+ilya0407@users.noreply.github.com |
501891b4e01fc3e80f44a9e124f2b35087bd49d9 | 1f727c0cf109493ac8e358930778f9f5fe4ad2b7 | /level03.lesson06.task03.java | 4f3b511d06ed61a12993311b642c11a2b59f6bf5 | [] | no_license | DenisTmenov/javarush | a8f99ecf93985df7bc1bae3c5ba8c08f24c9e6f3 | abcdc1080eac07d88127f95f51106866dfbf7c84 | refs/heads/master | 2021-01-11T22:50:32.674139 | 2017-01-10T19:56:29 | 2017-01-10T19:56:29 | 78,510,560 | 1 | 0 | null | 2017-01-10T11:37:05 | 2017-01-10T07:52:37 | Java | UTF-8 | Java | false | false | 1,523 | java | package com.javarush.test.level03.lesson06.task03;
/* Семь цветов радуги
Создать 7 объектов, чтобы на экран вывелись 7 цветов радуги (ROYGBIV).
Каждый объект при создании выводит на экран определенный цвет.
*/
public class Solution
{
public static void main(String[] args)
{
//напишите тут ваш код
Red a1 = new Red();
Orange a2 = new Orange();
Yellow a3 = new Yellow();
Green a4 = new Green();
Blue a5 = new Blue();
Indigo a6 = new Indigo();
Violet a7 = new Violet();
}
public static class Red
{
public Red() {
System.out.println("Red");
}
}
public static class Orange
{
public Orange() {
System.out.println("Orange");
}
}
public static class Yellow
{
public Yellow() {
System.out.println("Yellow");
}
}
public static class Green
{
public Green() {
System.out.println("Green");
}
}
public static class Blue
{
public Blue() {
System.out.println("Blue");
}
}
public static class Indigo
{
public Indigo() {
System.out.println("Indigo");
}
}
public static class Violet
{
public Violet() {
System.out.println("Violet");
}
}
} | [
"denis.tmenov@gmail.com"
] | denis.tmenov@gmail.com |
5a62253d666993216c08a72a3597c15f3cf218ad | dd19a42e1f49f03908dda03dc3e22b040b4f1ea3 | /app/src/main/java/org/xvdr/extractor/H264Reader.java | 3821608bf54069e759074feb7534bfe04320c598 | [
"Apache-2.0"
] | permissive | Moorviper/roboTV | ebdf6707e4fda94a7c222be8a994c3e4736b0c32 | 82da30bef71f9a4ae99e930ca8bad23a4d8a1e5c | refs/heads/master | 2021-01-11T01:22:56.751371 | 2016-10-10T05:59:22 | 2016-10-11T12:16:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,947 | java | package org.xvdr.extractor;
import com.google.android.exoplayer.C;
import com.google.android.exoplayer.MediaFormat;
import com.google.android.exoplayer.util.MimeTypes;
import org.xvdr.robotv.client.StreamBundle;
import java.util.ArrayList;
import java.util.List;
/**
* Processes a XVDR H264 byte stream
*/
final class H264Reader extends StreamReader {
private static final String TAG = "H264Reader";
public H264Reader(PacketQueue output, StreamBundle.Stream stream) {
super(output, stream);
// do we have the decoder init data ?
List<byte[]> initializationData = null;
if(stream.spsLength != 0 && stream.ppsLength != 0) {
initializationData = new ArrayList<>();
assembleInitData(initializationData);
}
output.format(MediaFormat.createVideoFormat(
Integer.toString(stream.physicalId), // << trackId
MimeTypes.VIDEO_H264,
MediaFormat.NO_VALUE,
MediaFormat.NO_VALUE,
C.UNKNOWN_TIME_US ,
stream.width,
stream.height,
initializationData,
MediaFormat.NO_VALUE,
(float)stream.pixelAspectRatio));
}
private void assembleInitData(List<byte[]> data) {
byte[] initSps = new byte[stream.spsLength + 4];
byte[] initPps = new byte[stream.ppsLength + 4];
// http://developer.android.com/reference/android/media/MediaCodec.html
// add header 0x00 0x00 0x00 0x01
initSps[3] = 0x01;
System.arraycopy(stream.sps, 0, initSps, 4, stream.spsLength);
data.add(initSps);
// add header 0x00 0x00 0x00 0x01
initPps[3] = 0x01;
System.arraycopy(stream.pps, 0, initPps, 4, stream.ppsLength);
data.add(initPps);
}
}
| [
"alexander.pipelka@gmail.com"
] | alexander.pipelka@gmail.com |
c9bcb19e8da30844c8768c4dd7dcea67123e01c5 | 81c2e34b0a44c3d1bdf6e8c4da8bd121c6e97062 | /src/main/java/com/monese/dto/MoneyTransferRequest.java | b911db9199cc5f8de677a37c2edae804a1f070bc | [] | no_license | chandrimapoddar/Monese | 9c42eab7126cba76984dd894facfa43ec67145ff | cf19349dc949dd36238f1b6185becbec8898713a | refs/heads/master | 2020-06-29T13:09:30.621228 | 2019-08-04T22:42:53 | 2019-08-04T22:42:53 | 200,546,319 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 725 | java | package com.monese.dto;
import java.math.BigDecimal;
public class MoneyTransferRequest {
private String fromAcctNum;
private String toAcctNum;
private BigDecimal transferAmount;
public String getFromAcctNum() {
return fromAcctNum;
}
public void setFromAcctNum(String fromAcctNum) {
this.fromAcctNum = fromAcctNum;
}
public String getToAcctNum() {
return toAcctNum;
}
public void setToAcctNum(String toAcctNum) {
this.toAcctNum = toAcctNum;
}
public BigDecimal getTransferAmount() {
return transferAmount;
}
public void setTransferAmount(BigDecimal transferAmount) {
this.transferAmount = transferAmount;
}
}
| [
"chandrima.poddar1@gmail.com"
] | chandrima.poddar1@gmail.com |
ff2ffd3e1a2c705c537b0f254ce660b356613738 | 27990a272448473837ecf2a9837f3a1a9a4e0979 | /SumOfNo.java | 31416aaadd9c03ec904c09afc03e700ffa96a319 | [] | no_license | thiyagu97/guvi | b67997fec432d1cf0cc235838a38d8c5e5bc3982 | 879f95e8b5e3e4c618714ae380bcce4447e42a74 | refs/heads/master | 2020-12-02T21:14:24.965007 | 2017-09-03T13:14:10 | 2017-09-03T13:14:10 | 96,278,329 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | import java.util.*;
public class SumOfNo {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
System.out.println("Enter the number");
int n=sc.nextInt();
int sum=0;
for(int i=n;i>=1;i--){
sum=sum+i;
}
System.out.println(sum);
}
}
| [
"noreply@github.com"
] | thiyagu97.noreply@github.com |
a34ad0c8261548de2a4e5552eae34b10ddd294a2 | 43a387275316cb335904d5dbc608732dab8b3082 | /app/src/androidTest/java/com/example/parkingapp/ExampleInstrumentedTest.java | a67165807d1151763c9ad7c65b85229727658de8 | [] | no_license | naveengalatta/ParkingApp | 2ec7081f6fd892e01820f67c662d901c334650d9 | a984de3ceeab04dd084a5828cc5501502c9b2bf3 | refs/heads/master | 2022-12-05T03:05:41.912981 | 2020-08-16T13:38:33 | 2020-08-16T13:38:33 | 287,953,413 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 760 | java | package com.example.parkingapp;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.parkingapp", appContext.getPackageName());
}
}
| [
"naveendav2000@gmail.com"
] | naveendav2000@gmail.com |
9e8f137f4ac6fd3b5198806cda42ed490f2d841a | d7b232a65a4c4d894d28189ba2764c1c9c9f4e05 | /src/main/java/com/yudis/rmsservice/controller/UserController.java | 0479821e7e69ee69f60acd9336fefb39fcfc785b | [] | no_license | yudistyra/rmsservice | eed4c722501e3d49061e059dd7e054711e156048 | 755af9fc9701b944c31d51a484ea43b78a7402a8 | refs/heads/master | 2020-04-16T13:10:04.342006 | 2019-01-22T09:23:25 | 2019-01-22T09:23:25 | 165,614,221 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,399 | java | package com.yudis.rmsservice.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.yudis.rmsservice.model.User;
import com.yudis.rmsservice.payloads.ApiResponse;
import com.yudis.rmsservice.repository.UserRepository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/*
* This class is used for User API Controller
*/
@Api(description="User API Controller")
@RestController
@RequestMapping(UserController.BASE_URL)
public class UserController {
public static final String BASE_URL = "/api/v1/users";
private UserRepository userRepository;
@Autowired
public UserController(UserRepository userRepository) {
this.userRepository = userRepository;
}
/**
* Get User List
*/
@ApiOperation(value="This API will genereate list of user")
@Secured("ROLE_ADMIN")
@GetMapping
@ResponseStatus(HttpStatus.OK)
public ApiResponse<User> getUser() {
List<User> users = userRepository.findAll();
return new ApiResponse<User>(200, users);
}
}
| [
"Yudistyra_OP355@mitrais.com"
] | Yudistyra_OP355@mitrais.com |
21af3d46311b4a3599253c4ff7e1ecf73c298954 | 74b47b895b2f739612371f871c7f940502e7165b | /aws-java-sdk-timestreamquery/src/main/java/com/amazonaws/services/timestreamquery/model/transform/RowJsonUnmarshaller.java | 2d0f8ca1bccea4bb6d7e39940441705c7d776b14 | [
"Apache-2.0"
] | permissive | baganda07/aws-sdk-java | fe1958ed679cd95b4c48f971393bf03eb5512799 | f19bdb30177106b5d6394223a40a382b87adf742 | refs/heads/master | 2022-11-09T21:55:43.857201 | 2022-10-24T21:08:19 | 2022-10-24T21:08:19 | 221,028,223 | 0 | 0 | Apache-2.0 | 2019-11-11T16:57:12 | 2019-11-11T16:57:11 | null | UTF-8 | Java | false | false | 2,649 | java | /*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.timestreamquery.model.transform;
import java.math.*;
import javax.annotation.Generated;
import com.amazonaws.services.timestreamquery.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* Row JSON Unmarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RowJsonUnmarshaller implements Unmarshaller<Row, JsonUnmarshallerContext> {
public Row unmarshall(JsonUnmarshallerContext context) throws Exception {
Row row = new Row();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL) {
return null;
}
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("Data", targetDepth)) {
context.nextToken();
row.setData(new ListUnmarshaller<Datum>(DatumJsonUnmarshaller.getInstance())
.unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return row;
}
private static RowJsonUnmarshaller instance;
public static RowJsonUnmarshaller getInstance() {
if (instance == null)
instance = new RowJsonUnmarshaller();
return instance;
}
}
| [
""
] | |
855d4576e45c2196ce0378659cd4ac95e866cd05 | 1bae0340387e674b098125d9f5c650f208c8673e | /ProjectEuler/src/com/suryatechsources/projecteuler/Problem172NumbersWithFewRepeatedDigits.java | 8585385ddf76f9d51f067050f0c80624f497eba2 | [] | no_license | suryadavinci/Project-Euler | 018f29ffe269d53cfae913f17d3781bc43cc3e50 | c50d29f37a11222363933078e60353a4f703b0b3 | refs/heads/master | 2020-01-23T21:42:55.341822 | 2017-06-19T07:38:25 | 2017-06-19T07:38:25 | 74,685,991 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,902 | java | package com.suryatechsources.projecteuler;
import java.math.BigInteger;
public class Problem172NumbersWithFewRepeatedDigits {
int totalCount = 0;
public static void main(String[] args) {
// TODO Auto-generated method stub
long num = 1020302323;
String numToString = Long.toString(num);
int count = 0;
int k = 2;
for (int i = 0; i < numToString.length(); i++) {
if (numToString.charAt(i) == (char) k + 48)
count++;
}
System.out.println("Count " + count);
char x = 48;
System.out.println(x);
Problem172NumbersWithFewRepeatedDigits solution = new Problem172NumbersWithFewRepeatedDigits();
solution.numbersWithFewRepeatedDigits(4, 3);
solution.numbersWithFewRepeatedDigits(18, 3);
System.out.println("total Count " + solution.totalCount);
}
public void numbersWithFewRepeatedDigits(int k, int n) {
BigInteger start = new BigInteger("10").pow(k - 1);
BigInteger end = new BigInteger("10").pow(k);
BigInteger iterator;
BigInteger total = end.subtract(start);
System.out.println(start + " " + end + " " + total);
iterator = start;
int compare = iterator.compareTo(end);
while (compare == -1) {
numberCounts(iterator, n);
iterator = iterator.add(BigInteger.ONE);
compare = iterator.compareTo(end);
}
BigInteger solution = total.subtract(BigInteger.valueOf(totalCount));
System.out.println("total " + total + " total count " + totalCount);
}
public void numberCounts(BigInteger num, int n) {
for (int i = 0; i <= 9; i++) {
if (countOfiInNumber(i, num) > n) {
// System.out.println("count of "+i+" in "+num+" "+n);
totalCount++;
}
}
}
public int countOfiInNumber(int digit, BigInteger num) {
String numToString = num.toString();
int count = 0;
for (int i = 0; i < numToString.length(); i++) {
if (numToString.charAt(i) == (char) digit + 48)
count++;
}
return count;
}
} | [
"surya@SuryaLinuxMintLenovo.com"
] | surya@SuryaLinuxMintLenovo.com |
97b31f541dfab5f99ab91db4f9fbd4d7eda31d9e | ac75a02171607ebff8f5409e18b586542fcd456f | /autokart-backend/src/main/java/com/sv/autokart/services/MailContentBuilder.java | 61895ad559f1557a3b6bc2926cfaad22931d660f | [] | no_license | sandeepv10494/AutoKart | 437617ae52f652a3a9ffadceb661d5288a0620d8 | 108fed1f5845bd5e7945d85cfa65db41f7696284 | refs/heads/master | 2023-03-28T05:20:55.222310 | 2021-03-23T11:34:58 | 2021-03-23T11:34:58 | 348,314,257 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 507 | java | package com.sv.autokart.services;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;
@Service
@AllArgsConstructor
public class MailContentBuilder {
private final TemplateEngine templateEngine;
public String build(String message){
Context context = new Context();
context.setVariable("message",message);
return templateEngine.process("mailtemplate",context);
}
}
| [
"sandeepv.10494@gmail.com"
] | sandeepv.10494@gmail.com |
052403341344e9843b1f9a54d2a460038d48212e | f423006fc0f5bd82482032d69b3ec8b849797b75 | /Obligatorisk1/src/no/hvl/dat100/TrinnSkatt.java | 4c2b7ed74f00a8d3801f2cf93cd7f878466146d1 | [] | no_license | vlt585139/DAT100 | 9f7db46d5fc9738dabb89e904e1dd77065f05b1b | 2c4c61477fb428c6f295313e753825d8ebcf4f0b | refs/heads/master | 2023-07-20T07:05:21.681598 | 2021-09-06T11:04:09 | 2021-09-06T11:04:09 | 403,585,380 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,295 | java | package no.hvl.dat100;
//import javax.swing.JOptionPane;
import javax.swing.*;
public class TrinnSkatt {
public static void main(String[] args) {
String in = JOptionPane.showInputDialog("Brutto");
int brutto = Integer.parseInt(in);
//long brutto = Long.parseLong(in);
double nettoLonn;
double sats = 0.0;
if (brutto >= 164101 && brutto <=230950) {
sats = 0.93;
} else if (brutto >= 230951 && brutto <=580650) {
sats = 2.41;
} else if (brutto >= 580651 && brutto <=934500) {
sats = 11.52;
} else if (brutto >= 934051) {
sats = 14.52;
} else if (brutto <= 164100) {
sats = 0.0;
}
double trinn = 0;
if (brutto >= 164101 && brutto <=230950) {
trinn = 1;
} else if (brutto >= 230951 && brutto <=580650) {
trinn = 2;
} else if (brutto >= 580651 && brutto <=934500) {
trinn = 3;
} else if (brutto >= 934051) {
trinn = 4;
} else if (brutto <= 164100) {
trinn = 0;
}
double skatt = brutto * (sats / 100);
nettoLonn = brutto - skatt;
JOptionPane.showMessageDialog(null, "Trinn: " + trinn);
JOptionPane.showMessageDialog(null, "Sats i prosent: " + sats + "\nSum Skatt: " + skatt);
JOptionPane.showMessageDialog(null, "Bruttolønn: " + in + "\nNettolønn: " + nettoLonn);
}
}
| [
"victorlongtran@158-37-235-62.hvl.no"
] | victorlongtran@158-37-235-62.hvl.no |
f5ca4555aa813f4bc87fc4731bc9a2785aa2bb6d | 4114f4303ba5c857706eca2d37847f9e24c65903 | /src/main/java/com/sphereon/cas/did/auth/passwordless/callback/model/CallbackTokenPostRequest.java | e68b7f43117c853f866e192a81e4d0a29f9bb981 | [
"Apache-2.0"
] | permissive | Sphereon-Opensource/did-auth-cas | 21bb1bc254f0e0fb0783316e2a4e599940d3001b | e48cf686ee5cb5aaf34dabac92f0322fdfff8c33 | refs/heads/develop | 2020-08-24T07:31:12.672237 | 2020-03-25T09:37:46 | 2020-03-25T09:37:46 | 216,785,250 | 0 | 0 | Apache-2.0 | 2020-03-25T09:37:47 | 2019-10-22T10:22:03 | Java | UTF-8 | Java | false | false | 442 | java | package com.sphereon.cas.did.auth.passwordless.callback.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
@Getter
public class CallbackTokenPostRequest{
private final String access_token;
@JsonCreator
public CallbackTokenPostRequest(@JsonProperty("access_token") final String access_token){
this.access_token = access_token;
}
}
| [
"srmalley-sphereon@github.com"
] | srmalley-sphereon@github.com |
96241b110191a3b43d1183d53d613c3596a6da51 | b5422e60c38812336b1e69aeffb64adaf46c6da5 | /src/main/java/io/graphile/domain/PersistentAuditEvent.java | 3d9e255153c50f57fd056a5cc4ac064274a0fea7 | [] | no_license | lunias/graphile | 45d34d1d486eb1206b35ac1d04d47909ea96c997 | e28072441135daff30f1458ada14557c19b830f6 | refs/heads/master | 2021-01-10T21:47:14.743903 | 2015-11-26T16:28:47 | 2015-11-26T16:28:47 | 46,933,923 | 0 | 1 | null | 2020-09-18T09:44:48 | 2015-11-26T15:21:21 | Java | UTF-8 | Java | false | false | 1,796 | java | package io.graphile.domain;
import java.time.LocalDateTime;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.Map;
/**
* Persist AuditEvent managed by the Spring Boot actuator
* @see org.springframework.boot.actuate.audit.AuditEvent
*/
@Entity
@Table(name = "jhi_persistent_audit_event")
public class PersistentAuditEvent {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "event_id")
private Long id;
@NotNull
@Column(nullable = false)
private String principal;
@Column(name = "event_date")
private LocalDateTime auditEventDate;
@Column(name = "event_type")
private String auditEventType;
@ElementCollection
@MapKeyColumn(name = "name")
@Column(name = "value")
@CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns=@JoinColumn(name="event_id"))
private Map<String, String> data = new HashMap<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPrincipal() {
return principal;
}
public void setPrincipal(String principal) {
this.principal = principal;
}
public LocalDateTime getAuditEventDate() {
return auditEventDate;
}
public void setAuditEventDate(LocalDateTime auditEventDate) {
this.auditEventDate = auditEventDate;
}
public String getAuditEventType() {
return auditEventType;
}
public void setAuditEventType(String auditEventType) {
this.auditEventType = auditEventType;
}
public Map<String, String> getData() {
return data;
}
public void setData(Map<String, String> data) {
this.data = data;
}
}
| [
"ethanaa@gmail.com"
] | ethanaa@gmail.com |
fe6d3370840bce3afc69d9cf05ebb6950e393c0f | fe81c9e63fd8ac492b41cd409473ff4e336efdc6 | /src/jc01_2020/avramkov/lesson09/task05/Application.java | da61d40f1e9f6eb369436dbcf181574634720629 | [] | no_license | avramkovk/Tasks | 69d9929324a5598173789cdd5da9f9d33d980c01 | c2e84d5b3516dcc44604dc70ad6d017415c567b5 | refs/heads/master | 2020-12-21T15:55:50.290714 | 2020-04-02T18:50:01 | 2020-04-02T18:50:01 | 236,479,427 | 0 | 0 | null | 2020-01-27T11:50:37 | 2020-01-27T11:50:37 | null | UTF-8 | Java | false | false | 1,975 | java | package jc01_2020.avramkov.lesson09.task05;
/*
*
* Заполнить два списка целыми числами. Из первого списка удалить все отрицательные числа. Из второго - все положительные.
* Создать третий список, состоящий из оставшихся элементов первых двух. Из третьего списка удалить все элементы со
* значением 0. Вывести итоговый список в консоль. Максимально использовать готовые методы коллекций
*
*/
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Application {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Объявляем список 1 список
List<Integer> array1 = new ArrayList<>();
for (int i = 0; i < 5; i++) {
int str1 = scanner.nextInt();
array1.add(str1); // Заполнить список
}
// Объявляем список 2 список
List<Integer> array2 = new ArrayList<>();
for (int i = 0; i < 5; i++) {
int str2 = scanner.nextInt();
array2.add(str2); // Заполнить список
}
//removeIf модифицирует существующий список, а не создает новый
array1.removeIf(num -> (num < 0)); //удаляем отрицательные значения
array2.removeIf(num -> (num > 0)); //удаляем положительные значения
array1.addAll(array2); //добавляем в список1 значения из списка2
array1.removeIf(num -> (num == 0)); //удаляем нулевые значения
System.out.println(array1);
}
} | [
"60222602+avramkovk@users.noreply.github.com"
] | 60222602+avramkovk@users.noreply.github.com |
46436d40c6756598b41896abf7a18f1e4069c150 | 0a13c6d40325ffad713170aaf0a1ea30fec5bd11 | /app/src/main/java/com/example/marybord/App.java | e4a958914caec51422e381dfb1136ddc20b30569 | [] | no_license | Maria-Bordunova/ExchangeRates | e998d136c2bccd1c670c8950f1857d4603f98e27 | 1c04c6d9734676589ad268ed255f5a7a526d8e33 | refs/heads/master | 2022-12-13T17:04:04.398826 | 2020-09-21T20:48:38 | 2020-09-21T20:48:38 | 295,123,689 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 841 | java | package com.example.marybord;
/**
* @author Mary Bordunova
* @date 8/13/2020
* @description Application file
*/
import android.app.Application;
import com.example.marybord.di.component.AppComponent;
import com.example.marybord.di.component.DaggerAppComponent;
import com.example.marybord.di.module.AppModule;
public class App extends Application {
private AppComponent appComponent;
@Override
public void onCreate() {
super.onCreate();
// Dependency Injection
appComponent = DaggerAppComponent.builder()
.appModule(new AppModule(this))
.build();
// netModule(new NetModule()).build();
}
public AppComponent getAppComponent() {
if (appComponent != null)
return appComponent;
else
return null;
}
} | [
"triphonovamaria@mail.ru"
] | triphonovamaria@mail.ru |
e5219367be14a2539420f7f23eab9752399273c8 | 7b9df97fd0989711371a3d3b102ade45c6e5df25 | /src/main/java/br/com/townsq/condominio/permissoes/util/GrupoUtil.java | ec6a87b9ad3e97573df7dd8da6b30b7ed8bd6fd8 | [] | no_license | DiegoOsmarinBasso/permissoes-condominio-api | 005ece06783a320cedf3ce8505cba256a7363ae3 | 943db4c7d55e5dfffdcbc5328bdf1883c6675b20 | refs/heads/master | 2022-04-19T18:13:24.634177 | 2020-04-17T21:09:45 | 2020-04-17T21:09:45 | 255,744,839 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,347 | java | package br.com.townsq.condominio.permissoes.util;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Component;
import br.com.townsq.condominio.permissoes.model.FuncionalidadeEnum;
import br.com.townsq.condominio.permissoes.model.Grupo;
import br.com.townsq.condominio.permissoes.model.PermissaoEnum;
@Component
public class GrupoUtil {
/**
*
* @param campos
* @return
*/
public List<Grupo> geraGruposUsuario(String[] campos) {
List<Grupo> grupos = new ArrayList<>();
String tipoGrupoIdCondominio[] = campos[2].replaceAll("\\[|\\]|\\(|\\)", "").split(",");
for (int i = 0; i < tipoGrupoIdCondominio.length; i += 2) {
grupos.add(new Grupo(tipoGrupoIdCondominio[i], tipoGrupoIdCondominio[i + 1]));
}
return grupos;
}
/**
*
* @param campos
* @return
*/
public Grupo geraGrupo(String[] campos) {
Grupo grupo = new Grupo(campos[1], campos[2]);
String permissoes[] = campos[3].replaceAll("\\[|\\]|\\(|\\)", "").split(",");
for (int i = 0; i < permissoes.length; i += 2) {
grupo.getPermissoes().put(
FuncionalidadeEnum.valueOf(permissoes[i]), PermissaoEnum.valueOf(permissoes[i + 1]));
}
return grupo;
}
}
| [
"diego_osmarim@terceiros.sicredi.com.br"
] | diego_osmarim@terceiros.sicredi.com.br |
604f0d209014c2873097ea1e0fa3af863d0273f6 | 359ce667cb55bdec01273b7c57c229bd755e975a | /app/src/main/java/com/dddong/servicesample/model/Schedule.java | 377cf17c121aa73854f45414f97e2a5f6c067369 | [] | no_license | duongdong022/ServiceSample | 91f10a9ef49b2ac7b921ad3115c7f94206950670 | 567566c6d011e91d74798dac3dee86dd59c8ff9b | refs/heads/master | 2021-01-19T08:37:45.585065 | 2015-08-18T09:10:29 | 2015-08-18T09:10:29 | 40,962,133 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 454 | java | package com.dddong.servicesample.model;
import java.util.List;
/**
* Created by dddong on 2015/08/13.
*/
public class Schedule {
private String id;
private String label;
private boolean status;
private Type type;
private List<DayOfWeek> dayOfWeeks;
private int startHour;
private int startMinute;
private int endHour;
private int endMinute;
private String ringToneName;
private String ringTonePath;
}
| [
"doan.dong@axonactive.vn"
] | doan.dong@axonactive.vn |
ca3cd257d26f3c69bb78d38ca6df8ad85b055b98 | 868963d74b7698f8a6f33d98d686da5003dae68f | /app/src/main/java/com/ihs/demo/message/FriendManager.java | e67a90dd954a86f183a58f3b574c7b08a4af439d | [] | no_license | 2666fff/iHandy-Message | 9b2e4fc62a388cc7c794f6a0d45f5d1958ef5ec9 | 8bdfdf5cbeabcb21e5ce706fb31c77b18f95145e | refs/heads/master | 2020-12-05T06:33:32.502948 | 2015-09-11T15:10:25 | 2015-09-11T15:10:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,659 | java | package com.ihs.demo.message;
import java.util.ArrayList;
import java.util.List;
import com.ihs.message_2012010548.friends.api.HSContactFriendsMgr;
import com.ihs.message_2012010548.friends.api.HSContactFriendsMgr.IFriendSyncListener;
import com.ihs.message_2012010548.friends.dao.ContactFriendsDao;
import android.os.Handler;
import android.os.HandlerThread;
import android.text.TextUtils;
import com.google.i18n.phonenumbers.NumberParseException;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.ihs.commons.notificationcenter.HSGlobalNotificationCenter;
import com.ihs.commons.utils.HSLog;
import com.ihs.contacts.api.HSPhoneContactMgr;
import com.ihs.contacts.api.IContactBase;
import com.ihs.contacts.api.IPhoneContact;
import com.ihs.contacts.api.IPhoneContact.HSContactContent;
public class FriendManager implements IFriendSyncListener {
/**
* 当好友列表发生变化后会发出此通知
*/
public static final String NOTIFICATION_NAME_FRIEND_CHANGED = "NOTIFICATION_NAME_FRIEND_CHANGED";
private static FriendManager sInstannce = null;
private static String TAG = FriendManager.class.getName();
private List<Contact> friends;
private HandlerThread handlerThread;
private Handler serialHandler = null;
public static synchronized FriendManager getInstance() {
if (sInstannce == null) {
sInstannce = new FriendManager();
}
return sInstannce;
}
/**
* 获取好友列表
*
* @return 好友列表
*/
synchronized public List<Contact> getAllFriends() {
return this.friends;
}
/**
* 根据 mid 去查询一个 Friend,如果查到则返回对应的联系人,否则返回空
*
* @param mid 要查询的 mid
* @return 查询到 mid 对应的联系人
*/
synchronized public Contact getFriend(String mid) {
for (Contact c : this.friends) {
if (TextUtils.equals(c.getMid(), mid))
return c;
}
return null;
}
private FriendManager() {
friends = new ArrayList<Contact>();
handlerThread = new HandlerThread("FriendsManager");
handlerThread.start();
serialHandler = new Handler(handlerThread.getLooper());
HSContactFriendsMgr.addSyncFinishListener(this);
refresh();
}
synchronized void updateFriends(List<Contact> newFriends) {
this.friends.clear();
this.friends.addAll(newFriends);
}
@Override
public void onFriendsSyncFinished(boolean result, ArrayList<IContactBase> friendList) {
this.refresh();
}
void refresh() {
serialHandler.post(new Runnable() {
@Override
public void run() {
List<IPhoneContact> contacts = HSPhoneContactMgr.getContacts();
HSLog.d(TAG, "all contacts " + contacts);
final List<Contact> newFriends = new ArrayList<Contact>();
for (IPhoneContact contact : contacts) {
List<HSContactContent> contents = contact.getNumbers();
for (HSContactContent c : contents) {
if (c.isFriend()) {
String number = c.getContent();
PhoneNumberUtil instance = PhoneNumberUtil.getInstance();
try {
PhoneNumber phoneNumber = instance.parse(number, "CN");
String e164 = instance.format(phoneNumber, PhoneNumberFormat.E164);
Contact myContact = new Contact(c.getContent(), c.getLabel(), c.getContactId(), c.getType(), true);
String mid = ContactFriendsDao.getInstance().getFriendMid(e164);
if (TextUtils.isEmpty(mid) == false) {
myContact.setMid(mid);
myContact.setName(contact.getDisplayName());
newFriends.add(myContact);
}
updateFriends(newFriends);
} catch (NumberParseException e) {
e.printStackTrace();
}
}
}
}
HSGlobalNotificationCenter.sendNotificationOnMainThread(NOTIFICATION_NAME_FRIEND_CHANGED);
}
});
}
}
| [
"hqythu@gmail.com"
] | hqythu@gmail.com |
43d7cfe4a8f32135063c431d7ff0f55aab5c1fa4 | ddd180ebacada408d440a46c5d68c1652203103a | /src/test/java/guru/springframework/domain/CategoryTest.java | b996fa32a51ac1c8197382e736ced59426e1ca4e | [] | no_license | FabianoJacquin/spring5-recipe-app | e493baafaa4ff36f027b2672d400d372ef66e51a | a4b7269fff66f3b7fea1b723571ea6754c646e1a | refs/heads/master | 2021-05-20T16:05:01.669833 | 2020-04-09T16:02:00 | 2020-04-09T16:02:00 | 252,359,688 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 599 | java | package guru.springframework.domain;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class CategoryTest {
static Category category;
@BeforeAll
public static void setUp(){
System.out.println("Enter setup method");
category = new Category();
}
@Test
void getId() {
Long idValue = 4L;
category.setId(idValue);
assertEquals(idValue, category.getId());
}
@Test
void getDescription() {
}
@Test
void getRecipes() {
}
} | [
"fabiano.jacquin@gmail.com"
] | fabiano.jacquin@gmail.com |
e7162f95fa92538e701b716aecd6c112839335ff | 8f7156345a9ac7503a99b3d5e081661747d6b910 | /Stack.java | c77498a7cb7f346f967701ab92947a830d56edc4 | [] | no_license | n3legal/OOP-Pr7- | fc47795052a48f2f5b86b44657a29d981841deb6 | 15645d224eca00356989b1c104393de56f0aa3a2 | refs/heads/master | 2020-04-04T16:07:32.284807 | 2018-11-04T09:10:44 | 2018-11-04T09:10:44 | 156,065,607 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 664 | java | package practice7;
import java.util.ArrayDeque;
public class Stack {
ArrayDeque<Integer> cardDeck;
public void start(int[] cards) {
cardDeck = new ArrayDeque<Integer>(cards.length);
for(int i : cards) {
cardDeck.push(i);
}
}
public int getTop() {
return cardDeck.getFirst();
}
public void addBottom(int last) {
cardDeck.addLast(last);
}
public int removeTop() {
return cardDeck.removeFirst();
}
public void show(int k) {
System.out.println(cardDeck.toString() + " " + k);
}
public boolean isEmpty() {
return cardDeck.isEmpty();
}
} | [
"nikita.shachnov@yandex.ru"
] | nikita.shachnov@yandex.ru |
df4d98d769fe94605dee21a34cb280d7ca0eee95 | 2664c8eb272b2d6de50ec239213fce31d8021e17 | /GUI7/GUI7_HC_S15831/src/zadanie2/Author.java | f1837881cb75fa31cbfcbb86a679ace50ba7c62c | [] | no_license | labtec96/NEWGUI | e3edbf086d345f4b106a55085b81c67544401833 | aafa1cab2e688365f1cec9d6454eb35e50de4b18 | refs/heads/master | 2021-05-01T08:44:42.618256 | 2018-02-11T22:18:49 | 2018-02-11T22:18:49 | 121,171,876 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 857 | java | /**
*
* @author Han Cezary S15831
*
*/
package zadanie2;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
public class Author implements Runnable
{
private boolean czyPrzeszlo = false;
public BlockingQueue<String> kolejka = new ArrayBlockingQueue<String>(1000);
String[] argumenty;
public Author(String[] args)
{
this.argumenty = args;
}
@Override
public void run()
{
for(int i =0; i < argumenty.length; i++)
{
try
{
Thread.sleep(1000);
kolejka.put(argumenty[i]);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
setczyPrzeszlo(true) ;
}
public void setczyPrzeszlo(boolean wartosc)
{
this.czyPrzeszlo = wartosc;
}
public boolean getczyPrzeszlo()
{
return this.czyPrzeszlo;
}
}
| [
"cezaryhan1@gmail.com"
] | cezaryhan1@gmail.com |
9c543217274db7f049618877fb7e0a59f398368e | fc4bd980e30be0dac9068509528b543733015be4 | /Petshow-WEB/src/main/java/br/com/petshow/beans/AdocaoBean.java | e451192f6e0e4fa9771638acc14033e7689f99bd | [] | no_license | BrunoSalmito/PETSHOW-JSF | 65528dbbf828ec0ed3f121883516e34666a792f5 | f136eafddfe408ce120e3809e8ee4ce08f3cc675 | refs/heads/master | 2021-01-12T07:02:09.273815 | 2016-12-20T05:55:24 | 2016-12-20T05:55:24 | 76,900,957 | 0 | 0 | null | 2016-12-19T22:04:20 | 2016-12-19T22:04:20 | null | UTF-8 | Java | false | false | 799 | java | package br.com.petshow.beans;
import java.util.Date;
import javax.faces.bean.ManagedBean;
import javax.ws.rs.core.Response;
import br.com.petshow.model.Adocao;
@ManagedBean
public class AdocaoBean extends SuperBean{
public String send() {
Adocao adocao = new Adocao();
adocao.setDataAdocao(new Date());
Response response=null;
try{
response = post("Adocao/post", adocao);
if (response.getStatus() != 200) {
throw new RuntimeException("Failed : HTTP error code : "
+ response.getStatus());
}
System.out.println("Server response : \n");
System.out.println(response.readEntity(String.class));
response.close();
} catch (Exception e) {
e.printStackTrace();
}finally {
if(response!=null)response.close();
}
return null;
}
}
| [
"rafasystec@yahoo.com.br"
] | rafasystec@yahoo.com.br |
7f55a0f4b9ac223265878df69153c1b7e7413c66 | 294e0600b62200c1ea94fb4b8c06ab9a4243af0b | /zipkin-client/src/main/java/com/zisal/cloud/zipkin/client/SimpleController.java | 5a591f1c32cbd112b40abc64b039b9351a94f7dd | [] | no_license | sagarpatilscoe/spring-cloud-zipkin | e6236fe152bc21a75448174306e5dc45fcb559cb | 07c4b55f53a86f311ea40d675e01ab000963688b | refs/heads/main | 2023-02-14T02:58:04.406918 | 2020-12-20T07:14:17 | 2020-12-20T07:14:17 | 323,015,172 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package com.zisal.cloud.zipkin.client;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class SimpleController {
@GetMapping("/echo")
public String echo () {
return "Hello World";
}
}
| [
"noreply@github.com"
] | sagarpatilscoe.noreply@github.com |
cee3536615d49eba161634d9e4bc52dcc4fd0635 | 7528e6b4ec91b6c757785639376d9d7ef9c1bd0b | /exercise41/src/test/java/baseline/Solution41Test.java | fc27848f7449da92c3ba4bf41253dc7ab68a4d79 | [] | no_license | isaacmeboi/lynch-a04 | 315239b727f6eceb1e5dbb0608988171162d1598 | 3c24fe437e38b1fa278495e74cc6925722ddc7a4 | refs/heads/main | 2023-08-16T14:14:20.069409 | 2021-10-18T05:46:40 | 2021-10-18T05:46:40 | 416,956,853 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | package baseline;
import org.junit.jupiter.api.Test;
import java.io.FileNotFoundException;
import static org.junit.jupiter.api.Assertions.*;
class Solution41Test {
@Test
//check to ensure the directory is correct
void IONamesTest() throws FileNotFoundException {
Solution41 ca = new Solution41();
String userHomeDir = System.getProperty("user.home");
String expected = userHomeDir+"\\Desktop\\exercise41_input.txt";
String actual = ca.call();
assertEquals(expected, actual);
}
} | [
"thebunnyarcher@gmail.com"
] | thebunnyarcher@gmail.com |
037cd17a4b9a163eb1b4dcc0e3067d58454d18a1 | b00a0bb866bbb5db31ff90d924455201d71f9371 | /app/build/generated/source/buildConfig/androidTest/debug/com/eric/myapplication/test/BuildConfig.java | c1dda2f31757b41b90062b31c585eabf105a3984 | [
"MIT"
] | permissive | ufochuxian/kotlin_study | 9b5583c51b3271d935464bb592d07d4e4207a7af | 1fc6a14d1728e74448232019d601d91fa2e54d74 | refs/heads/master | 2021-05-17T15:02:57.587530 | 2020-03-30T15:44:43 | 2020-03-30T15:44:43 | 250,833,876 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 461 | java | /**
* Automatically generated file. DO NOT MODIFY
*/
package com.eric.myapplication.test;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.eric.myapplication.test";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
| [
"chen853409335@gmail.com"
] | chen853409335@gmail.com |
75b9f5dc1045ba4504171e1ad475985ff823a032 | ebbc4f9dbbebf5b8b1ef0e4f808c0d8a573a2c2d | /src/main/java/com/example/demotest/config/RedisConfig.java | cffe69fa4276812d8522064bb3123397bb806066 | [] | no_license | wzl618/javaDemo | 1228289a19bcecc0be287d6955b0c7465db663ab | 8d129ffc007149221e5f02c596f742b94fc2ceda | refs/heads/master | 2023-06-14T07:22:56.744118 | 2021-07-08T03:07:33 | 2021-07-08T03:07:33 | 383,970,704 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,878 | java | package com.example.demotest.config;
import java.lang.reflect.Method;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCache;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.databind.ObjectMapper;
@Configuration
@EnableCaching
public class RedisConfig extends CachingConfigurerSupport{
@Value("${spring.redis.host}")
private String host;
@Value("${spring.redis.port}")
private int port;
@Value("${spring.redis.timeout}")
private int timeout;
@Value("${spring.redis.password}")
private String password;
@Value("${spring.redis.pool.max-active}")
private int maxActive;
@Value("${spring.redis.pool.max-wait}")
private int maxWait;
@Value("${spring.redis.pool.max-idle}")
private int maxIdle;
@Value("${spring.redis.pool.min-idle}")
private int minIdle;
@Bean
public KeyGenerator wiselyKeyGenerator(){
return new KeyGenerator() {
@Override
public Object generate(Object target, Method method, Object... params) {
StringBuilder sb = new StringBuilder();
sb.append(target.getClass().getName());
sb.append(method.getName());
for (Object obj : params) {
sb.append(obj.toString());
}
return sb.toString();
}
};
}
@Bean
public JedisConnectionFactory redisConnectionFactory() {
JedisConnectionFactory factory = new JedisConnectionFactory();
factory.setHostName(host);
factory.setPort(port);
factory.setTimeout(timeout); //设置连接超时时间
factory.setPassword(password);
factory.getPoolConfig().setMaxIdle(maxIdle);
factory.getPoolConfig().setMinIdle(minIdle);
factory.getPoolConfig().setMaxTotal(maxActive);
factory.getPoolConfig().setMaxWaitMillis(maxWait);
return factory;
}
@Bean
public CacheManager cacheManager(RedisConnectionFactory factory) {
RedisCacheManager cacheManager = RedisCacheManager.create(factory);
return cacheManager;
}
@Bean
public RedisTemplate<String, String> redisTemplate(RedisConnectionFactory factory) {
StringRedisTemplate template = new StringRedisTemplate(factory);
setSerializer(template); //设置序列化工具,这样ReportBean不需要实现Serializable接口
template.afterPropertiesSet();
return template;
}
private void setSerializer(StringRedisTemplate template) {
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
template.setValueSerializer(jackson2JsonRedisSerializer);
}
}
| [
"wangzhiliang618@163.com"
] | wangzhiliang618@163.com |
55174848365fc3edef62e5d52eb102657f5d3bdb | e20ee19d9491d49895c90a990c146d83a261ab76 | /mmseg4j-core/src/test/java/com/chenlb/mmseg4j/ComplexSegTest.java | 9b3daf9b87d0f15b251325c4f7710137ad754036 | [
"Apache-2.0"
] | permissive | fakechris/mmseg4j | 8b3f001eba6188354e34e43aa4c26f6d535515b1 | c6b72502afd8954df0ee20d99bfd16d05b2edb0e | refs/heads/master | 2021-05-15T01:18:11.452962 | 2013-01-20T04:11:27 | 2013-01-20T04:11:27 | 8,624,128 | 0 | 0 | Apache-2.0 | 2020-10-13T02:54:41 | 2013-03-07T09:34:56 | Java | UTF-8 | Java | false | false | 3,146 | java | package com.chenlb.mmseg4j;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import com.chenlb.mmseg4j.example.Complex;
public class ComplexSegTest {
Complex segW;
@Before
public void setUp() throws Exception {
segW = new Complex();
//ComplexSeg.setShowChunk(true);
}
/*public void testSeg() {
String txt = "";
txt = "各人发表关于受一股来自中西伯利亚的强冷空气影响";
ComplexSeg.setShowChunk(true);
ComplexSeg seg = new ComplexSeg(new Dictionary("dic")); //sogou
Sentence sen = new Sentence(txt.toCharArray(), 0);
System.out.println();
while(!sen.isFinish()) {
Chunk chunk = seg.seg(sen);
System.out.println(chunk+" -> "+chunk.getStartOffset());
}
}*/
@Test
public void testEffect() throws IOException {
String words = segW.segWords("研究生命起源", "|");
Assert.assertEquals("研究|生命|起源", words);
}
@Test
public void testEffect1() throws IOException {
String words = segW.segWords("为首要考虑", "|");
Assert.assertEquals("为首|要|考虑", words);
}
@Test
@Ignore
public void testEffect2() throws IOException {
String words = segW.segWords("眼看就要来了", "|");
Assert.assertEquals("眼看|就要|来了", words);
}
@Test
public void testEffect3() throws IOException {
String words = segW.segWords("中西伯利亚", "|");
Assert.assertEquals("中|西伯利亚", words);
}
@Test
public void testEffect4() throws IOException {
String words = segW.segWords("国际化", "|");
Assert.assertEquals("国际化", words);
}
@Test
public void testEffect5() throws IOException {
String words = segW.segWords("化装和服装", "|");
Assert.assertEquals("化装|和|服装", words);
}
@Test
public void testEffect6() throws IOException {
String words = segW.segWords("中国人民银行", "|");
Assert.assertEquals("中国人民银行", words);
}
/**
* 自扩展的词库文件
*/
@Test
public void testEffect7() throws IOException {
String words = segW.segWords("白云山", "|");
Assert.assertEquals("白云山", words);
}
@Test
public void testEffect10() throws IOException {
String words = segW.segWords("清华大学", "|");
Assert.assertEquals("清华大学", words);
}
@Test
public void testEffect11() throws IOException {
String words = segW.segWords("华南理工大学", "|");
Assert.assertEquals("华南理工大学", words);
}
@Test
public void testEffect12() throws IOException {
String words = segW.segWords("广东工业大学", "|");
Assert.assertEquals("广东工业大学", words);
}
@Test
@Ignore
public void testUnitEffect() throws IOException {
String words = segW.segWords("2008年底发了资金吗", "|");
Assert.assertEquals("2008|年|底|发了|资金|吗", words);
}
@Test
public void testUnitEffect1() throws IOException {
String words = segW.segWords("20分钟能完成", "|");
Assert.assertEquals("20|分钟|能|完成", words);
}
}
| [
"chenlb2008@2371cf42-ff48-11dd-a3ef-1f8437fb274a"
] | chenlb2008@2371cf42-ff48-11dd-a3ef-1f8437fb274a |
7a73c209f58d6ce36b96418970fa8d24bb7c22f1 | 30f12447352d4637405be8cb3861a416dab2a41a | /src/main/java/com/superx/callorder/entity/SalaryOne.java | d9e639cb6cdd03eca20da72f8b383851f4fd0977 | [] | no_license | superxuzj/callsystem | 278ad38c859cc178f23030c2b247bd3f6e00d37d | 59a22a418ff82c3746094c3f91e28b3ffefa05d0 | refs/heads/master | 2022-12-24T20:32:03.106817 | 2019-12-01T12:38:26 | 2019-12-01T12:38:26 | 92,603,229 | 0 | 0 | null | 2022-12-10T04:01:19 | 2017-05-27T14:20:15 | HTML | UTF-8 | Java | false | false | 8,334 | java | package com.superx.callorder.entity;
import java.util.Date;
public class SalaryOne {
private Integer id;
private Integer userid;
private String department;
private String name;
private String xinji;
private String gangwei;
private String gonggai;
private String jintie;
private String fudong;
private String zhibu;
private String diqu;
private String jiaobu;
private String weinaru;
private String tizu;
private String huiyingdu;
private String cailanzi;
private String shenghuo;
private String tongxin;
private String guginggangwei;
private String fudonggangwei;
private String wuyefei;
private String xiangmujixiao;
private String jiaban;
private String bufa;
private String yingfaheji;
private String qita;
private String geshui;
private String gongjijin;
private String yanglao;
private String shiye;
private String bukougong;
private String kougonghui;
private String yukou;
private String shifaheji;
private String count;
private String nianyue;
private Date ctratetime;
private String ctrator;
private String heji;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserid() {
return userid;
}
public void setUserid(Integer userid) {
this.userid = userid;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department == null ? null : department.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getXinji() {
return xinji;
}
public void setXinji(String xinji) {
this.xinji = xinji == null ? null : xinji.trim();
}
public String getGangwei() {
return gangwei;
}
public void setGangwei(String gangwei) {
this.gangwei = gangwei == null ? null : gangwei.trim();
}
public String getGonggai() {
return gonggai;
}
public void setGonggai(String gonggai) {
this.gonggai = gonggai == null ? null : gonggai.trim();
}
public String getJintie() {
return jintie;
}
public void setJintie(String jintie) {
this.jintie = jintie == null ? null : jintie.trim();
}
public String getFudong() {
return fudong;
}
public void setFudong(String fudong) {
this.fudong = fudong == null ? null : fudong.trim();
}
public String getZhibu() {
return zhibu;
}
public void setZhibu(String zhibu) {
this.zhibu = zhibu == null ? null : zhibu.trim();
}
public String getDiqu() {
return diqu;
}
public void setDiqu(String diqu) {
this.diqu = diqu == null ? null : diqu.trim();
}
public String getJiaobu() {
return jiaobu;
}
public void setJiaobu(String jiaobu) {
this.jiaobu = jiaobu == null ? null : jiaobu.trim();
}
public String getWeinaru() {
return weinaru;
}
public void setWeinaru(String weinaru) {
this.weinaru = weinaru == null ? null : weinaru.trim();
}
public String getTizu() {
return tizu;
}
public void setTizu(String tizu) {
this.tizu = tizu == null ? null : tizu.trim();
}
public String getHuiyingdu() {
return huiyingdu;
}
public void setHuiyingdu(String huiyingdu) {
this.huiyingdu = huiyingdu == null ? null : huiyingdu.trim();
}
public String getCailanzi() {
return cailanzi;
}
public void setCailanzi(String cailanzi) {
this.cailanzi = cailanzi == null ? null : cailanzi.trim();
}
public String getShenghuo() {
return shenghuo;
}
public void setShenghuo(String shenghuo) {
this.shenghuo = shenghuo == null ? null : shenghuo.trim();
}
public String getTongxin() {
return tongxin;
}
public void setTongxin(String tongxin) {
this.tongxin = tongxin == null ? null : tongxin.trim();
}
public String getGuginggangwei() {
return guginggangwei;
}
public void setGuginggangwei(String guginggangwei) {
this.guginggangwei = guginggangwei == null ? null : guginggangwei.trim();
}
public String getFudonggangwei() {
return fudonggangwei;
}
public void setFudonggangwei(String fudonggangwei) {
this.fudonggangwei = fudonggangwei == null ? null : fudonggangwei.trim();
}
public String getWuyefei() {
return wuyefei;
}
public void setWuyefei(String wuyefei) {
this.wuyefei = wuyefei == null ? null : wuyefei.trim();
}
public String getXiangmujixiao() {
return xiangmujixiao;
}
public void setXiangmujixiao(String xiangmujixiao) {
this.xiangmujixiao = xiangmujixiao == null ? null : xiangmujixiao.trim();
}
public String getBufa() {
return bufa;
}
public void setBufa(String bufa) {
this.bufa = bufa == null ? null : bufa.trim();
}
public String getYingfaheji() {
return yingfaheji;
}
public void setYingfaheji(String yingfaheji) {
this.yingfaheji = yingfaheji == null ? null : yingfaheji.trim();
}
public String getQita() {
return qita;
}
public void setQita(String qita) {
this.qita = qita == null ? null : qita.trim();
}
public String getGeshui() {
return geshui;
}
public void setGeshui(String geshui) {
this.geshui = geshui == null ? null : geshui.trim();
}
public String getGongjijin() {
return gongjijin;
}
public void setGongjijin(String gongjijin) {
this.gongjijin = gongjijin == null ? null : gongjijin.trim();
}
public String getYanglao() {
return yanglao;
}
public void setYanglao(String yanglao) {
this.yanglao = yanglao == null ? null : yanglao.trim();
}
public String getShiye() {
return shiye;
}
public void setShiye(String shiye) {
this.shiye = shiye == null ? null : shiye.trim();
}
public String getYukou() {
return yukou;
}
public void setYukou(String yukou) {
this.yukou = yukou == null ? null : yukou.trim();
}
public String getShifaheji() {
return shifaheji;
}
public void setShifaheji(String shifaheji) {
this.shifaheji = shifaheji == null ? null : shifaheji.trim();
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count == null ? null : count.trim();
}
public String getNianyue() {
return nianyue;
}
public void setNianyue(String nianyue) {
this.nianyue = nianyue == null ? null : nianyue.trim();
}
public Date getCtratetime() {
return ctratetime;
}
public void setCtratetime(Date ctratetime) {
this.ctratetime = ctratetime;
}
public String getCtrator() {
return ctrator;
}
public void setCtrator(String ctrator) {
this.ctrator = ctrator == null ? null : ctrator.trim();
}
public String getHeji() {
return heji;
}
public void setHeji(String heji) {
this.heji = heji;
}
public String getBukougong() {
return bukougong;
}
public void setBukougong(String bukougong) {
this.bukougong = bukougong;
}
public String getKougonghui() {
return kougonghui;
}
public void setKougonghui(String kougonghui) {
this.kougonghui = kougonghui;
}
public String getJiaban() {
return jiaban;
}
public void setJiaban(String jiaban) {
this.jiaban = jiaban;
}
} | [
"271652260@qq.com"
] | 271652260@qq.com |
16535a0f780e5698d627c4667064bdd46d9c55e0 | 194eb4fef06d31a5ff50a9110cdad4ef7f41d40a | /voids/src/test/java/ar/com/marcelogore/tesis/voids/VoidTest.java | 21137a213ca8a7a6c79a2b77d4cacc88cf96cee8 | [] | no_license | marcelogore/tesis | 24b10a7c80eff0f429ad08677046eefdeb43d57c | 1f49a85a0395ff7552297d70abf4369b015da2d4 | refs/heads/master | 2020-04-28T22:48:40.089031 | 2014-10-10T02:28:45 | 2014-10-10T02:28:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,011 | java | package ar.com.marcelogore.tesis.voids;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import ar.com.marcelogore.tesis.voids.Void;
import ar.com.marcelogore.tesis.voids.util.Vector;
public class VoidTest {
private Void thisVoid;
private Void[] otherVoids;
@Before
public void beforeEachTest() {
Void.setRadius(2.0d);
}
@Test
public void testGetNearbyVoidsForVoidsForForwardHorizontalVelocity() {
thisVoid = new Void(new Vector(2,3), new Vector(1,0));
thisVoid.setViewAngle((3 * Math.PI) / 2.0);
otherVoids = new Void[11];
otherVoids[0] = new Void(new Vector(2,4), null);
otherVoids[1] = new Void(new Vector(1,5), null);
otherVoids[2] = new Void(new Vector(1,3), null);
otherVoids[3] = new Void(new Vector(2,2), null);
otherVoids[4] = new Void(new Vector(1,1), null);
otherVoids[5] = new Void(new Vector(4,1), null);
otherVoids[6] = new Void(new Vector(4,5), null);
otherVoids[7] = new Void(new Vector(5,3), null);
otherVoids[8] = new Void(new Vector(3,3), null);
otherVoids[9] = new Void(new Vector(0,4), null);
otherVoids[10] = new Void(new Vector(0,2), null);
thisVoid.setOtherVoids(Arrays.asList(otherVoids));
List<Void> nearbyVoids = thisVoid.getNearbyVoids();
assertTrue("Void 0 isn't nearby but it should", nearbyVoids.contains(otherVoids[0]));
assertTrue("Void 3 isn't nearby but it should", nearbyVoids.contains(otherVoids[3]));
assertTrue("Void 8 isn't nearby but it should", nearbyVoids.contains(otherVoids[8]));
assertFalse("Void 1 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[1]));
assertFalse("Void 2 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[2]));
assertFalse("Void 4 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[4]));
assertFalse("Void 5 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[5]));
assertFalse("Void 6 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[6]));
assertFalse("Void 7 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[7]));
assertFalse("Void 9 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[9]));
assertFalse("Void 10 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[10]));
}
@Test
public void testGetNearbyVoidsForVoidsForUpwardsVelocity() {
thisVoid = new Void(new Vector(2,3), new Vector(0,1));
thisVoid.setViewAngle((3 * Math.PI) / 2.0);
otherVoids = new Void[11];
otherVoids[0] = new Void(new Vector(2,4), null);
otherVoids[1] = new Void(new Vector(1,5), null);
otherVoids[2] = new Void(new Vector(1,3), null);
otherVoids[3] = new Void(new Vector(2,2), null);
otherVoids[4] = new Void(new Vector(1,1), null);
otherVoids[5] = new Void(new Vector(4,1), null);
otherVoids[6] = new Void(new Vector(4,5), null);
otherVoids[7] = new Void(new Vector(5,3), null);
otherVoids[8] = new Void(new Vector(3,3), null);
otherVoids[9] = new Void(new Vector(0,4), null);
otherVoids[10] = new Void(new Vector(0,2), null);
thisVoid.setOtherVoids(Arrays.asList(otherVoids));
List<Void> nearbyVoids = thisVoid.getNearbyVoids();
assertTrue("Void 0 isn't nearby but it should", nearbyVoids.contains(otherVoids[0]));
assertTrue("Void 2 isn't nearby but it should", nearbyVoids.contains(otherVoids[2]));
assertTrue("Void 8 isn't nearby but it should", nearbyVoids.contains(otherVoids[8]));
assertFalse("Void 1 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[1]));
assertFalse("Void 3 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[3]));
assertFalse("Void 4 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[4]));
assertFalse("Void 5 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[5]));
assertFalse("Void 6 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[6]));
assertFalse("Void 7 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[7]));
assertFalse("Void 9 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[9]));
assertFalse("Void 10 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[10]));
}
@Test
public void testGetNearbyVoidsForVoidsForForwardHorizontalVelocityWith90DegreeAngle() {
thisVoid = new Void(new Vector(2,3), new Vector(1,0));
thisVoid.setViewAngle(Math.PI / 2.0);
otherVoids = new Void[11];
otherVoids[0] = new Void(new Vector(2,4), null);
otherVoids[1] = new Void(new Vector(1,5), null);
otherVoids[2] = new Void(new Vector(1,3), null);
otherVoids[3] = new Void(new Vector(2,2), null);
otherVoids[4] = new Void(new Vector(1,1), null);
otherVoids[5] = new Void(new Vector(4,1), null);
otherVoids[6] = new Void(new Vector(4,5), null);
otherVoids[7] = new Void(new Vector(5,3), null);
otherVoids[8] = new Void(new Vector(3,3), null);
otherVoids[9] = new Void(new Vector(0,4), null);
otherVoids[10] = new Void(new Vector(0,2), null);
thisVoid.setOtherVoids(Arrays.asList(otherVoids));
List<Void> nearbyVoids = thisVoid.getNearbyVoids();
assertTrue("Void 8 isn't nearby but it should", nearbyVoids.contains(otherVoids[8]));
assertFalse("Void 0 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[0]));
assertFalse("Void 1 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[1]));
assertFalse("Void 2 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[2]));
assertFalse("Void 3 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[3]));
assertFalse("Void 4 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[4]));
assertFalse("Void 5 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[5]));
assertFalse("Void 6 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[6]));
assertFalse("Void 7 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[7]));
assertFalse("Void 9 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[9]));
assertFalse("Void 10 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[10]));
}
@Test
public void testGetNearbyVoidsForVoidsForForwardHorizontalVelocityWith45DegreeAngle() {
thisVoid = new Void(new Vector(2,3), new Vector(1,0));
thisVoid.setViewAngle(Math.PI / 4.0);
otherVoids = new Void[11];
otherVoids[0] = new Void(new Vector(2,4), null);
otherVoids[1] = new Void(new Vector(1,5), null);
otherVoids[2] = new Void(new Vector(1,3), null);
otherVoids[3] = new Void(new Vector(2,2), null);
otherVoids[4] = new Void(new Vector(1,1), null);
otherVoids[5] = new Void(new Vector(4,1), null);
otherVoids[6] = new Void(new Vector(4,5), null);
otherVoids[7] = new Void(new Vector(5,3), null);
otherVoids[8] = new Void(new Vector(3,3), null);
otherVoids[9] = new Void(new Vector(0,4), null);
otherVoids[10] = new Void(new Vector(0,2), null);
thisVoid.setOtherVoids(Arrays.asList(otherVoids));
List<Void> nearbyVoids = thisVoid.getNearbyVoids();
assertTrue("Void 8 isn't nearby but it should", nearbyVoids.contains(otherVoids[8]));
assertFalse("Void 0 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[0]));
assertFalse("Void 1 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[1]));
assertFalse("Void 2 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[2]));
assertFalse("Void 3 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[3]));
assertFalse("Void 4 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[4]));
assertFalse("Void 5 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[5]));
assertFalse("Void 6 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[6]));
assertFalse("Void 7 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[7]));
assertFalse("Void 9 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[9]));
assertFalse("Void 10 is nearby but it shouldn't", nearbyVoids.contains(otherVoids[10]));
}
}
| [
"marcelogore@gmail.com"
] | marcelogore@gmail.com |
ff163b350c83b1709b9753fb7fc838fe0e74f68c | e58c7e7844752a61e77622e62bca8b642ffa283f | /app/src/main/java/com/example/android_project/ChattingActivity.java | 1f8b063984795039a4076424d24ca8c2da2b5bc9 | [] | no_license | dawon96/dawon | 35c37bd8fc8a31969a85671ab68c4b9d51bc8e55 | 13d648cf0dc412ad7b9055a693bb7d684bb3a0f0 | refs/heads/master | 2021-05-06T18:24:52.964143 | 2017-11-24T15:38:42 | 2017-11-24T15:38:42 | 111,879,210 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 562 | java | package com.example.android_project;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import butterknife.ButterKnife;
/**
* Created by 다원 on 2017-11-20.
*/
public class ChattingActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chattingpage);
ButterKnife.bind(this);
Intent intent = new Intent();
intent = getIntent();
}
}
| [
"33948730+dawon96@users.noreply.github.com"
] | 33948730+dawon96@users.noreply.github.com |
7925c4240be16bdfd7916e27292bfa36f0d88028 | df51848102ae2522155d3b231ae8f994df04764c | /CloudProject/src/com/DiskImage.java | ac8a5d2a0cb6a032eabd3c8071cbfc9758a728c6 | [] | no_license | sandeep-daiict/MesRonCloud | 2a67eed8de7aaa3f8be509db16b3ab14faff2f63 | 049d004a9e0f9e72c3d4d52669cd9ef0d5abafab | refs/heads/master | 2020-05-30T12:49:00.098355 | 2013-11-22T04:45:20 | 2013-11-22T04:45:20 | 14,608,915 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 286 | java | package com;
import java.util.ArrayList;
public class DiskImage
{
public int status;
public String name;
public int size;
public int vmid;
public DiskImage(int st, String storagename , int space , int id)
{
status = st;
name= storagename;
size=space;
vmid = id;
}
}
| [
"sandeepsharma191991@yahoo.com"
] | sandeepsharma191991@yahoo.com |
3f710bc423c637f634cba592be9d139c804d18bb | 31d42bb2159b3ff996a7df97d7bf3e93f0705190 | /blockchain/src/main/java/com/yenole/blockchain/foundation/utils/CachedDerivedKey.java | a40a5c7ca638343eeeaebc3e71f773eac9cfeaf5 | [] | no_license | yenole/JitToken | 4dfd892f92db5f3ae00d05069ffed2c2d3f4c25c | 770d5ed57c287b591d62d72cff57ab1566b50c80 | refs/heads/master | 2020-06-19T15:10:44.239079 | 2020-03-30T09:55:21 | 2020-03-30T09:55:21 | 196,756,932 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 696 | java | package com.yenole.blockchain.foundation.utils;
import com.yenole.blockchain.foundation.crypto.Hash;
public class CachedDerivedKey {
private String hashedPassword;
private byte[] derivedKey;
public CachedDerivedKey(String password, byte[] derivedKey) {
this.hashedPassword = hash(password);
this.derivedKey = derivedKey;
}
private String hash(String password) {
return NumericUtil.bytesToHex(Hash.sha256(Hash.sha256(password.getBytes())));
}
public byte[] getDerivedKey(String password) {
if (hashedPassword != null && hashedPassword.equals(hash(password))) {
return derivedKey;
}
return null;
}
}
| [
"Netxy@vip.qq.com"
] | Netxy@vip.qq.com |
427fb2f7f3a21169b0d5a1fd248d93a3501e2924 | 479a685f89a8c7196d671dae2c78c3bcbf6db54b | /core/src/com/upstream/Shark.java | 0989d3dff454ce12984609a6328ca8c647c5ecf3 | [] | no_license | jhargreaves1/upstreamLibGDX | 5b5e75cdc65090966815288ca2dd38b2df79f02a | b2f825b97520513a9961794de53ba7e40b616e28 | refs/heads/master | 2021-01-23T02:05:44.618683 | 2017-06-25T21:39:00 | 2017-06-25T21:39:00 | 92,908,152 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,001 | java | /******************************************************************************
Created by captnemo on 6/1/2017.
*/
package com.upstream;
public class Shark extends DynamicGameObject {
public static final float SHARK_WIDTH = 1.5f;
public static final float SHARK_HEIGHT = 0.5f;
public static final float SHARK_VELOCITY = 2f;
public static int SHARK_FIN =1;
public static int SHARK_JUMPING =2;
float stateTime = 0;
int sharkState = SHARK_FIN;
float jumpcount=0;
float swimcount=0;
public Shark(float x, float y) {
super(x, y, SHARK_WIDTH, SHARK_HEIGHT);
velocity.set(-SHARK_VELOCITY, 0);
}
public void update (float deltaTime) {
position.add(velocity.x * deltaTime, velocity.y * deltaTime);
bounds.x = position.x - SHARK_WIDTH / 2;
bounds.y = position.y - SHARK_HEIGHT / 2;
if (position.x < SHARK_WIDTH / 2) {
position.x = SHARK_WIDTH / 2;
velocity.x = SHARK_VELOCITY;
}
if (position.x > World.WORLD_WIDTH - SHARK_WIDTH / 2) {
position.x = World.WORLD_WIDTH - SHARK_WIDTH / 2;
velocity.x = -SHARK_VELOCITY;
}
stateTime += deltaTime;
if( sharkState == SHARK_JUMPING) {
jumpcount += deltaTime;
if(jumpcount>80){
jumpcount=0;
stateTime=0;
sharkState=SHARK_FIN;
}
}
if(sharkState == SHARK_FIN){
swimcount+= deltaTime;
}
}
public void sharkJump(){
if(sharkState!=SHARK_JUMPING) {
sharkState = SHARK_JUMPING;
swimcount = 0;
stateTime = 0;
jumpcount =0;
}else
return;
}
public int getSharkState(){
if (sharkState==SHARK_JUMPING)
jumpcount++;
if (jumpcount>20) {
sharkState = SHARK_FIN;
jumpcount=0;
}
if(sharkState==SHARK_FIN){
swimcount++;
}
if (swimcount>40) {
swimcount=0;
}
return sharkState;
}
}
| [
"jhargreaves1@csub.edu"
] | jhargreaves1@csub.edu |
3dff34ca0c3a6177af206d35d2376c8f51b17ed0 | 6a77cad1ec7e8647939da0fe6e3fc6d3d4aa1458 | /src/main/java/api/src/dao/MovieDAO.java | 3f8b0a133e602a2f9f0d3d8319aa90f8ab4c5a84 | [] | no_license | Enitsed/finalProject | f7dc3033536e48e0bef92147dbb7528a4644e9ed | a92be25fda7e96ebca4068521773d0d8b0e44342 | refs/heads/master | 2021-09-08T01:30:42.067065 | 2018-03-05T06:54:57 | 2018-03-05T06:54:57 | 115,616,961 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,792 | java | package api.src.dao;
import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import api.src.dto.CategoryDTO;
import api.src.dto.DirectorDTO;
import api.src.dto.ActorDTO;
import api.src.dto.MovieDTO;
public class MovieDAO {
Connection conn = null;
Statement stmt = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
// 싱글톤 패턴
static MovieDAO dao = new MovieDAO();
private MovieDAO() {
}
public static MovieDAO getInstance() {
return dao;
}
private Connection init() throws ClassNotFoundException, SQLException {
// 1. 드라이버 로딩
Class.forName("oracle.jdbc.OracleDriver");
// 2. 서버연결
String url = "jdbc:oracle:thin://@127.0.0.1:1521:xe";
String username = "hr";
String password = "a1234";
return DriverManager.getConnection(url, username, password);
}// end init()
private void exit() throws SQLException {
if (rs != null)
rs.close();
if (stmt != null)
stmt.close();
if (pstmt != null)
pstmt.close();
if (conn != null)
conn.close();
}// end exit()
public void insertMethod(List<MovieDTO> list) {
try {
conn = init();
String sql = "INSERT INTO movie VALUES(movie_seq.nextval,?,?,?,?,?,?,?,?)"; // ?순서대로 인덱스 1부터 시작
for (int i = 0; i < list.size(); i++) {
pstmt = conn.prepareStatement(sql); // prepareStatement: statement값 가져올때
pstmt.setString(1, list.get(i).getMovie_rating());
pstmt.setString(2, list.get(i).getMovie_kor_title());// (?값,이름)
pstmt.setString(3, list.get(i).getMovie_eng_title());
Date date = new Date(list.get(i).getMovie_opening_date().getYear(),
list.get(i).getMovie_opening_date().getMonth(), list.get(i).getMovie_opening_date().getDate());
pstmt.setDate(4, date);
pstmt.setString(5, list.get(i).getMovie_summary());
pstmt.setString(6, list.get(i).getMovie_image());
pstmt.setString(7, list.get(i).getMovie_url());
pstmt.setString(8, list.get(i).getNation());
pstmt.executeUpdate();
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
exit();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
public void countActor(List<MovieDTO> Movielist) {
try {
conn = init();
stmt = conn.createStatement();
int count = 0;
String sql = "";
for (int i = 0; i < Movielist.size(); i++) {
List<ActorDTO> list = Movielist.get(i).getMovie_actor();
for (int j = 0; j < list.size(); j++) {
String name = list.get(j).getActor_name().replaceAll("\\p{Z}", "");
if (!name.equals("")) {
sql = "select count(*) from actor where actor_name = '" + name + "'";
rs = stmt.executeQuery(sql);
while (rs.next()) {
count = rs.getInt("count(*)");
if (count <= 0) {
String sql2 = "INSERT INTO actor VALUES(actor_seq.nextval,'" + name + "')";
stmt.executeUpdate(sql2);
}
count = 0;
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
exit();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
public void insertMovieActorMethod(List<MovieDTO> Movielist) {
try {
conn = init();
stmt = conn.createStatement();
for (int i = 0; i < Movielist.size(); i++) {
List<ActorDTO> list = Movielist.get(i).getMovie_actor();
for (int j = 0; j < list.size(); j++) {
String name = list.get(j).getActor_name().replaceAll("\\p{Z}", "");
if (!name.equals("")) {
String sql = "INSERT INTO movie_actor (select movie_num, actor_num from actor, movie where actor_name = '"
+ name + "' AND movie_kor_title = '" + Movielist.get(i).getMovie_kor_title() + "')"; // ?순서대로
// 인덱스
// //
stmt.executeUpdate(sql);
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
exit();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
public void countDirector(List<MovieDTO> Movielist) {
try {
conn = init();
stmt = conn.createStatement();
int count = 0;
for (int i = 0; i < Movielist.size(); i++) {
List<DirectorDTO> list = Movielist.get(i).getMovie_director();
for (int j = 0; j < list.size(); j++) {
String name = list.get(j).getDirector_name().replaceAll("\\p{Z}", "");
if (!name.equals("")) {
String sql = "select count(*) from director where director_name = '" + name + "'"; // ?순서대로
rs = stmt.executeQuery(sql);
while (rs.next()) {
count = rs.getInt("count(*)");
if (count <= 0) {
String sql2 = "INSERT INTO director VALUES(director_seq.nextval,'" + name + "')"; // ?순서대로
// 인덱스
stmt.executeUpdate(sql2);
}
count = 0;
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
exit();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
public void insertMovieDirectorMethod(List<MovieDTO> Movielist) {
try {
conn = init();
stmt = conn.createStatement();
for (int i = 0; i < Movielist.size(); i++) {
List<DirectorDTO> list = Movielist.get(i).getMovie_director();
for (int j = 0; j < list.size(); j++) {
String name = list.get(j).getDirector_name().replaceAll("\\p{Z}", "");
if (!name.equals("")) {
String sql = "INSERT INTO movie_director (select movie_num, director_num from director, movie where director_name = '"
+ name + "' AND movie_kor_title = '" + Movielist.get(i).getMovie_kor_title() + "')";
stmt.executeUpdate(sql);
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
exit();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
public void insertMovieCategoryMethod(List<MovieDTO> Movielist) {
try {
conn = init();
stmt = conn.createStatement();
for (int i = 0; i < Movielist.size(); i++) {
List<CategoryDTO> list = Movielist.get(i).getCategory();
for (int j = 0; j < list.size(); j++) {
String name = list.get(j).getCategory_name().replaceAll("\\p{Z}", "");
if (!name.equals("")) {
String sql = "INSERT INTO movie_category (select category_num, movie_num from category, movie where category_name = '"
+ name + "' AND movie_kor_title = '" + Movielist.get(i).getMovie_kor_title() + "')";
stmt.executeUpdate(sql);
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
exit();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
}// end class
| [
"sllki1@naver.com"
] | sllki1@naver.com |
a52d68db641494621f75c0924571fa3d52af0f5f | f6498c0de9254cb3747ea3cb8fcf8a79d20ddf1c | /src/qiang/busLineBean/StaticLineDetail.java | 74a71e873442ffacc285245b59b672c157b7d629 | [] | no_license | qiang2010/BusLineOpt | 96b5eb12c17c247f9df041321622162e6fd0172b | 65f73216c5ea106072af28774f1ff378e035685d | refs/heads/master | 2021-01-10T04:45:05.880743 | 2015-11-05T08:51:25 | 2015-11-05T08:51:25 | 45,598,694 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,275 | java | package qiang.busLineBean;
import java.text.ParseException;
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 qiang.busStation.Station;
import qiang.util.FileUtil;
/**
* 用于统计每条线路,在各个时段的详细信息。
*
* @author jq
*
*/
public class StaticLineDetail {
public static void main(String[] args) {
StaticLineDetail sd = new StaticLineDetail();
sd.staticsLineDetail("20150804");
sd.loadStationDetailCorLine();
Map<String,BusLine> ans = sd.getAllLines();
BusLine tempL;
ArrayList< SlotStaticsDetail> slots ;
SlotStaticsDetail sld;
List<Station> stations;
int allIinesNum = ans.size();// 线路总数
int icCardSum = 0; // 所有ic卡打卡人数
int busSum =0; // 车辆总数
int stationSum =0; // 站点总数
Map<String,BusLine> badLine = new HashMap<String,BusLine>();
int countBadSum =0; // 统计两个指标小于给定值的数量
double perStationIcThres = 200;
double perStationPerBusThres = 8;
for(String s:ans.keySet()){
tempL = ans.get(s);
slots = tempL.getSlots();
stations = tempL.getStations();
sld = slots.get(0);
if(stations.size() ==0 || sld.getBusIds().size()==0) continue;
System.out.print(s+"\t");
for(int i=0;i<slots.size();i++){
sld = slots.get(i);
System.out.print(i); // 时段的标号
int icCount = sld.getCountIC(); // 当前时段乘车人数
icCardSum+=icCount;
int busIds = sld.getBusIds().size();// 车辆数目
busSum+= busIds;
double aveBusIC = icCount*1.0/busIds; // 平均每辆车的运送人数
int stationNum = stations.size(); // 站点的数量
stationSum+=stationNum;
double perBusPerStationIc = // 平均每辆车每个站点的上车人数
sld.getCountIC()*1.0/sld.getBusIds().size()/stations.size();
double perStationIc = sld.getCountIC()*1.0/stations.size();// 每个站点的上车人数
if(perStationPerBusThres >perBusPerStationIc && perStationIcThres > perStationIc){
countBadSum++;
}
System.out.print(icCount+"\t"+busIds+"\t"+aveBusIC+"\t"+stationNum+
"\t"+perBusPerStationIc+"\t"+perStationIc);
}
System.out.println();
}
System.out.println("线路数\t总人数\t车辆总数\t");
double perBusIcSum = icCardSum*1.0/busSum; // 平均每辆车的打卡人数
// 平均每条线路的运送人数
//
System.out.println(allIinesNum+"\t"+icCardSum+"\t"+busSum);
System.out.println(countBadSum);
}
Map<String,BusLine> allLines = new HashMap<>();
static String icCardDataPath = "F:\\公交线路数据\\icCardData\\";
static SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
static Calendar cal = Calendar.getInstance();
static String []timeSeg = {"000000"};//,"0600","0900","1700","1800"};
public Map<String,BusLine> staticsLineDetail(String filePre){
try {
setTimeSegs(filePre);
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
FileUtil fileUtil = new FileUtil(icCardDataPath+filePre+".csv");
String line1,line2;
fileUtil.readLine();
long timeFilter = 0;
try {
timeFilter =format.parse(filePre+"000000").getTime()/1000;
} catch (ParseException e) {
e.printStackTrace();
}
int count =0;
int exp =0;
BusLine tempLine;
while((line1 = fileUtil.readLine())!=null){
if(line1.length() < 130 )
line2 = fileUtil.readLine();
else line2 = "";
String []split = (line1+line2).split("\",\"");
long [] times = changeToTimestamp(split[4], split[3]);
if(times !=null){
if(times[0] > timeFilter && times[1] < timeFilter+24*3600 && times[0] < times[1] ){
String lineNu = split[7].substring(split[7].length()-3,split[7].length());
if(allLines.containsKey(lineNu))
{
tempLine = allLines.get(lineNu);
}else{
tempLine = new BusLine(lineNu, timeSeg.length);
allLines.put(lineNu, tempLine);
}
tempLine.addBusId(turnTimestampToTimeSeg(times[0]), split[8]);
}else exp++;
}else{
exp++;
}
count++;
if(count %10000==0)System.out.println(count);;
}
System.out.println(allLines.size() + " "+ exp);
return allLines;
}
// 统计各个线路上的所有站点的固有信息Station
String stationFile = "车站信息.txt";
public void loadStationDetailCorLine(){
FileUtil file = new FileUtil(icCardDataPath+stationFile);
String tempLine,lineNum;
String []splits;
BusLine tempBusLine;
ArrayList<Station> stations ;
Station sta;
int base;
while((tempLine = file.readLine())!= null){
splits = tempLine.trim().split("\\s+");
base = 0;
if(splits.length < 13){
base = 4;
}
if(splits.length <11){
System.out.println(tempLine);
}
lineNum = lineNumFormat(splits[5-base].trim());
if(allLines.containsKey(lineNum)){
tempBusLine = allLines.get(lineNum);
}else{
tempBusLine = new BusLine(lineNum, timeSeg.length);
allLines.put(lineNum, tempBusLine);
}
tempBusLine.setLineKey(splits[4-base]);
sta = new Station();
sta.setStationId(splits[8-base]);
sta.setStationName(splits[9-base]);
sta.setStationNum(Integer.parseInt(splits[10-base]));
sta.setAlt(Double.parseDouble(splits[13-base]));
sta.setLot(Double.parseDouble(splits[14-base]));
stations = tempBusLine.getStations();
stations.add(sta);
}
}
// 站位信息中的线路信息和IC打卡不一样,需要补上0
private String lineNumFormat(String in){
if(in == null || in.length()==0) return "000";
int s = in.length();
if(s >= 3) return in;
int dif = 3-s;
StringBuilder sb = new StringBuilder();
for(int i =0;i<dif;i++){
sb.append("0");
}
sb.append(in);
return sb.toString();
}
public int turnTimestampToTimeSeg(String timestamp){
long time = -1;
try {
time = changeStringToTimestamp(timestamp);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return turnTimestampToTimeSeg(time);
}
public int turnTimestampToTimeSeg(long timestamp){
int i;
for( i=0;i<timeSegs.length;i++){
if(timestamp < timeSegs[i])break;
}
if(i==0){
return -1;
}
// if(i==timeSegs.length){
// return timeSegs.length-1;
// }
return i-1;
}
long []timeSegs;
public void setTimeSegs(String filePre) throws Exception{
int s = timeSeg.length;
this.timeSegs = new long[s];
int i=0;
for(String seg:timeSeg){
long st = changeStringToTimestamp(filePre+seg);
this.timeSegs[i] = st;
}
}
long[]changeToTimestamp(String marktime,String tradeTime){
long []ans = new long[2];
try {
ans[0] = changeStringToTimestamp(marktime);
ans[1] = changeStringToTimestamp(tradeTime);
} catch (Exception e) {
return null;
}
return ans;
}
public static long changeStringToTimestamp (String time)throws Exception{
Date date = format.parse(time);
cal.setTime(date);
//cal.set(Calendar.SECOND, 0);
return cal.getTimeInMillis()/1000;
}
public Map<String, BusLine> getAllLines() {
return allLines;
}
public void setAllLines(Map<String, BusLine> allLines) {
this.allLines = allLines;
}
}
| [
"qiangji1991@gmail.com"
] | qiangji1991@gmail.com |
10976593448e3c0e0c9222418f89e8d8bada1f99 | 96d76515ed420776c29f83b5af1b7d28982d4397 | /app/src/main/java/com/toin/work/http/image/STImageLoader.java | 1beacf26a5dc0595321dee3e62a9ae5752cdff27 | [] | no_license | toinwork/android | b85dc766730d75a03f5eedb3eeeed8cd76ff73a9 | f9919ec0d3bb74cf88ed7cf0f242cad300bf58e4 | refs/heads/master | 2020-04-12T06:42:38.596389 | 2016-06-26T08:06:41 | 2016-06-26T08:06:41 | 61,933,783 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 953 | java | package com.toin.work.http.image;
import android.widget.ImageView;
import com.nostra13.universalimageloader.core.ImageLoader;
/**
* 图片下载类<br>
* <ul>
* <li>String imageUri =“http://site.com/image.png”; // from Web
* <li>String imageUri =“file:///mnt/sdcard/image.png”; // from SD card
* <li>String imageUri =“content://media/external/audio/albumart/13″; //
* fromcontent provider
* <li>String imageUri =“assets://image.png”; // from assets
* <li>String imageUri =“drawable://” + R.drawable.image; // from drawables
* (only images, non-9patch)
* </ul>
*/
public class STImageLoader {
private ImageLoader mImageLoader;
public STImageLoader() {
mImageLoader = ImageLoader.getInstance();
}
public void displayImage(String uri, ImageView imageView) {
mImageLoader.displayImage(uri, imageView);
}
public ImageLoader getImageLoader() {
return mImageLoader;
}
}
| [
"hanb@fangde.com"
] | hanb@fangde.com |
138781dcb52a86dac64666e5ff1fb9d68a74224d | 618e98db053821614d25e7c4fbaefddbc3ad5e99 | /ziguiw-platform/src/main/java/com/zigui/domain/GrowArchives.java | e95e59083432bbf2001833e604315ceb916e058f | [] | no_license | lizhou828/ziguiw | 2a8d5a1c4310d83d4b456f3124ab49d90a242bad | 76f2bedcf611dfecbf6119224c169ebcea915ad7 | refs/heads/master | 2022-12-23T04:13:06.645117 | 2014-10-08T07:42:57 | 2014-10-08T07:42:57 | 24,621,998 | 1 | 1 | null | 2022-12-14T20:59:50 | 2014-09-30T02:53:21 | Python | UTF-8 | Java | false | false | 11,806 | java | package com.zigui.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@Entity
@Table(name="grow_archives")
@SequenceGenerator(
name="GROW_ARCHIVES_SEQ",
sequenceName="grow_archives_seq",
allocationSize=1
)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class GrowArchives implements Serializable {
/**
*
*/
private static final long serialVersionUID = 8159645726498678328L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "GROW_ARCHIVES_SEQ")
private long id;
@Column(name="user_id")
private long userId;
@Column(name="hobby")
private String hobby; //爱好
@Column(name="specialty")
private String specialty; //特长
@Column(name="ideal")
private String ideal; //理想
@Column(name="famous")
private String famous; //兴趣貌似不是这么写的吧,应该是interests
@Column(name="parents_send_word")
private String parentsSendWord; //家长寄语
@Column(name="teacher_send_word")
private String teacherSendWord; //老师寄语
@Column(name="honor_and_works")
private String honorAndWorks; //荣誉、成就
@Column(name="favourite_work")
private String favouriteWork; //最喜爱的工作
@Column(name="reading_ability_teacher")
private String readingAbilityTeacher; //阅读能力-师评
@Column(name="reading_ability_self")
private String readingAbilitySelf; //阅读能力-自评
@Column(name="reading_ability_parents")
private String readingAbilityParents; //阅读能力-家长评价
@Column(name="expression_ability_teacher")
private String expressionAbilityTeacher; //表达能力
@Column(name="expression_ability_self")
private String expressionAbilitySelf;
@Column(name="expression_ability_parents")
private String expressionAbilityParents;
@Column(name="writing_ability_teacher")
private String writingAbilityTeacher; //写作能力
@Column(name="writing_ability_self")
private String writingAbilitySelf;
@Column(name="writing_ability_parents")
private String writingAbilityParents;
@Column(name="cooperation_ability_teacher")
private String cooperationAbilityTeacher; //团队协作能力
@Column(name="cooperation_ability_self")
private String cooperationAbilitySelf;
@Column(name="cooperation_ability_parents")
private String cooperationAbilityParents;
@Column(name="art_ability_teacher")
private String artAbilityTeacher; //艺术能力
@Column(name="art_ability_self")
private String artAbilitySelf;
@Column(name="art_ability_parents")
private String artAbilityParents;
@Column(name="sport_ability_teacher")
private String sportAbilityTeacher; //运动能力
@Column(name="sport_ability_self")
private String sportAbilitySelf;
@Column(name="sport_ability_parents")
private String sportAbilityParents;
@Column(name="daily_ability_teacher")
private String dailyAbilityTeacher; //日常表现
@Column(name="daily_ability_self")
private String dailyAbilitySelf;
@Column(name="daily_ability_parents")
private String dailyAbilityParents;
@Column(name="reserve1")
private String reserve1;
@Column(name="reserve2")
private String reserve2;
@Column(name="state")
private int state =1;
@Column(name="creator_id")
private long creatorId;
@Column(name="creator_nick")
private String creatorNick;
@Column(name="create_time")
private Date createTime;
@Column(name="last_modify_id")
private long lastModifyId;
@Column(name="last_modify_nick")
private String lastModifyNick;
@Column(name="last_modify_time")
private Date lastModifyTime;
@ManyToOne(cascade= CascadeType.REFRESH, fetch= FetchType.EAGER)
@JoinColumn(name="student_id", insertable=true, updatable=true)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
private Student student;
@Column(name="blood_type")
private Integer bloodType; //血型
@Column(name="allergic_history")
private String allergicHistory; //过敏史
@Column(name="past_medical_history")
private String pastMedicalHistory; //既往史
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getUserId() {
return userId;
}
public void setUserId(long userId) {
this.userId = userId;
}
public String getHobby() {
return hobby;
}
public void setHobby(String hobby) {
this.hobby = hobby;
}
public String getSpecialty() {
return specialty;
}
public void setSpecialty(String specialty) {
this.specialty = specialty;
}
public String getIdeal() {
return ideal;
}
public void setIdeal(String ideal) {
this.ideal = ideal;
}
public String getFamous() {
return famous;
}
public void setFamous(String famous) {
this.famous = famous;
}
public String getParentsSendWord() {
return parentsSendWord;
}
public void setParentsSendWord(String parentsSendWord) {
this.parentsSendWord = parentsSendWord;
}
public String getTeacherSendWord() {
return teacherSendWord;
}
public void setTeacherSendWord(String teacherSendWord) {
this.teacherSendWord = teacherSendWord;
}
public String getHonorAndWorks() {
return honorAndWorks;
}
public void setHonorAndWorks(String honorAndWorks) {
this.honorAndWorks = honorAndWorks;
}
public String getFavouriteWork() {
return favouriteWork;
}
public void setFavouriteWork(String favouriteWork) {
this.favouriteWork = favouriteWork;
}
public String getReadingAbilityTeacher() {
return readingAbilityTeacher;
}
public void setReadingAbilityTeacher(String readingAbilityTeacher) {
this.readingAbilityTeacher = readingAbilityTeacher;
}
public String getReadingAbilitySelf() {
return readingAbilitySelf;
}
public void setReadingAbilitySelf(String readingAbilitySelf) {
this.readingAbilitySelf = readingAbilitySelf;
}
public String getReadingAbilityParents() {
return readingAbilityParents;
}
public void setReadingAbilityParents(String readingAbilityParents) {
this.readingAbilityParents = readingAbilityParents;
}
public String getExpressionAbilityTeacher() {
return expressionAbilityTeacher;
}
public void setExpressionAbilityTeacher(String expressionAbilityTeacher) {
this.expressionAbilityTeacher = expressionAbilityTeacher;
}
public String getExpressionAbilitySelf() {
return expressionAbilitySelf;
}
public void setExpressionAbilitySelf(String expressionAbilitySelf) {
this.expressionAbilitySelf = expressionAbilitySelf;
}
public String getExpressionAbilityParents() {
return expressionAbilityParents;
}
public void setExpressionAbilityParents(String expressionAbilityParents) {
this.expressionAbilityParents = expressionAbilityParents;
}
public String getWritingAbilityTeacher() {
return writingAbilityTeacher;
}
public void setWritingAbilityTeacher(String writingAbilityTeacher) {
this.writingAbilityTeacher = writingAbilityTeacher;
}
public String getWritingAbilitySelf() {
return writingAbilitySelf;
}
public void setWritingAbilitySelf(String writingAbilitySelf) {
this.writingAbilitySelf = writingAbilitySelf;
}
public String getWritingAbilityParents() {
return writingAbilityParents;
}
public void setWritingAbilityParents(String writingAbilityParents) {
this.writingAbilityParents = writingAbilityParents;
}
public String getCooperationAbilityTeacher() {
return cooperationAbilityTeacher;
}
public void setCooperationAbilityTeacher(String cooperationAbilityTeacher) {
this.cooperationAbilityTeacher = cooperationAbilityTeacher;
}
public String getCooperationAbilitySelf() {
return cooperationAbilitySelf;
}
public void setCooperationAbilitySelf(String cooperationAbilitySelf) {
this.cooperationAbilitySelf = cooperationAbilitySelf;
}
public String getCooperationAbilityParents() {
return cooperationAbilityParents;
}
public void setCooperationAbilityParents(String cooperationAbilityParents) {
this.cooperationAbilityParents = cooperationAbilityParents;
}
public String getArtAbilityTeacher() {
return artAbilityTeacher;
}
public void setArtAbilityTeacher(String artAbilityTeacher) {
this.artAbilityTeacher = artAbilityTeacher;
}
public String getArtAbilitySelf() {
return artAbilitySelf;
}
public void setArtAbilitySelf(String artAbilitySelf) {
this.artAbilitySelf = artAbilitySelf;
}
public String getArtAbilityParents() {
return artAbilityParents;
}
public void setArtAbilityParents(String artAbilityParents) {
this.artAbilityParents = artAbilityParents;
}
public String getSportAbilityTeacher() {
return sportAbilityTeacher;
}
public void setSportAbilityTeacher(String sportAbilityTeacher) {
this.sportAbilityTeacher = sportAbilityTeacher;
}
public String getSportAbilitySelf() {
return sportAbilitySelf;
}
public void setSportAbilitySelf(String sportAbilitySelf) {
this.sportAbilitySelf = sportAbilitySelf;
}
public String getSportAbilityParents() {
return sportAbilityParents;
}
public void setSportAbilityParents(String sportAbilityParents) {
this.sportAbilityParents = sportAbilityParents;
}
public String getDailyAbilityTeacher() {
return dailyAbilityTeacher;
}
public void setDailyAbilityTeacher(String dailyAbilityTeacher) {
this.dailyAbilityTeacher = dailyAbilityTeacher;
}
public String getDailyAbilitySelf() {
return dailyAbilitySelf;
}
public void setDailyAbilitySelf(String dailyAbilitySelf) {
this.dailyAbilitySelf = dailyAbilitySelf;
}
public String getDailyAbilityParents() {
return dailyAbilityParents;
}
public void setDailyAbilityParents(String dailyAbilityParents) {
this.dailyAbilityParents = dailyAbilityParents;
}
public String getReserve1() {
return reserve1;
}
public void setReserve1(String reserve1) {
this.reserve1 = reserve1;
}
public String getReserve2() {
return reserve2;
}
public void setReserve2(String reserve2) {
this.reserve2 = reserve2;
}
public int getState() {
return state;
}
public void setState(int state) {
this.state = state;
}
public long getCreatorId() {
return creatorId;
}
public void setCreatorId(long creatorId) {
this.creatorId = creatorId;
}
public String getCreatorNick() {
return creatorNick;
}
public void setCreatorNick(String creatorNick) {
this.creatorNick = creatorNick;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public long getLastModifyId() {
return lastModifyId;
}
public void setLastModifyId(long lastModifyId) {
this.lastModifyId = lastModifyId;
}
public String getLastModifyNick() {
return lastModifyNick;
}
public void setLastModifyNick(String lastModifyNick) {
this.lastModifyNick = lastModifyNick;
}
public Date getLastModifyTime() {
return lastModifyTime;
}
public void setLastModifyTime(Date lastModifyTime) {
this.lastModifyTime = lastModifyTime;
}
public Student getStudent() {
return student;
}
public void setStudent(Student student) {
this.student = student;
}
public Integer getBloodType() {
return bloodType;
}
public void setBloodType(Integer bloodType) {
this.bloodType = bloodType;
}
public String getAllergicHistory() {
return allergicHistory;
}
public void setAllergicHistory(String allergicHistory) {
this.allergicHistory = allergicHistory;
}
public String getPastMedicalHistory() {
return pastMedicalHistory;
}
public void setPastMedicalHistory(String pastMedicalHistory) {
this.pastMedicalHistory = pastMedicalHistory;
}
}
| [
"lizhou828@126.com"
] | lizhou828@126.com |
a3d8168993d5d6d052b2d8f1979b303b7c153057 | 53d4eb5592c9257c6abb1c94984488c8a72860cc | /src/backend/Customize packages/getCustDestinations.java | 3bdb9904a3a09ddb40c74fbeb2bcd7f4e24ad842 | [] | no_license | Shalini2104/Online-Vacation-Planner | 34da8b0da816fc52d4908da88988f4331be9e2f4 | ff37348953f52c6f707ec200595caea854713e7d | refs/heads/main | 2023-07-17T13:22:16.911840 | 2021-08-26T04:22:28 | 2021-08-26T04:22:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,483 | java | import java.sql.*;
import java.io.*;
import jakarta.servlet.*;
import jakarta.servlet.http.*;
public class getCustDestinations extends HttpServlet {
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text");
PrintWriter pw=response.getWriter();
Connection con;
Statement st;
ResultSet rs;
try
{
Class.forName("com.mysql.cj.jdbc.Driver");
try
{
con =DriverManager.getConnection("jdbc:mysql://localhost:3306/vacayplanner","root","root");
try
{
String srch = " SELECT DISTINCT(DestName) FROM custActivity;";
st=con.createStatement();
rs=st.executeQuery(srch);
while(rs.next()){
pw.println("<option value=\""+rs.getString(1)+"\">"+rs.getString(1));
}
}
catch(SQLException e)
{
pw.println(e);
}
}
catch (SQLException e)
{
pw.println(e);
}
}
catch(ClassNotFoundException e)
{
pw.println(e);
}
pw.close();
}
} | [
"noreply@github.com"
] | Shalini2104.noreply@github.com |
56e631de94531c6700b1ddd4ef34be5c5602b97c | bffd93a5b4715c020ab558f7e6421221dce43463 | /src/main/java/net/bourgau/philippe/concurrency/kata/unbounded/concurrent/UnboundedConcurrent.java | b7f738a1222e9f47c6c0649049cacab2b83aee63 | [
"MIT"
] | permissive | moledamaciej/concurrency-kata | 190f3fc36cfff93a1e1cf03bf413752e8d3c22c2 | e3f8efbcc027e476c2225efdea7625d66f47559c | refs/heads/master | 2021-05-29T15:32:28.150296 | 2015-08-15T07:00:03 | 2015-08-15T07:00:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 768 | java | package net.bourgau.philippe.concurrency.kata.unbounded.concurrent;
import net.bourgau.philippe.concurrency.kata.common.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class UnboundedConcurrent extends ThreadPoolImplementation {
@Override
protected ExecutorService newThreadPool() {
return Executors.newCachedThreadPool();
}
@Override
public ChatRoom newChatRoom() {
return new ConcurrentChatRoom(
new SynchronizedChatRoom(new InProcessChatRoom(new ConcurrentHashMap<Output, String>())),
threadPool());
}
@Override
public String toString() {
return "Unbounded Concurrent";
}
}
| [
"philippe.bourgau@gmail.com"
] | philippe.bourgau@gmail.com |
05913329bf5dc26e29975f7a465e19ce1e65d7b0 | 491ecb26ff8d2dacd6b97e8f27ae8fbe59ae4ba5 | /slack-api-client/src/main/java/com/slack/api/methods/request/stars/StarsRemoveRequest.java | 88bbd9d1d3fcbb61457d4f07891ff92c16ce47f3 | [
"MIT"
] | permissive | seratch/java-slack-sdk | af238d3c507d3525f9b81aa35ba4ad81a2e4f2c8 | e2218be44d17c4bde16f865fd182e22e8b1db635 | refs/heads/main | 2023-07-25T17:26:57.228078 | 2020-12-02T12:20:38 | 2020-12-02T12:23:50 | 237,015,084 | 1 | 2 | MIT | 2021-05-07T01:34:06 | 2020-01-29T15:25:22 | Java | UTF-8 | Java | false | false | 747 | java | package com.slack.api.methods.request.stars;
import com.slack.api.methods.SlackApiRequest;
import lombok.Builder;
import lombok.Data;
@Data
@Builder
public class StarsRemoveRequest implements SlackApiRequest {
/**
* Authentication token. Requires scope: `stars:write`
*/
private String token;
/**
* File to remove star from.
*/
private String file;
/**
* File comment to remove star from.
*/
private String fileComment;
/**
* Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`).
*/
private String channel;
/**
* Timestamp of the message to remove star from.
*/
private String timestamp;
} | [
"seratch@gmail.com"
] | seratch@gmail.com |
bfa3ac377adc0685d8fcf80c105b8a10884ba4c3 | 219cc198e1c215d47099045039f250309a488d23 | /app/src/main/java/com/sevenrealm/base/imovies/provider/Contract.java | 124138984e48e7b055156df9f89a3c284b8c9723 | [] | no_license | MohamedAliArafa/IMoviesApp | 9b16917f48c80ce304974a751b81cc6131eab235 | 53f74a03889b2e0c7a75ea00783e6623d837f4a6 | refs/heads/master | 2021-06-15T14:19:32.595451 | 2017-04-23T09:16:43 | 2017-04-23T09:16:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,208 | java | package com.sevenrealm.base.imovies.provider;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.net.Uri;
import android.provider.BaseColumns;
public class Contract {
public static final String CONTENT_AUTHORITY = "com.sevenrealm.base.imovies";
public static final Uri BASE_CONTENT = Uri.parse("content://"+ CONTENT_AUTHORITY);
public static final String PATH_MOVIES = "movies";
public static final String PATH_REVIEWS = "reviews";
public static final String PATH_VIDEOS = "videos";
public static final class MovieEntry implements BaseColumns{
public static Uri CONTENT_URI = BASE_CONTENT.buildUpon().appendPath(PATH_MOVIES).build();
public static String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + "/" + CONTENT_AUTHORITY + "/" + PATH_MOVIES;
public static String COLUMN_ID = "id";
public static String TABLE_NAME = "movies";
public static String COLUMN_FAV = "fav";
public static String COLUMN_IMAGE_PATH = "image";
public static String COLUMN_POSTER_PATH = "poster";
public static String COLUMN_TITLE = "title";
public static String COLUMN_OVERVIEW = "overview";
public static String COLUMN_RELEASE_DATE = "release";
public static String COLUMN_VOTE_RATE = "vote";
public static Uri BuildMovieUri(long id){
return ContentUris.withAppendedId(CONTENT_URI,id);
}
}
public static final class ReviewEntry implements BaseColumns{
public static Uri CONTENT_URI = BASE_CONTENT.buildUpon().appendPath(PATH_REVIEWS).build();
public static String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + "/" + CONTENT_AUTHORITY + "/" + PATH_REVIEWS;
public static String TABLE_NAME = "reviews";
public static String COLUMN_MOVIE_ID = "movie_id";
public static String COLUMN_REVIEW_ID = "review_id";
public static String COLUMN_AUTHOR = "author";
public static String COLUMN_CONTENT = "content";
public static Uri BuildReviewUri(long id){
return ContentUris.withAppendedId(CONTENT_URI,id);
}
public static Uri BuildReviewMoviewUri(String movie){
return CONTENT_URI.buildUpon().appendPath(movie).build();
}
}
public static final class VideoEntry implements BaseColumns{
public static Uri CONTENT_URI = BASE_CONTENT.buildUpon().appendPath(PATH_VIDEOS).build();
public static String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + "/" + CONTENT_AUTHORITY + "/" + PATH_VIDEOS;
public static String TABLE_NAME = "video";
public static String COLUMN_MOVIE_ID = "movie_id";
public static String COLUMN_VIDEO_ID = "video_id";
public static String COLUMN_KEY = "key";
public static String COLUMN_NAME = "name";
public static String COLUMN_SITE = "site";
public static Uri BuildVideoUri(long id){
return ContentUris.withAppendedId(CONTENT_URI,id);
}
public static Uri BuildVideoMoviewUri(String movie){
return CONTENT_URI.buildUpon().appendPath(movie).build();
}
}
}
| [
"ghostarafa@gmail.com"
] | ghostarafa@gmail.com |
8e57b0b2e4e5954ef2b87f4037755d9f851a30f0 | 75e95b7cd16818895ae9afea23032c881cbc439f | /ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToShort.java | 615738a7f1675a78f8a9d0f6df153428f40a0d24 | [
"MIT",
"JSON",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | strategist922/hive.1.1.4_comment | 9d943e3b778620c42b2b1285ad14cdb2a684eba6 | 7a774f4eca5fe96ac50493c37e0a0efdefdeecc8 | refs/heads/master | 2016-09-06T10:30:34.912454 | 2013-07-28T11:52:39 | 2013-07-28T11:52:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,630 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.udf;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.hive.serde2.io.ByteWritable;
import org.apache.hadoop.hive.serde2.io.DoubleWritable;
import org.apache.hadoop.hive.serde2.io.ShortWritable;
import org.apache.hadoop.hive.serde2.lazy.LazyLong;
import org.apache.hadoop.io.BooleanWritable;
import org.apache.hadoop.io.FloatWritable;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
/**
* UDFToShort.
*
*/
public class UDFToShort extends UDF {
ShortWritable shortWritable = new ShortWritable();
public UDFToShort() {
}
/**
* Convert from void to a short. This is called for CAST(... AS SMALLINT)
*
* @param i
* The void value to convert
* @return ShortWritable
*/
public ShortWritable evaluate(NullWritable i) {
return null;
}
/**
* Convert from boolean to a short. This is called for CAST(... AS SMALLINT)
*
* @param i
* The boolean value to convert
* @return ShortWritable
*/
public ShortWritable evaluate(BooleanWritable i) {
if (i == null) {
return null;
} else {
shortWritable.set(i.get() ? (short) 1 : (short) 0);
return shortWritable;
}
}
/**
* Convert from byte to a short. This is called for CAST(... AS SMALLINT)
*
* @param i
* The byte value to convert
* @return ShortWritable
*/
public ShortWritable evaluate(ByteWritable i) {
if (i == null) {
return null;
} else {
shortWritable.set(i.get());
return shortWritable;
}
}
/**
* Convert from integer to a short. This is called for CAST(... AS SMALLINT)
*
* @param i
* The integer value to convert
* @return ShortWritable
*/
public ShortWritable evaluate(IntWritable i) {
if (i == null) {
return null;
} else {
shortWritable.set((short) i.get());
return shortWritable;
}
}
/**
* Convert from long to a short. This is called for CAST(... AS SMALLINT)
*
* @param i
* The long value to convert
* @return ShortWritable
*/
public ShortWritable evaluate(LongWritable i) {
if (i == null) {
return null;
} else {
shortWritable.set((short) i.get());
return shortWritable;
}
}
/**
* Convert from float to a short. This is called for CAST(... AS SMALLINT)
*
* @param i
* The float value to convert
* @return ShortWritable
*/
public ShortWritable evaluate(FloatWritable i) {
if (i == null) {
return null;
} else {
shortWritable.set((short) i.get());
return shortWritable;
}
}
/**
* Convert from double to a short. This is called for CAST(... AS SMALLINT)
*
* @param i
* The double value to convert
* @return ShortWritable
*/
public ShortWritable evaluate(DoubleWritable i) {
if (i == null) {
return null;
} else {
shortWritable.set((short) i.get());
return shortWritable;
}
}
/**
* Convert from string to a short. This is called for CAST(... AS SMALLINT)
*
* @param i
* The string value to convert
* @return ShortWritable
*/
public ShortWritable evaluate(Text i) {
if (i == null) {
return null;
} else {
try {
shortWritable.set((short)LazyLong.parseLong(i.toString(), 10, Short.MAX_VALUE, Short.MIN_VALUE));
return shortWritable;
} catch (NumberFormatException e) {
// MySQL returns 0 if the string is not a well-formed numeric value.
// return Byte.valueOf(0);
// But we decided to return NULL instead, which is more conservative.
return null;
}
}
}
}
| [
"hongjie.is@gmail.com"
] | hongjie.is@gmail.com |
633fba71113a021b2ab4820f6d4a57ca8597c450 | 178aa70a8404bc18de5794dd41cf26fcff753704 | /Holograms/src/main/java/com/sainttx/holograms/commands/CommandInsertLine.java | 496d4b2f3dd2adba69ff2a198336ab49ec75a952 | [] | no_license | TigerHix/Holograms | ab9f024733744c92d789b44bb17cf669f0aed33f | 2bfd511ad0bc69b6ace6a1744217b84afcbd4042 | refs/heads/master | 2020-12-28T08:32:59.628623 | 2016-05-26T14:36:56 | 2016-05-26T14:36:56 | 59,757,299 | 2 | 0 | null | 2016-05-26T14:33:00 | 2016-05-26T14:33:00 | null | UTF-8 | Java | false | false | 2,427 | java | package com.sainttx.holograms.commands;
import com.sainttx.holograms.api.Hologram;
import com.sainttx.holograms.api.HologramPlugin;
import com.sainttx.holograms.api.line.HologramLine;
import com.sainttx.holograms.util.TextUtil;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import java.util.Collection;
public class CommandInsertLine implements CommandExecutor {
private HologramPlugin plugin;
public CommandInsertLine(HologramPlugin plugin) {
this.plugin = plugin;
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length < 4) {
sender.sendMessage(ChatColor.RED + "Usage: /hologram insertline <name> <index> <text>");
} else {
String hologramName = args[1];
Hologram hologram = plugin.getHologramManager().getHologram(hologramName);
if (hologram == null) {
sender.sendMessage(ChatColor.RED + "Couldn't find a hologram with name \"" + hologramName + "\".");
} else {
int index;
try {
index = Integer.parseInt(args[2]);
} catch (NumberFormatException ex) {
sender.sendMessage(ChatColor.RED + "Please enter a valid integer as your index.");
return true;
}
Collection<HologramLine> lines = hologram.getLines();
if (index < 0 || index > lines.size()) {
sender.sendMessage(ChatColor.RED + "Invalid index, must be between 0 and " + lines.size() + ".");
} else {
String text = TextUtil.implode(3, args);
try {
HologramLine line = plugin.parseLine(hologram, text);
hologram.addLine(line, index);
} catch (Exception ex) {
sender.sendMessage(ChatColor.RED + "Error: " + ex.getMessage());
return true;
}
sender.sendMessage(TextUtil.color("&7Inserted line &f\"" + text + "&f\" &7into hologram &f\""
+ hologram.getId() + "\" &7at index &f" + index + "."));
}
}
}
return true;
}
} | [
"matthew.steglinski@utoronto.ca"
] | matthew.steglinski@utoronto.ca |
8367df52017b169606517f679be8643d5c075752 | 697e6533fde760b07a7f62f69a385ecf6ce112c9 | /java/pattern/src/proxy/staticproxy/Star.java | bbda4776871ba3d66f482d69e49863b309eb451a | [
"MIT"
] | permissive | ellen-wu/design-pattern | ee831fb61b9cf0a48baf1d8c0af0161f213ba279 | 31cf406db5bc61a9076874938069e68544d75390 | refs/heads/main | 2023-01-01T23:00:53.821624 | 2020-10-28T01:51:05 | 2020-10-28T01:51:05 | 307,872,836 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 236 | java | package proxy.staticproxy;
public interface Star {
// 面谈
void confer();
// 签合同
void signContract();
// 订票
void bookTicket();
// 唱歌
void sing();
// 收钱
void collectMoney();
}
| [
"xiaoqin573@163.com"
] | xiaoqin573@163.com |
486c443691bcef6459bc134f35130a08a97d2d9c | 5b8e68f011c1c6d8828abe20d9bac673b95ca859 | /src/main/java/amsfx/DisplayResultsController.java | 117ce10ad207626eb5cd544cbdb91c400407b1be | [] | no_license | anitarex/AmsfxDeals | dbe46ebf380b865d00c01d8aa57cb859363f4e5b | dce5d17b79de9c66288b6c5c4c1d10f93aed760a | refs/heads/master | 2021-05-15T08:10:10.792685 | 2017-10-22T14:20:49 | 2017-10-22T14:20:49 | 107,870,560 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,421 | java | package amsfx;
import javax.persistence.Query;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
@Controller
public class DisplayResultsController {
@Autowired
private DealDao displayDao;
Map<String, String> dmessages = new HashMap<String, String>();
ModelMap modelMap1;
private static final Logger logger = Logger.getLogger(DisplayResultsController.class);
@RequestMapping(value="/results", method = RequestMethod.GET)
public ModelAndView getFileName(HttpServletRequest request)
{
System.out.println("Inside getFileName Method");
return new ModelAndView("UploadForm.jsp", "displayDao", displayDao);
}
@RequestMapping(value="/results", method = RequestMethod.POST)
public ModelAndView importSummary(HttpServletRequest request, ModelMap modelMap1)
{
logger.info("Inside import Summary Method");
String sourceFileName = request.getParameter("sourceFileName");
if(displayDao.importFileExists(sourceFileName))
{
logger.info("Import file Exists");
return new ModelAndView("DisplaySummary", "displayDao", displayDao);
}
else
{ dmessages.put("filename-notexists", "There is no imported file with the file name you have entered. "
+ "Please enter the correct file name");
modelMap1.put("dmessages", dmessages);
logger.info("filename-not exists: There is no imported file with the file name you have entered. "
+ "Please enter the correct file name");
return new ModelAndView("UploadForm");
}
}
public ModelAndView validResults(HttpServletRequest request, ModelMap modelMap1)
{
System.out.println("Inside validResults() Method");
String sourceFileName = request.getParameter("sourceFileName");
if(displayDao.fileExists(sourceFileName))
{
return new ModelAndView("DisplayResults", "displayDao", displayDao);
}
else
{ dmessages.put("filename-notexists", "There is no deal stored against the file name you have entered. "
+ "Please enter the correct file name");
modelMap1.put("dmessages", dmessages);
return new ModelAndView("UploadForm");
}
}
}
| [
"anitarex@gmail.com"
] | anitarex@gmail.com |
dff4ccc1d5558026ed1b3ead48eef42ef861ee51 | d6276f001009059a20302091fb35d6675c110023 | /JFontChooser.java | 61dc225f93a2693744b74306371fb54dea1ac49d | [] | no_license | awaisibrahim7/Notepad | ef3f0ab17bc0bd142e6723d84cf1b43fa3460a59 | f9474245208e45e51abc86074b3c5b8ea055d5f5 | refs/heads/master | 2020-03-11T00:26:13.964359 | 2018-04-16T00:40:55 | 2018-04-16T00:40:55 | 129,663,779 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,048 | java | /**
* Name: Ibrahim, Awais
* Project: #3
* Due: 3/10/18
* Course: CS24501-w18
*
* Description:
* Create JFontChooser to be used in the Windows version of Notepad.
*/
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.Color;
public class JFontChooser
{
private Color color;
private Font font;
private String fontName;
private static int fontStyle;
private int fontSize;
JDialog jdlg;
JFontChooser(JFrame jfrm)
{
color = Color.BLACK;
fontName = "Courier New";
fontStyle = Font.PLAIN;
fontSize = 12;
font = new Font(fontName, fontStyle, fontSize);
jdlg = new JDialog(jfrm, "Font", true);
jdlg.setSize(275, 600);
jdlg.getContentPane().setLayout(new BoxLayout(jdlg.getContentPane(), BoxLayout.Y_AXIS));
jdlg.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
String strStyle = fntToString(fontStyle);
JLabel fontLab = new JLabel("Font:");
JLabel styleLab = new JLabel("Font style:");
JLabel sizeLab = new JLabel("Size:");
JLabel sampleLab = new JLabel("Sample");
JLabel sampText = new JLabel("AaBbYyZz");
sampText.setFont(font);
JButton ok = new JButton("OK");
JButton cancel = new JButton("Cancel");
JButton fontColor = new JButton("Font Color");
JTextField jtf = new JTextField(fontName, 0);
jtf.setEditable(false);
JTextField jtfFS = new JTextField(strStyle, 0);
jtfFS.setEditable(false);
JTextField jtfS = new JTextField("" + fontSize, 0);
jtfS.setEditable(false);
JPanel f = new JPanel();
JPanel fc = new JPanel();
JPanel c = new JPanel();
JPanel jpan1 = new JPanel();
JPanel jpan2 = new JPanel();
JPanel jpan3 = new JPanel();
jpan1.setLayout(new GridLayout(1,2));
jpan2.setLayout(new GridLayout(1,2));
jpan3.setLayout(new GridLayout(1,2));
f.add(fontLab);
f.add(jtf);
jdlg.add(f);
DefaultListModel dlm = new DefaultListModel();
DefaultListModel dlmFS = new DefaultListModel();
DefaultListModel dlmS = new DefaultListModel();
Integer[] fStyle = {Font.PLAIN,Font.ITALIC,Font.BOLD, Font.BOLD | Font.ITALIC}; //0 2 1 3
String[] strFStyle = {"Regular","Italic","Bold","Bold Italic"};
Integer[] fSize = {8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
GraphicsEnvironment gEnv =
GraphicsEnvironment.getLocalGraphicsEnvironment();
//Creates array of all available fonts
String fonts[] = gEnv.getAvailableFontFamilyNames();
for(int i = 0; i < fonts.length; i++)
dlm.addElement(fonts[i]);
for(int j = 0; j < fStyle.length; j++)
dlmFS.addElement(strFStyle[j]);
for(int k = 0; k < fSize.length; k++)
dlmS.addElement(fSize[k]);
JList jlst = new JList(dlm);
jlst.setSelectionMode(DefaultListSelectionModel.SINGLE_SELECTION);
JScrollPane jsp = new JScrollPane(jlst, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
// Set the preferred size of the scroll pane.
jsp.setPreferredSize(new Dimension(250, 120));
//Set initial value for font list
jlst.setSelectedValue(fontName, true);
JList jlstFS = new JList(dlmFS);
jlstFS.setSelectionMode(DefaultListSelectionModel.SINGLE_SELECTION);
JScrollPane jspFS = new JScrollPane(jlstFS, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
// Set the preferred size of the scroll pane.
jspFS.setPreferredSize(new Dimension(250, 100));
//Set initial value for font style list
jlstFS.setSelectedValue(fntToString(fontStyle), false);
JList jlstS = new JList(dlmS);
jlstS.setSelectionMode(DefaultListSelectionModel.SINGLE_SELECTION);
JScrollPane jspS = new JScrollPane(jlstS, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
// Set the preferred size of the scroll pane.
jspS.setPreferredSize(new Dimension(250, 120));
//Set initial value for font size list
jlstS.setSelectedValue(fontSize, true);
fontLab.setLabelFor(jsp);
styleLab.setLabelFor(jspFS);
sizeLab.setLabelFor(jspS);
// Respond to the Cancel button in the dialog.
cancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent le) {
// Hide the dialog after cancel is selected
jdlg.setVisible(false);
}
});
//Responds to ok button in dialog
ok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent le) {
Object valuesF[] = jlst.getSelectedValues();
Object valuesFS[] = jlstFS.getSelectedValues();
Object valuesS[] = jlstS.getSelectedValues();
font = new Font((String)valuesF[0],fntToInt((String)valuesFS[0]), (int)valuesS[0]);
sampText.setFont(font);
// Hide the dialog after all info is processed
jdlg.setVisible(false);
}
});
//Action Listener to open Color Chooser Dialog
fontColor.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent le) {
// Hide the dialog after cancel is selected
//jdlg.setVisible(false);
color = JColorChooser.showDialog(null,"Choose Color",Color.BLACK);
}
});
// Add selection listener for the Font list.
jlst.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent le) {
// Get the index of the changed item.
Object values[] = jlst.getSelectedValues();
// Confirm that an item has been selected.
if (values.length != 0)
{
fontName = (String)values[0];
sampText.setFont(new Font((String)values[0],fontStyle, fontSize));
jtf.setText((String)values[0]);
return;
}
}
});
// Add selection listener for the Font Style list.
jlstFS.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent le) {
// Get the index of the changed item.
Object values[] = jlstFS.getSelectedValues();
// Confirm that an item has been selected.
if (values.length != 0)
{
fontStyle = fntToInt((String)values[0]);
sampText.setFont(new Font(fontName,fntToInt((String)values[0]), fontSize));
jtfFS.setText((String)values[0]);
return;
}
}
});
// Add selection listener for the Font Size list.
jlstS.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent le) {
// Get the index of the changed item.
Object values[] = jlstS.getSelectedValues();
// Confirm that an item has been selected.
if (values.length != 0)
{
fontSize = (int)values[0];
sampText.setFont(new Font(fontName,fontStyle,(int)values[0]));
jtfS.setText("" + values[0]);
return;
}
}
});
jdlg.add(jsp);
fc.add(styleLab);
fc.add(jtfFS);
jdlg.add(fc);
jdlg.add(jspFS);
c.add(sizeLab);
c.add(jtfS);
jdlg.add(c);
jdlg.add(jspS);
jpan1.add(sampleLab);
jpan1.add(sampText);
jpan3.add(ok);
jpan3.add(cancel);
jdlg.add(jpan1);
jdlg.add(fontColor);
jdlg.add(jpan3);
jdlg.setVisible(false);
}
public void setDefault(Object initial)
{
try
{
font = (Font)initial;
fontName = font.getFontName();
fontStyle = font.getStyle();
fontSize = font.getSize();
}
catch(Exception e)
{
}
try
{
color = (Color)initial;
}
catch(Exception e)
{
}
}
public static String fntToString(int font)
{
String strStyle = "";
if(fontStyle == 0)
strStyle = "Regular";
else if(fontStyle == 1)
strStyle = "Bold";
else if(fontStyle == 2)
strStyle = "Italics";
else if(fontStyle == 3)
strStyle = "Bold Italic";
return strStyle;
}
public static int fntToInt(String font)
{
if(font.equals("Regular"))
return 0;
else if(font.equals("Bold"))
return 1;
else if(font.equals("Italic"))
return 2;
else
return 3;
}
public Font getFont()
{
return font;
}
public Color getColor()
{
return color;
}
public String getStyle()
{
return fntToString(fontStyle);
}
public int getSize()
{
return fontSize;
}
public boolean showDialog(JFrame jfrm)
{
jdlg.setVisible(true);
return true;
}
}
| [
"noreply@github.com"
] | awaisibrahim7.noreply@github.com |
71965fb07a7d9a3a0a16d30968e76c5691cdce4c | 5ff66d5b866dabd6a5ba364e9b28758b4c3cc6c4 | /src/PaintingApplication.java | ca994a57794eb7e01fba41a15c4de494f45cadd8 | [] | no_license | Moebius05/Exercise_3 | 6bcc3bed8230d7a74667d4936ad84d5399e42947 | f9cd233fb70796cebe05a4390315b921c2212a5e | refs/heads/master | 2020-04-06T22:03:24.234210 | 2018-11-16T06:36:49 | 2018-11-16T06:36:49 | 157,823,310 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 255 | java | public class PaintingApplication {
public static void main(String[] args) {
Derek derek = new Derek();
derek.hangPainting();
Tool tool = new Tool("Hammer");
derek.setTool(tool);
derek.hangPainting();
}
}
| [
"Paul_Friedrich@gmx.at"
] | Paul_Friedrich@gmx.at |
f438a4ebc336527893c8f204e282284b91840b3a | 4340132605321f209781c3579923873be2991202 | /src/main/java/com/sinorail/cwzywst/util/ExcelUtils.java | 0b88e430278882c0cc89345b3b122e2419a60c0b | [] | no_license | ww931201/qui-jfinal-popedom-tabs | 98a79ad60d564caad9efcefa9dd08a3b58a506dd | 5f7eb5418a4e4fadf18364e6d5f2d2292b3711f1 | refs/heads/master | 2021-08-08T10:39:36.137086 | 2017-11-10T05:59:06 | 2017-11-10T05:59:06 | 110,192,686 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 23,353 | java | package com.sinorail.cwzywst.util;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.LinkedList;
import java.util.List;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.jfinal.plugin.activerecord.Record;
public class ExcelUtils {
/**
* 对外提供读取excel 的方法
* @param file
* @param startRowNum 起始行数,从0开始
* @return
* @throws IOException
*/
public static List<List<Object>> readExcel(File file, Integer startRowNum) throws IOException {
String fileName = file.getName();
String extension = fileName.lastIndexOf(".") == -1 ? "" : fileName.substring(fileName.lastIndexOf(".") + 1);
if ("xls".equals(extension)) {
return readHSSFExcel(file, startRowNum);
} else if ("xlsx".equals(extension)) {
return readXSSFExcel(file, startRowNum);
} else {
throw new IOException("不支持的文件类型");
}
}
/**
* 对外提供读取excel 的方法:按单元格读取
* @param file
* @param startRowNum 起始行数,从0开始,结束到行末尾
* @return
* @throws IOException
*/
public static List<List<Object>> readExcel(File file, Integer startRowNum,Integer endRowNum) throws IOException {
String fileName = file.getName();
String extension = fileName.lastIndexOf(".") == -1 ? "" : fileName.substring(fileName.lastIndexOf(".") + 1);
if ("xls".equals(extension)) {
return readHSSFExcel(file, startRowNum,endRowNum);
} else if ("xlsx".equals(extension)) {
return readXSSFExcel(file, startRowNum,endRowNum);
} else {
throw new IOException("不支持的文件类型");
}
}
/**
* 根据RecordList封装excel并导出
*
* 注意: 表头和字段名顺序个数必须一致
*
* @param list RecordList
* @param title 表头名称数组
* @param field 字段名称数组
* @param file 输出到目标文件的file
* @throws IOException
*/
public static void export(List<Record> list, String[] title, String[] field, File file) throws IOException{
HSSFWorkbook wb = new HSSFWorkbook();
try {
HSSFSheet s = wb.createSheet();
HSSFCellStyle cs = wb.createCellStyle();
HSSFCellStyle csbody = wb.createCellStyle();
HSSFFont f = wb.createFont();
f.setFontHeightInPoints((short) 12);
f.setBold(true);
cs.setVerticalAlignment(VerticalAlignment.CENTER);
csbody.setVerticalAlignment(VerticalAlignment.CENTER);
cs.setFont(f);
cs.setFillForegroundColor((short) 0xA);
wb.setSheetName(0, "sheet1");
int rownum;
//System.out.println("***************"+list.size());
for (rownum = 0; rownum <= list.size(); rownum++) {
HSSFRow r = null;
Record es = null;
int titleRows = 1;
if(rownum < titleRows) { //表头
r = s.createRow(rownum);
r.setHeight((short) 0x240);
for (int cellnum = 0; cellnum < title.length; cellnum ++) {
HSSFCell c = r.createCell(cellnum);
c.setCellValue(title[cellnum]);
c.setCellStyle(cs);
s.setColumnWidth(cellnum, (int) (title[cellnum].length()*1000));
}
} else {
r = s.createRow(rownum);
r.setHeight((short) 0x160);
es = list.get(rownum-titleRows);
for (int cellnum = 0; cellnum < title.length; cellnum ++) {
HSSFCell c = r.createCell(cellnum);
Object value = es.get(field[cellnum]);
if(value == null) {
c.setCellValue("");
} else {
c.setCellValue(value.toString());
}
c.setCellStyle(csbody);
}
}
}
// create a sheet, set its title then delete it
wb.createSheet();
wb.setSheetName(1, "DeletedSheet");
wb.removeSheetAt(1);
// end deleted sheet
FileOutputStream out = new FileOutputStream(file);
try {
wb.write(out);
} finally {
out.close();
}
} finally {
wb.close();
}
}
/**
* 根据行数和列数确定的位置获取excel文件中单元格的值
* @param file excel文件
* @param rowNum 行数
* @param colNum 列数
* @return 获取到单元格的值
* @throws IOException
*/
public static Object getCellValueFromExcel(File file, Integer rowNum, Integer colNum) throws IOException {
String fileName = file.getName();
String extension = fileName.lastIndexOf(".") == -1 ? "" : fileName.substring(fileName.lastIndexOf(".") + 1);
if ("xls".equals(extension)) {
return getValueHSSFExcel(file, rowNum, colNum);
} else if ("xlsx".equals(extension)) {
return getValueXSSFExcel(file, rowNum, colNum);
} else {
throw new IOException("不支持的文件类型");
}
}
/**
* 根据行数和列数确定的位置替换excel文件中单元格的值 (xls)
* @param file 要替换的excel文件
* @param rowNum 行数
* @param colNum 列数
* @param value 要替换的值
* @param aimfile
* @return 替换后的excel文件
* @throws IOException
*/
public static File replaceCell(File file, Integer rowNum, Integer colNum, String value, File aimfile) throws IOException {
String fileName = file.getName();
String extension = fileName.lastIndexOf(".") == -1 ? "" : fileName.substring(fileName.lastIndexOf(".") + 1);
if ("xls".equals(extension)) {
return replaceCellValueHSSFExcel(file, rowNum, colNum, value, aimfile);
} else if ("xlsx".equals(extension)) {
return replaceCellValueXSSFExcel(file, rowNum, colNum, value, aimfile);
} else {
throw new IOException("不支持的文件类型");
}
}
/**
*
*
* @param file
* @param rowNum
* @param colNum
* @param value
* @param aimfile
* @return
*/
private static File replaceCellValueHSSFExcel(File file, Integer rowNum, Integer colNum, String value, File aimfile) {
// 创建一个HSSF workbook
POIFSFileSystem fs;
try {
fs = new POIFSFileSystem(file);
HSSFWorkbook wb = new HSSFWorkbook(fs);
try {
HSSFSheet sheet = wb.getSheetAt(0);
HSSFRow row = sheet.getRow(rowNum);
HSSFCell cell = row.getCell(colNum);
cell.setCellValue(value);
wb.write(aimfile);
} finally {
wb.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return aimfile;
}
/**
*
* @param file
* @param rowNum
* @param colNum
* @param value
* @param aimfile
* @return
*/
private static File replaceCellValueXSSFExcel(File file, Integer rowNum, Integer colNum, String value, File aimfile) {
try {
// 创建一个HSSF workbook
XSSFWorkbook wb = new XSSFWorkbook(file);
try {
XSSFSheet sheet = wb.getSheetAt(0);
XSSFRow row = sheet.getRow(rowNum);
XSSFCell cell = row.getCell(colNum);
cell.setCellValue(value);
OutputStream out = new FileOutputStream(aimfile);
wb.write(out);
} finally {
wb.close();
}
} catch (IOException e) {
e.printStackTrace();
} catch (InvalidFormatException e) {
e.printStackTrace();
}
return aimfile;
}
/**
* 读取Office HSSF excel 07版本之前
* @param file
* @param startRowNum 起始行数,从0开始,行末输入为null,就结束.
* @return
*/
private static List<List<Object>> readHSSFExcel(File file, Integer startRowNum) {
//创建一个HSSF workbook
POIFSFileSystem fs;
List<List<Object>> list = new LinkedList<List<Object>>();
try {
fs = new POIFSFileSystem(file);
HSSFWorkbook wb = new HSSFWorkbook(fs);
try {
//System.out.println(file.getPath()+file.getName());
for (int k = 0; k < wb.getNumberOfSheets(); k++) {
HSSFSheet sheet = wb.getSheetAt(k);
int rows = sheet.getPhysicalNumberOfRows();
//System.out.println("Sheet " + k + " \"" + wb.getSheetName(k) + "\" has " + rows + " row(s).");
for (int r = startRowNum; r < rows; r++) {
HSSFRow row = sheet.getRow(r);
if (row == null) {
continue;
}
List<Object> linked = new LinkedList<Object>();
//System.out.println("\nROW " + row.getRowNum() + " has " + row.getPhysicalNumberOfCells() + " cell(s).");
for (int c = 0; c < row.getLastCellNum(); c++) {
HSSFCell cell = row.getCell(c);
//String value1;
Object value = null;
if(cell != null) {
switch (cell.getCellTypeEnum()) {
case FORMULA:
//value1 = "FORMULA value=" + cell.getCellFormula();
//value = cell.getCellFormula();
value = cell.getNumericCellValue();
break;
case NUMERIC:
//value1 = "NUMERIC value=" + cell.getNumericCellValue();
value = cell.getNumericCellValue();
break;
case STRING:
//value1 = "STRING value=" + cell.getStringCellValue();
value = cell.getStringCellValue();
break;
case BLANK:
//value1 = "<BLANK>";
value = null;
break;
case BOOLEAN:
//value1 = "BOOLEAN value-" + cell.getBooleanCellValue();
value = cell.getBooleanCellValue();
break;
case ERROR:
//value1 = "ERROR value=" + cell.getErrorCellValue();
value = cell.getErrorCellValue();
break;
default:
//value1 = "UNKNOWN value of type " + cell.getCellTypeEnum();
value = cell.getCellTypeEnum();
}
//System.out.print("CELL col=" + cell.getColumnIndex() + " VALUE="+ value1);
}
linked.add(value);
}
list.add(linked);
//System.out.println();
}
}
} finally {
wb.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return list;
}
/**
* 读取Office HSSF excel 07版本之前
* @param file
* @param startRowNum 起始行数,从0开始,行末尾结束(endRowNum)
* @return
*/
private static List<List<Object>> readHSSFExcel(File file, Integer startRowNum,Integer endRowNum) {
//创建一个HSSF workbook
POIFSFileSystem fs;
List<List<Object>> list = new LinkedList<List<Object>>();
try {
fs = new POIFSFileSystem(file);
HSSFWorkbook wb = new HSSFWorkbook(fs);
try {
//System.out.println(file.getPath()+file.getName());
for (int k = 0; k < wb.getNumberOfSheets(); k++) {
HSSFSheet sheet = wb.getSheetAt(k);
int rows = sheet.getPhysicalNumberOfRows();
//System.out.println("Sheet " + k + " \"" + wb.getSheetName(k) + "\" has " + rows + " row(s).");
for (int r = startRowNum; r < rows; r++) {
HSSFRow row = sheet.getRow(r);
if (row == null) {
continue;
}
List<Object> linked = new LinkedList<Object>();
//System.out.println("\nROW " + row.getRowNum() + " has " + row.getPhysicalNumberOfCells() + " cell(s).");
for (int c = 0; c < endRowNum; c++) {
HSSFCell cell = row.getCell(c);
//String value1;
Object value = null;
if(cell != null) {
switch (cell.getCellTypeEnum()) {
case FORMULA:
//value1 = "FORMULA value=" + cell.getCellFormula();
//value = cell.getCellFormula();
value = cell.getNumericCellValue();
break;
case NUMERIC:
//value1 = "NUMERIC value=" + cell.getNumericCellValue();
value = cell.getNumericCellValue();
break;
case STRING:
//value1 = "STRING value=" + cell.getStringCellValue();
value = cell.getStringCellValue();
break;
case BLANK:
//value1 = "<BLANK>";
value = null;
break;
case BOOLEAN:
//value1 = "BOOLEAN value-" + cell.getBooleanCellValue();
value = cell.getBooleanCellValue();
break;
case ERROR:
//value1 = "ERROR value=" + cell.getErrorCellValue();
value = cell.getErrorCellValue();
break;
default:
//value1 = "UNKNOWN value of type " + cell.getCellTypeEnum();
value = cell.getCellTypeEnum();
}
//System.out.print("CELL col=" + cell.getColumnIndex() + " VALUE="+ value1);
}
linked.add(value);
}
list.add(linked);
//System.out.println();
}
}
} finally {
wb.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return list;
}
/**
* 读取Office XSSF excel
*
* @param file 0行开始读取整行(整行长度),row.getLastCellNum()结束
* @param startRowNum
* @return
*/
private static List<List<Object>> readXSSFExcel(File file, Integer startRowNum) {
//创建一个XSSF workbook
List<List<Object>> list = new LinkedList<List<Object>>();
try {
XSSFWorkbook wb = new XSSFWorkbook(file);
try {
//System.out.println(file.getPath()+file.getName());
for (int k = 0; k < wb.getNumberOfSheets(); k++) {
XSSFSheet sheet = wb.getSheetAt(k);
int rows = sheet.getPhysicalNumberOfRows();
//System.out.println("Sheet " + k + " \"" + wb.getSheetName(k) + "\" has " + rows + " row(s).");
for (int r = startRowNum; r < rows; r++) {
XSSFRow row = sheet.getRow(r);
if (row == null) {
continue;
}
List<Object> linked = new LinkedList<Object>();
//System.out.println("\nROW " + row.getRowNum() + " has " + row.getPhysicalNumberOfCells() + " cell(s).");
for (int c = 0; c < row.getLastCellNum(); c++) {
XSSFCell cell = row.getCell(c);
//String value1;
Object value = null;
if(cell != null) {
switch (cell.getCellTypeEnum()) {
case FORMULA:
//value1 = "FORMULA value=" + cell.getCellFormula();
//value = cell.getCellFormula();
value = cell.getNumericCellValue();
break;
case NUMERIC:
//value1 = "NUMERIC value=" + cell.getNumericCellValue();
value = cell.getNumericCellValue();
//如果是日期格式
if(DateUtil.isCellDateFormatted(cell)){
value = cell.getDateCellValue();
}
break;
case STRING:
//value1 = "STRING value=" + cell.getStringCellValue();
value = cell.getStringCellValue();
break;
case BLANK:
//value1 = "<BLANK>";
value = null;
break;
case BOOLEAN:
//value1 = "BOOLEAN value-" + cell.getBooleanCellValue();
value = cell.getBooleanCellValue();
break;
case ERROR:
//value1 = "ERROR value=" + cell.getErrorCellValue();
value = cell.getErrorCellValue();
break;
default:
//value1 = "UNKNOWN value of type " + cell.getCellTypeEnum();
value = cell.getCellTypeEnum();
}
//System.out.print("CELL col=" + cell.getColumnIndex() + " VALUE="+ value1);
}
linked.add(value);
}
list.add(linked);
//System.out.println();
}
}
} finally {
wb.close();
}
} catch (IOException e) {
e.printStackTrace();
} catch (InvalidFormatException e) {
e.printStackTrace();
}
return list;
}
/**
*
* 读取Office XSSF excel 07版本以后
* @param file 0行开始,行末结束(行标题长度),读取一行数据
* @param startRowNum
* @param endRowNum
* @return
*/
private static List<List<Object>> readXSSFExcel(File file, Integer startRowNum,Integer endRowNum) {
//创建一个XSSF workbook
List<List<Object>> list = new LinkedList<List<Object>>();
try {
XSSFWorkbook wb = new XSSFWorkbook(file);
try {
//System.out.println(file.getPath()+file.getName());
for (int k = 0; k < wb.getNumberOfSheets(); k++) {
XSSFSheet sheet = wb.getSheetAt(k);
int rows = sheet.getPhysicalNumberOfRows();
//System.out.println("Sheet " + k + " \"" + wb.getSheetName(k) + "\" has " + rows + " row(s).");
for (int r = startRowNum; r < rows; r++) {
XSSFRow row = sheet.getRow(r);
if (row == null) {
continue;
}
List<Object> linked = new LinkedList<Object>();
//System.out.println("\nROW " + row.getRowNum() + " has " + row.getPhysicalNumberOfCells() + " cell(s).");
for (int c = 0; c < endRowNum; c++) {
XSSFCell cell = row.getCell(c);
//String value1;
Object value = null;
if(cell != null) {
switch (cell.getCellTypeEnum()) {
case FORMULA:
//value1 = "FORMULA value=" + cell.getCellFormula();
//value = cell.getCellFormula();
value = cell.getNumericCellValue();
break;
case NUMERIC:
//value1 = "NUMERIC value=" + cell.getNumericCellValue();
value = cell.getNumericCellValue();
//如果是日期格式
if(DateUtil.isCellDateFormatted(cell)){
value = cell.getDateCellValue();
}
break;
case STRING:
//value1 = "STRING value=" + cell.getStringCellValue();
value = cell.getStringCellValue();
break;
case BLANK:
//value1 = "<BLANK>";
value = null;
break;
case BOOLEAN:
//value1 = "BOOLEAN value-" + cell.getBooleanCellValue();
value = cell.getBooleanCellValue();
break;
case ERROR:
//value1 = "ERROR value=" + cell.getErrorCellValue();
value = cell.getErrorCellValue();
break;
default:
//value1 = "UNKNOWN value of type " + cell.getCellTypeEnum();
value = cell.getCellTypeEnum();
}
//System.out.print("CELL col=" + cell.getColumnIndex() + " VALUE="+ value1);
}
linked.add(value);
}
list.add(linked);
//System.out.println();
}
}
} finally {
wb.close();
}
} catch (IOException e) {
e.printStackTrace();
} catch (InvalidFormatException e) {
e.printStackTrace();
}
return list;
}
private static Object getValueHSSFExcel(File file, Integer rowNum, Integer colNum) {
Object value = null;
// 创建一个HSSF workbook
POIFSFileSystem fs;
try {
fs = new POIFSFileSystem(file);
HSSFWorkbook wb = new HSSFWorkbook(fs);
try {
// System.out.println(file.getPath()+file.getName());
HSSFSheet sheet = wb.getSheetAt(0);
HSSFRow row = sheet.getRow(rowNum);
HSSFCell cell = row.getCell(colNum);
//String value1;
if (cell != null) {
switch (cell.getCellTypeEnum()) {
case FORMULA:
//value1 = "FORMULA value=" + cell.getCellFormula();
// value = cell.getCellFormula();
value = cell.getNumericCellValue();
break;
case NUMERIC:
//value1 = "NUMERIC value=" + cell.getNumericCellValue();
value = cell.getNumericCellValue();
break;
case STRING:
//value1 = "STRING value=" + cell.getStringCellValue();
value = cell.getStringCellValue();
break;
case BLANK:
//value1 = "<BLANK>";
value = null;
break;
case BOOLEAN:
//value1 = "BOOLEAN value-" + cell.getBooleanCellValue();
value = cell.getBooleanCellValue();
break;
case ERROR:
//value1 = "ERROR value=" + cell.getErrorCellValue();
value = cell.getErrorCellValue();
break;
default:
//value1 = "UNKNOWN value of type " + cell.getCellTypeEnum();
value = cell.getCellTypeEnum();
}
// System.out.print("CELL col=" + cell.getColumnIndex() + "
// VALUE="+ value1);
}
} finally {
wb.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return value;
}
private static Object getValueXSSFExcel(File file, Integer rowNum, Integer colNum) {
Object value = null;
// 创建一个HSSF workbook
XSSFWorkbook wb = null;
try {
wb = new XSSFWorkbook(file);
try {
// System.out.println(file.getPath()+file.getName());
XSSFSheet sheet = wb.getSheetAt(0);
XSSFRow row = sheet.getRow(rowNum);
XSSFCell cell = row.getCell(colNum);
//String value1;
if (cell != null) {
switch (cell.getCellTypeEnum()) {
case FORMULA:
//value1 = "FORMULA value=" + cell.getCellFormula();
// value = cell.getCellFormula();
value = cell.getNumericCellValue();
break;
case NUMERIC:
//value1 = "NUMERIC value=" + cell.getNumericCellValue();
value = cell.getNumericCellValue();
break;
case STRING:
//value1 = "STRING value=" + cell.getStringCellValue();
value = cell.getStringCellValue();
break;
case BLANK:
//value1 = "<BLANK>";
value = null;
break;
case BOOLEAN:
//value1 = "BOOLEAN value-" + cell.getBooleanCellValue();
value = cell.getBooleanCellValue();
break;
case ERROR:
//value1 = "ERROR value=" + cell.getErrorCellValue();
value = cell.getErrorCellValue();
break;
default:
//value1 = "UNKNOWN value of type " + cell.getCellTypeEnum();
value = cell.getCellTypeEnum();
}
// System.out.print("CELL col=" + cell.getColumnIndex() + "
// VALUE="+ value1);
}
} finally {
wb.close();
}
} catch (InvalidFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return value;
}
}
| [
"wangwei@wangwei-PC"
] | wangwei@wangwei-PC |
d69abd2b2fd6d38faac1b653d6838a122fc16bc2 | fe49198469b938a320692bd4be82134541e5e8eb | /scenarios/web/large/gradle/ClassLib037/src/main/java/ClassLib037/Class073.java | f141a4ea2c392cdf3ba453eed6d325909c739672 | [] | no_license | mikeharder/dotnet-cli-perf | 6207594ded2d860fe699fd7ef2ca2ae2ac822d55 | 2c0468cb4de9a5124ef958b315eade7e8d533410 | refs/heads/master | 2022-12-10T17:35:02.223404 | 2018-09-18T01:00:26 | 2018-09-18T01:00:26 | 105,824,840 | 2 | 6 | null | 2022-12-07T19:28:44 | 2017-10-04T22:21:19 | C# | UTF-8 | Java | false | false | 122 | java | package ClassLib037;
public class Class073 {
public static String property() {
return "ClassLib037";
}
}
| [
"mharder@microsoft.com"
] | mharder@microsoft.com |
2f2278eb3451337e4ef7a86cd4d06f1bc967f41d | e51d58a726f05d8641b3212c0798eabd33f0965f | /feedback/feedback-api/src/main/java/it/smc/liferay/feedback/permission/BaseResourcePermission.java | 2ce0da2acd3fbf7f21fc0e39b6ee760aaa95dc87 | [] | no_license | VyBui/feedback-portlet-v7 | 9c6b2a66310e591cc41a4345dc47833709614edf | 73b20223190c98c434f1afcee52bed96a539fce5 | refs/heads/master | 2020-03-14T16:23:25.758435 | 2018-05-01T10:15:24 | 2018-05-01T10:15:24 | 131,697,297 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 515 | java | package it.smc.liferay.feedback.permission;
import com.liferay.portal.kernel.security.auth.PrincipalException;
import com.liferay.portal.kernel.security.permission.PermissionChecker;
import it.smc.liferay.feedback.enums.ActionKeys;
public interface BaseResourcePermission {
void checkTopLevel(
PermissionChecker permissionChecker, long groupId,
ActionKeys actionKeys)
throws PrincipalException;
boolean containsTopLevel(
PermissionChecker permissionChecker, long groupId,
ActionKeys actionKeys);
} | [
"vy.bui@codeenginestudio.com"
] | vy.bui@codeenginestudio.com |
51ab9b53560690f73b3c11ab4e92ead6e77504d8 | 0efd34044430d6c0f3b5a382d42159d065be05fc | /src/dogfightModel/IDogfightModel.java | eb715b1f25cde7e9e8a694dafb1b5cadb65d14b2 | [] | no_license | Naiiden/dogfight | 457b2565da30b74bcdd9ceed06a2af1f8c141389 | 640aabe164cfbfdb3a0371153a18dca7dbeb5415 | refs/heads/master | 2021-01-23T06:35:25.241993 | 2017-06-02T07:37:23 | 2017-06-02T07:37:23 | 93,031,180 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 417 | java | package dogfightModel;
import java.util.ArrayList;
public interface IDogfightModel {
public IArea getArea();
public void buildArea(Dimension dimension);
public void addMobile(IMobile Mobile);
public void removeMobile(IMobile Mobile);
public default ArrayList<IMobile> getMobiles()
{
return null;
}
public IMobile getMobileByPlayer(int player);
public void setMobileHavesMoved();
}
| [
"clement.parpaillon@viacesi.fr"
] | clement.parpaillon@viacesi.fr |
59eea8fd3145ff7428eb0e8e6ac819afa40af4f0 | 8105c3e29745eb7e344764c73d3591832604c7fd | /src/DRH/BusInfo.java | f4cf3eb7b46499b9f5c6d8739f69d99fafa497f9 | [] | no_license | korujzade/SecondYearTeamProject | be4e4030fa908c73fa1ba06a5374fa9b3520b0af | 996ffc9b8d2c5a079aa5fb3fbf62bcf336301998 | refs/heads/master | 2020-04-11T05:38:09.310284 | 2015-10-30T21:27:34 | 2015-10-30T21:27:34 | 30,463,435 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,948 | java | package DRH;
import java.util.Date;
/**
* A class containing information about buses.
* The methods contain checks for invalid queries, which will result in
* InvalidQueryExceptions being thrown, but it does not enforce "business
* rules" such as checking for dates in the past.
*/
public class BusInfo
{
// This class is not intended to be istantiated.
private BusInfo()
{
}
// get buses from availability table *kamil*
public static int[] getAvailabilityBuses()
{
return database.busDatabase.select_ids("bus_availability_id",
"bus_availability", "bus");
}
/**
* Get the IDs of all the buses in the database
*/
public static int[] getBuses()
{
return database.busDatabase.select_ids("bus_id", "bus", "number");
}
/**
* Find the ID of the bus with a given fleet number
* @param number the five-digit fleet number traditionally used to identify
* a bus
*/
public static int findBus(String number)
{
return database.busDatabase.find_id("bus", "number", number);
}
/**
* Get the number of a bus
* @return The five-digit fleet number traditionally used to identify a bus
*/
public static String busNumber(int bus)
{
if (bus == 0) throw new InvalidQueryException("Nonexistent bus");
return database.busDatabase.get_string("bus", bus, "number");
}
/**
* Determine whethe a bus is available on a given date
*/
public static boolean isAvailable(int bus, Date date)
{
if (date == null) throw new InvalidQueryException("Date is null");
if (bus == 0 ) throw new InvalidQueryException("Nonexistent bus");
database db = database.busDatabase;
if (db.select_record("bus_availability", "bus", bus, "day", date))
return ((Integer) db.get_field("available")) != 0;
else
return true;
}
/**
* Determine whether a bus is available today
*/
public static boolean isAvailable(int bus)
{
return isAvailable(bus, database.today());
}
/**
* Set the availability of a bus on a given date. Availability is modelled
* in the database as a list of dates on which a bus is not available,
* so you can use any date you like, including dates in the past.
*/
public static void setAvailable(int bus, Date date, boolean available)
{
if (date == null) throw new InvalidQueryException("Date is null");
if (bus == 0) throw new InvalidQueryException("Bus " + bus + " does not exist");
if (available && !isAvailable(bus, date))
database.busDatabase.delete_record("bus_availability", "bus", bus, "day", date);
else if (!available && isAvailable(bus, date))
database.busDatabase.new_record("bus_availability", new Object[][]{{"available", false}, {"day", date}, {"bus", bus}});
}
/**
* Set whether a bus is available today.
*/
public static void setAvailable(int ID, boolean available)
{
setAvailable(ID, database.today(), available);
}
}
| [
"oruczade.kamil@gmail.com"
] | oruczade.kamil@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.