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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
76ce78195c1bfe3db7b9ef34a879941ea2bdc0ee | 74ec9055df06f8b094bacd56e688b916e6452acf | /ch01/Ex21/Salmon.java | a99e9f2516ea3a05be0e91887cad341aca337202 | [] | no_license | edtroleis/Java_OCA | 49f5f551983ce2db15f122197568f282538d0ff1 | b76ef50273262ccffe6fe2993be8409428d43921 | refs/heads/master | 2021-08-19T17:01:09.132532 | 2017-11-27T01:41:29 | 2017-11-27T01:41:29 | 112,133,018 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 179 | java | public class Salmon {
int count;
public void Salmon() {
count = 4;
}
public static void main(String[] args) {
Salmon s = new Salmon();
System.out.println(s.count);
}
} | [
"edtroleis@github.com"
] | edtroleis@github.com |
bd2d74c62ef72d1dbe510333270bc9caf7128580 | 7c6152f387d01715a0d480777211d6abb53d9043 | /src/main/java/com/knetikcloud/api/ReportingSubscriptionsApi.java | 4713bc169f26b3db1062cd187bae94b2df4fd220 | [] | no_license | knetikcloud/knetikcloud-android-client | 87dd57e595394c3c7b50484589a4dbb39f3d31d9 | 7ac5ca3cd448f187a17d97654a6e525cacea4d34 | refs/heads/master | 2022-12-29T00:49:25.470409 | 2020-02-05T16:01:05 | 2020-02-05T16:01:05 | 125,059,099 | 0 | 0 | null | 2020-10-12T18:44:22 | 2018-03-13T13:51:34 | Java | UTF-8 | Java | false | false | 968 | java | package com.knetikcloud.api;
import com.knetikcloud.client.CollectionFormats.*;
import retrofit2.Call;
import retrofit2.http.*;
import okhttp3.RequestBody;
import com.knetikcloud.model.PageResourceBillingReport;
import com.knetikcloud.model.Result;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface ReportingSubscriptionsApi {
/**
* Get a list of available subscription reports in most recent first order
* <b>Permissions Needed:</b> SUBSCRIPTIONS_ADMIN
* @param size The number of objects returned per page (optional, default to 25)
* @param page The number of the page returned, starting with 1 (optional, default to 1)
* @return Call<PageResourceBillingReport>
*/
@GET("reporting/subscription")
Call<PageResourceBillingReport> getSubscriptionReports(
@retrofit2.http.Query("size") Integer size, @retrofit2.http.Query("page") Integer page
);
}
| [
"shawn.stout@knetik.com"
] | shawn.stout@knetik.com |
ab0db9a9a134666323c683b3179e277c90aa1706 | dfb5723bbc5a6a1183ac887c7ee747395a4fa505 | /src/test/java/me/guozi/IOCTestOfAOP.java | 60394c7d97cd26e479c75b77a282a2e919de82a9 | [] | no_license | gougou1993/spring-annotation | 1690c9efd715f3e03d79b33896e4f3f628090759 | 521ba31749c6fa889fe81b734732ef24e76de114 | refs/heads/master | 2022-11-13T02:55:21.141458 | 2020-04-14T06:48:35 | 2020-04-14T06:48:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 621 | java | package me.guozi;
import me.guozi.aop.MathCalculator;
import me.guozi.config.MainConfigOfAOP;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/**
* Created by chenyun on 2020/4/9
*/
public class IOCTestOfAOP {
@Test
public void test() {
final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MainConfigOfAOP.class);
final MathCalculator calculator = context.getBean(MathCalculator.class);
final int value = calculator.div(6, 3);
System.out.println("返回值:" + value);
}
}
| [
"xinyun_08wh@126.com"
] | xinyun_08wh@126.com |
8bff192e4cd3a8939b0fd9a2f0bc8ee08f7d6696 | 9198243efb10128d0963a26ddc645147f6f341a2 | /src/main/java/com/smallbird/backend/platform/workflow/mapper/TestCaseRunDao.java | 3d88997746584f5d67be9a43603f01d6e2193823 | [] | no_license | javacup100/smallbird | 6511babd78781c2629fdc4dbed756d6e41c672a4 | e3508cccb628aaba32d864245b41b91faf87912d | refs/heads/master | 2023-02-16T21:13:56.878631 | 2021-01-13T12:55:13 | 2021-01-13T12:55:13 | 328,398,522 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 512 | java | package com.smallbird.backend.platform.workflow.mapper;
import com.smallbird.backend.platform.workflow.entity.testcases.TestCaseRun;
import org.springframework.stereotype.Repository;
@Repository
public interface TestCaseRunDao {
int deleteByPrimaryKey(Integer id);
int insert(TestCaseRun record);
int insertSelective(TestCaseRun record);
TestCaseRun selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(TestCaseRun record);
int updateByPrimaryKey(TestCaseRun record);
}
| [
"11392700@qq.com"
] | 11392700@qq.com |
e9d5b15f1446b70c5d11bb90d88585e756703b01 | 86a820e67709562df5af5631d5dca5521ff310b2 | /src/main/java/com/aman/graphql/query/VehicleQuery.java | c7dbc228acda49b8fa3f896babec7914e99d8290 | [] | no_license | AmanKrSoni/spring-boot-graphql-example | ae1ff7cf7c77407236d7eb4bb1d2ddc6d37454ea | 4aeb3f798e76b1dc033201fcc827bafab05302a3 | refs/heads/master | 2023-03-20T15:22:26.838832 | 2021-03-10T08:13:53 | 2021-03-10T08:13:53 | 337,417,993 | 0 | 0 | null | 2021-03-10T08:13:54 | 2021-02-09T13:46:14 | Java | UTF-8 | Java | false | false | 840 | java | package com.aman.graphql.query;
import com.aman.graphql.entity.Vehicle;
import com.aman.graphql.service.VehicleService;
import graphql.kickstart.tools.GraphQLQueryResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Optional;
@Component
public class VehicleQuery implements GraphQLQueryResolver {
@Autowired
private VehicleService vehicleService;
public List<Vehicle> getVehicles(final int count) {
return this.vehicleService.getAllVehicles(count);
}
public Optional<Vehicle> getVehicle(final int id) {
return this.vehicleService.getVehicle(id);
}
public List<Vehicle> getVehiclesByModel(final String model) {
return this.vehicleService.getVehicleByModel(model);
}
}
| [
"aman-kumar.soni@scio.technology"
] | aman-kumar.soni@scio.technology |
9ffa2a4f9b8344baf95a444b38b27e05fc0ea65d | 6911f09192057e6a05f99bed33f5b3ac11a61f15 | /app/src/test/java/com/michalfujak/example/example/website/token/ExampleUnitTest.java | 71eb46107168af617a6655bcb6b93d6bca0840d1 | [] | no_license | michalfujak/ExampleWebSiteToken | 6cdcd27c26a16180a6e253742ae5c1555ce17f54 | 068f4035fe62ea260dfc888ea5112e1261ab4fed | refs/heads/master | 2022-11-21T14:27:00.394718 | 2020-07-15T13:45:11 | 2020-07-15T13:45:11 | 279,879,439 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | package com.michalfujak.example.example.website.token;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"michalfujak005@gmail.com"
] | michalfujak005@gmail.com |
72b0bf34bf1b48ba05fba8cff10e873e6062dede | ad8e6e02750260d2a84aac1f08b33c1f1ccd5c2b | /mj/src/main/java/com/rizomm/carpooling/dao/impl/TrajetDAOImpl.java | 4d241c760cc0933e3d23f2f6492caabb6519144b | [] | no_license | Waspische/ProjetMJ | d36ac2e4466755129b505aff8e482c3c85959910 | 646169b0e295faec4d6c834094d0022651cb9191 | refs/heads/master | 2021-01-24T22:51:50.449440 | 2015-04-03T15:24:12 | 2015-04-03T15:24:12 | 29,737,948 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,812 | java | package com.rizomm.carpooling.dao.impl;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Projections;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.rizomm.carpooling.dao.TrajetDAO;
import com.rizomm.carpooling.form.ReservationForm;
import com.rizomm.carpooling.model.Trajet;
import com.rizomm.carpooling.model.Utilisateur;
import com.rizomm.carpooling.service.PassagerService;
import com.rizomm.carpooling.service.VilleService;
@Repository("trajetDAO")
public class TrajetDAOImpl implements TrajetDAO {
@Autowired
private SessionFactory sessionFactory;
@Autowired
private VilleService villeService;
@Autowired
private PassagerService passagerService;
public TrajetDAOImpl(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
public TrajetDAOImpl() {
}
@Override
public Trajet save(Trajet trajet) {
sessionFactory.getCurrentSession().save(trajet);
return trajet;
}
@Override
public int getMaxId() {
Criteria criteria = sessionFactory.getCurrentSession()
.createCriteria(Trajet.class)
.setProjection(Projections.max("id"));
if(criteria.uniqueResult()!=null)
return (Integer)criteria.uniqueResult();
else
return 0;
}
@Override
public List<Trajet> getTousLesTrajets() {
List<Trajet> list = new ArrayList<Trajet>();
for(Object t : sessionFactory.getCurrentSession().createCriteria(Trajet.class).list())
{
list.add((Trajet)t);
}
return list;
}
@Override
public List<Trajet> getTrajetsAvecParametres(ReservationForm reservationForm) {
List<Trajet> list = new ArrayList<Trajet>();
String query = "select t from Trajet t where 1=1";
if(reservationForm.getRechercheForm().getPointDepart()!="")
query = query + " and t.idVilleDepart="+villeService.getVilleByLibelle(reservationForm.getRechercheForm().getPointDepart()).getId();
if(reservationForm.getRechercheForm().getPointArrivee()!="")
query = query + " and t.idVilleArrivee="+villeService.getVilleByLibelle(reservationForm.getRechercheForm().getPointArrivee()).getId();
if(reservationForm.getRechercheForm().getDateDepart()!="")
{
try {
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date startDate = formatter.parse(reservationForm.getRechercheForm().getDateDepart());
String startDateStr = formatter2.format(startDate);
Calendar c = Calendar.getInstance();
c.setTime(startDate);
c.add(Calendar.DATE, 1);
Date endDate = c.getTime();
String endDateStr = formatter2.format(endDate);
query = query + " and t.dateCreation between '"+startDateStr+"' and '"+endDateStr+"'";
} catch (ParseException e) {
System.out.println("---------------------------- Erreur dans la date");
}
}
for(Trajet t : (List<Trajet>)sessionFactory.getCurrentSession().createQuery(query).list())
{
if(reservationForm.getRechercheForm().getPlacesDispo())
{
if(passagerService.getPassagerByTrajet(t).size()<t.getNbPassager())
list.add(t);
}
else
{
list.add(t);
}
}
return list;
}
@Override
public Trajet getTrajetById(int id) {
Query query = sessionFactory.getCurrentSession().getNamedQuery("TrajetById");
query.setInteger("id", id);
if(query.list().size()>0)
return (Trajet) query.list().get(0);
else
return null;
}
}
| [
"dagbert_007@hotmail.com"
] | dagbert_007@hotmail.com |
726efcb094d1af64486838369ceaa0773c2bf869 | bc3458d066cdb40f0378ef2731447ac47e149bd9 | /src/main/java/com/luhanlin/designpattern/strategy/WinStrategy.java | 4d0f7171a5804b137705ec14d9f9717f2c97c879 | [] | no_license | luhanlin/design-pattern | b7090528d1d3f84dc16534d4b909bffa7bed44e4 | 3514f9bc4bb59d01dfdb1ef574137aad463705a7 | refs/heads/master | 2021-07-05T03:28:57.992732 | 2020-08-17T12:04:06 | 2020-08-17T12:04:06 | 157,035,150 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 704 | java | package com.luhanlin.designpattern.strategy;
import java.util.Random;
/**
* 类详细描述:获胜策略
*
* @author Mr_lu
* @version 1.0
* @mail allen_lu_hh@163.com
* 创建时间:2018/11/14 4:54 PM
*/
public class WinStrategy implements Strategy {
private Random random;
private boolean won = false;
private Hander prevHander;
public WinStrategy() {
this.random = new Random();
}
@Override
public Hander nextHander() {
// 如果没有赢
if (!won){
prevHander = Hander.getHander(random.nextInt(3));
}
return prevHander;
}
@Override
public void study(boolean win) {
won = win;
}
}
| [
"47901673@qq.com"
] | 47901673@qq.com |
033142981880bad5cfb9498b096f0f618851f5a7 | 9caab5ed31b07e5c012106c99566a57c940b9a2d | /core/src/net/mostlyoriginal/game/component/Drenched.java | 53b7e1045d5b249436352f23ddcd3ec38c825cc3 | [
"MIT"
] | permissive | thecocce/odb-minion-factorium | c09f2be39374bd93da3b8fee0683c57bc6ce309d | d123f6e3e6a4153c0de5abd9f2d76a80b060a606 | refs/heads/master | 2020-04-05T23:38:51.847036 | 2015-08-24T01:26:39 | 2015-08-24T01:26:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 154 | java | package net.mostlyoriginal.game.component;
import com.artemis.Component;
/**
* @author Daan van Yperen
*/
public class Drenched extends Component {
}
| [
"daan@mostlyoriginal.net"
] | daan@mostlyoriginal.net |
d369d1911b96b38e57ef17ce43576257e0608997 | 9ac355e112d4cfb436c4c52434f4a86659199f30 | /inventory-management/src/test/java/com/sl/ms/inventorymanagement/JWTTest.java | b2cccffebdad95d1c4208f37f1ea46bd1435c42c | [] | no_license | VictoriaJayasilee/msbatch3-sprint3 | 139e93999c70bab620c759e6e2f02f664ab403fb | 9fdc5d8e7ab5320864ed481d6f616a6fa71d8890 | refs/heads/master | 2023-04-13T18:28:41.351443 | 2021-04-29T16:28:36 | 2021-04-29T16:28:36 | 362,775,098 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,252 | java | package com.sl.ms.inventorymanagement;
import com.sl.ms.inventorymanagement.config.AuthenticationRequest;
import com.sl.ms.inventorymanagement.config.JwtUtil;
import com.sl.ms.inventorymanagement.inventory.InventoryRepository;
import com.sl.ms.inventorymanagement.product.ProductRepository;
import com.sl.ms.inventorymanagement.service.MyUserDetailsService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@WebMvcTest(controllers = HelloWorldController.class)
@ActiveProfiles("test")
@RunWith(SpringRunner.class)
public class JWTTest {
@Autowired
private MockMvc mockMvc;
@MockBean
ProductRepository productRepository;
@MockBean
InventoryRepository inventoryRepository;
@MockBean
private AuthenticationManager authenticationManager;
@MockBean
private JwtUtil jwtUtil;
@MockBean
private MyUserDetailsService myUserDetailsService;
@Test
public void createTokenTest() throws Exception {
AuthenticationRequest req = new AuthenticationRequest();
req.setUsername("foo");
req.setPassword("faa");
Authentication authentication = mock(Authentication.class);
when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(req.getUsername(), req.getPassword())))
.thenReturn(authentication);
this.mockMvc.perform(post("/authenticate"))
.andExpect(status().isBadRequest());
}
}
| [
"VictoriaJayakumar2006@gmail.com"
] | VictoriaJayakumar2006@gmail.com |
90356842191d1be8d5ceddadefbfd2d3ece0b9b1 | de090fd76bc442f8355ccef7c532df6b2e719be0 | /backend/src/test/java/com/carnnjoh/poedatatool/services/StaticModList.java | 15a8fba81d6152edf84f38f6d676aca918c4cb58 | [] | no_license | ChristofferTheodorArntzen/poe-data-tool | 47acedc7271001adc6e912c8e6c92721a64198dd | 4fc66f92724a3be37644d0f2b8c7eed18e167d3c | refs/heads/main | 2023-04-11T17:04:24.127104 | 2021-05-03T09:04:20 | 2021-05-03T09:04:20 | 318,838,839 | 0 | 0 | null | 2021-05-03T09:04:21 | 2020-12-05T16:45:43 | Java | UTF-8 | Java | false | false | 119,536 | java | package com.carnnjoh.poedatatool.services;
import java.util.Arrays;
import java.util.List;
public class StaticModList {
public List<String> modList = Arrays.asList(
"Skills Chain +1 times",
"20% increased Stun Duration against Enemies that are on Full Life",
"+0.55 seconds to Attack Time",
"Damaging Hits always Stun Enemies that are on Full Life",
"2% reduced Mana Reserved",
"+25 to maximum Mana",
"+27% to Fire Resistance",
"+23% to Cold Resistance",
"Supported Skills have 45% increased Skill Effect Duration",
"+11 to all Attributes",
"+32 to maximum Life",
"+43% to Cold Resistance",
"Base duration is 1.00 seconds",
"20% increased Buff Duration per Endurance Charge removed",
"This Skill's Cooldown does not recover during its effect",
"25% less Elemental Damage taken",
"25% less Physical Damage taken",
"15.0% less Physical Damage taken per Endurance Charge removed",
"Deals 18 to 26 Cold Damage",
"Damage cannot be Reflected",
"+1 to Melee Strike Range",
"Supported Skills have 2% of Damage Leeched as Life",
"Deals 9 to 14 Chaos Damage",
"Deals 31.2 Base Chaos Damage per second",
"Base duration is 3.80 seconds",
"Modifiers to Spell Damage apply to this Skill's Damage Over Time effect",
"Regenerate 0.50% of Debuff Damage as Life",
"Base duration is 9.00 seconds",
"Curse gains 10 Doom per second if you Cast this Spell yourself",
"Cursed enemies have -20% to Chaos Resistance",
"Cursed enemies take 19% increased Damage from Damage Over Time effects",
"Adds 9 to 12 Chaos Damage to Hits against Cursed Enemies",
"Deals 130% of Base Damage",
"2 to 3 Added Cold Damage",
"Chills Enemies as though dealing 100% more Damage",
"+35% to Lightning Resistance",
"+1 to Maximum Frenzy Charges",
"50% reduced Frenzy Charge Duration",
"25% reduced Light Radius",
"+23 to Intelligence",
"72% increased Armour and Energy Shield",
"+105 to maximum Energy Shield",
"+35% to Lightning Resistance",
"+20% to Chaos Resistance",
"+60 to maximum Life",
"+28 to maximum Mana",
"+14% to all Elemental Resistances",
"+29% to Fire Resistance",
"Supported Skills have 1 to 8 added Lightning Damage",
"+18 to Accuracy Rating",
"+5 Life gained for each Enemy hit by your Attacks",
"Supported Skills deal 10% more Fire Damage",
"Supported Skills have 30% chance to Ignite",
"Enemies Ignited by Supported Skills have -10% to Fire Resistance",
"Supported Skills have 25% chance to Knock Enemies Back on hit",
"Supported Skills have 50% increased Knockback Distance",
"+1 to Level of Socketed Melee Gems",
"+22 to Strength",
"+21% to Lightning Resistance",
"You and nearby allies gain 16% of Physical Damage as Extra Cold Damage",
"You and nearby allies deal 14% more Cold Damage",
"Totem lasts 8 seconds",
"Totems Summoned by this Skill cannot Evade",
"11% increased totem life",
"+14 to Strength",
"+29 to maximum Life",
"+20% to Cold Resistance",
"+28% to Lightning Resistance",
"+15 to radius",
"You and nearby allies gain 37% additional Cold Resistance",
"You and nearby allies gain 2% additional maximum Cold Resistance",
"+28 to maximum Life",
"+31% to Fire Resistance",
"+30% to Lightning Resistance",
"+79 to maximum Life",
"+25% to Fire Resistance",
"+29% to Cold Resistance",
"+25% to Lightning Resistance",
"Supported Skills gain 26% of Cold Damage as Extra Fire Damage",
"Supported Skills have 50% of Cold Damage Converted to Fire Damage",
"10% increased Evasion and Energy Shield",
"+75 to maximum Life",
"+30% to Fire Resistance",
"Supported Skills have 4 to 6 added Cold Damage",
"Supported Skills gain 10% of Cold Damage as Extra Fire Damage",
"Supported Skills have 50% of Cold Damage Converted to Fire Damage",
"+32 to maximum Energy Shield",
"+93 to maximum Life",
"+58 to maximum Mana",
"+40% to Lightning Resistance",
"+22% to Chaos Resistance",
"80% increased Armour and Energy Shield",
"+8% to maximum Fire Resistance",
"+21% to Fire Resistance",
"+25% to Fire Resistance while on Low Life",
"Cannot be Ignited while on Low Life",
"+38 to maximum Mana",
"+7 Life gained for each Enemy hit by your Spells",
"8% increased Spell Damage per 5% Chance to Block Attack Damage",
"+12% to Global Critical Strike Multiplier",
"+27% to Cold Resistance",
"+37 to Dexterity",
"+66 to maximum Life",
"+61 to maximum Mana",
"+14 to Intelligence",
"+34 to maximum Energy Shield",
"+29% to Fire Resistance",
"+50 to maximum Energy Shield",
"+104 to Accuracy Rating",
"+24 to Intelligence",
"+24 to all Attributes",
"+9% to Global Critical Strike Multiplier",
"+19% to Fire Resistance",
"+40 to maximum Mana",
"+35% to Fire Resistance",
"+14 Life gained on Kill",
"+20 to all Attributes",
"+268 to Accuracy Rating",
"+40 to maximum Energy Shield",
"+14 to maximum Energy Shield",
"+45% to Lightning Resistance",
"+35 to Dexterity",
"+25 to Strength",
"+20 to Intelligence",
"+32 to Strength",
"+25% to Cold Resistance",
"+1 Mana gained on Kill",
"+35 to Dexterity",
"+2 to maximum Energy Shield",
"+3 to maximum Life",
"+31% to Lightning Resistance",
"+4 Mana gained on Kill",
"+27% to Cold Resistance",
"+33% to Global Critical Strike Multiplier",
"+13% to all Elemental Resistances",
"+13 to maximum Energy Shield",
"+8% to all Elemental Resistances",
"+23% to Fire Resistance",
"+20 to maximum Energy Shield",
"+11 to Dexterity",
"+184 to Accuracy Rating",
"+64 to maximum Life",
"+11% to all Elemental Resistances",
"+25% to Cold Resistance",
"+26% to Lightning Resistance",
"+7 to all Attributes",
"+45 to maximum Mana",
"+312 to Accuracy Rating",
"+140 to Accuracy Rating",
"+31 to Strength",
"+33 to Dexterity",
"+11 to maximum Life",
"+5% to all Elemental Resistances",
"+15 to Dexterity",
"+63 to maximum Mana",
"+27% to Global Critical Strike Multiplier",
"+31% to Cold Resistance",
"+16 to Intelligence",
"+34 to maximum Energy Shield",
"+28 to Dexterity",
"+10% to all Elemental Resistances",
"+8% to Cold Resistance",
"+7 Life gained on Kill",
"+24% to Lightning Resistance",
"+13% to Global Critical Strike Multiplier",
"+21 to maximum Energy Shield",
"+29 to Intelligence",
"+11 to Intelligence",
"+31% to Fire Resistance",
"+6 Mana gained on Kill",
"+12 to Maximum Charges",
"66% reduced Amount Recovered",
"50% reduced Amount Recovered",
"+86 to maximum Life",
"25% reduced Amount Recovered",
"25% reduced Amount Recovered",
"+58 to maximum Life",
"+19% to Fire Resistance",
"+18% to Cold Resistance",
"+11% to Lightning Resistance",
"+16 to Armour",
"+14 to maximum Energy Shield",
"+55 to maximum Life",
"+20% to Cold Resistance",
"+14% to Lightning Resistance",
"+58 to maximum Life",
"+41 to maximum Mana",
"+35% to Fire Resistance",
"+7 Life gained on Kill",
"+32 to Strength",
"+74 to maximum Life",
"+10% to Fire Resistance",
"+26% to Cold Resistance",
"+143 to Accuracy Rating",
"+41% to Cold Resistance",
"+23 to Intelligence",
"+28 to maximum Mana",
"+31% to Lightning Resistance",
"+78 to maximum Life",
"+41% to Cold Resistance",
"+39% to Lightning Resistance",
"+54 to Evasion Rating",
"+84 to maximum Life",
"+14% to Lightning Resistance",
"+10 to Armour",
"+26 to maximum Life",
"+15 to maximum Mana",
"+26% to Fire Resistance",
"+29% to Cold Resistance",
"+40% to Lightning Resistance",
"+63 to Accuracy Rating",
"+69 to maximum Life",
"+27% to Fire Resistance",
"+10% to Global Critical Strike Multiplier",
"+78 to maximum Life",
"+36% to Fire Resistance",
"+36 to Strength",
"+43 to maximum Life",
"+48 to maximum Mana",
"+26% to Lightning Resistance",
"90% increased Evasion and Energy Shield",
"+27 to maximum Life",
"+30% to Fire Resistance",
"+23% to Cold Resistance",
"+13% to Lightning Resistance",
"14% increased Armour and Energy Shield",
"+43 to maximum Life",
"+16% to all Elemental Resistances",
"+36% to Fire Resistance",
"+39 to Dexterity",
"+99 to maximum Life",
"+33% to Cold Resistance",
"+40% to Lightning Resistance",
"+27 to Evasion Rating",
"+26% to Cold Resistance",
"+25% to Lightning Resistance",
"+90 to maximum Life",
"+31% to Cold Resistance",
"+35% to Lightning Resistance",
"+11 to Strength",
"+50 to maximum Life",
"+5 to maximum Energy Shield",
"+15% to Fire Resistance",
"+19% to Cold Resistance",
"+26% to Lightning Resistance",
"+31 to Dexterity",
"+18 to maximum Mana",
"+12% to all Elemental Resistances",
"+18% to Cold Resistance",
"+18 to Evasion Rating",
"+54 to maximum Energy Shield",
"+95 to maximum Life",
"+8% to all Elemental Resistances",
"+19 to Strength",
"+74 to maximum Life",
"+20% to Fire Resistance",
"+45 to maximum Life",
"+17% to Cold Resistance",
"+38% to Lightning Resistance",
"40% increased Energy Shield",
"+88 to maximum Life",
"+26% to Fire Resistance",
"+20% to Chaos Resistance",
"+25% to Fire Resistance",
"+28% to Cold Resistance",
"+10% to Lightning Resistance",
"+34 to maximum Life",
"+12% to Fire Resistance",
"+30% to Cold Resistance",
"+20% to Chaos Resistance",
"+189 to Accuracy Rating",
"+29% to Cold Resistance",
"+33% to Lightning Resistance",
"+1 to Level of Socketed Cold Gems",
"+20% to Chaos Resistance",
"+156 to Accuracy Rating",
"+39% to Lightning Resistance",
"+50 to Strength",
"+49 to Strength",
"+50 to Strength",
"+49 to Strength",
"117% increased Armour and Energy Shield",
"+25 to Strength",
"+23 to Dexterity",
"+202 to Armour",
"Cannot be Frozen",
"+100% to Global Critical Strike Multiplier",
"+19 to all Attributes",
"+16% to all Elemental Resistances",
"+50 to maximum Mana",
"Items and Gems have 25% reduced Attribute Requirements",
"+36% to Cold Resistance",
"40% reduced Area of Effect of Hex Skills",
"30% reduced Stun and Block Recovery",
"+100 to Accuracy Rating",
"59% increased Armour and Evasion",
"+30% to Lightning Resistance",
"+20 to Strength",
"+10% to Lightning Resistance",
"41% reduced Rarity of Items found",
"44% reduced Experience gain",
"+25 to Strength",
"+50 to Evasion Rating",
"+19% to Cold Resistance",
"+50 to Strength",
"+41 to Intelligence",
"+142 to Accuracy Rating",
"+137 to Armour",
"+52 to maximum Life",
"+32 to Dexterity",
"+3 to Evasion Rating",
"+76 to maximum Life",
"+16% to Fire Resistance",
"+17% to Lightning Resistance",
"+11 to maximum Energy Shield",
"38% increased Energy Shield",
"+71 to maximum Life",
"+26% to Cold Resistance",
"+33% to Lightning Resistance",
"+16 to Dexterity",
"+81 to maximum Life",
"+25% to Fire Resistance",
"+35% to Cold Resistance",
"+3 to maximum Life",
"+31% to Cold Resistance",
"+14% to Chaos Resistance",
"+33 to maximum Life",
"+32% to Fire Resistance",
"+25% to Cold Resistance",
"+77 to maximum Life",
"+31% to Fire Resistance",
"+14% to Lightning Resistance",
"+43 to Accuracy Rating",
"+7% to Fire Resistance",
"+21% to Global Critical Strike Multiplier",
"+20% to Chaos Resistance",
"+123 to Evasion Rating",
"+36 to maximum Life",
"+33% to Cold Resistance",
"+34% to Lightning Resistance",
"+13 to Strength",
"+244 to Accuracy Rating",
"+65 to maximum Life",
"+38% to Lightning Resistance",
"+43 to maximum Life",
"+21% to Fire Resistance",
"+27% to Cold Resistance",
"+13% to Lightning Resistance",
"+23 to Strength",
"+51 to maximum Life",
"+32% to Cold Resistance",
"+41 to maximum Life",
"+34% to Fire Resistance",
"+36 to maximum Mana",
"+35% to Lightning Resistance",
"+44 to maximum Mana",
"+6 Life gained on Kill",
"+3 Mana gained on Kill",
"32% reduced Attribute Requirements",
"+105 to Armour",
"+79 to maximum Life",
"+28% to Lightning Resistance",
"+26% to Chaos Resistance",
"+100 to Evasion Rating while on Low Life",
"+41 to maximum Life",
"+28% to Fire Resistance",
"+23 to maximum Life",
"+32% to Cold Resistance",
"91% increased Energy Shield",
"+43% to Chaos Resistance",
"+1 to Level of Socketed Melee Gems",
"+26 to Dexterity",
"+32 to Intelligence",
"+21% to Cold Resistance",
"+21% to Lightning Resistance",
"+27 to Intelligence",
"+15% to Cold Resistance",
"+1 to Level of Socketed Minion Gems",
"+28 to Dexterity",
"+32 to maximum Life",
"+31% to Cold Resistance",
"+21% to Chaos Resistance",
"+55 to maximum Mana",
"+23% to Lightning Resistance",
"+18% to Global Critical Strike Multiplier",
"+2 to Level of Socketed Melee Gems",
"+29 to maximum Life",
"+37% to Fire Resistance",
"+33% to Cold Resistance",
"+6% Chance to Block",
"+24 to Dexterity",
"+25 to Intelligence",
"+28% to Cold Resistance",
"+30% to Global Critical Strike Multiplier",
"+76 to maximum Life",
"+55 to maximum Mana",
"+22% to Cold Resistance",
"+2 Energy Shield gained for each Enemy hit by your Attacks",
"+10% to Critical Strike Multiplier with One Handed Melee Weapons",
"+10% to Cold and Lightning Resistances",
"+8% to Global Critical Strike Multiplier",
"+13% to Lightning Resistance",
"+8% to all Elemental Resistances",
"-1 to Maximum Frenzy Charges",
"Can use Items requiring up to Level 33",
"Minions' Attacks deal 22 to 34 additional Physical Damage",
"Supported Skills deal 6% increased Cold Damage",
"Supported Skills gain 10% of Cold Damage as Extra Fire Damage",
"Supported Skills deal 6% increased Fire Damage",
"Supported Skills have 50% of Cold Damage Converted to Fire Damage",
"Supported Skills deal 3% increased Cold Damage",
"Supported Skills gain 10% of Cold Damage as Extra Fire Damage",
"Supported Skills deal 3% increased Fire Damage",
"Supported Skills have 50% of Cold Damage Converted to Fire Damage",
"Deals 165% of Base Damage",
"25% chance to Freeze enemies",
"Every third successive strike Freezes enemies as though dealing 200% more Damage",
"+2 to Melee Strike Range",
"49% increased Duration of Cold Ailments",
"Base duration is 9.00 seconds",
"Curse gains 10 Doom per second if you Cast this Spell yourself",
"6% increased Effect of Curse",
"Cursed Enemies take 50% increased Damage while on Low Life",
"Cursed Enemies are Debilitated for 2.00 Seconds when they Hit",
"10% of Overkill Damage from Killing Blows on Cursed Enemies is Reflected to other Enemies as Physical Damage",
"Base duration is 9.00 seconds",
"Curse gains 10 Doom per second if you Cast this Spell yourself",
"4% increased Effect of Curse",
"Cursed Enemies take 50% increased Damage while on Low Life",
"Cursed Enemies are Debilitated for 2.00 Seconds when they Hit",
"10% of Overkill Damage from Killing Blows on Cursed Enemies is Reflected to other Enemies as Physical Damage",
"Supported Attack Skills cannot be used with Melee Weapons",
"Supported Skills deal 32% less Damage",
"Supported Skills will summon a Ballista Totem which uses that Skill",
"Totem lasts 8 seconds",
"Supported Skills have +2 to maximum number of Summoned Ballista Totems",
"Attacks used by Totem have 50% less Attack Speed",
"Base duration is 3.00 seconds",
"This Skill's Cooldown does not recover during its effect",
"75% of Damage from Hits is taken from the Buff before your Life or Energy Shield Buff can take Damage equal to 20% of your Armour, up to a maximum of 10000",
"Reflects 100% of Damage taken from Buff as Fire Damage when Buff expires or is depleted",
"Buff grants +50 to Armour",
"You and nearby allies gain 22% additional Fire Resistance",
"Base duration is 5.00 seconds",
"Buff grants Added Attack Damage equal to 3% of the Damage of your Main Hand Weapon per 5 Power, up to a maximum of 20%",
"Counts total Power of Enemies and Allies in Range",
"Buff has 100% more Effect on your Minions",
"Exerts the next 5 Melee Attacks you perform",
"Exerted Attacks deal 5% more Damage per affected Ally, to a maximum of 25%",
"Supported Skills Spend Life instead of Mana",
"Supported Attack Skills deal 43% more Elemental Damage",
"Supported Attack Skills deal 43% more Elemental Damage",
"Base duration is 3.00 seconds",
"This Skill's Cooldown does not recover during its effect",
"75% of Damage from Hits is taken from the Buff before your Life or Energy Shield Buff can take Damage equal to 20% of your Armour, up to a maximum of 10000",
"Reflects 1250% of Damage taken from Buff as Fire Damage when Buff expires or is depleted",
"Buff grants +378 to Armour",
"Supported Skills Repeat 2 additional times",
"Supported Skills have 36% more Melee Attack Speed",
"Supported Skills deal 18% less Attack Damage",
"First Repeat of Supported Skills deals 22% more Damage",
"Second Repeat of Supported Skills deals 44% more Damage",
"+6 to radius",
"You and nearby allies deal 37 to 53 additional Fire Damage with Attacks",
"You and nearby allies deal 34 to 48 additional Fire Damage with Spells",
"Supported Skills deal 20% more Chaos Damage",
"Supported Skills deal 2% increased Chaos Damage",
"Supported Skills deal 25% reduced Elemental Damage",
"You and nearby allies gain 22% additional Cold Resistance",
"Deals 5 to 8 Physical Damage",
"Base duration is 5.00 seconds",
"35% increased Hit Rate for each blade",
"35% more Damage for each blade",
"Can have up to 10 active spinning blades",
"10% increased Critical Strike Chance for each blade",
"Supported Skills deal 13% less Projectile Damage",
"Supported Skills fire 2 additional Projectiles",
"Arrows Pierce 6 additional Targets",
"+2 to maximum number of Summoned Totems",
"Totem lasts 8 seconds",
"Base duration is 7.00 seconds",
"1.2% of Attack Physical Damage Leeched as Life",
"You take 4% of your Maximum Life per second as Physical Damage",
"You take 4% of your Maximum Energy Shield per second as Physical Damage",
"Base duration is 3.00 seconds",
"13% increased Arrow Speed",
"Minions deal 75% more Damage",
"Base duration is 40.00 seconds",
"Can use Items requiring up to Level 9",
"Minions' Attacks deal 5 to 8 additional Physical Damage",
"Animated Lingering Blades deal 1 to 2 Added Attack Physical Damage",
"Minions deal 10% more Damage",
"Maximum 5 Animated Weapons",
"Minions have 10% more Attack Speed",
"Supported Skills Chain +2 times",
"Supported Skills deal 30% less Damage with Hits",
"Supported Skills Penetrate 18% Cold Resistance",
"Supported Skills have 33% increased Attack Speed",
"Deals 85 to 128 Cold Damage",
"Damage cannot be Reflected",
"Deals 169% of Base Damage",
"+1 to Melee Strike Range",
"100% more Critical Strike Chance against Enemies that are on Full Life",
"30% more Damage with Hits and Ailments against Enemies that are on Full Life",
"Mine lasts 8 seconds",
"Base duration is 4.00 seconds",
"Base secondary duration is 4.00 seconds",
"Increases and Reductions to Mine Duration also apply to this Skill's Buff Duration",
"Only one Mine of this type can Detonate in each Detonation Sequence",
"Mines cannot be Re-armed",
"Mine Detonation is Instant",
"Buff grants 10% increased Movement Speed",
"+21 to Intelligence",
"+4 Life gained on Kill",
"+10 to Dexterity",
"+81 to Accuracy Rating",
"+89 to maximum Life",
"+41% to Fire Resistance",
"+57 to maximum Life",
"+10% to Cold Resistance",
"+12% to Lightning Resistance",
"+59 to maximum Life",
"+10% to Fire Resistance",
"+29% to Lightning Resistance",
"+57 to maximum Mana",
"+11% to all Elemental Resistances",
"+39 to maximum Life",
"+12% to Fire Resistance",
"+56 to maximum Energy Shield",
"+44% to Fire Resistance",
"+22% to Cold Resistance",
"+10% to Lightning Resistance",
"+8 to Dexterity",
"+9% to Lightning Resistance",
"+9% to Fire Resistance",
"+8% to Cold Resistance",
"+7% to Lightning Resistance",
"+34 to Armour",
"+67 to maximum Life",
"+21% to Fire Resistance",
"+7% to Cold Resistance",
"+19 to Intelligence",
"16% increased Armour and Energy Shield",
"+69 to maximum Life",
"+43 to maximum Mana",
"+15% to Cold Resistance",
"+25% to Lightning Resistance",
"+65 to maximum Energy Shield",
"+30% to Fire Resistance",
"+28% to Lightning Resistance",
"+27 to Dexterity",
"+15 to Intelligence",
"+55 to maximum Life",
"+26% to Fire Resistance",
"+98 to maximum Life",
"+28 to maximum Mana",
"+31% to Fire Resistance",
"+179 to Accuracy Rating",
"+37% to Fire Resistance",
"+8 to Dexterity",
"+26 to maximum Life",
"+16% to Fire Resistance",
"+12 to Intelligence",
"+57 to maximum Life",
"+11% to all Elemental Resistances",
"+22% to Fire Resistance",
"47% increased Energy Shield",
"+46 to maximum Life",
"+7% to Cold Resistance",
"+11% to Lightning Resistance",
"+2 Life gained for each Enemy hit by your Attacks",
"Supported Skills deal 35% more Area Damage",
"Supported Skills have 30% less Area of Effect",
"Supported Skills deal 3% increased Area Damage",
"Deals 6 to 33 Lightning Damage",
"Chains +4 Times",
"12% chance to Shock enemies",
"15% more Damage for each remaining Chain",
"You and nearby allies gain +12% to all Elemental Resistances",
"Supported Attack Skills cannot be used with Melee Weapons",
"Supported Skills deal 35% less Damage",
"Mine lasts 5 seconds",
"Supported Skills have a Base Mine Detonation Time of 0.25 seconds",
"Supported Skills have 4% increased Mine Throwing Speed",
"Supported Skills deal 5% more Damage for each prior Mine in Detonation Sequence",
"Supported Skills apply their Curse as Auras Supported Curse Skills also count as Aura Skills Hexes from Supported Skills do not gain Doom over time",
"Using Supported Skills is Instant",
"28% increased Area of Effect of Supported Curse Skills",
"Deals 31 to 46 Fire Damage",
"50% chance to Ignite enemies",
"110% more Spell Damage for each stage",
"90% more Damage with Ailments for each stage",
"10 maximum Stages",
"+3 to Radius for each Stage",
"Supported Skills have 26% increased Cast Speed",
"Maximum 1 Summoned Golem",
"30% increased Minion Maximum Life",
"Golems grant 3% additional Physical Damage Reduction",
"Supported Skills have 1 to 8 added Lightning Damage",
"Supported Skills deal 5% increased Lightning Damage",
"Deals 26 to 39 Fire Damage",
"Mine lasts 5 seconds",
"Base Mine Detonation Time is 0.35 seconds",
"Fires 2 additional Projectiles",
"Fires an additional Projectile for every 4 prior Mines in Detonation Sequence",
"Each Mine Adds 1 to 2 Fire Damage to Hits against Enemies near it, up to a maximum of 64 to 96",
"Deals 6 to 33 Lightning Damage",
"Chains +4 Times",
"13% chance to Shock enemies",
"15% more Damage for each remaining Chain",
"Supported Skills have 17 to 26 added Chaos Damage",
"Supported Attack Skills cannot be used with Melee Weapons",
"Supported Skills deal 35% less Damage",
"Mine lasts 5 seconds",
"Supported Skills have a Base Mine Detonation Time of 0.25 seconds",
"Supported Skills have 3% increased Mine Throwing Speed",
"Supported Skills deal 5% more Damage for each prior Mine in Detonation Sequence",
"Supported Skills have 59% increased Critical Strike Chance",
"Supported Skills have +1% to Critical Strike Chance",
"Supported Skills deal 10% less Damage",
"Supported Skills Repeat an additional time",
"Supported Skills have 51% more Cast Speed",
"Gain Innervation on Killing a Shocked Enemy with Supported Skills",
"Innervation grants 1 to 17 Lightning Damage",
"Innervation lasts 8 seconds",
"Supported Skills have 20% chance to Shock",
"Supported Skills have 2 to 29 added Lightning Damage",
"Supported Skills have 12% increased Shock Duration on Enemies",
"Supported Skills deal 10% less Damage",
"Supported Skills Repeat an additional time",
"Supported Skills have 51% more Cast Speed",
"Supported Skills apply supported Curses on Hit",
"You cannot Cast Supported Curse Spells",
"Supported Skills have 50% reduced Curse Duration",
"Maximum 1 Summoned Golem",
"40% increased Minion Maximum Life",
"Golems grant 3% additional Physical Damage Reduction",
"Deals 4 to 218 Lightning Damage",
"Base duration is 6.00 seconds",
"Storm Hits an Enemy every 0.25 Seconds",
"Creates a storm when you Kill a Shocked Enemy",
"Buff grants 7 to 27 Added Attack Lightning Damage",
"Buff grants 7 to 27 Added Spell Lightning Damage",
"Supported Skills deal 42% more Area Damage",
"Supported Skills have 30% less Area of Effect",
"Base duration is 9.20 seconds",
"Curse gains 10 Doom per second if you Cast this Spell yourself",
"+1 to radius",
"Cursed enemies have -22% to Elemental Resistances",
"+6 to radius",
"You and nearby allies deal 5 to 85 additional Lightning Damage with Attacks",
"You and nearby allies deal 17% more Spell Lightning Damage",
"+50 to Strength",
"-8 to Total Mana Cost of Skills",
"+2 Mana gained on Kill",
"-8 to Total Mana Cost of Skills",
"+50 to Strength",
"-7 to Total Mana Cost of Skills",
"-7 to Total Mana Cost of Skills",
"+20 to Dexterity",
"+50 to Strength",
"+50 to Strength",
"+49 to Strength",
"+9 to Intelligence",
"-8 to Total Mana Cost of Skills",
"+49 to Strength",
"+50 to Strength",
"+50 to Strength",
"+63 to maximum Mana",
"+24% to Chaos Resistance",
"+37 to maximum Mana",
"-7 to Total Mana Cost of Skills",
"+49 to Strength",
"+49 to Strength",
"+55 to Armour",
"+91 to maximum Life",
"+33% to Fire Resistance",
"+22 to Intelligence",
"+3 to maximum Life",
"+28 to maximum Mana",
"+11% to all Elemental Resistances",
"+138 to Armour",
"+71 to maximum Life",
"15% increased Armour and Evasion",
"+24 to maximum Life",
"+42% to Fire Resistance",
"+24% to Cold Resistance",
"+35% to Lightning Resistance",
"-6 to Total Mana Cost of Skills",
"+26 to maximum Energy Shield",
"+43% to Fire Resistance",
"+43% to Lightning Resistance",
"+22% to Chaos Resistance",
"+45 to Dexterity",
"+69 to maximum Life",
"+45% to Fire Resistance",
"+45% to Lightning Resistance",
"+40% to Fire Resistance",
"+22 to maximum Mana",
"+34% to Fire Resistance",
"+26% to Lightning Resistance",
"-7 to Total Mana Cost of Skills",
"-4 to Total Mana Cost of Skills",
"-5 to Total Mana Cost of Skills",
"-6 to Total Mana Cost of Skills",
"+50 to maximum Life",
"+45% to Fire Resistance",
"+41% to Cold Resistance",
"+45% to Lightning Resistance",
"50% reduced Amount Recovered",
"60% increased Energy Shield",
"+100 to maximum Life",
"+21 to maximum Mana",
"+40% to Lightning Resistance",
"18% reduced Attribute Requirements",
"+29 to Intelligence",
"+24 to maximum Mana",
"+38% to Fire Resistance",
"+27% to Chaos Resistance",
"-7 to Total Mana Cost of Skills",
"+50 to Strength",
"+24 to Strength",
"+5 to maximum Energy Shield",
"+20 to maximum Life",
"+32% to Lightning Resistance",
"+45 to Dexterity",
"+354 to Accuracy Rating",
"+10 to maximum Energy Shield",
"-8 to Total Mana Cost of Skills",
"+19% to Fire Resistance",
"-8 to Total Mana Cost of Skills",
"+26 to Dexterity",
"+27 to Intelligence",
"-5 to Total Mana Cost of Skills",
"+37 to Dexterity",
"+326 to Evasion Rating",
"+24% to Fire Resistance",
"+19% to Cold Resistance",
"+12% to Chaos Resistance",
"+81 to maximum Life",
"+40% to Fire Resistance",
"+23% to Cold Resistance",
"+163 to Armour",
"+375 to Evasion Rating",
"+102 to maximum Life",
"+45% to Cold Resistance",
"+20% to Chaos Resistance",
"+99 to maximum Life",
"+25% to Fire Resistance",
"60% increased Armour and Energy Shield",
"50% reduced maximum Mana",
"32% reduced Attribute Requirements",
"+20 to Dexterity",
"108% increased Evasion and Energy Shield",
"+118 to maximum Energy Shield",
"+39% to Fire Resistance",
"+80 to Armour",
"136% increased Armour and Energy Shield",
"+89 to maximum Life",
"27% increased Armour and Energy Shield",
"+51 to maximum Mana",
"+29% to Fire Resistance",
"+12% to Cold Resistance",
"+47 to Dexterity",
"+289 to Evasion Rating",
"+89 to maximum Life",
"+30% to Fire Resistance",
"+32% to Cold Resistance",
"+393 to Evasion Rating",
"+84 to maximum Life",
"+19% to Fire Resistance",
"+36% to Lightning Resistance",
"+65 to maximum Life",
"+6% to Fire Resistance",
"+26% to Cold Resistance",
"+15% to Lightning Resistance",
"25% reduced Movement Speed",
"1% increased Movement Speed per 450 Evasion Rating, up to 75%",
"-42 Physical Damage taken from Hits by Animals",
"+82 to maximum Life",
"+10% to Cold Resistance",
"+329 to Evasion Rating",
"+114 to maximum Life",
"+24% to Fire Resistance",
"+29% to Chaos Resistance",
"+172 to Evasion Rating",
"+37% to Cold Resistance",
"+35 to Strength",
"+371 to Evasion Rating",
"106% increased Armour and Evasion",
"+82 to maximum Life",
"+43% to Fire Resistance",
"+55 to maximum Life",
"+42% to Fire Resistance",
"+44% to Cold Resistance",
"+41% to Lightning Resistance",
"+37 to Strength",
"+398 to Armour",
"+382 to Evasion Rating",
"+108 to maximum Life",
"+26% to Fire Resistance",
"+44% to Cold Resistance",
"106% increased Evasion and Energy Shield",
"+71 to maximum Life",
"+43% to Cold Resistance",
"+40% to Lightning Resistance",
"+30 to Strength",
"+90 to maximum Life",
"+39% to Fire Resistance",
"+35% to Cold Resistance",
"+19 to Dexterity",
"+358 to Evasion Rating",
"+100 to maximum Life",
"+42% to Fire Resistance",
"+32% to Lightning Resistance",
"+42 to Dexterity",
"+112 to maximum Life",
"+11% to Cold Resistance",
"+44 to maximum Life",
"+34% to Fire Resistance",
"+40% to Cold Resistance",
"+20% to Lightning Resistance",
"+28 to Dexterity",
"+2 to Level of Socketed Movement Gems",
"+102 to maximum Energy Shield",
"50% increased Energy Shield",
"+9 to maximum Life",
"+45% to Cold Resistance",
"+33% to Lightning Resistance",
"+37 to maximum Mana",
"+8 Life gained for each Enemy hit by your Spells",
"8% increased Spell Damage per 5% Chance to Block Attack Damage",
"+23 to maximum Life",
"+33 to maximum Mana",
"+13% to Lightning Resistance",
"+136 to maximum Energy Shield",
"97% increased Energy Shield",
"+84 to maximum Life",
"+41% to Fire Resistance",
"+30% to Cold Resistance",
"+16 to maximum Mana",
"+2 Mana gained on Kill",
"+115 to maximum Energy Shield",
"54% increased Energy Shield",
"+5 to maximum Life",
"+45% to Lightning Resistance",
"+10 Life gained on Kill",
"+5 Mana gained on Kill",
"151% increased Energy Shield",
"+89 to maximum Life",
"+44% to Fire Resistance",
"+31% to Cold Resistance",
"+30% to Lightning Resistance",
"+1 to Level of Socketed Gems",
"+2 to Level of Socketed Lightning Gems",
"+2 to Level of Socketed Minion Gems",
"+38% to Global Critical Strike Multiplier",
"+15 to maximum Mana",
"+9 Life gained on Kill",
"+1 to Level of Socketed Lightning Gems",
"+38% to Global Critical Strike Multiplier",
"+9 to maximum Mana",
"+3 Life gained on Kill",
"92% increased Energy Shield",
"+23% to Fire Resistance",
"+30% to Cold Resistance",
"+29% to Chaos Resistance",
"+1 to Level of Socketed Fire Gems",
"210% increased Energy Shield",
"+16 to maximum Energy Shield",
"+61 to maximum Mana",
"+30% to Fire Resistance",
"+40% to Cold Resistance",
"+38% to Lightning Resistance",
"119% increased Energy Shield",
"+1 to maximum number of Summoned Totems",
"+25 to Intelligence",
"+112 to maximum Energy Shield",
"106% increased Energy Shield",
"+34% to Cold Resistance",
"+140 to maximum Energy Shield",
"88% increased Energy Shield",
"+44% to Lightning Resistance",
"+11 to maximum Energy Shield",
"43% increased Energy Shield",
"+26% to Cold Resistance",
"+12% to Lightning Resistance",
"25% increased Energy Shield",
"+72 to maximum Life",
"+46 to maximum Mana",
"+35% to Fire Resistance",
"+34% to Cold Resistance",
"+44% to Lightning Resistance",
"+112 to maximum Energy Shield",
"99% increased Energy Shield",
"+60 to maximum Mana",
"+8% to Cold Resistance",
"+11 to Dexterity",
"+3 to Evasion Rating",
"26% increased Armour and Evasion",
"+45% to Cold Resistance",
"+20 to Intelligence",
"+95 to maximum Life",
"+13% to Cold Resistance",
"+37% to Lightning Resistance",
"+285 to Accuracy Rating",
"+119 to Evasion Rating",
"+45% to Fire Resistance",
"+43% to Lightning Resistance",
"+26 to Intelligence",
"+70 to maximum Life",
"+25% to Cold Resistance",
"+42% to Lightning Resistance",
"+81 to maximum Life",
"+43% to Fire Resistance",
"+45% to Lightning Resistance",
"+84 to maximum Life",
"+58 to maximum Mana",
"+43% to Lightning Resistance",
"+24% to Chaos Resistance",
"+92 to maximum Life",
"+30% to Fire Resistance",
"+42% to Cold Resistance",
"+36 to Dexterity",
"+37 to Intelligence",
"+89 to maximum Life",
"+44% to Fire Resistance",
"+72 to maximum Life",
"+39% to Fire Resistance",
"+34% to Cold Resistance",
"+82 to maximum Life",
"+41 to maximum Mana",
"+36% to Fire Resistance",
"+28% to Cold Resistance",
"+14% to Chaos Resistance",
"211% increased Armour and Evasion",
"+135 to maximum Life",
"23% increased Armour and Evasion",
"+76 to maximum Life",
"+32% to Fire Resistance",
"+41% to Cold Resistance",
"290% increased Armour and Evasion",
"+122 to maximum Life",
"+16 to maximum Life",
"+68 to maximum Mana",
"+45% to Fire Resistance",
"+32% to Cold Resistance",
"+1 to Level of Socketed Minion Gems",
"+97 to maximum Life",
"+72 to maximum Life",
"+39% to Fire Resistance",
"+21% to Cold Resistance",
"+27% to Lightning Resistance",
"+31 to Accuracy Rating",
"+47 to Evasion Rating",
"+99 to maximum Life",
"+40% to Fire Resistance",
"+30% to Cold Resistance",
"+231 to Accuracy Rating",
"+99 to maximum Life",
"+24% to Lightning Resistance",
"+25 to Intelligence",
"31% increased Energy Shield",
"+82 to maximum Life",
"+44% to Cold Resistance",
"+36% to Lightning Resistance",
"+89 to maximum Life",
"+26% to Fire Resistance",
"+38% to Lightning Resistance",
"+97 to maximum Life",
"+38% to Cold Resistance",
"+41% to Lightning Resistance",
"+7 to maximum Energy Shield",
"+93 to maximum Life",
"+50 to maximum Mana",
"+32% to Fire Resistance",
"+38% to Lightning Resistance",
"253% increased Armour and Evasion",
"+132 to maximum Life",
"+11 to maximum Life",
"+66 to maximum Mana",
"+45% to Lightning Resistance",
"+30% to Chaos Resistance",
"+23 to maximum Energy Shield",
"+43% to Fire Resistance",
"+45% to Cold Resistance",
"+53 to maximum Energy Shield",
"118% increased Energy Shield",
"+36 to maximum Mana",
"+91 to maximum Life",
"+42% to Cold Resistance",
"+45% to Lightning Resistance",
"+81 to maximum Life",
"+26% to Cold Resistance",
"+42% to Lightning Resistance",
"+54 to maximum Life",
"+10% to Cold Resistance",
"+33% to Lightning Resistance",
"+33% to Chaos Resistance",
"+178 to Accuracy Rating",
"+94 to maximum Life",
"+44% to Fire Resistance",
"+44% to Cold Resistance",
"+12 to Strength",
"+92 to maximum Life",
"+42% to Fire Resistance",
"+43% to Lightning Resistance",
"+22 to Intelligence",
"+87 to maximum Life",
"+29% to Chaos Resistance",
"32% reduced Attribute Requirements",
"+47 to maximum Life",
"+45% to Fire Resistance",
"+44% to Cold Resistance",
"+35 to Dexterity",
"+137 to Evasion Rating",
"+77 to maximum Life",
"+25% to Lightning Resistance",
"+25% to Chaos Resistance",
"+10% to all Elemental Resistances",
"+4% to all maximum Resistances",
"+113 to maximum Energy Shield",
"58% increased Energy Shield",
"+89 to maximum Life",
"5% reduced Movement Speed",
"-25 Physical Damage taken from Projectile Attacks",
"+5% Chance to Block",
"+306 to Armour",
"+94 to maximum Life",
"+16% to all Elemental Resistances",
"+35% to Fire Resistance",
"+127 to maximum Energy Shield",
"38% increased Energy Shield",
"+7% to all Elemental Resistances",
"+40% to Fire Resistance",
"+36 to maximum Energy Shield",
"149% increased Energy Shield",
"+2% Chance to Block",
"+273 to Evasion Rating",
"+133 to maximum Energy Shield",
"+22% to Fire Resistance",
"+20% to Lightning Resistance",
"+95 to maximum Life",
"5% reduced Movement Speed",
"-25 Physical Damage taken from Projectile Attacks",
"+5% Chance to Block",
"+95 to maximum Energy Shield",
"+50 to maximum Mana",
"+44% to Fire Resistance",
"+23% to Cold Resistance",
"98% increased Energy Shield",
"+42% to Fire Resistance",
"+44% to Cold Resistance",
"+60 to maximum Energy Shield",
"112% increased Energy Shield",
"+63 to maximum Mana",
"+17% to Cold Resistance",
"+6% to Lightning Resistance",
"+56 to maximum Energy Shield",
"108% increased Energy Shield",
"+15% to Fire Resistance",
"+89 to maximum Life",
"5% reduced Movement Speed",
"-25 Physical Damage taken from Projectile Attacks",
"+5% Chance to Block",
"+27 to Strength",
"+399 to Armour",
"115% increased Armour and Energy Shield",
"+70 to maximum Life",
"+44% to Fire Resistance",
"+45% to Cold Resistance",
"18% reduced Attribute Requirements",
"+347 to Evasion Rating",
"+104 to maximum Life",
"+24% to Lightning Resistance",
"45% increased Energy Shield",
"+39% to Fire Resistance",
"+39% to Cold Resistance",
"+44% to Lightning Resistance",
"+267 to Armour",
"+84 to maximum Life",
"+42% to Cold Resistance",
"+23% to Lightning Resistance",
"+399 to Evasion Rating",
"102% increased Armour and Evasion",
"+6% to all Elemental Resistances",
"+28% to Lightning Resistance",
"+348 to Evasion Rating",
"76% increased Armour and Evasion",
"+33% to Fire Resistance",
"+39% to Lightning Resistance",
"+2 to Level of Socketed Fire Gems",
"34% increased Energy Shield",
"+96 to maximum Life",
"+33% to Lightning Resistance",
"+5% Chance to Block",
"+1 to Level of Socketed Lightning Gems",
"+30 to Intelligence",
"+14% to all Elemental Resistances",
"+74 to maximum Life",
"-17 Physical Damage taken from Attack Hits",
"+41 to Intelligence",
"+52 to maximum Energy Shield",
"120% increased Energy Shield",
"+43 to maximum Life",
"+20% to Cold Resistance",
"102% increased Armour and Evasion",
"+17% to Fire Resistance",
"+16% to Cold Resistance",
"+15% to Lightning Resistance",
"+5% Chance to Block",
"+21 to Dexterity",
"+205 to Accuracy Rating",
"36% more Burning Damage",
"12% more Spell Fire Damage",
"Base duration is 4.00 seconds",
"Gain 15% of your Physical Damage as Extra Fire Damage",
"Base Burning Damage is 25% of Overkill Damage",
"+23% to Global Critical Strike Multiplier",
"+90 to maximum Life",
"Base duration is 3.00 seconds",
"42% increased Minion Maximum Life",
"Minions deal 75% more Damage",
"Supported Skills Chain +2 times",
"Supported Skills deal 13% less Damage with Hits",
"+14 to radius",
"You and nearby allies deal 11 to 173 additional Lightning Damage with Attacks",
"You and nearby allies deal 19% more Spell Lightning Damage",
"Supported Skills deal 47% more Melee Physical Damage",
"Supported Skills deal 47% more Damage with Bleeding and Poison caused by Melee Hits",
"Supported Skills deal 35% more Damage with Poison",
"Supported Skills have 60% chance to Poison on Hit",
"Supported Skills deal 37% more Chaos Damage",
"Supported Skills deal 25% reduced Elemental Damage",
"Supported Attack Skills deal 53% more Elemental Damage",
"+2 Mana gained for each Enemy hit by your Attacks",
"Supported Skills deal 54% more Area Damage",
"Supported Skills have 30% less Area of Effect",
"Supported Skills deal 6% increased Area Damage",
"Deals 170.5% of Base Damage",
"+1 to radius",
"50% more Area of Effect for each stage",
"Supported Skills have +117% to Critical Strike Multiplier",
"+18 to radius",
"You and nearby allies gain 2335 additional Evasion Rating",
"+12 to Intelligence",
"+2 Mana gained for each Enemy hit by your Attacks",
"Deals 130.2% of Base Damage",
"8 to 144 Added Lightning Damage",
"Hits up to 3 additional enemies near the target",
"Shocks Enemies as though dealing 180% more Damage",
"Supported Skills deal 36% more Chaos Damage",
"Supported Skills deal 25% reduced Elemental Damage",
"+9% to all Elemental Resistances",
"+12% to Fire Resistance",
"+2 to maximum Energy Shield",
"+99 to maximum Life",
"+24% to Fire Resistance",
"+43% to Cold Resistance",
"+26% to Chaos Resistance",
"+23 to all Attributes",
"+31 to maximum Life",
"+31% to Fire Resistance",
"+38% to Lightning Resistance",
"Deals 176.8% of Base Damage",
"+1 to radius",
"50% more Area of Effect for each stage",
"+8 to Intelligence",
"+45% to Cold Resistance",
"+37% to Lightning Resistance",
"+18 to maximum Energy Shield",
"+10% to Fire Resistance",
"+34% to Cold Resistance",
"+390 to Armour",
"+31% to Lightning Resistance",
"+29% to Chaos Resistance",
"40% reduced Light Radius",
"Reflects 1 to 216 Lightning Damage to Attackers on Block",
"+69 to maximum Life",
"+45% to Fire Resistance",
"+46 to Intelligence",
"115% increased Evasion and Energy Shield",
"+139 to maximum Energy Shield",
"+41% to Fire Resistance",
"+9 to Evasion Rating",
"+29 to maximum Energy Shield",
"+14% to all Elemental Resistances",
"+9% to Fire Resistance",
"110% increased Energy Shield",
"+64 to maximum Life",
"+24% to Fire Resistance",
"+11% to Cold Resistance",
"+1 to Level of Socketed Gems",
"+2 to Level of Socketed Cold Gems",
"+293 to Accuracy Rating",
"+134 to Accuracy Rating",
"+4 to Evasion Rating",
"+7% to Fire Resistance",
"+1 Mana gained on Kill",
"+17% to Cold Resistance",
"+33 to Accuracy Rating",
"+31 to Dexterity",
"+60 to maximum Mana",
"+14% to all Elemental Resistances",
"+12 Life gained on Kill",
"+1 to maximum Energy Shield",
"+21% to Cold Resistance",
"+39 to Dexterity",
"+40 to maximum Mana",
"+15% to Cold Resistance",
"+48 to Intelligence",
"105% increased Energy Shield",
"+64 to maximum Mana",
"Monsters gain 1 Endurance Charge every 20 seconds",
"+1 to Level of Socketed Curse Gems",
"+5% Chance to Block",
"+12 to maximum Life",
"+6 Life gained on Kill",
"+6 Mana gained on Kill",
"+207 to Accuracy Rating",
"+20 to Intelligence",
"316% increased Energy Shield",
"20% reduced maximum Life",
"+8% to all Elemental Resistances",
"+9% to Melee Critical Strike Multiplier",
"10% reduced Cast Speed",
"+20 to Evasion Rating",
"+17 to maximum Energy Shield",
"+6 to maximum Life",
"+6 to maximum Mana",
"+6% to Fire Resistance",
"+10% to Cold Resistance",
"+5% to Lightning Resistance",
"+8% to all Elemental Resistances",
"+44 to maximum Energy Shield",
"+29% to Cold Resistance",
"+31% to Lightning Resistance",
"+33 to maximum Life",
"+9% to all Elemental Resistances",
"+8% Chance to Block Attack Damage while Dual Wielding",
"+2 to Melee Strike Range per White Socket",
"+122 to Accuracy Rating",
"+32% to Lightning Resistance",
"+6 to all Attributes",
"+9% to Melee Critical Strike Multiplier",
"+11% to Critical Strike Multiplier with Lightning Skills",
"+12% to Cold and Lightning Resistances",
"39% reduced Totem Damage",
"Totems fire 2 additional Projectiles",
"-1 to Maximum Endurance Charges",
"-1 to Maximum Endurance Charges",
"+1% Chance to Block Spell Damage while wielding a Staff",
"Totems gain +9% to all Elemental Resistances",
"+10% to Cold and Lightning Resistances",
"+11% to Cold and Lightning Resistances",
"-1 to Maximum Frenzy Charges",
"+12% to Lightning Resistance",
"With at least 40 Intelligence in Radius, Fireball Projectiles gain Area as they travel farther, up to 50% increased Area of Effect",
"With at least 40 Dexterity in Radius, each Spectral Throw Projectile gains 4% increased Damage each time it Hits",
"+16 to Dexterity",
"+14 to Intelligence",
"14% reduced Intelligence",
"With at least 40 Dexterity in Radius, each Spectral Throw Projectile gains 4% increased Damage each time it Hits",
"+14% to Lightning Resistance",
"+10 to Strength and Dexterity",
"+9% to Melee Critical Strike Multiplier",
"+1% Chance to Block Attack Damage while Dual Wielding",
"+6% to Global Critical Strike Multiplier",
"+11% to Critical Strike Multiplier with Cold Skills",
"With at least 40 Intelligence in Radius, Fireball Projectiles gain Area as they travel farther, up to 50% increased Area of Effect",
"+8% to Critical Strike Multiplier with Elemental Skills",
"+12% to Fire and Lightning Resistances",
"+8% to all Elemental Resistances",
"+13% to Lightning Resistance",
"+10% to all Elemental Resistances",
"+10% to Fire and Cold Resistances",
"+10% to Fire and Lightning Resistances",
"+1 Mana gained for each Enemy hit by your Attacks",
"+3 Energy Shield gained for each Enemy hit by your Attacks",
"+7 to all Attributes",
"-1 to Maximum Frenzy Charges",
"+9 to Strength and Dexterity",
"+1% Chance to Block Spell Damage while Dual Wielding",
"+10% to Fire and Lightning Resistances",
"+1% Chance to Block Attack Damage while Dual Wielding",
"+8% to Melee Critical Strike Multiplier",
"With at least 40 Strength in Radius, Ground Slam has a 20% increased angle",
"+15 to Dexterity",
"+13 to Intelligence",
"+9% to all Elemental Resistances",
"+10% to all Elemental Resistances",
"+10% to Fire and Cold Resistances",
"+8 to all Attributes",
"+14 to Dexterity",
"Totems gain +10% to all Elemental Resistances",
"+1% Chance to Block Attack Damage while wielding a Staff",
"Projectiles Pierce an additional Target",
"+15% to Lightning Resistance",
"+13% to Lightning Resistance",
"+16 to Dexterity",
"+9% to Critical Strike Multiplier for Spells",
"+14% to Lightning Resistance",
"+12% to Cold Resistance",
"+9 to Strength and Dexterity",
"+8 to Strength and Dexterity",
"-1 to Maximum Frenzy Charges",
"+8 to Strength and Intelligence",
"+10 to Dexterity and Intelligence",
"+10% to Fire and Cold Resistances",
"15% reduced Movement Speed",
"+1% Chance to Block Attack Damage while holding a Shield",
"+1% Chance to Block Spell Damage while Dual Wielding",
"+10% to Critical Strike Multiplier with Lightning Skills",
"+8% to Melee Critical Strike Multiplier",
"+1% Chance to Block Spell Damage while Dual Wielding",
"+14% to Cold Resistance",
"+10% to Fire and Lightning Resistances",
"+10% to Fire and Lightning Resistances",
"+11% to Cold and Lightning Resistances",
"+12 to Dexterity",
"+49 to maximum Life",
"+32 to maximum Mana",
"+28 to Strength",
"+28 to Intelligence",
"+16% to Cold Resistance",
"+87 to maximum Life",
"+5% Chance to Block",
"+49 to Armour",
"+51 to maximum Life",
"+12% to Fire Resistance",
"+22% to Cold Resistance",
"+21% to Lightning Resistance",
"164% increased Armour and Energy Shield",
"+63 to maximum Life",
"+54 to maximum Mana",
"+1 to Level of Socketed Curse Gems",
"+5% Chance to Block",
"10% reduced Cast Speed",
"+16 to Evasion Rating",
"+16 to maximum Energy Shield",
"+6 to maximum Life",
"+6 to maximum Mana",
"+9% to Fire Resistance",
"+8% to Cold Resistance",
"+6% to Lightning Resistance",
"+12% Chance to Block Attack Damage while wielding a Staff",
"Reflects 34 Physical Damage to Attackers on Block",
"115% increased Energy Shield",
"+1 to maximum number of Summoned Totems",
"92% increased Armour and Energy Shield",
"+33 to maximum Life",
"+13% to Cold Resistance",
"100% increased Ignite Duration on you",
"+70 to maximum Life",
"+5% Chance to Block",
"+13 to maximum Life",
"+7 Life gained on Kill",
"+24 to Strength",
"+25 to Dexterity",
"+298 to Armour",
"+64 to maximum Mana",
"+45% to Fire Resistance",
"+41% to Cold Resistance",
"+18% to Lightning Resistance",
"+12% Chance to Block Attack Damage while wielding a Staff",
"Reflects 23 Physical Damage to Attackers on Block",
"+25% to Global Critical Strike Multiplier",
"+8% Chance to Block Attack Damage while Dual Wielding",
"+2 to Melee Strike Range per White Socket",
"+2 to Level of Socketed Bow Gems",
"+12 Life gained on Kill",
"+5 Mana gained on Kill",
"Deals 91.3% of Base Damage",
"25% chance to cause Bleeding",
"+10 to maximum Life",
"+6 Life gained on Kill",
"+1 to maximum number of Raised Zombies",
"+1 to maximum number of Spectres",
"+1 to maximum number of Skeletons",
"+21 to Dexterity",
"-25% to all Elemental Resistances",
"+97% to Fire Resistance when Socketed with a Red Gem",
"+82% to Cold Resistance when Socketed with a Green Gem",
"+82% to Lightning Resistance when Socketed with a Blue Gem",
"Deals 9 to 14 Chaos Damage",
"Deals 31.2 Base Chaos Damage per second",
"Base duration is 3.80 seconds",
"Modifiers to Spell Damage apply to this Skill's Damage Over Time effect",
"Regenerate 0.50% of Debuff Damage as Life",
"+24 to Armour",
"+25 to maximum Life",
"+30 to Strength",
"+21 to Intelligence",
"+15% to Cold Resistance",
"+15 to Dexterity",
"+6% to Cold Resistance",
"+4 to Accuracy Rating",
"+2 to Level of Socketed Minion Gems",
"+25 to Intelligence",
"+43% to Cold Resistance",
"+37% to Lightning Resistance",
"+18 to Dexterity",
"+17 to maximum Energy Shield",
"+10% to Lightning Resistance",
"+17 to Dexterity",
"+48 to Intelligence",
"+15% to Lightning Resistance",
"+49 to maximum Life",
"+24% to Fire Resistance",
"+1 Mana gained on Kill",
"+45 to maximum Life",
"+19% to Cold Resistance",
"+27 to Accuracy Rating",
"+41 to Evasion Rating",
"+34% to Lightning Resistance",
"+34 to Strength",
"+45% to Cold Resistance",
"+22 to Strength",
"+42 to Intelligence",
"+19 to maximum Life",
"+17 to maximum Mana",
"+5% to all Elemental Resistances",
"+13 to Intelligence",
"+7 Life gained on Kill",
"+1 to Level of Socketed Minion Gems",
"+39 to Intelligence",
"+11% to Lightning Resistance",
"+12 to maximum Life",
"+20% to Fire Resistance",
"+27% to Cold Resistance",
"+18 to maximum Energy Shield",
"+26% to Fire Resistance",
"+88 to Accuracy Rating",
"+4 to maximum Life",
"+25 to maximum Energy Shield",
"+20% to Fire Resistance",
"+23 to Accuracy Rating",
"+27 to Intelligence",
"+40 to maximum Mana",
"+38% to Lightning Resistance",
"+8 to Strength",
"+129 to Accuracy Rating",
"+40 to maximum Energy Shield",
"+79 to maximum Life",
"+23 to maximum Mana",
"+197 to Accuracy Rating",
"+64 to maximum Mana",
"+34 to maximum Mana",
"+14% to all Elemental Resistances",
"+2 Mana gained on Kill",
"+41 to maximum Life",
"+22% to Fire Resistance",
"+19 to Strength",
"+8 to maximum Energy Shield",
"+23% to Lightning Resistance",
"+36 to Dexterity",
"+389 to Accuracy Rating",
"+4 to maximum Energy Shield",
"+13% to all Elemental Resistances",
"+35 to Strength",
"+40 to maximum Energy Shield",
"+53 to maximum Life",
"+26 to Strength",
"+33 to Dexterity",
"+2 to maximum Energy Shield",
"+5 to maximum Life",
"+61 to maximum Mana",
"+37% to Cold Resistance",
"+28 to Accuracy Rating",
"+61 to maximum Life",
"+42% to Cold Resistance",
"+25% to Cold Resistance",
"+7% to Lightning Resistance",
"+30 to maximum Life",
"+22% to Fire Resistance",
"+32% to Lightning Resistance",
"+36 to Strength",
"26% increased Armour and Energy Shield",
"+31 to maximum Mana",
"+8% to Lightning Resistance",
"+43 to Strength",
"+25 to Accuracy Rating",
"+4 to maximum Energy Shield",
"+24 to maximum Mana",
"+15% to all Elemental Resistances",
"+383 to Armour",
"+10 to maximum Energy Shield",
"+12% to Fire Resistance",
"+10 to Dexterity",
"+108 to Accuracy Rating",
"+5 Life gained on Kill",
"+41 to Dexterity",
"+38 to maximum Energy Shield",
"+60 to maximum Mana",
"+13 Life gained on Kill",
"+12 to Strength",
"+13 to Armour",
"+81 to maximum Life",
"+19% to Lightning Resistance",
"+71 to Armour",
"+8 to maximum Energy Shield",
"+13 to maximum Life",
"+14% to Cold Resistance",
"+26% to Lightning Resistance",
"+1 to Melee Strike Range",
"Base duration is 6.00 seconds",
"Cursed enemies have a 100% chance to grant a Power Charge when slain",
"Hits against Cursed Enemies have +1.5% to Critical Strike Chance",
"Hits against Cursed Enemies have +30% to Critical Strike Multiplier",
"Cursed enemies grant 65 Life when Killed",
"Cursed enemies grant 25 Mana when Killed",
"Deals 9 to 14 Chaos Damage",
"Deals 31.2 Base Chaos Damage per second",
"Base duration is 3.80 seconds",
"Modifiers to Spell Damage apply to this Skill's Damage Over Time effect",
"Regenerate 0.50% of Debuff Damage as Life",
"Base duration is 3.00 seconds",
"Minions deal 75% more Damage",
"Supported Auras do not affect you",
"Non-Curse Auras from Supported Skills have 20% increased Effect",
"Base duration is 6.00 seconds",
"Cursed enemies grant 2% Life Leech when Hit by Attacks",
"Cursed enemies grant 2% Mana Leech when Hit by Attacks",
"Cursed enemies have a 100% chance to grant an Endurance Charge when slain",
"Hits against Cursed Enemies have 40% chance to double Stun Duration",
"Cursed Enemies grant 20 Rage Regenerated over 1 second when Stunned",
"Supported Skills apply supported Curses on Hit",
"You cannot Cast Supported Curse Spells",
"Supported Skills have 44% reduced Curse Duration",
"Deals 44.5% of Base Damage",
"6 to 9 Added Attack Physical Damage",
"8% increased Area of Effect per 1 additional Melee Strike Range",
"30% less Movement Speed",
"First Hit deals 50% less Damage",
"Gains 1 Stage every 0.3 seconds while Channelling",
"Maximum 3 Stages",
"+1 to radius per Stage",
"Lose 1 Stage every 0.3 seconds while not Channelling",
"Supported Attack Skills deal 35% more Elemental Damage",
"Supported Skills gain 17% of Physical Damage as Extra Lightning Damage",
"Supported Skills have 50% of Physical Damage Converted to Lightning Damage",
"+20 to maximum Life",
"+38% to Lightning Resistance",
"Maximum 1 Summoned Golem",
"30% increased Minion Maximum Life",
"Golems Grant 20% increased Critical Strike Chance",
"Golems Grant 20% increased Accuracy",
"+20 to Dexterity",
"+6% to all Elemental Resistances",
"Deals 9 to 14 Fire Damage",
"20% chance to Ignite enemies",
"50% more Damage with Ignite",
"Supported Skills apply their Curse as Auras Supported Curse Skills also count as Aura Skills Hexes from Supported Skills do not gain Doom over time",
"Using Supported Skills is Instant",
"Supported Skills have 50% increased Critical Strike Chance",
"Supported Skills have +1% to Critical Strike Chance",
"Supported Skills have 5 to 95 added Lightning Damage",
"Supported Skills have 30% increased Area of Effect",
"Supported Skills grant Fortify on Melee hit",
"Supported Skills have 15% increased Fortify duration",
"Supported Skills deal 20% more Damage with Ailments caused by Melee Hits",
"Supported Skills deal 20% more Melee Damage",
"Supported Skills have +75% to Critical Strike Multiplier",
"Supported Skills have 79 to 118 added Cold Damage",
"Supported Skills have 4 to 6 added Cold Damage",
"Supported Skills have 4 to 80 added Lightning Damage",
"Supported Skills deal 15% less Projectile Damage",
"Supported Skills fire 2 additional Projectiles",
"Deals 107% of Base Damage",
"8 to 12 Added Attack Physical Damage",
"Fires 6 additional Arrows",
"+20 to Dexterity",
"+6% to all Elemental Resistances",
"+12% to Critical Strike Multiplier with Fire Skills",
"+9% to Critical Strike Multiplier with Elemental Skills",
"+21 to maximum Mana",
"+23% to Lightning Resistance",
"Cannot be Shocked",
"Supported Skills apply supported Curses on Hit",
"You cannot Cast Supported Curse Spells",
"Supported Skills have 46% reduced Curse Duration",
"Supported Skills have 20% increased Cast Speed",
"Deals 21 to 38 Lightning Damage",
"Base duration is 1.50 seconds",
"Deals 32 to 47 Cold Damage",
"Deals 26.3 Base Cold Damage per second",
"Base duration is 5.00 seconds",
"Modifiers to Spell Damage apply to this Skill's Damage Over Time effect",
"25% chance to gain a Frenzy Charge when an Enemy Dies while in this Skill's Area",
"Base duration is 20.00 seconds",
"Maximum 5 Summoned Skeletons",
"Summons 2 Skeleton Warriors",
"Minions gain 50% more Added Damage",
"Deals 91.3% of Base Damage",
"25% chance to cause Bleeding",
"Arrows Pierce 6 additional Targets",
"+2 to maximum number of Summoned Totems",
"Totem lasts 8 seconds",
"Deals 7 to 11 Physical Damage",
"Projectiles Pierce all Targets",
"Totem lasts 8 seconds",
"Fires 2 additional Projectiles",
"Consecrated Ground grants Immunity to Curses to you and Allies",
"Supported Skills gain 28% of Physical Damage as Extra Fire Damage",
"Supported Skills have 2 to 41 added Lightning Damage",
"Deals 35.8 Base Fire Damage per second",
"Deals 20% of your Maximum Life as Base Fire Damage per second",
"Deals 20% of your Maximum Energy Shield as Base Fire Damage per second",
"You Burn for 90% of your Maximum Life per second as Fire Damage",
"You Burn for 70% of your Maximum Energy Shield per second as Fire Damage",
"Grants 20% more Spell Damage",
"Supported Skills Penetrate 18% Lightning Resistance",
"Deals 140% of Base Damage",
"Fires 4 additional Projectiles",
"20% chance to gain a Power Charge when Projectile Hits a Rare or Unique Enemy",
"20% increased Critical Strike Chance per Power Charge",
"+10% to Critical Strike Multiplier per Power Charge",
"+3 to radius",
"You and nearby Allies Regenerate 8.4 Mana per second",
"Supported Skills deal 15% less Projectile Damage",
"Supported Skills fire 2 additional Projectiles",
"Supported Skills have 45% more Minion maximum Life",
"Base duration is 2.00 seconds",
"Regenerate 1666 Life over 1 second",
"Counts total Power of Enemies in Range",
"Gain 1 Endurance Charge per 5 Power",
"Buff grants +2% to all Elemental Resistances per Endurance Charge",
"Buff grants 2% additional Physical Damage Reduction per Endurance Charge",
"Base duration is 3.60 seconds",
"11% less Physical Damage taken from Hits",
"10% less Fire Damage taken from Hits",
"Chill Enemy for 0.5 seconds when Hit, reducing their Action Speed by 30%",
"+9 to Strength",
"+15 to Intelligence",
"+13 to maximum Energy Shield",
"+60 to maximum Life",
"+8% to Cold Resistance",
"+31 to Intelligence",
"45% increased Energy Shield",
"+40 to maximum Mana",
"+44% to Lightning Resistance",
"78% increased Energy Shield",
"+35% to Cold Resistance",
"+30% to Lightning Resistance",
"+74 to maximum Life",
"+42% to Fire Resistance",
"+29% to Cold Resistance",
"+24 to Intelligence",
"+31% to Fire Resistance",
"+25% to Cold Resistance",
"+31% to Global Critical Strike Multiplier",
"+76 to maximum Life",
"+44% to Lightning Resistance",
"42% increased Armour and Evasion",
"+80 to maximum Life",
"+13% to Fire Resistance",
"+21% to Cold Resistance",
"+13% to Lightning Resistance",
"+7 to Evasion Rating",
"+20 to maximum Life",
"+43% to Fire Resistance",
"+27% to Lightning Resistance",
"+43% to Lightning Resistance",
"+28% to Chaos Resistance",
"+75 to maximum Life",
"+20% to Lightning Resistance",
"+40% to Fire Resistance",
"+40% to Cold Resistance",
"+26% to Lightning Resistance",
"+88 to maximum Life",
"+32% to Fire Resistance",
"+28% to Cold Resistance",
"+20% to Chaos Resistance",
"+64 to maximum Life",
"+39% to Cold Resistance",
"+41% to Lightning Resistance",
"+10 Life gained on Kill",
"+34% to Global Critical Strike Multiplier",
"+23 to Dexterity",
"+34 to maximum Life",
"+27% to Chaos Resistance",
"+3 to Evasion Rating",
"+74 to maximum Life",
"+35% to Fire Resistance",
"+34% to Lightning Resistance",
"+15% to Fire Resistance",
"+14 Life gained on Kill",
"+20% to Cold Resistance",
"+60 to maximum Mana",
"+21 to Dexterity",
"+44% to Cold Resistance",
"+3 to Evasion Rating",
"+27 to maximum Life",
"+44% to Fire Resistance",
"+43% to Lightning Resistance",
"+30 to Strength",
"+24% to Fire Resistance",
"+6% to Fire Resistance",
"+2 Mana gained on Kill",
"+115 to Accuracy Rating",
"+4 to maximum Life",
"+21% to Lightning Resistance",
"32% reduced Attribute Requirements",
"+33 to Strength",
"+97 to maximum Life",
"+37 to Intelligence",
"16% increased Evasion and Energy Shield",
"+34 to maximum Life",
"+25% to Chaos Resistance",
"+39 to Intelligence",
"+56 to maximum Mana",
"+27% to Lightning Resistance",
"+24 to Dexterity",
"+9 to Armour",
"+29% to Fire Resistance",
"+11% to Chaos Resistance",
"+161 to Accuracy Rating",
"15% increased Armour and Evasion",
"+35% to Lightning Resistance",
"+2 to Level of Socketed Melee Gems",
"+112 to Accuracy Rating",
"+17 to Armour",
"+5 to Evasion Rating",
"+9% to Fire Resistance",
"+15% to Lightning Resistance",
"+5 Life gained on Kill",
"+150 to Accuracy Rating",
"+43 to maximum Mana",
"+13% to Lightning Resistance",
"+7 Life gained on Kill",
"32% reduced Attribute Requirements",
"+2 Life gained for each Enemy hit by Attacks",
"+34 to Intelligence",
"+58 to maximum Mana",
"+75 to maximum Life",
"+7% to Lightning Resistance",
"+13% to Global Critical Strike Multiplier",
"+145 to Accuracy Rating",
"+49 to maximum Mana",
"+6 Mana gained on Kill",
"+234 to Accuracy Rating",
"+19 to maximum Energy Shield",
"+20 to maximum Mana",
"+7% to Lightning Resistance",
"+61 to Evasion Rating",
"34% increased Evasion and Energy Shield",
"+57 to maximum Mana",
"+25% to Fire Resistance",
"+29% to Lightning Resistance",
"+2 Mana gained on Kill",
"+193 to Accuracy Rating",
"+21% to Fire Resistance",
"+311 to Accuracy Rating",
"+5 to Evasion Rating",
"88% increased Armour and Evasion",
"+30% to Lightning Resistance",
"+46 to maximum Mana",
"+36 to Intelligence",
"+39% to Fire Resistance",
"+1 to Level of Socketed Minion Gems",
"+41% to Cold Resistance",
"+45% to Lightning Resistance",
"+70 to Evasion Rating",
"+3 to maximum Energy Shield",
"+25% to Fire Resistance",
"+20% to Chaos Resistance",
"+13 to Strength",
"+41 to Strength",
"+39% to Fire Resistance",
"+15% to Cold Resistance",
"+170 to Accuracy Rating",
"+1 Mana gained on Kill",
"+9 to Armour",
"+82 to maximum Life",
"+30% to Lightning Resistance",
"+34 to Strength",
"+36 to Accuracy Rating",
"+70 to Evasion Rating",
"+4 to maximum Energy Shield",
"+5 Mana gained on Kill",
"+12 to Intelligence",
"91% increased Energy Shield",
"+18 to maximum Mana",
"+35% to Cold Resistance",
"70% increased Energy Shield",
"+5 to maximum Life",
"+15 to maximum Mana",
"+35% to Fire Resistance",
"+16% to Lightning Resistance",
"+36% to Cold Resistance",
"+210 to Accuracy Rating",
"+11 to Dexterity",
"+7 to Evasion Rating",
"+68 to maximum Life",
"+20% to Cold Resistance",
"32% reduced Attribute Requirements",
"+36 to Dexterity",
"+41 to Evasion Rating",
"+4 to maximum Life",
"+45% to Lightning Resistance",
"+28 to Strength",
"+40 to maximum Energy Shield",
"+36% to Lightning Resistance",
"+9 to Intelligence",
"+73 to maximum Life",
"+10% to Fire Resistance",
"+28% to Cold Resistance",
"32% reduced Attribute Requirements",
"+11% to Global Critical Strike Multiplier",
"+13 to Accuracy Rating",
"+151 to Accuracy Rating",
"100% increased Armour and Energy Shield",
"+14 to maximum Energy Shield",
"+47 to Evasion Rating",
"+25 to maximum Energy Shield",
"+14 Life gained on Kill",
"+11% to Global Critical Strike Multiplier",
"+20 to maximum Energy Shield",
"+26 to Armour",
"+22% to Fire Resistance",
"+42 to Dexterity",
"+11 to maximum Life",
"+22 to Strength",
"+32 to maximum Energy Shield",
"+22% to Cold Resistance",
"+19 to Strength",
"+47 to Armour",
"+37% to Lightning Resistance",
"+10% to Fire Resistance",
"+41% to Cold Resistance",
"+21% to Lightning Resistance",
"+61 to Armour",
"+22 to maximum Energy Shield",
"+42 to maximum Life",
"+27 to Strength",
"+6 to maximum Life",
"+6% to Fire Resistance",
"+45% to Cold Resistance",
"+46 to Strength",
"+13 to Accuracy Rating",
"15% increased Armour and Energy Shield",
"+47 to Strength",
"+33 to Dexterity",
"+30 to maximum Energy Shield",
"+21% to Cold Resistance",
"95% increased Energy Shield",
"+8 to maximum Life",
"+26 to maximum Mana",
"+47 to maximum Mana",
"+2 Mana gained on Kill",
"+18 to Accuracy Rating",
"32% reduced Attribute Requirements",
"+47 to maximum Life",
"+40% to Fire Resistance",
"+27 to Accuracy Rating",
"+23 to Strength",
"+10% to Lightning Resistance",
"+20% to Lightning Resistance",
"+2 Life gained for each Enemy hit by your Attacks",
"+14 Life gained on Kill",
"+9 to Intelligence",
"+177 to Accuracy Rating",
"+7% to Chaos Resistance",
"+20 to Dexterity",
"+32 to maximum Mana",
"+2 Mana gained on Kill",
"+33 to Strength",
"+116 to Armour",
"+20% to Cold Resistance",
"+23 to Intelligence",
"+19 to maximum Energy Shield",
"+43% to Cold Resistance",
"+14% to Chaos Resistance",
"+12 to Intelligence",
"+25 to Dexterity",
"+54 to Evasion Rating",
"+21 to maximum Energy Shield",
"+3 Life gained on Kill",
"+25 to Intelligence",
"+22 to Accuracy Rating",
"+18 to maximum Energy Shield",
"+71 to maximum Life",
"+33 to maximum Mana",
"+15 to Strength",
"+36 to maximum Life",
"+33% to Lightning Resistance",
"20% increased Energy Shield",
"+7 to maximum Life",
"+45 to maximum Mana",
"+15% to Lightning Resistance",
"+39 to Intelligence",
"+184 to Accuracy Rating",
"+76 to maximum Life",
"+31 to maximum Mana",
"+6% to Cold Resistance",
"+42 to Dexterity",
"+40 to Accuracy Rating",
"+61 to maximum Mana",
"+76 to maximum Life",
"+24% to Cold Resistance",
"+39 to Dexterity",
"+3 to maximum Life",
"+10% to Fire Resistance",
"+35% to Lightning Resistance",
"+64 to maximum Mana",
"+4 Life gained on Kill",
"+12 to Intelligence",
"+15% to Global Critical Strike Multiplier",
"+17% to Cold Resistance",
"+10% to Lightning Resistance",
"+31 to Strength",
"+31 to maximum Energy Shield",
"+3 to maximum Life",
"+19% to Fire Resistance",
"+31 to Intelligence",
"44% increased Armour and Energy Shield",
"+33 to maximum Mana",
"+13% to all Elemental Resistances",
"+11% to Cold Resistance",
"+379 to Evasion Rating",
"+14 to maximum Life",
"+7% to Lightning Resistance",
"+14 to Intelligence",
"16% increased Armour and Energy Shield",
"+42% to Fire Resistance",
"+1 Mana gained on Kill",
"+10 to Intelligence",
"+50 to maximum Energy Shield",
"+37 to maximum Mana",
"+37% to Cold Resistance",
"+4 to Armour",
"+38 to maximum Energy Shield",
"+29 to maximum Life",
"+13 Life gained on Kill",
"+35% to Cold Resistance",
"+41 to maximum Life",
"+16% to Fire Resistance",
"+15% to Lightning Resistance",
"+17 to all Attributes",
"+23 to Strength",
"+12% to Global Critical Strike Multiplier",
"+20 to maximum Energy Shield",
"+30 to maximum Life",
"+13% to Lightning Resistance",
"+33% to Global Critical Strike Multiplier",
"+17 to Intelligence",
"+36 to maximum Mana",
"+26% to Lightning Resistance",
"+8 to Strength",
"+6 to Armour",
"+88 to maximum Life",
"+37% to Cold Resistance",
"+20 to Dexterity",
"+19 to maximum Energy Shield",
"+7% to Fire Resistance",
"+4 Life gained on Kill",
"+36 to Intelligence",
"6% increased Energy Shield",
"+15 to maximum Mana",
"+33 to Dexterity",
"+36% to Lightning Resistance",
"+5 Life gained for each Enemy hit by Attacks",
"+10 Life gained on Kill",
"+1 to maximum Energy Shield",
"+90 to maximum Life",
"+22 to Strength",
"14% increased Armour and Energy Shield",
"+4 to maximum Energy Shield",
"+26 to Strength",
"+10 to Intelligence",
"+17 to maximum Energy Shield",
"+28% to Global Critical Strike Multiplier",
"+30% to Cold Resistance",
"+25 to Intelligence",
"+8 to maximum Energy Shield",
"109% increased Energy Shield",
"+42 to Intelligence",
"+21 to Armour",
"+43% to Cold Resistance",
"+12 to Dexterity",
"+36% to Global Critical Strike Multiplier",
"+30 to maximum Mana",
"+7 to Accuracy Rating",
"+27 to Dexterity",
"+26% to Global Critical Strike Multiplier",
"+32 to maximum Life",
"+46 to Strength",
"+224 to Accuracy Rating",
"+25 to maximum Energy Shield",
"+18 to maximum Life",
"+25 to Strength",
"+38 to maximum Energy Shield",
"+44% to Fire Resistance",
"+14% to Cold Resistance",
"+1 to Level of Socketed Lightning Gems",
"+2 Mana gained on Kill",
"+68 to maximum Life",
"+29% to Fire Resistance",
"+12% to Lightning Resistance",
"+14 to Strength",
"+45 to maximum Energy Shield",
"+74 to maximum Life",
"+23% to Global Critical Strike Multiplier",
"+63 to Evasion Rating",
"+3 to maximum Energy Shield",
"+7% to all Elemental Resistances",
"+25% to Fire Resistance",
"63% increased Armour and Energy Shield",
"+65 to maximum Life",
"+31% to Fire Resistance",
"42% increased Armour and Energy Shield",
"+61 to maximum Mana",
"+35% to Cold Resistance",
"+7% to Chaos Resistance",
"+26% to Global Critical Strike Multiplier",
"+2 Mana gained on Kill",
"18% reduced Attribute Requirements",
"+80 to Accuracy Rating",
"+77 to maximum Mana",
"+11% to Lightning Resistance",
"+25 to Dexterity",
"+115 to Accuracy Rating",
"+56 to maximum Life",
"+25% to Fire Resistance",
"+1 to Level of Socketed Melee Gems",
"+17% to Fire Resistance",
"+19 to Accuracy Rating",
"+28% to Fire Resistance",
"+13% to Cold Resistance",
"+1 to Level of Socketed Lightning Gems",
"+42% to Fire Resistance",
"+66 to maximum Life",
"+45 to Evasion Rating",
"+6 Mana gained on Kill",
"+1 to Level of Socketed Cold Gems",
"+12 to Strength",
"+66 to maximum Mana",
"+8 to Accuracy Rating",
"32% reduced Attribute Requirements",
"+16 to maximum Mana",
"+36% to Cold Resistance",
"+14 to Intelligence",
"+3 Life gained on Kill",
"+21% to Lightning Resistance",
"+97 to Accuracy Rating",
"+17 to Evasion Rating",
"+5% to all Elemental Resistances",
"+44 to maximum Energy Shield",
"+78 to maximum Life",
"+39% to Fire Resistance",
"+15 to maximum Energy Shield",
"+62 to maximum Life",
"+9% to Fire Resistance",
"+42% to Lightning Resistance",
"+14 to maximum Energy Shield",
"+27 to maximum Life",
"+33% to Fire Resistance",
"+32 to maximum Energy Shield",
"+42 to maximum Life",
"+35% to Lightning Resistance",
"+26% to Chaos Resistance",
"+4 to Armour",
"+10 to maximum Energy Shield",
"+56 to maximum Life",
"+15% to Lightning Resistance",
"+42 to Dexterity",
"+21 to maximum Energy Shield",
"+41 to maximum Life",
"+28 to Strength",
"+16 to maximum Energy Shield",
"+53 to maximum Mana",
"+5 Life gained for each Enemy hit by Attacks",
"18% reduced Attribute Requirements",
"+52 to Armour",
"49% increased Armour and Evasion",
"+6% to Lightning Resistance",
"+10% to Chaos Resistance",
"+9 to maximum Mana",
"+24% to Fire Resistance",
"+184 to Accuracy Rating",
"+19 to Intelligence",
"+31 to maximum Energy Shield",
"+30 to maximum Mana",
"+37% to Fire Resistance",
"+9 to Intelligence",
"+15 to maximum Energy Shield",
"+55 to maximum Mana",
"+43% to Fire Resistance",
"+13 to maximum Energy Shield",
"18% increased Energy Shield",
"+32 to maximum Mana",
"+21 to Dexterity",
"+25 to Accuracy Rating",
"+9% to Cold Resistance",
"+2 to Level of Socketed Fire Gems",
"+11% to Lightning Resistance",
"+6 Life gained on Kill",
"+32 to Accuracy Rating",
"+35 to Dexterity",
"+20 to maximum Energy Shield",
"+42 to maximum Mana",
"+58 to maximum Life",
"+45 to maximum Mana",
"+7% to Fire Resistance",
"+34 to Intelligence",
"+8 to maximum Life",
"+45% to Fire Resistance",
"+7 to maximum Energy Shield",
"+34% to Fire Resistance",
"+43% to Cold Resistance",
"+3 Mana gained on Kill",
"+25 to Dexterity",
"+4 to maximum Life",
"+45% to Cold Resistance",
"32% reduced Attribute Requirements",
"+40 to maximum Life",
"+36% to Fire Resistance",
"+42% to Cold Resistance",
"+23 to maximum Energy Shield",
"+14 to maximum Life",
"+17% to Cold Resistance",
"Deals 134 to 202 Physical Damage",
"Projectiles Pierce all Targets",
"Totem lasts 8 seconds",
"Fires 2 additional Projectiles",
"Consecrated Ground grants Immunity to Curses to you and Allies",
"Deals 119 to 178 Physical Damage",
"Projectiles Pierce all Targets",
"Totem lasts 8 seconds",
"Fires 2 additional Projectiles",
"Consecrated Ground grants Immunity to Curses to you and Allies",
"Deals 134 to 202 Physical Damage",
"Projectiles Pierce all Targets",
"Totem lasts 8 seconds",
"Fires 2 additional Projectiles",
"Consecrated Ground grants Immunity to Curses to you and Allies",
"Base duration is 4.40 seconds",
"13% less Physical Damage taken from Hits",
"12% less Fire Damage taken from Hits",
"Chill Enemy for 0.5 seconds when Hit, reducing their Action Speed by 30%",
"+47 to Dexterity",
"+26 to Strength",
"+20 to Intelligence",
"+19% to Cold Resistance",
"Supported Skills deal 15% less Projectile Damage",
"Supported Skills fire 2 additional Projectiles",
"+15 to Dexterity",
"+49 to Accuracy Rating",
"50% less Damage",
"+10 Life gained on Killing Ignited Enemies",
"25% reduced Ignite Duration on Enemies",
"+1 to Level of Socketed Spell Gems",
"+17 to maximum Life",
"+17 to maximum Mana",
"Regenerate 8 Life over 1 second when you Cast a Spell",
"+20 to Dexterity",
"+105 to Accuracy Rating",
"+10 to maximum Energy Shield",
"+75 to maximum Life",
"+26% to Fire Resistance",
"+27% to Cold Resistance",
"+1 to Level of Socketed Elemental Gems",
"306% increased Energy Shield",
"80% increased Mana Cost of Skills",
"+15 Energy Shield gained on Kill",
"+1 to Level of Socketed Gems",
"+11 to Intelligence",
"+1 to Level of Socketed Spell Gems",
"+20 to maximum Life",
"+15 to maximum Mana",
"Regenerate 8 Life over 1 second when you Cast a Spell",
"+31 to Intelligence",
"+24 to maximum Mana",
"+32 to Intelligence",
"56% increased Evasion and Energy Shield",
"+25% to Lightning Resistance",
"With at least 40 Dexterity in Radius, Viper Strike deals 2% increased Damage with Hits and Poison for each Poison on the Enemy",
"+16 to Strength",
"+61 to maximum Energy Shield",
"+99 to maximum Life",
"+23% to Fire Resistance",
"+29% to Cold Resistance",
"+28% to Cold Resistance",
"+37% to Lightning Resistance",
"+1 to Level of Socketed Fire Gems",
"+19 to maximum Mana",
"+1 to Level of Socketed Lightning Gems",
"+32 to maximum Mana",
"+2 Mana gained on Kill",
"Supported Skills Penetrate 21% Lightning Resistance",
"Improves the quality of an armour",
"84% increased Energy Shield",
"+11% to all Elemental Resistances",
"+44% to Lightning Resistance",
"+8% to Global Critical Strike Multiplier",
"+78 to maximum Life",
"+10% to Cold Resistance",
"+2 Life gained for each Enemy hit by your Attacks",
"+29 to Intelligence",
"+57 to maximum Life",
"+33% to Lightning Resistance",
"+84 to maximum Life",
"+39% to Fire Resistance",
"+21% to Cold Resistance",
"+34% to Lightning Resistance",
"+24 to Evasion Rating",
"+25% to Fire Resistance",
"+23% to Lightning Resistance",
"+10 to Armour",
"+76 to maximum Life",
"+41% to Cold Resistance",
"+34% to Lightning Resistance",
"+28 to Dexterity",
"+17 to maximum Energy Shield",
"+70 to maximum Life",
"+41 to Intelligence",
"+56 to maximum Life",
"+20% to Lightning Resistance",
"+12% to Critical Strike Multiplier with Fire Skills",
"+9% to all Elemental Resistances",
"Minions have +3% Chance to Block Attack Damage",
"+72 to maximum Life",
"+44% to Fire Resistance",
"+1 to all Attributes",
"+25% to Lightning Resistance",
"+8% to Global Critical Strike Multiplier",
"+10% to Critical Strike Multiplier with Lightning Skills",
"+14 to Strength",
"+12% to Fire and Lightning Resistances",
"+10 to Dexterity and Intelligence",
"+6% to Global Critical Strike Multiplier",
"+11% to Critical Strike Multiplier with Lightning Skills",
"+25 to maximum Mana",
"+14% to all Elemental Resistances",
"+31% to Cold Resistance",
"-8 to Total Mana Cost of Skills",
"+6% to all maximum Elemental Resistances during Flask effect",
"+338 to Accuracy Rating",
"+16 to maximum Life",
"+30% to Lightning Resistance",
"+44 to Strength",
"+17 to maximum Life",
"+14% to Chaos Resistance",
"+5 Life gained for each Enemy hit by Attacks",
"+2 Mana gained on Kill",
"+9 to maximum Life",
"+13% to Fire Resistance",
"+12% to Lightning Resistance",
"+39 to maximum Energy Shield",
"+78 to maximum Life",
"+6 Mana gained on Kill",
"41% increased Evasion and Energy Shield",
"+38 to maximum Mana",
"+9% to Cold Resistance",
"+29% to Lightning Resistance",
"29% increased Armour and Evasion",
"+31 to maximum Life",
"+20 to Dexterity",
"+35 to maximum Life",
"+26% to Fire Resistance",
"+19% to Lightning Resistance",
"+14 Life gained on Kill",
"+135 to Accuracy Rating",
"+6 to maximum Life",
"+11% to all Elemental Resistances",
"+22% to Cold Resistance",
"+38% to Fire Resistance",
"+39 to Dexterity",
"+12 to Accuracy Rating",
"+14% to Global Critical Strike Multiplier",
"+14% to Fire Resistance",
"+9 to Dexterity",
"+3 to Accuracy Rating",
"+90 to maximum Life",
"+37% to Fire Resistance",
"+35% to Cold Resistance",
"+19% to Chaos Resistance",
"+26% to Global Critical Strike Multiplier",
"+29% to Cold Resistance",
"+10 to maximum Energy Shield",
"+109 to maximum Life",
"+39 to maximum Mana",
"+35% to Fire Resistance",
"+42% to Cold Resistance",
"+22 to Dexterity",
"+45 to maximum Life",
"+32% to Lightning Resistance",
"+23 to Strength",
"+44 to Evasion Rating",
"+36 to maximum Mana",
"+25% to Fire Resistance",
"+15 to Intelligence",
"+54 to Evasion Rating",
"+24 to maximum Energy Shield",
"+20% to Fire Resistance",
"+19% to Lightning Resistance",
"+38 to Dexterity",
"+19 to maximum Mana",
"+40% to Cold Resistance",
"+12% to Lightning Resistance",
"+33 to maximum Energy Shield",
"+29% to Cold Resistance",
"10% increased Armour and Energy Shield",
"+23 to maximum Life",
"+7% to Lightning Resistance",
"+232 to Accuracy Rating",
"+74 to maximum Life",
"14% increased Armour and Energy Shield",
"+57 to maximum Life",
"+15% to Fire Resistance",
"+2 to maximum Energy Shield",
"+36 to Intelligence",
"+25 to maximum Energy Shield",
"+3 Mana gained on Kill",
"+2 to Level of Socketed Melee Gems",
"+16 to Armour",
"+29 to maximum Energy Shield",
"+73 to maximum Life",
"+20% to Fire Resistance",
"+13% to Lightning Resistance",
"+24 to Dexterity",
"+147 to Evasion Rating",
"22% increased Evasion and Energy Shield",
"+44 to maximum Life",
"+35% to Fire Resistance",
"+39% to Lightning Resistance",
"+6 Life gained on Kill",
"+34% to Cold Resistance",
"+11% to Lightning Resistance",
"+56 to maximum Life",
"+18% to Fire Resistance",
"+13% to Lightning Resistance",
"+1 to Level of Socketed Cold Gems",
"+16 to Intelligence",
"+6 Life gained on Kill",
"+29 to Strength",
"+2 to maximum Energy Shield",
"+23 to maximum Life",
"+117 to Evasion Rating",
"+73 to maximum Life",
"+23 to maximum Mana",
"+10% to Fire Resistance",
"+5 to maximum Energy Shield",
"+11% to Cold Resistance",
"+8% to Lightning Resistance",
"+21 to maximum Mana",
"+22% to Fire Resistance",
"+28% to Cold Resistance",
"+27% to Lightning Resistance",
"+6 to Evasion Rating",
"+55 to maximum Life",
"+14% to Fire Resistance",
"+20% to Lightning Resistance",
"+24 to Intelligence",
"+55 to Armour",
"+1 to Level of Socketed Lightning Gems",
"+10% to Chaos Resistance",
"+17 to maximum Life",
"+8% to Fire Resistance",
"+6% to Cold Resistance",
"+14% to Global Critical Strike Multiplier",
"+4 Life gained on Kill",
"+14 to Strength",
"+8 to Armour",
"+49 to maximum Life",
"+14% to Cold Resistance",
"+15% to Lightning Resistance",
"+19 to Strength",
"+10 to Accuracy Rating",
"+1 to Level of Socketed Bow Gems",
"+22 to Dexterity",
"+15% to Lightning Resistance",
"+3 Mana gained on Kill",
"+8 to maximum Mana",
"+7% to Fire Resistance",
"+2 Life gained on Kill",
"+1 Mana gained on Kill",
"+14 to maximum Mana",
"+77 to maximum Life",
"+12% to Cold Resistance",
"+30 to maximum Life",
"+19% to Fire Resistance",
"+3 Life gained on Kill",
"+4 Life gained on Kill",
"+1 Mana gained on Kill",
"+12 to Accuracy Rating",
"+13 to Accuracy Rating",
"+71 to maximum Life",
"+27% to Cold Resistance",
"+18 to Strength",
"+3 to Armour",
"39% increased Armour and Evasion",
"+23 to maximum Life",
"+22% to Fire Resistance",
"+22% to Lightning Resistance",
"+31 to Strength",
"+13 to maximum Life",
"+1 to Level of Socketed Melee Gems",
"+11 to Evasion Rating",
"+68 to maximum Life",
"+27% to Fire Resistance",
"+25% to Lightning Resistance",
"+38% to Fire Resistance",
"+11% to Fire Resistance",
"+8% to Cold Resistance",
"+126 to Armour",
"118% increased Armour and Energy Shield",
"7% increased Energy Shield",
"+27 to maximum Life",
"+22 to maximum Mana",
"+8% to Fire Resistance",
"+6% to Cold Resistance",
"+7% to Lightning Resistance",
"+116 to Accuracy Rating",
"+4 to maximum Energy Shield",
"+23% to Fire Resistance",
"18% reduced Attribute Requirements",
"+26 to Intelligence",
"66% increased Armour and Energy Shield",
"+19 to maximum Energy Shield",
"+15% to Fire Resistance",
"+16 to Dexterity",
"+33 to maximum Life",
"+20% to Global Critical Strike Multiplier",
"+4 Life gained for each Enemy hit by your Attacks",
"+23 to Strength",
"+20 to Armour",
"+53 to maximum Life",
"+15% to Chaos Resistance",
"+18 to Strength",
"+16 to Dexterity",
"+27 to Armour",
"+7% to Fire Resistance",
"+11% to Cold Resistance",
"+7% to Lightning Resistance",
"+4 Life gained for each Enemy hit by your Attacks",
"+25 to Accuracy Rating",
"+15 to Dexterity",
"+10 to maximum Life",
"+12% to Cold Resistance",
"+8 to Accuracy Rating",
"+17% to Global Critical Strike Multiplier",
"+17 to Intelligence",
"+3 to maximum Energy Shield",
"+13 to maximum Life",
"+10% to Fire Resistance",
"+25 to Dexterity",
"+201 to Accuracy Rating",
"+14 to Intelligence",
"+12% to Global Critical Strike Multiplier",
"+18 to maximum Mana",
"+15% to Fire Resistance",
"+5 Life gained on Kill",
"+1 Mana gained on Kill",
"+12 Life gained on Kill",
"+10 to Strength",
"+43 to maximum Life",
"+9% to Lightning Resistance",
"+45 to maximum Life",
"+37 to maximum Mana",
"+20% to Fire Resistance",
"+20% to Cold Resistance",
"+1 to Level of Socketed Melee Gems",
"+4 Life gained on Kill",
"+11% to Global Critical Strike Multiplier",
"+17 to Accuracy Rating",
"+1 to Level of Socketed Cold Gems",
"+10 to maximum Mana",
"+8 to Accuracy Rating",
"+35 to Strength",
"+33% to Cold Resistance",
"+17% to Lightning Resistance",
"+9 to maximum Life",
"+22% to Fire Resistance",
"+5 Mana gained on Kill",
"+8 to Strength",
"+15% to Cold Resistance",
"+247 to Accuracy Rating",
"+1 to Level of Socketed Lightning Gems",
"+12 to all Attributes",
"+14 to Accuracy Rating",
"+47 to maximum Life",
"+32% to Lightning Resistance",
"+85 to maximum Life",
"+39% to Fire Resistance",
"+24% to Cold Resistance",
"+25% to Cold Resistance",
"+8 to Intelligence",
"+52 to Armour",
"+64 to maximum Energy Shield",
"+1 to Level of Socketed Melee Gems",
"+36% to Lightning Resistance",
"+8 Life gained on Kill",
"+13 to Strength",
"+3 to maximum Life",
"+14% to Fire Resistance",
"+37 to Intelligence",
"+8% to Global Critical Strike Multiplier",
"+28% to Fire Resistance",
"+2 to Level of Socketed Cold Gems",
"+32% to Cold Resistance",
"+11% to Lightning Resistance",
"+30% to Global Critical Strike Multiplier",
"+15 to Intelligence",
"+74 to Accuracy Rating",
"32% reduced Attribute Requirements",
"97% increased Armour and Energy Shield",
"+13 to maximum Life",
"+12 to Strength",
"+34 to maximum Life",
"+10% to Fire Resistance",
"+13% to Lightning Resistance",
"+32 to Strength",
"+78 to Armour",
"32% increased Armour and Energy Shield",
"+57 to maximum Life",
"+17% to Global Critical Strike Multiplier",
"+3 Life gained for each Enemy hit by Attacks",
"+31 to Accuracy Rating",
"+10 to Intelligence",
"+14 to maximum Energy Shield",
"47% increased Energy Shield",
"+30 to maximum Mana",
"+25% to Cold Resistance",
"+48 to Accuracy Rating",
"+13% to Global Critical Strike Multiplier",
"+57 to maximum Life",
"+27% to Fire Resistance",
"+141 to Accuracy Rating",
"+46 to Armour",
"+39% to Lightning Resistance",
"+69 to maximum Life",
"+9% to Lightning Resistance",
"+6 Mana gained on Kill",
"+31 to Strength",
"+31 to maximum Energy Shield",
"+63 to maximum Life",
"+29% to Lightning Resistance",
"+236 to Accuracy Rating",
"+82 to maximum Life",
"+9 Life gained on Kill",
"+19 to Strength",
"+5 to maximum Energy Shield",
"+72 to maximum Life",
"+13% to Fire Resistance",
"+212 to Accuracy Rating",
"+62 to maximum Energy Shield",
"62% increased Energy Shield",
"+75 to maximum Life",
"+16% to Fire Resistance",
"+36 to maximum Life",
"+23% to Lightning Resistance",
"+5% to Chaos Resistance",
"+25 to Dexterity",
"+4 Life gained for each Enemy hit by your Attacks",
"+34 to Intelligence",
"28% increased Energy Shield",
"+51 to maximum Mana",
"+40% to Cold Resistance",
"+16% to Lightning Resistance",
"+88 to maximum Energy Shield",
"+48 to maximum Mana",
"+25% to Cold Resistance",
"+142 to Accuracy Rating",
"+9% to Fire Resistance",
"+19 to Strength",
"+13% to Global Critical Strike Multiplier",
"+41% to Fire Resistance",
"+19 to Intelligence",
"+14 to maximum Mana",
"+60 to maximum Life",
"+23% to Cold Resistance",
"+27% to Lightning Resistance",
"+25 to Strength",
"+36 to maximum Life",
"+34% to Fire Resistance",
"+24% to Lightning Resistance",
"+65 to Evasion Rating",
"61% increased Evasion and Energy Shield",
"+87 to maximum Life",
"+25% to Lightning Resistance",
"+57 to Armour",
"+21 to maximum Energy Shield",
"+59 to maximum Life",
"+17% to Cold Resistance",
"32% reduced Attribute Requirements",
"+93 to maximum Life",
"+15% to Cold Resistance",
"+18% to Lightning Resistance",
"+10 to Intelligence",
"+87 to maximum Life",
"+14% to Lightning Resistance",
"+103 to Evasion Rating",
"+17% to Fire Resistance",
"+28% to Cold Resistance",
"+8% to Lightning Resistance",
"+6 to Armour",
"+69 to maximum Life",
"+25% to Fire Resistance",
"+30% to Cold Resistance",
"+6% to Lightning Resistance",
"+23 to Intelligence",
"+29 to Accuracy Rating",
"98% increased Energy Shield",
"+14% to all Elemental Resistances",
"+12 Life gained on Kill",
"+7 to Accuracy Rating",
"+88 to maximum Life",
"+26% to Fire Resistance",
"+19% to Cold Resistance",
"+13 to Strength",
"+4 Life gained for each Enemy hit by Attacks",
"+34 to Strength",
"+19% to Global Critical Strike Multiplier",
"+31% to Cold Resistance",
"+168 to Accuracy Rating",
"+15 to Dexterity",
"+16 to Dexterity",
"+12 to Intelligence",
"+7 to maximum Energy Shield",
"+8 to Intelligence",
"+33 to maximum Life",
"+11% to Lightning Resistance",
"+37 to Strength",
"+63 to Accuracy Rating",
"+17 to Dexterity",
"+27 to Accuracy Rating",
"+57 to Evasion Rating",
"+32 to maximum Life",
"+1 Mana gained on Kill",
"+2 to Level of Socketed Fire Gems",
"+4 Life gained for each Enemy hit by your Attacks",
"+173 to Accuracy Rating",
"+24 to maximum Life",
"27% increased Energy Shield",
"+74 to maximum Life",
"+35 to maximum Mana",
"+29% to Fire Resistance",
"+33% to Lightning Resistance",
"+16% to all Elemental Resistances",
"60% increased Evasion and Energy Shield",
"+75 to maximum Life",
"+51 to maximum Mana",
"+123 to Accuracy Rating",
"+17% to Global Critical Strike Multiplier",
"+2 to Level of Socketed Lightning Gems",
"+29 to Intelligence",
"+20% to Global Critical Strike Multiplier",
"+17 to maximum Mana",
"+1 to Level of Socketed Gems",
"+2 to Level of Socketed Lightning Gems",
"+15 to Dexterity",
"+28 to maximum Life",
"+10% to Fire Resistance",
"+14% to Cold Resistance",
"+247 to Accuracy Rating",
"+15% to Global Critical Strike Multiplier",
"+10 to Strength",
"+4 to Armour",
"+51 to maximum Mana",
"+222 to Accuracy Rating",
"+2 Life gained for each Enemy hit by your Attacks",
"+31 to maximum Mana",
"+6% to Lightning Resistance",
"+1 to Level of Socketed Minion Gems",
"+16 to Intelligence",
"+22 to Armour",
"+10% to Cold Resistance",
"43% increased Energy Shield",
"+38 to maximum Life",
"+1 to Level of Socketed Melee Gems",
"+81 to maximum Life",
"+20% to Fire Resistance",
"+28% to Cold Resistance",
"+9 to Armour",
"+14% to Fire Resistance",
"+12% to Cold Resistance",
"+18 to Dexterity",
"13% increased Evasion and Energy Shield",
"+6% to Cold Resistance",
"+14% to Lightning Resistance",
"+2 Life gained on Kill",
"+11 to Dexterity",
"+51 to Accuracy Rating",
"+11 to Dexterity",
"+27 to Evasion Rating",
"+61 to maximum Life",
"+28 to Strength",
"+79 to maximum Life",
"+29% to Lightning Resistance",
"+50 to Accuracy Rating",
"+50 to Armour",
"6% increased Armour and Evasion",
"+51 to maximum Life",
"+25% to Lightning Resistance",
"+78 to maximum Life",
"+20% to Fire Resistance",
"+12% to Cold Resistance",
"+57 to Evasion Rating",
"+54 to maximum Life",
"+23% to Fire Resistance",
"+19% to Cold Resistance",
"46% increased Armour and Energy Shield",
"+23% to Fire Resistance",
"+18% to Chaos Resistance",
"+165 to Armour",
"+77 to maximum Life",
"+15% to Cold Resistance",
"18% reduced Attribute Requirements",
"+67 to maximum Life",
"+34% to Cold Resistance",
"+14% to Lightning Resistance",
"18% reduced Attribute Requirements",
"+285 to Armour",
"+45 to maximum Life",
"+32% to Fire Resistance",
"+14% to Cold Resistance",
"+61 to maximum Life",
"+34% to Fire Resistance",
"+13% to Cold Resistance",
"+34% to Fire Resistance",
"+23% to Cold Resistance",
"+16 to Strength",
"+74 to maximum Life",
"+37% to Fire Resistance",
"+21% to Lightning Resistance",
"+19% to Global Critical Strike Multiplier",
"+65 to maximum Life",
"+6% to Cold Resistance",
"+18% to Lightning Resistance",
"+56 to maximum Life",
"+36 to maximum Mana",
"+41% to Cold Resistance",
"+7% to Lightning Resistance",
"+50 to Evasion Rating",
"+42 to maximum Life",
"+18% to Fire Resistance",
"+6% to Chaos Resistance",
"+23% to Global Critical Strike Multiplier",
"+25 to Accuracy Rating",
"+20 to Intelligence",
"+67 to maximum Life",
"+3 Mana gained on Kill",
"+15 to maximum Mana",
"+2 Life gained for each Enemy hit by Attacks",
"+169 to Armour",
"+70 to maximum Life",
"+19% to Fire Resistance",
"+28% to Lightning Resistance",
"+26% to Fire Resistance",
"+32 to Accuracy Rating",
"58% increased Armour and Evasion",
"+12% to all Elemental Resistances",
"+39% to Cold Resistance",
"+41% to Lightning Resistance",
"+21 to maximum Mana",
"+17% to Cold Resistance",
"18% reduced Attribute Requirements",
"+24 to maximum Energy Shield",
"49% increased Energy Shield",
"+84 to maximum Life",
"+39% to Lightning Resistance",
"+13% to Chaos Resistance",
"+30 to maximum Energy Shield",
"+95 to maximum Life",
"+22% to Lightning Resistance",
"18% reduced Attribute Requirements",
"+85 to maximum Energy Shield",
"+56 to maximum Life",
"+39% to Cold Resistance",
"+23% to Lightning Resistance",
"+74 to maximum Life",
"+23% to Cold Resistance",
"+41% to Lightning Resistance",
"+2 to Level of Socketed Lightning Gems",
"+10 to Dexterity",
"+20 to maximum Mana",
"+32% to Fire Resistance",
"+86 to maximum Life",
"+12% to Fire Resistance",
"+29% to Lightning Resistance",
"+94 to maximum Life",
"+29% to Fire Resistance",
"+37% to Lightning Resistance",
"+41% to Fire Resistance",
"+35% to Cold Resistance",
"+26% to Lightning Resistance",
"+16% to Global Critical Strike Multiplier",
"+141 to Accuracy Rating",
"+6% to Cold Resistance",
"+15 to Accuracy Rating",
"+2 to Level of Socketed Fire Gems",
"+35% to Lightning Resistance",
"+34 to Intelligence",
"120% increased Evasion and Energy Shield",
"+17 to Intelligence",
"+42 to maximum Mana",
"+26% to Fire Resistance",
"+21% to Cold Resistance",
"Knocks Enemies Back on Hit",
"Deals 195% of Base Damage",
"18% increased Stun Duration on enemies",
"+2 to Melee Strike Range",
"+17 to Strength",
"+60 to maximum Life",
"+20% to Cold Resistance",
"+11% to Lightning Resistance",
"+9 to Strength",
"+78 to maximum Life",
"+28% to Fire Resistance",
"+24% to Cold Resistance",
"+16% to Lightning Resistance",
"Base duration is 3.00 seconds",
"25% increased Arrow Speed",
"Minions deal 75% more Damage",
"+11% to all Elemental Resistances",
"+8% to Fire Resistance",
"+25% to Cold Resistance",
"70% increased Energy Shield",
"+37% to Fire Resistance",
"+23% to Cold Resistance",
"+35% to Lightning Resistance",
"10% reduced Cast Speed",
"+15 to Evasion Rating",
"+11 to maximum Energy Shield",
"+6 to maximum Life",
"+6 to maximum Mana",
"+5% to Fire Resistance",
"+7% to Cold Resistance",
"+5% to Lightning Resistance",
"+25% to Cold Resistance",
"+152 to Evasion Rating",
"+34% to Cold Resistance",
"Cannot be Frozen",
"+19 to maximum Life",
"-2 Physical Damage taken from Attack Hits",
"Cannot be Frozen",
"+10 to Strength",
"+95 to Intelligence",
"+1 to Level of all Lightning Spell Skill Gems",
"+9 to Strength",
"+7 to maximum Life",
"+29 to all Attributes",
"+20% to Fire Resistance",
"-2 Physical Damage taken from Attack Hits",
"+18 to maximum Energy Shield",
"+8 to Strength",
"+6 to Dexterity",
"+6 to Intelligence",
"+10 to maximum Energy Shield",
"+102 to Intelligence",
"+1 to Level of all Lightning Spell Skill Gems",
"+16 to Armour",
"10% reduced maximum Mana",
"+29 to maximum Mana",
"+29% to Lightning Resistance",
"Cannot be Shocked",
"+411 to Armour",
"+29 to maximum Mana",
"+105 to Intelligence",
"+1 to Level of all Lightning Spell Skill Gems",
"60% increased Armour and Energy Shield",
"50% reduced maximum Mana",
"+115 to Intelligence",
"+1 to Level of all Lightning Spell Skill Gems",
"+5% to maximum Lightning Resistance",
"+101 to maximum Life",
"+37% to Fire Resistance",
"+44% to Lightning Resistance",
"+37 to Dexterity",
"+31 to maximum Mana",
"+23% to Lightning Resistance",
"104% increased Armour and Evasion",
"+60 to maximum Life",
"+21% to Cold Resistance",
"+173 to Accuracy Rating",
"26% increased Energy Shield",
"+33% to Fire Resistance",
"+10 to maximum Mana",
"+21% to Lightning Resistance",
"+12% to Chaos Resistance",
"+163 to Accuracy Rating",
"+2 to Level of Socketed Cold Gems",
"+62 to maximum Mana",
"+4 Life gained for each Enemy hit by Attacks",
"+39% to Fire Resistance",
"+28% to Chaos Resistance",
"+1 to Level of Socketed Lightning Gems",
"+23 to Intelligence",
"84% increased Armour and Energy Shield",
"+77 to maximum Life",
"+13% to all Elemental Resistances",
"+34% to Lightning Resistance",
"32% reduced Attribute Requirements",
"31% increased Energy Shield",
"+83 to maximum Life",
"+40 to maximum Mana",
"+39% to Lightning Resistance",
"+33 to Evasion Rating",
"+56 to maximum Life",
"+41% to Lightning Resistance",
"32% reduced Attribute Requirements",
"+63 to Evasion Rating",
"+60 to maximum Life",
"+30% to Fire Resistance",
"+33% to Cold Resistance",
"+80 to maximum Life",
"+17% to Fire Resistance",
"+22% to Cold Resistance",
"+31% to Lightning Resistance",
"106% increased Energy Shield",
"+18% to Lightning Resistance",
"+82 to maximum Life",
"+8% to all Elemental Resistances",
"+32% to Cold Resistance",
"+42 to Strength",
"+80 to maximum Life",
"+19% to Lightning Resistance",
"+1 to Level of Socketed Gems",
"+15 to maximum Mana",
"+8 to Intelligence",
"+37% to Cold Resistance",
"+37% to Fire Resistance",
"+54 to Accuracy Rating",
"+19% to Global Critical Strike Multiplier",
"+15% to Lightning Resistance",
"+3 to Accuracy Rating",
"+66 to maximum Life",
"+27% to Cold Resistance",
"+21% to Chaos Resistance",
"+13 to maximum Energy Shield",
"+83 to maximum Life",
"+17% to Fire Resistance",
"+38% to Cold Resistance",
"+2 to Level of Socketed Lightning Gems",
"+64 to maximum Mana",
"+35% to Lightning Resistance",
"+12 Life gained on Kill",
"69% increased Evasion and Energy Shield",
"+40% to Fire Resistance",
"+16% to Lightning Resistance",
"+22% to Fire Resistance",
"+2 Life gained for each Enemy hit by Attacks",
"+29 to Accuracy Rating",
"+75 to maximum Life",
"+21% to Fire Resistance",
"+26% to Lightning Resistance",
"+134 to maximum Energy Shield",
"+26% to Fire Resistance",
"+35% to Cold Resistance",
"+28% to Chaos Resistance",
"+52 to maximum Mana",
"+5 Life gained on Kill",
"+27% to Fire Resistance",
"+21% to Lightning Resistance",
"+10 to Armour",
"23% increased Armour and Evasion",
"+7% to Cold Resistance",
"+32 to Intelligence",
"72% increased Energy Shield",
"+94 to maximum Life",
"+30% to Fire Resistance",
"+25% to Chaos Resistance",
"+10 to Strength and Intelligence",
"+11% to Critical Strike Multiplier while Dual Wielding",
"+268 to Accuracy Rating",
"+70 to maximum Life",
"+36% to Cold Resistance",
"+29% to Lightning Resistance",
"+28 to maximum Energy Shield",
"+33% to Fire Resistance",
"+34% to Cold Resistance",
"+2 Life gained for each Enemy hit by your Attacks",
"+17 to Dexterity",
"+172 to Accuracy Rating",
"+16 to maximum Energy Shield",
"+46 to maximum Mana",
"+1 to Level of Socketed Fire Gems",
"192% increased Energy Shield",
"+45% to Cold Resistance",
"+45 to Dexterity",
"50% reduced Damage when on Low Life",
"+82 to maximum Life",
"+40 to maximum Life",
"30% increased Movement Speed for 9 seconds on Throwing a Trap",
"+24 to Intelligence",
"108% increased Energy Shield",
"+32 to maximum Mana",
"+35% to Fire Resistance",
"+37% to Lightning Resistance",
"+25 to Dexterity",
"+200 to Accuracy Rating",
"+6% to Global Critical Strike Multiplier",
"+35 to Dexterity",
"+1 Mana gained on Kill",
"+93 to Accuracy Rating",
"168% increased Armour and Evasion",
"+51 to maximum Life",
"+66 to maximum Life",
"+44% to Cold Resistance",
"+23% to Lightning Resistance",
"+383 to Accuracy Rating",
"+62 to maximum Life",
"+14% to Fire Resistance",
"+24% to Chaos Resistance",
"+9 to Dexterity",
"+83 to maximum Life",
"+32% to Fire Resistance",
"+18% to Global Critical Strike Multiplier",
"+37 to maximum Mana",
"+23% to Fire Resistance",
"+23% to Lightning Resistance",
"+150 to Evasion Rating",
"+72 to maximum Life",
"+7% to all Elemental Resistances",
"+19% to Lightning Resistance",
"+15 to maximum Energy Shield",
"+60 to maximum Life",
"+37 to maximum Mana",
"+16% to all Elemental Resistances",
"+24% to Fire Resistance",
"+13% to Cold Resistance",
"+9 to maximum Energy Shield",
"+43% to Fire Resistance",
"+43% to Cold Resistance",
"+27 to Dexterity",
"+16 to maximum Life",
"+27% to Fire Resistance",
"+39 to maximum Energy Shield",
"+76 to maximum Life",
"+25% to Fire Resistance",
"+39% to Lightning Resistance",
"+21 to Intelligence",
"+53 to Evasion Rating",
"+34 to maximum Energy Shield",
"+12% to all Elemental Resistances",
"+44% to Cold Resistance",
"Totems gain +8% to all Elemental Resistances",
"+16 to Strength",
"+60 to Evasion Rating",
"+65 to maximum Life",
"+38% to Fire Resistance",
"+32% to Lightning Resistance",
"+29 to maximum Energy Shield",
"+27 to maximum Life",
"+33% to Fire Resistance",
"+38% to Cold Resistance",
"+34% to Lightning Resistance",
"+96 to maximum Energy Shield",
"+37 to maximum Mana",
"+40% to Fire Resistance",
"+34% to Cold Resistance",
"+21% to Lightning Resistance",
"+3 Energy Shield gained for each Enemy hit by your Attacks",
"+35% to Global Critical Strike Multiplier",
"+7 Life gained on Kill",
"+2 to Level of Socketed Cold Gems",
"+52 to maximum Mana",
"+135 to Accuracy Rating",
"+10% to Fire and Lightning Resistances",
"+15% to Cold Resistance",
"+11% to Cold Resistance",
"+71 to maximum Life",
"+44 to maximum Mana",
"+27 to Strength",
"+2 Life gained for each Enemy hit by your Attacks",
"18% reduced Attribute Requirements",
"+69 to maximum Life",
"+21% to Cold Resistance",
"+21% to Lightning Resistance",
"+2 to Level of Socketed Cold Gems",
"+34% to Cold Resistance",
"+48 to Armour",
"63% increased Armour and Evasion",
"+96 to maximum Life",
"+37% to Fire Resistance",
"+19 to Dexterity",
"+246 to Accuracy Rating",
"+96 to maximum Life",
"+22% to Lightning Resistance",
"+24 to Strength",
"+106 to maximum Life",
"+36% to Lightning Resistance",
"+85 to maximum Life",
"+28% to Cold Resistance",
"+27% to Lightning Resistance",
"+13 to maximum Energy Shield",
"+93 to maximum Life",
"+21% to Fire Resistance",
"+32% to Lightning Resistance",
"+75 to maximum Life",
"+43% to Lightning Resistance",
"+44 to Strength",
"+86 to maximum Life",
"+10% to Fire Resistance",
"+25 to Strength",
"+263 to Armour",
"+73 to maximum Life",
"+2 to Level of Socketed Fire Gems",
"+23% to Fire Resistance",
"+66 to maximum Life",
"+27% to Fire Resistance",
"+34% to Lightning Resistance",
"+19 to Dexterity",
"+50 to Evasion Rating",
"+93 to maximum Life",
"+31% to Cold Resistance",
"+30 to Strength",
"+89 to maximum Life",
"+19% to Cold Resistance",
"+30 to Dexterity",
"+379 to Evasion Rating",
"+62 to maximum Life",
"+23% to Lightning Resistance",
"+96 to maximum Life",
"+11% to Cold Resistance",
"+21 to Strength",
"+83 to maximum Life",
"+43% to Fire Resistance",
"+36 to Strength",
"+86 to maximum Life",
"+49 to maximum Mana",
"+29% to Fire Resistance",
"+32% to Lightning Resistance",
"+15 to Dexterity",
"+41 to maximum Mana",
"+32% to Fire Resistance",
"+33% to Cold Resistance",
"+196 to Accuracy Rating",
"+22 to Intelligence",
"+18% to Fire Resistance",
"+20% to Cold Resistance",
"+21% to Chaos Resistance",
"+17 to maximum Mana",
"+13% to Cold Resistance",
"+19 to Strength",
"+8% to Fire Resistance",
"+86 to maximum Life",
"+28% to Lightning Resistance",
"+29 to Dexterity",
"+60 to maximum Life",
"+4 Life gained on Kill",
"+59 to maximum Life",
"+2 to maximum Energy Shield",
"+9% to Lightning Resistance",
"+13% to all Elemental Resistances",
"+2 Mana gained on Kill",
"+7% to Fire Resistance",
"+17% to Fire Resistance",
"+30 to Dexterity",
"+5 Life gained on Kill",
"+28 to Intelligence",
"+25 to all Attributes",
"+2 to Level of Socketed Gems",
"+16 to all Attributes",
"+14 to Intelligence",
"+12 to maximum Energy Shield",
"+28 to Intelligence",
"+30% to Global Critical Strike Multiplier",
"+29 to maximum Mana",
"+40% to Fire Resistance",
"+3 Mana gained on Kill",
"+18 to Strength",
"+7% to Fire Resistance",
"+8 to Dexterity",
"+3 to maximum Energy Shield",
"+30 to Strength",
"+16 to maximum Energy Shield",
"+16 to maximum Life",
"+20 to maximum Energy Shield",
"+35 to Strength",
"+13 to Accuracy Rating",
"+24 to maximum Energy Shield",
"+7 Life gained on Kill",
"+4 Life gained for each Enemy hit by your Attacks",
"+14 to maximum Life",
"+2 Life gained for each Enemy hit by your Attacks",
"+26 to maximum Mana",
"+41 to Intelligence",
"+16 to maximum Mana",
"+21% to Cold Resistance",
"+29% to Global Critical Strike Multiplier",
"+5 to all Attributes",
"+10 to Intelligence",
"+130 to Accuracy Rating",
"+25 to all Attributes",
"+14 to all Attributes",
"+3 Life gained for each Enemy hit by your Attacks",
"+44% to Fire Resistance",
"+18% to Cold Resistance",
"+12 to Strength",
"+19 to maximum Mana",
"+19 to maximum Mana",
"+2 Mana gained on Kill",
"+14 Life gained on Kill",
"+39 to Dexterity",
"+78 to maximum Life",
"+9 to maximum Life",
"+20% to Fire Resistance",
"+5 Mana gained on Kill",
"+85 to maximum Life",
"+11 Life gained on Kill",
"+26 to Dexterity",
"+17 to maximum Mana",
"+21 to Intelligence",
"+21% to Global Critical Strike Multiplier",
"+26 to maximum Life",
"+40% to Fire Resistance",
"+26 to Strength",
"+26 to maximum Mana",
"+105 to Accuracy Rating",
"+18 to Intelligence",
"+3 to maximum Energy Shield",
"+21% to Global Critical Strike Multiplier",
"+19 to Intelligence",
"+34% to Global Critical Strike Multiplier",
"+154 to Accuracy Rating",
"+30 to Strength",
"+30 to maximum Mana",
"+2 to Weapon Range",
"+12 to Dexterity",
"+36 to Intelligence",
"+79 to maximum Life",
"+37% to Cold Resistance",
"+16 to Dexterity",
"+12% to Lightning Resistance",
"+51 to Accuracy Rating",
"+37 to maximum Energy Shield",
"+22 to Strength",
"+61 to maximum Life",
"+14% to Lightning Resistance",
"+31 to Intelligence",
"+20% to Cold Resistance",
"+8% Chance to Block Attack Damage while Dual Wielding",
"+31% to Global Critical Strike Multiplier",
"+64 to maximum Life",
"+6% to Cold Resistance",
"+6% to Lightning Resistance",
"+4 Life gained on Kill",
"+13 to Dexterity",
"+1 to Level of Socketed Fire Gems",
"+127 to maximum Energy Shield",
"20% increased Energy Shield",
"+9% to all Elemental Resistances",
"+12% to Lightning Resistance",
"+87 to maximum Life",
"+1 Mana gained on Kill",
"+19% to Global Critical Strike Multiplier",
"+46 to Accuracy Rating",
"+24% to Global Critical Strike Multiplier",
"+38% to Fire Resistance",
"+31 to Intelligence",
"+15 to maximum Energy Shield",
"112% increased Energy Shield",
"+12% to Lightning Resistance",
"+14 to Intelligence",
"64% increased Energy Shield",
"+92 to maximum Life",
"18% reduced Attribute Requirements",
"+3 to maximum Energy Shield",
"11% increased Energy Shield",
"+42% to Fire Resistance",
"+26% to Lightning Resistance",
"+23 to Intelligence",
"+81 to maximum Energy Shield",
"112% increased Energy Shield",
"+52 to maximum Mana",
"+71 to maximum Life",
"+40% to Cold Resistance",
"+35% to Lightning Resistance",
"+10 to Strength",
"+21 to maximum Mana",
"+15 to Dexterity",
"+15 to Intelligence",
"+51 to Armour",
"+42% to Fire Resistance",
"+28% to Cold Resistance",
"+29% to Lightning Resistance",
"Supported Skills have 100% reduced Critical Strike Chance",
"Supported Skills deal 25% more Spell Damage",
"Supported Skills deal 5% increased Spell Damage",
"Base Off Hand Critical Strike Chance is 5%",
"+0.2% to Critical Strike Chance per 10 Maximum Energy Shield on Shield",
"16 to 24 Base Off Hand Physical Damage",
"3 to 4 Added Physical Damage per 15 Armour or Evasion Rating on Shield",
"Base Off Hand Attack time is 0.53 seconds",
"75% increased Stun Threshold reduction on enemies at Maximum charge distance",
"100% more Damage with Hits at Maximum Charge Distance",
"Supported Skills have 11 to 216 added Lightning Damage",
"Deals 251 to 376 Cold Damage",
"Mine lasts 5 seconds",
"Base Mine Detonation Time is 0.30 seconds",
"Fires 4 additional Projectiles",
"Fires Projectiles in a circle",
"Fires an additional Projectile for every 2 prior Mines in Detonation Sequence",
"Each Mine applies 10% increased Critical Strike Chance to Hits against Enemies near it, up to a maximum of 500%",
"Supported Attack Skills cannot be used with Melee Weapons",
"Trap lasts 4 seconds",
"Supported Skills have 2% increased Trap Throwing Speed",
"Deals 21 to 32 Physical Damage",
"Knocks Enemies Back on Hit",
"Cannot Knockback Unique Enemies more than once per second Final Burst Deals 200% more Damage Final Burst has 100% more Area of Effect Final Burst cannot Knockback",
"Causes 4 Bursts",
"Supported Skills deal 4% increased Damage",
"Supported Skills have 10% reduced Mine Throwing Speed",
"Supported Skills deal 30% more Trap and Mine Damage",
"Supported Skills have 10% reduced Trap Throwing Speed",
"Deals 15 to 691 Lightning Damage",
"Base duration is 6.00 seconds",
"Storm Hits an Enemy every 0.25 Seconds",
"Creates a storm when you Kill a Shocked Enemy",
"Buff grants 14 to 57 Added Attack Lightning Damage",
"Buff grants 14 to 57 Added Spell Lightning Damage",
"Deals 35.8 Base Fire Damage per second",
"Deals 20% of your Maximum Life as Base Fire Damage per second",
"Deals 20% of your Maximum Energy Shield as Base Fire Damage per second",
"You Burn for 90% of your Maximum Life per second as Fire Damage",
"You Burn for 70% of your Maximum Energy Shield per second as Fire Damage",
"Grants 20% more Spell Damage",
"Supported Skills have 7% increased Chill Duration on Enemies",
"Supported Skills have 20% increased Effect of Chill on Enemies",
"Supported Skills have +10% chance to Freeze Enemies which are Chilled",
"Supported Skills deal 20% more Cold Damage Over Time",
"Supported Skills deal 20% more Damage with Hits and Ailments against Chilled Enemies",
"Deals 91.3% of Base Damage",
"25% chance to cause Bleeding",
"Minions have +30% to all Elemental Resistances",
"Maximum 1 Raised Spectre",
"5% increased Minion Movement Speed",
"55% more Minion Movement Speed",
"Minion Movement Speed is Capped",
"Raised Spectres are Level 28",
"Minions have 105 additional Accuracy Rating",
"Supported Skills have +983 to Accuracy Rating",
"Supported Skills have +79% to Critical Strike Multiplier",
"Supported Skills deal 2% increased Damage while Leeching Life",
"Supported Skills have 2% of Damage Leeched as Life",
"Deals 1 to 20 Lightning Damage",
"Base duration is 2.00 seconds",
"Fires 4 additional Projectiles",
"Knocks Enemies Back on Hit",
"Deals 195% of Base Damage",
"7% increased Stun Duration on enemies",
"+2 to Melee Strike Range",
"Base duration is 6.00 seconds",
"Cursed enemies have a 100% chance to grant a Power Charge when slain",
"Hits against Cursed Enemies have +1.5% to Critical Strike Chance",
"Hits against Cursed Enemies have +30% to Critical Strike Multiplier",
"Cursed enemies grant 65 Life when Killed",
"Cursed enemies grant 25 Mana when Killed",
"Cursed Enemies have a 1% chance to grant a Power Charge when Hit",
"Beams Hit Enemies every 0.40 seconds",
"Deals 110% of Base Damage",
"Base duration is 3.00 seconds",
"Chains +1 Times",
"Beams deal 40% less Damage",
"4 maximum Beam Targets",
"Can use Items requiring up to Level 33",
"Minions' Attacks deal 22 to 34 additional Physical Damage",
"Deals 134 to 200 Cold Damage",
"Damage cannot be Reflected",
"Supported Skills deal 52% more Melee Physical Damage against Bleeding enemies",
"Supported Attacks cannot cause Bleeding",
"Deals 387 to 719 Lightning Damage",
"Base duration is 1.50 seconds",
"+5 to radius",
"Base duration is 5.00 seconds",
"Additional 1.00 seconds Base Duration per extra corpse Consumed",
"Grants Minions 28% increased Movement Speed",
"Grants Minions 29% increased Cast Speed",
"Grants Minions 29% increased Attack Speed",
"Base duration is 6.00 seconds",
"Cursed enemies take 17% increased Damage from Projectile Hits",
"You gain a Life Flask Charge when you Hit Cursed Enemy, no more than once every 0.5 seconds",
"You gain a Mana Flask Charge when you Hit Cursed Enemy, no more than once every 0.5 seconds",
"Projectiles which Hit Cursed Enemies Split towards 3 additional targets",
"Deals 115% of Base Damage",
"2 to 3 Added Attack Physical Damage",
"Trigger this Skill when you Block",
"You cannot use this Attack directly",
"Supported Skills deal 3% increased Cold Damage",
"Supported Skills have 18 to 27 added Cold Damage",
"Deals 15 to 22 Fire Damage",
"Explosion deals base Fire Damage equal to 6% of the corpse's Maximum Life",
"Deals 32 to 47 Cold Damage",
"Deals 26.3 Base Cold Damage per second",
"Base duration is 5.00 seconds",
"Modifiers to Spell Damage apply to this Skill's Damage Over Time effect",
"25% chance to gain a Frenzy Charge when an Enemy Dies while in this Skill's Area",
"Deals 150% of Base Damage",
"50% more Area of Effect for each stage",
"Base duration is 3.00 seconds",
"This Skill's Cooldown does not recover during its effect",
"75% of Damage from Hits is taken from the Buff before your Life or Energy Shield Buff can take Damage equal to 20% of your Armour, up to a maximum of 10000",
"Reflects 1080% of Damage taken from Buff as Fire Damage when Buff expires or is depleted",
"Buff grants +328 to Armour",
"Supported Skills have 15% increased Area of Effect while Dead",
"You cannot Cast Supported Triggerable Spells directly",
"100% chance to Trigger Supported Non-Minion Spells on Death",
"2 to 3 Added Cold Damage",
"Fires 4 additional Projectiles",
"+18 to Melee Strike Range",
"Supported Skills have 50% increased Critical Strike Chance",
"Supported Skills have +1% to Critical Strike Chance",
"Deals 1 to 19 Lightning Damage",
"Can queue up to 50 uses",
"30% reduced Duration ",
"Supported Skills have 17 to 26 added Chaos Damage",
"Supported Skills throw up to 2 additional Traps",
"Supported Skills deal 50% less Damage",
"Supported Skills can have up to 3 additional Traps placed at a time",
"Supported Skills have 10% increased Trap Trigger Area of Effect",
"Base duration is 20.00 seconds",
"Maximum 5 Summoned Skeletons",
"Summons 2 Skeleton Warriors",
"Minions gain 50% more Added Damage",
"Base duration is 9.40 seconds",
"1.2% of Attack Physical Damage Leeched as Life",
"You take 4% of your Maximum Life per second as Physical Damage",
"You take 4% of your Maximum Energy Shield per second as Physical Damage",
"Mine lasts 8 seconds",
"Base duration is 4.00 seconds",
"Base secondary duration is 4.00 seconds",
"Increases and Reductions to Mine Duration also apply to this Skill's Buff Duration",
"Only one Mine of this type can Detonate in each Detonation Sequence",
"Mines cannot be Re-armed",
"Mine Detonation is Instant",
"Buff grants 10% increased Movement Speed",
"Supported Skills have 64% increased Skill Effect Duration",
"Deals 16 to 24 Cold Damage",
"Mine lasts 5 seconds",
"Base Mine Detonation Time is 0.30 seconds",
"Fires 4 additional Projectiles",
"Fires Projectiles in a circle",
"Fires an additional Projectile for every 2 prior Mines in Detonation Sequence",
"Each Mine applies 10% increased Critical Strike Chance to Hits against Enemies near it, up to a maximum of 500%",
"Supported Skills have +74 to Accuracy Rating",
"Supported Skills have 6% increased Accuracy Rating",
"Totem lasts 8 seconds",
"Totems Summoned by this Skill cannot Evade",
"34% increased totem life",
"Deals 9 to 14 Fire Damage",
"20% chance to Ignite enemies",
"50% more Damage with Ignite",
"Can use Items requiring up to Level 33",
"Minions' Attacks deal 22 to 34 additional Physical Damage",
"This Gem can only Support Skill Gems requiring Level 38 or lower",
"Supported Skills deal 70% less Damage",
"You cannot Cast Supported Triggerable Spells directly",
"Trigger Supported Spells when you take a total of 528 Damage",
"Deals 230% of Base Damage",
"Second Stage deals 15% less Damage",
"Third Stage deals 30% less Damage",
"Supported Skills deal 48% more Burning Damage",
"Deals 140% of Base Damage",
"Creates 4 explosions",
"35% less Area Damage",
"Supported Skills Penetrate 30% Cold Resistance",
"Deals 34 to 640 Lightning Damage",
"+4 to radius",
"Can queue up to 50 uses",
"48% reduced Duration ",
"Deals 1 to 20 Lightning Damage",
"Base duration is 2.00 seconds",
"Fires 4 additional Projectiles",
"Deals 115% of Base Damage",
"10% increased Stun Duration on enemies",
"Deals up to 40% more Damage to closer targets",
"Deals 83.2% of Base Damage",
"This Gem can only Support Skill Gems requiring Level 38 or lower",
"Supported Skills deal 70% less Damage",
"You cannot Cast Supported Triggerable Spells directly",
"Trigger Supported Spells when you take a total of 528 Damage",
"Supported Skills deal 5% increased Damage",
"Supported Skills have 32% increased Minion Attack Speed",
"Supported Skills have 32% increased Minion Cast Speed",
"Supported Skills have 40% increased Minion Movement Speed",
"Deals 18 to 54 Lightning Damage",
"Trap lasts 4 seconds",
"Fires 8 additional Projectiles",
"Fires Projectiles in a circle",
"20% chance to Shock enemies",
"Deals 140% of Base Damage",
"Fires 4 additional Projectiles",
"20% chance to gain a Power Charge when Projectile Hits a Rare or Unique Enemy",
"20% increased Critical Strike Chance per Power Charge",
"+10% to Critical Strike Multiplier per Power Charge",
"Deals 37 to 56 Fire Damage",
"Base duration is 1.40 seconds",
"One impact every 0.20 seconds",
"First Impact has 100% more Area of Effect",
"First Impact deals 250% more Damage with Hits and Ailments",
"Maximum 3 Firestorms at a time",
"Supported Skills have 37% increased Cast Speed",
"Base duration is 6.00 seconds",
"Cursed enemies take 18% increased Damage from Projectile Hits");
}
| [
"christofferarntzen@outlook.com"
] | christofferarntzen@outlook.com |
ec0b40e7cafbe9c2be8eb6f62209fac424afe875 | 6ba823e000634eb32e296a6f684d1e274871b4fa | /src/main/java/me/wietlol/test/awslambdatests/handlers/LambdaInvokeTestHandler.java | 211ace31c2e09c73e179d1626ca715d284ad94da | [] | no_license | wietlol/AwsLambdaPerformanceTests | 960eed9733d1bb807ee00fb4d546c6727a26d080 | fa3e73a10ec57b5b87399e1144a7a476be1891ed | refs/heads/master | 2023-01-22T19:45:47.483210 | 2020-12-05T11:13:53 | 2020-12-05T11:13:53 | 318,633,460 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 898 | java | package me.wietlol.test.awslambdatests.handlers;
import com.amazonaws.services.lambda.AWSLambda;
import com.amazonaws.services.lambda.AWSLambdaClientBuilder;
import com.amazonaws.services.lambda.model.InvokeRequest;
import java.time.Instant;
public class LambdaInvokeTestHandler
{
public String source()
{
log("started");
String function = System.getenv("functionArn");
String payload = "{}";
log("getting client...");
AWSLambda client = createClient();
log("invoking function");
client.invoke(new InvokeRequest()
.withFunctionName(function)
.withPayload(payload)
);
log("finished");
return "{}";
}
public String target()
{
log("invoked");
return "{}";
}
private AWSLambda createClient()
{
return AWSLambdaClientBuilder.defaultClient();
}
private void log(String text)
{
System.out.println(Instant.now() + " " + text);
}
}
| [
"harry@aaictconsultancy.nl"
] | harry@aaictconsultancy.nl |
772c5f5f1b61c52f8f94f2c0d3a397eaf8dfc901 | 3b0be22782ad1081201d3bfeada17fc41b47db1d | /main/java/driver/Strength.java | a3b987988508ea0b4cf6d481d1d69e8573f88edd | [] | no_license | CS3398-Bandi-Bandits/CS3398--Bandi--F2019 | de41c7192fb02ce47b2974c2d941442031a769f1 | bfa54e799fa75d9ec48dcd3dfee3674ecf7eab7f | refs/heads/master | 2020-07-18T05:41:21.070296 | 2020-07-13T20:19:01 | 2020-07-13T20:19:01 | 206,188,086 | 1 | 2 | null | 2019-12-03T23:56:52 | 2019-09-03T23:16:12 | Java | UTF-8 | Java | false | false | 385 | java | package driver;
/**
* @author Devon Tyson
*/
public class Strength extends Skill {
int level, xp, goalXp;
public Strength() {
this.level = super.level;
this.xp = super.xp;
this.goalXp = super.goalXp;
}
@Override
public void train(int addedXp) {
super.train(addedXp);
}
@Override
public String toString() {
return "Strength";
}
}
| [
"noreply@github.com"
] | CS3398-Bandi-Bandits.noreply@github.com |
4c7f79eec25c172e058b6f1bbd5584e4994202d7 | 288d28bd7953b8239cb57f1bf2514ff220e41e1a | /src/main/java/com/mingle/cache/Account.java | 0195fb9a9f62d7bcf5f97a8404d1c07ab2967003 | [] | no_license | mingletxt/mingle-idea | ab9e5062dabc6b4943cc61d2d4bed80a4a2b3ca7 | bf9176952936b03f18a802fbd7e277a1f37baccb | refs/heads/master | 2022-12-21T20:44:04.515392 | 2019-10-24T18:17:18 | 2019-10-24T18:17:18 | 8,268,792 | 0 | 1 | null | 2022-12-16T03:13:12 | 2013-02-18T13:24:52 | HTML | UTF-8 | Java | false | false | 892 | java | package com.mingle.cache;
import java.io.Serializable;
/**
* Created by mingle.
* Time 05/03/2017 5:43 PM
* Desc 文件描述
*/
public class Account implements Serializable{
private static final long serialVersionUID = -118280679985052795L;
private Integer id;
private String name;
public Account(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "Account{" + "id=" + id + ", name='" + name + '\'' + '}';
}
public static void main(String[] args) {
Account a = new Account("mingle");
System.out.println(a);
}
}
| [
"mingle.pan@gmail.com"
] | mingle.pan@gmail.com |
5a48867cb7189b2cb35903153b5b403d8092b993 | 3e0304de1a5cc834eb165cf7d07032342779e358 | /app/src/test/java/com/eleo95/customadapter/ExampleUnitTest.java | 004220ef0a7e3718baa7e0655e145ba74d8c9ef3 | [] | no_license | eleo95/CustomAdapter | 3009f5010c4fd9952e87857bedda86218e07c52e | 5e4ceda9d7d9402433c71ca5eefd07703cc2634e | refs/heads/master | 2020-03-23T16:42:19.614968 | 2018-07-21T15:18:58 | 2018-07-21T15:18:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 385 | java | package com.eleo95.customadapter;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"e.leonardo7474@gmail.com"
] | e.leonardo7474@gmail.com |
760636c807d233e3ddf5880fadc7aeb5b40a1187 | 152754c2981cbcfdb1fcce6068efdd937c2922aa | /06.master/04.custom-business-exception/src/StudentRegistration.java | 2ca9ef555d93e518969f17907892a99e258b373b | [] | no_license | fs5013-furi-sutao/java-bootcamp-answers | 3c77abba19879b854b39b2fbdba8ce79c8ff90bf | 4c0034374a3119397f8a5d82c28d00b47d8fd7fa | refs/heads/main | 2023-08-07T03:00:14.307895 | 2021-10-04T13:31:43 | 2021-10-04T13:31:43 | 320,149,273 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,445 | java | import java.util.ArrayList;
import java.util.List;
public class StudentRegistration {
public static void main(String[] args) {
StudentList studentList = new StudentList();
Student yamamoto = new Student("山本", "一郎");
Student jiro = new Student("", "次郎");
Student tamada = new Student("山田", "太郎");
Student yamashita = new Student("山下");
List<Student> students = new ArrayList<>();
students.add(yamamoto);
students.add(jiro);
students.add(tamada);
students.add(yamashita);
for (Student student : students) {
try {
studentList.addStudent(student);
} catch (AppException e) {
String message = e.getMessage();
System.out.println(message);
}
}
studentList.showAllStudents();
}
}
class Student {
public static int maxId;
public int id;
public String firstName;
public String lastName;
static {
maxId = 0;
}
public Student(String firstName, String lastName) {
this.id = ++maxId;
this.firstName = firstName;
this.lastName = lastName;
}
public Student(String firstName) {
this.id = ++maxId;
this.firstName = firstName;
this.lastName = null;
}
public boolean isValidFirstName() {
return this.firstName != null
&& !this.firstName.isEmpty();
}
public boolean isValidLastName() {
return this.lastName != null
&& !this.lastName.isEmpty();
}
}
class StudentList {
public List<Student> students;
public StudentList() {
this.students = new ArrayList<>();
}
public void addStudent(Student student) {
if (!student.isValidFirstName()) {
String errorMessage =
String.format(
"ID %d: %s%s は登録できません. %n"
+ " => 姓が空です. %n",
student.id,
student.firstName,
student.lastName);
throw new AppException(errorMessage);
}
if (!student.isValidLastName()) {
String errorMessage =
String.format(
"ID %d: %s%s は登録できません. %n"
+ " => 名が空です. %n",
student.id,
student.firstName,
student.lastName);
throw new AppException(errorMessage);
}
if (student.isValidLastName()) {
System.out.printf(
"ID %d: %s%s を登録しました. %n%n",
student.id,
student.firstName,
student.lastName);
this.students.add(student);
}
}
public void showAllStudents() {
System.out.println("登録者一覧を表示します");
System.out.println("-----");
for (Student student : this.students) {
System.out.printf(
"ID %d: %s%s %n",
student.id,
student.firstName,
student.lastName
);
}
}
}
class AppException extends RuntimeException {
private static final long serialVersionUID = 1L;
public AppException(String errorMessage) {
super(errorMessage);
}
}
| [
"fs5013.furi.sutao@gmail.com"
] | fs5013.furi.sutao@gmail.com |
f751f0e7992617b832acfceb9cb6348d337f34cb | fa4b53927489cc835afb1db1272deb4e53e9b47d | /Board.java | dfac065ed0c22cd6251099f217c9c80c41a2d780 | [] | no_license | The-TJ/Backgammon | 397217a5a36fcf1e41cd9516a838c298cca9c4c5 | ed95bae029a0a45fce771c5f959ce49f793a46df | refs/heads/master | 2020-07-03T04:32:57.541441 | 2019-09-09T12:28:45 | 2019-09-09T12:28:45 | 201,784,337 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,277 | java | public class Board implements BoardAPI {
// Board hold the details for the current board positions, performs moves and returns the list of legal moves
private static final int[] RESET = {0,0,0,0,0,0,5,0,3,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,2,0};
/*private static final int[][] CHEAT = {
{13,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, // Bear in & Bear off test
{13,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
};*/
public static final int BAR = 25; // index of the BAR
public static final int BEAR_OFF = 0; // index of the BEAR OFF
private static final int INNER_END = 6; // index for the end of the inner board
private static final int OUTER_END = 18;
public static final int NUM_PIPS = 24; // excluding BAR and BEAR OFF
public static final int NUM_SLOTS = 26; // including BAR and BEAR OFF
private static final int NUM_CHECKERS = 15;
private int[][] checkers;
private Players players;
// 2D array of checkers
// 1st index: is the player id
// 2nd index is number pip number, 0 to 25
// pip 0 is bear off, pip 25 is the bar, pips 1-24 are on the main board
// the value in checkers is the number of checkers that the player has on the point
Board(Players players) {
this.players = players;
checkers = new int[Backgammon.NUM_PLAYERS][NUM_SLOTS];
for (int player=0; player<Backgammon.NUM_PLAYERS; player++) {
for (int pip=0; pip<NUM_SLOTS; pip++) {
checkers[player][pip] = RESET[pip];
}
}
}
Board(Players players, Board board) {
this.players = players;
this.checkers = new int[Backgammon.NUM_PLAYERS][NUM_SLOTS];
for (int player=0; player<Backgammon.NUM_PLAYERS; player++) {
for (int pip=0; pip<NUM_SLOTS; pip++) {
this.checkers[player][pip] = board.checkers[player][pip];
}
}
}
@Override
public int[][] get() {
// duplicate prevents the Bot moving the checkers
int[][] duplicateCheckers = new int[Backgammon.NUM_PLAYERS][NUM_SLOTS];
for (int i=0; i<checkers.length; i++) {
for (int j=0; j<checkers[i].length; j++) {
duplicateCheckers[i][j] = checkers[i][j];
}
}
return duplicateCheckers;
}
private int calculateOpposingPip(int pip) {
return NUM_PIPS-pip+1;
}
public void move(Player player, Move move) {
checkers[player.getId()][move.getFromPip()]--;
checkers[player.getId()][move.getToPip()]++;
int opposingPlayerId = players.getOpposingPlayer(player).getId();
if (move.getToPip()<BAR && move.getToPip()>BEAR_OFF &&
checkers[opposingPlayerId][calculateOpposingPip(move.getToPip())] == 1) {
checkers[opposingPlayerId][calculateOpposingPip(move.getToPip())]--;
checkers[opposingPlayerId][BAR]++;
}
}
public void move(Player player, Play play) {
for (Move move : play) {
move(player,move);
}
}
@Override
public int getNumCheckers(int player, int pip) {
return checkers[player][pip];
}
private boolean bearOffIsLegal(Player player) {
int numberCheckersInInnerBoard=0;
for (int pip=BEAR_OFF; pip<=INNER_END; pip++) {
numberCheckersInInnerBoard = numberCheckersInInnerBoard + checkers[player.getId()][pip];
}
if (numberCheckersInInnerBoard==NUM_CHECKERS) {
return true;
} else {
return false;
}
}
private int findLastChecker(Player player) {
int pip;
for (pip=BAR; pip>=BEAR_OFF; pip--) {
if (checkers[player.getId()][pip]>0) {
break;
}
}
return pip;
}
private Plays findAllPlays(Board board, Player player, Movements movements) {
// Search recursively for the plays that are possible with a given sequence of movements
Plays plays = new Plays();
int fromPipLimit;
// must take checkers from the bar first
if (board.checkers[player.getId()][BAR] > 0) {
fromPipLimit = BAR-1;
} else {
fromPipLimit = BEAR_OFF-1;
}
// search over the board for valid moves
for (int fromPip=BAR; fromPip>fromPipLimit; fromPip--) {
if (board.checkers[player.getId()][fromPip]>0) {
int toPip = fromPip-movements.getFirst();
Move newMove = new Move();
Boolean isNewMove = false;
if (toPip>BEAR_OFF) {
// check for valid moves with and without a hit
int opposingPlayerId = players.getOpposingPlayer(player).getId();
if (board.checkers[opposingPlayerId][calculateOpposingPip(toPip)]==0) {
newMove = new Move(fromPip,toPip,false);
isNewMove = true;
} else if (board.checkers[opposingPlayerId][calculateOpposingPip(toPip)]==1) {
newMove = new Move(fromPip,toPip,true);
isNewMove = true;
}
} else {
// check for valid bear off
if (board.bearOffIsLegal(player) && (toPip==0 || (toPip<0 && board.findLastChecker(player)==fromPip))) {
newMove = new Move(fromPip,BEAR_OFF, false);
isNewMove = true;
}
}
// apply the move to the board and search for a follow on move
if (isNewMove) {
if (movements.number()>1) {
Board childBoard = new Board(players,board);
childBoard.move(player,newMove);
Movements childMovements = new Movements(movements);
childMovements.removeFirst();
Plays childPlays = findAllPlays(childBoard, player, childMovements);
if (childPlays.number()>0) {
childPlays.prependAll(newMove);
plays.add(childPlays);
} else {
plays.add(new Play(newMove));
}
} else {
plays.add(new Play(newMove));
}
}
}
}
return plays;
}
@Override
public Plays getPossiblePlays(Player player, Dice dice) {
// Search for the plays that are possible with all of the movements that can be made based on the dice
Plays possiblePlays;
Movements movements = new Movements(dice);
if (player.getDice().isDouble()) {
possiblePlays = findAllPlays(this,player,movements);
} else {
possiblePlays = findAllPlays(this,player,movements);
movements.reverse();
possiblePlays.add(findAllPlays(this,player,movements));
}
possiblePlays.removeIncompletePlays();
possiblePlays.removeDuplicatePlays();
return possiblePlays;
}
public void cheat() {
for (int player=0; player<Backgammon.NUM_PLAYERS; player++) {
for (int pip=0; pip<NUM_SLOTS; pip++) {
checkers[player][pip] = CHEAT[player][pip];
}
}
}
public boolean allCheckersOff(Player player) {
return checkers[player.getId()][BEAR_OFF] == NUM_CHECKERS;
}
public boolean hasCheckerOff(Player player) {
return checkers[player.getId()][BEAR_OFF] > 0;
}
public boolean lastCheckerInInnerBoard(Player player) {
return findLastChecker(player)<=INNER_END;
}
public boolean lastCheckerInOpponentsInnerBoard(Player player) {
return findLastChecker(player)>OUTER_END;
}
public void reset() {
for (int player=0; player<Backgammon.NUM_PLAYERS; player++) {
for (int pip=0; pip<NUM_SLOTS; pip++) {
checkers[player][pip] = RESET[pip];
}
}
}
}
| [
"noreply@github.com"
] | The-TJ.noreply@github.com |
334d38b9cc9bfde55c026b98785f102f7c567d28 | d7a7e89516f594beb701487c73a5908b6a93a0e8 | /src/main/java/bei7473p5254d69jcuat/tenyu/release1/global/middle/Middle.java | d932a0e10099a66b1cd505024f0cb8db6f9c7f29 | [] | no_license | piercesword/tenyu | 1aff89e28f7ef406b3d553601c6bebe0c1d2d7f0 | 4cea7d3ff9d255caef2986428cd1a6088bcbb591 | refs/heads/master | 2020-09-15T01:08:42.046573 | 2019-10-11T19:36:08 | 2019-10-11T19:36:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,208 | java | package bei7473p5254d69jcuat.tenyu.release1.global.middle;
import java.security.*;
import java.util.*;
import java.util.concurrent.*;
import bei7473p5254d69jcuat.tenyu.release1.communication.mutual.right.*;
import bei7473p5254d69jcuat.tenyu.release1.db.store.*;
import bei7473p5254d69jcuat.tenyu.release1.db.store.single.*;
import bei7473p5254d69jcuat.tenyu.release1.global.*;
import bei7473p5254d69jcuat.tenyu.release1.global.Glb.*;
import bei7473p5254d69jcuat.tenyu.release1.global.middle.catchup.*;
import bei7473p5254d69jcuat.tenyu.release1.global.middle.takeoverserver.*;
import bei7473p5254d69jcuat.tenyu.release1.global.middle.takeoverserver.game.*;
import bei7473p5254d69jcuat.tenyu.release1.global.middle.takeoverserver.urlprovement.*;
import bei7473p5254d69jcuat.tenyu.release1.global.middle.takeoverserver.usermessagelist.*;
import bei7473p5254d69jcuat.tenyu.release1.global.middle.vote.*;
import bei7473p5254d69jcuat.tenyu.release1.global.objectivity.*;
import bei7473p5254d69jcuat.tenyu.release1.global.objectivity.naturality.*;
import jetbrains.exodus.env.*;
/**
* 主観と客観の中間。ここにある値はここにある間は主観値だが、
* 後に客観値になるものが多い。
* グローバル状態の一つ。
*
* 客観同調処理も、同調中の状態は主観値であり、最後に客観値になる。
* 近傍リスト等の主観値とも区別されるのでここに入る。
*
* @author exceptiontenyu@gmail.com
*
*/
public class Middle extends IdObject implements GlbMemberDynamicState {
public static Middle loadOrCreate() {
return Glb.getDb(Glb.getFile().getMiddleDBPath())
.computeInTransaction((txn) -> {
Middle r = null;
try {
r = new MiddleStore(txn).get();
} catch (Exception e) {
Glb.getLogger().error("", e);
}
//ロード成功したらロードしたものを、失敗したら新しいのをrに設定
r = r == null ? new Middle() : r;
r.init();
return r;
});
}
private DistributedVoteManager distributedManager = new DistributedVoteManager();
private EventManager eventManager = new EventManager();
/**
* 自分のuserIdをオンメモリにしておく
*/
private transient Long myUserId;//微妙だがtransient。客観が同調処理で変化するので、設定されたidが間違いだった可能性がある。
private transient ObjectivityCatchUp objeCatchUp;
/**
* メインサーバのオンライン状態を定期的に確認し必要に応じてメインサーバを起動する
*/
private transient OnlineChecker onlineChecker = new OnlineChecker();
private transient RatingGameMatchingServer ratingGameMatchingServer = new RatingGameMatchingServer();
/**
* Role系サーバーの通信に成功したサーバーのユーザーIDのキャッシュ
*/
private Map<String,
NodeIdentifierUser> serverCache = new ConcurrentHashMap<>();
private transient URLProvementServer urlProvementServer = new URLProvementServer();
/**
* ユーザーとアドレス・ポートの対応関係を全ノードに提供する
*/
private transient UserAddrServer userAddrServer;
private UserEdgeList userEdgeList;
/**
* ユーザーメッセージリストの拡散反映を行うP2Pシーケンス
*/
private transient ObjectivityUpdateSequence objectivityUpdateSequence;
/**
* 主な客観更新手段としてUserMessageListがあり、
* ここに登録されるのはそれ以外の例外的な客観更新処理。
* 他のモジュールがここに処理を登録し、定期的に処理される。
*/
private ObjectivityUpdateElementList procFromOtherModules = new ObjectivityUpdateElementList();
public void resetProcFromOtherModules() {
}
/**
* ユーザーメッセージを受け付けるメインサーバ
*/
private transient UserMessageListServer userMessageListServer;
private UserRegistrationOfferList userRegistrationIntroduceOfferList;
public ObjectivityUpdateElementList getProcFromOtherModules() {
return procFromOtherModules;
}
private Middle() {
}
/**
* 自分のノード識別子のキャッシュ
* ノード識別子は内部にDBアクセスがありUserのキャッシュがあるので
* 使いまわすとDBアクセスが少し減る
*/
private transient NodeIdentifierUser myNodeIdentifier;
public NodeIdentifierUser getMyNodeIdentifierUser() {
if (myNodeIdentifier == null) {
myNodeIdentifier = new NodeIdentifierUser(getMyUserId(),
Glb.getConf().getNodeNumber());
}
return myNodeIdentifier;
}
/**
* @param roleName Role名
* @return キャッシュされたRole系サーバー
*/
public NodeIdentifierUser getCachedServer(String roleName) {
return serverCache.get(roleName);
}
public DistributedVoteManager getDistributedManager() {
return distributedManager;
}
public EventManager getEventManager() {
return eventManager;
}
public User getMe() {
//userIdと異なりUser情報は変更される可能性があるのでキャッシュ不可
return Glb.getObje().getUser(us -> us.get(getMyUserId()));
}
public Long getMyUserId() {
if (myUserId == null)
myUserId = UserStore.getMyIdSimple();
return myUserId;
}
public ObjectivityCatchUp getObjeCatchUp() {
return objeCatchUp;
}
public OnlineChecker getOnlineChecker() {
return onlineChecker;
}
public RatingGameMatchingServer getRatingGameMatchingServer() {
return ratingGameMatchingServer;
}
public URLProvementServer getUrlProvementServer() {
return urlProvementServer;
}
public UserAddrServer getUserAddrServer() {
return userAddrServer;
}
public UserEdgeList getUserEdgeList() {
return userEdgeList;
}
public ObjectivityUpdateSequence getObjectivityUpdateSequence() {
return objectivityUpdateSequence;
}
public UserMessageListServer getUserMessageListServer() {
return userMessageListServer;
}
public UserRegistrationOfferList getUserRegistrationIntroduceList() {
return userRegistrationIntroduceOfferList;
}
public void init() {
if (userMessageListServer == null)
userMessageListServer = new UserMessageListServer();
if (onlineChecker == null)
onlineChecker = new OnlineChecker();
if (userEdgeList == null)
userEdgeList = new UserEdgeList();
if (userRegistrationIntroduceOfferList == null)
userRegistrationIntroduceOfferList = new UserRegistrationOfferList();
if (objeCatchUp == null)
objeCatchUp = new ObjectivityCatchUp();
}
public void putCachedServer(String roleName, NodeIdentifierUser server) {
serverCache.put(roleName, server);
}
public boolean removeCachedServer(String roleName,
NodeIdentifierUser server) {
return serverCache.remove(roleName, server);
}
public boolean save() {
return Glb.getDb(Glb.getFile().getMiddleDBPath())
.computeInTransaction((txn) -> {
try {
return new MiddleStore(txn).save(this);
} catch (NoSuchAlgorithmException e) {
Glb.getLogger().error("", e);
return false;
}
});
}
public void setDistributedManager(
DistributedVoteManager distributedManager) {
this.distributedManager = distributedManager;
}
public void setEventManager(EventManager eventManager) {
this.eventManager = eventManager;
}
public void setObjeCatchUp(ObjectivityCatchUp objeCatchUp) {
this.objeCatchUp = objeCatchUp;
}
public void setOnlineChecker(OnlineChecker onlineChecker) {
this.onlineChecker = onlineChecker;
}
public void setRatingGameMatchingServer(
RatingGameMatchingServer ratingGameMatchingServer) {
this.ratingGameMatchingServer = ratingGameMatchingServer;
}
public void setUrlProvementServer(URLProvementServer urlProvementServer) {
this.urlProvementServer = urlProvementServer;
}
public void setUserAddrServer(UserAddrServer userAddrServer) {
this.userAddrServer = userAddrServer;
}
public void setUserEdgeList(UserEdgeList userEdgeList) {
this.userEdgeList = userEdgeList;
}
public void setObjectivityUpdateSequence(
ObjectivityUpdateSequence objectivityUpdateSequence) {
this.objectivityUpdateSequence = objectivityUpdateSequence;
}
public void setUserMessageListServer(
UserMessageListServer userMessageListServer) {
this.userMessageListServer = userMessageListServer;
}
public void setUserRegistrationIntroduceOfferList(
UserRegistrationOfferList userRegistrationIntroduceOfferList) {
this.userRegistrationIntroduceOfferList = userRegistrationIntroduceOfferList;
}
public void start() {
if (userEdgeList != null)
userEdgeList.start();
if (objeCatchUp != null)
objeCatchUp.start();
startRoleServers();
}
/**
* Role系サーバーについて、起動すべきものを起動する
* 各サーバーでオンラインチェッカーへの登録処理をすると
* 他のサーバ候補のオンライン状態の変化に応じてサーバの起動処理が呼び出される。
* そこでも起動処理が呼び出される可能性があるが、
* それとは別に、全サーバについて自分がサーバ候補ならアプリ起動直後起動する。
* もし他に自分より優先度が高い候補がオンラインであることが分かったら、
* オンラインチェッカーから呼び出される起動処理の中で適切に終了される。
*/
public void startRoleServers() {
if (onlineChecker != null) {
if (onlineChecker.checkAndStartOrStop()) {
if (userMessageListServer != null) {
userMessageListServer.registerToOnlineChecker();
userMessageListServer.startIfImCandidate();
}
if (ratingGameMatchingServer != null) {
ratingGameMatchingServer.registerToOnlineChecker();
ratingGameMatchingServer.startIfImCandidate();
}
if (urlProvementServer != null) {
urlProvementServer.registerToOnlineChecker();
urlProvementServer.startIfImCandidate();
}
}
}
}
public void stop() {
if (userMessageListServer != null)
userMessageListServer.stop();
if (ratingGameMatchingServer != null)
ratingGameMatchingServer.stop();
if (urlProvementServer != null)
urlProvementServer.stop();
if (onlineChecker != null)
onlineChecker.stop();
if (userEdgeList != null)
userEdgeList.stop();
if (objeCatchUp != null)
objeCatchUp.stop();
save();
}
@Override
protected final boolean validateAtCreateIdObjectConcrete(
ValidationResult r) {
return true;
}
@Override
protected boolean validateAtUpdateChangeIdObjectConcrete(ValidationResult r,
Object old) {
return true;
}
@Override
protected final boolean validateAtUpdateIdObjectConcrete(
ValidationResult r) {
return true;
}
@Override
public boolean validateReferenceIdObjectConcrete(ValidationResult r,
Transaction txn) {
return true;
}
/**
* 客観状況
* @author exceptiontenyu@gmail.com
*
*/
public static enum ObjectivityCircumstance {
/**
* 混沌。客観は近傍において割れている。
* メッセージリストを拡散、反映しない。同調に専念する。
*/
CHAOS,
DEFAULT,
/**
* 平時。客観は近傍において概ね統一されている。
* メッセージリストを拡散、反映する。
*/
UNITY,
}
}
| [
"lifeinwild1@gmail.com"
] | lifeinwild1@gmail.com |
8ca215f6f8a88fda09a45369300b6c6a4ffea212 | d5405e33980e3e54854eabc04724e02f0470479e | /app/src/main/java/com/androidapps/robertsteele/beeradvisor/BeerExpert.java | d06cf638710b7d9b4451991057aa5c392330ef21 | [] | no_license | steele2721/BeerAdvisor | eee36ce86e3cccacdb458ae888bd42427c9c6b63 | 2c5daadd97018ed1548e70e376b2e8283ce0dc2d | refs/heads/master | 2020-03-31T19:26:05.115179 | 2018-10-10T22:22:48 | 2018-10-10T22:22:48 | 152,497,352 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,005 | java | package com.androidapps.robertsteele.beeradvisor;
public class BeerExpert {
private static final String[] lightBeers = {"stella", "peroni", "miller light", "bud light"};
private static final String[] amberBeers = {"coors", "budweiser", "coors original", "amber beer"};
private static final String[] darkBeers = {"Guinness", "Stout", "Dark beer"};
private static final String[] brownBeers = {"Bass", "Ale", "New Castle", "brown beer"};
public static String[] getBeers(String beerType) {
String[] array;
switch (beerType) {
case "Dark":
array = darkBeers;
break;
case "Light":
array = lightBeers;
break;
case "Amber":
array = amberBeers;
break;
case "Brown":
array = brownBeers;
break;
default:
array = new String[]{};
}
return array;
}
}
| [
"steele.210@osu.edu"
] | steele.210@osu.edu |
fce82b9ac62403749c35e2cfac9928d2e674f57c | 667ba854b3f884015ae5064527eea2afbc5e10d1 | /addressbook-web-tests/src/test/java/ru/stqa/pft/addressbook/model/GroupData.java | 9d519ced9d1aa7eb6e25a8e4dd99af2faa2f63f9 | [
"Apache-2.0"
] | permissive | AlexKrukov/java_pft | e90b35e8c43df6a49df93be70b339eea1b654632 | 22e6efa7f6500562987b3a51eab9739b964da9b3 | refs/heads/master | 2020-03-19T10:50:34.659226 | 2018-07-26T02:19:46 | 2018-07-26T02:19:46 | 116,407,173 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,419 | java | package ru.stqa.pft.addressbook.model;
import java.util.Objects;
public class GroupData {
private int id = Integer.MAX_VALUE;
private String name;
private String header;
private String footer;
public int getId() {
return id;
}
public String getName() {
return name;
}
public String getHeader() {
return header;
}
public String getFooter() {
return footer;
}
public GroupData withId(int id) {
this.id = id;
return this;
}
public GroupData withName(String name) {
this.name = name;
return this;
}
public GroupData withHeader(String header) {
this.header = header;
return this;
}
public GroupData withFooter(String footer) {
this.footer = footer;
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GroupData groupData = (GroupData) o;
return id == groupData.id &&
Objects.equals(name, groupData.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
return "GroupData{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
'}';
}
}
| [
"a_bot@github.com"
] | a_bot@github.com |
3a2c0defe7cb51b8aaa97ca0b714bfff1ccc4540 | 78f284cd59ae5795f0717173f50e0ebe96228e96 | /factura-negocio/src/cl/stotomas/factura/negocio/ia_13/copy/copy2/TestingModel.java | 7bc910ae7aee18cdc534bfe986a34a9d2401e9cf | [] | no_license | Pattricio/Factura | ebb394e525dfebc97ee2225ffc5fca10962ff477 | eae66593ac653f85d05071b6ccb97fb1e058502d | refs/heads/master | 2020-03-16T03:08:45.822070 | 2018-05-07T15:29:25 | 2018-05-07T15:29:25 | 132,481,305 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 684 | java | package cl.stotomas.factura.negocio.ia_13.copy.copy2;
public class TestingModel {
class Echo {
// Control de Proceso
// Posible reemplazo de librería por una maliciosa
// Donde además s enos muestra el nombre explícito de esta.
public native void runEcho();
{
System.loadLibrary("echo"); // Se carga librería
}
public void main(String[] args)
{
new Echo().runEcho();
}
}
public final class compareStrings{
public String hola;
public String adios;
public void comparar()
{
if (hola == adios)
{
System.out.println("hola == adios");
}
}
}
}
| [
"Adriana Molano@DESKTOP-GQ96FK8"
] | Adriana Molano@DESKTOP-GQ96FK8 |
0a44314e08a67d1829d6c5c8f134c0b0f3202150 | 3706cb591eeae12a407ae1c8e5576ae208b62302 | /app/src/main/java/com/chad/ctsdemo/Utils/OutputSurface.java | 49a580bac8c06bf5c3df8060e71fa67c96517ca6 | [] | no_license | xianchuangwu/CTSDemo | 71333a828aac540a72829518145bb754d65bc4d8 | b51f588014f08edbe13764f7bacaf2f3efa6fd31 | refs/heads/master | 2021-01-13T01:21:16.130574 | 2017-02-10T02:44:00 | 2017-02-10T02:44:00 | 81,518,627 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,340 | java | package com.chad.ctsdemo.Utils;
/**
* Created by chad
* Time 17/2/8
* Email: wuxianchuang@foxmail.com
* Description: TODO
*/
import android.graphics.SurfaceTexture;
import android.opengl.EGL14;
import android.util.Log;
import android.view.Surface;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
/**
* Holds state associated with a Surface used for MediaCodec decoder output.
* <p>
* The (width,height) constructor for this class will prepare GL, create a SurfaceTexture,
* and then create a Surface for that SurfaceTexture. The Surface can be passed to
* MediaCodec.configure() to receive decoder output. When a frame arrives, we latch the
* texture with updateTexImage, then render the texture with GL to a pbuffer.
* <p>
* The no-arg constructor skips the GL preparation step and doesn't allocate a pbuffer.
* Instead, it just creates the Surface and SurfaceTexture, and when a frame arrives
* we just draw it on whatever surface is current.
* <p>
* By default, the Surface will be using a BufferQueue in asynchronous mode, so we
* can potentially drop frames.
*/
public class OutputSurface implements SurfaceTexture.OnFrameAvailableListener {
private static final String TAG = "OutputSurface";
private static final boolean VERBOSE = false;
private static final int EGL_OPENGL_ES2_BIT = 4;
private EGL10 mEGL;
private EGLDisplay mEGLDisplay;
private EGLContext mEGLContext;
private EGLSurface mEGLSurface;
private SurfaceTexture mSurfaceTexture;
private Surface mSurface;
private Object mFrameSyncObject = new Object(); // guards mFrameAvailable
private boolean mFrameAvailable;
private TextureRender mTextureRender;
/**
* Creates an OutputSurface backed by a pbuffer with the specifed dimensions. The new
* EGL context and surface will be made current. Creates a Surface that can be passed
* to MediaCodec.configure().
*/
public OutputSurface(int width, int height) {
if (width <= 0 || height <= 0) {
throw new IllegalArgumentException();
}
eglSetup(width, height);
makeCurrent();
setup();
}
/**
* Creates an OutputSurface using the current EGL context. Creates a Surface that can be
* passed to MediaCodec.configure().
*/
public OutputSurface() {
setup();
}
/**
* Creates instances of TextureRender and SurfaceTexture, and a Surface associated
* with the SurfaceTexture.
*/
private void setup() {
mTextureRender = new TextureRender();
mTextureRender.surfaceCreated();
// Even if we don't access the SurfaceTexture after the constructor returns, we
// still need to keep a reference to it. The Surface doesn't retain a reference
// at the Java level, so if we don't either then the object can get GCed, which
// causes the native finalizer to run.
if (VERBOSE) Log.d(TAG, "textureID=" + mTextureRender.getTextureId());
mSurfaceTexture = new SurfaceTexture(mTextureRender.getTextureId());
// This doesn't work if OutputSurface is created on the thread that CTS started for
// these test cases.
//
// The CTS-created thread has a Looper, and the SurfaceTexture constructor will
// create a Handler that uses it. The "frame available" message is delivered
// there, but since we're not a Looper-based thread we'll never see it. For
// this to do anything useful, OutputSurface must be created on a thread without
// a Looper, so that SurfaceTexture uses the main application Looper instead.
//
// Java language note: passing "this" out of a constructor is generally unwise,
// but we should be able to get away with it here.
mSurfaceTexture.setOnFrameAvailableListener(this);
mSurface = new Surface(mSurfaceTexture);
}
/**
* Prepares EGL. We want a GLES 2.0 context and a surface that supports pbuffer.
*/
private void eglSetup(int width, int height) {
mEGL = (EGL10) EGLContext.getEGL();
mEGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
if (!mEGL.eglInitialize(mEGLDisplay, null)) {
throw new RuntimeException("unable to initialize EGL10");
}
// Configure EGL for pbuffer and OpenGL ES 2.0. We want enough RGB bits
// to be able to tell if the frame is reasonable.
int[] attribList = {
EGL10.EGL_RED_SIZE, 8,
EGL10.EGL_GREEN_SIZE, 8,
EGL10.EGL_BLUE_SIZE, 8,
EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL10.EGL_NONE
};
EGLConfig[] configs = new EGLConfig[1];
int[] numConfigs = new int[1];
if (!mEGL.eglChooseConfig(mEGLDisplay, attribList, configs, 1, numConfigs)) {
throw new RuntimeException("unable to find RGB888+pbuffer EGL config");
}
// Configure context for OpenGL ES 2.0.
int[] attrib_list = {
EGL14.EGL_CONTEXT_CLIENT_VERSION, 2,
EGL10.EGL_NONE
};
mEGLContext = mEGL.eglCreateContext(mEGLDisplay, configs[0], EGL10.EGL_NO_CONTEXT,
attrib_list);
checkEglError("eglCreateContext");
if (mEGLContext == null) {
throw new RuntimeException("null context");
}
// Create a pbuffer surface. By using this for output, we can use glReadPixels
// to test values in the output.
int[] surfaceAttribs = {
EGL10.EGL_WIDTH, width,
EGL10.EGL_HEIGHT, height,
EGL10.EGL_NONE
};
mEGLSurface = mEGL.eglCreatePbufferSurface(mEGLDisplay, configs[0], surfaceAttribs);
checkEglError("eglCreatePbufferSurface");
if (mEGLSurface == null) {
throw new RuntimeException("surface was null");
}
}
/**
* Discard all resources held by this class, notably the EGL context.
*/
public void release() {
if (mEGL != null) {
if (mEGL.eglGetCurrentContext().equals(mEGLContext)) {
// Clear the current context and surface to ensure they are discarded immediately.
mEGL.eglMakeCurrent(mEGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE,
EGL10.EGL_NO_CONTEXT);
}
mEGL.eglDestroySurface(mEGLDisplay, mEGLSurface);
mEGL.eglDestroyContext(mEGLDisplay, mEGLContext);
//mEGL.eglTerminate(mEGLDisplay);
}
mSurface.release();
// this causes a bunch of warnings that appear harmless but might confuse someone:
// W BufferQueue: [unnamed-3997-2] cancelBuffer: BufferQueue has been abandoned!
//mSurfaceTexture.release();
// null everything out so future attempts to use this object will cause an NPE
mEGLDisplay = null;
mEGLContext = null;
mEGLSurface = null;
mEGL = null;
mTextureRender = null;
mSurface = null;
mSurfaceTexture = null;
}
/**
* Makes our EGL context and surface current.
*/
public void makeCurrent() {
if (mEGL == null) {
throw new RuntimeException("not configured for makeCurrent");
}
checkEglError("before makeCurrent");
if (!mEGL.eglMakeCurrent(mEGLDisplay, mEGLSurface, mEGLSurface, mEGLContext)) {
throw new RuntimeException("eglMakeCurrent failed");
}
}
/**
* Returns the Surface that we draw onto.
*/
public Surface getSurface() {
return mSurface;
}
/**
* Replaces the fragment shader.
*/
public void changeFragmentShader(String fragmentShader) {
mTextureRender.changeFragmentShader(fragmentShader);
}
/**
* Latches the next buffer into the texture. Must be called from the thread that created
* the OutputSurface object, after the onFrameAvailable callback has signaled that new
* data is available.
*/
public void awaitNewImage() {
final int TIMEOUT_MS = 500;
synchronized (mFrameSyncObject) {
while (!mFrameAvailable) {
try {
// Wait for onFrameAvailable() to signal us. Use a timeout to avoid
// stalling the test if it doesn't arrive.
mFrameSyncObject.wait(TIMEOUT_MS);
if (!mFrameAvailable) {
// TODO: if "spurious wakeup", continue while loop
throw new RuntimeException("Surface frame wait timed out");
}
} catch (InterruptedException ie) {
// shouldn't happen
throw new RuntimeException(ie);
}
}
mFrameAvailable = false;
}
// Latch the data.
mTextureRender.checkGlError("before updateTexImage");
mSurfaceTexture.updateTexImage();
}
/**
* Draws the data from SurfaceTexture onto the current EGL surface.
*/
public void drawImage() {
mTextureRender.drawFrame(mSurfaceTexture);
}
@Override
public void onFrameAvailable(SurfaceTexture st) {
if (VERBOSE) Log.d(TAG, "new frame available");
synchronized (mFrameSyncObject) {
if (mFrameAvailable) {
throw new RuntimeException("mFrameAvailable already set, frame could be dropped");
}
mFrameAvailable = true;
mFrameSyncObject.notifyAll();
}
}
/**
* Checks for EGL errors.
*/
private void checkEglError(String msg) {
boolean failed = false;
int error;
while ((error = mEGL.eglGetError()) != EGL10.EGL_SUCCESS) {
Log.e(TAG, msg + ": EGL error: 0x" + Integer.toHexString(error));
failed = true;
}
if (failed) {
throw new RuntimeException("EGL error encountered (see log)");
}
}
}
| [
"xianchuang.wu@thel.co"
] | xianchuang.wu@thel.co |
ab7f3c10d2e341757656a66564d82ac7ee7e126d | 94e796c583725b21e060ec3e289a7c79d2573c20 | /src/com/vishal/wayfair/MazeWithJumpObstacle.java | 4f3eff9d9e92892aef57596e81aa0d11a6aa2ee5 | [] | no_license | mittal-vishal/data-structures-and-algoritms | 77540f21df89d9a946d14686a095c7236cdf69fc | 9a5f806222c44598d0be826cf8cdf9468165b59a | refs/heads/master | 2023-08-09T22:19:32.200960 | 2023-08-08T09:48:47 | 2023-08-08T09:48:47 | 192,055,834 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,440 | java | package com.vishal.wayfair;
import java.util.LinkedList;
import java.util.Queue;
public class MazeWithJumpObstacle {
/*
*
* [0,1,0]
* [1,0,0]
*
*
* */
public static void main(String[] args) {
int[][] maze = {{0,1,0},{1,0,0}};
int k = 5;
System.out.println(getMinimumMoves(maze, k));;
}
static class Cell{
int row;
int col;
int steps;
public Cell(int row, int col, int steps){
this.row = row;
this.col = col;
this.steps = steps;
}
}
public static int getMinimumMoves(int[][] maze, int k) {
//base check
if(maze == null || maze.length == 0 || maze[0].length == 0){
return 0;
}
if(maze[0][0] == 1){
return -1;
}
Queue<Cell> queue = new LinkedList<>();
queue.offer(new Cell(0,0,0));
int[][] dirs = {{0,1}, {0,-1}, {1,0}, {-1,0}};
int row = maze.length;
int col = maze[0].length;
boolean[][] visited = new boolean[row][col];
int steps = 0;
while(!queue.isEmpty()){
int size = queue.size();
for(int i = 0; i < size; i++){
Cell curr = queue.poll();
if(visited[curr.row][curr.col]){
continue;
}
if(curr.row == row-1 && curr.col == col-1){
return steps;
}
visited[curr.row][curr.col] = true;
for(int[] dir: dirs){
int newRow = curr.row;
int newCol = curr.col;
for(int jump = 1; jump <= k; jump++){
newRow += dir[0];
newCol += dir[1];
if(isValid(newRow, newCol, row, col) && !visited[newRow][newCol] && maze[newRow][newCol] == 0){
queue.offer(new Cell(newRow, newCol, curr.steps+1));
}else if(isValid(newRow, newCol, row, col) && maze[newRow][newCol] == 1){
break;
}
}
}
}
steps++;
}
return -1;
}
private static boolean isValid(int i, int j, int m, int n){
if(i >= 0 && i < m && j >= 0 && j < n){
return true;
}
return false;
}
}
| [
"vishalmittal1993"
] | vishalmittal1993 |
73a215a73c3ae6ca1b4b4d3c26035b28e476ab43 | 642b3e13a23cfc79c3fd8b5fa68631c5342d87f4 | /app/src/main/java/com/zaomeng/zaomeng/view/AfterSaleOrderFragment.java | ad394865f88783fbd617529a6f34b59469036d90 | [] | no_license | bobo19870225/FastAndroid | da0826b24394bdc8bee8ce341b55b33c411331ca | dbd6fafe4a7fe1c32267b40d3ad5ddb1832cd28f | refs/heads/master | 2020-03-19T02:11:25.307060 | 2020-03-04T10:34:39 | 2020-03-04T10:34:39 | 135,607,463 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,695 | java | package com.zaomeng.zaomeng.view;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModelProviders;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.zaomeng.zaomeng.R;
import com.zaomeng.zaomeng.databinding.FragmentAfterSaleOrderBinding;
import com.zaomeng.zaomeng.model.repository.http.HttpHelper;
import com.zaomeng.zaomeng.model.repository.http.InterfaceLogin;
import com.zaomeng.zaomeng.model.repository.http.bean.OrderBean;
import com.zaomeng.zaomeng.view.adapter.after_sale.AfterSaleOrderAdapter;
import com.zaomeng.zaomeng.view.base.MVVMListFragment;
import com.zaomeng.zaomeng.view_model.AfterSaleOrderFragmentVM;
import com.zaomeng.zaomeng.view_model.ViewModelFactory;
import javax.inject.Inject;
import kotlin.jvm.functions.Function0;
/**
* Created by Sampson on 2019-05-08.
* FastAndroid
*/
public class AfterSaleOrderFragment extends MVVMListFragment<AfterSaleOrderFragmentVM, FragmentAfterSaleOrderBinding, AfterSaleOrderAdapter> {
@Inject
public AfterSaleOrderFragment() {
}
@Inject
ViewModelFactory viewModelFactory;
@Inject
HttpHelper httpHelper;
private BottomSheetDialog bottomSheetDialog;
private TextView submit;
private EditText msg;
private Context context;
@Override
protected void setUI() {
context = getContext();
if (context != null) {
bottomSheetDialog = new BottomSheetDialog(context);
bottomSheetDialog.setCancelable(true);
}
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.dialog_after_sale, null, false);
msg = view.findViewById(R.id.msg);
submit = view.findViewById(R.id.submit);
bottomSheetDialog.setContentView(view);
}
@NonNull
@Override
protected AfterSaleOrderAdapter setAdapter(Function0 reTry) {
AfterSaleOrderAdapter orderAdapter = new AfterSaleOrderAdapter(reTry);
orderAdapter.setOnItemReturnClick((view, ItemObject, position) -> {
showWhyDialog(ItemObject);
});
return orderAdapter;
}
private void showWhyDialog(OrderBean.GoodsListBean itemObject) {
submit.setOnClickListener(v -> {
String string = msg.getText().toString();
if (string.isEmpty()) {
toast("请您写下退款理由");
return;
}
applyMemberOrderGoodsReturn(itemObject.getId(), string);
});
if (!bottomSheetDialog.isShowing()) {
bottomSheetDialog.show();
}
}
private void applyMemberOrderGoodsReturn(String goodsID, String description) {
mViewModel.applyMemberOrderGoodsReturn(goodsID, description).observe(this, beanResource -> {
String s = (String) httpHelper.AnalyticalData(beanResource, new InterfaceLogin() {
@Override
public void skipLoginActivity() {
skipTo(LoginActivity.class);
}
@Override
public void reLoad() {
}
}, this);
if (bottomSheetDialog.isShowing()) {
bottomSheetDialog.dismiss();
}
refresh();
});
}
@NonNull
@Override
protected SwipeRefreshLayout setSwipeRefreshLayout() {
return mViewDataBinding.swipeRefresh;
}
@NonNull
@Override
protected RecyclerView setRecyclerView() {
RecyclerView recyclerView = mViewDataBinding.list;
LinearLayoutManager layoutManager = new LinearLayoutManager(context) {
@Override
public RecyclerView.LayoutParams generateDefaultLayoutParams() {
return new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT);
}
};
layoutManager.setOrientation(RecyclerView.VERTICAL);
recyclerView.setLayoutManager(layoutManager);
return recyclerView;
}
@Override
protected AfterSaleOrderFragmentVM createdViewModel() {
return ViewModelProviders.of(this, viewModelFactory).get(AfterSaleOrderFragmentVM.class);
}
@Override
protected int setLayoutRes() {
return R.layout.fragment_after_sale_order;
}
}
| [
"rain19870225@163.com"
] | rain19870225@163.com |
89057f3dff7e996229b7bd5d6adc31fb4b5b55bb | 180d6689fb979955bfa438031a30c1cf2458ec73 | /src/main/ca/ubc/cs/cpsc210/spaceinvaders/ui/GamePanel.java | c404949e28f65075c41a59355427c1dd2f199e7d | [] | no_license | minhducubc97/A-Shooting-Game | de8eb726b47b885e03fb716736af2a002adea98b | c2429d9edd3aa1c7b2cd1b9db7d179ae65836614 | refs/heads/master | 2021-04-28T19:20:42.259737 | 2018-02-17T21:46:07 | 2018-02-17T21:46:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,928 | java | package ca.ubc.cs.cpsc210.spaceinvaders.ui;
import java.awt.*;
import javax.swing.JPanel;
import ca.ubc.cs.cpsc210.spaceinvaders.model.*;
/*
* The panel in which the game is rendered.
*/
@SuppressWarnings("serial")
public class GamePanel extends JPanel {
private static final String OVER = "Game Over!";
private static final String REPLAY = "R to replay";
protected SIGame game;
// EFFECTS: sets size and background colour of panel,
// updates this with the game to be displayed
public GamePanel(SIGame g) {
setPreferredSize(new Dimension(SIGame.WIDTH, SIGame.HEIGHT));
setBackground(Color.GRAY);
this.game = g;
}
// EFFECTS: draw the game
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
drawGame(g);
if (game.isOver()) {
gameOver(g);
}
}
// MODIFIES: g
// EFFECTS: draws the game onto g
protected void drawGame(Graphics g) {
drawTank(g);
drawInvaders(g);
drawMissiles(g);
}
// MODIFIES: g
// EFFECTS: draws the tank onto g
protected void drawTank(Graphics g) {
SuperiorTank t = (SuperiorTank) game.getTank();
Color savedCol = g.getColor();
g.setColor(Tank.COLOR);
g.fillRect(t.getX() - Tank.SIZE_X / 2, t.getY() - Tank.SIZE_Y / 2, Tank.SIZE_X, Tank.SIZE_Y);
Polygon tankFront = createTankFront(t);
g.fillPolygon(tankFront);
g.setColor(savedCol);
}
// EFFECTS: returns a polygon that represents front of tank
protected Polygon createTankFront(SuperiorTank t) {
Polygon tankFront = new Polygon();
if (t.isFacingRight()) {
tankFront.addPoint(t.getX() + Tank.SIZE_X / 2, t.getY() + Tank.SIZE_Y / 2);
tankFront.addPoint(t.getX() + Tank.SIZE_X, t.getY());
tankFront.addPoint(t.getX() + Tank.SIZE_X / 2, t.getY() - Tank.SIZE_Y / 2);
}
else {
tankFront.addPoint(t.getX() - Tank.SIZE_X / 2, t.getY() + Tank.SIZE_Y / 2);
tankFront.addPoint(t.getX() - Tank.SIZE_X, t.getY());
tankFront.addPoint(t.getX() - Tank.SIZE_X / 2, t.getY() - Tank.SIZE_Y / 2);
}
return tankFront;
}
// MODIFIES: g
// EFFECTS: draws the invaders onto g
protected void drawInvaders(Graphics g) {
for(Invader next : game.getInvaders()) {
drawInvader(g, next);
}
}
// MODIFIES: g
// EFFECTS: draws the invader i onto g
protected void drawInvader(Graphics g, Invader i) {
Color savedCol = g.getColor();
g.setColor(Invader.COLOR);
g.fillOval(i.getX() - Invader.SIZE_X / 2, i.getY() - Invader.SIZE_Y / 2, Invader.SIZE_X, Invader.SIZE_Y);
g.setColor(savedCol);
}
// MODIFIES: g
// EFFECTS: draws the missiles onto g
protected void drawMissiles(Graphics g) {
for(Missile next : game.getMissiles()) {
drawMissile(g, next);
}
}
// MODIFIES: g
// EFFECTS: draws the missile m onto g
protected void drawMissile(Graphics g, Missile m) {
Color savedCol = g.getColor();
g.setColor(Missile.COLOR);
g.fillOval(m.getX() - Missile.SIZE_X / 2, m.getY() - Missile.SIZE_Y / 2, Missile.SIZE_X, Missile.SIZE_Y);
g.setColor(savedCol);
}
// MODIFIES: g
// EFFECTS: draws "game over" and replay instructions onto g
private void gameOver(Graphics g) {
Color saved = g.getColor();
g.setColor(new Color( 0, 0, 0));
g.setFont(new Font("Arial", 20, 20));
FontMetrics fm = g.getFontMetrics();
centreString(OVER, g, fm, SIGame.HEIGHT / 2);
centreString(REPLAY, g, fm, SIGame.HEIGHT / 2 + 50);
g.setColor(saved);
}
// MODIFIES: g
// EFFECTS: centres the string str horizontally onto g at vertical position yPos
private void centreString(String str, Graphics g, FontMetrics fm, int yPos) {
int width = fm.stringWidth(str);
g.drawString(str, (SIGame.WIDTH - width) / 2, yPos);
}
}
| [
"noreply@github.com"
] | minhducubc97.noreply@github.com |
2ed94286a303804757db5a5b4582eddd3ced6238 | 47778179ec8157a62594e2a55a9e5bd08599aac5 | /spi/src/main/java/org/arquillian/cube/spi/metadata/IsBuildable.java | f481a35650bed8952ad5e9b88e8a686bfd907c77 | [
"Apache-2.0"
] | permissive | hemanik/arquillian-cube | 81a2c26941a9fe0d44f6274f84087d50e09a5895 | ca9547eff600835b3f4dd92331a952b4fc84a2c5 | refs/heads/master | 2021-01-12T14:46:12.840125 | 2018-04-23T06:24:14 | 2018-04-23T06:24:14 | 72,079,654 | 1 | 0 | Apache-2.0 | 2018-07-28T21:40:25 | 2016-10-27T06:51:55 | Java | UTF-8 | Java | false | false | 299 | java | package org.arquillian.cube.spi.metadata;
public class IsBuildable implements CubeMetadata {
private String templatePath;
public IsBuildable(String templatePath) {
this.templatePath = templatePath;
}
public String getTemplatePath() {
return templatePath;
}
}
| [
"aslak@4fs.no"
] | aslak@4fs.no |
fa34035c73d54a3d992e00b1c4c5a8a10df6e74a | 7e9b218335107c72dd6950e158f2bc681e98c34b | /src/test/java/org/runner/Test.java | a874de9b46f8216e7b5a5624044a457a66c79a70 | [] | no_license | ekelayakumar/jay | 6f89e6c70608f28db3ce297a7df462c905d1059a | c28eec725871bf0a8c77b570cd328344cbbf7b0f | refs/heads/master | 2023-02-21T16:49:51.874205 | 2021-01-24T04:55:32 | 2021-01-24T04:55:32 | 332,367,513 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 271 | java | package org.runner;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features="src\\test\\resources\\Feature\\adactin.feature", glue="org.main2")
public class Test {
}
| [
"ekelayakumar@gmail.com"
] | ekelayakumar@gmail.com |
6d6d8160127a25ba108cb181d3448d90a50b0caf | 171e10f3ca870e73151fc641875b084e0d5aaa98 | /app/src/main/java/it/uniroma1/di/eulqinaku/hover/MainActivity.java | 1213046905954edb9ca21dee59e9509cd60c7aa3 | [] | no_license | chicharitomu14/Hoover | 01327c2bccc853ecaf5fbd5c314f25a95af73dac | 91f022e30d738a26d6c2832addd9fd14672149c4 | refs/heads/master | 2021-06-21T16:02:47.343881 | 2017-08-02T18:59:35 | 2017-08-02T18:59:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,437 | java | package it.uniroma1.di.eulqinaku.hover;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.os.SystemClock;
import android.text.InputType;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
public class MainActivity extends Activity {
long timediff;
int kbd = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
timediff = System.currentTimeMillis() - SystemClock.uptimeMillis();
// start edit text
final EditText txtBox = (EditText)findViewById(R.id.txtBox);
txtBox.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction() == KeyEvent.ACTION_UP) {
System.out.println("-1-2- Key pressed: " + keyCode);
}
return false;
}
});
// end edit text
// start HoverService test
final Button kbdFull = (Button)findViewById(R.id.fullScrn);
kbdFull.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (kbd % 2 == 1) {
stopService(new Intent(MainActivity.this, HoverService.class));
Log.i("HoverActivity", "Stop HoverService Button");
} else {
startService(new Intent(MainActivity.this, HoverService.class));
Log.i("HoverActivity", "Start HoverService Button");
}
kbd++;
}
});
// end HoverService test
Button submitBtn = (Button)findViewById(R.id.submitBtn);
submitBtn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Log.i("HoverActivity", "-1-2-3- EVENT_SUBMIT 0 0 " + SystemClock.uptimeMillis() + " 0 0 0");
txtBox.setText("");
txtBox.setInputType(InputType.TYPE_CLASS_TEXT);
}
});
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
}
}
| [
"eulqinaku@epoka.edu.al"
] | eulqinaku@epoka.edu.al |
1c299f7b761faf1e5aa1870e272bb84f63e66cb9 | 176c2ce124c4070483a7e6a6cc155ea7c3364c71 | /UIViewLess/src/main/java/com/angcyo/uiview/less/utils/ProgressNotify.java | 01967b25e0a58dd92c320373a7b58e9c3e8a92bd | [
"MIT"
] | permissive | angcyo/UIKit | 482a10524c95ecbe30a16a61ed0ebfad345723b2 | 8a09b91edaa4a21a43b356f67d3e063e72df3a19 | refs/heads/androidx | 2021-06-21T18:15:00.929623 | 2020-12-20T04:00:49 | 2020-12-20T04:00:49 | 163,302,495 | 1 | 2 | MIT | 2020-12-20T04:00:50 | 2018-12-27T14:18:18 | Java | UTF-8 | Java | false | false | 7,198 | java | package com.angcyo.uiview.less.utils;
import android.app.*;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.provider.Settings;
import androidx.annotation.DrawableRes;
import androidx.core.app.NotificationCompat;
import android.widget.RemoteViews;
import com.angcyo.lib.L;
import com.angcyo.uiview.less.R;
import com.angcyo.uiview.less.RApplication;
import com.angcyo.uiview.less.utils.utilcode.utils.IntentUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
/**
* 进度通知栏
* Created by angcyo on 2017-05-28.
*/
public class ProgressNotify {
private final int NOTIFICATION_ID;
private final NotificationCompat.Builder mBuilder;
private final RemoteViews mProgressRemoteViews;
private final RemoteViews mFinishRemoteViews;
NotificationManager mNotificationManager;
private Context mContext;
private Class<?> clickActivity;
private int requestCode = 10011;
private String targetFilePath = "";
private String finishChannelId;
private String progressChannelId;
private ProgressNotify() {
mContext = RApplication.getApp();
this.NOTIFICATION_ID = new Random(System.currentTimeMillis()).nextInt(10_000);
// 获取系统服务来初始化对象
mNotificationManager = (NotificationManager) mContext
.getSystemService(Activity.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
progressChannelId = String.valueOf(NOTIFICATION_ID);
NotificationChannel channelProgress = new NotificationChannel(progressChannelId,
"ProgressNotify_channelProgress",
NotificationManager.IMPORTANCE_LOW);
channelProgress.enableLights(false);
channelProgress.enableVibration(false);
channelProgress.setSound(null, null);
finishChannelId = String.valueOf(NOTIFICATION_ID + 200);
NotificationChannel channelFinish = new NotificationChannel(finishChannelId,
"ProgressNotify_channelFinish",
NotificationManager.IMPORTANCE_HIGH);
channelFinish.enableLights(true);
channelFinish.enableVibration(true);
channelFinish.setSound(Settings.System.DEFAULT_NOTIFICATION_URI, Notification.AUDIO_ATTRIBUTES_DEFAULT);
List<NotificationChannel> channelList = new ArrayList<>();
channelList.add(channelProgress);
channelList.add(channelFinish);
mNotificationManager.createNotificationChannels(channelList);
}
mBuilder = new NotificationCompat.Builder(mContext, String.valueOf(NOTIFICATION_ID));
mBuilder.setPriority(NotificationCompat.PRIORITY_MAX);
//设置自定义布局中按钮的跳转界面
//如果是启动activity,那么就用PendingIntent.getActivity,如果是启动服务,那么是getService
// 自定义布局
mProgressRemoteViews = new RemoteViews(mContext.getPackageName(), R.layout.base_progress_notify_layout);
mFinishRemoteViews = new RemoteViews(mContext.getPackageName(), R.layout.base_progress_finish_notify_layout);
//实例化工具类,并且调用接口
}
public static ProgressNotify instance() {
return Holder.holder;
}
public ProgressNotify setClickActivity(Class<?> clickActivity) {
this.clickActivity = clickActivity;
return this;
}
public ProgressNotify setTargetFilePath(String targetFilePath) {
this.targetFilePath = targetFilePath;
return this;
}
public int show(String title, @DrawableRes int logo, int progress) {
if (clickActivity != null) {
Intent intent = new Intent(mContext, clickActivity);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
//intent.setFlags(Intent.FLAG_ACTIVITY_TASK_ON_HOME);
mBuilder.setContentIntent(PendingIntent.getActivity(mContext, requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT));// 该通知要启动的Intent
}
RemoteViews remoteViews;
if (progress >= 100) {
mNotificationManager.cancel(NOTIFICATION_ID);
return finish(title, logo, progress);
} else {
mBuilder.setChannelId(progressChannelId);
mProgressRemoteViews.setProgressBar(R.id.progressBar, 100, progress, false);
remoteViews = mProgressRemoteViews;
mBuilder.setOngoing(true);
//mBuilder.setDefaults(NotificationCompat.FLAG_ONLY_ALERT_ONCE);
//mBuilder.setDefaults(Notification.FLAG_SHOW_LIGHTS);
mBuilder.setDefaults(Notification.FLAG_ONLY_ALERT_ONCE);
}
remoteViews.setImageViewResource(R.id.image_view, logo);
remoteViews.setTextViewText(R.id.text_view, title);
mBuilder.setSmallIcon(logo);// 设置顶部状态栏的小图标, 必须设置.
mBuilder.setCustomContentView(remoteViews);
//mBuilder.setCustomBigContentView(remoteViews);
mBuilder.setWhen(System.currentTimeMillis());
mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
return NOTIFICATION_ID;
}
private int finish(String title, @DrawableRes int logo, int progress) {
mBuilder.setChannelId(finishChannelId);
if (clickActivity != null) {
Intent intent = new Intent(mContext, clickActivity);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
//intent.setFlags(Intent.FLAG_ACTIVITY_TASK_ON_HOME);
mBuilder.setContentIntent(PendingIntent.getActivity(mContext, requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT));// 该通知要启动的Intent
}
RemoteViews remoteViews = mFinishRemoteViews;
File targetFile = new File(targetFilePath);
if (targetFile.exists()) {
L.e("准备安装-> " + targetFile.getAbsolutePath());
mBuilder.setContentIntent(PendingIntent.getActivity(mContext, requestCode,
IntentUtils.getInstallAppIntent(targetFile), PendingIntent.FLAG_CANCEL_CURRENT));// 该通知要启动的Intent
} else {
L.e("需要安装的文件不存在-> " + targetFile.getAbsolutePath());
}
mBuilder.setOngoing(false);
mBuilder.setDefaults(Notification.DEFAULT_ALL);
remoteViews.setImageViewResource(R.id.image_view, logo);
remoteViews.setTextViewText(R.id.text_view, title);
mBuilder.setSmallIcon(logo);// 设置顶部状态栏的小图标, 必须设置.
mBuilder.setCustomContentView(remoteViews);
//mBuilder.setCustomBigContentView(remoteViews);
mBuilder.setWhen(System.currentTimeMillis());
mNotificationManager.notify(NOTIFICATION_ID + 200, mBuilder.build());
return NOTIFICATION_ID + 200;
}
static class Holder {
static ProgressNotify holder = new ProgressNotify();
}
}
| [
"angcyo@126.com"
] | angcyo@126.com |
e30928692e21a31353d218a5e01b273c876e09cd | 377522321eeed8d46173862958c17871dbbb40cb | /src/sn/isi/controller/AccueilServlet.java | 562ae11ecfb169ee686a096803259b927596888c | [] | no_license | blufa/JPA-SuiviStock | f90236250668d2259b1a7174607acdbec01ba2ec | 2891d71f672d53ffa581df88071c30800df347b3 | refs/heads/master | 2023-07-08T01:30:09.000224 | 2021-09-03T20:42:01 | 2021-09-03T20:42:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,642 | java | package sn.isi.controller;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import sn.isi.dao.IProduit;
import sn.isi.dao.ProduitImpl;
import sn.isi.entities.Produit;
/**
* Servlet implementation class AccueilServlet
*/
@WebServlet("/Accueil")
public class AccueilServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private IProduit produitdao;
/**
* @see HttpServlet#HttpServlet()
*/
public AccueilServlet() {
super();
// TODO Auto-generated constructor stub
}
public void init() throws ServletException {
produitdao = new ProduitImpl();
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if(request.getSession().getAttribute("usersession") == null)
{
response.sendRedirect("Login");
}else
{
List<Produit> prod = produitdao.lister();
request.setAttribute("List_produits", prod);
request.getRequestDispatcher("accueil.jsp").forward(request, response);
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
| [
"73795268+BLUFA-CLAUDE@users.noreply.github.com"
] | 73795268+BLUFA-CLAUDE@users.noreply.github.com |
0192be6f44a1d3371aa47fe27fa5a443101d3c83 | aac7c7a425d48b3618d4f2cae6e4a923a42920d8 | /src/main/java/com/cn/zbx/util/CacheUtil.java | f848057201da631affcc7d9c10620c851f7b398b | [] | no_license | wangyishuai01/zbx | d5e401c1f610183d315d9ab5c2fbd8e756892588 | bb03dab2709c700a58587da1cf6934e91fda547e | refs/heads/master | 2021-08-30T03:32:30.346351 | 2017-12-02T18:36:06 | 2017-12-02T18:36:06 | 108,485,337 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,206 | java | package com.cn.zbx.util;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* 本地缓存
*
* @author zyw
*
*/
public class CacheUtil {
/**
* 缓存字段 使用Map<String,Object> 格式
*/
public static Map<String, String> cache = null;
/**
* 读写锁
*/
private static ReadWriteLock rwlCache = new ReentrantReadWriteLock();
/**
* 根据key获取缓存数据
*
* @param key
* @return Object类型的数据
*/
public static String get(String key) {
if (null == key) {
return null;
} else {
CacheUtil.rwlCache.readLock().lock();
try {
String string = CacheUtil.getCache().get(key);
if (null == string) {
return null;
} else {
Map<String, Object> map = JsonUtil.jsonToMap(string);
Integer time = (Integer) map.get("time"); // 时间戳
Integer timeout = (Integer) map.get("timeout"); // 超时时间
String value = (String) map.get("value"); // 值
if (timeout < 0) {
return value;
} else {
if ((System.currentTimeMillis() / 1000 - time) > timeout) {
CacheUtil.del(key);
return null;
} else {
return value;
}
}
}
} finally {
CacheUtil.rwlCache.readLock().unlock();
}
}
}
/**
* 写入数据到缓存根据键值(重复key会覆盖)
*
* @param key
* @param value
*/
public static void set(String key, String value) {
if (null == key || null == value) {
} else {
CacheUtil.rwlCache.writeLock().lock();
try {
Map<String, Object> map = new HashMap<String, Object>();
map.put("value", value);
map.put("time", System.currentTimeMillis() / 1000);
map.put("timeout", -1);
CacheUtil.getCache().put(key, JsonUtil.toJson(map));
} finally {
CacheUtil.rwlCache.writeLock().unlock();
}
}
}
/**
* 写入数据到缓存根据键值(重复key会覆盖)
*
* @param key
* @param value
*/
public static void set(String key, String value, Integer s) {
if (null == key || null == value) {
} else {
CacheUtil.rwlCache.writeLock().lock();
try {
Map<String, Object> map = new HashMap<String, Object>();
map.put("value", value);
map.put("time", System.currentTimeMillis() / 1000);
map.put("timeout", s);
CacheUtil.getCache().put(key, JsonUtil.toJson(map));
} finally {
CacheUtil.rwlCache.writeLock().unlock();
}
}
}
public static boolean expire(String key, Integer s) {
String string = CacheUtil.getCache().get(key);
if (null == string) {
return false;
} else {
CacheUtil.rwlCache.writeLock().lock();
try {
Map<String, Object> map = JsonUtil.jsonToMap(string);
map.put("time", System.currentTimeMillis() / 1000);
map.put("timeout", s);
CacheUtil.getCache().put(key, JsonUtil.toJson(map));
return true;
} finally {
CacheUtil.rwlCache.writeLock().unlock();
}
}
}
/**
* 查询缓存剩余有效时间
*
* @param key
* @return 0:值不存在
* -1:不限时
*/
public static Integer ltt(String key) {
String string = CacheUtil.getCache().get(key);
if (null == string) {
return 0;
} else {
CacheUtil.rwlCache.readLock().lock();
try {
Map<String, Object> map = JsonUtil.jsonToMap(string);
Integer time = (Integer) map.get("time"); // 时间戳
Integer timeout = (Integer) map.get("timeout"); // 超时时间
if (timeout < 0) {
return -1;
} else {
if ((System.currentTimeMillis() / 1000 - time) >= timeout) {
CacheUtil.rwlCache.readLock().unlock();
CacheUtil.del(key);
CacheUtil.rwlCache.readLock().lock();
return 0;
} else {
return (int) (timeout - (System.currentTimeMillis() / 1000 - time));
}
}
} finally {
CacheUtil.rwlCache.readLock().unlock();
}
}
}
/**
* 删除map中的指定key的值
*
* @param mapKey
*/
public static void del(String key) {
if (null == key) {
} else {
CacheUtil.rwlCache.writeLock().lock();
try {
System.out.println("del--------------------");
CacheUtil.getCache().remove(key);
} finally {
CacheUtil.rwlCache.writeLock().unlock();
}
}
}
/**
* 获取所有数据从缓存 私有
*
* @return Map<String,Object>
*/
private static Map<String, String> getCache() {
if (null == CacheUtil.cache || CacheUtil.cache.equals("")) {
CacheUtil.rwlCache.writeLock().lock();
try {
cache = new HashMap<String, String>();
} finally {
CacheUtil.rwlCache.writeLock().unlock();
}
}
return cache;
}
/**
* 测试.demo
*
* @param args
*/
public static void main(String[] args) {
set("test", "testtest");
System.out.println(get("test"));
set("test10", "testtest10", 1);
System.out.println(get("test10"));
System.out.println(ltt("test10"));
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
}
System.out.println(ltt("test10"));
}
}
| [
"454038418@qq.com"
] | 454038418@qq.com |
28abe4ff244a8224c315701f6d76c79166ed4226 | 3d3905db2f19d9efe31a55a262c722e2fbe5015b | /Project Code/src/AnnouncementFeatures/Announcement.java | 72a736811a28d34f13e56253c2e6a61e7fc19051 | [
"MIT"
] | permissive | DimitraKalam/ProjectSoftwareEngineering | adad586d68b6d53e4bf27660b2ef5c8368dd7f4b | d13d3548befa58de88200dee62086a063fe996f6 | refs/heads/master | 2022-10-03T13:09:04.880998 | 2020-06-07T11:02:34 | 2020-06-07T11:02:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 582 | java | package AnnouncementFeatures;
public class Announcement
{
// The name of the announcement
private String Name;
// The announcement information
private String Info;
// Default Constructor
public Announcement(String name, String info)
{
Name = name;
Info = info;
}
public String getName()
{
return Name;
}
public void setName(String name)
{
Name = name;
}
public String getInfo()
{
return Info;
}
public void setInfo(String info)
{
Info = info;
}
}
| [
"57042407+DimitrisKostorrizos@users.noreply.github.com"
] | 57042407+DimitrisKostorrizos@users.noreply.github.com |
31eeb7713ec190040375c8a115d74bd8c9cc5502 | 24f26275ffcd9324998d7570ea9fda82578eeb9e | /android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibJsReplyProxyAdapter.java | 29ddff4c7f21c36975665c75cfe1ae60b8dd4b9e | [
"BSD-3-Clause"
] | permissive | Vizionnation/chromenohistory | 70a51193c8538d7b995000a1b2a654e70603040f | 146feeb85985a6835f4b8826ad67be9195455402 | refs/heads/master | 2022-12-15T07:02:54.461083 | 2019-10-25T15:07:06 | 2019-10-25T15:07:06 | 217,557,501 | 2 | 1 | BSD-3-Clause | 2022-11-19T06:53:07 | 2019-10-25T14:58:54 | null | UTF-8 | Java | false | false | 945 | java | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.support_lib_glue;
import org.chromium.android_webview.AwSupportLibIsomorphic;
import org.chromium.android_webview.JsReplyProxy;
import org.chromium.support_lib_boundary.JsReplyProxyBoundaryInterface;
/**
* Adapter between JsReplyProxyBoundaryInterface and JsReplyProxy.
*/
class SupportLibJsReplyProxyAdapter
extends IsomorphicAdapter implements JsReplyProxyBoundaryInterface {
private JsReplyProxy mReplyProxy;
public SupportLibJsReplyProxyAdapter(JsReplyProxy replyProxy) {
mReplyProxy = replyProxy;
}
@Override
public void postMessage(String message) {
mReplyProxy.postMessage(message);
}
@Override
/* package */ AwSupportLibIsomorphic getPeeredObject() {
return mReplyProxy;
}
}
| [
"rjkroege@chromium.org"
] | rjkroege@chromium.org |
99d84af1237674f152f3b8623d7b4289027122cd | a59023f80b9f4fe5af1acc1c44fc5161f7e0d122 | /api/src/test/java/org/openmrs/module/muzima/model/RegistrationDataTest.java | caf60302ddc58ee6ce8584e111aa9431fe5024be | [] | no_license | harrietobwogo/openmrs-module-muzimacore | 355638bb5b2ea7d262ad63fe675faef72a8c3970 | edfe1778c347ea783e3b415c632307b27ac87a5f | refs/heads/master | 2020-03-18T23:44:26.624501 | 2018-04-23T08:05:29 | 2018-04-23T08:05:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 590 | java | package org.openmrs.module.muzima.model;
import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Test;
/**
* Tests methods on the {@link RegistrationData} class
*/
public class RegistrationDataTest {
private RegistrationData registrationData;
@Before
public void setUp() throws Exception {
registrationData = new RegistrationData();
}
@Test
public void creationTest() {
Assertions.assertThat(registrationData).isNotNull();
Assertions.assertThat(registrationData).isInstanceOf(RegistrationData.class);
}
} | [
"samuelowino43@yahoo.com"
] | samuelowino43@yahoo.com |
df1d0f1bb52253bc5b3e81b115a4e545f6c1136a | ae414f781db70a2a5d348b22094529f0e94a66db | /src/syntax/WhileExam.java | f90f379cd22b99861d2e7312dce1f04de7e33df6 | [] | no_license | asd9211/java-study | 1b1236a2c2af5864d2d823f5ad3068f7f63171cd | da5d166a5c7e9d5c2053b3179829613b89329e9e | refs/heads/master | 2020-04-22T13:51:23.454386 | 2019-03-07T08:25:29 | 2019-03-07T08:25:29 | 170,423,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 184 | java | package syntax;
public class WhileExam {
public static void main(String[] args) {
int num = 1;
do{
System.out.println(num);
num++;
}while(num>=5);
}
}
| [
"Administrator@USER-PC"
] | Administrator@USER-PC |
05a7027614789f8a6b44a1a13c060299f39c78d9 | 3902394e8e1b15bde8c8de28972d5d7aa32afab9 | /crm/src/main/java/com/bjpowernode/utils/DateTimeUtil.java | 9ccf5c2244c9066641da0d9412e2c2e4770cebb8 | [] | no_license | handsomeboy65/FourCrm | 02bd6d3c938cad2578f115aebd9380846e9f7830 | a600f817d53bbda65b8910b7ad79d087cd875374 | refs/heads/master | 2023-06-20T23:55:59.106120 | 2021-07-27T10:55:51 | 2021-07-27T10:55:51 | 389,958,150 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,156 | java | package com.bjpowernode.utils;
import com.bjpowernode.exception.UserException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateTimeUtil {
public static SimpleDateFormat simpleDateFormat10 = new SimpleDateFormat("yyyy-MM-dd");
public static SimpleDateFormat simpleDateFormat19 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public static long longTimeOne(String time1){
Date parse = null;
try {
parse = simpleDateFormat10.parse(time1);
} catch (ParseException e) {
throw new UserException("账号已到期");
}
long time = parse.getTime();
return time;
}
public static long longTimeTow(String time2){
Date parse = null;
try {
parse = simpleDateFormat19.parse(time2);
} catch (ParseException e) {
throw new UserException("账号已到期");
}
long time = parse.getTime();
return time;
}
public static String stringNewTime(Date time){
String strTime = simpleDateFormat19.format(time);
return strTime;
}
}
| [
"1872380676@qq.com"
] | 1872380676@qq.com |
86d7c1443d50aef3f8951393d611ca079031aaae | a6a22e397eb9ce16b6466d9740cff4ea661cd530 | /src/main/java/com/vcc/recipe/util/RSAUtil.java | c4edbe199925cf0ed22f799d08f602eadbd3ad5c | [
"MIT"
] | permissive | vcc1235/recipe | 2e2a0f901eeb51ef433e5241ac06eb39c9c9b1ae | a739e93b85cd126047fedc972e4a78e9385adbdb | refs/heads/master | 2022-06-21T13:11:59.884491 | 2019-09-09T11:03:11 | 2019-09-09T11:03:11 | 207,289,069 | 0 | 0 | MIT | 2022-06-17T02:26:51 | 2019-09-09T11:01:56 | Java | UTF-8 | Java | false | false | 13,625 | java | package com.vcc.recipe.util;
import org.apache.commons.codec.binary.Base64;
import java.io.ByteArrayOutputStream;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.Signature;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.HashMap;
import java.util.Map;
import javax.crypto.Cipher;
/** */
/**
* <p>
* RSA公钥/私钥/签名工具包
* </p>
* <p>
* 罗纳德·李维斯特(Ron [R]ivest)、阿迪·萨莫尔(Adi [S]hamir)和伦纳德·阿德曼(Leonard [A]dleman)
* </p>
* <p>
* 字符串格式的密钥在未在特殊说明情况下都为BASE64编码格式<br/>
* 由于非对称加密速度极其缓慢,一般文件不使用它来加密而是使用对称加密,<br/>
* 非对称加密算法可以用来对对称加密的密钥加密,这样保证密钥的安全也就保证了数据的安全
* </p>
*
* @author monkey
* @date 2018-10-29
*/
public class RSAUtil {
/** */
/**
* 加密算法RSA
*/
public static final String KEY_ALGORITHM = "RSA";
/** */
/**
* 签名算法
*/
public static final String SIGNATURE_ALGORITHM = "MD5withRSA";
/** */
/**
* 获取公钥的key
*/
private static final String PUBLIC_KEY = "RSAPublicKey";
/** */
/**
* 获取私钥的key
*/
private static final String PRIVATE_KEY = "RSAPrivateKey";
/** */
/**
* RSA最大加密明文大小
*/
private static final int MAX_ENCRYPT_BLOCK = 117;
/** */
/**
* RSA最大解密密文大小
*/
private static final int MAX_DECRYPT_BLOCK = 128;
/** */
/**
* RSA 位数 如果采用2048 上面最大加密和最大解密则须填写: 245 256
*/
private static final int INITIALIZE_LENGTH = 1024;
/** */
/**
* <p>
* 生成密钥对(公钥和私钥)
* </p>
*
* @return
* @throws Exception
*/
public static Map<String, Object> genKeyPair() throws Exception {
KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance( KEY_ALGORITHM );
keyPairGen.initialize( INITIALIZE_LENGTH );
KeyPair keyPair = keyPairGen.generateKeyPair();
RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
Map<String, Object> keyMap = new HashMap<String, Object>( 2 );
keyMap.put( PUBLIC_KEY, publicKey );
keyMap.put( PRIVATE_KEY, privateKey );
return keyMap;
}
/** */
/**
* <p>
* 用私钥对信息生成数字签名
* </p>
*
* @param data 已加密数据
* @param privateKey 私钥(BASE64编码)
* @return
* @throws Exception
*/
public static String sign(byte[] data, String privateKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64( privateKey );
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec( keyBytes );
KeyFactory keyFactory = KeyFactory.getInstance( KEY_ALGORITHM );
PrivateKey privateK = keyFactory.generatePrivate( pkcs8KeySpec );
Signature signature = Signature.getInstance( SIGNATURE_ALGORITHM );
signature.initSign( privateK );
signature.update( data );
return Base64.encodeBase64String( signature.sign() );
}
/** */
/**
* <p>
* 校验数字签名
* </p>
*
* @param data 已加密数据
* @param publicKey 公钥(BASE64编码)
* @param sign 数字签名
* @return
* @throws Exception
*/
public static boolean verify(byte[] data, String publicKey, String sign) throws Exception {
byte[] keyBytes = Base64.decodeBase64( publicKey );
X509EncodedKeySpec keySpec = new X509EncodedKeySpec( keyBytes );
KeyFactory keyFactory = KeyFactory.getInstance( KEY_ALGORITHM );
PublicKey publicK = keyFactory.generatePublic( keySpec );
Signature signature = Signature.getInstance( SIGNATURE_ALGORITHM );
signature.initVerify( publicK );
signature.update( data );
return signature.verify( Base64.decodeBase64( sign ) );
}
/** */
/**
* <P>
* 私钥解密
* </p>
*
* @param encryptedData 已加密数据
* @param privateKey 私钥(BASE64编码)
* @return
* @throws Exception
*/
public static byte[] decryptByPrivateKey(byte[] encryptedData, String privateKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64( privateKey );
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec( keyBytes );
KeyFactory keyFactory = KeyFactory.getInstance( KEY_ALGORITHM );
Key privateK = keyFactory.generatePrivate( pkcs8KeySpec );
Cipher cipher = Cipher.getInstance( keyFactory.getAlgorithm() );
cipher.init( Cipher.DECRYPT_MODE, privateK );
int inputLen = encryptedData.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段解密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_DECRYPT_BLOCK) {
cache = cipher.doFinal( encryptedData, offSet, MAX_DECRYPT_BLOCK );
} else {
cache = cipher.doFinal( encryptedData, offSet, inputLen - offSet );
}
out.write( cache, 0, cache.length );
i++;
offSet = i * MAX_DECRYPT_BLOCK;
}
byte[] decryptedData = out.toByteArray();
out.close();
return decryptedData;
}
/** */
/**
* <p>
* 公钥解密
* </p>
*
* @param encryptedData 已加密数据
* @param publicKey 公钥(BASE64编码)
* @return
* @throws Exception
*/
public static byte[] decryptByPublicKey(byte[] encryptedData, String publicKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64( publicKey );
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec( keyBytes );
KeyFactory keyFactory = KeyFactory.getInstance( KEY_ALGORITHM );
Key publicK = keyFactory.generatePublic( x509KeySpec );
Cipher cipher = Cipher.getInstance( keyFactory.getAlgorithm() );
cipher.init( Cipher.DECRYPT_MODE, publicK );
int inputLen = encryptedData.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段解密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_DECRYPT_BLOCK) {
cache = cipher.doFinal( encryptedData, offSet, MAX_DECRYPT_BLOCK );
} else {
cache = cipher.doFinal( encryptedData, offSet, inputLen - offSet );
}
out.write( cache, 0, cache.length );
i++;
offSet = i * MAX_DECRYPT_BLOCK;
}
byte[] decryptedData = out.toByteArray();
out.close();
return decryptedData;
}
/** */
/**
* <p>
* 公钥加密
* </p>
*
* @param data 源数据
* @param publicKey 公钥(BASE64编码)
* @return
* @throws Exception
*/
public static byte[] encryptByPublicKey(byte[] data, String publicKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64( publicKey );
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec( keyBytes );
KeyFactory keyFactory = KeyFactory.getInstance( KEY_ALGORITHM );
Key publicK = keyFactory.generatePublic( x509KeySpec );
// 对数据加密
Cipher cipher = Cipher.getInstance( keyFactory.getAlgorithm() );
cipher.init( Cipher.ENCRYPT_MODE, publicK );
int inputLen = data.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段加密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {
cache = cipher.doFinal( data, offSet, MAX_ENCRYPT_BLOCK );
} else {
cache = cipher.doFinal( data, offSet, inputLen - offSet );
}
out.write( cache, 0, cache.length );
i++;
offSet = i * MAX_ENCRYPT_BLOCK;
}
byte[] encryptedData = out.toByteArray();
out.close();
return encryptedData;
}
/** */
/**
* <p>
* 私钥加密
* </p>
*
* @param data 源数据
* @param privateKey 私钥(BASE64编码)
* @return
* @throws Exception
*/
public static byte[] encryptByPrivateKey(byte[] data, String privateKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64( privateKey );
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec( keyBytes );
KeyFactory keyFactory = KeyFactory.getInstance( KEY_ALGORITHM );
Key privateK = keyFactory.generatePrivate( pkcs8KeySpec );
Cipher cipher = Cipher.getInstance( keyFactory.getAlgorithm() );
cipher.init( Cipher.ENCRYPT_MODE, privateK );
int inputLen = data.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段加密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {
cache = cipher.doFinal( data, offSet, MAX_ENCRYPT_BLOCK );
} else {
cache = cipher.doFinal( data, offSet, inputLen - offSet );
}
out.write( cache, 0, cache.length );
i++;
offSet = i * MAX_ENCRYPT_BLOCK;
}
byte[] encryptedData = out.toByteArray();
out.close();
return encryptedData;
}
/** */
/**
* <p>
* 获取私钥
* </p>
*
* @param keyMap 密钥对
* @return
* @throws Exception
*/
public static String getPrivateKey(Map<String, Object> keyMap) throws Exception {
Key key = (Key) keyMap.get( PRIVATE_KEY );
return Base64.encodeBase64String( key.getEncoded() );
}
/** */
/**
* <p>
* 获取公钥
* </p>
*
* @param keyMap 密钥对
* @return
* @throws Exception
*/
public static String getPublicKey(Map<String, Object> keyMap) throws Exception {
Key key = (Key) keyMap.get( PUBLIC_KEY );
return Base64.encodeBase64String( key.getEncoded() );
}
/**
* java端公钥加密
*/
public static String encryptedDataOnJava(String data, String PUBLICKEY) {
try {
data = Base64.encodeBase64String( encryptByPublicKey( data.getBytes(), PUBLICKEY ) );
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return data;
}
/**
* java端私钥解密
*/
public static String decryptDataOnJava(String data, String PRIVATEKEY) {
String temp = "";
try {
byte[] rs = Base64.decodeBase64( data );
temp = new String( RSAUtil.decryptByPrivateKey( rs, PRIVATEKEY ), "UTF-8" );
} catch (Exception e) {
e.printStackTrace();
}
return temp;
}
public static void main(String[] args) throws Exception {
Map<String, Object> genKeyPair = genKeyPair();
long l = System.currentTimeMillis();
System.out.println("开始时间=="+l);
for (int i=0;i<10;i++){
test1( genKeyPair );
test2( genKeyPair );
}
long l1 = System.currentTimeMillis();
System.out.println("用时 == "+(l1-l));
}
public static void test2(Map<String,Object> getKeyPair){
try {
String publicKey = getPublicKey( getKeyPair );
String privateKey = getPrivateKey( getKeyPair );
byte[] bytes = "heloodsaf".getBytes();
byte[] encryptByPublicKey = encryptByPublicKey( bytes, publicKey );
// System.out.println(new String( encryptByPublicKey ));
byte[] decryptByPrivateKey = decryptByPrivateKey( encryptByPublicKey,privateKey );
// System.out.println(new String( decryptByPrivateKey ));
}catch (Exception exception){
}
}
public static void test1(Map<String,Object> genKeyPair){
try {
String publicKey = getPublicKey( genKeyPair );
String privateKey = getPrivateKey( genKeyPair );
byte[] bytes = "heloodsaf".getBytes();
byte[] encryptByPrivateKey = encryptByPrivateKey( bytes, privateKey );
String sign = sign( encryptByPrivateKey, privateKey );
// System.out.println(new String( encryptByPrivateKey ));
// System.out.println(sign);
if (verify( encryptByPrivateKey,publicKey,sign )){
byte[] decryptByPublicKey = decryptByPublicKey( encryptByPrivateKey, publicKey );
// System.out.println(new String( decryptByPublicKey ));
}
}catch (Exception exption){
}
}
}
| [
"1041497818@qq.com"
] | 1041497818@qq.com |
1d062cebdb2bda4512af9c65afe66c92aca2028d | 370072f25dd5a214efceb79c66dfe4f45c31e1e7 | /PharosMiddleware/src/pharoslabut/demo/mrpatrol2/logAnalyzer/ComputeWaypointIdleAndWaitTime.java | fa846402fdae5cf908f535218afd589bc640321e | [] | no_license | mahyuddin/pharostesbed | e953208ad7884d7f4b56498455a8756e9e183bf0 | 46cebffb630ad510ddac86b76b474aad74b27412 | refs/heads/master | 2021-01-10T07:48:39.383057 | 2012-09-21T01:49:30 | 2012-09-21T01:49:30 | 47,845,303 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,378 | java | package pharoslabut.demo.mrpatrol2.logAnalyzer;
import java.io.File;
import java.io.FilenameFilter;
import java.text.DecimalFormat;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
//import pharoslabut.logger.FileLogger;
import pharoslabut.logger.Logger;
import pharoslabut.logger.analyzer.PathEdge;
import pharoslabut.navigate.Location;
import pharoslabut.util.Stats;
public class ComputeWaypointIdleAndWaitTime {
DecimalFormat df = new DecimalFormat("#.###");
/**
*
* @param args An array of experiment directories to analyze.
*/
public ComputeWaypointIdleAndWaitTime(String[] args) {
// Get all of the robot logs from the experiment.
FilenameFilter logFileFilter = new FilenameFilter() {
public boolean accept(File dir, String name) {
return !name.startsWith(".") && name.contains("-MRPatrol2_") && name.contains(".log");
}
};
Vector<Result> idleResults = new Vector<Result>();
Vector<Result> waitResults = new Vector<Result>();
for (int d = 0; d < args.length; d++) {
Logger.logDbg("Analyzing experiment " + args[d]);
File dir = new File("./" + args[d] + "/");
String prefix = null;
String[] logFiles = dir.list(logFileFilter);
if (logFiles == null) {
System.err.println("No files found.");
System.exit(1);
} else {
Vector<RobotExpData> robots = new Vector<RobotExpData>();
for (int i=0; i<logFiles.length; i++) {
String robotFileName = "./" + args[d] + "/" + logFiles[i];
Logger.logDbg("Reading robot log " + robotFileName);
robots.add(new RobotExpData(robotFileName));
if (prefix == null) {
String[] tokens = logFiles[i].split("[_-]");
prefix = tokens[0] + "_" + tokens[1];
}
}
Result resultIdle = analyzeIdleTime(robots);
Result resultWait = analyzeWaitTime(robots);
resultIdle.expName = prefix;
resultWait.expName = prefix;
idleResults.add(resultIdle);
waitResults.add(resultWait);
}
}
System.out.println("\nIdle time results:");
System.out.println("Experiment, Average (s), 95% Conf., Min., Max.");
Enumeration<Result> e = idleResults.elements();
while (e.hasMoreElements()) {
Result r = e.nextElement();
System.out.println(r.toString());
}
System.out.println("\nWait time results:");
System.out.println("Experiment, Average (s), 95% Conf., Min., Max.");
e = waitResults.elements();
while (e.hasMoreElements()) {
Result r = e.nextElement();
System.out.println(r.toString());
}
}
private Result analyzeIdleTime(Vector<RobotExpData> robots) {
// This hashtable maps the waypoint name to the times it was visited.
Hashtable<String, Vector<Long>> data = new Hashtable<String, Vector<Long>>();
/*
* For each robot, go through each edge it traversed within the patrol route
* (i.e., disregard the edges to and from the patrol route). Record
* the time the robot reached the waypoint at the end of the edge. Store
* these timestamps in a hashtable that maps the waypoint's name to the
* times it was visited.
*/
for (int i= 0; i < robots.size(); i++) {
RobotExpData currRobot = robots.get(i);
Vector<PathEdge> edges = currRobot.getPathEdges();
// do not consider the first and last edges since those are going to and from the patrol route.
for (int j = 1; j < edges.size() - 1; j++) {
PathEdge currEdge = edges.get(j);
if (currEdge.getStartTime() > currRobot.getPatrolStartTime()) {
Location endLocation = currEdge.getEndLocation();
String waypointName = currRobot.getWaypointName(endLocation);
if (!data.containsKey(waypointName))
data.put(waypointName, new Vector<Long>());
Vector<Long> timestamps = data.get(waypointName);
timestamps.add(currEdge.getEndTime());
}
}
}
/*
* This stores all of the waypoint idle times among all waypoints and
* all robots.
*/
Vector<Double> allData = new Vector<Double>();
StringBuffer sb = new StringBuffer("Waypoint, Average Idle Time (s), 95% Conf.");
/*
* For each waypoint, sort the times it was visited and compute
* the amount of time between visits. Calculate the average, max, and min
* of these time intervals.
*/
Enumeration<String> keys = data.keys();
while (keys.hasMoreElements()) {
String currWayPoint = keys.nextElement();
Vector<Long> visitTimes = data.get(currWayPoint);
Collections.sort(visitTimes);
StringBuffer wpVisitTimeString = new StringBuffer("Details of waypoint \"" + currWayPoint + "\" idle times:");
wpVisitTimeString.append("\n\tArrival #, Arrival times (ms), Delta (ms)");
for (int i=0; i < visitTimes.size(); i++) {
if (i == 0)
wpVisitTimeString.append("\n\t" + (i+1) + ", " + visitTimes.get(i));
else
wpVisitTimeString.append("\n\t" + (i+1) + ", " + visitTimes.get(i) + ", " + (visitTimes.get(i) - visitTimes.get(i-1)));
}
System.out.println(wpVisitTimeString);
Vector<Double> result = new Vector<Double>();
for (int i=1; i < visitTimes.size(); i++) {
long delta = visitTimes.get(i) - visitTimes.get(i-1);
result.add(delta / 1000.0); // convert to seconds
allData.add(delta / 1000.0); // convert to seconds
}
sb.append("\n" + currWayPoint + ", " + df.format(Stats.getAvg(result)) + ", " + df.format(Stats.getConf95(result)));
}
Collections.sort(allData);
Result result = new Result(Stats.getAvg(allData), Stats.getConf95(allData), allData.get(0), allData.get(allData.size() - 1));
sb.append("\n\nOverall Average Idle Time (s), " + df.format(result.avg)
+ ", " + df.format(result.conf95));
sb.append("\nOverall Max Idle Time (s), " + result.max);
sb.append("\nOverall Min Idle Time (s), " + result.min);
//FileLogger floggerIdle = new FileLogger(prefix + "-Idle_Times.txt", false);
//floggerIdle.log(sb.toString());
System.out.println("\n" + sb.toString());
return result;
}
class WaypointWaitDetails implements Comparable<WaypointWaitDetails> {
String robotName;
long arrivalTime, leaveTime; // in milliseconds
public WaypointWaitDetails(String robotName, long arrivalTime, long leaveTime) {
this.robotName = robotName;
this.arrivalTime = arrivalTime;
this.leaveTime = leaveTime;
}
/**
*
* @return The wait time in seconds.
*/
public double getWaitTime() {
return (leaveTime - arrivalTime) / 1000.0;
}
@Override
public int compareTo(WaypointWaitDetails d) {
if (d.arrivalTime > arrivalTime)
return -1;
else if (d.arrivalTime == arrivalTime)
return 0;
else
return 1;
}
public String toString() {
return robotName + ", " + arrivalTime + ", " + leaveTime + ", " + getWaitTime();
}
}
private Result analyzeWaitTime(Vector<RobotExpData> robots) {
// This hashtable maps the waypoint name to the times robots waited at it.
Hashtable<String, Vector<WaypointWaitDetails>> data = new Hashtable<String, Vector<WaypointWaitDetails>>();
for (int i= 0; i < robots.size(); i++) {
RobotExpData currRobot = robots.get(i);
Vector<PathEdge> edges = currRobot.getPathEdges();
// do not consider the first edge since those are going to and from the patrol route.
for (int j = 2; j < edges.size(); j++) {
PathEdge currEdge = edges.get(j);
PathEdge prevEdge = edges.get(j-1);
if (currEdge.getStartTime() > currRobot.getPatrolStartTime()) {
Location waypointLoc = prevEdge.getEndLocation();
String waypointName = currRobot.getWaypointName(waypointLoc);
if (!data.containsKey(waypointName))
data.put(waypointName, new Vector<WaypointWaitDetails>());
Vector<WaypointWaitDetails> waitTimes = data.get(waypointName);
waitTimes.add(new WaypointWaitDetails(currRobot.getRobotName(), prevEdge.getEndTime(), currEdge.getStartTime()));
}
}
}
Vector<Double> allData = new Vector<Double>();
StringBuffer sb = new StringBuffer("Waypoint, Avg. Wait Time (s), 95% Conf.");
// sort each waypoint's visit time
Enumeration<String> keys = data.keys();
while (keys.hasMoreElements()) {
String currWayPoint = keys.nextElement();
Vector<WaypointWaitDetails> waitTimeDetails = data.get(currWayPoint);
Collections.sort(waitTimeDetails);
Vector<Double> waitTimes = new Vector<Double>();
// Print details for debugging.
StringBuffer detailString = new StringBuffer("\nDetails of waypoint \"" + currWayPoint + "\" wait times:");
detailString.append("\n\tVisit #, Robot, Arrival Time (ms), Leave Time (ms), Wait Time (s)");
for (int i = 0; i < waitTimeDetails.size(); i++) {
WaypointWaitDetails currDetails = waitTimeDetails.get(i);
detailString.append("\n\t" + (i+1) + ", " + currDetails);
}
System.out.println(detailString.toString());
for (int i = 0; i < waitTimeDetails.size(); i++) {
double waitTime = waitTimeDetails.get(i).getWaitTime();
allData.add(waitTime);
waitTimes.add(waitTime);
}
sb.append("\n" + currWayPoint + ", " + df.format(Stats.getAvg(waitTimes)) + ", " + df.format(Stats.getConf95(waitTimes)));
}
Collections.sort(allData);
Result result = new Result(Stats.getAvg(allData), Stats.getConf95(allData), allData.get(0), allData.get(allData.size() - 1));
sb.append("\n\nOverall Avg. Wait Time (s), " + df.format(result.avg) + ", " + df.format(result.conf95));
sb.append("\nOverall Max Wait Time (s), " + df.format(result.max));
sb.append("\nOverall Min Wait Time (s), " + df.format(result.min));
//FileLogger floggerWait = new FileLogger(prefix + "-Wait_Times.txt", false);
//floggerWait.log(sb.toString());
System.out.println("\n" + sb.toString());
return result;
}
private class Result {
String expName;
double avg, conf95, min, max;
public Result(double avg, double conf95, double min, double max) {
this.avg = avg;
this.conf95 = conf95;
this.min = min;
this.max = max;
}
public String toString() {
return expName + ", " + df.format(avg) + ", " + df.format(conf95) + ", " + df.format(min) + ", " + df.format(max);
}
}
public static final void main(String[] args) {
System.setProperty ("PharosMiddleware.debug", "true");
new ComputeWaypointIdleAndWaitTime(args);
}
}
| [
"chien-liang@53a56b47-fd32-4597-bdd3-0ed485b86959"
] | chien-liang@53a56b47-fd32-4597-bdd3-0ed485b86959 |
08220b2b87264c748c21af85a0e23a37b65e5282 | 7a21ff93edba001bef328a1e927699104bc046e5 | /project-third-parent/server-parent/meterread-client2/src/main/java/com/dotop/smartwater/project/third/server/meterread/client2/rest/service/LogController.java | d247c1bfd769dc509beaf3e190c7788f13cd1ce3 | [] | no_license | 150719873/zhdt | 6ea1ca94b83e6db2012080f53060d4abaeaf12f5 | c755dacdd76b71fd14aba5e475a5862a8d92c1f6 | refs/heads/master | 2022-12-16T06:59:28.373153 | 2020-09-14T06:57:16 | 2020-09-14T06:57:16 | 299,157,259 | 1 | 0 | null | 2020-09-28T01:45:10 | 2020-09-28T01:45:10 | null | UTF-8 | Java | false | false | 2,148 | java | package com.dotop.smartwater.project.third.server.meterread.client2.rest.service;
import com.dotop.smartwater.dependence.core.common.BaseController;
import com.dotop.smartwater.dependence.core.common.BaseForm;
import com.dotop.smartwater.dependence.core.global.GlobalContext;
import com.dotop.smartwater.dependence.core.log.LogMsg;
import com.dotop.smartwater.project.module.core.water.constants.ResultCode;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
/**
* 日志读取
*
*
*/
@Deprecated
//@RestController()
//@RequestMapping("/log")
public class LogController implements BaseController<BaseForm> {
private final static Logger LOGGER = LogManager.getLogger(LogController.class);
@Value("${param.config.logLine:100}")
private int LOG_LINE;
@PostMapping(value = "/show", produces = GlobalContext.PRODUCES)
public String show() {
try {
FileInputStream inputStream = new FileInputStream("logs/sysout.log");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
Stream<String> lines = bufferedReader.lines();
List<String> logs = new ArrayList<>();
String str = null;
while ((str = bufferedReader.readLine()) != null) {
logs.add(str);
}
inputStream.close();
bufferedReader.close();
// 获取最后100条
if (logs.size() > LOG_LINE) {
logs.subList(0, logs.size() - LOG_LINE).clear();
}
return resp(ResultCode.Success, ResultCode.SUCCESS, logs);
} catch (IOException e) {
LOGGER.error(LogMsg.to(e));
return resp(ResultCode.Fail, "日志读取失败,请稍后再试", null);
}
}
}
| [
"2216502193@qq.com"
] | 2216502193@qq.com |
15f8e7520b364a51081b1718aceded9d779aac54 | b6ddb5657c78bf5e53de2f7a809bb7385c201f84 | /dev/src/main/java/com/kenai/redminenb/query/RedmineQueryPanel.java | 2640d49d6e22d5e1d529a3e1aff45be0212dbb1b | [
"Apache-2.0"
] | permissive | h7io/redminenb | 7e2b670f8b99aaafd2be59157d0b64109dafe01b | 6c2a7d79587022e20a7695b083a7e132afeccaad | refs/heads/master | 2021-06-01T03:41:26.290456 | 2015-06-18T00:57:17 | 2015-06-18T00:59:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 61,208 | java | /*
* This class has been copied from [bugzilla]/org.netbeans.modules.bugzilla.query.QueryPanel
* @author Tomas Stupka, Jan Stola
*
* Copyright 2010 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*
* Contributor(s):
*
* Portions Copyrighted 2008 Sun Microsystems, Inc.
*/
package com.kenai.redminenb.query;
import com.kenai.redminenb.ui.Defaults;
import com.kenai.redminenb.util.BusyPanel;
import com.kenai.redminenb.util.ExpandablePanel;
import com.kenai.redminenb.util.FullSizeLayout;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.text.NumberFormat;
import javax.swing.AbstractListModel;
import javax.swing.BorderFactory;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
import javax.swing.ListCellRenderer;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import com.kenai.redminenb.util.LinkButton;
import java.awt.FlowLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Box;
import javax.swing.JLayeredPane;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import org.openide.awt.Mnemonics;
import org.openide.util.NbBundle;
/**
* Redmine Query Panel.
*
* @author Anchialas <anchialas@gmail.com>
*/
public class RedmineQueryPanel extends JPanel implements FocusListener {
private static final long serialVersionUID = 8364291628284121318L;
//
final ExpandablePanel byText;
final ExpandablePanel byDetails;
//
private final Color defaultTextColor;
private final ActionListener clearActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
switch (e.getActionCommand()) {
case "tracker":
trackerList.clearSelection();
break;
case "category":
categoryList.clearSelection();
break;
case "version":
versionList.clearSelection();
break;
case "status":
statusList.clearSelection();
break;
case "priority":
priorityList.clearSelection();
break;
case "assignee":
assigneeList.clearSelection();
break;
case "watcher":
watcherList.clearSelection();
break;
case "project":
projectList.clearSelection();
break;
}
}
};
public RedmineQueryPanel(JComponent tableComponent, RedmineQueryController controller) {
super();
initComponents();
Font f = new JLabel().getFont();
int s = f.getSize();
nameLabel.setFont(nameLabel.getFont().deriveFont(s * 1.7f));
defaultTextColor = noContentLabel.getForeground();
tablePanel.add(tableComponent);
byTextContainer.add(byTextPanel);
byDetailsContainer.add(byDetailsPanel);
byText = new ExpandablePanel(byTextLabel, byTextContainer);
byDetails = new ExpandablePanel(byDetailsLabel, byDetailsContainer);
byText.expand();
byDetails.expand();
tableFieldsPanel.setVisible(false);
saveChangesButton.setVisible(false);
cancelChangesButton.setVisible(false);
refreshCheckBox.setVisible(false);
noContentPanel.setVisible(false);
refreshCheckBox.setOpaque(false);
ListCellRenderer parameterValueLCR = new Defaults.ParameterValueLCR();
trackerList.setCellRenderer(parameterValueLCR);
trackerClear.addActionListener(clearActionListener);
categoryList.setCellRenderer(parameterValueLCR);
categoryClear.addActionListener(clearActionListener);
versionList.setCellRenderer(parameterValueLCR);
versionClear.addActionListener(clearActionListener);
statusList.setCellRenderer(parameterValueLCR);
statusClear.addActionListener(clearActionListener);
priorityList.setCellRenderer(new Defaults.PriorityLCR());
priorityClear.addActionListener(clearActionListener);
assigneeList.setCellRenderer(new Defaults.RepositoryUserLCR());
assigneeClear.addActionListener(clearActionListener);
watcherList.setCellRenderer(new Defaults.RepositoryUserLCR());
watcherClear.addActionListener(clearActionListener);
projectList.setCellRenderer(new Defaults.ProjectLCR());
// redmine API fails to query multiple projects
projectList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
projectClear.addActionListener(clearActionListener);
setFocusListener(this);
ListSelectionListener lsl = new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
if(! e.getValueIsAdjusting()) {
JList list = (JList) e.getSource();
boolean noneSelected = false;
boolean otherSelected = false;
for(Object o: list.getSelectedValues()) {
if(o instanceof ParameterValue) {
if(ParameterValue.NONE_PARAMETERVALUE.equals(o)) {
noneSelected = true;
continue;
}
}
otherSelected = true;
}
if(noneSelected && otherSelected) {
list.setSelectedIndex(0);
}
}
}
};
categoryList.addListSelectionListener(lsl);
priorityList.addListSelectionListener(lsl);
trackerList.addListSelectionListener(lsl);
statusList.addListSelectionListener(lsl);
versionList.addListSelectionListener(lsl);
assigneeList.addListSelectionListener(lsl);
validate();
repaint();
}
private void setFocusListener(FocusListener f) {
cancelChangesButton.addFocusListener(f);
categoryList.addFocusListener(f);
priorityList.addFocusListener(f);
trackerList.addFocusListener(f);
statusList.addFocusListener(f);
versionList.addFocusListener(f);
assigneeList.addFocusListener(f);
gotoIssueButton.addFocusListener(f);
modifyButton.addFocusListener(f);
refreshCheckBox.addFocusListener(f);
removeButton.addFocusListener(f);
saveButton.addFocusListener(f);
saveChangesButton.addFocusListener(f);
searchButton.addFocusListener(f);
refreshButton.addFocusListener(f);
webButton.addFocusListener(f);
issueIdTextField.addFocusListener(f);
queryTextField.addFocusListener(f);
tablePanel.addFocusListener(f);
tableSummaryLabel.addFocusListener(f);
refreshConfigurationButton.addFocusListener(this);
}
void setQueryRunning(boolean running) {
modifyButton.setEnabled(!running);
removeButton.setEnabled(!running);
refreshButton.setEnabled(!running);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
GridBagConstraints gridBagConstraints;
trackerClear = new LinkButton();
statusClear = new LinkButton();
priorityClear = new LinkButton();
assigneeClear = new LinkButton();
categoryClear = new LinkButton();
versionClear = new LinkButton();
filler1 = new Box.Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(0, 0));
watcherClear = new LinkButton();
projectClear = new LinkButton();
byTextPanel = new JPanel();
qSubjectCheckBox = new JCheckBox();
qDescriptionCheckBox = new JCheckBox();
innerPanel = new JPanel();
tableFieldsPanel = new JPanel();
tableHeaderPanel = new JPanel();
criteriaPanel = new JPanel();
issueIdTextField = new JFormattedTextField(NumberFormat.getIntegerInstance());
separatorLabel2 = new JLabel();
separatorLabel1 = new JLabel();
topButtonPanel = new JPanel();
jLabel5 = new JLabel();
jLabel6 = new JLabel();
queryHeaderPanel = new JPanel();
lastRefreshLabel = new JLabel();
noContentPanel = new JPanel();
noContentLabel = new JLabel();
byDetailsPanel.setBackground(UIManager.getDefaults().getColor("TextArea.background"));
byDetailsPanel.setLayout(new GridBagLayout());
versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | Font.BOLD, versionLabel.getFont().getSize()-2));
versionLabel.setLabelFor(versionList);
Mnemonics.setLocalizedText(versionLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.versionLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 6;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(5, 5, 2, 5);
byDetailsPanel.add(versionLabel, gridBagConstraints);
jScrollPane2.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane2.setMinimumSize(new Dimension(100, 120));
jScrollPane2.setPreferredSize(new Dimension(100, 120));
versionList.setModel(new AbstractListModel() {
String[] strings = { "" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
versionList.setVisibleRowCount(6);
jScrollPane2.setViewportView(versionList);
versionList.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.versionList.AccessibleContext.accessibleDescription")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 6;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(0, 5, 0, 5);
byDetailsPanel.add(jScrollPane2, gridBagConstraints);
statusLabel.setFont(statusLabel.getFont().deriveFont(statusLabel.getFont().getStyle() | Font.BOLD, statusLabel.getFont().getSize()-2));
statusLabel.setLabelFor(statusList);
Mnemonics.setLocalizedText(statusLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.statusLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(5, 5, 2, 5);
byDetailsPanel.add(statusLabel, gridBagConstraints);
jScrollPane3.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane3.setMinimumSize(new Dimension(100, 120));
jScrollPane3.setPreferredSize(new Dimension(100, 120));
statusList.setModel(new AbstractListModel() {
String[] strings = { "" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
statusList.setVisibleRowCount(6);
jScrollPane3.setViewportView(statusList);
statusList.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.statusList.AccessibleContext.accessibleDescription")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(0, 5, 0, 5);
byDetailsPanel.add(jScrollPane3, gridBagConstraints);
priorityLabel.setFont(priorityLabel.getFont().deriveFont(priorityLabel.getFont().getStyle() | Font.BOLD, priorityLabel.getFont().getSize()-2));
priorityLabel.setLabelFor(priorityList);
Mnemonics.setLocalizedText(priorityLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.priorityLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(5, 5, 2, 5);
byDetailsPanel.add(priorityLabel, gridBagConstraints);
jScrollPane4.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane4.setMinimumSize(new Dimension(100, 120));
jScrollPane4.setPreferredSize(new Dimension(100, 120));
priorityList.setModel(new AbstractListModel() {
String[] strings = { "" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
priorityList.setVisibleRowCount(6);
jScrollPane4.setViewportView(priorityList);
priorityList.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.priorityList.AccessibleContext.accessibleDescription")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(0, 5, 0, 5);
byDetailsPanel.add(jScrollPane4, gridBagConstraints);
categoryLabel.setFont(categoryLabel.getFont().deriveFont(categoryLabel.getFont().getStyle() | Font.BOLD, categoryLabel.getFont().getSize()-2));
categoryLabel.setLabelFor(categoryList);
Mnemonics.setLocalizedText(categoryLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.categoryLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(5, 5, 2, 5);
byDetailsPanel.add(categoryLabel, gridBagConstraints);
jScrollPane6.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane6.setMinimumSize(new Dimension(100, 120));
jScrollPane6.setPreferredSize(new Dimension(100, 120));
categoryList.setModel(new AbstractListModel() {
String[] strings = { "" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
categoryList.setVisibleRowCount(6);
jScrollPane6.setViewportView(categoryList);
categoryList.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.componentList.AccessibleContext.accessibleDescription")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(0, 5, 0, 5);
byDetailsPanel.add(jScrollPane6, gridBagConstraints);
trackerLabel.setFont(trackerLabel.getFont().deriveFont(trackerLabel.getFont().getStyle() | Font.BOLD, trackerLabel.getFont().getSize()-2));
trackerLabel.setLabelFor(trackerList);
Mnemonics.setLocalizedText(trackerLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.trackerLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(5, 5, 2, 5);
byDetailsPanel.add(trackerLabel, gridBagConstraints);
issueTypeScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
issueTypeScrollPane.setMinimumSize(new Dimension(100, 120));
issueTypeScrollPane.setName(""); // NOI18N
issueTypeScrollPane.setPreferredSize(new Dimension(100, 120));
trackerList.setModel(new AbstractListModel() {
String[] strings = { "" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
trackerList.setVisibleRowCount(6);
issueTypeScrollPane.setViewportView(trackerList);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(0, 5, 0, 5);
byDetailsPanel.add(issueTypeScrollPane, gridBagConstraints);
assigneeLabel.setFont(assigneeLabel.getFont().deriveFont(assigneeLabel.getFont().getStyle() | Font.BOLD, assigneeLabel.getFont().getSize()-2));
assigneeLabel.setLabelFor(assigneeList);
Mnemonics.setLocalizedText(assigneeLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.assigneeLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 4;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(5, 5, 2, 5);
byDetailsPanel.add(assigneeLabel, gridBagConstraints);
assigneeScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
assigneeScrollPane.setMinimumSize(new Dimension(100, 120));
assigneeScrollPane.setPreferredSize(new Dimension(100, 120));
assigneeList.setModel(new AbstractListModel() {
String[] strings = { "" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
assigneeList.setVisibleRowCount(6);
assigneeScrollPane.setViewportView(assigneeList);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 4;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(0, 5, 0, 5);
byDetailsPanel.add(assigneeScrollPane, gridBagConstraints);
trackerClear.setBorder(null);
Mnemonics.setLocalizedText(trackerClear, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.trackerClear.text")); // NOI18N
trackerClear.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.trackerClear.actionCommand")); // NOI18N
trackerClear.setFont(trackerClear.getFont().deriveFont(trackerClear.getFont().getStyle() & ~Font.BOLD, trackerClear.getFont().getSize()-2));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(2, 5, 5, 5);
byDetailsPanel.add(trackerClear, gridBagConstraints);
statusClear.setBorder(null);
Mnemonics.setLocalizedText(statusClear, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.statusClear.text")); // NOI18N
statusClear.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.statusClear.actionCommand")); // NOI18N
statusClear.setFont(statusClear.getFont().deriveFont(statusClear.getFont().getStyle() & ~Font.BOLD, statusClear.getFont().getSize()-2));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(2, 5, 5, 5);
byDetailsPanel.add(statusClear, gridBagConstraints);
priorityClear.setBorder(null);
Mnemonics.setLocalizedText(priorityClear, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.priorityClear.text")); // NOI18N
priorityClear.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.priorityClear.actionCommand")); // NOI18N
priorityClear.setFont(priorityClear.getFont().deriveFont(priorityClear.getFont().getStyle() & ~Font.BOLD, priorityClear.getFont().getSize()-2));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(2, 5, 5, 5);
byDetailsPanel.add(priorityClear, gridBagConstraints);
assigneeClear.setBorder(null);
Mnemonics.setLocalizedText(assigneeClear, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.assigneeClear.text")); // NOI18N
assigneeClear.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.assigneeClear.actionCommand")); // NOI18N
assigneeClear.setFont(assigneeClear.getFont().deriveFont(assigneeClear.getFont().getStyle() & ~Font.BOLD, assigneeClear.getFont().getSize()-2));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 4;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(2, 5, 5, 5);
byDetailsPanel.add(assigneeClear, gridBagConstraints);
categoryClear.setBorder(null);
Mnemonics.setLocalizedText(categoryClear, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.categoryClear.text")); // NOI18N
categoryClear.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.categoryClear.actionCommand")); // NOI18N
categoryClear.setFont(categoryClear.getFont().deriveFont(categoryClear.getFont().getStyle() & ~Font.BOLD, categoryClear.getFont().getSize()-2));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(2, 5, 5, 5);
byDetailsPanel.add(categoryClear, gridBagConstraints);
versionClear.setBorder(null);
Mnemonics.setLocalizedText(versionClear, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.versionClear.text")); // NOI18N
versionClear.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.versionClear.actionCommand")); // NOI18N
versionClear.setFont(versionClear.getFont().deriveFont(versionClear.getFont().getStyle() & ~Font.BOLD, versionClear.getFont().getSize()-2));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 6;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(2, 5, 5, 5);
byDetailsPanel.add(versionClear, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 9;
gridBagConstraints.gridy = 1;
gridBagConstraints.weightx = 1.0;
byDetailsPanel.add(filler1, gridBagConstraints);
jScrollPane5.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane5.setMinimumSize(new Dimension(100, 120));
jScrollPane5.setPreferredSize(new Dimension(100, 120));
watcherList.setModel(new AbstractListModel() {
String[] strings = { "" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
watcherList.setVisibleRowCount(6);
jScrollPane5.setViewportView(watcherList);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 8;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(0, 5, 0, 5);
byDetailsPanel.add(jScrollPane5, gridBagConstraints);
watcherLabel.setFont(watcherLabel.getFont().deriveFont(watcherLabel.getFont().getStyle() | Font.BOLD, watcherLabel.getFont().getSize()-2));
watcherLabel.setLabelFor(watcherList);
Mnemonics.setLocalizedText(watcherLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.watcherLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 8;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(5, 5, 2, 5);
byDetailsPanel.add(watcherLabel, gridBagConstraints);
watcherClear.setBorder(null);
Mnemonics.setLocalizedText(watcherClear, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.watcherClear.text")); // NOI18N
watcherClear.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.watcherClear.actionCommand")); // NOI18N
watcherClear.setFont(watcherClear.getFont().deriveFont(watcherClear.getFont().getStyle() & ~Font.BOLD, watcherClear.getFont().getSize()-2));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 8;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(2, 5, 5, 5);
byDetailsPanel.add(watcherClear, gridBagConstraints);
jScrollPane7.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane7.setMinimumSize(new Dimension(100, 120));
jScrollPane7.setPreferredSize(new Dimension(100, 120));
projectList.setModel(new AbstractListModel() {
String[] strings = { "" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
projectList.setVisibleRowCount(6);
jScrollPane7.setViewportView(projectList);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(0, 5, 0, 5);
byDetailsPanel.add(jScrollPane7, gridBagConstraints);
projectLabel.setFont(projectLabel.getFont().deriveFont(projectLabel.getFont().getStyle() | Font.BOLD, projectLabel.getFont().getSize()-2));
projectLabel.setLabelFor(watcherList);
Mnemonics.setLocalizedText(projectLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.projectLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(5, 5, 2, 5);
byDetailsPanel.add(projectLabel, gridBagConstraints);
projectClear.setBorder(null);
Mnemonics.setLocalizedText(projectClear, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.projectClear.text")); // NOI18N
projectClear.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.projectClear.actionCommand")); // NOI18N
projectClear.setFont(projectClear.getFont().deriveFont(projectClear.getFont().getStyle() & ~Font.BOLD, projectClear.getFont().getSize()-2));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(2, 5, 5, 5);
byDetailsPanel.add(projectClear, gridBagConstraints);
byTextPanel.setBackground(UIManager.getDefaults().getColor("TextArea.background"));
byTextPanel.setLayout(new GridBagLayout());
queryLabel.setFont(queryLabel.getFont().deriveFont(queryLabel.getFont().getStyle() | Font.BOLD, queryLabel.getFont().getSize()-2));
queryLabel.setLabelFor(queryTextField);
Mnemonics.setLocalizedText(queryLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.queryLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(12, 12, 12, 5);
byTextPanel.add(queryLabel, gridBagConstraints);
queryTextField.setColumns(30);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new Insets(12, 5, 12, 5);
byTextPanel.add(queryTextField, gridBagConstraints);
queryTextField.getAccessibleContext().setAccessibleName(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.summaryTextField.AccessibleContext.accessibleName")); // NOI18N
queryTextField.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.summaryTextField.AccessibleContext.accessibleDescription")); // NOI18N
qSubjectCheckBox.setSelected(true);
Mnemonics.setLocalizedText(qSubjectCheckBox, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.qSubjectCheckBox.text")); // NOI18N
qSubjectCheckBox.setOpaque(false);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(12, 5, 12, 5);
byTextPanel.add(qSubjectCheckBox, gridBagConstraints);
Mnemonics.setLocalizedText(qDescriptionCheckBox, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.qDescriptionCheckBox.text")); // NOI18N
qDescriptionCheckBox.setOpaque(false);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(12, 5, 12, 12);
byTextPanel.add(qDescriptionCheckBox, gridBagConstraints);
setLayout(new BorderLayout());
tableFieldsPanel.setBackground(UIManager.getDefaults().getColor("EditorPane.background"));
tableFieldsPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 5));
tableFieldsPanel.setOpaque(false);
tableFieldsPanel.setLayout(new BorderLayout());
tableHeaderPanel.setBackground(UIManager.getDefaults().getColor("EditorPane.background"));
tableHeaderPanel.setOpaque(false);
tableHeaderPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
tableSummaryLabel.setFont(tableSummaryLabel.getFont().deriveFont(tableSummaryLabel.getFont().getStyle() | Font.BOLD, tableSummaryLabel.getFont().getSize()-2));
tableSummaryLabel.setIcon(new ImageIcon(getClass().getResource("/com/kenai/redminenb/resources/redmine.png"))); // NOI18N
Mnemonics.setLocalizedText(tableSummaryLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.tableSummaryLabel.text")); // NOI18N
tableHeaderPanel.add(tableSummaryLabel);
tableFieldsPanel.add(tableHeaderPanel, BorderLayout.NORTH);
tablePanel.setBackground(new Color(224, 224, 224));
tablePanel.setBorder(BorderFactory.createEtchedBorder());
tablePanel.setMinimumSize(new Dimension(100, 350));
tablePanel.setLayout(new BorderLayout());
tableFieldsPanel.add(tablePanel, BorderLayout.CENTER);
searchPanel.setBackground(UIManager.getDefaults().getColor("EditorPane.background"));
searchPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
searchPanel.setOpaque(false);
criteriaPanel.setBorder(BorderFactory.createLineBorder(UIManager.getDefaults().getColor("Button.shadow")));
criteriaPanel.setLayout(new GridBagLayout());
byTextLabel.setFont(byTextLabel.getFont().deriveFont(byTextLabel.getFont().getStyle() | Font.BOLD));
Mnemonics.setLocalizedText(byTextLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.byTextLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
criteriaPanel.add(byTextLabel, gridBagConstraints);
byTextLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.byTextLabel.AccessibleContext.accessibleName")); // NOI18N
byTextContainer.setLayout(new BorderLayout());
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(0, 1, 0, 1);
criteriaPanel.add(byTextContainer, gridBagConstraints);
byDetailsLabel.setFont(byDetailsLabel.getFont().deriveFont(byDetailsLabel.getFont().getStyle() | Font.BOLD));
Mnemonics.setLocalizedText(byDetailsLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.byDetailsLabel.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
criteriaPanel.add(byDetailsLabel, gridBagConstraints);
byDetailsContainer.setLayout(new BorderLayout());
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.BASELINE_LEADING;
gridBagConstraints.insets = new Insets(0, 1, 1, 1);
criteriaPanel.add(byDetailsContainer, gridBagConstraints);
Mnemonics.setLocalizedText(cancelChangesButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.cancelChangesButton.text")); // NOI18N
Mnemonics.setLocalizedText(saveChangesButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.saveChangesButton.text")); // NOI18N
saveChangesButton.setSelected(true);
gotoPanel.setBackground(new Color(224, 224, 224));
gotoPanel.setOpaque(false);
gotoPanel.setLayout(new GridBagLayout());
Mnemonics.setLocalizedText(gotoIssueButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.gotoIssueButton.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(5, 5, 5, 5);
gotoPanel.add(gotoIssueButton, gridBagConstraints);
gotoIssueButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.gotoIssueButton.AccessibleContext.accessibleDescription")); // NOI18N
issueIdTextField.setHorizontalAlignment(JTextField.RIGHT);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.ipadx = 64;
gridBagConstraints.anchor = GridBagConstraints.WEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new Insets(5, 5, 5, 5);
gotoPanel.add(issueIdTextField, gridBagConstraints);
Mnemonics.setLocalizedText(searchButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.searchButton.text")); // NOI18N
searchButton.setSelected(true);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new Insets(5, 0, 5, 5);
gotoPanel.add(searchButton, gridBagConstraints);
searchButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.searchButton.AccessibleContext.accessibleDescription")); // NOI18N
Mnemonics.setLocalizedText(separatorLabel2, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.separatorLabel2.text")); // NOI18N
separatorLabel2.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 0;
gridBagConstraints.ipady = 20;
gotoPanel.add(separatorLabel2, gridBagConstraints);
Mnemonics.setLocalizedText(separatorLabel1, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.separatorLabel1.text")); // NOI18N
separatorLabel1.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 0;
gridBagConstraints.ipady = 20;
gotoPanel.add(separatorLabel1, gridBagConstraints);
saveButton.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
Mnemonics.setLocalizedText(saveButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.saveButton.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 4;
gridBagConstraints.gridy = 0;
gotoPanel.add(saveButton, gridBagConstraints);
saveButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.saveButton.AccessibleContext.accessibleDescription")); // NOI18N
webButton.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
Mnemonics.setLocalizedText(webButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.webButton.text")); // NOI18N
webButton.setActionCommand(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.webButton.actionCommand")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 6;
gridBagConstraints.gridy = 0;
gotoPanel.add(webButton, gridBagConstraints);
webButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.webButton.AccessibleContext.accessibleDescription")); // NOI18N
refreshConfigurationButton.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
Mnemonics.setLocalizedText(refreshConfigurationButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.refreshConfigurationButton.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 8;
gridBagConstraints.gridy = 0;
gotoPanel.add(refreshConfigurationButton, gridBagConstraints);
refreshConfigurationButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.refreshConfigurationButton.AccessibleContext.accessibleDescription")); // NOI18N
GroupLayout searchPanelLayout = new GroupLayout(searchPanel);
searchPanel.setLayout(searchPanelLayout);
searchPanelLayout.setHorizontalGroup(searchPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(gotoPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(searchPanelLayout.createSequentialGroup()
.addComponent(saveChangesButton)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cancelChangesButton)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(criteriaPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
searchPanelLayout.setVerticalGroup(searchPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(searchPanelLayout.createSequentialGroup()
.addComponent(gotoPanel, GroupLayout.PREFERRED_SIZE, 31, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(criteriaPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(searchPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(saveChangesButton)
.addComponent(cancelChangesButton))
.addGap(0, 0, 0))
);
cancelChangesButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.cancelChangesButton.AccessibleContext.accessibleDescription")); // NOI18N
saveChangesButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.saveChangesButton.AccessibleContext.accessibleDescription")); // NOI18N
topButtonPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
topButtonPanel.setOpaque(false);
topButtonPanel.setLayout(new GridBagLayout());
modifyButton.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
Mnemonics.setLocalizedText(modifyButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.modifyButton.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
topButtonPanel.add(modifyButton, gridBagConstraints);
modifyButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.modifyButton.AccessibleContext.accessibleDescription")); // NOI18N
removeButton.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
Mnemonics.setLocalizedText(removeButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.removeButton.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 4;
gridBagConstraints.gridy = 0;
topButtonPanel.add(removeButton, gridBagConstraints);
removeButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.removeButton.AccessibleContext.accessibleDescription")); // NOI18N
Mnemonics.setLocalizedText(jLabel5, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.jLabel5.text")); // NOI18N
jLabel5.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.ipady = 20;
topButtonPanel.add(jLabel5, gridBagConstraints);
refreshButton.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
Mnemonics.setLocalizedText(refreshButton, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.refreshButton.text")); // NOI18N
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
topButtonPanel.add(refreshButton, gridBagConstraints);
refreshButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.seenButton.AccessibleContext.accessibleDescription")); // NOI18N
Mnemonics.setLocalizedText(jLabel6, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.jLabel6.text")); // NOI18N
jLabel6.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 0;
gridBagConstraints.ipady = 20;
topButtonPanel.add(jLabel6, gridBagConstraints);
queryHeaderPanel.setBackground(UIManager.getDefaults().getColor("EditorPane.background"));
queryHeaderPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5));
queryHeaderPanel.setOpaque(false);
Mnemonics.setLocalizedText(lastRefreshLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.lastRefreshLabel.text")); // NOI18N
Mnemonics.setLocalizedText(lastRefreshDateLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.lastRefreshDateLabel.text")); // NOI18N
Mnemonics.setLocalizedText(nameLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.nameLabel.text")); // NOI18N
Mnemonics.setLocalizedText(refreshCheckBox, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.refreshCheckBox.text")); // NOI18N
refreshCheckBox.setOpaque(false);
GroupLayout queryHeaderPanelLayout = new GroupLayout(queryHeaderPanel);
queryHeaderPanel.setLayout(queryHeaderPanelLayout);
queryHeaderPanelLayout.setHorizontalGroup(queryHeaderPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(queryHeaderPanelLayout.createSequentialGroup()
.addGap(0, 0, 0)
.addComponent(nameLabel)
.addGap(18, 18, Short.MAX_VALUE)
.addComponent(refreshCheckBox)
.addGap(18, 18, 18)
.addComponent(lastRefreshLabel)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lastRefreshDateLabel)
.addGap(0, 0, 0))
);
queryHeaderPanelLayout.setVerticalGroup(queryHeaderPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(nameLabel)
.addGroup(queryHeaderPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(lastRefreshDateLabel)
.addComponent(lastRefreshLabel)
.addComponent(refreshCheckBox))
);
refreshCheckBox.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.refreshCheckBox.AccessibleContext.accessibleDescription")); // NOI18N
noContentPanel.setBackground(UIManager.getDefaults().getColor("EditorPane.background"));
noContentPanel.setOpaque(false);
noContentPanel.setLayout(new GridBagLayout());
Mnemonics.setLocalizedText(noContentLabel, NbBundle.getMessage(RedmineQueryPanel.class, "RedmineQueryPanel.noContentLabel.text")); // NOI18N
noContentPanel.add(noContentLabel, new GridBagConstraints());
GroupLayout innerPanelLayout = new GroupLayout(innerPanel);
innerPanel.setLayout(innerPanelLayout);
innerPanelLayout.setHorizontalGroup(innerPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(innerPanelLayout.createSequentialGroup()
.addGap(0, 0, 0)
.addGroup(innerPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(queryHeaderPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(searchPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(tableFieldsPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(innerPanelLayout.createSequentialGroup()
.addComponent(topButtonPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(noContentPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(0, 0, 0))
);
innerPanelLayout.setVerticalGroup(innerPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(innerPanelLayout.createSequentialGroup()
.addGap(0, 0, 0)
.addComponent(queryHeaderPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(topButtonPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(searchPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tableFieldsPanel, GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(noContentPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
add(innerPanel, BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
LinkButton assigneeClear;
final JLabel assigneeLabel = new JLabel();
final JList assigneeList = new JList();
final JScrollPane assigneeScrollPane = new HackedScrollPane();
final JPanel byDetailsContainer = new JPanel();
final JLabel byDetailsLabel = new JLabel();
final JPanel byDetailsPanel = new JPanel();
final JPanel byTextContainer = new JPanel();
final JLabel byTextLabel = new JLabel();
JPanel byTextPanel;
final JButton cancelChangesButton = new JButton();
LinkButton categoryClear;
final JLabel categoryLabel = new JLabel();
final JList categoryList = new JList();
JPanel criteriaPanel;
Box.Filler filler1;
final JButton gotoIssueButton = new JButton();
final JPanel gotoPanel = new JPanel();
JPanel innerPanel;
JFormattedTextField issueIdTextField;
final JScrollPane issueTypeScrollPane = new HackedScrollPane();
JLabel jLabel5;
JLabel jLabel6;
final JScrollPane jScrollPane2 = new HackedScrollPane();
final JScrollPane jScrollPane3 = new HackedScrollPane();
final JScrollPane jScrollPane4 = new HackedScrollPane();
final JScrollPane jScrollPane5 = new HackedScrollPane();
final JScrollPane jScrollPane6 = new HackedScrollPane();
final JScrollPane jScrollPane7 = new HackedScrollPane();
final JLabel lastRefreshDateLabel = new JLabel();
JLabel lastRefreshLabel;
public final LinkButton modifyButton = new LinkButton();
final JLabel nameLabel = new JLabel();
JLabel noContentLabel;
JPanel noContentPanel;
LinkButton priorityClear;
final JLabel priorityLabel = new JLabel();
final JList priorityList = new JList();
LinkButton projectClear;
final JLabel projectLabel = new JLabel();
final JList projectList = new JList();
JCheckBox qDescriptionCheckBox;
JCheckBox qSubjectCheckBox;
JPanel queryHeaderPanel;
final JLabel queryLabel = new JLabel();
final JTextField queryTextField = new JTextField();
final LinkButton refreshButton = new LinkButton();
final JCheckBox refreshCheckBox = new JCheckBox();
final LinkButton refreshConfigurationButton = new LinkButton();
public final LinkButton removeButton = new LinkButton();
final LinkButton saveButton = new LinkButton();
final JButton saveChangesButton = new JButton();
final JButton searchButton = new JButton();
final JPanel searchPanel = new JPanel();
JLabel separatorLabel1;
JLabel separatorLabel2;
LinkButton statusClear;
final JLabel statusLabel = new JLabel();
final JList statusList = new JList();
JPanel tableFieldsPanel;
JPanel tableHeaderPanel;
final JPanel tablePanel = new JPanel();
final JLabel tableSummaryLabel = new JLabel();
JPanel topButtonPanel;
LinkButton trackerClear;
final JLabel trackerLabel = new JLabel();
final JList trackerList = new JList();
LinkButton versionClear;
final JLabel versionLabel = new JLabel();
final JList versionList = new JList();
LinkButton watcherClear;
final JLabel watcherLabel = new JLabel();
final JList watcherList = new JList();
final LinkButton webButton = new LinkButton();
// End of variables declaration//GEN-END:variables
/**
* enables/disables all but the parameter fields
*
* @param enable
*/
void enableFields(boolean enable) {
queryLabel.setEnabled(enable);
categoryLabel.setEnabled(enable);
versionLabel.setEnabled(enable);
statusLabel.setEnabled(enable);
priorityLabel.setEnabled(enable);
trackerLabel.setEnabled(enable);
assigneeLabel.setEnabled(enable);
searchButton.setEnabled(enable);
saveButton.setEnabled(enable);
saveChangesButton.setEnabled(enable);
webButton.setEnabled(enable);
refreshConfigurationButton.setEnabled(enable);
refreshCheckBox.setEnabled(enable);
modifyButton.setEnabled(enable);
refreshButton.setEnabled(enable);
removeButton.setEnabled(enable);
}
void switchQueryFields(boolean showAdvanced) {
byDetails.setVisible(showAdvanced);
byText.setVisible(showAdvanced);
}
void showError(String text) {
noContentPanel.setVisible(true);
tableSummaryLabel.setVisible(false);
tableFieldsPanel.setVisible(false);
if (text != null) {
noContentLabel.setForeground(Defaults.COLOR_ERROR);
noContentLabel.setText(text);
}
}
void showSearchingProgress(boolean on, String text) {
noContentPanel.setVisible(on);
tableSummaryLabel.setVisible(!on);
tableFieldsPanel.setVisible(!on);
if (on && text != null) {
noContentLabel.setForeground(defaultTextColor);
noContentLabel.setText(text);
}
}
void showRetrievingProgress(boolean on, String text, boolean searchPanelVisible) {
noContentPanel.setVisible(on);
noContentLabel.setForeground(Color.red);
if (searchPanelVisible) {
searchPanel.setVisible(!on);
}
if (on && text != null) {
noContentLabel.setForeground(defaultTextColor);
noContentLabel.setText(text);
}
}
void showNoContentPanel(boolean on) {
showSearchingProgress(on, null);
}
void setModifyVisible(boolean b) {
searchPanel.setVisible(b);
cancelChangesButton.setVisible(b);
saveChangesButton.setVisible(b);
topButtonPanel.setVisible(!b);
saveButton.setVisible(!b);
webButton.setVisible(!b);
separatorLabel1.setVisible(!b);
separatorLabel2.setVisible(!b);
}
void setTitle(String name) {
nameLabel.setText(name);
}
void setLastRefresh(String lastRefresh) {
lastRefreshDateLabel.setText(lastRefresh);
}
@Override
public void focusGained(FocusEvent e) {
Component c = e.getComponent();
if (c instanceof JComponent) {
Point p = SwingUtilities.convertPoint(c.getParent(), c.getLocation(), RedmineQueryPanel.this);
final Rectangle r = new Rectangle(p, c.getSize());
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
RedmineQueryPanel.this.scrollRectToVisible(r);
}
});
}
}
@Override
public void focusLost(FocusEvent e) {
// do nothing
}
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(Defaults.paintGradient((Graphics2D)g, getWidth(), getHeight()));
}
static class HackedScrollPane extends JScrollPane {
@Override
public Dimension getPreferredSize() {
setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
Dimension dim = super.getPreferredSize();
setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
return dim;
}
}
}
| [
"mblaesing@doppel-helix.eu"
] | mblaesing@doppel-helix.eu |
efbaa65beafee1a8fbfb5aaa9d22dc1e3bca85de | 09ffad4c41819210de5f337bade47bbad8e537bb | /BikeShare_V5/app/src/main/java/com/example/bikeshare/RideDao.java | bcf41884ae33b8dec86a59c5452ae5ee1b531d41 | [] | no_license | Jepp0103/Mobile_App_Development_BikeShare_Project | 70be7cdfbb8eb57336285d45c7e41d38bbcc859c | 48be27703138ab97bfa3eefe6e603dd0d1022e42 | refs/heads/main | 2023-01-10T05:12:57.840644 | 2020-11-19T14:50:03 | 2020-11-19T14:50:03 | 314,276,814 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 656 | java | package com.example.bikeshare;
import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.*;
import java.util.*;
@Dao
public interface RideDao {
@Insert
void insert(Ride ride);
@Query("UPDATE ride_table SET mEndRide=:endRide WHERE name =:bikeName")
// @Update
void update(String endRide, String bikeName);
@Delete
void delete(Ride ride);
@Query("DELETE FROM ride_table")
void deleteAll();
@Query("SELECT * FROM ride_table " +
"ORDER BY id")
LiveData<List<Ride>> getAllRides();
// @Query("SELECT * FROM ride_table " +
// "WHERE name LIKE :bikeName LIMIT 1")
}
| [
"jeppendyekjaer@hotmail.com"
] | jeppendyekjaer@hotmail.com |
8972c173cfa8fab496847e8cf273b856b49f6360 | 1f90232eeaa8193a9a7a1c6af64bcb8cf270cb89 | /app/src/main/java/com/example/flipkartpage/MainActivity.java | 8390067dadbf212e2a2c044c6c2499deaddaec7a | [] | no_license | gowthamashok/Flipkartpage | 298f5e58d925937be5244370c00f5fd2b7bbdc33 | 8b1156325c0006db5f20e41f58444c30bd65be62 | refs/heads/master | 2020-07-02T07:28:31.279265 | 2019-08-09T11:54:05 | 2019-08-09T11:54:05 | 201,457,351 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,386 | java | package com.example.flipkartpage;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
public class MainActivity extends AppCompatActivity {
LinearLayout all_category01;
LinearLayout mobiles01;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setAll_category();
mobile_in_hori_view();
view_mobile();
offer_zone();
view_off_zone01();
view_fas01();
fas_in_hori_view01();
ele_in_hori_view01();
view_eleo01();
}
public void view_mobile()
{
Button mobil_view1 = (Button)findViewById(R.id.mobil_view);
mobil_view1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,Mobiles.class);
startActivity(intent);
}
});
}
public void mobile_in_hori_view()
{
mobiles01 = (LinearLayout)findViewById(R.id.mobiles);
mobiles01.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,Mobiles.class);
startActivity(intent);
}
});
}
public void setAll_category()
{
all_category01 = (LinearLayout)findViewById(R.id.all_category);
all_category01.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,AllCategory.class);
startActivity(intent);
}
});
}
public void offer_zone()
{
LinearLayout off_in_hori01 = (LinearLayout)findViewById(R.id.off_in_hori_view);
off_in_hori01.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,OfferZone.class);
startActivity(intent);
}
});
}
public void view_off_zone01()
{
Button view_off_zone02 = (Button) findViewById(R.id.view_off_zone);
view_off_zone02.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,OfferZone.class);
startActivity(intent);
}
});
}
public void view_fas01()
{
Button view_fas02 = (Button) findViewById(R.id.view_fas);
view_fas02.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,Fashion.class);
startActivity(intent);
}
});
}
public void fas_in_hori_view01()
{
LinearLayout fas_in_hori_view02 = (LinearLayout) findViewById(R.id.fas_in_hori_view);
fas_in_hori_view02.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,Fashion.class);
startActivity(intent);
}
});
}
public void ele_in_hori_view01()
{
LinearLayout ele_in_hori_view02 = (LinearLayout) findViewById(R.id.ele_in_hori_view);
ele_in_hori_view02.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,Electronics.class);
startActivity(intent);
}
});
}
public void view_eleo01()
{
Button view_eleo02 = (Button) findViewById(R.id.view_eleo);
view_eleo02.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,Electronics.class);
startActivity(intent);
}
});
}
}
| [
"gowtahamashok@gmail.com"
] | gowtahamashok@gmail.com |
92b2dfde74ec9c0fa4bae9b92bfb921068c0e8d8 | 4111ef7ede9cad799e0f26f91c2557a82bfdd647 | /src/main/java/io/klinamen/joclray/light/SpotLight.java | 8b85a88e2800da6fe3fa1e01e4028b9da01d3e9a | [
"BSD-3-Clause"
] | permissive | klinamen/jocl-ray | 39a29c92e623259bfeb9736871e656cf66da7384 | ad417e25f2407c0abaec353f9c19066b90068b7b | refs/heads/master | 2023-01-14T01:43:36.706279 | 2020-11-24T02:22:28 | 2020-11-24T02:22:28 | 293,380,029 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,125 | java | package io.klinamen.joclray.light;
import io.klinamen.joclray.util.FloatVec4;
public class SpotLight extends PointLight {
private float angleGrad;
private float fallout = 1;
private FloatVec4 direction;
public float getAngleGrad() {
return angleGrad;
}
public SpotLight setAngleGrad(float angleGrad) {
this.angleGrad = angleGrad;
return this;
}
public FloatVec4 getDirection() {
return direction;
}
public SpotLight setDirection(FloatVec4 direction) {
this.direction = direction;
return this;
}
public float getAngleRad(){
return (float)(angleGrad * Math.PI / 180);
}
@Override
public SpotLight setIntensity(float intensity) {
super.setIntensity(intensity);
return this;
}
@Override
public SpotLight setPosition(FloatVec4 position) {
super.setPosition(position);
return this;
}
public float getFallout() {
return fallout;
}
public SpotLight setFallout(float fallout) {
this.fallout = fallout;
return this;
}
}
| [
"a.montemaggio@gmail.com"
] | a.montemaggio@gmail.com |
a07c75e3198c49571894695831fc2ea27c544486 | 308de2563d42c305c505dc855f6614b7e96d2d6b | /app/src/main/java/developersancho/dagger2app/Car.java | 3deb4a7cacc80c03ff5aa90c35c4b4f28c1b08b9 | [] | no_license | developersancho/Dagger2App | 0d8700ed77d699146818e81eb64dadfaa18252ba | f52912f38c92498e8bfb0c78098b276f097a57f8 | refs/heads/master | 2020-04-10T22:27:07.787210 | 2018-12-11T11:39:56 | 2018-12-11T11:39:56 | 161,325,027 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | package developersancho.dagger2app;
import android.util.Log;
import javax.inject.Inject;
public class Car {
private static final String TAG = "Car";
private Engine engine;
private Wheels wheels;
@Inject
public Car(Engine engine, Wheels wheels) {
this.engine = engine;
this.wheels = wheels;
}
public void drive() {
Log.d(TAG, "driving...");
}
}
| [
"developersancho@gmail.com"
] | developersancho@gmail.com |
914c5b6eeab8ea07d75b6315ad343ee0c2ac42b9 | e71eb2d39d78811a3dddf7ca27e3cbd6aa74ac78 | /src/test/java/io/henriquels25/cloudstream/demo/flightapi/acceptance/AcceptanceTest.java | cc42e76a5023ef9f6b946ac47f29a667a1dbb47e | [] | no_license | techguy0079/spring-cloud-stream-sample | 4ad2e72b70bd790777210c0507a9340c47560106 | 9ad549b6fb44b6b6744c45ea2442423cdfea55fd | refs/heads/main | 2023-02-12T05:58:13.631205 | 2021-01-09T15:21:43 | 2021-01-09T15:21:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 442 | java | package io.henriquels25.cloudstream.demo.flightapi.acceptance;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Tag("acceptance")
@Test
public @interface AcceptanceTest {
}
| [
"henriquels25@gmail.com"
] | henriquels25@gmail.com |
7a10bbbabdc5e1fb8685839fe30438656fe593fa | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE134_Uncontrolled_Format_String/s01/CWE134_Uncontrolled_Format_String__PropertiesFile_format_07.java | 0b0a6b2fa33023993c946f8d22c60c8f2dd168f0 | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 9,384 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE134_Uncontrolled_Format_String__PropertiesFile_format_07.java
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
Template File: sources-sinks-07.tmpl.java
*/
/*
* @description
* CWE: 134 Uncontrolled Format String
* BadSource: PropertiesFile Read data from a .properties file (in property named data)
* GoodSource: A hardcoded string
* Sinks: format
* GoodSink: dynamic formatted stdout with string defined
* BadSink : dynamic formatted stdout without validation
* Flow Variant: 07 Control flow: if(privateFive==5) and if(privateFive!=5)
*
* */
package testcases.CWE134_Uncontrolled_Format_String.s01;
import testcasesupport.*;
import java.util.Properties;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.logging.Level;
public class CWE134_Uncontrolled_Format_String__PropertiesFile_format_07 extends AbstractTestCase
{
/* The variable below is not declared "final", but is never assigned
* any other value so a tool should be able to identify that reads of
* this will always give its initialized value. */
private int privateFive = 5;
public void bad() throws Throwable
{
String data;
if (privateFive==5)
{
data = ""; /* Initialize data */
/* retrieve the property */
{
Properties properties = new Properties();
FileInputStream streamFileInput = null;
try
{
streamFileInput = new FileInputStream("../common/config.properties");
properties.load(streamFileInput);
/* POTENTIAL FLAW: Read data from a .properties file */
data = properties.getProperty("data");
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* Close stream reading object */
try
{
if (streamFileInput != null)
{
streamFileInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO);
}
}
}
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
if (privateFive==5)
{
if (data != null)
{
/* POTENTIAL FLAW: uncontrolled string formatting */
System.out.format(data);
}
}
}
/* goodG2B1() - use goodsource and badsink by changing first privateFive==5 to privateFive!=5 */
private void goodG2B1() throws Throwable
{
String data;
if (privateFive!=5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
else
{
/* FIX: Use a hardcoded string */
data = "foo";
}
if (privateFive==5)
{
if (data != null)
{
/* POTENTIAL FLAW: uncontrolled string formatting */
System.out.format(data);
}
}
}
/* goodG2B2() - use goodsource and badsink by reversing statements in first if */
private void goodG2B2() throws Throwable
{
String data;
if (privateFive==5)
{
/* FIX: Use a hardcoded string */
data = "foo";
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
if (privateFive==5)
{
if (data != null)
{
/* POTENTIAL FLAW: uncontrolled string formatting */
System.out.format(data);
}
}
}
/* goodB2G1() - use badsource and goodsink by changing second privateFive==5 to privateFive!=5 */
private void goodB2G1() throws Throwable
{
String data;
if (privateFive==5)
{
data = ""; /* Initialize data */
/* retrieve the property */
{
Properties properties = new Properties();
FileInputStream streamFileInput = null;
try
{
streamFileInput = new FileInputStream("../common/config.properties");
properties.load(streamFileInput);
/* POTENTIAL FLAW: Read data from a .properties file */
data = properties.getProperty("data");
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* Close stream reading object */
try
{
if (streamFileInput != null)
{
streamFileInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO);
}
}
}
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
if (privateFive!=5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
IO.writeLine("Benign, fixed string");
}
else
{
if (data != null)
{
/* FIX: explicitly defined string formatting */
System.out.format("%s%n", data);
}
}
}
/* goodB2G2() - use badsource and goodsink by reversing statements in second if */
private void goodB2G2() throws Throwable
{
String data;
if (privateFive==5)
{
data = ""; /* Initialize data */
/* retrieve the property */
{
Properties properties = new Properties();
FileInputStream streamFileInput = null;
try
{
streamFileInput = new FileInputStream("../common/config.properties");
properties.load(streamFileInput);
/* POTENTIAL FLAW: Read data from a .properties file */
data = properties.getProperty("data");
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* Close stream reading object */
try
{
if (streamFileInput != null)
{
streamFileInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO);
}
}
}
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
if (privateFive==5)
{
if (data != null)
{
/* FIX: explicitly defined string formatting */
System.out.format("%s%n", data);
}
}
}
public void good() throws Throwable
{
goodG2B1();
goodG2B2();
goodB2G1();
goodB2G2();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"bqcuong2212@gmail.com"
] | bqcuong2212@gmail.com |
28b5a42419c155ca5df781651cddf1ea92623e40 | 7be4ff2b903e3747f42b04f5d7f50113e043aac3 | /1175_Troca_Vetor_I/src/Main.java | a2cf19ef9aa006d3deacf9be7c604fab3eb37e88 | [] | no_license | Gilberto-Vera/uri-iniciante | a95ff1cb459eb3464b6fc8c338940e9a059d6b1d | 89694ba00ed478686e7d445582db17ec7d154278 | refs/heads/master | 2021-04-09T11:24:30.202347 | 2018-12-14T11:28:26 | 2018-12-14T11:28:26 | 125,563,166 | 3 | 0 | null | 2018-09-19T00:14:44 | 2018-03-16T19:51:07 | Java | UTF-8 | Java | false | false | 973 | java |
import java.util.Scanner;
/*
* Desafio: 1175 Troca em Vetor II
* Faça um programa que leia um vetor N[20]. Troque a seguir, o primeiro
* elemento com o último, o segundo elemento com o penúltimo, etc., até trocar
* o 10º com o 11º. Mostre o vetor modificado.
*
* Entrada: A entrada contém 20 valores inteiros, positivos ou negativos.
*
* Saída: Para cada posição do vetor N, escreva "N[i] = Y", onde i é a posição
* do vetor e Y é o valor armazenado naquela posição.
*/
/**
* @author gilberto
* @since 2018-09-18
* @version 0.1
*/
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n[] = new int[20];
for (int i = 19; i >= 0; i--) {
//System.out.println(i);
n[i] = sc.nextInt();
}
for (int i = 0; i < 20; i++) {
System.out.println("N[" + (i) + "] = " + n[i]);
}
}
}
| [
"gilberto.vera@tse.jus.br"
] | gilberto.vera@tse.jus.br |
98ff510722bea5c2ecc415d5a688c42b8b2c0744 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/druid-io--druid/8a08398977899630556ebfe1e4c29379a8a39858/after/LookupDimensionSpec.java | 14d3f1d3b5bc72dda30b1a3293debc7652f41a98 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,524 | java | /*
* Licensed to Metamarkets Group Inc. (Metamarkets) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Metamarkets 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 io.druid.query.dimension;
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.metamx.common.StringUtils;
import io.druid.query.extraction.ExtractionFn;
import io.druid.query.filter.DimFilterUtils;
import io.druid.query.lookup.LookupExtractionFn;
import io.druid.query.lookup.LookupExtractor;
import io.druid.query.lookup.LookupReferencesManager;
import io.druid.segment.DimensionSelector;
import javax.annotation.Nullable;
import java.nio.ByteBuffer;
public class LookupDimensionSpec implements DimensionSpec
{
private static final byte CACHE_TYPE_ID = 0x4;
@JsonProperty
private final String dimension;
@JsonProperty
private final String outputName;
@JsonProperty
private final LookupExtractor lookup;
@JsonProperty
private final boolean retainMissingValue;
@JsonProperty
private final String replaceMissingValueWith;
@JsonProperty
private final String name;
@JsonProperty
private final boolean optimize;
private final LookupReferencesManager lookupReferencesManager;
@JsonCreator
public LookupDimensionSpec(
@JsonProperty("dimension") String dimension,
@JsonProperty("outputName") String outputName,
@JsonProperty("lookup") LookupExtractor lookup,
@JsonProperty("retainMissingValue") boolean retainMissingValue,
@JsonProperty("replaceMissingValueWith") String replaceMissingValueWith,
@JsonProperty("name") String name,
@JacksonInject LookupReferencesManager lookupReferencesManager,
@JsonProperty("optimize") Boolean optimize
)
{
this.retainMissingValue = retainMissingValue;
this.optimize = optimize == null ? true : optimize;
this.replaceMissingValueWith = Strings.emptyToNull(replaceMissingValueWith);
this.dimension = Preconditions.checkNotNull(dimension, "dimension can not be Null");
this.outputName = Preconditions.checkNotNull(outputName, "outputName can not be Null");
this.lookupReferencesManager = lookupReferencesManager;
this.name = name;
this.lookup = lookup;
Preconditions.checkArgument(
Strings.isNullOrEmpty(name) ^ (lookup == null),
"name [%s] and lookup [%s] are mutually exclusive please provide either a name or a lookup", name, lookup
);
if (!Strings.isNullOrEmpty(name)) {
Preconditions.checkNotNull(
this.lookupReferencesManager,
"The system is not configured to allow for lookups, please read about configuring a lookup manager in the docs"
);
}
}
@Override
@JsonProperty
public String getDimension()
{
return dimension;
}
@Override
@JsonProperty
public String getOutputName()
{
return outputName;
}
@JsonProperty
@Nullable
public LookupExtractor getLookup()
{
return lookup;
}
@JsonProperty
@Nullable
public String getName()
{
return name;
}
@Override
public ExtractionFn getExtractionFn()
{
final LookupExtractor lookupExtractor = Strings.isNullOrEmpty(name)
? this.lookup
: Preconditions.checkNotNull(
lookupReferencesManager.get(name),
"Lookup [%s] not found",
name
).get();
return new LookupExtractionFn(
lookupExtractor,
retainMissingValue,
replaceMissingValueWith,
lookupExtractor.isOneToOne(),
optimize
);
}
@Override
public DimensionSelector decorate(DimensionSelector selector)
{
return selector;
}
@Override
public byte[] getCacheKey()
{
byte[] dimensionBytes = StringUtils.toUtf8(dimension);
byte[] dimExtractionFnBytes = Strings.isNullOrEmpty(name)
? getLookup().getCacheKey()
: StringUtils.toUtf8(name);
byte[] outputNameBytes = StringUtils.toUtf8(outputName);
byte[] replaceWithBytes = StringUtils.toUtf8(Strings.nullToEmpty(replaceMissingValueWith));
return ByteBuffer.allocate(6
+ dimensionBytes.length
+ outputNameBytes.length
+ dimExtractionFnBytes.length
+ replaceWithBytes.length)
.put(CACHE_TYPE_ID)
.put(dimensionBytes)
.put(DimFilterUtils.STRING_SEPARATOR)
.put(outputNameBytes)
.put(DimFilterUtils.STRING_SEPARATOR)
.put(dimExtractionFnBytes)
.put(DimFilterUtils.STRING_SEPARATOR)
.put(replaceWithBytes)
.put(DimFilterUtils.STRING_SEPARATOR)
.put(retainMissingValue == true ? (byte) 1 : (byte) 0)
.array();
}
@Override
public boolean preservesOrdering()
{
return getExtractionFn().preservesOrdering();
}
@Override
public boolean equals(Object o)
{
if (this == o) {
return true;
}
if (!(o instanceof LookupDimensionSpec)) {
return false;
}
LookupDimensionSpec that = (LookupDimensionSpec) o;
if (retainMissingValue != that.retainMissingValue) {
return false;
}
if (optimize != that.optimize) {
return false;
}
if (!getDimension().equals(that.getDimension())) {
return false;
}
if (!getOutputName().equals(that.getOutputName())) {
return false;
}
if (getLookup() != null ? !getLookup().equals(that.getLookup()) : that.getLookup() != null) {
return false;
}
if (replaceMissingValueWith != null
? !replaceMissingValueWith.equals(that.replaceMissingValueWith)
: that.replaceMissingValueWith != null) {
return false;
}
return getName() != null ? getName().equals(that.getName()) : that.getName() == null;
}
@Override
public int hashCode()
{
int result = getDimension().hashCode();
result = 31 * result + getOutputName().hashCode();
result = 31 * result + (getLookup() != null ? getLookup().hashCode() : 0);
result = 31 * result + (retainMissingValue ? 1 : 0);
result = 31 * result + (replaceMissingValueWith != null ? replaceMissingValueWith.hashCode() : 0);
result = 31 * result + (getName() != null ? getName().hashCode() : 0);
result = 31 * result + (optimize ? 1 : 0);
return result;
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
0b8ecec6e1c8c5546702d62127a04f1568b3a9ef | 793f78acf9a876c9a2d6d2c98bafb7a37183fce1 | /src/our/battlearena/fighters/Dwarf.java | 0262f8d1e8b462b62c09673ca0278ea50dd7d536 | [] | no_license | JustDman/BattleArena | 33d5594ca3eab31b353c4f433228a76a5be06f97 | e5e35a01ac0bb4ae11c683c75e52d8fca996285f | refs/heads/master | 2021-03-07T23:09:03.651458 | 2020-03-17T13:27:30 | 2020-03-17T13:27:30 | 246,303,007 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 233 | java | package our.battlearena.fighters;
import our.battlearena.specials.DwarfHead;
public class Dwarf extends Character {
public Dwarf(String name) {
super(name, 15, 25, new DwarfHead());
className = "Dwarf";
}
} | [
"dmand6666@gmail.com"
] | dmand6666@gmail.com |
3b0142188c5a9885081b66f2ecba180f3c1eb4c5 | c9f7f8526efe71b5eab638d238abaa0b78f3bf09 | /CampChallenge_java/018.DB操作/DB11/Sec18_11/Update.java | 3ad109c68a55c49f7dd1bd2cff641d44103e63fc | [] | no_license | YOHEY-WADAMI/GEEKJOB_Challenge | 6597c5fa94cb7b78ac5a68e688285d3a3162692e | c4882cf485667da8caddd070496ce9482c87cf08 | refs/heads/master | 2021-05-15T22:08:18.427502 | 2017-12-08T05:45:19 | 2017-12-08T05:45:19 | 106,639,135 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,484 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Sec18_11;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author guest1Day
*/
public class Update extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
Connection con = null;
PreparedStatement ps = null;
try {
request.setCharacterEncoding("UTF-8");
int id = Integer.parseInt(request.getParameter("profilesid"));
String name = request.getParameter("name");
String tel = request.getParameter("tel");
int age = Integer.parseInt(request.getParameter("age"));
String birth = request.getParameter("birthday");
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/challenge_db", "wadami", "password");
ps = con.prepareStatement("UPDATE profiles set name =?,tel =?,age =?,birthday =? WHERE profilesid =?");
ps.setString(1, name);
ps.setString(2, tel);
ps.setInt(3, age);
ps.setString(4, birth);
ps.setInt(5, id);
ps.executeUpdate();
// String record = name +"/" +tel +"/" +age +"/" +birth;
out.println("処理が完了しました。"+"<br>");
// out.println(record);
con.close();
ps.close();
} catch (Exception e) {
out.println("エラーが発生しました。" + e.toString() + "<br>");
} finally {
if (con != null) {
try {
con.close();
out.println("コネクション切断に成功しました。" + "<br><br>");
} catch (Exception e) {
out.println("コネクションはありません。" + "<br><br>");
out.println(e.getMessage());
}
}
}
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
| [
"y.wadami@gmail.com"
] | y.wadami@gmail.com |
23ed11b2ece9b4acf0847da5a6601db36f3d4d63 | 9d57c18e12712f72ebd5250638b97060adf85d85 | /Software/es.unican.moses.sle.db.eer2sql.diagram/src/EER/diagram/edit/parts/EnumerationTypeEditPart.java | a3045c09a54b4e70fa3054c18a84c6f391ef91e8 | [] | no_license | latacita/unicaneer2sql | 793184fbb2ec0cd46be3346688371e7475b32be6 | ee7bdc752d05d7092b1613c788a28ec749ee49c4 | refs/heads/master | 2016-09-08T16:06:47.029233 | 2011-09-06T07:25:47 | 2011-09-06T07:25:47 | 32,793,275 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,834 | java | package EER.diagram.edit.parts;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.RoundedRectangle;
import org.eclipse.draw2d.Shape;
import org.eclipse.draw2d.StackLayout;
import org.eclipse.draw2d.ToolbarLayout;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Display;
import EER.diagram.edit.policies.EERmodelTextSelectionEditPolicy;
import EER.diagram.edit.policies.EnumerationTypeItemSemanticEditPolicy;
import EER.diagram.part.EERmodelVisualIDRegistry;
import EER.diagram.providers.EERmodelElementTypes;
/**
* @generated
*/
public class EnumerationTypeEditPart extends ShapeNodeEditPart {
/**
* @generated
*/
public static final int VISUAL_ID = 2016;
/**
* @generated
*/
protected IFigure contentPane;
/**
* @generated
*/
protected IFigure primaryShape;
/**
* @generated
*/
public EnumerationTypeEditPart(View view) {
super(view);
}
/**
* @generated
*/
protected void createDefaultEditPolicies() {
installEditPolicy(EditPolicyRoles.CREATION_ROLE,
new CreationEditPolicy());
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
new EnumerationTypeItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
/**
* @generated
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
ConstrainedToolbarLayoutEditPolicy lep = new ConstrainedToolbarLayoutEditPolicy() {
protected EditPolicy createChildEditPolicy(EditPart child) {
if (child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE) == null) {
if (child instanceof ITextAwareEditPart) {
return new EERmodelTextSelectionEditPolicy();
}
}
return super.createChildEditPolicy(child);
}
};
return lep;
}
/**
* @generated
*/
protected IFigure createNodeShape() {
return primaryShape = new EnumerationTypeFigure();
}
/**
* @generated
*/
public EnumerationTypeFigure getPrimaryShape() {
return (EnumerationTypeFigure) primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof EnumerationTypeNameEditPart) {
((EnumerationTypeNameEditPart) childEditPart)
.setLabel(getPrimaryShape()
.getFigureEnumerationTypeFigure());
return true;
}
if (childEditPart instanceof EnumerationTypeEnumerationTypeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getFigureEnumeratedValuesFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((EnumerationTypeEnumerationTypeCompartmentEditPart) childEditPart)
.getFigure());
return true;
}
return false;
}
/**
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
if (childEditPart instanceof EnumerationTypeNameEditPart) {
return true;
}
if (childEditPart instanceof EnumerationTypeEnumerationTypeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getFigureEnumeratedValuesFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.remove(((EnumerationTypeEnumerationTypeCompartmentEditPart) childEditPart)
.getFigure());
return true;
}
return false;
}
/**
* @generated
*/
protected void addChildVisual(EditPart childEditPart, int index) {
if (addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
}
/**
* @generated
*/
protected void removeChildVisual(EditPart childEditPart) {
if (removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
}
/**
* @generated
*/
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
if (editPart instanceof EnumerationTypeEnumerationTypeCompartmentEditPart) {
return getPrimaryShape().getFigureEnumeratedValuesFigure();
}
return getContentPane();
}
/**
* @generated
*/
protected NodeFigure createNodePlate() {
DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
/**
* Creates figure for this edit part.
*
* Body of this method does not depend on settings in generation model
* so you may safely remove <i>generated</i> tag and modify it.
*
* @generated
*/
protected NodeFigure createNodeFigure() {
NodeFigure figure = createNodePlate();
figure.setLayoutManager(new StackLayout());
IFigure shape = createNodeShape();
figure.add(shape);
contentPane = setupContentPane(shape);
return figure;
}
/**
* Default implementation treats passed figure as content pane.
* Respects layout one may have set for generated figure.
* @param nodeShape instance of generated figure class
* @generated
*/
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
}
return nodeShape; // use nodeShape itself as contentPane
}
/**
* @generated
*/
public IFigure getContentPane() {
if (contentPane != null) {
return contentPane;
}
return super.getContentPane();
}
/**
* @generated
*/
protected void setForegroundColor(Color color) {
if (primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
/**
* @generated
*/
protected void setBackgroundColor(Color color) {
if (primaryShape != null) {
primaryShape.setBackgroundColor(color);
}
}
/**
* @generated
*/
protected void setLineWidth(int width) {
if (primaryShape instanceof Shape) {
((Shape) primaryShape).setLineWidth(width);
}
}
/**
* @generated
*/
protected void setLineType(int style) {
if (primaryShape instanceof Shape) {
((Shape) primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(EERmodelVisualIDRegistry
.getType(EnumerationTypeNameEditPart.VISUAL_ID));
}
/**
* @generated
*/
public EditPart getTargetEditPart(Request request) {
if (request instanceof CreateViewAndElementRequest) {
CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request)
.getViewAndElementDescriptor()
.getCreateElementRequestAdapter();
IElementType type = (IElementType) adapter
.getAdapter(IElementType.class);
if (type == EERmodelElementTypes.EnumeratedLiteral_3011) {
return getChildBySemanticHint(EERmodelVisualIDRegistry
.getType(EnumerationTypeEnumerationTypeCompartmentEditPart.VISUAL_ID));
}
}
return super.getTargetEditPart(request);
}
/**
* @generated
*/
public class EnumerationTypeFigure extends RoundedRectangle {
/**
* @generated
*/
private WrappingLabel fFigureEnumerationTypeFigure;
/**
* @generated
*/
private RectangleFigure fFigureEnumeratedValuesFigure;
/**
* @generated
*/
public EnumerationTypeFigure() {
ToolbarLayout layoutThis = new ToolbarLayout();
layoutThis.setStretchMinorAxis(true);
layoutThis.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
layoutThis.setSpacing(0);
layoutThis.setVertical(true);
this.setLayoutManager(layoutThis);
this.setCornerDimensions(new Dimension(getMapMode().DPtoLP(8),
getMapMode().DPtoLP(8)));
this.setBackgroundColor(THIS_BACK);
this.setBorder(new MarginBorder(getMapMode().DPtoLP(2),
getMapMode().DPtoLP(2), getMapMode().DPtoLP(2),
getMapMode().DPtoLP(2)));
createContents();
}
/**
* @generated
*/
private void createContents() {
fFigureEnumerationTypeFigure = new WrappingLabel();
fFigureEnumerationTypeFigure.setText("<<...>>");
fFigureEnumerationTypeFigure
.setFont(FFIGUREENUMERATIONTYPEFIGURE_FONT);
this.add(fFigureEnumerationTypeFigure);
fFigureEnumeratedValuesFigure = new RectangleFigure();
fFigureEnumeratedValuesFigure.setOutline(false);
fFigureEnumeratedValuesFigure.setLineWidth(0);
fFigureEnumeratedValuesFigure
.setBackgroundColor(FFIGUREENUMERATEDVALUESFIGURE_BACK);
this.add(fFigureEnumeratedValuesFigure);
fFigureEnumeratedValuesFigure.setLayoutManager(new StackLayout());
}
/**
* @generated
*/
public WrappingLabel getFigureEnumerationTypeFigure() {
return fFigureEnumerationTypeFigure;
}
/**
* @generated
*/
public RectangleFigure getFigureEnumeratedValuesFigure() {
return fFigureEnumeratedValuesFigure;
}
}
/**
* @generated
*/
static final Color THIS_BACK = new Color(null, 255, 250, 160);
/**
* @generated
*/
static final Font FFIGUREENUMERATIONTYPEFIGURE_FONT = new Font(
Display.getCurrent(), Display.getDefault().getSystemFont()
.getFontData()[0].getName(), 9, SWT.ITALIC);
/**
* @generated
*/
static final Color FFIGUREENUMERATEDVALUESFIGURE_BACK = new Color(null,
255, 250, 160);
}
| [
"adof13@3cf175a4-71be-ec21-8e38-539ed72d85be"
] | adof13@3cf175a4-71be-ec21-8e38-539ed72d85be |
cb2b12d5d1a0ae273aac43e109e17c1688d160d3 | 2ee4dc8c25dff3a16202b3660ab63928395b766d | /BridgeDesignPatternDemo/src/mohdtausif/demo/designpattern/bridge/Triangle.java | 17ae1e04c8b0c6f13374b496b1c6429812843273 | [] | no_license | mohdtausif/JavaDesignPatterns | 2c725e680044176ab8a42038b3f1459a188a3ebd | 4a3b231a0358f81a7cb2f22dba241faa079e3a7c | refs/heads/master | 2020-03-18T15:03:19.563121 | 2019-08-02T10:17:50 | 2019-08-02T10:17:50 | 134,884,375 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 320 | java | package mohdtausif.demo.designpattern.bridge;
/**
* Triangle is a implementation of abtract class shape.
*/
public class Triangle extends Shape {
public Triangle(Color color) {
super(color);
}
@Override
public void applyColor() {
System.out.println("Triangle filled with color : ");
color.applyColor();
}
}
| [
"mohd.tausif@power2sme.com"
] | mohd.tausif@power2sme.com |
e10fa62940ddf8d417d4871650dda1393dae7570 | 7aa8c9b6509bb8571a04eef231384758235738ca | /app/src/androidTest/java/com/example/jacob/firstproject/ApplicationTest.java | c30fe39026ea1e278a5b1d8935b5c328e28633bf | [] | no_license | jacoblachapelle/FirstProject | 31907b69b2dbf26ec81c424cc5271f8f117caa5e | 2bdc8ce63585c57b3ffeeac4bb8ab1ca034b4dfc | refs/heads/master | 2021-01-10T10:30:00.306711 | 2016-01-19T18:59:08 | 2016-01-19T18:59:08 | 49,975,667 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 361 | java | package com.example.jacob.firstproject;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | [
"jacob.a.lachapelle@gmail.com"
] | jacob.a.lachapelle@gmail.com |
470795e4987e32c70f5dcd2aadad232fca1b5d72 | 0c05d423ec7bb502c6d0241f3cf3864289623e41 | /TPO_Concurrente_Amarante/src/Tren.java | afdf0cdca41d6cca45d775bfdcead6c5970b3d39 | [] | no_license | carlitox477/TP_Aeropuerto_Concurrente | c0dff64707530c57385ace545c3ff5cd746b526d | 184e20bfa396d5a5dc01f5232de3facde4cd2133 | refs/heads/master | 2020-08-23T13:28:46.454501 | 2019-10-21T17:55:26 | 2019-10-21T17:55:26 | 216,626,971 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,677 | java | import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class Tren implements Runnable{
private static String emoji="\uD83D\uDE86";
private char letraTerminal;//' ' simbolizara el hall central
private int[] pasajerosPorTerminal;
private int asientosOcupados, capacidad;
private Lock guardiaTren;
private Condition esperarHall, esperarEnElTren,avanzarTren;
public Tren (int capacidad) {
this.letraTerminal=' ';
this.pasajerosPorTerminal=new int[3];
this.asientosOcupados=0;
this.capacidad=capacidad;
this.guardiaTren=new ReentrantLock();
this.esperarHall=this.guardiaTren.newCondition();
this.esperarEnElTren=this.guardiaTren.newCondition();
this.avanzarTren=this.guardiaTren.newCondition();
for (int i=0;i<this.pasajerosPorTerminal.length;i++) {
this.pasajerosPorTerminal[i]=0;
}
}
public int getCapacidad() {
return this.capacidad;
}
public String toString() {
return "TREN";
}
public void run() {
while (true) {
this.guardiaTren.lock();
System.out.println("["+emoji+" \uD83C\uDD37 "+this.toString()+"]: Aguarda pasajeros");
if (this.letraTerminal==' ' && this.asientosOcupados!=10) {
this.esperarHall.signalAll();
}
if(this.asientosOcupados!=10) {
try {
this.avanzarTren.await();
} catch (InterruptedException e) {}
}
this.dejarPasajeros();
this.volverAlHall();
}
}
private void volverAlHall() {
System.out.println("["+emoji+" \u2B31 TREN]: vuelve al Hall central");
this.letraTerminal=' ';
}
private void dejarPasajeros() {
this.visitarTerminal('A',"\uD83C\uDD70");
this.visitarTerminal('B',"\uD83C\uDD71");
this.visitarTerminal('C',"\uD83C\uDD72");
}
private void visitarTerminal(char letra, String emojiT) {
System.out.println("["+emoji+" "+emojiT+" TREN]: Ha llegado a la terminal "+letra+" (Se bajan "+this.pasajerosPorTerminal[(int) letra-65]+")");
this.letraTerminal=letra;
this.esperarEnElTren.signalAll();
while(this.pasajerosPorTerminal[(int) letra-65]!=0) {
try {
this.avanzarTren.await();
} catch (InterruptedException e) {}
}
System.out.println("["+emoji+" \u2B8A TREN]: continua su recorrido");
}
public void usarTren(Pasajero pasajero, char terminal) {
this.subirAlTren(pasajero, terminal);
if(this.asientosOcupados==this.capacidad) {
this.avanzarTren.signalAll();
}
while(this.letraTerminal!=terminal) {
try {
this.esperarEnElTren.await();
} catch (InterruptedException e) {}
}
this.bajarDelTren(pasajero, terminal);
}
private void subirAlTren(Pasajero pasajero, char terminal) {
this.guardiaTren.lock();
while(this.asientosOcupados==10 && this.letraTerminal!=' ') {
//si el tren esta ocupados me quedo esperandolo
try {
this.esperarHall.await();
} catch (InterruptedException e) {}
}
this.asientosOcupados++;
System.out.println("["+emoji+" \uD83E\uDC45 "+this.toString()+" RECOGE]: Subió el "+pasajero.toString()+" (Asientos ocupados: "+this.asientosOcupados+")");
//anotamos en que terminal hay que bajarnos
this.pasajerosPorTerminal[(int) terminal - 65]++;
}
private void bajarDelTren(Pasajero pasajero, char terminal) {
//anoto que se bajo alguien en esta terminal
this.pasajerosPorTerminal[(int) terminal - 65]--;
this.asientosOcupados--;
System.out.println("["+emoji+" \uD83E\uDC47"+this.toString()+" BAJA]: El "+pasajero.toString()+": se ha bajado del TREN (Asientos ocupados: "+this.asientosOcupados+")");
//le aviso al tren que ya nos bajamos
this.avanzarTren.signalAll();
this.guardiaTren.unlock();
}
}
| [
"carman_boca@hotmail.com"
] | carman_boca@hotmail.com |
b46cb03f11129464117cbd571e75dd23ef11b5f5 | 479b7dc6ba251f3111c1ff5e9bb20881ab5532ed | /06_zookeeper/src/ZooApp.java | 606ef8f0434d9d0b319a2fae569e0259a4733b40 | [
"MIT"
] | permissive | wgslr/agh-distributed | e993a030dc719ba6da4c32fc1530fc419b252e84 | ce10efbf24af26bde03cbfe051f01e784b1d4222 | refs/heads/master | 2020-04-27T21:24:18.873171 | 2019-06-04T08:09:41 | 2019-06-04T08:09:41 | 174,694,595 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,314 | java | import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooKeeper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class ZooApp {
public static void main(String[] args) throws IOException, InterruptedException,
KeeperException {
String addr;
String[] toSpawn;
if (args.length < 2) {
System.out.println("Expected arguments: <zookeeperhost> <apptolaunch>...");
addr = "localhost:2181";
toSpawn = new String[]{"gnome-calculator"};
} else {
addr = args[0];
toSpawn = Arrays.copyOfRange(args, 1, args.length);
}
ApplicationSupervisor as = new ApplicationSupervisor(addr, toSpawn);
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println(
"Available commands:\nprint - print tree of /z\nquit - exit the app");
while (true) {
String line = br.readLine().trim();
if (line.length() == 0)
continue;
if (line.charAt(0) == 'p') {
as.printSubtree("/z");
} else if (line.charAt(0) == 'q') {
break;
}
}
}
}
| [
"wojciech.geisler@gmail.com"
] | wojciech.geisler@gmail.com |
f7a4f020ecee8cd7a72caa467ef1fa9bd82647c9 | 00d9bac64e97e059840f65393d4aba104fe03b39 | /app/src/main/java/com/example/nameless/autoupdating/common/NetworkUtil.java | 10c6ce0a56189642f553e04a714239c0db78f0cb | [] | no_license | VladislavBryukhanov/AuNea-Mobile-Android_Java-FirebaseSDK | 281175c55d2f4d83046b631a49fc19479000dd19 | 1b7bb991472ac1b7c613fc90aaa4e3b7e47d0cef | refs/heads/master | 2020-03-09T03:26:03.421269 | 2019-05-23T15:54:04 | 2019-05-23T15:54:04 | 128,565,270 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,680 | java | package com.example.nameless.autoupdating.common;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.Query;
import com.google.firebase.database.ValueEventListener;
import java.text.DateFormat;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class NetworkUtil {
public final static String ONLINE_STATUS = "Online";
public final static String OFFLINE_STATUS = "Last seen at";
public final static String AFK_STATUS = "AFK";
private interface callbackAction {
void doAction();
}
private static final NetworkUtil instance = new NetworkUtil();
private static String currentStatus;
private DatabaseReference userRef;
private DateFormat dateFormat;
public static void setNetworkStatus() {
currentStatus = ONLINE_STATUS;
instance.getInstance(instance::setProfileStatus);
}
public static void setAfkStatus() {
currentStatus = MessageFormat.format(AFK_STATUS + ", {0}", instance.getLastSeen());
instance.getInstance(() -> instance.userRef.setValue(currentStatus));
}
public static void setOnlineStatus() {
currentStatus = ONLINE_STATUS;
instance.getInstance(() -> instance.userRef.setValue(currentStatus));
}
public static void setOfflineStatus() {
currentStatus = instance.getLastSeen();
instance.getInstance(() -> instance.userRef.setValue(currentStatus));
}
private String getLastSeen() {
return OFFLINE_STATUS + dateFormat.format(new Date());
}
private void getInstance(callbackAction action) {
if (userRef != null) {
action.doAction();
return;
}
dateFormat = (new SimpleDateFormat(" HH:mm dd MMM", Locale.ENGLISH));
final Query getUser = FirebaseDatabase
.getInstance()
.getReference("Users")
.orderByChild("uid")
.equalTo(FirebaseAuth.getInstance().getUid());
getUser.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for(DataSnapshot data : dataSnapshot.getChildren()) {
userRef = getUser.getRef().child(data.getKey()).child("status");
action.doAction();
}
}
@Override
public void onCancelled(DatabaseError databaseError) {}
});
}
private void setProfileStatus() {
final DatabaseReference connectedRef = FirebaseDatabase
.getInstance()
.getReference(".info/connected");
connectedRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(final DataSnapshot snapshot) {
final String lastSeen = getLastSeen();
boolean connected = snapshot.getValue(Boolean.class);
if (connected) {
userRef.onDisconnect().setValue(lastSeen);
userRef.setValue(currentStatus);
} else { //Вроде как else никогда не отрабатывает
userRef.setValue(lastSeen);
}
}
@Override
public void onCancelled(DatabaseError error) {
}
});
}
}
| [
"gfedcba625@gmail.com"
] | gfedcba625@gmail.com |
674c31aa966749c4601cba10d44ed6fb27d0b40a | 387bb29f1737423f90f0bd1dde8753e110f89ff6 | /js-karma/src/com/intellij/javascript/karma/util/KarmaUtil.java | b2c993203d491ef640e7f58661a996f436f607a2 | [] | no_license | sergeym/intellij-plugins | a6af90f94a6762a7d27ebd625781d9c796033a62 | 908e19c28db06979bbd5fb7bf9c3d107217bd71a | refs/heads/master | 2021-01-16T22:15:13.976305 | 2015-09-27T18:07:26 | 2015-09-27T18:07:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,619 | java | package com.intellij.javascript.karma.util;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.ExecutionResult;
import com.intellij.execution.RunProfileStarter;
import com.intellij.execution.configurations.RunProfileState;
import com.intellij.execution.runners.ExecutionEnvironment;
import com.intellij.execution.runners.RunContentBuilder;
import com.intellij.execution.ui.RunContentDescriptor;
import com.intellij.execution.ui.RunnerLayoutUi;
import com.intellij.javascript.nodejs.CompletionModuleInfo;
import com.intellij.javascript.nodejs.NodeModuleSearchUtil;
import com.intellij.javascript.nodejs.NodePathSettings;
import com.intellij.lang.javascript.JavaScriptFileType;
import com.intellij.lang.javascript.library.JSLibraryUtil;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ProjectFileIndex;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.search.FileTypeIndex;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.psi.search.ProjectScope;
import com.intellij.ui.content.Content;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.text.CharArrayUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.io.LocalFileFinder;
import java.io.File;
import java.util.Collection;
import java.util.List;
public class KarmaUtil {
public static final String NODE_PACKAGE_NAME = "karma";
private static final String[] BEFORE_EXT_PARTS = new String[] {".conf", "-conf"};
private static final String[] EXTENSIONS = {"js", "coffee", "es6", "ts"};
private KarmaUtil() {
}
public static void selectAndFocusIfNotDisposed(@NotNull RunnerLayoutUi ui,
@NotNull Content content,
boolean requestFocus,
boolean forced) {
if (!ui.isDisposed()) {
ui.selectAndFocus(content, requestFocus, forced);
}
}
@NotNull
public static List<VirtualFile> listPossibleConfigFilesInProject(@NotNull Project project) {
GlobalSearchScope contentScope = ProjectScope.getContentScope(project);
GlobalSearchScope scope = contentScope.intersectWith(GlobalSearchScope.notScope(ProjectScope.getLibrariesScope(project)));
List<VirtualFile> result = ContainerUtil.newArrayList();
List<FileType> fileTypes = JavaScriptFileType.getFileTypesCompilableToJavaScript();
for (FileType type : fileTypes) {
Collection<VirtualFile> files = FileTypeIndex.getFiles(type, scope);
for (VirtualFile file : files) {
if (file != null && file.isValid() && !file.isDirectory() && isKarmaConfigFile(file.getNameSequence())) {
if (!JSLibraryUtil.isProbableLibraryFile(file)) {
result.add(file);
}
}
}
}
return result;
}
public static boolean isKarmaConfigFile(@NotNull CharSequence filename) {
int len = filename.length();
int extensionInd = StringUtil.lastIndexOf(filename, '.', 0, len);
if (extensionInd == -1) {
return false;
}
boolean extMatched = false;
for (String ext : EXTENSIONS) {
if (ext.length() == len - extensionInd - 1 && StringUtil.endsWith(filename, ext)) {
extMatched = true;
break;
}
}
if (extMatched) {
for (String beforeExt : BEFORE_EXT_PARTS) {
if (CharArrayUtil.regionMatches(filename, extensionInd - beforeExt.length(), beforeExt)) {
return true;
}
}
}
return false;
}
@Nullable
public static VirtualFile getRequester(@NotNull Project project, @NotNull String configFilePath) {
VirtualFile requester = null;
if (StringUtil.isNotEmpty(configFilePath)) {
File configFile = new File(configFilePath);
if (configFile.isFile()) {
requester = VfsUtil.findFileByIoFile(configFile, false);
}
}
if (requester == null || !requester.isValid()) {
requester = project.getBaseDir();
}
return requester;
}
public static boolean isPathUnderContentRoots(@NotNull Project project, @NotNull String filePath) {
VirtualFile file = LocalFileFinder.findFile(FileUtil.toSystemIndependentName(filePath));
if (file == null || !file.isValid()) {
return false;
}
VirtualFile contentRoot = ProjectFileIndex.SERVICE.getInstance(project).getContentRootForFile(file, false);
return contentRoot != null;
}
@Nullable
public static String detectKarmaPackageDir(@NotNull Project project,
@NotNull String configFilePath,
@NotNull String nodeInterpreterPath) {
List<CompletionModuleInfo> modules = ContainerUtil.newArrayList();
VirtualFile requester = getRequester(project, configFilePath);
NodePathSettings nodeSettings = StringUtil.isEmptyOrSpaces(nodeInterpreterPath) ? null : new NodePathSettings(nodeInterpreterPath);
NodeModuleSearchUtil.findModulesWithName(modules,
NODE_PACKAGE_NAME,
requester,
nodeSettings,
true);
for (CompletionModuleInfo module : modules) {
VirtualFile moduleRoot = module.getVirtualFile();
if (moduleRoot != null && moduleRoot.isValid() && moduleRoot.isDirectory()) {
return FileUtil.toSystemDependentName(moduleRoot.getPath());
}
}
return null;
}
@NotNull
public static RunContentDescriptor createDefaultDescriptor(@NotNull ExecutionResult executionResult,
@NotNull ExecutionEnvironment environment) {
RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, environment);
return contentBuilder.showRunContent(environment.getContentToReuse());
}
@NotNull
public static RunProfileStarter createDefaultRunProfileStarter(@NotNull final ExecutionResult executionResult) {
return new RunProfileStarter() {
@Nullable
@Override
public RunContentDescriptor execute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment)
throws ExecutionException {
return createDefaultDescriptor(executionResult, environment);
}
};
}
}
| [
"sergey.simonchik@jetbrains.com"
] | sergey.simonchik@jetbrains.com |
3468942812da3161bcf670a445c7b2dc0f539b17 | 94ce310c55496055346daaa52e2275584f5043e8 | /src/Gun39/JavaEnum/Ex3/KitapKategori.java | 2b5af1dda11d007123f975fff657eb5bb583900f | [] | no_license | otosun46/JavaKursu | e018d6f6b963414140af6a2ae1a7c98fc6333e56 | 2a2167603a7502db1cb19034fc96a69f8184f564 | refs/heads/master | 2022-12-24T16:36:11.082392 | 2020-10-01T12:47:47 | 2020-10-01T12:47:47 | 300,276,627 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 157 | java | /*
Author:Otosun
Tarih :16/07/2020
*/
package Gun39.JavaEnum.Ex3;
public enum KitapKategori {
KLASIK,
ROMAN,
FANTAZI,
TARIH,
EKONOMI
}
| [
"64793578+otosun46@users.noreply.github.com"
] | 64793578+otosun46@users.noreply.github.com |
67fc236cdcc6190bef5ec087d9bfa0bfcc793429 | f38dca6402d3f2becd34a54bf1173eba0349d6b5 | /src/main/java/solutions/_442/SolutionNew.java | 4d8b62371d9985074583229aacb090e8790c47a5 | [] | no_license | N3verL4nd/leetcode | 9f7aa8275b132ac30e344c810dd3c020e981a257 | 41342c41485840967d535155c64fa9c3c2b1a7f0 | refs/heads/master | 2023-06-22T20:56:03.851047 | 2022-04-02T02:29:12 | 2022-04-02T02:29:12 | 92,596,400 | 0 | 0 | null | 2023-09-05T21:57:48 | 2017-05-27T12:09:09 | Java | UTF-8 | Java | false | false | 1,430 | java | package solutions._442;
import java.util.ArrayList;
import java.util.List;
/**
* 287. Find the Duplicate Number
*/
class SolutionNew {
public List<Integer> findDuplicates(int[] nums) {
List<Integer> result = new ArrayList<>();
for (int i = 0; i < nums.length; i++) {
int pos = Math.abs(nums[i]) - 1;
if (nums[pos] < 0) {
result.add(Math.abs(nums[i]));
} else {
nums[pos] = -nums[pos];
}
}
return result;
}
private void swap(int[] nums, int i, int j) {
if (i != j) {
int temp = nums[i];
nums[i] = nums[j];
nums[j] = temp;
}
}
public List<Integer> findDuplicates2(int[] nums) {
List<Integer> result = new ArrayList<>();
for (int i = 0; i < nums.length; i++) {
int pos = nums[i] - 1;
if (nums[i] != nums[pos]) {
swap(nums, i, pos);
i--;
}
}
for (int i = 0; i < nums.length; i++) {
if (nums[i] != i + 1) {
result.add(nums[i]);
}
}
return result;
}
public static void main(String[] args) {
SolutionNew solution = new SolutionNew();
List<Integer> list = solution.findDuplicates2(new int[]{10, 2, 5, 10, 9, 1, 1, 4, 3, 7});
System.out.println(list);
}
} | [
"liguanghui02@meituan.com"
] | liguanghui02@meituan.com |
bb33b8d463bac56b372aba2c3d6e43f8d883abf0 | 88d785ca23def4ca733f7d52a146bc8d34c77429 | /src/dev/zt/UpliftedVFFV/events/Floor7Infirmary/Triage/WarpCentralChambertoTriageEntrance.java | a9dc1d1034cfe662da34af9371db26e21d905ea0 | [] | no_license | Donpommelo/Uplifted.VFFV | 30fe1e41a9aeefee16c1e224388af6ce55ebfcce | 99b63eb2a00666eb4fdf84ac20cebebefad1a3dc | refs/heads/master | 2020-12-24T17:44:19.147662 | 2016-06-01T21:46:13 | 2016-06-01T21:46:13 | 33,390,964 | 0 | 0 | null | 2015-08-25T01:57:41 | 2015-04-04T01:58:48 | Java | UTF-8 | Java | false | false | 470 | java | package dev.zt.UpliftedVFFV.events.Floor7Infirmary.Triage;
import dev.zt.UpliftedVFFV.events.Event;
import dev.zt.UpliftedVFFV.gfx.Assets;
public class WarpCentralChambertoTriageEntrance extends Event {
public static int stagenum = 0;
public WarpCentralChambertoTriageEntrance(float x, float y, int idnum) {
super(Assets.White,idnum,x, y, stagenum);
}
public void run(){
super.transport("/Worlds/Floor7Infirmary/Triage/TriageEntrance.txt", 20, 14,"");
}
}
| [
"donpommelo@gmail"
] | donpommelo@gmail |
5242ebd5c10b1228d2d41ecfa8d099497d88442a | 5497799792e5a85f27841a4c57f4804b6f148e7d | /src/main/java/com/enigma/zerowaste/service/CustomerService.java | 2fe08b25bfa9e3196f195e64dfe766bd71e27b5b | [] | no_license | AgungWicaksonoPutro/rest-api-zero-waste | c577184f8a7264ef7881e9d15ea6ec3ddf0989ad | 6af44b81f581fa1bfbede934c23ba83d38db480e | refs/heads/master | 2023-08-01T05:56:54.864857 | 2021-09-20T08:43:37 | 2021-09-20T08:43:37 | 406,734,224 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 679 | java | package com.enigma.zerowaste.service;
import com.enigma.zerowaste.dto.CustomerSearchDTO;
import com.enigma.zerowaste.entity.Customer;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
public interface CustomerService {
public Customer saveCustomer(Customer customer);
public Customer getCustomerById(String id);
public Customer updateCustomer(String id, Customer customer);
public Customer deleteCustomer(String id);
public Page<Customer> getCustomerPerPage(Pageable pageable, CustomerSearchDTO customerSearchDTO);
public boolean userNameExist(String username);
public boolean emailExist(String email);
}
| [
"C090821003@bankmandiri.co.id"
] | C090821003@bankmandiri.co.id |
9cca7ad0ea87c9d90c801c50b62ba4835a99481b | 74254effe756f7ab3c4eac0d7e6bd66f49780deb | /src/main/java/com/intergrupo/rendonparedes/web/rest/AccountResource.java | 7ec2e8fc870cded4bca3f8c3bad14b70c99c13f4 | [] | no_license | corendon/jhipster-sample-application | 25ea3b9f85e85c48d3cfb1f225804abe6a68ebda | 4e78df9c0f8f65d6c8a5021f7688f7807641669b | refs/heads/main | 2023-02-24T03:39:09.959153 | 2021-01-29T00:07:41 | 2021-01-29T00:07:41 | 333,989,833 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,895 | java | package com.intergrupo.rendonparedes.web.rest;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.intergrupo.rendonparedes.security.SecurityUtils;
import java.util.Set;
import java.util.stream.Collectors;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api")
public class AccountResource {
private static class AccountResourceException extends RuntimeException {}
/**
* {@code GET /account} : get the current user.
*
* @return the current user.
* @throws AccountResourceException {@code 500 (Internal Server Error)} if the user couldn't be returned.
*/
@GetMapping("/account")
public UserVM getAccount() {
String login = SecurityUtils.getCurrentUserLogin().orElseThrow(AccountResourceException::new);
Set<String> authorities = SecurityContextHolder
.getContext()
.getAuthentication()
.getAuthorities()
.stream()
.map(GrantedAuthority::getAuthority)
.collect(Collectors.toSet());
return new UserVM(login, authorities);
}
private static class UserVM {
private String login;
private Set<String> authorities;
@JsonCreator
UserVM(String login, Set<String> authorities) {
this.login = login;
this.authorities = authorities;
}
public boolean isActivated() {
return true;
}
public Set<String> getAuthorities() {
return authorities;
}
public String getLogin() {
return login;
}
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
1797dd9265f326b82b492029f7bf107adbc04987 | bb66c3197c526a567d6e6d39b7338474610e40c8 | /crm/src/main/java/cn/wolfcode/crm/web/controller/CustomerReportController.java | 421a1a464d102c8252f23342d9b06b3204ae0852 | [] | no_license | LONGHOO/startJava | 5b4fb75dad6c8519de24d1bc3a27053fe5443368 | 3da12f9285d3c519a7e8e0c3d5e45d454a85ff56 | refs/heads/master | 2022-12-25T02:31:56.543382 | 2019-07-23T06:15:53 | 2019-07-23T06:15:53 | 165,496,196 | 0 | 0 | null | 2022-12-16T04:37:15 | 2019-01-13T11:17:27 | JavaScript | UTF-8 | Java | false | false | 2,787 | java | package cn.wolfcode.crm.web.controller;
import cn.wolfcode.crm.query.ReportQueryObject;
import cn.wolfcode.crm.service.ICustomerReportService;
import com.alibaba.fastjson.JSON;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/customerReport")
public class CustomerReportController {
@Autowired
private ICustomerReportService service;
@RequiresPermissions(value = {"报表列表", "customer:reportList"}, logical = Logical.OR)
@RequestMapping("/reportList")
public String poolList(@ModelAttribute("qo") ReportQueryObject qo, Model model) {
model.addAttribute("pageInfo",service.queryForQueryObject(qo));
return "report/customerReport";
}
@RequiresPermissions(value = {"报表柱状图", "customer:reportBar"}, logical = Logical.OR)
@RequestMapping("/chartByBar")
public String chartByBar(@ModelAttribute("qo") ReportQueryObject qo, Model model) {
List<Map<String, Object>> maps = service.queryForQueryObject(qo);
List<Object> valueList = new ArrayList<>();
List<String> keyList = new ArrayList<>();
for(Map<String,Object> map:maps){
valueList.add(map.get("number"));
keyList.add(map.get("groupType").toString());
}
model.addAttribute("valueList", JSON.toJSONString(valueList));
model.addAttribute("keyList", JSON.toJSONString(keyList));
return "report/customerReport_bar";
}
@RequiresPermissions(value = {"报表饼状图", "customer:reportPie"}, logical = Logical.OR)
@RequestMapping("/chartByPie")
public String chartByPie(@ModelAttribute("qo") ReportQueryObject qo, Model model) {
List<Map<String, Object>> maps = service.queryForQueryObject(qo);
List<String> keyList = new ArrayList<>();
List<Map<String,Object>> datas = new ArrayList<>();
for(Map<String,Object> map:maps){
keyList.add(map.get("groupType").toString());
Map<String,Object> data = new HashMap<String,Object>();
data.put("value",map.get("number"));
data.put("name",map.get("groupType"));
datas.add(data);
}
model.addAttribute("datas", JSON.toJSONString(datas));
model.addAttribute("keyList", JSON.toJSONString(keyList));
return "report/customerReport_pie";
}
}
| [
"1144258019@qq.com"
] | 1144258019@qq.com |
acd1474dba11559acf8f1ca0f30d2ef13d5b6225 | 4efaed9da654f36fcaa5d6ff262bfa968e63f4ba | /SimpleWeb/src/filter/JDBCFilter.java | bbab8df654f016522b39c7f85b391cbe530e0b99 | [] | no_license | kakraz/last_v_sandwich | b5e0908bb23b106934a96786bae4de43da98e582 | 9f7735e53b7c0663e3af0e02302754054e5778bc | refs/heads/master | 2020-05-01T08:50:47.103353 | 2019-03-24T08:11:56 | 2019-03-24T08:11:56 | 177,386,985 | 0 | 0 | null | null | null | null | WINDOWS-1251 | Java | false | false | 4,349 | java | package filter;
import java.io.IOException;
import java.sql.Connection;
import java.util.Collection;
import java.util.Map;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import conn.ConnectionUtils;
import utils.MyUtils;
@WebFilter(filterName = "jdbcFilter", urlPatterns = { "/*" })
public class JDBCFilter implements Filter {
public JDBCFilter() {
}
@Override
public void init(FilterConfig fConfig) throws ServletException {
}
@Override
public void destroy() {
}
// Проверить является ли Servlet цель текущего request?
private boolean needJDBC(HttpServletRequest request) {
System.out.println("JDBC Filter");
//
// Servlet Url-pattern: /spath/*
//
// => /spath
String servletPath = request.getServletPath();
// => /abc/mnp
String pathInfo = request.getPathInfo();
String urlPattern = servletPath;
if (pathInfo != null) {
// => /spath/*
urlPattern = servletPath + "/*";
}
// Key: servletName.
// Value: ServletRegistration
Map<String, ? extends ServletRegistration> servletRegistrations = request.getServletContext()
.getServletRegistrations();
// Коллекционировать все Servlet в вашем WebApp.
Collection<? extends ServletRegistration> values = servletRegistrations.values();
for (ServletRegistration sr : values) {
Collection<String> mappings = sr.getMappings();
if (mappings.contains(urlPattern)) {
return true;
}
}
return false;
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
// Открыть connection (соединение) только для request со специальной ссылкой.
// (Например ссылка к servlet, jsp, ..)
// Избегать открытия Connection для обычных запросов.
// (Например image, css, javascript,... )
if (this.needJDBC(req)) {
System.out.println("Open Connection for: " + req.getServletPath());
Connection conn = null;
try {
// Создать объект Connection подключенный к database.
conn = ConnectionUtils.getConnection();
// Настроить автоматический commit false, чтобы активно контролировать.
conn.setAutoCommit(false);
// Сохранить объект Connection в attribute в request.
MyUtils.storeConnection(request, conn);
// Разрешить request продвигаться далее.
// (Далее к следующему Filter или к цели).
chain.doFilter(request, response);
// Вызвать метод commit() чтобы завершить транзакцию с DB.
conn.commit();
} catch (Exception e) {
e.printStackTrace();
ConnectionUtils.rollbackQuietly(conn);
throw new ServletException();
} finally {
ConnectionUtils.closeQuietly(conn);
}
}
// Для обычных request (image,css,html,..)
// не нужно открывать connection.
else {
// Разрешить request продвигаться далее.
// (Далее к следующему Filter или к цели).
chain.doFilter(request, response);
}
}
}
| [
"noreply@github.com"
] | kakraz.noreply@github.com |
a7e9e9984797891e61faa79a72576c8fefcae7b5 | 39b9335bf8e12ea51283aba997cb2a5dc2621871 | /app/src/main/java/com/example/emptwo/MainActivity.java | ac04eb76c047424edc93406e1278fab27c46e370 | [] | no_license | NNVSEK/emptwo | 16773c408c31d560296c898581a18f211947c1a6 | 03b529eef77cd8a4823a0bcb48eae28cf7dd03b9 | refs/heads/master | 2021-03-27T02:50:52.719943 | 2020-03-17T18:18:38 | 2020-03-17T18:18:38 | 247,778,792 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 332 | java | package com.example.emptwo;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
| [
"nnvsek@gmail.com"
] | nnvsek@gmail.com |
301f2f16b9a423a49b579a8d08fd3a38dc56aca2 | 7b442cb514e671c4c63856ca5f412d1b8962edcd | /src/framework/db/ConnectToMYSQL.java | 26cb330e2f9a6edcc490f2a4645e4ab0a0acb776 | [] | no_license | octopusauto/OctopusTool | e7dc4a0c92c423c393aa604327cb1012f79762aa | 2b53234ab6c92dcc2d51431e4ea3578d8388631f | refs/heads/master | 2021-01-23T13:22:49.712990 | 2014-07-16T16:02:14 | 2014-07-16T16:02:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 23,900 | java | package framework.db;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.zip.DeflaterInputStream;
import org.apache.log4j.Logger;
import framework.util.PropertyLoader;
public class ConnectToMYSQL {
static Logger s_logger= Logger.getLogger(ConnectToMYSQL.class);
static String url = "jdbc:mysql://localhost:3306/";
static String dbName = "john";
static String driver = "com.mysql.jdbc.Driver";
static String userName = "root";
static String password ="";
private static final Logger LOGGER = Logger.getLogger(ConnectToMYSQL.class);
public static synchronized Connection getConnection()
{
Connection conn=null;
try {
Class.forName(driver).newInstance();
conn = DriverManager.getConnection(url+dbName,userName,password);
//java.sql.Statement st = conn.createStatement();
/* ResultSet res = st.executeQuery("SELECT * FROM TestCase");
while (res.next()) {
String id = res.getString("TestCaseName");
String msg = res.getString("TestCaseDesc");
System.out.println(id + "\t" + msg);
}
*/
//conn.close();
} catch (Exception e) {
e.printStackTrace();
}
return conn;
}
// setTestResultId(Database.addTestResult(getTestRunId(), testName, className, isTest, start, end, state));
public static String TableName="TestCase";
public static Map<String, String> map= new LinkedHashMap<String, String>();
public static ArrayList<String> array= new ArrayList<String>();
/*public static synchronized boolean updateTestResult( String TestCaseName, String TestResult) {
String sql = "UPDATE " + TableName +
" SET TestCaseName=?, TestCaseDesc=?" ;
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql);
stmnt.setString(1,TestCaseName);
stmnt.setString(2,TestResult);
stmnt.executeUpdate();
stmnt.close();
s_logger.debug("Updated test result : " +TestCaseName);
java.sql.Statement st = conn.createStatement();
ResultSet res = st.executeQuery("SELECT * FROM TestCase");
while (res.next()) {
String id = res.getString("TestCaseName");
String msg = res.getString("TestCaseDesc");
System.out.println(id + "\t" + msg);
map.put(id, msg);
}
conn.close();
return true;
} catch (SQLException e) {
s_logger.error("Failed to update test result : " + TestCaseName, e);
return false;
}
}
*/
public static class EmptyTestBlobException extends IOException {
private static final long serialVersionUID = 1L;
EmptyTestBlobException(String msg) {
super(msg);
}
}
/**
* Gets the current connection to the database. If a connection has not yet
* been established, it will attempt to make one.
*
* @return The database connection object
*/
/* public static synchronized Connection getConnection() {
if (connection == null) {
try {
// Only use the production level database when explicitly set in a system property.
// We need to protect this host to prevent incomplete/false results from polluting
// any reports generated from it.
String dbAddr, dbPort, dbName, dbUser, dbPw;
if (isProductionModeEnabled()) {
dbAddr = PropertyUtils.getProperty("production.db.host");
dbPort = PropertyUtils.getProperty("production.db.port");
dbName = PropertyUtils.getProperty("production.db.name");
dbUser = PropertyUtils.getProperty("production.db.user");
dbPw = PropertyUtils.getProperty("production.db.pw");
} else {
dbAddr = PropertyUtils.getProperty("development.db.host");
dbPort = PropertyUtils.getProperty("development.db.port");
dbName = PropertyUtils.getProperty("development.db.name");
dbUser = PropertyUtils.getProperty("development.db.user");
dbPw = PropertyUtils.getProperty("development.db.pw");
}
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://" + dbAddr + ":" + dbPort + "/" + dbName;
LOGGER.debug("Connecting to: " + url);
connection = DriverManager.getConnection(url, dbUser, dbPw);
LOGGER.debug("Connected to database");
} catch (ClassNotFoundException e) {
LOGGER.error("MySQL driver not found", e);
throw new RuntimeException(e);
} catch (SQLException e) {
LOGGER.error("Error connecting to DB", e);
throw new RuntimeException(e);
}
}
return connection;
}*/
/**
* Adds a record to the database to indicate the start of a test run.
*
* @param product The product under test
* @param version The version of the product
* @param component The component of the product under test
* @param testSuite The name of the test suite be executed
* @param testType The type of testing being performed (e.g. sanity or regression)
* @param testEnvName The name of the test environment where the test is running
* @param trackingId A free form id for tracking test runs before execution
* @return The id of newly inserted record or -1 if a failure occurred
* @throws SQLException
*/
public static synchronized int startTestRun(String product, String version, String component, String testSuite,
String testType, String testEnvName, String trackingId) throws SQLException {
framework.db.Constants.TestRunState state = isProductionModeEnabled() ? framework.db.Constants.TestRunState.OFFICIAL : framework.db.Constants.TestRunState.DEVELOPMENT;
Timestamp now = new Timestamp(System.currentTimeMillis());
String sql = "INSERT INTO " + Constants.TESTRUNTABLE +
" (product, version, component, testsuite, testtype, testenvname, starttime, state, trackingid)" +
" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
stmnt.setString(1, product);
stmnt.setString(2, version);
stmnt.setString(3, component);
stmnt.setString(4, testSuite);
stmnt.setString(5, testType);
stmnt.setString(6, testEnvName);
stmnt.setTimestamp(7, now);
stmnt.setInt(8, state.getValue());
stmnt.setString(9, trackingId);
stmnt.executeUpdate();
int testRunId = getGeneratedId(stmnt);
stmnt.close();
LOGGER.debug("Started test run id: " + testRunId);
return testRunId;
} catch (SQLException e) {
LOGGER.error("Failed to start a test run", e);
throw e;
}
}
/**
* Marks the current test run as completed in the database.
*
* @param testRunId The id of the current test run
* @throws SQLException
*/
public static synchronized void endTestRun(int testRunId) throws SQLException {
Timestamp now = new Timestamp(System.currentTimeMillis());
String sql = "UPDATE " + Constants.TESTRUNTABLE + " SET endtime=? WHERE id=?";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql);
stmnt.setTimestamp(1, now);
stmnt.setInt(2, testRunId);
stmnt.executeUpdate();
stmnt.close();
LOGGER.debug("Ended test run id: " + testRunId);
} catch (SQLException e) {
LOGGER.error("Failed to end a test run", e);
throw e;
}
}
/**
* Updates a test run record's product version in the database.
*
* @param testRunId The id of the current test run
* @param version The version of the product
* @return false if a failure occurred
*/
public static synchronized boolean updateTestRunProductVersion(int testRunId, String version) {
String sql = "UPDATE " + Constants.TESTRUNTABLE + " SET version=? WHERE id=?";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql);
stmnt.setString(1, version);
stmnt.setInt(2, testRunId);
stmnt.executeUpdate();
stmnt.close();
LOGGER.debug("Updated product version for test run id: " + testRunId);
return true;
} catch (SQLException e) {
LOGGER.error("Failed to update product version for test run id: " + testRunId, e);
return false;
}
}
/**
* Adds a pending record to the database for a testing method.
*
* @param testRunId The id of the current test run
* @param name The name of the test method
* @param className The name of the class the test resides in
* @param isTest Marks if the result is a test rather than a configuration method
* @param startTime The time when the test began
* @return The id of newly inserted record or -1 if a failure occurred
* @throws SQLException
*/
public static synchronized int addPendingTestResult(int testRunId, String name, String className, boolean isTest,
Timestamp startTime) throws SQLException {
String sql = "INSERT INTO " + Constants.TESTRESULTTABLE +
" (testrunid, name, class, istest, starttime, state)" +
" VALUES (?, ?, ?, ?, ?, ?)";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
stmnt.setInt(1, testRunId);
stmnt.setString(2, name);
stmnt.setString(3, className);
stmnt.setBoolean(4, isTest);
stmnt.setTimestamp(5, startTime);
stmnt.setInt(6, framework.db.Constants.TestResultState.PENDING.getValue());
stmnt.executeUpdate();
int testResultId = getGeneratedId(stmnt);
stmnt.close();
LOGGER.debug("Added pending test result id: " + testResultId);
return testResultId;
} catch (SQLException e) {
LOGGER.error("Failed to add a pending test result", e);
throw e;
}
}
/**
* Updates a test result record in the database.
*
* @param testResultId The id of the current test result
* @param endTime The time when the test completed
* @param state The final result state of the test (PASSED,FAILED,etc.)
* @return false if a failure occurred
*/
public static synchronized boolean updateTestResult(int testResultId, Timestamp endTime, framework.db.Constants.TestResultState state) {
String sql = "UPDATE " + Constants.TESTRESULTTABLE +
" SET endTime=?, state=?" +
" WHERE id=?";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql);
stmnt.setTimestamp(1, endTime);
stmnt.setInt(2, state.getValue());
stmnt.setInt(3, testResultId);
stmnt.executeUpdate();
stmnt.close();
LOGGER.debug("Updated test result id: " + testResultId);
return true;
} catch (SQLException e) {
LOGGER.error("Failed to update test result id: " + testResultId, e);
return false;
}
}
/**
* Adds a complete record to the database for a testing method.
*
* @param testRunId The id of the current test run
* @param name The name of the test method
* @param className The name of the class the test resides in
* @param isTest Marks if the result is a test rather than a configuration method
* @param startTime The time when the test began
* @param endTime The time when the test completed
* @param state The final result state of the test (PASSED,FAILED,etc.)
* @return The id of newly inserted record or -1 if a failure occurred
* @throws SQLException
*/
public static synchronized int addTestResult(int testRunId, String name, String className, boolean isTest,
Timestamp startTime, Timestamp endTime, framework.db.Constants.TestResultState state) throws SQLException {
String sql = "INSERT INTO " + Constants.TESTRESULTTABLE +
" (testrunid, name, class, istest, starttime, endtime, state)" +
" VALUES (?, ?, ?, ?, ?, ?, ?)";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
stmnt.setInt(1, testRunId);
stmnt.setString(2, name);
stmnt.setString(3, className);
stmnt.setBoolean(4, isTest);
stmnt.setTimestamp(5, startTime);
stmnt.setTimestamp(6, endTime);
stmnt.setInt(7, state.getValue());
stmnt.executeUpdate();
int testResultId = getGeneratedId(stmnt);
stmnt.close();
LOGGER.debug("Added test result id: " + testResultId);
return testResultId;
} catch (SQLException e) {
LOGGER.error("Failed to add a test result", e);
throw e;
}
}
/**
* Adds a record for a chunk of data to attach to a test result.
*
* @param testResultId The id of the test result to attach to
* @param source A description of where this data came from
* @param filename The filename to assign to the data file
* @param data A byte array of data
* @return The id of newly inserted record
* @throws SQLException
* @throws EmptyTestBlobException
*/
public static synchronized int addTestBlob(int testResultId, String source, String filename, byte[] data)
throws SQLException, EmptyTestBlobException {
return addTestBlob(testResultId, source, filename, new ByteArrayInputStream(data), data.length);
}
/**
* Adds a record for a chunk of data to attach to a test result.
*
* @param testResultId The id of the test result to attach to
* @param source A description of where this data came from
* @param filename The filename to assign to the data file
* @param file A file object pointing to the data
* @return The id of newly inserted record
* @throws FileNotFoundException
* @throws SQLException
* @throws EmptyTestBlobException
*/
public static synchronized int addTestBlob(int testResultId, String source, String filename, File file)
throws FileNotFoundException, SQLException, EmptyTestBlobException {
if (file.isDirectory()) {
LOGGER.error("File cannot be a directory: " + file.getAbsolutePath());
throw new FileNotFoundException("File cannot be a directory: " + file.getAbsolutePath());
}
try {
return addTestBlob(testResultId, source, filename, new FileInputStream(file), file.length());
} catch (FileNotFoundException e) {
LOGGER.error("File not found: " + file.getAbsolutePath());
throw e;
}
}
/**
* Adds a record for a chunk of data to attach to a test result.
*
* @param testResultId The id of the test result to attach to
* @param source A description of where this data came from
* @param filename The filename to assign to the data file
* @param is An input stream associated with the data
* @param size The amount of bytes to read
* @return The id of newly inserted record
* @throws SQLException
* @throws EmptyTestBlobException
*/
public static synchronized int addTestBlob(int testResultId, String source, String filename, InputStream is,
long size) throws SQLException, EmptyTestBlobException {
// Don't attach empty test blobs. This is not necessarily an error but we'll let others decide that.
if (size == 0) {
throw new EmptyTestBlobException("Cannot add a test blob of size 0");
}
String sql = "INSERT INTO " + Constants.TESTBLOBTABLE +
" (testresultid, source, filename, size, data)" +
" VALUES (?, ?, ?, ?, ?)";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
stmnt.setInt(1, testResultId);
stmnt.setString(2, source);
stmnt.setString(3, filename);
stmnt.setLong(4, size);
// Compressing the blob reduces the size dramatically.
stmnt.setBlob(5, new DeflaterInputStream(is), size);
stmnt.executeUpdate();
int testBlobId = getGeneratedId(stmnt);
stmnt.close();
LOGGER.debug("Added test blob id: " + testBlobId);
return testBlobId;
} catch (SQLException e) {
LOGGER.error("Failed to add a test blob", e);
throw e;
}
}
/**
* Retrieves the generated id from an executed SQL statement.
*
* @param stmnt The Statement already executed
* @return The id found
* @throws SQLException
*/
private static int getGeneratedId(Statement stmnt) throws SQLException {
ResultSet keys = stmnt.getGeneratedKeys();
keys.next();
int id = keys.getInt(1);
keys.close();
return id;
}
/**
* Checks to see if production mode is enabled.
*
* @return true if production mode is enabled, otherwise false
*/
private static boolean isProductionModeEnabled() {
String useProduction = PropertyLoader.getProperty("production");
if (useProduction != null) {
if (useProduction.equals("true")) {
return true;
}
}
return false;
}
/**
* Adds a performance summary entry for a test result.
*
* @param testResultId : test result id
* @param metricID : the id of a valid performance metric
* @param value : a numerical value for the metric (i.e. AverageRunTime or MinRunTime)
* @return : unique id of the entry
* @throws SQLException
*/
private static synchronized int addPerfSummary(int testResultId, int metricID, double value) throws SQLException {
String sql = "INSERT INTO " + Constants.PERFSUMMARYTABLE +
" (testresultid, metricid, value)" +
" VALUES (?, ?, ?)";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
stmnt.setInt(1, testResultId);
stmnt.setInt(2, metricID);
stmnt.setDouble(3, value);
stmnt.executeUpdate();
int perfSummaryID = getGeneratedId(stmnt);
stmnt.close();
LOGGER.debug("Added performance summary. PerfSummary ID = : " + perfSummaryID);
return perfSummaryID;
} catch (SQLException e) {
LOGGER.error("Failed to add performance summary.", e);
throw e;
}
}
/**
* Add a metric ID to the PerfMetric table.
*
* @param name : the unique identifier of the metric
* @param description : human readable description of the field
* @param unit : unit for the data
* @return : id for the metric entry
* @throws SQLException
*/
private static synchronized int addPerfMetric(String name, String description, String unit) throws SQLException {
String sql = "INSERT INTO " + Constants.PERFMETRICTABLE +
" (name, description, unit)" +
" VALUES (?, ?, ?)";
try {
Connection conn = getConnection();
int metricID = getPerfMetricID(name);
if (metricID == -1) {
PreparedStatement stmnt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
stmnt.setString(1, name);
stmnt.setString(2, description);
stmnt.setString(3, unit);
stmnt.executeUpdate();
metricID = getGeneratedId(stmnt);
stmnt.close();
LOGGER.debug("Added performance metric id: " + metricID);
}
return metricID;
} catch (SQLException e) {
LOGGER.error("Failed to add performance metric.", e);
throw e;
}
}
/**
* Get the metricID from the perfMetric table given the metric name.
*
* @param name: String name to look up the id with.
* @return : metric id associated with the string, -1 if not found
* @throws SQLException
*/
private static synchronized int getPerfMetricID(String name) throws SQLException {
String sql = "SELECT id FROM " + Constants.PERFMETRICTABLE + " WHERE name=?";
try {
Connection conn = getConnection();
PreparedStatement stmnt = conn.prepareStatement(sql);
stmnt.setString(1, name);
ResultSet res = stmnt.executeQuery();
if (!res.next()) {
LOGGER.debug ("Metric id not found in perf metric table");
return -1;
}
int metricID = res.getInt("id");
stmnt.close();
LOGGER.debug("Retrieved performance metric id: " + metricID);
return metricID;
} catch (SQLException e) {
LOGGER.error("Failed to get performance metric.", e);
throw e;
}
}
/**
* Add performance summary entry for testResultID and specific metric
*
* @param testResultID : test result id
* @param metricName : the metric identifier as string
* @param value : performance data for the metric
* @param description : human readable description of the field
* @param unit : unit for the data
* @return : perfSummaryID; the id of the new entry.
* @throws SQLException
*/
public static synchronized int addPerfData(int testResultID, String metricName, double value,
String description, String unit) throws SQLException {
return addPerfSummary(testResultID, addPerfMetric(metricName, description, unit), value);
}
}
| [
"reutinus@yahoo.com"
] | reutinus@yahoo.com |
094f31693a6c93c2b2fcc4b3cfb687504dae536e | 329b2cb3c91a0c953458efd253c4fcdce6f539c4 | /graphsdk/src/main/java/com/microsoft/graph/generated/IBaseSubscriptionCollectionRequest.java | 898c724e5336e0cea30232c04a5531af6fe4aa0a | [
"MIT"
] | permissive | sbolotovms/msgraph-sdk-android | 255eeddf19c1b15f04ee3b1549f0cae70d561fdd | 1320795ba1c0b5eb36ef8252b73799d15fc46ba1 | refs/heads/master | 2021-01-20T05:09:00.148739 | 2017-04-28T23:20:23 | 2017-04-28T23:20:23 | 89,751,501 | 1 | 0 | null | 2017-04-28T23:20:37 | 2017-04-28T23:20:37 | null | UTF-8 | Java | false | false | 1,824 | java | // ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.extensions.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.List;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The interface for the Base Subscription Collection Request.
*/
public interface IBaseSubscriptionCollectionRequest {
void get(final ICallback<ISubscriptionCollectionPage> callback);
ISubscriptionCollectionPage get() throws ClientException;
void post(final Subscription newSubscription, final ICallback<Subscription> callback);
Subscription post(final Subscription newSubscription) throws ClientException;
/**
* Sets the expand clause for the request
*
* @param value The expand clause
* @return The updated request
*/
ISubscriptionCollectionRequest expand(final String value);
/**
* Sets the select clause for the request
*
* @param value The select clause
* @return The updated request
*/
ISubscriptionCollectionRequest select(final String value);
/**
* Sets the top value for the request
*
* @param value The max number of items to return
* @return The updated request
*/
ISubscriptionCollectionRequest top(final int value);
}
| [
"brianmel@microsoft.com"
] | brianmel@microsoft.com |
73efce0d771af75fed75b3cf0c5423a6b7e37b3a | 4e5e90686d8be6226321d2951f6bc5564c966ab4 | /chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateDataFetcher.java | 70e63772ad445cb18eced421fa0694507c0c64b4 | [
"BSD-3-Clause"
] | permissive | 0lorak0/chromium | 15c53bba2f4f316159f98087c8a6703ed8313ded | 71a188e053a19e3ce3528d33eef1a30166c878e4 | refs/heads/master | 2023-03-11T12:54:46.138686 | 2018-11-29T19:58:13 | 2018-11-29T19:58:13 | 159,721,234 | 1 | 0 | NOASSERTION | 2018-11-29T20:08:20 | 2018-11-29T20:08:20 | null | UTF-8 | Java | false | false | 5,521 | java | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.webapps;
import android.graphics.Bitmap;
import android.text.TextUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.blink_public.platform.WebDisplayMode;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.content_public.browser.WebContents;
import java.util.HashMap;
/**
* Downloads the Web Manifest if the web site still uses the {@link manifestUrl} passed to the
* constructor.
*/
public class WebApkUpdateDataFetcher extends EmptyTabObserver {
/** Observes fetching of the Web Manifest. */
public interface Observer {
/**
* Called when the Web Manifest has been successfully fetched (including on the initial URL
* load).
* @param fetchedInfo The fetched Web Manifest data.
* @param primaryIconUrl The icon URL in {@link fetchedInfo#iconUrlToMurmur2HashMap()} best
* suited for use as the launcher icon on this device.
* @param badgeIconUrl The icon URL in {@link fetchedInfo#iconUrlToMurmur2HashMap()} best
* suited for use as the badge icon on this device.
*/
void onGotManifestData(WebApkInfo fetchedInfo, String primaryIconUrl, String badgeIconUrl);
}
/**
* Pointer to the native side WebApkUpdateDataFetcher. The Java side owns the native side
* WebApkUpdateDataFetcher.
*/
private long mNativePointer;
/** The tab that is being observed. */
private Tab mTab;
/** Web Manifest data at the time that the WebAPK was generated. */
private WebApkInfo mOldInfo;
private Observer mObserver;
/** Starts observing page loads in order to fetch the Web Manifest after each page load. */
public boolean start(Tab tab, WebApkInfo oldInfo, Observer observer) {
if (tab.getWebContents() == null || TextUtils.isEmpty(oldInfo.manifestUrl())) {
return false;
}
mTab = tab;
mOldInfo = oldInfo;
mObserver = observer;
mTab.addObserver(this);
mNativePointer = nativeInitialize(mOldInfo.scopeUri().toString(), mOldInfo.manifestUrl());
nativeStart(mNativePointer, mTab.getWebContents());
return true;
}
/**
* Puts the object in a state where it is safe to be destroyed.
*/
public void destroy() {
mTab.removeObserver(this);
nativeDestroy(mNativePointer);
mNativePointer = 0;
}
@Override
public void onWebContentsSwapped(Tab tab, boolean didStartLoad,
boolean didFinishLoad) {
updatePointers();
}
@Override
public void onContentChanged(Tab tab) {
updatePointers();
}
/**
* Updates which WebContents the native WebApkUpdateDataFetcher is monitoring.
*/
private void updatePointers() {
nativeReplaceWebContents(mNativePointer, mTab.getWebContents());
}
/**
* Called when the updated Web Manifest has been fetched.
*/
@CalledByNative
protected void onDataAvailable(String manifestStartUrl, String scopeUrl, String name,
String shortName, String primaryIconUrl, String primaryIconMurmur2Hash,
Bitmap primaryIconBitmap, String badgeIconUrl, String badgeIconMurmur2Hash,
Bitmap badgeIconBitmap, String[] iconUrls, @WebDisplayMode int displayMode,
int orientation, long themeColor, long backgroundColor, String shareAction,
String shareParamsTitle, String shareParamsText, String shareParamsUrl) {
HashMap<String, String> iconUrlToMurmur2HashMap = new HashMap<String, String>();
for (String iconUrl : iconUrls) {
String murmur2Hash = null;
if (iconUrl.equals(primaryIconUrl)) {
murmur2Hash = primaryIconMurmur2Hash;
} else if (iconUrl.equals(badgeIconUrl)) {
murmur2Hash = badgeIconMurmur2Hash;
}
iconUrlToMurmur2HashMap.put(iconUrl, murmur2Hash);
}
String serializedShareTarget = WebApkInfo.getSerializedShareTarget(
shareAction, "", "", shareParamsTitle, shareParamsText, shareParamsUrl, "", "");
WebApkInfo info = WebApkInfo.create(mOldInfo.id(), mOldInfo.uri().toString(), scopeUrl,
new WebApkInfo.Icon(primaryIconBitmap), new WebApkInfo.Icon(badgeIconBitmap), null,
name, shortName, displayMode, orientation, mOldInfo.source(), themeColor,
backgroundColor, mOldInfo.webApkPackageName(), mOldInfo.shellApkVersion(),
mOldInfo.manifestUrl(), manifestStartUrl, WebApkInfo.WebApkDistributor.BROWSER,
iconUrlToMurmur2HashMap, serializedShareTarget, mOldInfo.shouldForceNavigation(),
mOldInfo.useTransparentSplash(), null);
mObserver.onGotManifestData(info, primaryIconUrl, badgeIconUrl);
}
private native long nativeInitialize(String scope, String webManifestUrl);
private native void nativeReplaceWebContents(
long nativeWebApkUpdateDataFetcher, WebContents webContents);
private native void nativeDestroy(long nativeWebApkUpdateDataFetcher);
private native void nativeStart(long nativeWebApkUpdateDataFetcher, WebContents webContents);
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
42e8d5c38039449b02ac6ba0a8aa5374170d81df | 431efea5838c6ce3b86ef367ba971f54cd9471b6 | /MPChartLib/src/com/github/mikephil/charting/utils/ColorTemplate.java | 4d43618a51316bc69a86905de73906ff8160ff3d | [] | no_license | fitmi2017/FitMi_Android_Beta | fd75311d46ffe7cb647e8647cc611d65d2c4e094 | f31e25aaca519a07e7df2d0b24d8069c99e74762 | refs/heads/master | 2020-06-29T05:13:49.843733 | 2017-06-08T13:38:00 | 2017-06-08T13:38:00 | 74,448,484 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,967 | java |
package com.github.mikephil.charting.utils;
import android.content.res.Resources;
import android.graphics.Color;
import java.util.ArrayList;
import java.util.List;
/**
* Class that holds predefined color integer arrays (e.g.
* ColorTemplate.VORDIPLOM_COLORS) and convenience methods for loading colors
* from resources.
*
* @author Philipp Jahoda
*/
public class ColorTemplate {
/**
* an "invalid" color that indicates that no color is set
*/
public static final int COLOR_NONE = -1;
/**
* this "color" is used for the Legend creation and indicates that the next
* form should be skipped
*/
public static final int COLOR_SKIP = -2;
/**
* THE COLOR THEMES ARE PREDEFINED (predefined color integer arrays), FEEL
* FREE TO CREATE YOUR OWN WITH AS MANY DIFFERENT COLORS AS YOU WANT
*/
public static final int[] LIBERTY_COLORS = {
Color.rgb(207, 248, 246), Color.rgb(148, 212, 212), Color.rgb(136, 180, 187),
Color.rgb(118, 174, 175), Color.rgb(42, 109, 130)
};
public static final int[] JOYFUL_COLORS = {
Color.rgb(217, 80, 138), Color.rgb(254, 149, 7), Color.rgb(254, 247, 120),
Color.rgb(106, 167, 134), Color.rgb(53, 194, 209)
};
public static final int[] PASTEL_COLORS = {
Color.rgb(64, 89, 128), Color.rgb(149, 165, 124), Color.rgb(217, 184, 162),
Color.rgb(191, 134, 134), Color.rgb(179, 48, 80)
};
public static final int[] COLORFUL_COLORS = {
Color.rgb(193, 37, 82), Color.rgb(255, 102, 0), Color.rgb(245, 199, 0),
Color.rgb(106, 150, 31), Color.rgb(179, 100, 53)
};
public static final int[] VORDIPLOM_COLORS = { Color.rgb(0, 102, 0),Color.rgb(181, 31, 107),
Color.rgb(192, 255, 140), Color.rgb(255, 247, 140), Color.rgb(255, 208, 140),
Color.rgb(140, 234, 255), Color.rgb(255, 140, 157)
};
/**
* Returns the Android ICS holo blue light color.
*
* @return
*/
public static int getHoloBlue() {
return Color.rgb(51, 181, 229);
}
/**
* turn an array of resource-colors (contains resource-id integers) into an
* array list of actual color integers
*
* @param r
* @param colors an integer array of resource id's of colors
* @return
*/
public static List<Integer> createColors(Resources r, int[] colors) {
List<Integer> result = new ArrayList<Integer>();
for (int i : colors) {
result.add(r.getColor(i));
}
return result;
}
/**
* Turns an array of colors (integer color values) into an ArrayList of
* colors.
*
* @param colors
* @return
*/
public static List<Integer> createColors(int[] colors) {
List<Integer> result = new ArrayList<Integer>();
for (int i : colors) {
result.add(i);
}
return result;
}
}
| [
"amankumar.impinge@gmail.com"
] | amankumar.impinge@gmail.com |
fe3d70386830e347acd0282828b3f511870b9a5e | a3fbc033f54d69f6026b632562568617475d9b37 | /Server/musichouse/src/main/java/io/musichouse/exception/ProductNotFoundException.java | 79a5b465c2e16ec0d79894f3fe736c1b563bef24 | [
"MIT"
] | permissive | kaushiknandhan/MusicHouse | bf2c0e691abc83363fa14beb54bb2e56738fe7bf | d9cc62e8e9401318f751dfd7346206f249ae3ac4 | refs/heads/master | 2020-05-21T08:34:26.130030 | 2017-04-13T21:50:17 | 2017-04-13T21:50:17 | 84,605,485 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | package io.musichouse.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(code=HttpStatus.NOT_FOUND,reason="No Products found with the given ID")
public class ProductNotFoundException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
}
| [
"kaushik nandhan injamuri"
] | kaushik nandhan injamuri |
2541e4c0b1eb3f225292fecc46439aecf8a6af8f | c9b24c524afdfb260e54ed6224992b6e37c3f6a7 | /src/test/java/com/boot/ShipwreckControllerTest.java | 04c8dd79e645919d3230471d516b72cccbb211b6 | [] | no_license | LoPan455/das-boot | 4409cec67dc78dcf1b6a1360652c88f34f9241b8 | d2c464fe8ce809171dbfea55f94b9e91f9cbaa16 | refs/heads/master | 2020-09-10T07:49:13.396357 | 2019-11-18T01:33:51 | 2019-11-18T01:33:51 | 221,690,405 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,604 | java | package com.boot;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.when;
import com.boot.controller.ShipwreckController;
import com.boot.model.Shipwreck;
import com.boot.repository.ShipwreckRepository;
import java.util.ArrayList;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
public class ShipwreckControllerTest {
@InjectMocks
private ShipwreckController shipwreckController;
@Mock
private ShipwreckRepository shipwreckRepository;
@Before
public void init() {
MockitoAnnotations.initMocks(this);
}
@Test
public void testShipwreckGet() {
Shipwreck shipwreck = new Shipwreck();
shipwreck.setId(1L);
when(shipwreckRepository.findOne(1L)).thenReturn(shipwreck);
Shipwreck wreck = shipwreckController.get(1L);
// assertEquals(1L, wreck.getId().longValue());
assertThat(wreck.getId(), is(1L));
}
@Test
public void testShipwreckGetMany() {
List<Shipwreck> wrecks = new ArrayList<Shipwreck>();
Shipwreck shipwreckOne = new Shipwreck();
shipwreckOne.setId(2L);
Shipwreck shipwreckTwo = new Shipwreck();
shipwreckTwo.setId(3L);
wrecks.add(shipwreckOne);
wrecks.add(shipwreckTwo);
when(shipwreckRepository.findAll()).thenReturn(wrecks);
List<Shipwreck> actual = shipwreckController.list();
assertEquals(wrecks, actual);
assert wrecks.size() == actual.size();
}
}
| [
"tom.johander@dealerteamwork.com"
] | tom.johander@dealerteamwork.com |
e531954c4cf534b4cc12900bcb81cecbfd72fd6b | 3bf9cd0b46ba5e0ada693eff0ad39526fc4ae20e | /org/springframework/beans/propertyeditors/FileEditor.java | a5783a7531c17c6f272b8b9cde9e6486c8ab54fc | [] | no_license | zbtmaker/spring2.0.x-src | c6be55286a74f569aa455171e8fa49858a4a095b | fe2a9cbae6a0ea3e108a0dddaccf6ce63a59dd15 | refs/heads/master | 2021-07-11T13:19:59.102587 | 2019-09-28T16:10:37 | 2019-09-28T16:10:37 | 211,526,299 | 1 | 2 | null | 2020-10-13T16:22:15 | 2019-09-28T16:05:10 | Java | UTF-8 | Java | false | false | 3,221 | java | /*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.propertyeditors;
import java.beans.PropertyEditorSupport;
import java.io.File;
import java.io.IOException;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceEditor;
import org.springframework.util.Assert;
import org.springframework.util.ResourceUtils;
import org.springframework.util.StringUtils;
/**
* Editor for <code>java.io.File</code>, to directly populate a File property
* from a Spring resource location.
*
* <p>Supports Spring-style URL notation: any fully qualified standard URL
* ("file:", "http:", etc) and Spring's special "classpath:" pseudo-URL.
*
* <p><b>NOTE:</b> The behavior of this editor has changed in Spring 2.0.
* Previously, it created a File instance directly from a filename.
* As of Spring 2.0, it takes a standard Spring resource location as input;
* this is consistent with URLEditor and InputStreamEditor now.
*
* @author Juergen Hoeller
* @since 09.12.2003
* @see java.io.File
* @see org.springframework.core.io.ResourceEditor
* @see org.springframework.core.io.ResourceLoader
* @see URLEditor
* @see InputStreamEditor
*/
public class FileEditor extends PropertyEditorSupport {
private final ResourceEditor resourceEditor;
/**
* Create a new FileEditor,
* using the default ResourceEditor underneath.
*/
public FileEditor() {
this.resourceEditor = new ResourceEditor();
}
/**
* Create a new FileEditor,
* using the given ResourceEditor underneath.
* @param resourceEditor the ResourceEditor to use
*/
public FileEditor(ResourceEditor resourceEditor) {
Assert.notNull(resourceEditor, "ResourceEditor must not be null");
this.resourceEditor = resourceEditor;
}
public void setAsText(String text) throws IllegalArgumentException {
// Check whether we got an absolute file path without "file:" prefix.
// For backwards compatibility, we'll consider those as straight file path.
if (StringUtils.hasText(text) && !ResourceUtils.isUrl(text)) {
File file = new File(text);
if (file.isAbsolute()) {
setValue(file);
return;
}
}
// Proceed with standard resource location parsing.
this.resourceEditor.setAsText(text);
Resource resource = (Resource) this.resourceEditor.getValue();
try {
setValue(resource != null ? resource.getFile() : null);
}
catch (IOException ex) {
throw new IllegalArgumentException(
"Could not retrieve File for " + resource + ": " + ex.getMessage());
}
}
public String getAsText() {
File value = (File) getValue();
return (value != null ? value.getPath() : "");
}
}
| [
"zoubaitao@gmail.com"
] | zoubaitao@gmail.com |
79c6b26316dc72b811b43fabaec55afcaca3d82d | 1350f85cd7e8c5606bc84bec9cc6d5a14d4640a5 | /shared-api/src/test/java/au/org/aekos/shared/api/model/search/RequestGetAvailableIndexValuesTest.java | 638125ab2228cdd943ac5da379437d93a2450521 | [] | no_license | Tillbilly/shared-ecoinformatics | 5b900ccdf226288eb8f1e6dc8acdf47845ffcbe1 | f5a1396cc3f265fea449698be8a898e59803c99d | refs/heads/master | 2022-12-21T18:17:46.554664 | 2016-08-23T07:40:21 | 2016-08-23T07:40:21 | 66,336,965 | 0 | 0 | null | 2022-12-16T01:53:00 | 2016-08-23T05:46:55 | Java | UTF-8 | Java | false | false | 3,535 | java | package au.org.aekos.shared.api.model.search;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Test;
public class RequestGetAvailableIndexValuesTest {
/**
* Can we tell when the search string is supplied
*/
@Test
public void testIsSearchStringSupplied01() {
RequestGetAvailableIndexValues objectUnderTest = new RequestGetAvailableIndexValues("title", "u", 0, 10);
boolean result = objectUnderTest.isSearchStringSupplied();
assertThat(result, is(true));
}
/**
* Can we tell when the search string is NOT supplied
*/
@Test
public void testIsSearchStringSupplied02() {
RequestGetAvailableIndexValues objectUnderTest = new RequestGetAvailableIndexValues("title", " ", 0, 10);
boolean result = objectUnderTest.isSearchStringSupplied();
assertThat(result, is(false));
}
/**
* Can we tell when the search string is NOT supplied
*/
@Test
public void testIsSearchStringSupplied03() {
RequestGetAvailableIndexValues objectUnderTest = new RequestGetAvailableIndexValues("title", RequestGetAvailableIndexValues.SEARCH_FOR_ALL_VALUES, 0, 10);
boolean result = objectUnderTest.isSearchStringSupplied();
assertThat(result, is(false));
}
/**
* Can we determine the facet field name for a _ft suffix?
*/
@Test
public void testGetFacetFieldName01() {
RequestGetAvailableIndexValues objectUnderTest = new RequestGetAvailableIndexValues("datasetFormalName_ft", "u", 0, 10);
String result = objectUnderTest.getFacetFieldName();
assertThat(result, is("datasetFormalName_facet_s"));
}
/**
* Can we determine the facet field name for a _stxt suffix?
*/
@Test
public void testGetFacetFieldName02() {
RequestGetAvailableIndexValues objectUnderTest = new RequestGetAvailableIndexValues("ecologicalTheme_stxt", "u", 0, 10);
String result = objectUnderTest.getFacetFieldName();
assertThat(result, is("ecologicalTheme_facet_ss"));
}
/**
* Can we fail gracefully for an unmapped suffix?
*/
@Test
public void testGetFacetFieldName03() {
RequestGetAvailableIndexValues objectUnderTest = new RequestGetAvailableIndexValues("ecologicalTheme_wtf", "u", 0, 10);
try {
objectUnderTest.getFacetFieldName();
fail();
} catch (RuntimeException e) {
// success!
}
}
/**
* Can we determine the facet field name for a _ftxt suffix?
*/
@Test
public void testGetFacetFieldName04() {
RequestGetAvailableIndexValues objectUnderTest = new RequestGetAvailableIndexValues("author_ftxt", "u", 0, 10);
String result = objectUnderTest.getFacetFieldName();
assertThat(result, is("author_facet_ss"));
}
/**
* Can we tell when a field name is valid for SHaRED?
*/
@Test
public void testIsValidSharedColumnName01() {
assertTrue(RequestGetAvailableIndexValues.isValidSharedColumnName("ecologicalTheme_stxt"));
assertTrue(RequestGetAvailableIndexValues.isValidSharedColumnName("author_ftxt"));
assertTrue(RequestGetAvailableIndexValues.isValidSharedColumnName("datasetFormalName_ft"));
assertTrue(RequestGetAvailableIndexValues.isValidSharedColumnName("text"));
assertTrue(RequestGetAvailableIndexValues.isValidSharedColumnName("wktConvexHull"));
}
/**
* Can we tell when a field name is NOT valid for SHaRED?
*/
@Test
public void testIsValidSharedColumnName02() {
assertFalse(RequestGetAvailableIndexValues.isValidSharedColumnName("ecologicalTheme_wtf"));
}
}
| [
"madbatch@gmail.com"
] | madbatch@gmail.com |
cec705f14c8e4a57bdda2289ec295070b30e788d | 1f9c5b25a89cdb90a620d70e0b7cfc68fc23dee5 | /src/main/java/org/schemaspy/model/ImpliedForeignKeyConstraint.java | 9dd469ca96575659085d6c0faa95b6a5d69113e6 | [
"MIT"
] | permissive | rodrigues-daniel/schemaspy | c89e55114c6613193afe11bdfb8de37f625e669b | d13e1181917994bbe323510bc39a17657e8b833e | refs/heads/master | 2020-03-13T14:34:53.836934 | 2018-04-23T05:18:58 | 2018-04-23T05:18:58 | 131,161,355 | 1 | 0 | MIT | 2018-04-26T13:40:04 | 2018-04-26T13:40:04 | null | UTF-8 | Java | false | false | 1,938 | java | /*
* This file is a part of the SchemaSpy project (http://schemaspy.org).
* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 John Currier
*
* SchemaSpy 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.
*
* SchemaSpy is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.schemaspy.model;
public class ImpliedForeignKeyConstraint extends ForeignKeyConstraint {
/**
* @param parentColumn
* @param childColumn
*/
public ImpliedForeignKeyConstraint(TableColumn parentColumn, TableColumn childColumn) {
super(parentColumn, childColumn);
}
/**
* @return
*/
@Override
public String getName() {
return "Implied Constraint";
}
/**
* @return
*/
@Override
public boolean isImplied() {
return true;
}
/**
* @return
*/
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(getChildTable());
buf.append(".");
buf.append(toString(getChildColumns()));
buf.append("'s name implies that it's a child of ");
buf.append(getParentTable());
buf.append(".");
buf.append(toString(getParentColumns()));
buf.append(", but it doesn't reference that column.");
return buf.toString();
}
}
| [
"rafalkasa@gmail.com"
] | rafalkasa@gmail.com |
cdcc3a6ed9044a60ef717e86a4c8fcc096084d3a | 7e58d3dd9eb925054817b535727dec0528132a2e | /src/com/xlccc/lbld/Permutation.java | 3775efc08d5132ba90088101ec5087a2c15a1263 | [] | no_license | xuan-linker/linker-algorithm | 170ae313b3497042d0a4737ad498fd95171aaecd | 33c6196cb9695701834b13687972e5b78131af8c | refs/heads/master | 2021-07-16T10:09:07.537953 | 2021-06-10T11:56:54 | 2021-06-10T11:56:54 | 258,102,855 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,575 | java | package com.xlccc.lbld;
import java.util.LinkedList;
import java.util.List;
/**
* 全排列问题
*/
public class Permutation {
List<List<Integer>> res = new LinkedList<>();
/*主函数,输入一组不重复的数字,返回他们的全排列*/
List<List<Integer>> permute(int[] nums) {
// 记录【路径】
LinkedList<Integer> track = new LinkedList<>();
backtrack(nums, track);
return res;
}
// 路径:记录在track中
// 选择列表:nums中不存在于track的那些元素
// 结束条件:nums中的元素全都在track中出现
void backtrack(int[] nums, LinkedList<Integer> track) {
// 触发结束条件
if (track.size() == nums.length) {
res.add(new LinkedList<>(track));
return;
}
for (int i = 0; i < nums.length; i++) {
//排除不合法的选择
if (track.contains(nums[i]))
continue;
//做选择
track.add(nums[i]);
//进入下一层决策树
backtrack(nums, track);
//取消选择
track.removeLast();
}
}
public static void main(String[] args) {
int[] nums = {1, 2, 3};
Permutation p = new Permutation();
List<List<Integer>> permutes = p.permute(nums);
for (List<Integer> permute : permutes
) {
for (int value : permute
) {
System.out.print(value);
}
System.out.println();
}
}
}
| [
"xuanlccc@gmail.com"
] | xuanlccc@gmail.com |
124a1fa5fc1e38c6b5656b56681342c323c955da | c39fc3b7de831f8196de787ab84c5a3097e3b357 | /src/com/twu/biblioteca/menu/MainMenu.java | 4345234d1dd75316b2f799fdfbe7921c22ef163b | [
"Apache-2.0"
] | permissive | desireekelly/twu-biblioteca-desireekelly | ea7442ef24923350ad2b15cfad997134398b2270 | 7a520a1cf8cad47942abdce594a20606382ba00f | refs/heads/master | 2021-01-10T11:59:36.658734 | 2015-12-09T04:18:33 | 2015-12-09T04:18:33 | 47,225,167 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,119 | java | package com.twu.biblioteca.menu;
import com.twu.biblioteca.library.Library;
import com.twu.biblioteca.utilities.Messages;
import com.twu.biblioteca.utilities.Utilities;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.InputMismatchException;
import java.util.Scanner;
/**
* MainMenu is responsible for handling the main menu navigation.
*
* @author Desiree Kelly
* @version 1.0
*/
public class MainMenu {
private Scanner input;
private PrintStream outputStream;
private Library library;
private BorrowMenu borrowMenu;
private ReturnMenu returnMenu;
private Messages messages;
private boolean exit;
/**
* Construct a main menu with access to the library, input streams, output streams, borrow menu and return menu.
*/
public MainMenu(Library library, InputStream inputStream, PrintStream outputStream, BorrowMenu borrowMenu, ReturnMenu returnMenu, Messages messages) {
this.library = library;
this.input = new Scanner(inputStream);
this.outputStream = outputStream;
this.borrowMenu = borrowMenu;
this.returnMenu = returnMenu;
this.messages = messages;
exit = false;
}
/**
* Display the main menu options.
*/
public void mainMenu() {
outputStream.print(messages.welcomeMessage());
do {
try {
outputStream.print(messages.mainMenuMessage());
outputStream.print(messages.optionMessage());
if (input.hasNextLine()) {
mainMenuOptions(input.nextInt());
} else {
exit = true;
}
} catch (InputMismatchException e) {
outputStream.print(messages.incorrectInputMessage());
input.nextLine();
}
} while (!exit);
}
/**
* Dispatch to available books, borrow, return or exit.
*
* @param option The option entered on the main menu.-
*/
/* package */ void mainMenuOptions(int option) {
switch (option) {
case 1:
outputStream.print(messages.bookListingMessage());
outputStream.println(Utilities.displayFormattedBookList(library.getAvailableBooks()));
break;
case 2:
if (library.getAvailableBooks().isEmpty()) {
outputStream.print(messages.incorrectBorrowMessage());
break;
}
borrowMenu.displayBorrowMenu();
break;
case 3:
if (library.getBorrowedBooks().isEmpty()) {
outputStream.print(messages.incorrectReturnMessage());
break;
}
returnMenu.displayReturnMenu();
break;
case 4:
outputStream.print(messages.exitMessage());
exit = true;
break;
default:
outputStream.print(messages.incorrectInputMessage());
break;
}
}
} | [
"desireekelly@users.noreply.github.com"
] | desireekelly@users.noreply.github.com |
2821b434b1cbf54336240760a89e52ed1abb11a0 | 4fe38e11ae09c59bb5c04838d5446c124c22247c | /app/src/main/java/com/itca/crud_sqlite/AdminSQLiteOpenHelper.java | 1a3eb56c19bce06295cbff43c50e7eae8efc63ad | [] | no_license | jamt29/CRUDsqlite | 37dd2b3bc58ddcc478f2442d812f277b1bd03ed3 | 8ec69151d7d8d782e68e4a9bbd7db7cd561308c3 | refs/heads/master | 2023-07-23T13:18:29.792683 | 2021-09-09T22:07:39 | 2021-09-09T22:07:39 | 402,554,327 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 800 | java | package com.itca.crud_sqlite;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class AdminSQLiteOpenHelper extends SQLiteOpenHelper {
public AdminSQLiteOpenHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table articulos (codigo int not null primary key, descripcion text, precio real)");
}
@Override
public void onUpgrade(SQLiteDatabase db, int i, int i1) {
db.execSQL("drop table if exists articulos");
onCreate(db);
}
}
| [
"adony.torres29@gmail.com"
] | adony.torres29@gmail.com |
d6a0682685202bcee71f47d2417442d31ee44403 | 6b16cecab4b7d9b1811143c7759b5cad5244709c | /src/main/java/uk/ac/ebi/spot/gwas/deposition/javers/VersionSummaryStats.java | 1fa87ef090504f7f164ffa3e64dde2b040a694d4 | [] | no_license | EBISPOT/gwasdepo-commons | 65be86f5371b4daeb34e3b2cfd427b1462272d2d | 711a007fcb734e94eece1504df3cd508201e73ec | refs/heads/master | 2023-06-10T17:52:49.493993 | 2023-06-01T10:20:24 | 2023-06-01T10:20:24 | 240,874,408 | 0 | 0 | null | 2023-06-01T10:20:25 | 2020-02-16T10:48:33 | Java | UTF-8 | Java | false | false | 2,919 | java | package uk.ac.ebi.spot.gwas.deposition.javers;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class VersionSummaryStats {
@JsonProperty("studiesAdded")
private Integer studiesAdded;
@JsonProperty("studiesRemoved")
private Integer studiesRemoved;
@JsonProperty("ascnsAdded")
private Integer ascnsAdded;
@JsonProperty("ascnsRemoved")
private Integer ascnsRemoved;
@JsonProperty("samplesAdded")
private Integer samplesAdded;
@JsonProperty("samplesRemoved")
private Integer samplesRemoved;
@JsonProperty("reportedTraitsAdded")
private Integer reportedTraitsAdded;
@JsonProperty("reportedTraitsRemoved")
private Integer reportedTraitsRemoved;
@JsonProperty("efoTraitsAdded")
private Integer efoTraitsAdded;
@JsonProperty("efoTraitsRemoved")
private Integer efoTraitsRemoved;
public Integer getStudiesAdded() {
return studiesAdded;
}
public void setStudiesAdded(Integer studiesAdded) {
this.studiesAdded = studiesAdded;
}
public Integer getStudiesRemoved() {
return studiesRemoved;
}
public void setStudiesRemoved(Integer studiesRemoved) {
this.studiesRemoved = studiesRemoved;
}
public Integer getAscnsAdded() {
return ascnsAdded;
}
public void setAscnsAdded(Integer ascnsAdded) {
this.ascnsAdded = ascnsAdded;
}
public Integer getAscnsRemoved() {
return ascnsRemoved;
}
public void setAscnsRemoved(Integer ascnsRemoved) {
this.ascnsRemoved = ascnsRemoved;
}
public Integer getSamplesAdded() {
return samplesAdded;
}
public void setSamplesAdded(Integer samplesAdded) {
this.samplesAdded = samplesAdded;
}
public Integer getSamplesRemoved() {
return samplesRemoved;
}
public void setSamplesRemoved(Integer samplesRemoved) {
this.samplesRemoved = samplesRemoved;
}
public Integer getReportedTraitsAdded() {
return reportedTraitsAdded;
}
public void setReportedTraitsAdded(Integer reportedTraitsAdded) {
this.reportedTraitsAdded = reportedTraitsAdded;
}
public Integer getEfoTraitsAdded() {
return efoTraitsAdded;
}
public void setEfoTraitsAdded(Integer efoTraitsAdded) {
this.efoTraitsAdded = efoTraitsAdded;
}
public Integer getReportedTraitsRemoved() {
return reportedTraitsRemoved;
}
public void setReportedTraitsRemoved(Integer reportedTraitsRemoved) {
this.reportedTraitsRemoved = reportedTraitsRemoved;
}
public Integer getEfoTraitsRemoved() {
return efoTraitsRemoved;
}
public void setEfoTraitsRemoved(Integer efoTraitsRemoved) {
this.efoTraitsRemoved = efoTraitsRemoved;
}
}
| [
"77010716+sajo-ebi@users.noreply.github.com"
] | 77010716+sajo-ebi@users.noreply.github.com |
408ae7e197bc47a8be2b854b13a8d3c19dac52fd | cbb7b4bf391dab46d505d1102bb5da57a6c6bb68 | /tap-ide/src/hms/tap/idea/plugin/runner/ui/TapRunnerEditor.java | e41368df05cfbbc9eba634aeb814305abef94a8f | [
"Apache-2.0"
] | permissive | AnnSinthusha/Maven-project | 0188961d48fa99b71db4703d2e74058449b95ef2 | 899ada78132dfe3453b524cff40c6fbfe324086d | refs/heads/master | 2021-01-19T20:18:58.513274 | 2015-05-19T08:39:35 | 2015-05-19T08:39:35 | 35,605,440 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,329 | java | package hms.tap.idea.plugin.runner.ui;
import hms.tap.idea.plugin.runner.model.TapRunnerConfiguration;
import com.intellij.compiler.impl.ModuleCompileScope;
import com.intellij.openapi.compiler.CompileContext;
import com.intellij.openapi.compiler.CompileTask;
import com.intellij.openapi.compiler.CompilerManager;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.options.SettingsEditor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiDirectory;
import com.intellij.psi.PsiFile;
import com.intellij.psi.search.PsiShortNamesCache;
import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.util.UUID;
/**
* Controller - Jetty Runner Editor
* @see com.intellij.openapi.options.SettingsEditor
* @author Gui Keller
*/
public class TapRunnerEditor extends SettingsEditor<TapRunnerConfiguration> {
private TapRunnerConfPanel configurationPanel;
private String mainOutputDirectory;
public TapRunnerEditor(TapRunnerConfiguration tapRunnerConfiguration) {
this.configurationPanel = new TapRunnerConfPanel();
super.resetFrom(tapRunnerConfiguration);
}
/**
* This is invoked when the form is first loaded.
* The values may be stored in disk, if not, set some defaults
* @param tapRunnerConfiguration tapRunnerConfiguration
*/
@Override
protected void resetEditorFrom(TapRunnerConfiguration tapRunnerConfiguration) {
Project project = tapRunnerConfiguration.getProject();
// WebApp Path
if (tapRunnerConfiguration.getWebappPaths() != null) {
this.configurationPanel.getPathField().setText(tapRunnerConfiguration.getWebappPaths());
} else {
String projectName = project.getName();
this.configurationPanel.getPathField().setText("/"+projectName);
}
// WebApp Folder (one level down to web.xml"
if (tapRunnerConfiguration.getWebappFolders() != null) {
this.configurationPanel.getWebappField().setText(tapRunnerConfiguration.getWebappFolders());
} else {
String webAppsFolder = getWebAppsFolder(project);
this.configurationPanel.getWebappField().setText(webAppsFolder);
}
// Classes directory
if (tapRunnerConfiguration.getClassesDirectories() != null) {
this.configurationPanel.getClassesField().setText(tapRunnerConfiguration.getClassesDirectories());
} else {
String outputDirectory = getMainOutputDirectory(project);
this.configurationPanel.getClassesField().setText(outputDirectory);
}
// Runs on port
if (tapRunnerConfiguration.getRunningOnPort() != null) {
this.configurationPanel.getRunOnPortField().setText(tapRunnerConfiguration.getRunningOnPort());
} else {
this.configurationPanel.getRunOnPortField().setText("8080");
}
// Jetty XML (Optional)
this.configurationPanel.getXmlField().setText(tapRunnerConfiguration.getJettyXml());
// Vm Args (Optional)
this.configurationPanel.getVmArgsField().setText(tapRunnerConfiguration.getVmArgs());
}
/**
* This is invoked when the user fills the form and pushes apply/ok
* @param tapRunnerConfiguration tapRunnerConfiguration
* @throws com.intellij.openapi.options.ConfigurationException ex
*/
@Override
protected void applyEditorTo(TapRunnerConfiguration tapRunnerConfiguration) throws ConfigurationException {
tapRunnerConfiguration.setWebappPaths(this.configurationPanel.getPathField().getText());
tapRunnerConfiguration.setWebappFolders(this.configurationPanel.getWebappField().getText());
tapRunnerConfiguration.setClassesDirectories(this.configurationPanel.getClassesField().getText());
tapRunnerConfiguration.setRunningOnPort(this.configurationPanel.getRunOnPortField().getText());
tapRunnerConfiguration.setJettyXml(this.configurationPanel.getXmlField().getText());
tapRunnerConfiguration.setVmArgs(this.configurationPanel.getVmArgsField().getText());
try {
// Not entirely sure if 'I have' to do this - the IntelliJ framework may do
tapRunnerConfiguration.writeExternal(new Element(TapRunnerConfiguration.PREFIX + UUID.randomUUID().toString()));
} catch (WriteExternalException e) {
throw new RuntimeException(e);
}
}
@NotNull
@Override
protected JComponent createEditor() {
return this.configurationPanel.getMainPanel();
}
// Helpers
/**
* Retrieves the output directory for the main module
* @param project Project
* @return String value
*/
private String getMainOutputDirectory(Project project) {
// Preparing things up for a sneaky "CompileTask"
final CompilerManager compilerManager = CompilerManager.getInstance(project);
final Module[] modules = ModuleManager.getInstance(project).getModules();
final ModuleCompileScope compileScope = new ModuleCompileScope(project, modules, false);
final Module mainModule = modules[0];
// Though a "CompileTask" I can get hold of the "CompileContext"
CompileTask compileTask = new CompileTask() {
public boolean execute(CompileContext compileContext) {
// Through the "CompileContext" I can get the output directory of the main module
VirtualFile mainOutputDirectory = compileContext.getModuleOutputDirectory(mainModule);
TapRunnerEditor.this.mainOutputDirectory = mainOutputDirectory.getPresentableUrl();
return true;
}
};
// Executes the task (synchronously), which invokes that internal 'execute' method
compilerManager.executeTask(compileTask, compileScope, "JettyRunner-By-GuiKeller", null);
return this.mainOutputDirectory;
}
/**
* Returns the most probable WebApps folder
* @param project Project
* @return String value
*/
private String getWebAppsFolder(Project project) {
// Using the api to look for the web.xml
PsiShortNamesCache namesCache = PsiShortNamesCache.getInstance(project);
PsiFile[] webXML = namesCache.getFilesByName("web.xml");
if (webXML == null || webXML.length < 1) return "";
// Grab the first one that the api found
PsiFile file = webXML[0];
// The parent folder is the "WEB-INF" folder
PsiDirectory webInfFolder = file.getParent();
if (webInfFolder == null) return "";
// The parent folder to "WEB-INF" is the WebApps folder
PsiDirectory webappFolder = webInfFolder.getParent();
if (webappFolder == null) return "";
// Folder found, returns it to the user
VirtualFile virtualFile = webappFolder.getVirtualFile();
return virtualFile.getPresentableUrl();
}
public void setConfigurationPanel(TapRunnerConfPanel configurationPanel) {
this.configurationPanel = configurationPanel;
}
}
| [
"anns@hsenidmobile.com"
] | anns@hsenidmobile.com |
489d2d785872e658ba1718af715b85f1d70da5d0 | 45eb9fb4702477e27a74614c278c0164000ad589 | /modulo3/evaluación - grupo2/Proyecto JBMR/Banco_JoseB_JoseG_CarlosP/src/java/com/saime/models/User.java | b39fa5d047a43d3c951a57b9ce7fa023f8a74243 | [
"MIT"
] | permissive | jcc1110/carrera-java-2 | 48473abe83dae0321776b163a6d312ecca765858 | 6aa12c0b44c655ec07305df6d1c2e9ed4c7b8aff | refs/heads/master | 2020-04-11T04:24:05.567589 | 2018-05-02T20:40:56 | 2018-05-02T20:40:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 788 | java |
package com.saime.models;
/**
*
* @author
*/
public class User {
private int id;
private String username;
private String password;
public User(int id, String username, String password, String fname, String lname)
{
this.id = id;
this.username = username;
this.password = password;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
| [
"shaka430@hotmail.com"
] | shaka430@hotmail.com |
ee9ce693f627c9c3a6c7b55ae4a7057d1f4318a5 | 50c8877be4bcb3c72369cea56542b360da542d87 | /stylesheet/Shawn/src/atm1.java | 453911dfca6679ea7b16bbf0d084c8d8d9ad617e | [] | no_license | shendilzer/shendilzer.github.io | 31976ad253946c1f8a436fa9f9c3429a8303d65b | 50d66fd505f434fc3d5d1070a4741ed0fa98c7e5 | refs/heads/master | 2021-01-10T04:19:15.876949 | 2016-03-23T08:23:01 | 2016-03-23T08:23:01 | 52,004,435 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,324 | java | import javax.swing.*;
public class atm1 {
public static int money = 500,add;
public static int balance, accountNumber, password,repassword, iaccountNumber, ipassword, main = 0, choice1;
public static String accountName;
public static void main(String[] args){
Start();
SignIn();
LogIn();
WidDep();
Deposit();
Withdraw();
}
public static int Start(){
String Choice1 = JOptionPane.showInputDialog("WELCOME!\n\nDo You Have Already have an Account? [1] Log In\nDon't have an Account? [2] Create Account");
int choice1 = Integer.parseInt(Choice1);
if (choice1 == 1)
{
LogIn();
JOptionPane.showMessageDialog(null, "Invalid Selection!\nTry Again.");
return Start();
}
else if (choice1 == 2) return SignIn();
else{
JOptionPane.showMessageDialog(null, "Invalid Selection!\nTry Again.");
return Start();
}
}
public static int SignIn(){
JDialog.setDefaultLookAndFeelDecorated(true);
JTextField no1 = new JTextField();
JTextField no2 = new JTextField();
JTextField no3 = new JPasswordField();
JTextField no4 = new JPasswordField();
Object[] SignIn = {
"Please fill up the following.\n\nAccount Number:", no1,
"Account Name:",no2,
"Password:", no3,
"Retype Password", no4,
};
JOptionPane.showConfirmDialog(null, SignIn, "Welcome To our ATM Machine", JOptionPane.OK_CANCEL_OPTION);
String AccountNumber = no1.getText();
String AccountName = no2.getText();
String Password = no3.getText();
String Repassword = no4.getText();
accountNumber = Integer.parseInt(AccountNumber);
accountName= AccountName;
password = Integer.parseInt(Password);
repassword = Integer.parseInt(Repassword);
if (password == repassword){
JOptionPane.showMessageDialog(null, "Account Created!!!");
return Start();
}
else if (password != repassword){
JOptionPane.showMessageDialog(null, "Password does not match.\n\nTry Again.");
return SignIn();
}
return main;
}
public static int LogIn(){
JDialog.setDefaultLookAndFeelDecorated(true);
JTextField no5 = new JTextField();
JTextField no6 = new JPasswordField();
Object[] login = {
"Log In\n\nAccount Number", no5,
"Password", no6,
};
JOptionPane.showConfirmDialog(null, login, "SM's ATM Machine", JOptionPane.OK_CANCEL_OPTION);
String IaccountNumber = no5.getText();
String Ipassword = no6.getText();
iaccountNumber = Integer.parseInt(IaccountNumber);
ipassword = Integer.parseInt(Ipassword);
if(accountNumber == iaccountNumber && password == ipassword) return WidDep();
else if (accountNumber != iaccountNumber || password != repassword){
JOptionPane.showMessageDialog(null, "Invalid Account Number / Password\n\nTry Again.");
return Start();
}
return main;
}
public static int WidDep(){
String Choice2 = JOptionPane.showInputDialog("Welcome " + accountName + "\n\n*Note: You have Php " +money+".00 as initial deposit.\n\n[1] Deposit\n[2] Withdrawal\n[3]Log out");
int choice2 = Integer.parseInt(Choice2);
if (choice2 == 1)
return Deposit();
else if (choice2 == 2)
return Withdraw();
else if (choice2 == 3){
JOptionPane.showMessageDialog(null, "Successfully Logged Out.\n"+"Thank You For Using Our ATM Machine" );
return Start();}
else{
JOptionPane.showMessageDialog(null,"Invalid Choice.\n\nTry Again.");
return WidDep();
}
}
public static int Deposit(){
String Add = JOptionPane.showInputDialog("Your Current Balance is Php " + money + ".00\n\nHow much would you like to deposit:");
int add = Integer.parseInt(Add);
money = money;
return WidDep();
}
public static int Withdraw(){
String Choice3 = JOptionPane.showInputDialog("[1] Savings Account\n[2] Available Balance\n[3] Log Out");
int choice3 = Integer.parseInt(Choice3);
int drawable = money - 100 ;
if (choice3 == 1){
String Withdrawn = JOptionPane.showInputDialog("How much money would you like to withdraw?");
int withdrawn = Integer.parseInt(Withdrawn);
while(withdrawn==20000)
{
JOptionPane.showMessageDialog(null, "Invalid Input!");
return Withdraw();
}
balance = money;
if (withdrawn <= drawable) {
balance=balance-withdrawn;
JOptionPane.showMessageDialog(null, "You have successfully Withdrawed Php " +withdrawn + ".00\n\nYour remaining balance is Php " + balance + ".");
}
else if (withdrawn > drawable) {
balance=balance;
JOptionPane.showMessageDialog(null, "Not ALLOWED To Withdrawed Php " + withdrawn + ".00\n\nYour remaining balance is Php " + balance + ".");
JOptionPane.showMessageDialog(null, "Insufficient Balance In Account.\n\nTry Again");
}
money = balance;
return WidDep ();
}
else if (choice3 == 2){
JOptionPane.showMessageDialog(null, "Your remaining balance is Php " + money + ".00\n\nWithdrawable Amount: Php " + drawable+".00");
return WidDep();}
else if (choice3 == 3){
JOptionPane.showMessageDialog(null, "Successfully Logged Out."+"Thank You For Using Our ATM Machine "+"\n\t Have A nice Day!!");
return LogIn();}
else{
JOptionPane.showMessageDialog(null,"Invalid Choice.\n\nTry Again.");
return Withdraw();
}
}
private static int Choice3() {
// TODO Auto-generated method stub
return 0;
}
}
| [
"sshendilzer17@gmail.com"
] | sshendilzer17@gmail.com |
7de8c29183ef0cb8c36e163eb6863638b1ee2b26 | 172127b085d22e624365a0c8fb09c3e590fdbc90 | /src/Node.java | 93a698ce96b3d61cd725e9ee1435ddbf5acd1237 | [] | no_license | MironSz/CompressedTrees | 2520605cfe99bdbfeb30b215f393356454986e90 | beef85a19c52914ca1554d06ae6d6be85139c8f7 | refs/heads/master | 2021-01-23T04:58:45.133974 | 2017-06-15T15:09:39 | 2017-06-15T15:09:39 | 92,946,047 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,908 | java | import java.util.Scanner;
/**
* Created by Miron on 31.05.2017.
*/
public class Node {
private int compressedId;
private Node father;
private int val;
private Node left;
private Node right;
private Tree tree;
private int hash = -1;
private int P=1000000007,M=1000000009;/*Jakies liczby do hashowania*/
private Node copy;/*Wierzchołek, którego ten wierzchołek jest kopią*/
public void setCompressedId(int n)
{
this.compressedId=n;
}
public int compressedId()
{
return compressedId;
}
public Node father()
{
return father;
}
public void setCopy(Node node)
{
this.copy=node;
}
public Node copy()
{
return this.copy;
}
public boolean isCopy()
{
return this.copy()!=this;
}
public int val()
{
return val;
}
public Node left()
{
return left;
}
public Node right()
{
return right;
}
public void setLeft(Node n)
{
left=n;
}
public void setRight(Node n)
{
right=n;
}
public Node(Tree tree,Node father)
{
this.father=father;
if(father==null)
this.father=this;
this.copy=this;
this.tree=tree;
}
public Node(Tree tree, int val, Node father)
{
this(tree,father);
this.val=val;
this.left=null;
this.right=null;
}
public void readNodeFromInput(Scanner scanner, int val, Integer numberOfNodes)
{
numberOfNodes=numberOfNodes+1;
tree.preOrderListOfNodes().add(this);
this.val=val;
int a=scanner.nextInt();
if(a!=0)
{
this.left=new Node(tree,this);
this.left.readNodeFromInput(scanner,a,numberOfNodes);
}
else
{
tree.preOrderListOfNodes().add(tree.ventNode());
this.left=tree.ventNode();
}
a=scanner.nextInt();
if(a!=0)
{
this.right=new Node(tree,this);
this.right.readNodeFromInput(scanner,a,numberOfNodes);
}
else
{
tree.preOrderListOfNodes().add(tree.ventNode());
this.right=tree.ventNode();
}
tree.postOrderListOfNodes().add(this);
}
public int hashCode()
{
if(hash != -1)
return hash;
if(this==tree.ventNode())
return 0;
long res=((this.val*P*P)+this.left().hashCode()*P+this.right().hashCode())%M;
this.hash=(int)res;
return (int) res;
}
public boolean equals(Object o)
{
if(o instanceof Node)
{
if(this.left()==(Node)((Node) o).left()&&this.right()==(Node)((Node) o).right()&&this.val()==((Node) o).val())
return true;
}
return false;
}
}
| [
"ms383504@students.mimuw.edu.pl"
] | ms383504@students.mimuw.edu.pl |
de314ba24ac7cc4aa7535d591db25b46d3f837c0 | 8be4beeb81c873705f03317695f3df1d24c1a5fb | /features/src/main/java/com/bizo/dtonator/domain/AbstractManager.java | a11f8af81079293f0ae57d563c9a976a4d265bf8 | [
"Apache-2.0"
] | permissive | Alex130/dtonator | 87d41051bca89ea91f5a4d9946a6bf5cb8ed1601 | 72fe5fa92fcac0b74c4636d12cd063a905ccf9d0 | refs/heads/master | 2020-03-20T21:11:30.481686 | 2017-11-10T17:04:04 | 2017-11-10T17:04:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,144 | java | package com.bizo.dtonator.domain;
import java.util.List;
import java.util.Set;
public abstract class AbstractManager<T extends Account, V extends Account> {
private Long id;
private String name;
private T account;
private int employees;
private List<V> managedAccounts;
public AbstractManager() {
}
public AbstractManager(final Long id, String name) {
setId(id);
setName(name);
}
public Long getId() {
return id;
}
public void setId(final Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public T getAccount() {
return account;
}
public void setAccount(T account) {
this.account = account;
}
public int getEmployees() {
return employees;
}
public void setEmployees(int employees) {
this.employees = employees;
}
public List<V> getManagedAccounts() {
return managedAccounts;
}
public void setManagedAccounts(List<V> managedAccounts) {
this.managedAccounts = managedAccounts;
}
public Set<Long> getManagedAccountIds() {
return null;
}
}
| [
"pbuchheit@tura.com"
] | pbuchheit@tura.com |
d704d2afbc084a8d39dc824e074495fb0d7e9b37 | 3d3f6f81ed4b8a036c067b6f016a3b906ef3a696 | /src/main/java/deadlock/Writer.java | 50059dde6f22a5e174f6f4d3ccda5e377577681f | [] | no_license | nimishsingh11/java-practice | c020ebc84e2fdeb9b10f0e7db13919f642226799 | 3af2916af8279ef798ea77bd18505da4e9d0b012 | refs/heads/master | 2023-07-05T08:39:55.181811 | 2021-08-12T08:03:30 | 2021-08-12T08:03:30 | 377,409,876 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 780 | java | package deadlock;
import java.util.Random;
public class Writer implements Runnable {
private Message message;
public Writer(Message message) {
this.message = message;
}
public void run() {
String messages[] = {
"Humpty Dumpty sat on a wall",
"Humpty Dumpty had a great fall",
"All the king's horses and all the king's men",
"Couldn't put Humpty together again"
};
Random random = new Random();
for(int i=0; i<messages.length; i++) {
message.write(messages[i]);
try {
Thread.sleep(random.nextInt(2000));
} catch(InterruptedException e) {
}
}
message.write("Finished");
}
}
| [
"76872529+nimishsumo@users.noreply.github.com"
] | 76872529+nimishsumo@users.noreply.github.com |
dfd38a27d7e5e517c4c71c463be486e486768e39 | f0fcff74111a8ffc317b3b84cca694c9309c24dc | /src/main/Materials/August25/Lesson 14/LectureConcurrent/src/main/java/Semafore/BoundedHashSet.java | 64ee58ff398178599c91b4829c36497674472ee9 | [] | no_license | AIChernyavskiy/JavaSchoolRND2016 | f06c05c7e807fb91dd931b6cdeaf5b8846fb3806 | 652d07898611955beb9d9718496e115aa0fe84f3 | refs/heads/master | 2020-04-12T08:55:36.478223 | 2016-10-24T17:32:44 | 2016-10-24T17:32:44 | 63,176,768 | 0 | 1 | null | 2016-07-24T16:31:09 | 2016-07-12T17:01:59 | Java | UTF-8 | Java | false | false | 881 | java | package Semafore;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.Semaphore;
/**
* Created by sbt-raspopov-om on 25/08/2016.
*/
public class BoundedHashSet<T> {
private final Set<T> set;
private final Semaphore sem;
public BoundedHashSet(int bound) {
this.set = Collections.synchronizedSet
(new HashSet<T>());
sem = new Semaphore(bound);
}
public boolean add(T o) throws InterruptedException {
sem.acquire();
boolean wasAdded = false;
try {
wasAdded = set.add(o);
return wasAdded;
} finally {
if (!wasAdded) sem.release();
}
}
public boolean remove(Object o) {
boolean wasRemoved = set.remove(o);
if (wasRemoved) sem.release();
return wasRemoved;
}
} | [
"aichernyavskiy@mail.ru"
] | aichernyavskiy@mail.ru |
99e395ed1c749e439aac075f608312d0f5b26fc9 | 20a11652eb06b3bb16c3d8cd8a23f2f5a22fa2e9 | /app/src/main/java/com/guohanhealth/shop/ui/fenxiao/FenxiaoWithdrawalsActivity.java | be75b4d27f8e4e86b5afd952daa9204da5abbcb3 | [] | no_license | majicking/ghdjksc | 4d1f45474893ff084956684f64eed6887c56bc47 | 2fd0bb31368be669057a95d8dc75d4923ba3f332 | refs/heads/master | 2020-03-17T09:43:01.581634 | 2018-08-07T09:43:21 | 2018-08-07T09:43:21 | 133,450,237 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,559 | java | package com.guohanhealth.shop.ui.fenxiao;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.orhanobut.logger.Logger;
import com.guohanhealth.shop.common.StringUtils;
import com.guohanhealth.shop.BaseActivity;
import com.guohanhealth.shop.R;
import com.guohanhealth.shop.common.Constants;
import com.guohanhealth.shop.common.MyShopApplication;
import com.guohanhealth.shop.common.ShopHelper;
import com.guohanhealth.shop.common.T;
import com.guohanhealth.shop.http.RemoteDataHandler;
import com.guohanhealth.shop.http.ResponseData;
import org.apache.http.HttpStatus;
import java.util.HashMap;
/**
* Created by snm on 2016/9/23.
*/
public class FenxiaoWithdrawalsActivity extends BaseActivity {
private TextView tv_keyong,tv_box_applay;
private EditText etjiner,etpass;
private String price = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_withdrawals_main);
Intent intent = getIntent();
price = intent.getStringExtra("price");
setCommonHeader("申请提现");
initView();
}
public void initView(){
tv_keyong = (TextView)findViewById(R.id.tv_keyong);
tv_box_applay = (TextView)findViewById(R.id.tv_box_applay);
etjiner = (EditText) findViewById(R.id.etjiner);
etpass = (EditText)findViewById(R.id.etpass);
tv_box_applay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String jiner = etjiner.getText().toString().trim();
String pass = etpass.getText().toString().trim();
if(isImplay(jiner,pass)){
cash_apply(jiner,pass);
}
}
});
tv_keyong.setText("可提现金额 ¥" + (TextUtils.isEmpty(price)?"0":price));
}
public Boolean isImplay(String jiner,String pass){
if(StringUtils.isEmpty(jiner)){
T.showShort(getApplicationContext(),"输入的金额不能为空");
return false;
}
if(StringUtils.isEmpty(pass)){
T.showShort(getApplicationContext(),"输入的密码不能为空");
return false;
}
return true;
}
public void cash_apply(String jiner,String pass){
String url = Constants.URL_CASH_APPLY;
HashMap<String, String> params = new HashMap<String, String>();
params.put("key", MyShopApplication.getInstance().getLoginKey());
params.put("cash_amount", jiner);
params.put("pay_pwd", pass);
RemoteDataHandler.asyncLoginPostDataString(url, params, MyShopApplication.getInstance(), new RemoteDataHandler.Callback() {
@Override
public void dataLoaded(ResponseData data) {
String json = data.getJson();
// Logger.d(data.toString());
if (data.getCode() == HttpStatus.SC_OK) {
if("1".equals(json)){
T.showShort(getApplicationContext(),"提现成功");
finish();
}else {
T.showShort(getApplicationContext(),"提现失败");
}
} else {
ShopHelper.showApiError(getApplicationContext(), json);
}
}
});
}
}
| [
"majick@aliyun.com"
] | majick@aliyun.com |
d271fd00c8f7e322b6f9165fe1fe4d8048da54bc | 782ce569364142b3195f6aa552460c6c7418a374 | /XWeather/Droid/obj/Debug/MonoAndroid60/android/src/md5f15a4a710efbbf681793b69e000b94be/LocationSearchFilter.java | d0ca5cc9dac45176172b59fbd4fff1e91878b087 | [] | no_license | Avieeee/Weather-app | 97090362fb28658036f874f0e84139488f58d798 | f1d620bd21918ecc0031c02d75b5314873f66f68 | refs/heads/master | 2020-03-28T10:05:38.332234 | 2018-09-26T22:10:21 | 2018-09-26T22:10:21 | 148,082,583 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,115 | java | package md5f15a4a710efbbf681793b69e000b94be;
public class LocationSearchFilter
extends android.widget.Filter
implements
mono.android.IGCUserPeer
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"n_performFiltering:(Ljava/lang/CharSequence;)Landroid/widget/Filter$FilterResults;:GetPerformFiltering_Ljava_lang_CharSequence_Handler\n" +
"n_publishResults:(Ljava/lang/CharSequence;Landroid/widget/Filter$FilterResults;)V:GetPublishResults_Ljava_lang_CharSequence_Landroid_widget_Filter_FilterResults_Handler\n" +
"";
mono.android.Runtime.register ("XWeather.Droid.LocationSearchFilter, XWeather.Droid", LocationSearchFilter.class, __md_methods);
}
public LocationSearchFilter ()
{
super ();
if (getClass () == LocationSearchFilter.class)
mono.android.TypeManager.Activate ("XWeather.Droid.LocationSearchFilter, XWeather.Droid", "", this, new java.lang.Object[] { });
}
public LocationSearchFilter (android.app.Activity p0, md5f15a4a710efbbf681793b69e000b94be.LocationSearchRecyclerAdapter p1)
{
super ();
if (getClass () == LocationSearchFilter.class)
mono.android.TypeManager.Activate ("XWeather.Droid.LocationSearchFilter, XWeather.Droid", "Android.App.Activity, Mono.Android:XWeather.Droid.LocationSearchRecyclerAdapter, XWeather.Droid", this, new java.lang.Object[] { p0, p1 });
}
public android.widget.Filter.FilterResults performFiltering (java.lang.CharSequence p0)
{
return n_performFiltering (p0);
}
private native android.widget.Filter.FilterResults n_performFiltering (java.lang.CharSequence p0);
public void publishResults (java.lang.CharSequence p0, android.widget.Filter.FilterResults p1)
{
n_publishResults (p0, p1);
}
private native void n_publishResults (java.lang.CharSequence p0, android.widget.Filter.FilterResults p1);
private java.util.ArrayList refList;
public void monodroidAddReference (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void monodroidClearReferences ()
{
if (refList != null)
refList.clear ();
}
}
| [
"spriyana@deakin.edu.au"
] | spriyana@deakin.edu.au |
02ff2a7007de52fd7e2b7df047f9f8775f83182c | 9c7a87a5e8c9cb147bede721b15adb8332dc3ce4 | /rabbitmq-spring/src/main/java/com/hualala/rabbitmqspring/cconverter/TextMessageConverter.java | a0dfc764ceedcefd570d6f73a413745d30a7b1cd | [] | no_license | lifei-coder/study | 0b8aabb2c12f55a8cfd15efa4876d80716e8523a | 4f582be0d6f8fe1d6bc2543cd6592ed0c1a15325 | refs/heads/master | 2022-04-27T19:57:49.387680 | 2022-03-29T06:40:41 | 2022-03-29T06:40:41 | 217,253,374 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,198 | java | package com.hualala.rabbitmqspring.cconverter;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.amqp.support.converter.MessageConversionException;
import org.springframework.amqp.support.converter.MessageConverter;
/**
* MessageConverter 消息转换器
* 我们在进行发送消息的时候, 正常情况下消息体为二进制的数据方式进行传输, 如果希望内部帮我们进行转换,或指定自定义的转换器,
* 就需要用到MessageConverter
*
* 自定义常用转换器:MessageConverter, 一般都需要实现这个接口
* 重写下面两个方法
* toMessage: java对象转换为Message
* fromMessage: Message对象转换为java对象
*
* Json转换器: Jackson2JsonMessageConverter: 可以进行java对象的转换功能
* DefaultJackson2JavaTypeMapper映射器: 可以进行Java对象的映射关系
* 自定义二进制转换器: 比如图片类型、PDF、PPT、流媒体
*
*
*
*/
public class TextMessageConverter implements MessageConverter {
/**
* Convert a Java Object to a Message
* @param object
* @param messageProperties
* @return
* @throws MessageConversionException
*/
@Override
public Message toMessage(Object object, MessageProperties messageProperties) throws MessageConversionException {
return new Message(object.toString().getBytes(), messageProperties);
}
/**
*
* Convert from a Message to a Java Object。
* before consume message, we can do something with the message
* @param message
* @return
* @throws MessageConversionException
*/
@Override
public Object fromMessage(Message message) throws MessageConversionException {
String contentType = message.getMessageProperties().getContentType();
if (null != contentType && contentType.contains("text")) {
// 若是纯文本的消息, 返回一个String.
// 我们定义的MessageDelegate.consumeMessage(String messageBody)方法就会接受到此放回值
return new String(message.getBody());
}
return message.getBody();
}
}
| [
"lifei@hualala.com"
] | lifei@hualala.com |
8824ee36d004922ea6d780135cda4bd7056a907d | 599f1712c4980ac20f33563d80bba3c653532607 | /elevator_mobile/.svn/pristine/88/8824ee36d004922ea6d780135cda4bd7056a907d.svn-base | a04019ebd91b32a2a072bf48429cca3b2f317fb6 | [] | no_license | GitQian/MyProject | 8a09e45bc896e215f4d5048b9e5b99038e42d2e2 | d036258a24fa8af03eeebd3798f7811d3f114870 | refs/heads/master | 2021-01-17T06:11:39.051990 | 2016-07-27T09:17:27 | 2016-07-27T09:17:27 | 47,263,263 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,270 | /*
* android-spinnerwheel
* https://github.com/ai212983/android-spinnerwheel
*
* based on
*
* Android Wheel Control.
* https://code.google.com/p/android-wheel/
*
* Copyright 2011 Yuri Kanivets
*
* 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.chinacnit.elevatorguard.mobile.ui.wheel;
/**
* Range for visible items.
*/
public class ItemsRange {
// First item number
private int first;
// Items count
private int count;
/**
* Default constructor. Creates an empty range
*/
public ItemsRange() {
this(0, 0);
}
/**
* Constructor
* @param first the number of first item
* @param count the count of items
*/
public ItemsRange(int first, int count) {
this.first = first;
this.count = count;
}
/**
* Gets number of first item
* @return the number of the first item
*/
public int getFirst() {
return first;
}
/**
* Gets number of last item
* @return the number of last item
*/
public int getLast() {
return getFirst() + getCount() - 1;
}
/**
* Get items count
* @return the count of items
*/
public int getCount() {
return count;
}
/**
* Tests whether item is contained by range
* @param index the item number
* @return true if item is contained
*/
public boolean contains(int index) {
return index >= getFirst() && index <= getLast();
}
} | [
"651564194@qq.com"
] | 651564194@qq.com | |
f5b8cf6d82422a677644af37ab4f6ef9a0f5c313 | a5dbeadebfd268a529d6a012fb23dc0b635f9b8c | /core/src/main/java/ru/mipt/cybersecurity/crypto/digests/SkeinDigest.java | 407d044254b19840aaf47eb125f020358d393f98 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | skhvostyuk/CyberSecurity | 22f6a272e38b56bfb054aae0dd7aa03bc96b6d06 | 33ea483df41973984d0edbe47a20201b204150aa | refs/heads/master | 2021-08-29T04:44:31.041415 | 2017-12-13T12:15:29 | 2017-12-13T12:15:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,179 | java | package ru.mipt.cybersecurity.crypto.digests;
import ru.mipt.cybersecurity.crypto.ExtendedDigest;
import ru.mipt.cybersecurity.crypto.engines.ThreefishEngine;
import ru.mipt.cybersecurity.crypto.params.SkeinParameters;
import ru.mipt.cybersecurity.util.Memoable;
/**
* Implementation of the Skein parameterised hash function in 256, 512 and 1024 bit block sizes,
* based on the {@link ThreefishEngine Threefish} tweakable block cipher.
* <p>
* This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
* competition in October 2010.
* <p>
* Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
* Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
*
* @see SkeinEngine
* @see SkeinParameters
*/
public class SkeinDigest
implements ExtendedDigest, Memoable
{
/**
* 256 bit block size - Skein-256
*/
public static final int SKEIN_256 = SkeinEngine.SKEIN_256;
/**
* 512 bit block size - Skein-512
*/
public static final int SKEIN_512 = SkeinEngine.SKEIN_512;
/**
* 1024 bit block size - Skein-1024
*/
public static final int SKEIN_1024 = SkeinEngine.SKEIN_1024;
private SkeinEngine engine;
/**
* Constructs a Skein digest with an internal state size and output size.
*
* @param stateSizeBits the internal state size in bits - one of {@link #SKEIN_256}, {@link #SKEIN_512} or
* {@link #SKEIN_1024}.
* @param digestSizeBits the output/digest size to produce in bits, which must be an integral number of
* bytes.
*/
public SkeinDigest(int stateSizeBits, int digestSizeBits)
{
this.engine = new SkeinEngine(stateSizeBits, digestSizeBits);
init(null);
}
public SkeinDigest(SkeinDigest digest)
{
this.engine = new SkeinEngine(digest.engine);
}
public void reset(Memoable other)
{
SkeinDigest d = (SkeinDigest)other;
engine.reset(d.engine);
}
public Memoable copy()
{
return new SkeinDigest(this);
}
public String getAlgorithmName()
{
return "Skein-" + (engine.getBlockSize() * 8) + "-" + (engine.getOutputSize() * 8);
}
public int getDigestSize()
{
return engine.getOutputSize();
}
public int getByteLength()
{
return engine.getBlockSize();
}
/**
* Optionally initialises the Skein digest with the provided parameters.<br>
* See {@link SkeinParameters} for details on the parameterisation of the Skein hash function.
*
* @param params the parameters to apply to this engine, or <code>null</code> to use no parameters.
*/
public void init(SkeinParameters params)
{
engine.init(params);
}
public void reset()
{
engine.reset();
}
public void update(byte in)
{
engine.update(in);
}
public void update(byte[] in, int inOff, int len)
{
engine.update(in, inOff, len);
}
public int doFinal(byte[] out, int outOff)
{
return engine.doFinal(out, outOff);
}
}
| [
"hvostuksergey@gmail.com"
] | hvostuksergey@gmail.com |
45063643948e46577a81f90428232d4ebe792673 | fbef57a4441c21c096ace9b53c4dbbc6ac26fd39 | /src/main/java/jp/co/systena/tigerscave/ShoppingSite/Cart.java | 83a02239f27defd04398977640ef25818694549b | [] | no_license | fukutay/webjava_1 | 37521a671b541bc4cdc178981201f4436a2bfaf1 | 4253aa501952ed46835657213c16c71e15120c33 | refs/heads/master | 2020-03-17T22:41:42.097846 | 2018-05-19T00:44:51 | 2018-05-19T00:44:51 | 134,015,269 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 71 | java | package jp.co.systena.tigerscave.ShoppingSite;
public class Cart {
}
| [
"yuki@yuki-W517PU"
] | yuki@yuki-W517PU |
c599cfd15744b29d1375c5faf7cfe895c861b2ce | 0b9c8ad7a3025e732fc9b1db5752c74ef8ba67ae | /src/main/java/pl/edu/icm/jlargearrays/ObjectLargeArray.java | 05d30c9d7b69a334a092b6c4697768bf7cd3e0a8 | [
"BSD-2-Clause"
] | permissive | carandraug/debian-libjlargearrays-java | fd5c8a6db6cb23f6f9a26d7fa72cc4d402c83e52 | 155cce53f95eb1218bb20442c2060a5ca630b3e5 | refs/heads/master | 2020-12-02T06:45:33.416281 | 2017-09-08T14:40:55 | 2017-09-08T14:40:55 | 96,893,907 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 16,102 | java | /* ***** BEGIN LICENSE BLOCK *****
* JLargeArrays
* Copyright (C) 2013 onward University of Warsaw, ICM
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
package pl.edu.icm.jlargearrays;
import com.sun.xml.internal.ws.encoding.soap.SerializationException;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import sun.misc.Cleaner;
import org.apache.commons.math3.util.FastMath;
/**
*
* An array of objects that can store up to 2<SUP>63</SUP> elements.
*
* @author Piotr Wendykier (p.wendykier@icm.edu.pl)
*/
public class ObjectLargeArray extends LargeArray
{
private static final long serialVersionUID = -4096759496772248522L;
private Object[] data;
private ShortLargeArray objectLengths;
private int maxObjectLength;
private long size;
private byte[] byteArray;
/**
* Creates new instance of this class. The maximal string length is set to 100.
*
* @param length number of elements
*/
public ObjectLargeArray(long length)
{
this(length, 1024);
}
/**
* Creates new instance of this class.
*
* @param length number of elements
* @param maxObjectLength maximal length of the object serialized to an array of bytes, it is ignored when number of elements is smaller than
* LargeArray.getMaxSizeOf43bitArray()
*/
public ObjectLargeArray(long length, int maxObjectLength)
{
this(length, maxObjectLength, true);
}
/**
* Creates new instance of this class.
*
* @param length number of elements
* @param maxObjectLength maximal length of the object serialized to an array of bytes, it is ignored when number of elements is smaller than
* LargeArray.getMaxSizeOf43bitArray()
* @param zeroNativeMemory if true, then the native memory is zeroed.
*/
public ObjectLargeArray(long length, int maxObjectLength, boolean zeroNativeMemory)
{
this.type = LargeArrayType.OBJECT;
this.sizeof = 1;
if (length <= 0) {
throw new IllegalArgumentException(length + " is not a positive long value.");
}
if (maxObjectLength <= 0) {
throw new IllegalArgumentException(maxObjectLength + " is not a positive int value.");
}
this.length = length;
this.size = length * (long) maxObjectLength;
this.maxObjectLength = maxObjectLength;
if (length > getMaxSizeOf32bitArray()) {
this.ptr = LargeArrayUtils.UNSAFE.allocateMemory(this.size * this.sizeof);
if (zeroNativeMemory) {
zeroNativeMemory(this.size);
}
Cleaner.create(this, new Deallocator(this.ptr, this.size, this.sizeof));
MemoryCounter.increaseCounter(this.size * this.sizeof);
objectLengths = new ShortLargeArray(length);
byteArray = new byte[maxObjectLength];
} else {
data = new Object[(int) length];
}
}
/**
* Creates a constant array.
* <p>
* @param length number of elements
* @param constantValue value
*/
public ObjectLargeArray(long length, Object constantValue)
{
this.type = LargeArrayType.OBJECT;
this.sizeof = 1;
if (length <= 0) {
throw new IllegalArgumentException(length + " is not a positive long value");
}
this.length = length;
this.isConstant = true;
this.data = new Object[]{constantValue};
}
/**
* Creates new instance of this class.
*
* @param data data array, this reference is used internally.
*/
public ObjectLargeArray(Object[] data)
{
this.type = LargeArrayType.OBJECT;
this.sizeof = 1;
this.length = data.length;
this.data = data;
}
/**
* Returns a deep copy of this instance. (The elements themselves are copied.)
*
* @return a clone of this instance
*/
@Override
public ObjectLargeArray clone()
{
if (isConstant) {
return new ObjectLargeArray(length, get(0));
} else {
ObjectLargeArray v = new ObjectLargeArray(length, FastMath.max(1, maxObjectLength), false);
LargeArrayUtils.arraycopy(this, 0, v, 0, length);
return v;
}
}
@Override
public boolean equals(Object o)
{
if (super.equals(o)) {
ObjectLargeArray la = (ObjectLargeArray) o;
boolean res = this.maxObjectLength == la.maxObjectLength && this.data == la.data;
if (this.objectLengths != null && la.objectLengths != null) {
return res && this.objectLengths.equals(la.objectLengths);
} else if (this.objectLengths == la.objectLengths) {
return res;
} else {
return false;
}
}
return false;
}
@Override
public int hashCode()
{
int hash = 29 * super.hashCode() + (this.data != null ? this.data.hashCode() : 0);
hash = 29 * hash + (int) (this.maxObjectLength ^ (this.maxObjectLength >>> 16));
return 29 * hash + (this.objectLengths != null ? this.objectLengths.hashCode() : 0);
}
@Override
public final Object get(long i)
{
if (ptr != 0) {
short objLen = objectLengths.getShort(i);
if (objLen < 0) return null;
long offset = sizeof * i * maxObjectLength;
for (int j = 0; j < objLen; j++) {
byteArray[j] = LargeArrayUtils.UNSAFE.getByte(ptr + offset + sizeof * j);
}
return fromByteArray(byteArray);
} else if (isConstant) {
return data[0];
} else {
return data[(int) i];
}
}
@Override
public final Object getFromNative(long i)
{
short objLen = objectLengths.getShort(i);
if (objLen < 0) return null;
long offset = sizeof * i * maxObjectLength;
for (int j = 0; j < objLen; j++) {
byteArray[j] = LargeArrayUtils.UNSAFE.getByte(ptr + offset + sizeof * j);
}
return fromByteArray(byteArray);
}
@Override
public final boolean getBoolean(long i)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final byte getByte(long i)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final short getUnsignedByte(long i)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final short getShort(long i)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final int getInt(long i)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final long getLong(long i)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final float getFloat(long i)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final double getDouble(long i)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final Object[] getData()
{
return data;
}
@Override
public final boolean[] getBooleanData()
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final boolean[] getBooleanData(boolean[] a, long startPos, long endPos, long step)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final byte[] getByteData()
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final byte[] getByteData(byte[] a, long startPos, long endPos, long step)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final short[] getShortData()
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final short[] getShortData(short[] a, long startPos, long endPos, long step)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final int[] getIntData()
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final int[] getIntData(int[] a, long startPos, long endPos, long step)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final long[] getLongData()
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final long[] getLongData(long[] a, long startPos, long endPos, long step)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final float[] getFloatData()
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final float[] getFloatData(float[] a, long startPos, long endPos, long step)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final double[] getDoubleData()
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final double[] getDoubleData(double[] a, long startPos, long endPos, long step)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final void setToNative(long i, Object value)
{
if (value == null) {
objectLengths.setShort(i, (short) -1);
} else {
byte[] ba = toByteArray(value);
if (ba.length > maxObjectLength) {
throw new IllegalArgumentException("Object " + value + " is too long.");
}
int objLen = ba.length;
if (objLen > Short.MAX_VALUE) {
throw new IllegalArgumentException("Object " + value + " is too long.");
}
objectLengths.setShort(i, (short) objLen);
long offset = sizeof * i * maxObjectLength;
for (int j = 0; j < objLen; j++) {
LargeArrayUtils.UNSAFE.putByte(ptr + offset + sizeof * j, ba[j]);
}
}
}
@Override
public final void set(long i, Object o)
{
if (o == null) {
if (ptr != 0) {
objectLengths.setShort(i, (short) -1);
} else {
if (isConstant) {
throw new IllegalAccessError("Constant arrays cannot be modified.");
}
data[(int) i] = null;
}
} else if (ptr != 0) {
byte[] ba = toByteArray(o);
if (ba.length > maxObjectLength) {
throw new IllegalArgumentException("Object " + o + " is too long.");
}
int objLen = ba.length;
if (objLen > Short.MAX_VALUE) {
throw new IllegalArgumentException("Object " + o + " is too long.");
}
objectLengths.setShort(i, (short) objLen);
long offset = sizeof * i * maxObjectLength;
for (int j = 0; j < objLen; j++) {
LargeArrayUtils.UNSAFE.putByte(ptr + offset + sizeof * j, ba[j]);
}
} else {
if (isConstant) {
throw new IllegalAccessError("Constant arrays cannot be modified.");
}
data[(int) i] = o;
}
}
@Override
public final void set_safe(long i, Object value)
{
if (i < 0 || i >= length) {
throw new ArrayIndexOutOfBoundsException(Long.toString(i));
}
set(i, value);
}
@Override
public final void setBoolean(long i, boolean value)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final void setByte(long i, byte value)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final void setUnsignedByte(long i, short value)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final void setShort(long i, short value)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final void setInt(long i, int value)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final void setLong(long i, long value)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final void setFloat(long i, float value)
{
throw new UnsupportedOperationException("Not supported yet");
}
@Override
public final void setDouble(long i, double value)
{
throw new UnsupportedOperationException("Not supported yet");
}
private static byte[] toByteArray(final Object obj)
{
final ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
ObjectOutputStream oos = null;
try {
oos = new ObjectOutputStream(baos);
oos.writeObject(obj);
} catch (Exception ex) {
throw new SerializationException(ex);
} finally {
try {
if (oos != null) {
oos.close();
}
} catch (IOException ex) {
// ignore close exception
}
}
return baos.toByteArray();
}
private static Object fromByteArray(final byte[] objectData)
{
ByteArrayInputStream bais = new ByteArrayInputStream(objectData);
ObjectInputStream ois = null;
try {
ois = new ObjectInputStream(bais);
final Object obj = ois.readObject();
return obj;
} catch (Exception ex) {
throw new SerializationException(ex);
} finally {
try {
if (ois != null) {
ois.close();
}
} catch (IOException ex) {
// ignore close exception
}
}
}
/**
* Returns maximal length of each object serialized to an array of bytes.
* <p>
* @return maximal length of each object serialized to an array of bytes
*
*/
public int getMaxObjectLength()
{
return maxObjectLength;
}
}
| [
"carandraug+dev@gmail.com"
] | carandraug+dev@gmail.com |
8f7bfe5d93493a7e66882742bf5e7cb6bd16c3d5 | 1f4e57eab90e5ff141de16523f664b58ad532db6 | /src/ArrayPartitionI_561.java | 4c976a829f623eab3203a85d9fddac6cc6eb773b | [] | no_license | fanh2an/LeetCode | e8e490b243d5858000cd66372fe8b0ebea0268d1 | fa88b2467b1bd05ff1ca3e2268493685ba54e31e | refs/heads/master | 2020-03-28T05:40:02.288419 | 2018-09-09T12:01:01 | 2018-09-09T12:01:01 | 147,789,864 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 613 | java | import java.util.Arrays;
/*
给定长度为 2n 的数组, 你的任务是将这些数分成 n 对, 例如 (a1, b1), (a2, b2), ..., (an, bn) ,使得从1 到 n 的 min(ai, bi) 总和最大。
示例 1:
输入: [1,4,3,2]
输出: 4
解释: n 等于 2, 最大总和为 4 = min(1, 2) + min(3, 4).
提示:
n 是正整数,范围在 [1, 10000].
数组中的元素范围在 [-10000, 10000].
*/
public class ArrayPartitionI_561 {
public int arrayPairSum(int[] nums) {
Arrays.sort(nums);
int res = 0;
for(int i=0;i<nums.length;i=i+2)
res+=nums[i];
return res;
}
}
| [
"fanhuanhuan@fanfandeMac.local"
] | fanhuanhuan@fanfandeMac.local |
0509565fc47bba3ed982858f550996e6c1cfe371 | fa0ef0d4a95d4b0b89fe4248a0b6b8d4fc74032a | /src/main/java/com/gmail/jackkobec/config/SwaggerConfig.java | 33e6db56c62678031c9f4731ea1c78b91e215a3d | [] | no_license | Jackkobec/SpringBoot | 4c222bd6790982a040ff6ddc803ad9b6e6aa7161 | b73053917afd62fc19af140f95e94b34f0f20e39 | refs/heads/master | 2021-01-20T02:24:49.480352 | 2017-04-25T20:03:02 | 2017-04-25T20:03:02 | 89,401,452 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 856 | java | package com.gmail.jackkobec.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* Created by Jack on 25.04.2017.
*/
// For use UI: http://localhost:8087/swagger-ui.html
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
}
| [
"jakkobec@gmail.com"
] | jakkobec@gmail.com |
888c9670aa4ed630381c8845c43b37a0cda56b41 | 344d4891c5ba6aee89fc00619496bc166ae618c6 | /src/Dependencias/EdisoncorSx/BarraTitle.java | a0b2ed536dc0362d45959baa01046f139df4fc28 | [] | no_license | osnoser1/Practica-Java-018---Look-and-feel | df5004ad8de66a30e98c50a3073ba1802924a058 | f0b7e16b877922bffebbedad83b28333f207e625 | refs/heads/master | 2021-01-10T21:26:05.198258 | 2012-10-09T03:37:40 | 2012-10-09T03:37:40 | 6,134,912 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 12,935 | java | package Dependencias.EdisoncorSx;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.AbstractAction;
import javax.swing.Box;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import javax.swing.event.MouseInputListener;
public class BarraTitle extends JComponent {
private JButton closeButton;
private JButton iconifyButton;
private JButton maximizeButton;
////////////////////////////////////////////////////////////////////////////
// THEME SPECIFIC FIELDS
////////////////////////////////////////////////////////////////////////////
private int preferredHeight;
private Color lightColor=Color.gray;
private Color shadowColor= Color.black;
private BufferedImage grip ;
private BufferedImage backgroundGradient;
private Color inactiveLightColor= Color.GRAY;
private Color inactiveShadowColor= Color.DARK_GRAY;
private BufferedImage inactiveGrip;
private BufferedImage inactiveBackgroundGradient;
private BufferedImage close;
private BufferedImage closeInactive;
private BufferedImage closeOver;
private BufferedImage closePressed;
private BufferedImage minimize;
private BufferedImage minimizeInactive;
private BufferedImage minimizeOver;
private BufferedImage minimizePressed;
private BufferedImage maximize;
private BufferedImage maximizeInactive;
private BufferedImage maximizeOver;
private BufferedImage maximizePressed;
public BarraTitle() {
try {
loadImages();
setLayout(new GridBagLayout());
createButtons();
} catch (IOException ex) {
Logger.getLogger(BarraTitle.class.getName()).log(Level.SEVERE, null, ex);
}
}
private void loadImages() throws IOException{
grip = ImageIO.read(getClass().getResource("/Imagenes/title-grip.png"));
backgroundGradient= ImageIO.read(getClass().getResource("/Imagenes/title-background.png"));
inactiveLightColor= Color.blue;
inactiveShadowColor= Color.black;
inactiveGrip= ImageIO.read(getClass().getResource("/Imagenes/title-grip-inactive.png"));
inactiveBackgroundGradient= ImageIO.read(getClass().getResource("/Imagenes/title-background-inactive.png"));
close= ImageIO.read(getClass().getResource("/Imagenes/title-close.png"));
closeInactive= ImageIO.read(getClass().getResource("/Imagenes/title-close-inactive.png"));
closeOver= ImageIO.read(getClass().getResource("/Imagenes/title-close-over.png"));
closePressed= ImageIO.read(getClass().getResource("/Imagenes/title-close-pressed.png"));
minimize= ImageIO.read(getClass().getResource("/Imagenes/title-minimize.png"));
minimizeInactive= ImageIO.read(getClass().getResource("/Imagenes/title-minimize-inactive.png"));
minimizeOver= ImageIO.read(getClass().getResource("/Imagenes/title-minimize-over.png"));
minimizePressed= ImageIO.read(getClass().getResource("/Imagenes/title-minimize-pressed.png"));
maximize= ImageIO.read(getClass().getResource("/Imagenes/title-maximize.png"));
maximizeInactive= ImageIO.read(getClass().getResource("/Imagenes/title-maximize-inactive.png"));
maximizeOver= ImageIO.read(getClass().getResource("/Imagenes/title-maximize-over.png"));
maximizePressed= ImageIO.read(getClass().getResource("/Imagenes/title-maximize-pressed.png"));
preferredHeight =close.getHeight();
}
public void installListeners() {
MouseInputHandler handler = new MouseInputHandler();
Window window = SwingUtilities.getWindowAncestor(this);
window.addMouseListener(handler);
window.addMouseMotionListener(handler);
window.addWindowListener(new WindowHandler());
}
private void createButtons() {
add(Box.createHorizontalGlue(),
new GridBagConstraints(0, 0,
1, 1,
1.0, 1.0,
GridBagConstraints.EAST,
GridBagConstraints.HORIZONTAL,
new Insets(0, 0, 0, 0),
0, 0));
add(iconifyButton = createButton(new IconifyAction(),
minimize, minimizePressed, minimizeOver),
new GridBagConstraints(1, 0,
1, 1,
0.0, 1.0,
GridBagConstraints.NORTHEAST,
GridBagConstraints.NONE,
new Insets(1, 0, 0, 2),
0, 0));
add(closeButton = createButton(new CloseAction(),
close, closePressed, closeOver),
new GridBagConstraints(3, 0,
1, 1,
0.0, 1.0,
GridBagConstraints.NORTHEAST,
GridBagConstraints.NONE,
new Insets(1, 0, 0, 2),
0, 0));
add(maximizeButton = createButton(new MaximizeAction(),
maximize, maximizePressed, maximizeOver),
new GridBagConstraints(2, 0,
1, 1,
0.0, 1.0,
GridBagConstraints.NORTHEAST,
GridBagConstraints.NONE,
new Insets(1, 0, 0, 2),
0, 0));
}
private static JButton createButton(final AbstractAction action,
final BufferedImage image,
final Image pressedImage,
final Image overImage) {
JButton button = new JButton(action);
button.setIcon(new ImageIcon(image));
button.setPressedIcon(new ImageIcon(pressedImage));
button.setRolloverIcon(new ImageIcon(overImage));
button.setRolloverEnabled(true);
button.setBorder(null);
button.setBorderPainted(false);
button.setContentAreaFilled(false);
button.setMargin(new Insets(0, 0, 0, 0));
button.setFocusable(false);
button.setFocusPainted(false);
button.setPreferredSize(new Dimension(image.getWidth(),
image.getHeight()));
return button;
}
private void close() {
Window w = SwingUtilities.getWindowAncestor(this);
w.dispatchEvent(new WindowEvent(w,
WindowEvent.WINDOW_CLOSING));
}
private void iconify() {
Frame frame = (Frame) SwingUtilities.getWindowAncestor(this);
if (frame != null) {
frame.setExtendedState(frame.getExtendedState() | Frame.ICONIFIED);
}
}
private void maximize() {
Frame frame = (Frame) SwingUtilities.getWindowAncestor(this);
if (frame != null) {
if (frame.getExtendedState()==Frame.MAXIMIZED_BOTH)
frame.setExtendedState(Frame.NORMAL);
else
frame.setExtendedState(frame.getExtendedState() | Frame.MAXIMIZED_BOTH);
}
}
@Override
public Dimension getPreferredSize() {
Dimension size = super.getPreferredSize();
size.height = preferredHeight;
return size;
}
@Override
public Dimension getMinimumSize() {
Dimension size = super.getMinimumSize();
size.height = preferredHeight;
return size;
}
@Override
public Dimension getMaximumSize() {
Dimension size = super.getMaximumSize();
size.height = preferredHeight;
return size;
}
@Override
protected void paintComponent(Graphics g) {
if (!isVisible()) {
return;
}
boolean active = SwingUtilities.getWindowAncestor(this).isActive();
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
Rectangle clip = g2.getClipBounds();
g2.drawImage(active ? backgroundGradient : inactiveBackgroundGradient,
clip.x, 0, clip.width, getHeight() - 2, null);
g2.setColor(active ? lightColor : inactiveLightColor);
g2.drawLine(0, getHeight() - 1, getWidth(), getHeight() - 1);
g2.setColor(active ? shadowColor : inactiveShadowColor);
g2.drawLine(0, getHeight() - 2, getWidth(), getHeight() - 2);
g2.drawImage(active ? grip : inactiveGrip, 0, 0, null);
}
private class CloseAction extends AbstractAction {
@Override
public void actionPerformed(ActionEvent e) {
close();
}
}
private class MaximizeAction extends AbstractAction{
public void actionPerformed(ActionEvent e){
maximize();
}
}
private class IconifyAction extends AbstractAction {
@Override
public void actionPerformed(ActionEvent e) {
iconify();
}
}
private class MouseInputHandler implements MouseInputListener {
private boolean isMovingWindow;
private int dragOffsetX;
private int dragOffsetY;
private static final int BORDER_DRAG_THICKNESS = 5;
@Override
public void mousePressed(MouseEvent ev) {
Point dragWindowOffset = ev.getPoint();
Window w = (Window)ev.getSource();
if (w != null) {
w.toFront();
}
Point convertedDragWindowOffset = SwingUtilities.convertPoint(
w, dragWindowOffset, BarraTitle.this);
Frame f = null;
Dialog d = null;
if (w instanceof Frame) {
f = (Frame)w;
} else if (w instanceof Dialog) {
d = (Dialog)w;
}
int frameState = (f != null) ? f.getExtendedState() : 0;
if (BarraTitle.this.contains(convertedDragWindowOffset)) {
if ((f != null && ((frameState & Frame.MAXIMIZED_BOTH) == 0)
|| (d != null))
&& dragWindowOffset.y >= BORDER_DRAG_THICKNESS
&& dragWindowOffset.x >= BORDER_DRAG_THICKNESS
&& dragWindowOffset.x < w.getWidth()
- BORDER_DRAG_THICKNESS) {
isMovingWindow = true;
dragOffsetX = dragWindowOffset.x;
dragOffsetY = dragWindowOffset.y;
}
}
else if (f != null && f.isResizable()
&& ((frameState & Frame.MAXIMIZED_BOTH) == 0)
|| (d != null && d.isResizable())) {
dragOffsetX = dragWindowOffset.x;
dragOffsetY = dragWindowOffset.y;
}
}
@Override
public void mouseReleased(MouseEvent ev) {
isMovingWindow = false;
}
@Override
public void mouseDragged(MouseEvent ev) {
Window w = (Window)ev.getSource();
if (isMovingWindow) {
Point windowPt = MouseInfo.getPointerInfo().getLocation();
windowPt.x = windowPt.x - dragOffsetX;
windowPt.y = windowPt.y - dragOffsetY;
w.setLocation(windowPt);
}
}
public void mouseClicked(MouseEvent e) {
}
public void mouseEntered(MouseEvent e) {
}
public void mouseExited(MouseEvent e) {
}
public void mouseMoved(MouseEvent e) {
}
}
private class WindowHandler extends WindowAdapter {
@Override
public void windowActivated(WindowEvent ev) {
closeButton.setIcon(new ImageIcon(close));
iconifyButton.setIcon(new ImageIcon(minimize));
maximizeButton.setIcon(new ImageIcon(maximize));
getRootPane().repaint();
}
@Override
public void windowDeactivated(WindowEvent ev) {
closeButton.setIcon(new ImageIcon(closeInactive));
iconifyButton.setIcon(new ImageIcon(minimizeInactive));
maximizeButton.setIcon(new ImageIcon(maximizeInactive));
getRootPane().repaint();
}
}
}
| [
"osnoser_12@hotmail.com"
] | osnoser_12@hotmail.com |
baf801edc9c335f3e47e2bfc9c4fce2496af6300 | 992d7435905077de58c26a9b21bad4d4daffcdaf | /src/demo/MyTest.java | 2a0eedf791d0ca1a80628266af52f395f3d8f00d | [] | no_license | luoyecheng/XcLearining_luobo | 474a1f7c41a5cc49b061c2b3e35477e3aeff9fcc | be8ee61057747ca036821bb49c1961bfb6cdf2f0 | refs/heads/master | 2023-04-17T02:23:45.031838 | 2021-04-15T06:53:58 | 2021-04-15T06:53:58 | 343,772,327 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,664 | java | package demo;
import org.junit.Test;
import java.util.*;
public class MyTest {
public MyTest(){}
class ListNode{
private int value;
private ListNode next;
public ListNode(int val){this.value=val;}
}
public ListNode reverse(ListNode node){
ListNode pre=null;
ListNode cur=node;
while(cur!=null){
ListNode pos=cur.next;
cur.next=pre;
pre=cur;
cur=pos;
}
return pre;
}
public ListNode sum(ListNode node1,ListNode node2){
node1=reverse(node1);
node2=reverse(node2);
ListNode ans=node1;
ListNode pre=null;
int flag=0;
while(node1!=null&&node2!=null){
pre=node1;
node1.value+=node2.value+flag;
flag=0;
if(node1.value>9){
flag=1;
node1.value%=10;
}
node1=node1.next;
node2=node2.next;
}
if(node2!=null)
pre.next=node2;
while(pre.next!=null&&flag==1){
pre.next.value++;
flag=0;
if(pre.next.value>9){
flag=1;
pre.next.value%=10;
}
pre=pre.next;
}
if(flag==1){
ListNode node=new ListNode(1);
pre.next=node;
}
ans=reverse(ans);
return ans;
}
private int check(ListNode node1,ListNode node2){
ListNode t1=node1,t2=node2;
while(t1!=null&&t2!=null){
t1=t1.next;
t2=t2.next;
}
if(t1==null&&t2==null){
t1=node1;
t2=node2;
while(t1!=null){
if(t1.value>t2.value)
return 1;
if(t2.value>t1.value)
return -1;
t1=t1.next;
t2=t2.next;
}
return 0;
}
if(t1==null)
return -1;
return 1;
}
public ListNode min(ListNode node1,ListNode node2){
int check = check(node1, node2);
if(check==0)
return new ListNode(0);
if(check<0){
ListNode temp=node2;
node2=node1;
node1=temp;
}
node1=reverse(node1);
node2=reverse(node2);
ListNode ans=node1;
int flag=0;
while(node1!=null&&node2!=null){
node1.value-=flag;
node1.value-=node2.value;
flag=0;
if(node1.value<0){
flag=1;
node1.value+=10;
}
node1=node1.next;
node2=node2.next;
}
while(flag==1){
node1.value-=flag;
flag=0;
while(node1.value<0){
flag=1;
node1.value+=10;
}
node1=node1.next;
}
ans=reverse(ans);
while(ans.value==0)
ans=ans.next;
if(check<0)
ans.value*=(-1);
return ans;
}
public ListNode minus(ListNode node1,ListNode node2){
if(node1.value<0){
if(node2.value<0){
node1.value*=(-1);
node2.value*=(-1);
return min(node2,node1);
}
node1.value*=(-1);
ListNode sum = sum(node1, node2);
sum.value*=(-1);
return sum;
}
if(node2.value<0){
node2.value*=(-1);
return sum(node1,node2);
}
return min(node1, node2);
}
@Test
public void test(){
int[] a1=new int[]{1,2,3,4,5,6,7};
int[] a2=new int[]{2,3,4,5,6,7,9};
ListNode node1=new ListNode(a1[0]);
ListNode t1=node1;
for(int i=1;i<a1.length;i++){
ListNode node=new ListNode(a1[i]);
t1.next=node;
t1=t1.next;
}
ListNode node2=new ListNode(a2[0]);
ListNode t2=node2;
for(int i=1;i<a2.length;i++){
ListNode node=new ListNode(a2[i]);
t2.next=node;
t2=t2.next;
}
ListNode sum = sum(node1, node2);
while(sum!=null){
System.out.print(sum.value);
sum=sum.next;
}
System.out.println();
System.out.println(1234567+2345679);
}
@Test
public void test_min(){
Random random=new Random();
ListNode node1=new ListNode(random.nextInt(9)+1);
ListNode node2=new ListNode(random.nextInt(9)+1);
ListNode t1=node1;
ListNode t2=node2;
for(int i=0;i<10;i++){
ListNode n1=new ListNode(random.nextInt(10));
ListNode n2=new ListNode(random.nextInt(10));
t1.next=n1;
t2.next=n2;
t1=t1.next;
t2=t2.next;
}
ListNode q1=node1;
ListNode q2=node2;
System.out.println("node1:");
while(q1!=null){
System.out.print(q1.value);
q1=q1.next;
}
System.out.println();
System.out.println("node2:");
while(q2!=null){
System.out.print(q2.value);
q2=q2.next;
}
System.out.println();
System.out.println("result:");
ListNode minus = minus(node1, node2);
while(minus!=null){
System.out.print(minus.value);
minus=minus.next;
}
}
public static void main(String[] args) {
Deque<Integer> stack=new LinkedList<>();
stack.offerLast(1);
stack.offerLast(1);
stack.offerLast(1);
}
}
| [
"luobolyc@163.com"
] | luobolyc@163.com |
1e2933b37c379c33863cae22f4cf649bcc9da06f | abda9d411378e36c6c15025d991b1012a7f86e06 | /sdk_common/SDKFps/common/TickCommonHandler.java | 4b9efd3e64e6c4ceda16a9837be7a102c76684d1 | [] | no_license | eliferd/SDKGunUnofficial | 0847a4c702be7f63a9e3b26dbe3a99110a98388f | 655ae6af56de18ff62cb04874bfc12ff519c77df | refs/heads/master | 2021-05-26T21:06:59.796774 | 2013-08-02T13:05:49 | 2013-08-02T13:05:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,898 | java | package SDKFps.common;
import java.util.EnumSet;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TickCommonHandler implements ITickHandler {
@SideOnly(Side.CLIENT)
public static final Minecraft mc = Minecraft.getMinecraft();
public void onTickInGameTick(EntityPlayer player)
{
final Minecraft mc = Minecraft.getMinecraft();
if (player != null)
{
if (SDK_FPS.proxy.deathWorld == null)
{
if (!player.isEntityAlive())
{
SDK_FPS.proxy.setDeathPosition(mc);
}
}
else if (SDK_FPS.proxy.deathWorld != mc.theWorld)
{
SDK_FPS.proxy.clearDeathPosition();
}
else if (player.isEntityAlive())
{
SDK_FPS.setSpawnPoint(player, ((Double)SDK_FPS.proxy.deathPosition.x).doubleValue(), ((Double)SDK_FPS.proxy.deathPosition.y).doubleValue(), ((Double)SDK_FPS.proxy.deathPosition.z).doubleValue(), true);
SDK_FPS.proxy.clearDeathPosition();
}
}
}
@Override
public void tickStart(EnumSet<TickType> type, Object... tickData) {
}
@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData) {
final EntityPlayer player = mc.thePlayer;
if(type.equals(EnumSet.of(TickType.SERVER)))
{
onTickInGameTick(player);
}
}
@Override
public EnumSet<TickType> ticks() {
// TODO Auto-generated method stub
return EnumSet.of(TickType.PLAYER, TickType.SERVER);
}
@Override
public String getLabel() {
// TODO Auto-generated method stub
return "SDK FPS COMMON TICK HANDLER";
}
}
| [
"elias5401@hotmail.fr"
] | elias5401@hotmail.fr |
cf24d611d84b168a64fc6c0e71497d2d835ddf59 | 7ed50abf27306184935730d983dc59685bb362f5 | /melvoxels/src/com/sudoplay/joise/examples/Example_01.java | 8fa53d5a5e2891be647208dfdabbaa27a6f644b1 | [] | no_license | melsov/melvoxels | 1eb81c916702fabd113974229ef92dd12ddc4a73 | a8a058ff7f4314fea9b9e3127b64eb336d4fd9f1 | refs/heads/master | 2020-12-24T17:44:31.311197 | 2015-06-03T12:38:19 | 2015-06-03T12:38:19 | 34,623,985 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,998 | java | package com.sudoplay.joise.examples;
import com.sudoplay.joise.module.ModuleAutoCorrect;
import com.sudoplay.joise.module.ModuleBasisFunction.BasisType;
import com.sudoplay.joise.module.ModuleBasisFunction.InterpolationType;
import com.sudoplay.joise.module.ModuleFractal;
import com.sudoplay.joise.module.ModuleFractal.FractalType;
import javax.swing.*;
import java.awt.*;
public class Example_01 {
public static void main(String[] args) {
int width = 640;
int height = 480;
JFrame frame = new JFrame("Joise Example 01");
frame.setPreferredSize(new Dimension(width, height));
Canvas canvas = new Canvas(width, height);
frame.add(canvas);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// ========================================================================
// = Joise module chain
// ========================================================================
/*
* Start with a fractal generator...
*/
ModuleFractal gen = new ModuleFractal();
gen.setAllSourceBasisTypes(BasisType.SIMPLEX);
gen.setAllSourceInterpolationTypes(InterpolationType.CUBIC);
gen.setNumOctaves(5);
gen.setFrequency(2.34);
gen.setType(FractalType.RIDGEMULTI);
gen.setSeed(898456);
/*
* ... route it through an autocorrection module...
*
* This module will sample it's source multiple times and attempt to
* auto-correct the output to the range specified.
*/
ModuleAutoCorrect ac = new ModuleAutoCorrect();
ac.setSource(gen); // set source (can usually be either another Module or a
// double value; see specific module for details)
ac.setRange(0.0f, 1.0f); // set the range to auto-correct to
ac.setSamples(10000); // set how many samples to take
ac.calculate(); // perform the caclulations
/*
* ... draw it.
*/
canvas.updateImage(ac);
frame.pack();
frame.setLocationRelativeTo(null);
}
}
| [
"melsovereign@yahoo.com"
] | melsovereign@yahoo.com |
0982e0187cbbe3c58b289c4f2a3460ee34b0bb7b | 29d0f39a7d37cb26c51f66062bcce6a02f52c942 | /app/src/main/java/crossfit_juan/chk/com/crossfitjuan/Activity/AboutJuanActivity.java | b60a206d5276f095e1fc8a09fcfd1a1af675f427 | [] | no_license | kimkyuhwan/FITM_MOBLIE | e2999541bac153c770eaa0b81697815df74de121 | 98a485895d56bb9fcf364a8df87863d70bd7e79b | refs/heads/master | 2021-06-18T10:05:57.996758 | 2021-01-30T12:53:17 | 2021-01-30T12:53:17 | 132,495,085 | 0 | 0 | null | 2018-05-07T17:35:34 | 2018-05-07T17:35:34 | null | UTF-8 | Java | false | false | 4,348 | java | package crossfit_juan.chk.com.crossfitjuan.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AppCompatActivity;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import butterknife.BindView;
import butterknife.ButterKnife;
import crossfit_juan.chk.com.crossfitjuan.R;
import static crossfit_juan.chk.com.crossfitjuan.Common.Constants.CROSSFITJUAN_ADDRESS_GOOGLE;
public class AboutJuanActivity extends AppCompatActivity {
@BindView(R.id.crossfit_imgview)
ImageView crossfitImgview;
@BindView(R.id.aboutJuan_scroll_linear)
LinearLayout aboutJuanScrollLinear;
@BindView(R.id.aboutJuan_scroll)
ScrollView aboutJuanScroll;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_aboutjuan);
ButterKnife.bind(this);
setScrollViewContent();
}
void setScrollViewContent() {
//webview.getSettings().setJavaScriptEnabled(true);
//webview.loadUrl(CROSSFITJUAN_ADDRESS_GOOGLE);
crossfitImgview.setAdjustViewBounds(true);
crossfitImgview.setImageResource(R.drawable.about_juan);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
lp.gravity = Gravity.CENTER_HORIZONTAL;
crossfitImgview.setLayoutParams(lp);
crossfitImgview.setScaleType(ImageView.ScaleType.FIT_XY); // 레이아웃 크기에 이미지를 맞춘다
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.crossfit_googlemap);
mapFragment.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
LatLng CrossfitJuan = new LatLng(37.463798, 126.680629);
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(CrossfitJuan, 17));
googleMap.addMarker(new MarkerOptions()
.title("크로스핏 주안")
.position(CrossfitJuan));
googleMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
@Override
public void onMapClick(LatLng latLng) {
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse(CROSSFITJUAN_ADDRESS_GOOGLE));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
}
});
}
});
Button callBtn = new Button(this);
callBtn.setText("연락하기");
callBtn.setTextSize(16);
callBtn.setGravity(Gravity.CENTER_HORIZONTAL);
callBtn.setBackgroundColor(Color.argb(0xff,0,0,0));
callBtn.setTextColor(Color.argb(0xff,0xff,0xff,0xff));
callBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
calling();
}
});
aboutJuanScrollLinear.addView(callBtn);
}
public void calling() {
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:0324299997"));
startActivity(intent);
}
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right);
}
}
| [
"gmarble94@gmail.com"
] | gmarble94@gmail.com |
36c32db6cc1163c7293bdd105c4679e01c0f9afc | d2cb1f4f186238ed3075c2748552e9325763a1cb | /pre_compile/nonstatic_methods/methods/java_security_cert_PKIXReason_getClass.java | 479731f6e40d308636716fe8bb7b2147e3954a0a | [] | no_license | Adabot1/data | 9e5c64021261bf181b51b4141aab2e2877b9054a | 352b77eaebd8efdb4d343b642c71cdbfec35054e | refs/heads/master | 2020-05-16T14:22:19.491115 | 2019-05-25T04:35:00 | 2019-05-25T04:35:00 | 183,001,929 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 166 | java | class java_security_cert_PKIXReason_getClass{ public static void function() {java.security.cert.PKIXReason obj = new java.security.cert.PKIXReason();obj.getClass();}} | [
"peter2008.ok@163.com"
] | peter2008.ok@163.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.