blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
061a1e6489fa5d6c682e10db97033ed85a9b8e8f
0710d6440d8d341d1de016813913c7817062d07d
/projetosensoryweb/src/main/java/br/edu/ifrn/projetosensoryweb/api/AnaliseSensorialResource.java
86e935a8d27f409221576421ac72e7882f7cbe36
[]
no_license
robson-ribeiro-da-silva/sensory_web_api
187072dafdd08b80544ee8657b7eaa36d822fb0f
7b3e7b083158cb655c94ba55ef199f9e60db6d5a
refs/heads/master
2022-07-07T04:27:32.449584
2021-02-18T13:07:14
2021-02-18T13:07:14
191,773,461
0
0
null
2022-06-21T01:59:50
2019-06-13T13:58:36
CSS
UTF-8
Java
false
false
6,080
java
package br.edu.ifrn.projetosensoryweb.api; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import br.edu.ifrn.projetosensoryweb.model.Amostra; import br.edu.ifrn.projetosensoryweb.model.AnaliseSensorial; import br.edu.ifrn.projetosensoryweb.model.AvaliacaoHedonica; import br.edu.ifrn.projetosensoryweb.model.Avaliador; import br.edu.ifrn.projetosensoryweb.model.Escala; import br.edu.ifrn.projetosensoryweb.model.Produto; import br.edu.ifrn.projetosensoryweb.model.RespostaHedonica; import br.edu.ifrn.projetosensoryweb.model.StatusAnalise; import br.edu.ifrn.projetosensoryweb.service.AmostraService; import br.edu.ifrn.projetosensoryweb.service.AnaliseSensorialService; import br.edu.ifrn.projetosensoryweb.service.AvaliacaoHedonicaService; import br.edu.ifrn.projetosensoryweb.service.AvaliadorService; import br.edu.ifrn.projetosensoryweb.service.ProdutoService; import br.edu.ifrn.projetosensoryweb.service.RespostaHedonicaService; //import io.swagger.annotations.ApiOperation; @RestController @RequestMapping("/api/analisesensorial") public class AnaliseSensorialResource { @Autowired private AnaliseSensorialService service; @Autowired private RespostaHedonicaService serviceresposta; @Autowired private AmostraService serviceamostra; @Autowired private AvaliacaoHedonicaService serviceavaliacao; @Autowired private AvaliadorService serviceavaliador; @Autowired private ProdutoService serviceproduto; //@ApiOperation(value = "Retorna uma lista de Análises") @GetMapping(value = "/findAll", produces="application/json") public ResponseEntity<List<AnaliseSensorial>> findAll() { List<AnaliseSensorial> analises = service.findByStatus(StatusAnalise.DISPONIVEL); if (analises.isEmpty()) { return ResponseEntity.notFound().build(); } return new ResponseEntity<>(analises, HttpStatus.OK); } //@ApiOperation(value = "Retorna uma Análise pelo ID") @GetMapping(value = "/findById/{id}", produces="application/json") public ResponseEntity<AnaliseSensorial> findById(@PathVariable("id") Long id) { if (id == null) { return ResponseEntity.notFound().build(); } AnaliseSensorial analise = service.findByIdAnalise(id); if (analise == null) { return ResponseEntity.notFound().build(); } return ResponseEntity.ok(analise); } //@ApiOperation(value = "Adiciona a resposta do avaliador") @GetMapping(value = "/addResposta/{cpf}/{idanalise}/{codamostra}/{pergunta}/{resposta}", produces="application/json") public ResponseEntity<RespostaHedonica> addResposta(@PathVariable("cpf") String cpf, @PathVariable("idanalise") Long id, @PathVariable("codamostra") int codigoamostra, @PathVariable("pergunta") String pergunta, @PathVariable("resposta") String resposta) { /* * if(cpf == null || cpf == " "){ return * ResponseEntity.notFound().build(); } * * Avaliador avaliador = serviceavaliador.findByCpf(cpf); * * if(avaliador == null){ return ResponseEntity.notFound().build(); } */ Amostra amostraok = null; int idpro = id.intValue(); //System.out.println("aqui em cima "+idpro); List<Produto> produtos = serviceproduto.findByCodigoAnalise(service.findByIdAnalise(id)); //System.out.println("aqui em baixo "+idpro); for(Produto p: produtos){ for(Amostra a: p.getAmostras()){ if(a.getCodigo() == codigoamostra){ amostraok = a; } } } //System.out.println("aqui"); int total = 0; //Amostra amostra = serviceamostra.findByIdAnaliseAndCodAmostra(id, codigoamostra); if (amostraok == null) { return ResponseEntity.notFound().build(); } List<RespostaHedonica> respostas = amostraok.getRespostahedonica(); if (respostas != null) { for (int i = 0; i < respostas.size(); i++) { // System.out.println("aqui --- >"); if (respostas.get(i).getAvaliacaohedonica().getPergunta().equals(pergunta)) { // System.out.println("Pergunta- ---- >" + // respostas.get(i).getAvaliacaohedonica().getPergunta()); return ResponseEntity.notFound().build(); } } } AvaliacaoHedonica avaliacao = serviceavaliacao.findByIdAnaliseAndPergunta(id, pergunta); if (avaliacao == null) { return ResponseEntity.notFound().build(); } RespostaHedonica respostaHedonica = new RespostaHedonica(); respostaHedonica.setAmostra(amostraok); respostaHedonica.setResposta(resposta); respostaHedonica.setAvaliacaohedonica(avaliacao); serviceresposta.save(respostaHedonica); AnaliseSensorial analise = service.findByIdAnalise(id); if (analise.getPerguntaatual() == null) { analise.setPerguntaatual(pergunta); } if (analise.getPerguntaatual().equals(pergunta)) { total = analise.getQtdAmostrasDisponiveis() - 1; analise.setQtdAmostrasDisponiveis(total); if (total == 0) { analise.setStatus(StatusAnalise.ENCERRADA); } service.save(analise); } return ResponseEntity.ok(respostaHedonica); } /* @GetMapping(value = "/findByIdAvaliacao/{id}", produces="application/json") public ResponseEntity<AvaliacaoHedonica> findByIdAvaliacao(@PathVariable("id") Long id) { if (id == null) { return ResponseEntity.notFound().build(); } AvaliacaoHedonica avaliacao = serviceavaliacao.findByIdAvaliacao(id); if (avaliacao == null) { return ResponseEntity.notFound().build(); } return ResponseEntity.ok(avaliacao); } */ }
[ "robson_r.silva@hotmail.com.br" ]
robson_r.silva@hotmail.com.br
674de707ae1757586869fe4bff0d3d9a42a4d7db
241bb4ee646a8a9b386c62f221704e8769aa6446
/src/test/java/controlers/CaptchaControllerTest.java
87f5c0fcc399c2d1906bc9f516678926270c070d
[]
no_license
AlexVolkow/Captcha-Spring
5b7495f24e447c685162505be1fa43f0958cbbf2
528f15c38e1d55e23a22d688ef378b5091abf50f
refs/heads/master
2020-03-17T02:19:33.340819
2018-05-12T21:57:09
2018-05-12T21:57:09
133,186,040
1
0
null
null
null
null
UTF-8
Java
false
false
8,195
java
package controlers; import config.TestConfiguration; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.junit.Before; 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.mock.web.MockHttpServletResponse; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import volkov.alexandr.captcha.controlers.CaptchaController; import volkov.alexandr.captcha.controlers.Protocol; import volkov.alexandr.captcha.services.captcha.Captcha; import volkov.alexandr.captcha.services.captcha.CaptchaService; import volkov.alexandr.captcha.services.captcha.VerifyService; import volkov.alexandr.captcha.services.register.RegisterService; import volkov.alexandr.captcha.services.register.User; import java.util.UUID; import static org.junit.Assert.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @RunWith(SpringRunner.class) @ContextConfiguration(classes = TestConfiguration.class) @WebMvcTest(CaptchaController.class) public class CaptchaControllerTest { @Autowired private CaptchaController captchaController; @Autowired private MockMvc mockMvc; @Autowired private RegisterService registerService; @Autowired private CaptchaService captchaService; @Autowired private VerifyService verifyService; private User user; private JSONParser parser = new JSONParser(); @Before public void prepare() { user = registerService.registryUser(); } @Test public void notRegisteredUser() throws Exception { MockHttpServletResponse response = mockMvc .perform(get("/captcha/new") .param(Protocol.PUBLIC_KEY, UUID.randomUUID().toString())) .andExpect(status().isUnauthorized()) .andReturn().getResponse(); JSONObject obj = (JSONObject) parser.parse(response.getContentAsString()); String error = (String) obj.get(Protocol.ERROR_CODE); assertNotNull(error); } @Test public void registeredUser() throws Exception { mockMvc.perform(get("/captcha/new") .param(Protocol.PUBLIC_KEY, user.getPublicKey().toString())) .andExpect(status().isCreated()); } @Test public void validToken() throws Exception { Captcha captcha = captchaService.createCaptcha(user.getPublicKey()); mockMvc.perform(get("/captcha/image") .param(Protocol.PUBLIC_KEY, user.getPublicKey().toString()) .param(Protocol.TOKEN, captcha.getToken())) .andExpect(status().isOk()); } @Test public void invalidToken() throws Exception { MockHttpServletResponse response = mockMvc .perform(get("/captcha/image") .param(Protocol.PUBLIC_KEY, user.getPublicKey().toString()) .param(Protocol.TOKEN, "42")) .andExpect(status().isNotAcceptable()) .andReturn().getResponse(); JSONObject obj = (JSONObject) parser.parse(response.getContentAsString()); String error = (String) obj.get(Protocol.ERROR_CODE); assertNotNull(error); } @Test public void newCaptchaTest() throws Exception { captchaController.setProduction(false); MockHttpServletResponse response = mockMvc .perform(get("/captcha/new") .param(Protocol.PUBLIC_KEY, user.getPublicKey().toString())) .andExpect(status().isCreated()) .andReturn().getResponse(); JSONObject obj = (JSONObject) parser.parse(response.getContentAsString()); String token = (String) obj.get(Protocol.TOKEN); String answer = (String) obj.get(Protocol.ANSWER); Captcha captcha = captchaService.getCaptcha(user.getPublicKey(), token); assertEquals(captcha.getAnswer(), answer); } @Test public void newCaptchaProduction() throws Exception { captchaController.setProduction(true); MockHttpServletResponse response = mockMvc .perform(get("/captcha/new") .param(Protocol.PUBLIC_KEY, user.getPublicKey().toString())) .andExpect(status().isCreated()) .andReturn().getResponse(); JSONObject obj = (JSONObject) parser.parse(response.getContentAsString()); String token = (String) obj.get(Protocol.TOKEN); assertTrue(captchaService.isValidToken(user.getPublicKey(), token)); } @Test public void rightAnswer() throws Exception { Captcha captcha = captchaService.createCaptcha(user.getPublicKey()); MockHttpServletResponse response = mockMvc .perform(post("/captcha/solve") .param(Protocol.PUBLIC_KEY, user.getPublicKey().toString()) .param(Protocol.TOKEN, captcha.getToken()) .param(Protocol.ANSWER, captcha.getAnswer())) .andExpect(status().isOk()) .andReturn().getResponse(); JSONObject obj = (JSONObject) parser.parse(response.getContentAsString()); String token = (String) obj.get(Protocol.RESPONSE); assertTrue(verifyService.verifyToken(user.getSecretKey().toString(), token)); } @Test public void wrongAnswer() throws Exception { Captcha captcha = captchaService.createCaptcha(user.getPublicKey()); MockHttpServletResponse response = mockMvc .perform(post("/captcha/solve") .param(Protocol.PUBLIC_KEY, user.getPublicKey().toString()) .param(Protocol.TOKEN, captcha.getToken()) .param(Protocol.ANSWER, "#$")) .andExpect(status().isForbidden()) .andReturn().getResponse(); JSONObject obj = (JSONObject) parser.parse(response.getContentAsString()); String error = (String) obj.get(Protocol.ERROR_CODE); assertNotNull(error); } @Test public void successVerify() throws Exception { Captcha captcha = captchaService.createCaptcha(user.getPublicKey()); String verifyToken = verifyService.verifyCaptcha(user.getPublicKey(), captcha.getAnswer(), captcha.getToken()); MockHttpServletResponse response = mockMvc .perform(get("/captcha/verify") .param(Protocol.SECRET_KEY, user.getSecretKey().toString()) .param(Protocol.RESPONSE, verifyToken)) .andExpect(status().isOk()) .andReturn().getResponse(); JSONObject obj = (JSONObject) parser.parse(response.getContentAsString()); boolean status = (boolean) obj.get(Protocol.STATUS); assertTrue(status); } @Test public void failedVerify() throws Exception { Captcha captcha = captchaService.createCaptcha(user.getPublicKey()); String verifyToken = verifyService.verifyCaptcha(user.getPublicKey(), captcha.getAnswer(), captcha.getToken()); MockHttpServletResponse response = mockMvc .perform(get("/captcha/verify") .param(Protocol.SECRET_KEY, user.getSecretKey().toString()) .param(Protocol.RESPONSE, verifyToken + "$")) .andExpect(status().isOk()) .andReturn().getResponse(); JSONObject obj = (JSONObject) parser.parse(response.getContentAsString()); String error = (String) obj.get(Protocol.ERROR_CODE); boolean status = (boolean) obj.get(Protocol.STATUS); assertFalse(status); assertNotNull(error); } }
[ "alexander.volkow@gmail.com" ]
alexander.volkow@gmail.com
86bfcfe94bca04b9928938673405837c4882788f
12c6254959af7b586ecffeb98c11d99811612e9f
/src/state/model/NoMoneyState.java
700a8b1f09e620897dbaa2ff9f0bfa35cd16fb24
[]
no_license
erhanmert/designpatternsdemo
ac360c4285454268a9352994aee7f341989b9518
8a1206354a690eb10765b529ea072d3867fa2831
refs/heads/master
2023-02-27T06:31:36.119657
2021-02-08T20:22:01
2021-02-08T20:22:01
337,196,129
0
0
null
null
null
null
UTF-8
Java
false
false
806
java
package state.model; public class NoMoneyState implements State { SodaVendingMachine sodaVendingMachine; public NoMoneyState(SodaVendingMachine sodaVendingMachine) { this.sodaVendingMachine = sodaVendingMachine; } @Override public void insertMoney() { System.out.println("you insert money"); sodaVendingMachine.setState(sodaVendingMachine.getHasMoneyState()); } @Override public void ejectMoney() { System.out.println("you have not inserted money"); } @Override public void select() { System.out.println("there is no money"); } @Override public void dispense() { System.out.println("pay first"); } @Override public String toString() { return "waiting for money..."; } }
[ "erhanmert86@gmail.com" ]
erhanmert86@gmail.com
7e60055c8c96642159d97803a550c0fd092464d3
fee26ec9f1222fafbc7628e3cab9fbc8ad3305f2
/app/src/main/java/app/com/rockvile/ironman_repulsorflashlight/util/SystemUiHiderHoneycomb.java
961f78956affd6bbfd57cf4d266998fad09227ec
[]
no_license
kotAPI/Iron-Man-Flashlight-Android-App
e9265ca29b0094cfa8d6598666231002b6c340fc
bf2c3992ba1f256c4474ad4d108d4cd18fb33b86
refs/heads/master
2021-01-22T01:00:07.169417
2015-08-03T18:49:12
2015-08-03T18:49:12
40,141,957
0
0
null
null
null
null
UTF-8
Java
false
false
5,007
java
package app.com.rockvile.ironman_repulsorflashlight.util; import android.annotation.TargetApi; import android.app.Activity; import android.os.Build; import android.view.View; import android.view.WindowManager; /** * An API 11+ implementation of {@link SystemUiHider}. Uses APIs available in * Honeycomb and later (specifically {@link View#setSystemUiVisibility(int)}) to * show and hide the system UI. */ @TargetApi(Build.VERSION_CODES.HONEYCOMB) public class SystemUiHiderHoneycomb extends SystemUiHiderBase { /** * Flags for {@link View#setSystemUiVisibility(int)} to use when showing the * system UI. */ private int mShowFlags; /** * Flags for {@link View#setSystemUiVisibility(int)} to use when hiding the * system UI. */ private int mHideFlags; /** * Flags to test against the first parameter in * {@link android.view.View.OnSystemUiVisibilityChangeListener#onSystemUiVisibilityChange(int)} * to determine the system UI visibility state. */ private int mTestFlags; /** * Whether or not the system UI is currently visible. This is cached from * {@link android.view.View.OnSystemUiVisibilityChangeListener}. */ private boolean mVisible = true; /** * Constructor not intended to be called by clients. Use * {@link SystemUiHider#getInstance} to obtain an instance. */ protected SystemUiHiderHoneycomb(Activity activity, View anchorView, int flags) { super(activity, anchorView, flags); mShowFlags = View.SYSTEM_UI_FLAG_VISIBLE; mHideFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE; mTestFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE; if ((mFlags & FLAG_FULLSCREEN) != 0) { // If the client requested fullscreen, add flags relevant to hiding // the status bar. Note that some of these constants are new as of // API 16 (Jelly Bean). It is safe to use them, as they are inlined // at compile-time and do nothing on pre-Jelly Bean devices. mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_FULLSCREEN; } if ((mFlags & FLAG_HIDE_NAVIGATION) != 0) { // If the client requested hiding navigation, add relevant flags. mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; mTestFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; } } /** * {@inheritDoc} */ @Override public void setup() { mAnchorView.setOnSystemUiVisibilityChangeListener(mSystemUiVisibilityChangeListener); } /** * {@inheritDoc} */ @Override public void hide() { mAnchorView.setSystemUiVisibility(mHideFlags); } /** * {@inheritDoc} */ @Override public void show() { mAnchorView.setSystemUiVisibility(mShowFlags); } /** * {@inheritDoc} */ @Override public boolean isVisible() { return mVisible; } private View.OnSystemUiVisibilityChangeListener mSystemUiVisibilityChangeListener = new View.OnSystemUiVisibilityChangeListener() { @Override public void onSystemUiVisibilityChange(int vis) { // Test against mTestFlags to see if the system UI is visible. if ((vis & mTestFlags) != 0) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { // Pre-Jelly Bean, we must manually hide the action bar // and use the old window flags API. mActivity.getActionBar().hide(); mActivity.getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } // Trigger the registered listener and cache the visibility // state. mOnVisibilityChangeListener.onVisibilityChange(false); mVisible = false; } else { mAnchorView.setSystemUiVisibility(mShowFlags); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { // Pre-Jelly Bean, we must manually show the action bar // and use the old window flags API. mActivity.getActionBar().show(); mActivity.getWindow().setFlags( 0, WindowManager.LayoutParams.FLAG_FULLSCREEN); } // Trigger the registered listener and cache the visibility // state. mOnVisibilityChangeListener.onVisibilityChange(true); mVisible = true; } } }; }
[ "pranayshinoda@gmail.com" ]
pranayshinoda@gmail.com
5c042fe50638c24e0262e985787a070e8b7e79d9
0ee9019161f0410d2bfda388088210a7a010e17d
/src/main/java/servlet/Home.java
05e1298fb1c90460d43152542d712a8971bfa25b
[]
no_license
nelsieborja/java-plus-reactjs
37ce58b23e00d02ad13802e94415c3beb8a02212
be70dd982576c34921690049dac185a98861832f
refs/heads/master
2021-05-07T07:30:17.205352
2018-04-16T07:54:18
2018-04-16T07:54:18
109,131,940
12
4
null
null
null
null
UTF-8
Java
false
false
755
java
package servlet; import java.io.IOException; import javax.servlet.ServletException; // import javax.servlet.ServletOutputStream; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(name = "Home", urlPatterns = { "" }) public class Home extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.getSession().setAttribute("title", "Welcome to Carrefour"); request.getSession().setAttribute("description", "Home description"); request.getRequestDispatcher("index.jsp").forward(request, response); } }
[ "nborja@mafcarrefour.com" ]
nborja@mafcarrefour.com
31e4d155e2c52d2e053b566411ecf0d4fbdb05d6
73d7788802aca2d08e5cdbacf44042031bce2125
/Loiane_Training/java-basico/com/shimabukuro/renato/aula13/CurtoCircuito.java
1c2d140210138427d5acaba61339899b4dcb0fee
[]
no_license
renatoshimabukuro/java-basico
6397c823f887b3f4a4a713d2a6cdb7404b4ad13f
04971ac5c03fa83d5f108a4bdfb8a78ce544ba23
refs/heads/master
2021-06-22T18:58:44.416745
2021-05-31T15:05:44
2021-05-31T15:05:44
226,885,948
0
0
null
null
null
null
ISO-8859-1
Java
false
false
537
java
package com.shimabukuro.renato.aula13; public class CurtoCircuito { public static void main(String[] args) { boolean verdadeiro = true; boolean falso = false; boolean resultado1 = falso & verdadeiro;;//no debug será verificado essa linha boolean resultado2 = falso && verdadeiro; //no debug não será verificado essa linha, pois o primeiro valor já é falso System.out.println(resultado1); System.out.println(resultado2); int resultado = 1 + 1 - 1 + 1 * 1 / 1; System.out.println(resultado); } }
[ "renato.shimabukuro.2@gmail.com" ]
renato.shimabukuro.2@gmail.com
b23e7ca233662fe0a86aeb2072df43057ffefe96
a6e2f0ab4a98c34d2dbbec05889b2d9af82523f6
/c-tools/src/com/bixuebihui/spring/BeanPostPrcessorImpl.java
a02949690402988d91b83acd01736810ed169720
[ "MIT" ]
permissive
Coder-zhangdao/c-tools
feb48c1d7b5a2db154a13f36fd8e0fd7888f3540
4c89f8032ef624835ec0ad209cdc45a59aa6b23c
refs/heads/master
2023-07-08T23:50:50.389363
2021-08-02T08:17:43
2021-08-02T08:17:43
390,616,957
1
0
null
null
null
null
UTF-8
Java
false
false
1,615
java
package com.bixuebihui.spring; import com.bixuebihui.util.Config; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; import java.lang.reflect.InvocationTargetException; /** * @author xwx */ public class BeanPostPrcessorImpl implements BeanPostProcessor { private String dbHelperBeanName = "dbHelper"; // Bean 实例化之前进行的处理 @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (beanName.equals(getDbHelperBeanName())) { try { boolean res = Config.initDbConfig(); if (res) { System.out.println("Config.initDbConfig called by postProcessBeforeInitialization"); } else { System.err.println("Config.initDbConfig failed in postProcessBeforeInitialization"); } } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { e.printStackTrace(); } } return bean; } // Bean 实例化之后进行的处理 @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } public String getDbHelperBeanName() { return dbHelperBeanName; } public void setDbHelperBeanName(String dbHelperBeanName) { this.dbHelperBeanName = dbHelperBeanName; } }
[ "xingwanxiang@autohome.com.cn" ]
xingwanxiang@autohome.com.cn
edf31baa894218afbfc9fe515a3ddd25be206b04
783323c7d145114267f8f85275eaf44b6395feea
/src/main/java/mentortools/student/Student.java
3de688c9f481a2c11cb0eb349adc44873f9492b3
[]
no_license
n0rb1v/mentor-tools
d2c25c8933182be32a94b20f6c377a699be9a5c1
b5d374ca381b64b0ad4df07b384b6e4fdef78039
refs/heads/master
2023-07-10T18:36:38.890913
2021-08-08T21:01:16
2021-08-08T21:01:16
392,838,504
0
0
null
null
null
null
UTF-8
Java
false
false
817
java
package mentortools.student; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import mentortools.trainingclass.Registration; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity @Data @NoArgsConstructor @AllArgsConstructor public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; private String email; private String gituser; private String memo; @OneToMany(mappedBy = "student_id") //registration Set<Registration> registrations = new HashSet<>(); public Student(String name, String email, String gituser, String memo) { this.name = name; this.email = email; this.gituser = gituser; this.memo = memo; } }
[ "n0rb1v@gmail.com" ]
n0rb1v@gmail.com
e43c142a34f7376b383ad9616c8ea704e60fb3ee
7833106f265e2828bbf5eb5afc3bbd1511137de1
/src/main/java/com/daleenchic/jewellery/models/Collection.java
8f061730d3aadace83d7d0c23052f06575e19f65
[]
no_license
DaleenHamdi/Jewelry
191c1c93df912eff44393dcf8c561e4f4f42fd31
b554b33d553265f3c875c63d8fa4fc3217834b9b
refs/heads/main
2023-07-30T19:44:20.565164
2021-09-13T13:40:08
2021-09-13T13:40:08
403,639,423
0
0
null
2021-09-13T13:40:09
2021-09-06T13:48:32
Java
UTF-8
Java
false
false
1,425
java
package com.daleenchic.jewellery.models; import java.util.List; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import com.fasterxml.jackson.annotation.JsonIgnore; @Entity(name= "collection") public class Collection { @Id @GeneratedValue (strategy= GenerationType.IDENTITY) private Integer id; private String name; // Relations @ManyToMany() @JoinTable(name="product_collection", joinColumns= @JoinColumn(name="collection_id"), inverseJoinColumns = @JoinColumn(name = "product_id")) @JsonIgnore private List<Product> products; // Constructors public Collection() { } public Collection(Integer id, String name) { this.id = id; this.name = name; } // Getters and Setters public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<Product> getProducts() { return products; } public void setProducts(List<Product> products) { this.products = products; } public void addProduct (Product product) { this.products.add(product); } public void removeProduct (Product product) { this.products.remove(product); } }
[ "daleen.h98@gmail.com" ]
daleen.h98@gmail.com
f4984a613a8e0e06e6f70566d91a267af7ee862c
d1df297e72ae934ab626f2bcdac56ffcc08f656f
/sp/matching-service-adapter/src/test/java/uk/gov/ida/integrationtest/interfacetests/LegacyExampleSchemaTests.java
4d3c2a99088f51f2e3b26fc614453e8c71689702
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
stub-idp/stub-idp
7e69a1879bcb697cfb472ab02f56818d230c0bb7
2ea95f20802aa5492fe108160faf3957d87ed691
refs/heads/monorepo
2023-08-03T04:33:37.308918
2023-06-30T18:38:45
2023-07-02T14:00:07
171,540,622
0
0
MIT
2023-09-13T18:09:56
2019-02-19T20:00:38
Java
UTF-8
Java
false
false
22,589
java
package uk.gov.ida.integrationtest.interfacetests; import io.dropwizard.testing.junit5.DropwizardExtensionsSupport; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.opensaml.saml.saml2.core.AttributeQuery; import stubidp.saml.extensions.extensions.IdaAuthnContext; import stubidp.saml.test.builders.AttributeQueryBuilder; import uk.gov.ida.integrationtest.helpers.MatchingServiceAdapterAppExtension; import java.nio.file.Path; import java.nio.file.Paths; import java.time.LocalDate; import java.util.List; import static stubidp.saml.test.builders.AddressAttributeBuilder_1_1.anAddressAttribute; import static stubidp.saml.test.builders.AddressAttributeValueBuilder_1_1.anAddressAttributeValue; import static stubidp.saml.test.builders.DateAttributeBuilder_1_1.aDate_1_1; import static stubidp.saml.test.builders.DateAttributeValueBuilder.aDateValue; import static stubidp.saml.test.builders.GenderAttributeBuilder_1_1.aGender_1_1; import static stubidp.saml.test.builders.IssuerBuilder.anIssuer; import static stubidp.saml.test.builders.PersonNameAttributeBuilder_1_1.aPersonName_1_1; import static stubidp.saml.test.builders.PersonNameAttributeValueBuilder.aPersonNameValue; import static stubidp.test.devpki.TestEntityIds.HUB_ENTITY_ID; import static uk.gov.ida.integrationtest.helpers.AssertionHelper.aMatchingDatasetAssertion; import static uk.gov.ida.integrationtest.helpers.AssertionHelper.aSubjectWithAssertions; import static uk.gov.ida.integrationtest.helpers.AssertionHelper.anAuthnStatementAssertion; @ExtendWith(DropwizardExtensionsSupport.class) public class LegacyExampleSchemaTests extends BaseTestToolInterfaceTest { private static final String REQUEST_ID = "default-match-id"; private static final String PID = "default-pid"; public static final MatchingServiceAdapterAppExtension appRule = new MatchingServiceAdapterAppExtension(false, configRules); @Override protected MatchingServiceAdapterAppExtension getAppRule() { return appRule; } @Test public void shouldProduceLoA2SimpleCase() throws Exception { AttributeQuery attributeQuery = AttributeQueryBuilder.anAttributeQuery() .withId(REQUEST_ID) .withIssuer(anIssuer().withIssuerId(HUB_ENTITY_ID).build()) .withSubject(aSubjectWithAssertions(List.of( anAuthnStatementAssertion(IdaAuthnContext.LEVEL_2_AUTHN_CTX, REQUEST_ID), aMatchingDatasetAssertion(List.of( aPersonName_1_1().addValue( aPersonNameValue() .withValue("Joe") .withVerified(true) .withFrom(null) .withTo(null) .build()) .buildAsFirstname(), aPersonName_1_1().addValue( aPersonNameValue() .withValue("Dou") .withVerified(true) .withFrom(LocalDate.of(2010, 1, 20)) .withTo(null) .build()) .buildAsSurname(), aDate_1_1().addValue( aDateValue() .withValue("1980-05-24") .withVerified(true) .withFrom(null) .withTo(null) .build()).buildAsDateOfBirth(), anAddressAttribute().addAddress( anAddressAttributeValue() .addLines(List.of("10 George Street")) .withFrom(LocalDate.of(2005, 5, 14)) .withInternationalPostcode("GB1 2PF") .withPostcode("GB1 2PF") .withUprn("833F1187-9F33-A7E27B3F211E") .withVerified(true) .withTo(null) .build()) .buildCurrentAddress() ), false, REQUEST_ID)), REQUEST_ID, HUB_ENTITY_ID, PID)) .build(); Path path = Paths.get("verify-matching-service-test-tool/src/main/resources/legacy/LoA2-Minimum_data_set.json"); assertThatRequestThatWillBeSentIsEquivalentToFile(attributeQuery, path); } @Test public void shouldProduceLoA1SimpleCase() throws Exception { AttributeQuery attributeQuery = AttributeQueryBuilder.anAttributeQuery() .withId(REQUEST_ID) .withIssuer(anIssuer().withIssuerId(HUB_ENTITY_ID).build()) .withSubject(aSubjectWithAssertions(List.of( anAuthnStatementAssertion(IdaAuthnContext.LEVEL_1_AUTHN_CTX, REQUEST_ID), aMatchingDatasetAssertion(List.of( aPersonName_1_1().addValue( aPersonNameValue() .withValue("Joe") .withVerified(true) .withFrom(null) .withTo(null) .build()) .buildAsFirstname(), aPersonName_1_1().addValue( aPersonNameValue() .withValue("Dou") .withVerified(true) .withFrom(LocalDate.of(2015, 5, 14)) .withTo(null) .build()) .buildAsSurname(), aDate_1_1().addValue( aDateValue() .withValue("1980-05-24") .withVerified(true) .withFrom(null) .withTo(null) .build()).buildAsDateOfBirth(), anAddressAttribute().addAddress( anAddressAttributeValue() .addLines(List.of("10 George Street")) .withFrom(LocalDate.of(2005, 5, 14)) .withInternationalPostcode("GB1 2PF") .withPostcode("GB1 2PF") .withUprn("833F1187-9F33-A7E27B3F211E") .withVerified(true) .withTo(null) .build()) .buildCurrentAddress() ), false, REQUEST_ID)), REQUEST_ID, HUB_ENTITY_ID, PID)) .build(); Path path = Paths.get("verify-matching-service-test-tool/src/main/resources/legacy/LoA1-Minimum_data_set.json"); assertThatRequestThatWillBeSentIsEquivalentToFile(attributeQuery, path); } @Test public void shouldProduceLoA1ExtensiveCase() throws Exception { AttributeQuery attributeQuery = AttributeQueryBuilder.anAttributeQuery() .withId(REQUEST_ID) .withIssuer(anIssuer().withIssuerId(HUB_ENTITY_ID).build()) .withSubject(aSubjectWithAssertions(List.of( anAuthnStatementAssertion(IdaAuthnContext.LEVEL_1_AUTHN_CTX, REQUEST_ID), aMatchingDatasetAssertion(List.of( aPersonName_1_1().addValue( aPersonNameValue() .withValue("Joe") .withVerified(false) .withFrom(null) .withTo(null) .build()) .buildAsFirstname(), aPersonName_1_1().addValue( aPersonNameValue() .withValue("Bob Rob") .withVerified(false) .withFrom(null) .withTo(null) .build()) .buildAsMiddlename(), aPersonName_1_1() .addValue( aPersonNameValue() .withValue("Fred") .withVerified(false) .withFrom(LocalDate.of(1980, 5, 24)) .withTo(LocalDate.of(1987, 1, 20)) .build() ).addValue( aPersonNameValue() .withValue("Dou") .withVerified(false) .withFrom(getDateReplacement(yesterday)) .withTo(null) .build() ).addValue( aPersonNameValue() .withValue("John") .withVerified(true) .withFrom(LocalDate.of(2003, 5, 24)) .withTo(LocalDate.of(2004, 1, 20)) .build() ).addValue( aPersonNameValue() .withValue("Joe") .withVerified(true) .withFrom(LocalDate.of(2005, 5, 24)) .withTo(getDateReplacement(inRange405to100)) .build() ).addValue( aPersonNameValue() .withValue("Simon") .withVerified(false) .withFrom(getDateReplacement(inRange405to101)) .withTo(getDateReplacement(inRange405to200)) .build() ) .buildAsSurname(), aGender_1_1().withValue("Male").withVerified(false).withFrom(null).withTo(null).build(), aDate_1_1().addValue( aDateValue() .withValue("1980-05-24") .withVerified(true) .withFrom(null) .withTo(null) .build()).buildAsDateOfBirth(), anAddressAttribute().addAddress( anAddressAttributeValue() .addLines(List.of("2323 George Street")) .withFrom(getDateReplacement(yesterday)) .withInternationalPostcode("GB1 5PP") .withPostcode("GB1 2PP") .withUprn("7D68E096-5510-B3844C0BA3FD") .withVerified(false) .withTo(null) .build()) .buildCurrentAddress(), anAddressAttribute() .addAddress( anAddressAttributeValue() .addLines(List.of("10 George Street")) .withFrom(LocalDate.of(2005, 5, 14)) .withTo(LocalDate.of(2007, 5, 14)) .withPostcode("GB1 2PF") .withInternationalPostcode("GB1 2PF") .withUprn("833F1187-9F33-A7E27B3F211E") .withVerified(true) .build() ).addAddress( anAddressAttributeValue() .addLines(List.of("344 George Street")) .withFrom(LocalDate.of(2009, 5, 24)) .withTo(getDateReplacement(inRange405to100)) .withPostcode("GB1 2PP") .withInternationalPostcode("GB1 2PP") .withUprn("7D68E096-5510-B3844C0BA3FD") .withVerified(true) .build() ).addAddress( anAddressAttributeValue() .addLines(List.of("67676 George Street")) .withFrom(getDateReplacement(inRange405to101)) .withTo(getDateReplacement(inRange405to200)) .withPostcode("GB1 2PP") .withInternationalPostcode("GB1 3PP") .withUprn("7D68E096-5510-B3844C0BA3FD") .withVerified(false) .build() ).addAddress( anAddressAttributeValue() .addLines(List.of("46244 George Street")) .withFrom(LocalDate.of(1980, 5, 24)) .withTo(LocalDate.of(1987, 5, 24)) .withPostcode("GB1 2PP") .withInternationalPostcode("GB1 3PP") .withUprn("7D68E096-5510-B3844C0BA3FD") .withVerified(false) .build() ).addAddress( anAddressAttributeValue() .addLines(List.of("Flat , Alberta Court", "36 Harrods Road", "New Berkshire", "Berkshire", "Cambria", "Europe")) .withFrom(LocalDate.of(1987, 5, 24)) .withTo(LocalDate.of(1989, 5, 24)) .withPostcode(null) .withInternationalPostcode(null) .withUprn(null) .withVerified(false) .build() ).buildPreviousAddress() ), false, REQUEST_ID)), REQUEST_ID, HUB_ENTITY_ID, PID)) .build(); Path path = Paths.get("verify-matching-service-test-tool/src/main/resources/legacy/LoA1-Extended_data_set.json"); assertThatRequestThatWillBeSentIsEquivalentToFile(attributeQuery, path); } @Test public void shouldProduceLoA2ExtensiveCase() throws Exception { AttributeQuery attributeQuery = AttributeQueryBuilder.anAttributeQuery() .withId(REQUEST_ID) .withIssuer(anIssuer().withIssuerId(HUB_ENTITY_ID).build()) .withSubject(aSubjectWithAssertions(List.of( anAuthnStatementAssertion(IdaAuthnContext.LEVEL_2_AUTHN_CTX, REQUEST_ID), aMatchingDatasetAssertion(List.of( aPersonName_1_1().addValue( aPersonNameValue() .withValue("Joe") .withVerified(false) .withFrom(null) .withTo(null) .build()) .buildAsFirstname(), aPersonName_1_1().addValue( aPersonNameValue() .withValue("Bob Rob") .withVerified(false) .withFrom(null) .withTo(null) .build()) .buildAsMiddlename(), aPersonName_1_1() .addValue( aPersonNameValue() .withValue("Fred") .withVerified(false) .withFrom(LocalDate.of(1980, 5, 24)) .withTo(LocalDate.of(1987, 1, 20)) .build() ).addValue( aPersonNameValue() .withValue("Dou") .withVerified(false) .withFrom(getDateReplacement(yesterday)) .withTo(null) .build() ).addValue( aPersonNameValue() .withValue("John") .withVerified(true) .withFrom(LocalDate.of(2003, 5, 24)) .withTo(LocalDate.of(2004, 1, 20)) .build() ).addValue( aPersonNameValue() .withValue("Joe") .withVerified(true) .withFrom(LocalDate.of(2005, 5, 24)) .withTo(getDateReplacement(inRange180to100)) .build() ).addValue( aPersonNameValue() .withValue("Simon") .withVerified(false) .withFrom(getDateReplacement(inRange180to101)) .withTo(getDateReplacement(inRange180to150)) .build() ) .buildAsSurname(), aGender_1_1().withValue("Male").withVerified(false).withFrom(null).withTo(null).build(), aDate_1_1().addValue( aDateValue() .withValue("1980-05-24") .withVerified(true) .withFrom(null) .withTo(null) .build()).buildAsDateOfBirth(), anAddressAttribute().addAddress( anAddressAttributeValue() .addLines(List.of("2323 George Street")) .withFrom(getDateReplacement(yesterday)) .withInternationalPostcode("GB1 5PP") .withPostcode("GB1 2PP") .withUprn("7D68E096-5510-B3844C0BA3FD") .withVerified(false) .withTo(null) .build()) .buildCurrentAddress(), anAddressAttribute() .addAddress( anAddressAttributeValue() .addLines(List.of("10 George Street")) .withFrom(LocalDate.of(2005, 5, 14)) .withTo(LocalDate.of(2007, 5, 14)) .withPostcode("GB1 2PF") .withInternationalPostcode("GB1 2PF") .withUprn("833F1187-9F33-A7E27B3F211E") .withVerified(true) .build() ).addAddress( anAddressAttributeValue() .addLines(List.of("344 George Street")) .withFrom(LocalDate.of(2009, 5, 24)) .withTo(getDateReplacement(inRange405to100)) .withPostcode("GB1 2PP") .withInternationalPostcode("GB1 2PP") .withUprn("7D68E096-5510-B3844C0BA3FD") .withVerified(true) .build() ).addAddress( anAddressAttributeValue() .addLines(List.of("67676 George Street")) .withFrom(getDateReplacement(inRange405to101)) .withTo(getDateReplacement(inRange405to200)) .withPostcode("GB1 2PP") .withInternationalPostcode("GB1 3PP") .withUprn("7D68E096-5510-B3844C0BA3FD") .withVerified(false) .build() ).addAddress( anAddressAttributeValue() .addLines(List.of("56563 George Street")) .withFrom(LocalDate.of(1980, 5, 24)) .withTo(LocalDate.of(1987, 5, 24)) .withPostcode("GB1 2PP") .withInternationalPostcode("GB1 3PP") .withUprn("7D68E096-5510-B3844C0BA3FD") .withVerified(false) .build() ).addAddress( anAddressAttributeValue() .addLines(List.of("Flat , Alberta Court", "36 Harrods Road", "New Berkshire", "Berkshire", "Cambria", "Europe")) .withFrom(LocalDate.of(1987, 5, 24)) .withTo(LocalDate.of(1989, 5, 24)) .withPostcode(null) .withInternationalPostcode(null) .withUprn(null) .withVerified(false) .build() ).buildPreviousAddress() ), false, REQUEST_ID)), REQUEST_ID, HUB_ENTITY_ID, PID)) .build(); Path path = Paths.get("verify-matching-service-test-tool/src/main/resources/legacy/LoA2-Extended_data_set.json"); assertThatRequestThatWillBeSentIsEquivalentToFile(attributeQuery, path); } @Test public void shouldProduceUserAccountCreationJson() throws Exception { AttributeQuery attributeQuery = AttributeQueryBuilder.anAttributeQuery() .withId(REQUEST_ID) .withAttributes(List.of()) .withIssuer(anIssuer().withIssuerId(HUB_ENTITY_ID).build()) .withSubject(aSubjectWithAssertions(List.of( anAuthnStatementAssertion(IdaAuthnContext.LEVEL_1_AUTHN_CTX, REQUEST_ID), aMatchingDatasetAssertion(List.of(), false, REQUEST_ID) ), REQUEST_ID, HUB_ENTITY_ID, PID)) .build(); Path filePath = Paths.get("verify-matching-service-test-tool/src/main/resources/legacy/user_account_creation.json"); assertThatRequestThatWillBeSentIsEquivalentToFile(attributeQuery, filePath, UNKNOWN_USER_URI); } }
[ "willpdp@users.noreply.github.com" ]
willpdp@users.noreply.github.com
7c08fd1b4225c48ff77040bae3e825d4c04de9bb
97ec8b04046b71859d42efdb176a6452750dbe24
/src/00_playdata/01_Recursion/code4_1.java
d4c088f9e621a450897851a2fdaee8cc17a1ed55
[]
no_license
jihyeonmun/codingtest
ee92ac8c1014b6dde67ffb5454d4301227ff9780
c3ab245d7ad9c9468d85b7556e63eb34a31d4cbf
refs/heads/master
2023-04-25T00:19:09.335028
2021-05-14T13:40:52
2021-05-14T13:40:52
347,573,294
0
0
null
null
null
null
UTF-8
Java
false
false
1,805
java
import javax.swing.*; import java.util.Arrays; public class code4_1{ private static int N=8; private static int[][] maze = { {0, 0, 0, 0, 0, 0, 0, 1}, {1, 1, 1, 0, 1, 1, 0, 1}, {0, 0, 0, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 1, 1, 0, 1}, {0, 1, 1, 1, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 1, 0, 0, 1, 1}, {0, 1, 1, 1, 0, 0, 0, 0} }; private static final int pathway_color=0; private static final int wall_color=1; private static final int blocked_color=2; private static final int path_color=3; public static boolean findMazePath(int x, int y){ //유효한 범위 체크하기!! if(x<0 || y<0 || x>=N || y>=N) return false; else if (maze[x][y] !=pathway_color) return false; else if (x==N-1 && y==N-1){ maze[x][y] = path_color; return true; } else { maze[x][y] = path_color; if(findMazePath(x-1,y) || findMazePath(x,y+1)|| findMazePath(x+1,y)||findMazePath(x,y-1)){ return true; } maze[x][y] = blocked_color; return false; } } public static void mazePrint(int[][] data){ for (int i = 0; i < data.length * data[0].length; i++) { int row = i / data[0].length; // 행 int column = i % data[0].length; // 열 System.out.print(data[row][column] + "\t"); if (column == data[0].length - 1) { System.out.println(); } } } public static void main(String[] args){ mazePrint(maze); findMazePath(0,0); System.out.println(); mazePrint(maze); } }
[ "jhmoon1994@gmail.com" ]
jhmoon1994@gmail.com
b4c5dd07c9b054b60fb2956f0dc56c6d863c9473
3532d9874a13f289c9f42580026f08dac0e788ab
/cdoracle Maven Webapp/src/main/java/com/yb/service/TblShoppingcartService.java
d931222e0a0d38ca5bbeb4f12ce25b3b9dc7a011
[]
no_license
zhanghslq/server
09c298325913df35e95db97b84a82662b88e3423
dbe255fb3ff7182ef9671213da0ca64311822e72
refs/heads/master
2021-07-10T04:49:01.284377
2019-01-25T10:56:38
2019-01-25T10:56:38
100,348,004
0
0
null
null
null
null
UTF-8
Java
false
false
94
java
package com.yb.service; public interface TblShoppingcartService{ void queryAll (); }
[ "zhanghslq@163.com" ]
zhanghslq@163.com
a1f0e42af14ec86288ade1b6f1da8e960a7d42e6
0898e169114511206af17341e744e0e235ae2be3
/src/main/java/nl/inholland/javafx/User.java
37e26ed81123d2c87e4c86ae9b9b1f8f2359bf20
[]
no_license
Laurensvanc/mavenfx
7672999ce70cf9a1b6cbe4b8f0704d71bbceca7f
9ad59ab25528cf0b86e920253142ceb90513c56a
refs/heads/main
2023-09-01T08:19:24.608865
2021-10-23T13:40:01
2021-10-23T13:40:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package nl.inholland.javafx; public class User { public String email; public String password; public String lastname; public String firstname; public User(String email, String password, String lastname, String firstname) { this.email = email; this.password = password; this.lastname = lastname; this.firstname = firstname; } }
[ "sjorsvanholst@gmail.com" ]
sjorsvanholst@gmail.com
591bffe6d4af9b47042a47d348de3d7a275be8b3
0a17bd2e6563a03b578f313d3d57e7504c49302a
/src/main/java/com/coding/exercise/restaurantmanager/spring/core/dao/ManagerDao.java
b2408c1c3159db293d4e877213bae8f66e01f249
[]
no_license
valgilbert/java-restaurantmanager
9981b3f5d31ad42cd39e1a91880c2cc8957ac591
89ae441d1e5061a026ad7eb0e4833b7ac917c134
refs/heads/master
2020-12-30T10:50:55.523700
2017-07-30T23:28:49
2017-07-30T23:28:49
98,265,434
0
0
null
null
null
null
UTF-8
Java
false
false
286
java
package com.coding.exercise.restaurantmanager.spring.core.dao; import java.util.List; import com.coding.exercise.restaurantmanager.spring.core.model.Manager; public interface ManagerDao { public List<Manager> getAllManagers(); public void insertManager(Manager manager); }
[ "vgl_19@yahoo.com" ]
vgl_19@yahoo.com
3c2204bbc2e2a604c0ddfb50a263a20526622293
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_e995cb4254396421f9840cc86037b77339db5f4a/BaseHtmlMessageRenderer/29_e995cb4254396421f9840cc86037b77339db5f4a_BaseHtmlMessageRenderer_s.java
8f9eb93d9e3a7f32031399dca7a28858e19717b3
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
14,366
java
/* * OpenFaces - JSF Component Library 2.0 * Copyright (C) 2007-2010, TeamDev Ltd. * licensing@openfaces.org * Unless agreed in writing the contents of this file are subject to * the GNU Lesser General Public License Version 2.1 (the "LGPL" License). * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * Please visit http://openfaces.org/licensing/ for more details. */ package org.openfaces.renderkit.validation; import org.openfaces.org.json.JSONException; import org.openfaces.org.json.JSONObject; import org.openfaces.util.Rendering; import org.openfaces.util.Styles; import javax.faces.application.FacesMessage; import javax.faces.component.UIComponent; import javax.faces.component.UIMessage; import javax.faces.component.html.HtmlMessage; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import java.io.IOException; import java.util.Iterator; /** * @author Vladimir Korenev */ public abstract class BaseHtmlMessageRenderer extends BaseMessageRenderer { public static final String DIR_ATTR = "dir"; public static final String LANG_ATTR = "lang"; public static final String ONCLICK_ATTR = "onclick"; public static final String ONDBLCLICK_ATTR = "ondblclick"; public static final String ONMOUSEDOWN_ATTR = "onmousedown"; public static final String ONMOUSEUP_ATTR = "onmouseup"; public static final String ONMOUSEOVER_ATTR = "onmouseover"; public static final String ONMOUSEMOVE_ATTR = "onmousemove"; public static final String ONMOUSEOUT_ATTR = "onmouseout"; public static final String ONKEYPRESS_ATTR = "onkeypress"; public static final String ONKEYDOWN_ATTR = "onkeydown"; public static final String ONKEYUP_ATTR = "onkeyup"; public static final String ERRORSTYLE_ATTR = "errorStyle"; public static final String ERRORCLASS_ATTR = "errorClass"; public static final String INFOSTYLE_ATTR = "infoStyle"; public static final String INFOCLASS_ATTR = "infoClass"; public static final String FATALSTYLE_ATTR = "fatalStyle"; public static final String FATALCLASS_ATTR = "fatalClass"; public static final String WARNSTYLE_ATTR = "warnStyle"; public static final String WARNCLASS_ATTR = "warnClass"; private static final String[] MESSAGE_PASSTHROUGH_ATTRIBUTES_WITHOUT_TITLE_STYLE_AND_STYLE_CLASS = { DIR_ATTR, LANG_ATTR, ONCLICK_ATTR, ONDBLCLICK_ATTR, ONMOUSEDOWN_ATTR, ONMOUSEUP_ATTR, ONMOUSEOVER_ATTR, ONMOUSEMOVE_ATTR, ONMOUSEOUT_ATTR, ONKEYPRESS_ATTR, ONKEYDOWN_ATTR, ONKEYUP_ATTR}; private static final String[] MESSAGE_PASSTHROUGH_ADDITIONAL_STYLES = { ERRORSTYLE_ATTR, ERRORCLASS_ATTR, WARNSTYLE_ATTR, WARNCLASS_ATTR, FATALSTYLE_ATTR, FATALCLASS_ATTR, INFOSTYLE_ATTR, INFOCLASS_ATTR }; private static final String DISPLAY_NONE_CSS = "display: none;"; protected void renderMessage(FacesContext facesContext, UIComponent messageComponent) throws IOException { UIComponent forComponent = getForComponent(messageComponent); if (forComponent == null) { // log.error("Could not render Message. Unable to find component '" + forAttr + "' (calling findComponent on component '" + messageComponent.getClientId(facesContext) + "'). If the provided id was correct, wrap the message and its component into an h:panelGroup or h:panelGrid."); // return; } startMessageElement(facesContext, messageComponent); String clientId = null; Iterator messageIterator = null; if (forComponent != null) { clientId = forComponent.getClientId(facesContext); messageIterator = facesContext.getMessages(clientId); } if (messageIterator != null && messageIterator.hasNext()) { // get first message FacesMessage facesMessage = (FacesMessage) messageIterator.next(); // and render it renderSingleFacesMessage(facesContext, messageComponent, facesMessage, clientId); } else { String[] styleAndClass = getStyleAndStyleClass(messageComponent, FacesMessage.SEVERITY_ERROR); String style = Styles.mergeStyles(styleAndClass[0], DISPLAY_NONE_CSS); String styleClass = styleAndClass[1]; ResponseWriter writer = facesContext.getResponseWriter(); if (!Rendering.isDefaultAttributeValue(style)) { Rendering.renderHTMLAttribute(writer, "style", "style", style); } if (!Rendering.isDefaultAttributeValue(styleClass)) { Rendering.renderHTMLAttribute(writer, "styleClass", "styleClass", styleClass); } } endMessageElement(facesContext); } protected void renderSingleFacesMessage(FacesContext facesContext, UIComponent messageComponent, FacesMessage message, String forClientId) throws IOException { // determine style and style class String[] styleAndClass = getStyleAndStyleClass(messageComponent, message.getSeverity()); String style = styleAndClass[0]; String styleClass = styleAndClass[1]; String summary = message.getSummary(); String detail = message.getDetail(); String title = getTitle(messageComponent); boolean tooltip = isTooltip(messageComponent); if (title == null && tooltip) { title = summary; } ResponseWriter writer = facesContext.getResponseWriter(); if (!Rendering.isDefaultAttributeValue(title)) { Rendering.renderHTMLAttribute(writer, "title", "title", title); } if (!Rendering.isDefaultAttributeValue(style)) { Rendering.renderHTMLAttribute(writer, "style", "style", style); } if (!Rendering.isDefaultAttributeValue(styleClass)) { Rendering.renderHTMLAttribute(writer, "styleClass", "styleClass", styleClass); } boolean showSummary = isShowSummary(messageComponent) && (summary != null); boolean showDetail = isShowDetail(messageComponent) && (detail != null); if (showSummary && !(title == null && tooltip)) { writer.writeText(summary, null); if (showDetail) { writer.writeText(" ", null); } } if (showDetail) { writer.writeText(detail, null); } } private void endMessageElement(FacesContext facesContext) throws IOException { ResponseWriter writer = facesContext.getResponseWriter(); writer.endElement("span"); } private void startMessageElement(FacesContext facesContext, UIComponent messageComponent) throws IOException { ResponseWriter writer = facesContext.getResponseWriter(); writer.startElement("span", messageComponent); writer.writeAttribute("id", messageComponent.getClientId(facesContext), null); for (String attrName : MESSAGE_PASSTHROUGH_ATTRIBUTES_WITHOUT_TITLE_STYLE_AND_STYLE_CLASS) { Object value = messageComponent.getAttributes().get(attrName); Rendering.renderHTMLAttribute(writer, attrName, attrName, value); } } protected String[] getStyleAndStyleClass(UIComponent message, FacesMessage.Severity severity) { String style = null; String styleClass = null; if (severity == FacesMessage.SEVERITY_INFO) { style = getInfoStyle(message); styleClass = getInfoClass(message); } else if (severity == FacesMessage.SEVERITY_WARN) { style = getWarnStyle(message); styleClass = getWarnClass(message); } else if (severity == FacesMessage.SEVERITY_ERROR) { style = getErrorStyle(message); styleClass = getErrorClass(message); } else if (severity == FacesMessage.SEVERITY_FATAL) { style = getFatalStyle(message); styleClass = getFatalClass(message); } if (style == null) { style = getStyle(message); } if (styleClass == null) { styleClass = getStyleClass(message); } Styles.checkCSSStyleForSemicolumn(style); return new String[]{style, styleClass}; } protected String getInfoStyle(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getInfoStyle(); } else { return (String) component.getAttributes().get("infoStyle"); } } protected String getInfoClass(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getInfoClass(); } else { return (String) component.getAttributes().get("infoClass"); } } protected String getWarnStyle(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getWarnStyle(); } else { return (String) component.getAttributes().get("warnStyle"); } } protected String getWarnClass(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getWarnClass(); } else { return (String) component.getAttributes().get("warnClass"); } } protected String getErrorStyle(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getErrorStyle(); } else { return (String) component.getAttributes().get("errorStyle"); } } protected String getErrorClass(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getErrorClass(); } else { return (String) component.getAttributes().get("errorClass"); } } protected String getFatalStyle(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getFatalStyle(); } else { return (String) component.getAttributes().get("fatalStyle"); } } protected String getFatalClass(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getFatalClass(); } else { return (String) component.getAttributes().get("fatalClass"); } } protected String getStyle(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getStyle(); } else { return (String) component.getAttributes().get("style"); } } protected String getStyleClass(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getStyleClass(); } else { return (String) component.getAttributes().get("styleClass"); } } protected String getTitle(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).getTitle(); } else { return (String) component.getAttributes().get("title"); } } protected boolean isTooltip(UIComponent component) { if (component instanceof HtmlMessage) { return ((HtmlMessage) component).isTooltip(); } else { return Rendering.getBooleanAttribute(component, "tooltip", false); } } protected boolean isShowSummary(UIComponent component) { if (component instanceof UIMessage) { return ((UIMessage) component).isShowSummary(); } else { return Rendering.getBooleanAttribute(component, "showSummary", false); } } protected boolean isShowDetail(UIComponent component) { if (component instanceof UIMessage) { return ((UIMessage) component).isShowDetail(); } else { return Rendering.getBooleanAttribute(component, "showDetail", false); } } protected final JSONObject getAdditionalParams(UIComponent messageComponent) { JSONObject params = new JSONObject(); boolean atLeastOneParameter = false; for (String attrName : MESSAGE_PASSTHROUGH_ATTRIBUTES_WITHOUT_TITLE_STYLE_AND_STYLE_CLASS) { Object value = messageComponent.getAttributes().get(attrName); if (value instanceof String) { atLeastOneParameter = true; try { params.put(attrName, value); } catch (JSONException e) { throw new RuntimeException(e); } } } return atLeastOneParameter ? params : null; } protected final JSONObject getAdditionalStyles(UIComponent messageComponent) { JSONObject params = new JSONObject(); boolean atLeastOneParameter = false; for (String attrName : MESSAGE_PASSTHROUGH_ADDITIONAL_STYLES) { Object value = messageComponent.getAttributes().get(attrName); if (value instanceof String) { atLeastOneParameter = true; try { params.put(attrName, value); } catch (JSONException e) { throw new RuntimeException(e); } } } return atLeastOneParameter ? params : null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3732fc307e4e3aab3719bfb1bd5d4c2ee9c8889a
40bbb713fa5da66a98a5daa41e16bed52089cc76
/src/main/java/com/dendnight/base/LoginInfo.java
50aa9743ab41f1dffca4b48d9236dbce44dbf6cc
[]
no_license
dendnight/Dendnight
ab054ad8c178f3df103fe7535d8240299894985c
81b315b9c7829c990d37c0d4a722f9f4cd024a23
refs/heads/master
2016-09-06T07:31:14.050097
2014-03-26T17:22:53
2014-03-26T17:22:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,418
java
package com.dendnight.base; import java.io.Serializable; /** * 登录信息 * * <pre> * Description * Copyright: Copyright (c)2013 * Company: DENDNIGHT * Author: Dendnight * Version: 1.0 * Create at: 2013年12月1日 下午3:01:56 * * 修改历史: * 日期 作者 版本 修改描述 * ------------------------------------------------------------------ * * </pre> */ public class LoginInfo implements Serializable { private static final long serialVersionUID = 8260155319208940218L; /** 编号 */ private Integer id; /** 昵称 */ private String nickname; /** 帐号 */ private String username; /** 类型 */ private String usertype; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getUsertype() { return usertype; } public void setUsertype(String usertype) { this.usertype = usertype; } @Override public String toString() { return "LoginInfo [id=" + id + ", nickname=" + nickname + ", username=" + username + ", usertype=" + usertype + "]"; } }
[ "dendnight@gmail.com" ]
dendnight@gmail.com
24935c326820d0752ec2dd63c196d03a68a54d8d
a21e35f26ed50c7f6a83e8bedbc544be7596a0b1
/app/src/main/java/com/jinqiao/b2c/compent/helper/SysHelper.java
ebf0bfdadfbd4b910416ae56533315520489fad5
[]
no_license
LiuLei0571/b2cFrame
d9072608dddc957a207ea502d19c2f03f5f96370
d38d3725504830e56a1a64c6f2ab4bef0b530bc2
refs/heads/master
2020-12-30T17:10:50.461478
2017-11-01T02:40:39
2017-11-01T02:40:39
91,060,449
0
0
null
null
null
null
UTF-8
Java
false
false
957
java
package com.jinqiao.b2c.compent.helper; import android.content.Intent; import com.jinqiao.b2c.compent.base.IAct; import com.jinqiao.b2c.compent.constants.Extras; import com.jinqiao.b2c.project.buyer.home.activity.BuyerHomeActivity; import com.jinqiao.b2c.project.buyer.home.manager.bean.HomeCommand; /** * 用途: * 作者:Created by liulei on 17/6/7. * 邮箱:liulei2@aixuedai.com */ public class SysHelper { public static void goBuyerHome(IAct iAct, int index, String type) { Intent intent = null; switch (type) { case "buyer": intent = new Intent(iAct.getActivity(), BuyerHomeActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(Extras.HOME.COMMAND, HomeCommand.page(index)); break; default: break; } iAct.startActivity(intent); } }
[ "649444395@qq.com" ]
649444395@qq.com
e261caf9639fb895e53ec7b7eefb122b9d5fd7ba
5f0c15061fc7854231d047f64327942d65b44476
/Lab25/TempConverter/TempPanel.java
fbf264ee16c18bed0ef38d1bbe68b4d79b371182
[]
no_license
erisaran/cosc160
136dedcb44104357f28258009cdadc5757af1019
b576aa815eb61d755f5bc093ffcd6cf735b99a1b
refs/heads/master
2021-01-11T05:48:57.652211
2016-09-24T09:03:36
2016-09-24T09:03:36
69,091,807
0
0
null
null
null
null
UTF-8
Java
false
false
3,345
java
/** Lab 25 * temperature converter gui */ package TempConverter; import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.*; public class TempPanel extends JPanel{ private JButton convert; private JButton changeUnit; private JButton storeNum; private JTextField inValue; private JLabel outValue; private JLabel instruct; private JLabel space = new JLabel(" In Fahrenheiht:"); private JLabel errorSpace = new JLabel(""); private double input; private boolean switcher = true; /** constructs the buttons and labels */ public TempPanel() { ButtonListener listener = new ButtonListener(); // Create an actionListener convert = new JButton("Convert"); changeUnit = new JButton("Change Unit"); storeNum = new JButton("Freezing Point"); JPanel buttonsPanel = new JPanel(); buttonsPanel.setPreferredSize(new Dimension(450,200)); buttonsPanel.setBackground(Color.orange); buttonsPanel.setLayout(new GridLayout(4, 4)); instruct = new JLabel(" Enter a temperature in celcius: "); inValue = new JTextField(10); outValue = new JLabel(); convert.addActionListener( listener ); changeUnit.addActionListener( listener ); storeNum.addActionListener(listener); setLayout(new BorderLayout()); buttonsPanel.add(instruct,BorderLayout.NORTH); buttonsPanel.add(inValue,BorderLayout.CENTER); buttonsPanel.add(space); buttonsPanel.add(outValue); buttonsPanel.add(convert); buttonsPanel.add(changeUnit); buttonsPanel.add(errorSpace); add(buttonsPanel); }//end constructor public double toCelsius(double fahr){ int BASE = 32; double CONVERSION_FACTOR = 9.0/ 5.0; double celsius = (fahr - BASE)/CONVERSION_FACTOR;//Step 3 converts into celsius return celsius; }//end method public double toFahr(double cels){ int BASE = 32; double CONVERSION_FACTOR = 9.0/5.0; double fahr = (cels*CONVERSION_FACTOR) + BASE; return fahr; }//end method /** represents a listener for button presses */ private class ButtonListener implements ActionListener{ /** what to do when a button has been pressed */ public void actionPerformed(ActionEvent e) { JButton x = (JButton) e.getSource(); if ("Convert".equals(x.getText())){ try{ input = Double.parseDouble(inValue.getText()); double result; if (!switcher){ result = toCelsius(input); }else{ result = toFahr(input); } outValue.setText("" + result); errorSpace.setText(""); } catch (NumberFormatException ex){ errorSpace.setText("Error: Must enter a number"); inValue.setText(""); }//catch }else if ("Change Unit".equals(x.getText())){ if (switcher){ switcher = false; instruct.setText(" Enter a temperature in Fahrenheit: "); space.setText(" In Celsius:" ); } else if (!switcher){ switcher = true; instruct.setText(" Enter a temperature in celcius: "); space.setText(" In Fahrenheiht:"); } } }//end action method }//end action class }//end class
[ "bdutton@oucs1513.otago.ac.nz" ]
bdutton@oucs1513.otago.ac.nz
0eb2d369e0391e99d0021cfab1679af25cfeff06
14d372ad6028ccea2ce21ef2fa6bb651b6c80346
/CryptoSnif/src/main/java/org/ged/crypto/model/Wys.java
34852f66fafb69bc43350925743fe98e55e139ef
[]
no_license
pippuzzo/GitRepo
29401152372838089eae649a970d969fefde5118
93a603f705ca86aeca20c74de3b9688430317e29
refs/heads/master
2021-01-24T13:34:43.907170
2020-11-16T00:05:26
2020-11-16T00:05:26
18,265,063
0
0
null
null
null
null
UTF-8
Java
false
false
4,726
java
package org.ged.crypto.model; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "id", "symbol", "partner_symbol", "data_available_from" }) public class Wys { @JsonProperty("id") private Integer id; @JsonProperty("symbol") private String symbol; @JsonProperty("partner_symbol") private String partnerSymbol; @JsonProperty("data_available_from") private Integer dataAvailableFrom; @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<String, Object>(); @JsonProperty("id") public Integer getId() { return id; } @JsonProperty("id") public void setId(Integer id) { this.id = id; } @JsonProperty("symbol") public String getSymbol() { return symbol; } @JsonProperty("symbol") public void setSymbol(String symbol) { this.symbol = symbol; } @JsonProperty("partner_symbol") public String getPartnerSymbol() { return partnerSymbol; } @JsonProperty("partner_symbol") public void setPartnerSymbol(String partnerSymbol) { this.partnerSymbol = partnerSymbol; } @JsonProperty("data_available_from") public Integer getDataAvailableFrom() { return dataAvailableFrom; } @JsonProperty("data_available_from") public void setDataAvailableFrom(Integer dataAvailableFrom) { this.dataAvailableFrom = dataAvailableFrom; } @JsonAnyGetter public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(Wys.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); sb.append("id"); sb.append('='); sb.append(((this.id == null)?"<null>":this.id)); sb.append(','); sb.append("symbol"); sb.append('='); sb.append(((this.symbol == null)?"<null>":this.symbol)); sb.append(','); sb.append("partnerSymbol"); sb.append('='); sb.append(((this.partnerSymbol == null)?"<null>":this.partnerSymbol)); sb.append(','); sb.append("dataAvailableFrom"); sb.append('='); sb.append(((this.dataAvailableFrom == null)?"<null>":this.dataAvailableFrom)); sb.append(','); sb.append("additionalProperties"); sb.append('='); sb.append(((this.additionalProperties == null)?"<null>":this.additionalProperties)); sb.append(','); if (sb.charAt((sb.length()- 1)) == ',') { sb.setCharAt((sb.length()- 1), ']'); } else { sb.append(']'); } return sb.toString(); } @Override public int hashCode() { int result = 1; result = ((result* 31)+((this.symbol == null)? 0 :this.symbol.hashCode())); result = ((result* 31)+((this.dataAvailableFrom == null)? 0 :this.dataAvailableFrom.hashCode())); result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); result = ((result* 31)+((this.partnerSymbol == null)? 0 :this.partnerSymbol.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof Wys) == false) { return false; } Wys rhs = ((Wys) other); return ((((((this.symbol == rhs.symbol)||((this.symbol!= null)&&this.symbol.equals(rhs.symbol)))&&((this.dataAvailableFrom == rhs.dataAvailableFrom)||((this.dataAvailableFrom!= null)&&this.dataAvailableFrom.equals(rhs.dataAvailableFrom))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.partnerSymbol == rhs.partnerSymbol)||((this.partnerSymbol!= null)&&this.partnerSymbol.equals(rhs.partnerSymbol)))); } }
[ "filippo.aquino@gmail.com" ]
filippo.aquino@gmail.com
e3b3c8e77ed0177203bef1c443238bc2b678f3bf
6bd9805d30632b6acd04cb49881368b693b24b3f
/Practica3/src/tpmv/exceptions/LexicalAnalisysException.java
cac02644ce7f2e83b6c16f35115b0290889c0bdf
[]
no_license
iiventura/TP
a74370669684d51bc7cdb473c795f58b48ea3bcf
87cc77b47ac89ffffb54907674800a6c8cd16aec
refs/heads/master
2020-03-17T10:23:55.478566
2018-05-15T12:38:33
2018-05-15T12:38:33
120,599,556
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package tpmv.exceptions; @SuppressWarnings("serial") public class LexicalAnalisysException extends Exception { /** * Envia el mensaje de excepcion * @param instr contiene el mensaje a mostrar */ public LexicalAnalisysException(String instr){ super(instr); } public String toString(){ return "Lexical Analisys Exception"; } }
[ "ireneven@ucm.es" ]
ireneven@ucm.es
0474dada6fe0124fce155314ed74c59becf69b26
94a5a961faf9d39dbd74ecb17dd1a8ea92a11ac3
/Poseiden-skeleton/src/test/java/com/nnk/springboot/controllers/RulecontrollerTests.java
eec3ccb636506a88db010499fe2f36cb4eac0eb7
[]
no_license
slingshot-dev/JavaDA_PROJECT7_RESTAPI
d9bcc86827fd8260f0d1844c74ddb78f20b17ac7
b3fee3c80acfc834c9800f8bf267ffa7bffd61a1
refs/heads/master
2022-12-14T15:51:25.515036
2020-09-01T13:32:44
2020-09-01T13:32:44
267,857,221
0
0
null
2020-09-01T13:32:45
2020-05-29T12:52:23
Java
UTF-8
Java
false
false
4,914
java
package com.nnk.springboot.controllers; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.result.MockMvcResultHandlers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; @SpringBootTest @ActiveProfiles("test") @AutoConfigureMockMvc(addFilters = false) @EnableAutoConfiguration(exclude = {SecurityFilterAutoConfiguration.class, SecurityAutoConfiguration.class}) @Sql({"/data_test.sql"}) public class RulecontrollerTests { @Autowired MockMvc mockMvc; @Test public void getRulelist() throws Exception { // Arange & Act this.mockMvc.perform(get("/ruleName/list")) // Assert .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void getRuleAdd() throws Exception { // Arange & Act this.mockMvc.perform(get("/ruleName/add")) // Assert .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void getRuleValidateOk() throws Exception { // Arange & Act this.mockMvc.perform(post("/ruleName/validate") .param("id", "1") .param("name", "1") .param("description", "2") .param("json", "3") .param("template", "4") .param("sqlStr", "5") .param("sqlPart", "6")) // Assert .andExpect(MockMvcResultMatchers.status().is3xxRedirection()) .andDo(MockMvcResultHandlers.print()); } @Test public void getRuleValidateKo() throws Exception { // Arange & Act this.mockMvc.perform(post("/ruleName/validate") .param("name", "") .param("description", "2") .param("json", "3") .param("template", "4") .param("sqlStr", "5") .param("sqlPart", "6")) // Assert .andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.view().name("ruleName/add")) .andDo(MockMvcResultHandlers.print()); } @Test public void getRuleUpdate() throws Exception { // Arange & Act this.mockMvc.perform(get("/ruleName/update/{id}", "1")) // Assert .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void postRuleUpdate() throws Exception { // Arange & Act this.mockMvc.perform(post("/ruleName/update/{id}", "1") .param("name", "11") .param("description", "22") .param("json", "33") .param("template", "44") .param("sqlStr", "55") .param("sqlPart", "66")) // Assert .andExpect(MockMvcResultMatchers.status().is3xxRedirection()) .andDo(MockMvcResultHandlers.print()); } @Test public void postRuleUpdateKo() throws Exception { // Arange & Act this.mockMvc.perform(post("/ruleName/update/{id}", "1") .param("name", "") .param("description", "22") .param("json", "33") .param("template", "44") .param("sqlStr", "55") .param("sqlPart", "66")) // Assert .andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.view().name("ruleName/update")) .andDo(MockMvcResultHandlers.print()); } @Test public void RuleDelete() throws Exception { // Arange & Act this.mockMvc.perform(get("/ruleName/delete/{id}", "2")) // Assert .andExpect(MockMvcResultMatchers.status().is3xxRedirection()) .andDo(MockMvcResultHandlers.print()); } }
[ "slingshot@outlook.fr" ]
slingshot@outlook.fr
191f680ce013b879bbf3bcb4c1814b7d6200b43b
ea37cabc0659d1de1afe6c57d1aef424bcb5366e
/app/src/main/java/com/example/fr/huaianpig/PigDeathActivity.java
a5b463e20b89b509ec8afe68147157b04aa7221e
[]
no_license
undefinedYSL/Huaianpig
82fe4c3ba6a5dea7bf94ceae8f36358c8eec1f22
1e1d6b3010e3bc15a0174bd6cfe6a84aebcb5171
refs/heads/master
2020-04-13T02:12:01.271001
2018-12-23T14:13:36
2018-12-23T14:13:36
162,896,535
0
0
null
null
null
null
UTF-8
Java
false
false
6,881
java
package com.example.fr.huaianpig; import android.annotation.SuppressLint; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.app.PendingIntent; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.nfc.NdefMessage; import android.nfc.NdefRecord; import android.nfc.NfcAdapter; import android.nfc.tech.MifareClassic; import android.nfc.tech.NfcA; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.os.Parcelable; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.view.Window; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; /** * Created by FR on 2017/5/26. */ public class PigDeathActivity extends Activity { private NfcAdapter nfcAdapter; private TextView pigid_tv; private PendingIntent pendingIntent; private IntentFilter[] mFilters; private String[][] mTechLists; private boolean isFirst = true; private Button query; private String mResponse; // private String path = "http://192.168.43.235:8888/myApps"; // private String path = "http://192.168.43.222:9999/myApps"; private QuanjubianliangActivity path; protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.pigdeath_layout); path = (QuanjubianliangActivity)getApplication(); Button title_set_bn = (Button) findViewById(R.id.title_set_bn); title_set_bn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(); intent.setClass(PigDeathActivity.this, PigmanageActivity.class); startActivity(intent); finish(); } }); // 获取nfc适配器,判断设备是否支持NFC功能 nfcAdapter = NfcAdapter.getDefaultAdapter(this); if (nfcAdapter == null) { Toast.makeText(this, getResources().getString(R.string.no_nfc), Toast.LENGTH_SHORT).show(); finish(); return; } else if (!nfcAdapter.isEnabled()) { Toast.makeText(this, getResources().getString(R.string.open_nfc), Toast.LENGTH_SHORT).show(); finish(); return; } // 显示结果Text pigid_tv = (TextView) findViewById(R.id.pigid_tv); query = (Button) findViewById(R.id.query); query.setOnClickListener(clickListener_query); pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_TECH_DISCOVERED); ndef.addCategory("*/*"); mFilters = new IntentFilter[] { ndef };// 过滤器 mTechLists = new String[][] { new String[] { MifareClassic.class.getName() }, new String[] { NfcA.class.getName() } };// 允许扫描的标签类型 } private View.OnClickListener clickListener_query = new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub new Thread() { @Override public void run() { mResponse = GetPostUtil.sendPost( path.getIp(), "pigisdead"+"@"+pigid_tv.getText()+"@"); Log.d("1111",mResponse); // 发送消息通知UI线程更新UI组件 handler.sendEmptyMessage(0x456); } }.start(); } }; Handler handler = new Handler() { @Override public void handleMessage(Message msg) { if (msg.what == 0x456) { // Toast出服务器响应的字符串 mResponse = mResponse.trim(); if (mResponse.equals("success")){ Toast.makeText(PigDeathActivity.this, "发送成功", Toast.LENGTH_SHORT).show(); }else { Toast.makeText(PigDeathActivity.this, "发送失败", Toast.LENGTH_SHORT).show(); } } } }; public boolean onKeyDown(int keyCode,KeyEvent event) { if(keyCode== KeyEvent.KEYCODE_BACK) { dialog(); return true; } else { return super.onKeyDown(keyCode, event); } } protected void dialog() { Dialog dialog = new AlertDialog.Builder(this).setTitle("智能猪场管理终端").setMessage( "确认退出应用程序?").setPositiveButton("退出",new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub dialog.dismiss(); PigDeathActivity.this.finish(); } }).setNegativeButton("取消",new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub dialog.dismiss(); } }).create(); dialog.show(); } @SuppressLint("NewApi") @Override protected void onResume() { // TODO Auto-generated method stub super.onResume(); nfcAdapter.enableForegroundDispatch(this, pendingIntent, mFilters, mTechLists); if (isFirst) { if (NfcAdapter.ACTION_TECH_DISCOVERED.equals(getIntent().getAction())) { String result = processIntent(getIntent()); pigid_tv.setText(result); } isFirst = false; } } @Override protected void onNewIntent(Intent intent) { // TODO Auto-generated method stub super.onNewIntent(intent); if (NfcAdapter.ACTION_TECH_DISCOVERED.equals(intent.getAction())) { String result = processIntent(intent); pigid_tv.setText(result); } } /** * 获取tab标签中的内容 * * @param intent * @return */ @SuppressLint("NewApi") private String processIntent(Intent intent) { Parcelable[] rawmsgs = intent .getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); NdefMessage msg = (NdefMessage) rawmsgs[0]; NdefRecord[] records = msg.getRecords(); String resultStr = new String(records[0].getPayload()); return resultStr; } }
[ "1045338027@qq.com" ]
1045338027@qq.com
d73ccac66f9cf9b9ce603d1f1a8d2f17d3c5514d
27ec0c36d2a75d22470dc3d89eac2c547cf2e616
/src/fb/FindAllAnagrams.java
dc662776bc26b52c085995f6b57c0b49144331f1
[]
no_license
beef1218/leetcode-java
d9fc88a273622dfce527e96c2c3e02b39768365f
60209d7d21774e3368a622970f20c91938f15499
refs/heads/master
2023-02-04T02:43:32.608820
2020-12-23T04:37:32
2020-12-23T04:37:32
261,034,633
0
0
null
null
null
null
UTF-8
Java
false
false
2,168
java
package fb; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /* Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the length of both strings s and p will not be larger than 20,100. The order of output does not matter. Example 1: Input: s: "cbaebabacd" p: "abc" Output: [0, 6] Explanation: The substring with start index = 0 is "cba", which is an anagram of "abc". The substring with start index = 6 is "bac", which is an anagram of "abc". */ /* 1. build hashmap with p, remainMatch = map.size(). window length = p.length() 2. i from 0 to end if char not in map, do nothing if char in map, decrease its count. if count == 0, remainMatch--; if count == -1, remainMatch++; (not really needed here) (The reason we don't have to check count changes from 0 to -1 is that this is a fix size sliding window) if i >= p.length: char2 = s.charAt(i - p.length) if char2 not in map, do nothing if char2 in map, increase its count. if count == 1, remainMatch++; if count == 0, remainMatch--; (not really needed here) if remainMatch == 0, add (i - p.length() + 1) to result */ public class FindAllAnagrams { public List<Integer> findAnagrams(String s, String p) { List<Integer> result = new ArrayList<>(); if (s == null || p == null || s.length() < p.length()) { return result; } Map<Character, Integer> map = new HashMap<>(); for (char c : p.toCharArray()) { map.put(c, map.getOrDefault(c, 0) + 1); } int remainMatch = map.size(); for (int i = 0; i < s.length(); i++) { char c1 = s.charAt(i); Integer count = map.get(c1); if (count != null) { map.put(c1, count - 1); if (count == 1) { remainMatch--; } } if (i >= p.length()) { char c2 = s.charAt(i - p.length()); count = map.get(c2); if (count != null) { map.put(c2, count + 1); if (count == 0) { remainMatch++; } } } if (remainMatch == 0) { result.add(i - p.length() + 1); } } return result; } }
[ "andy.liu@servicenow.com" ]
andy.liu@servicenow.com
0064e0e68dec39b73966b3a0cc1d1e2c4574b83d
9a4895926b90533fdbdb685a5b578b283e6a5c9e
/eatgo-api/src/main/java/kr/co/fastcampus/eatgo/domain/RestaurantRepository.java
3d92af486268d4ac6d00591741ddab029f41d301
[]
no_license
leejordan88/eatgo2
ce76d55310170e77e2a5a53a55b0043a784fa7ba
8bf849b04ef5593bb64e52bca1cfad957243c477
refs/heads/master
2023-01-20T04:38:19.932790
2020-11-26T17:52:54
2020-11-26T17:52:54
316,003,526
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package kr.co.fastcampus.eatgo.domain; import org.springframework.data.repository.CrudRepository; import java.util.List; import java.util.Optional; public interface RestaurantRepository extends CrudRepository<Restaurant, Long> { List<Restaurant> findAll(); Optional<Restaurant> findById(Long id); Restaurant save(Restaurant restaurant); }
[ "leejs198@gmail.com" ]
leejs198@gmail.com
0c9b7f0fb071baf64565fa6b720a9cd6cd49cade
42cb0ff54c2ce6c5626f57fe42ff42f4069a327a
/src/main/java/com/example/demo/CheckpointEndpoints.java
f9ad246768c3e430cc5ef49b3c4f233211e8eda1
[]
no_license
szett27/spring-playground
a628457b9ff7b8d019d9eea23a3bac6b1c5edf08
f3e508c6bb4191579a6f0fa948457213c25714c0
refs/heads/master
2022-11-23T05:56:28.309735
2020-07-21T16:42:00
2020-07-21T16:42:00
280,514,521
0
0
null
null
null
null
UTF-8
Java
false
false
3,279
java
package com.example.demo; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; @RestController public class CheckpointEndpoints { //checkpoint #1 - Camelize @GetMapping("/camelize") public String getCamel(@RequestParam("original") String original, @RequestParam(value = "initialCap", required = false) boolean Cap) { String cameled = ""; String[] splitString = original.split("_"); if (Cap == true) { for (int i = 0; i < splitString.length; i++) { splitString[i] = splitString[i].substring(0, 1).toUpperCase() + splitString[i].substring(1).toLowerCase(); } } else { for (int i = 1; i < splitString.length; i++) { splitString[i] = splitString[i].substring(0, 1).toUpperCase() + splitString[i].substring(1).toLowerCase(); } } cameled = String.join("", splitString); return cameled; } //checkpoint #2 - Redact @GetMapping("/redact") public String redact(@RequestParam(value = "original", required = true) String original, @RequestParam(value = "badWord") List<String> badwords) { String redacted = ""; String[] sentence = original.split(" "); for(String word: badwords){ for(int j =0; j < sentence.length; j++){ if(sentence[j].equals(word)){ String redact = ""; for(int i =0; i < word.split("").length; i++){ redact += "*"; } sentence[j] = redact; } } } redacted = String.join(" ", sentence); return redacted; } //checkpoint #3 - Encode @PostMapping("/encode") public String encode(@RequestParam Map<String, String> formData){ String[] original = formData.get("original").split(" "); String encoder = formData.get("key"); String abcs = "abcdefghijklmnopqrstuvwzyz"; Map<String, String> coder = null; String encoded = ""; //Map Abcs to encoder for(int i = 0; i<abcs.length();i++){ for(int j = 0; j < encoder.length(); j++){ coder.put(abcs.substring(i), encoder.substring(j)); } } //encode string for(String word: original){ String[] letters = word.split(""); for(int k =0; k < letters.length; k++) { //coded value letters[k] = coder.get(word.substring(k)); } encoded += String.join("", letters); } return encoded; } //checkpoint #4 - SED @PostMapping("/s/{find}/{replacement}") public String replace(@PathVariable("find") String find, @PathVariable("replacement") String replacement, @RequestBody String body){ String replaced = ""; String[] split = body.split(" "); for(String word: split){ if(word.equals(find)){ word = replacement; } } replaced = String.join(" ", split); return replaced; } }
[ "scott.zetterstrom@gmail.com" ]
scott.zetterstrom@gmail.com
fc0a4de4d4f84aa62c52f9b39ae32ae7ba6333cd
42b62dd03b49e5cca69267dbd41bebabc550b777
/OnlineBookShop/src/com/online/book/shop/action/SearchBookAction.java
a0863290f3976063dc2153b0203f312b9c993169
[]
no_license
rahullkkr/hibernate
88c2b7b5f98a8550b2a0184775cc96c032fa4795
28d3d679beb05cfdbe5808646f2c4741929f1a04
refs/heads/master
2022-10-16T13:54:56.853927
2020-06-05T06:33:48
2020-06-05T06:33:48
173,587,537
0
0
null
null
null
null
UTF-8
Java
false
false
2,089
java
package com.online.book.shop.action; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.online.book.shop.delegate.BookDelegate; import com.online.book.shop.to.BookTO; import com.online.book.shop.util.BookUtil; public class SearchBookAction { public String searchBookInfo(HttpServletRequest req, HttpServletResponse res){ String page = "searchBookDef.jsp"; String bnm = req.getParameter("bname"); String author = req.getParameter("author"); String cost = req.getParameter("cost"); String pub = req.getParameter("publication"); String edi = req.getParameter("edition"); float bcost = 0.0f; if(cost != null && cost.length() != 0){ try{ bcost = Float.parseFloat(cost); }catch(NumberFormatException e){ req.setAttribute("searchingBookError", "Cost is not valid."); } } //System.out.println("**********"+bnm+"\t"+author+"\t"+pub+"\t"+edi+"\t"+cost); BookTO bto = new BookTO(bnm, author, pub, edi, bcost); int start =0; int noBook = BookUtil.NUMBER_OF_BOOK; int total =BookDelegate.getTotalNumberOfBook(bto); List bookList = BookDelegate.searchBook(bto, start, noBook); HttpSession session = req.getSession(); session.setAttribute("BOOK_NAME", bnm); session.setAttribute("AUTHOR", author); session.setAttribute("PUBLICATION", pub); session.setAttribute("EDITION", edi); //session.setAttribute("EDITION", edi); session.setAttribute("START", new Integer(start)); int end = start+noBook; if(total <= end){ end=total; } session.setAttribute("END", new Integer(end)); session.setAttribute("TOTAL", new Integer(total)); if(bcost != 0){ session.setAttribute("COST", new Float(bcost)); }else{ session.setAttribute("COST", ""); } if(bookList == null){ req.setAttribute("searchingBookError", "No book found with specified Information."); session.removeAttribute("BOOK_LIST"); }else{ session.setAttribute("BOOK_LIST", bookList); } return page; } }
[ "rahul.kumar@betsol.com" ]
rahul.kumar@betsol.com
080b268f37e8c43cdae43b3520e5708c4353378a
5433b76ad1c434d1c70c2b487c43657ca60af33c
/x64/qtesla-piii-jni-vs20119/java/src/sctudarmstadt/qtesla/tests/JCATester.java
fc2280c43df78fc5643facbdd6f3285d2dae9171
[]
no_license
tudasc/qTESLA
34f19e2fb7d41acecd17363460a8fa80a0b5d953
331b82b070a34e7f55d854e45eef8675c73e7902
refs/heads/master
2022-12-29T02:09:09.965072
2020-10-05T14:36:02
2020-10-05T14:36:02
293,504,314
1
1
null
null
null
null
UTF-8
Java
false
false
8,921
java
package sctudarmstadt.qtesla.tests; import java.math.BigInteger; import java.nio.charset.StandardCharsets; import java.security.InvalidKeyException; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.Provider; import java.security.Security; import java.security.Signature; import java.security.SignatureException; import java.util.Base64; import java.util.Enumeration; //import sctudarmstadt.qtesla.jca.QTESLAProvider; import sctudarmstadt.qtesla.javajca.QTESLAJavaProvider; import sctudarmstadt.qtesla.jca.QTESLAProvider; public class JCATester { private static void removeProviders() { try { Provider p[] = Security.getProviders(); for (int i = 0; i < p.length; i++) { String[] expected1 = p[i].toString().split(" "); if(expected1[0].compareTo("SUN") != 0) Security.removeProvider(expected1[0]); } } catch (Exception e) { System.out.println(e); } } private static void showAllProviders() { try { Provider p[] = Security.getProviders(); for (int i = 0; i < p.length; i++) { System.out.println("Successfully found provider: " + p[i]); for (Enumeration<Object> e = p[i].keys(); e.hasMoreElements();) System.out.println("\t" + e.nextElement()); } } catch (Exception e) { System.out.println(e); } } public static boolean checkBit (int value, int position) { if ((value & (1 << position)) != 0) { // The bit was set return true; } return false; } public static void main(String[] args) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException { // Make a Key with Java // Test 1A other OS // Add the security provider of QTESLA /*System.out.println("Add QTESLAProvider to Security."); Security.addProvider(new QTESLAJavaProvider()); System.out.println(""); KeyPairGenerator keyGenerator_java = KeyPairGenerator.getInstance("QTESLA"); KeyPair kepa = keyGenerator_java.generateKeyPair();*/ System.out.println("Running with " + System.getProperty("java.runtime.name") + " " + System.getProperty("java.version")); System.out.println(""); System.out.println("Remove all providers from Security for the run."); removeProviders(); // Add the security provider of QTESLA System.out.println("Add QTESLAProvider to Security."); Security.addProvider(new QTESLAProvider()); System.out.println(""); // Test Keygen System.out.println("Try to generate KeyPairGenerator.getInstance(\"QTESLA\")"); KeyPairGenerator keyGenerator = KeyPairGenerator.getInstance("QTESLA"); System.out.println("Success"); System.out.println(""); System.out.println("Try to generate a KeyPair"); KeyPair kepa = keyGenerator.generateKeyPair(); System.out.println("Success"); System.out.println(""); //String keystr = Base64.getEncoder().encodeToString(kepa.getPrivate().getEncoded()); //System.out.println(keystr); // Test Sign removeProviders(); Security.addProvider(new QTESLAProvider()); String message = "Hallo Anna, hoffe dein Paper wird super."; Signature siggi = Signature.getInstance("QTESLA"); siggi.initSign(kepa.getPrivate()); siggi.update(message.getBytes(StandardCharsets.UTF_8)); System.out.println("Signing Message: " + message); byte[] signature = siggi.sign(); String sigstr = Base64.getEncoder().encodeToString(signature); System.out.println(sigstr); // Sign with Java removeProviders(); Security.addProvider(new QTESLAJavaProvider()); siggi = Signature.getInstance("QTESLA"); siggi.initSign(kepa.getPrivate()); siggi.update(message.getBytes(StandardCharsets.UTF_8)); signature = siggi.sign(); sigstr = Base64.getEncoder().encodeToString(signature); System.out.println(sigstr); System.out.println("Message was successfully signed with length " + signature.length + " and algorithm: " + siggi.getAlgorithm()); removeProviders(); Security.addProvider(new QTESLAProvider()); // Verify tests // Different Language 1A other OS System.out.println("[Verifying Test #1A]"); System.out.println("Checking Message with Java implementation"); removeProviders(); Security.addProvider(new QTESLAJavaProvider()); Signature c_siggi = Signature.getInstance("QTESLA"); c_siggi.initVerify(kepa.getPublic()); byte[] signatureBytes = Base64.getDecoder().decode(sigstr); c_siggi.update(message.getBytes(StandardCharsets.UTF_8)); boolean is_correct = c_siggi.verify(signatureBytes); if(is_correct) { System.out.println("As expected, the message is verified"); } else { System.out.println("Unexpectedly, the message is not verified"); } System.out.println(""); removeProviders(); Security.addProvider(new QTESLAProvider()); Signature pub_siggi = Signature.getInstance("QTESLA"); pub_siggi.initVerify(kepa.getPublic()); // Test Verify1: This should work System.out.println("[Verifying Test #1]"); System.out.println("Checking Message: >>" + message + "<<"); signatureBytes = Base64.getDecoder().decode(sigstr); pub_siggi.update(message.getBytes(StandardCharsets.UTF_8)); is_correct = pub_siggi.verify(signatureBytes); if(is_correct) { System.out.println("As expected, the message is verified"); } else { System.out.println("Unexpectedly, the message is not verified"); } System.out.println(""); // Test Verify2: Corrupt the signature System.out.println("[Verifying Test #2]"); System.out.println("Checking Signature corrupted at position [5] to '33'"); byte[] signatureBytes_corrupted = signatureBytes; signatureBytes_corrupted[5] = 33; pub_siggi.update(message.getBytes(StandardCharsets.UTF_8)); is_correct = pub_siggi.verify(signatureBytes); if(!is_correct) { System.out.println("As expected, the message is not verified"); } else { System.out.println("Unexpectedly, the message is verified"); } System.out.println(""); // Test Verify3: Test another message of equal length System.out.println("[Verifying Test #3]"); String message_corrupted = "Hallo Anna, hoffe dein Paper wird bloed."; System.out.println("Checking corrupted Message of equal length: >>" + message_corrupted + "<<"); pub_siggi.update(message_corrupted.getBytes(StandardCharsets.UTF_8)); is_correct = pub_siggi.verify(signatureBytes); if(!is_correct) { System.out.println("As expected, the message is not verified"); } else { System.out.println("Unexpectedly, the message is verified"); } System.out.println(""); // Test Verify4: Test another message of unequal length System.out.println("[Verifying Test #4]"); String message_corrupted2 = "Hallo Berta, hoffe deine Dissertation wird klasse."; System.out.println("Checking corrupted Message of unequal length: >>" + message_corrupted2 + "<<"); pub_siggi.update(message_corrupted2.getBytes(StandardCharsets.UTF_8)); is_correct = pub_siggi.verify(signatureBytes); if(!is_correct) { System.out.println("As expected, the message is not verified"); } else { System.out.println("Unexpectedly, the message is verified"); } System.out.println(""); // Test Verify5: Test wrong public key System.out.println("[Verifying Test #5]"); System.out.println("Checking to verify with wrong PublicKey"); KeyPair kepa2 = keyGenerator.generateKeyPair(); pub_siggi.initVerify(kepa2.getPublic()); pub_siggi.update(message.getBytes(StandardCharsets.UTF_8)); is_correct = pub_siggi.verify(signatureBytes); if(!is_correct) { System.out.println("As expected, the message is not verified"); } else { System.out.println("Unexpectedly, the message is verified"); } System.out.println(""); // Verify tests Signature pub_siggi2 = Signature.getInstance("QTESLA"); pub_siggi2.initVerify(kepa.getPublic()); // Test Verify6: This should work System.out.println("[Verifying Test #6]"); System.out.println("Checking Message: >>" + message + "<< with a new Instance of Signature with right PublicKey"); signatureBytes = Base64.getDecoder().decode(sigstr); pub_siggi2.update(message.getBytes(StandardCharsets.UTF_8)); is_correct = pub_siggi2.verify(signatureBytes); if(is_correct) { System.out.println("As expected, the message is verified"); } else { System.out.println("Unexpectedly, the message is not verified"); } System.out.println(""); } }
[ "michael.burger84@gmx.de" ]
michael.burger84@gmx.de
139f87fde6072791f8b0488eb5bfe9ea731aa727
c12e28620bf1be65f566507bd0fe2a7fc616dac0
/src/main/java/com/cms/cn/service/SysUserService.java
d416ad4963583870107e0304f1aba528c8d27d94
[]
no_license
WangPan001/shiro
2dffc276c2e6e9808f90bf50030e14920afb3140
c8d539d095c8702a3306e352c1d356f1bf188881
refs/heads/master
2022-10-27T16:53:54.807625
2019-11-30T12:36:04
2019-11-30T12:36:04
189,931,776
0
0
null
2022-10-12T20:27:25
2019-06-03T03:58:15
Java
UTF-8
Java
false
false
638
java
package com.cms.cn.service; import com.cms.cn.model.request.LoginRequest; import com.cms.cn.model.request.UserRequest; import com.cms.cn.model.response.BaseResponse; import java.util.List; /** * @ClassName UserService * @Description Todo * @Author wangpan * @Date 2019/5/22 14:50 * @Version 1.0 **/ public interface SysUserService { BaseResponse getUserByName(UserRequest userRequest); BaseResponse findList(UserRequest userRequest); BaseResponse batchUpdateUserById(List<UserRequest> userRequests); BaseResponse addUser(UserRequest userRequest); BaseResponse updateUserById(UserRequest userRequest); }
[ "wangpan@exdl.cn" ]
wangpan@exdl.cn
a6d26454681002360f19634b7cbc00bf79a4775d
a95259381c7fa4df3848812900b534c57ea730d8
/src/main/java/me/stephenj/mall/component/CancelOrderReceiver.java
e43224897dde0754d3b981e0bf4cb43fda7cae4d
[]
no_license
StephenEvenson/learn-mall
f72b6a2b20cd54496625fd5e491d59b61d53200a
ec3d87d129e948cc3bc4266cadc46dacabeb6eed
refs/heads/master
2022-12-25T02:59:08.864175
2020-10-10T10:35:18
2020-10-10T10:35:18
302,876,274
0
0
null
null
null
null
UTF-8
Java
false
false
976
java
package me.stephenj.mall.component; import me.stephenj.mall.service.OmsPortalOrderService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.amqp.rabbit.annotation.RabbitHandler; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** * 取消订单消息的处理者 * 用于从取消订单的消息队列(mall.order.cancel)里接收消息。 * Created by macro on 2018/9/14. */ @Component @RabbitListener(queues = "mall.order.cancel") public class CancelOrderReceiver { private static Logger LOGGER =LoggerFactory.getLogger(CancelOrderReceiver.class); @Autowired private OmsPortalOrderService portalOrderService; @RabbitHandler public void handle(Long orderId){ LOGGER.info("receive delay message orderId:{}",orderId); portalOrderService.cancelOrder(orderId); } }
[ "1258455347@qq.com" ]
1258455347@qq.com
98daa77aff697192d69562349771877e55a5fd30
0ca28fa577f5f7a2c0ee1eb9edd613fe5917d34b
/WEB_MOTEL/src/com/slook/model/CatMachine.java
574bea356c20d91515149710e46e2e00e5c0a747
[]
no_license
vietnv5/motel-project
88fbe567a53f172ef93c7f53092e06e094b89de9
7b228bc1b13359ecfac8c78e49f9c8bb2e3f5d85
refs/heads/master
2023-03-12T19:05:22.379540
2019-05-01T15:25:57
2019-05-01T15:25:57
174,317,540
0
0
null
null
null
null
UTF-8
Java
false
false
5,129
java
package com.slook.model; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import javax.persistence.*; import static javax.persistence.GenerationType.SEQUENCE; /** * Created by T430 on 4/20/2017. */ @Entity @Table(name = "CAT_MACHINE", catalog = "") public class CatMachine { private Long machineId; private String machineName; private String machineCode; private Long branchId; private String description; private String ip; private String port; private Long status; private String statusName; private Long machineType; private CatItemBO machineTypeBO; @Id @GeneratedValue(strategy = SEQUENCE, generator = "generator") @SequenceGenerator(name = "generator", sequenceName = "CAT_MACHINE_SEQ", allocationSize = 1) @Column(name = "MACHINE_ID", nullable = false, precision = 0) public Long getMachineId() { return machineId; } public void setMachineId(Long machineId) { this.machineId = machineId; } @Basic @Column(name = "MACHINE_NAME", nullable = true, length = 30) public String getMachineName() { return machineName; } public void setMachineName(String machineName) { this.machineName = machineName; } @Basic @Column(name = "MACHINE_CODE", nullable = true, length = 20) public String getMachineCode() { return machineCode; } public void setMachineCode(String machineCode) { this.machineCode = machineCode; } @Basic @Column(name = "BRANCH_ID", nullable = true, precision = 0) public Long getBranchId() { return branchId; } public void setBranchId(Long branchId) { this.branchId = branchId; } @Basic @Column(name = "DESCRIPTION", nullable = true, length = 50) public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatMachine that = (CatMachine) o; if (machineId != null ? !machineId.equals(that.machineId) : that.machineId != null) { return false; } if (machineName != null ? !machineName.equals(that.machineName) : that.machineName != null) { return false; } if (machineCode != null ? !machineCode.equals(that.machineCode) : that.machineCode != null) { return false; } if (branchId != null ? !branchId.equals(that.branchId) : that.branchId != null) { return false; } if (description != null ? !description.equals(that.description) : that.description != null) { return false; } return true; } @Override public int hashCode() { int result = machineId != null ? machineId.hashCode() : 0; result = 31 * result + (machineName != null ? machineName.hashCode() : 0); result = 31 * result + (machineCode != null ? machineCode.hashCode() : 0); result = 31 * result + (branchId != null ? branchId.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); return result; } @Column public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public void setPort(String port) { this.port = port; } @Column public String getPort() { return port; } public void setStatus(Long status) { this.status = status; } @Column public Long getStatus() { return status; } @Transient public String getStatusName() { if (status != null) { if (status.equals(0l)) { statusName = "Không sử dụng"; } else if (status.equals(1l)) { statusName = "Đang hoạt động"; } else if (status.equals(2l)) { statusName = "Tạm ngừng"; } } return statusName; } @Override public String toString() { return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE); } @Column(name = "machine_type", nullable = true, precision = 0) public Long getMachineType() { return machineType; } public void setMachineType(Long machineType) { this.machineType = machineType; } @ManyToOne @JoinColumn(name = "machine_type", insertable = false, updatable = false) public CatItemBO getMachineTypeBO() { return machineTypeBO; } public void setMachineTypeBO(CatItemBO machineTypeBO) { this.machineTypeBO = machineTypeBO; } }
[ "vietnv@1d7999a0-bdfd-47d3-b774-009da9be2ac5" ]
vietnv@1d7999a0-bdfd-47d3-b774-009da9be2ac5
c895fb51295d2a06d4c3e249aad1fb100b564b77
e1fe9e974aadef508de37fcee496bfd9e7c29fe1
/src/main/java/io/sheetal/repository/LanguageRepository.java
6ed699e1eab06cde11bc5cbaabdb2c2af02ea4f1
[ "MIT" ]
permissive
sheetalgaikwad/MovieFlix-Sheetal
67099b2faef7c8fb8cfa7a1b810cb4990a843987
1ebba1d6c92b49d9256a847a3a496d94aa47c01f
refs/heads/master
2021-01-21T13:17:33.176468
2016-05-01T16:45:04
2016-05-01T16:45:04
55,325,217
0
0
null
null
null
null
UTF-8
Java
false
false
415
java
package io.sheetal.repository; import java.util.List; import io.sheetal.entity.Language; public interface LanguageRepository { public List<Language> findAllLanguages(); public Language findOneLanguage(String languageId); public Language findByLanguageName(String languageName); public Language create(Language language); public Language update(Language language); public void delete(Language language); }
[ "sheetal@cs.utah.edu" ]
sheetal@cs.utah.edu
2f160683016ffa633088a757e73e121fc1b11af0
26fd22694acef7a6dce084260ed24134893c375b
/src/main/java/org/silverbackhq/reindeer/repository/EndpointRepository.java
c181f2df56fa203a7d92bcc900f6c82b924cbc92
[ "Apache-2.0" ]
permissive
forkkit/Reindeer
b03ab1210e5858e9407e47837a8979fe9a79092f
b68a4ec9b85a4c42c6a7ea29de70236e4218f0ad
refs/heads/master
2022-11-09T08:01:00.191083
2020-05-22T20:49:31
2020-05-22T20:49:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,917
java
/* * Copyright (C) 2019 Silverbackhq <https://github.com/silverbackhq> * * 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.silverbackhq.reindeer.repository; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.silverbackhq.reindeer.entity.*; import org.silverbackhq.reindeer.migration.ORM; /** Endpoint Repository Class */ public class EndpointRepository { /** * Create an endpoint * * @param endpointEntity the endpoint entity * @return the new entity Id * @throws Exception if there is error raised */ public Integer createOne(EndpointEntity endpointEntity) throws Exception { Session session = ORM.getSessionFactory().openSession(); session.beginTransaction(); Integer id = (Integer) session.save(endpointEntity); session.getTransaction().commit(); return id; } /** * Get endpoints by namespace id * * @param namespaceId the namespace id * @return a list of endpoints * @throws Exception if there is error raised */ public List<EndpointEntity> getManyByNamespaceId(Integer namespaceId) throws Exception { Session session = ORM.getSessionFactory().openSession(); session.beginTransaction(); Query query = session.createQuery( String.format( "from %s where namespace_id=:namespace_id", EndpointEntity.class.getSimpleName())); query.setParameter("namespace_id", namespaceId); List<EndpointEntity> list = query.list(); session.getTransaction().commit(); return list; } /** * Get endpoint by id * * @param id the endpoint id * @return the endpoint instance * @throws Exception if there is error raised */ public EndpointEntity getOneById(Integer id) throws Exception { Session session = ORM.getSessionFactory().openSession(); session.beginTransaction(); EndpointEntity endpointEntity = session.get(EndpointEntity.class, id); session.getTransaction().commit(); return endpointEntity; } /** * Get endpoint by method and URI * * @param namespaceId the namespace id * @param method the endpoint method * @param URI the endpoint URI * @return the endpoint instance * @throws Exception if there is error raised */ public EndpointEntity getOneByMethodAndURI(Integer namespaceId, String method, String URI) throws Exception { Session session = ORM.getSessionFactory().openSession(); session.beginTransaction(); Query query = session.createQuery( String.format( "from %s where namespace_id=:namespace_id uri=:uri and method=:method", EndpointEntity.class.getSimpleName())); query.setParameter("namespace_id", namespaceId); query.setParameter("method", method); query.setParameter("uri", URI); EndpointEntity endpointEntity = (EndpointEntity) query.uniqueResult(); session.getTransaction().commit(); return endpointEntity; } /** * Update Endpoint * * @param endpointEntity the endpoint entity * @return whether updated or not * @throws Exception if there is error raised */ public Boolean update(EndpointEntity endpointEntity) throws Exception { Session session = ORM.getSessionFactory().openSession(); session.beginTransaction(); session.update(endpointEntity); session.getTransaction().commit(); return true; } /** * Delete endpoint by id * * @param id the endpoint id * @return whether deleted or not * @throws Exception if there is error raised */ public Boolean deleteOneById(Integer id) throws Exception { Session session = ORM.getSessionFactory().openSession(); session.beginTransaction(); EndpointEntity endpointEntity = session.get(EndpointEntity.class, id); if (endpointEntity != null) { session.delete(endpointEntity); session.getTransaction().commit(); return true; } session.getTransaction().commit(); return false; } }
[ "hello@clivern.com" ]
hello@clivern.com
88204e7121aa98d6f3fddef268083172f3ad2274
85fa65c1cc4560b53d4aa88d052b8c76a74f2fc9
/src/com/siu/android/twok/fragment/formulaire/NewIdeaDialogFragment.java
39e14d2fce46535a829c1080898d34a051493117
[]
no_license
lukaspili/Android-2012
6770cec0b0bc435d5d5909ae403b8464e770a91c
9efcf041d9a846150d77ba723a27f4fe53c21619
refs/heads/master
2016-08-05T15:53:43.364046
2012-07-16T13:51:13
2012-07-16T13:51:13
5,057,789
1
0
null
null
null
null
UTF-8
Java
false
false
6,594
java
package com.siu.android.twok.fragment.formulaire; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.actionbarsherlock.app.SherlockDialogFragment; import com.siu.android.andutils.Application; import com.siu.android.twok.DataAccessLayer; import com.siu.android.twok.R; import com.siu.android.twok.model.User; import com.siu.android.twok.task.CreateIdeaTask; import com.siu.android.twok.task.CreateUserTask; import com.siu.android.twok.task.mother.LoginTaskCallback; import com.siu.android.twok.task.LoginUserTask; import com.siu.android.twok.task.mother.NewIdeaTaskCallback; /** * Created with IntelliJ IDEA. * User: dieux * Date: 06/07/12 * Time: 17:37 * To change this template use File | Settings | File Templates. */ public class NewIdeaDialogFragment extends SherlockDialogFragment implements LoginTaskCallback, NewIdeaTaskCallback { private TextView editViewDescription; private TextView editViewTitle; private TextView editViewCategory; private TextView editViewPseudo; private TextView editViewPassword; private TextView editViewMail; private TextView editViewLieu; private Button buttonNoAccount; private Button buttonCancel; private Button buttonValidate; private CreateIdeaTask taskCreateIdea; private CreateUserTask taskCreateUser; private LoginUserTask taskLoginUser; @Override public void onCreate(Bundle bundle) { super.onCreate(bundle); setRetainInstance(true); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.new_idea_dialog, container, false); editViewTitle = (TextView) view.findViewById(R.id.editTitle); editViewDescription = (TextView) view.findViewById(R.id.editDescription); editViewLieu = (TextView) view.findViewById(R.id.editLieu); editViewCategory = (TextView) view.findViewById(R.id.editCategory); editViewPassword = (TextView) view.findViewById(R.id.editPassword); editViewPseudo = (TextView) view.findViewById(R.id.editPseudo); editViewMail = (TextView) view.findViewById(R.id.editMail); buttonNoAccount = (Button) view.findViewById(R.id.buttonNoAccount); buttonCancel = (Button) view.findViewById(R.id.buttonCancel); buttonValidate = (Button) view.findViewById(R.id.buttonAdd); return view; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); getDialog().setTitle(Application.getContext().getString(R.string.formulaire_comment_title)); buttonValidate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { checkFieldAccount(String.valueOf(editViewTitle.getText()), String.valueOf(editViewCategory.getText()), 1, String.valueOf(editViewDescription.getText()), String.valueOf(editViewPseudo.getText()), String.valueOf(editViewMail.getText())); } }); buttonNoAccount.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { checkFieldAccount(String.valueOf(editViewTitle.getText()), String.valueOf(editViewCategory.getText()), 2, String.valueOf(editViewDescription.getText()), String.valueOf(editViewPseudo.getText()), String.valueOf(editViewMail.getText())); } }); buttonCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { getDialog().dismiss(); } }); } private void checkFieldAccount (String titre, String category, Integer lieu, String description, String pseudo, String mail){ if(null != DataAccessLayer.getInstance().getUser()){ Log.d("siu", "TRY TO: Post Idée direct"); createIdea(); } else if(editViewMail.getText().toString().length() > 0){ Log.d("siu", "TRY TO :CREAT USER"); createUser(); } else if(editViewPseudo.length() > 0 && editViewPassword.length() > 0){ Log.d("siu", "TRY to loggin"); loginUser(); }else{ Toast.makeText(getSherlockActivity(), "Remplissez tous les champs", 2000).show(); } } private void createUser(){ String name = editViewPseudo.getText().toString(); String mail = editViewMail.getText().toString(); String password = editViewPassword.getText().toString(); taskCreateUser = new CreateUserTask(this, name, password, mail); taskCreateUser.execute(); } private void loginUser(){ String name = editViewPseudo.getText().toString(); String password = editViewPassword.getText().toString(); taskLoginUser = new LoginUserTask(this, name, password); taskLoginUser.execute(); } private void createIdea(){ taskCreateIdea = new CreateIdeaTask(this, editViewTitle.getText().toString(), editViewDescription.getText().toString()); taskCreateIdea.execute(); } @Override public void onLoginTaskFinished(User user) { Log.d("siu", " Lancement de la création d' 'idée'"); Toast.makeText(getSherlockActivity(), "Conexion/création de compte", Toast.LENGTH_LONG).show(); Log.d("siu--------------siu-----------", "token : "+ user.getToken()); if(null == user) { Toast.makeText(getSherlockActivity(), "Invalid connexion", Toast.LENGTH_SHORT).show(); return; } createIdea(); } @Override public void onIdeaTaskFinished(){ Toast.makeText(getSherlockActivity(), R.string.toast_idea_created, Toast.LENGTH_LONG).show(); } @Override public void onDetach() { super.onDetach(); //To change body of overridden methods use File | Settings | File Templates. if (null != taskCreateIdea) taskCreateIdea.setFragment(null); if (null != taskCreateUser) taskCreateUser.setCallback(null); if (null != taskLoginUser) taskLoginUser.setCallbackFormulaire(null); } }
[ "artron3@hotmail.fr" ]
artron3@hotmail.fr
efacd1eeed437046292e9186818c2917ff5715f3
d2970b981efe2eeec82bb74e91b2e1163ee80119
/src/main/java/service/Fajl.java
3e31c7eb1fac07002b5a4d0c798ea65a86ba9fd8
[]
no_license
markovicv/LocalFileStorage
cf308c89b90119137101dc1ffef42d94c0bea2da
dd3e31508201fa5187d5388770dcb0d1080cf37d
refs/heads/master
2022-02-27T02:11:41.152507
2019-10-25T22:40:05
2019-10-25T22:40:05
215,357,141
0
0
null
null
null
null
UTF-8
Java
false
false
7,114
java
package service; import exception.*; import model.FileOrdinary; import model.Zipper; import org.apache.commons.io.FileUtils; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.util.List; public class Fajl implements FileOrdinary { Path path; public Fajl(Path path){ this.path = path; } public Fajl(){ } @Override public void create(String path, String name) throws CreateFileException { Path filePath = null; if(path!= null && path.length()>0) filePath = Paths.get(path); if(name==null || name.equals("")) throw new CreateFileException("Name is empty"); Path p = Paths.get(filePath+ java.io.File.separator+name); if(Files.exists(filePath) && Files.exists(p)==false){ try{ Files.createFile(p); System.out.println("Uspesno kreiran fajl"); } catch(Exception e){ e.printStackTrace(); } } else throw new CreateFileException("File wasnt created"); } @Override public void delete(String pathName) throws DeleteFileException { if(pathName==null || pathName.equals("")) throw new DeleteFileException("path name is empty"); Path filePath = Paths.get(pathName); if(Files.exists(filePath)){ try{ Files.delete(filePath); System.out.println("Uspesno obrisan fajl"); } catch(Exception e){ IOException exception = (IOException)e; e.printStackTrace(); } } else throw new DeleteFileException("File wasnt deleted"); } @Override public void move(String srcPath, String dstPath) throws MoveFileException { if(srcPath==null || srcPath.equals("")) throw new MoveFileException("source path not found"); if(dstPath==null || dstPath.equals("")) throw new MoveFileException("destination path not found"); Path sPath = Paths.get(srcPath); Path dPath = Paths.get(dstPath); if(Files.exists(sPath) && Files.exists(dPath)){ try { Files.move(sPath, Paths.get(dPath + File.separator + srcPath.substring(srcPath.lastIndexOf(File.separator) + 1)), StandardCopyOption.REPLACE_EXISTING); } catch(Exception e){ IOException exception = (IOException)e; exception.printStackTrace(); } } else throw new MoveFileException("paths not found"); } @Override public void rename(String path, String newName) throws RenameException { if(newName==null || newName.equals("")) throw new RenameException("name is empty"); if(path==null || path.equals("")) throw new RenameException("path is empty"); Path pathFile = Paths.get(path); if(Files.exists(pathFile)){ try{ File currFile = new File(path); File newFile = new File(currFile.getParent()+File.separator+newName); currFile.renameTo(newFile); System.out.println("Uspesno promenjeno ime fajla!"); } catch(Exception e){ IOException exception = (IOException)e; e.printStackTrace(); } } else throw new RenameException("File doesnt exist"); } @Override public void upload(String srcPath, String dstPath) throws UploadFileException { } @Override public void download(String s, String s1) throws DownloadFileException { } @Override public void copy(String srcPath, String dstPath) throws CopyFileException { if(srcPath==null || srcPath.equals("")) throw new CopyFileException("source path not found"); if(dstPath==null || dstPath.equals("")) throw new CopyFileException("destination path not found"); Path sPath = Paths.get(srcPath); Path dPath = Paths.get(dstPath); if(Files.exists(sPath) && Files.exists(dPath)){ try{ Files.copy(sPath,Paths.get(dPath+File.separator+srcPath.substring(srcPath.lastIndexOf(File.separator)+1)),StandardCopyOption.REPLACE_EXISTING); } catch(Exception e){ IOException exception = (IOException)e; exception.printStackTrace(); } } else throw new CopyFileException("files dont exist"); } @Override public void uploadZip(File file, String dstPath) throws UploadFileException { if(dstPath==null || dstPath.equals("")) throw new UploadFileException("destination path is empty"); if(!file.exists()) throw new UploadFileException("file does not exist"); Path dPath = Paths.get(dstPath); Zipper zipper = new Zipper(); if(Files.exists(dPath)){ zipper.zipFile(file,dstPath,file.getName().substring(0, file.getName().lastIndexOf('.'))); } else throw new UploadFileException("unable to zip a file"); } @Override public void uploadMultipleFile(List<File> files, String dstPath) throws UploadMultipleFileException { if(files==null || files.size()==0) throw new UploadMultipleFileException("list of files are empty"); if(dstPath==null || dstPath.equals("")) throw new UploadMultipleFileException("path is empty"); Path dPath = Paths.get(dstPath); if(Files.exists(dPath)){ for(File f:files){ try { Path p = Paths.get(dstPath + File.separator + f.getName()); Files.copy(Paths.get(f.getAbsolutePath()), p, StandardCopyOption.REPLACE_EXISTING); } catch(Exception e){ IOException exception = (IOException)e; exception.printStackTrace(); } } } else throw new UploadMultipleFileException("could upload files"); } @Override public void uploadMultipleFilesToZipFiles(List<File> files, String dstPath) throws UploadMultipleFileException { if(files==null || files.size()==0) throw new UploadMultipleFileException("list of files are empty"); if(dstPath==null || dstPath.equals("")) throw new UploadMultipleFileException("path is emmty"); Path dPath = Paths.get(dstPath); Zipper zipper = new Zipper(); if(Files.exists(dPath)){ for(File f:files){ System.out.println("AAAAAAAAA"); zipper.zipFile(f,dstPath,f.getName().substring(0, f.getName().lastIndexOf('.'))); } } else throw new UploadMultipleFileException("Couldnt zip files"); } }
[ "vukasinnauksa@gmail.com" ]
vukasinnauksa@gmail.com
7720e9ed4b9029ac0f7cda316c33d4f134c72b57
7f785360d78bb5bb91c50e788c0ad6f3081741f2
/results/jGenProg+MinImpact/EvoSuite Tests/Math/Math50/seed25/generatedTests/org/apache/commons/math/analysis/solvers/BaseSecantSolver_ESTest.java
b8be0c2edabc4f09acb104ca71d8210bd8f235c5
[]
no_license
Spirals-Team/test4repair-experiments
390a65cca4e2c0d3099423becfdc47bae582c406
5bf4dabf0ccf941d4c4053b6a0909f106efa24b5
refs/heads/master
2021-01-13T09:47:18.746481
2020-01-27T03:26:15
2020-01-27T03:26:15
69,664,991
5
6
null
2020-10-13T05:57:11
2016-09-30T12:28:13
Java
UTF-8
Java
false
false
23,728
java
/* * This file was automatically generated by EvoSuite * Sat Jan 28 00:51:20 GMT 2017 */ package org.apache.commons.math.analysis.solvers; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.math.analysis.Expm1Function; import org.apache.commons.math.analysis.MonitoredFunction; import org.apache.commons.math.analysis.QuinticFunction; import org.apache.commons.math.analysis.SinFunction; import org.apache.commons.math.analysis.SincFunction; import org.apache.commons.math.analysis.UnivariateRealFunction; import org.apache.commons.math.analysis.XMinus5Function; import org.apache.commons.math.analysis.solvers.AllowedSolution; import org.apache.commons.math.analysis.solvers.BaseSecantSolver; import org.apache.commons.math.analysis.solvers.IllinoisSolver; import org.apache.commons.math.analysis.solvers.PegasusSolver; import org.apache.commons.math.analysis.solvers.RegulaFalsiSolver; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class BaseSecantSolver_ESTest extends BaseSecantSolver_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { BaseSecantSolver.Method[] baseSecantSolver_MethodArray0 = BaseSecantSolver.Method.values(); assertNotNull(baseSecantSolver_MethodArray0); } @Test(timeout = 4000) public void test01() throws Throwable { BaseSecantSolver.Method.valueOf("ILLINOIS"); } @Test(timeout = 4000) public void test02() throws Throwable { RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(0.0); Expm1Function expm1Function0 = new Expm1Function(); MonitoredFunction monitoredFunction0 = new MonitoredFunction((UnivariateRealFunction) expm1Function0); AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE; double double0 = regulaFalsiSolver0.solve(2525, (UnivariateRealFunction) monitoredFunction0, 0.0, 0.0, 0.0, allowedSolution0); assertEquals(0.0, double0, 0.01); } @Test(timeout = 4000) public void test03() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(1.0E-6); SincFunction sincFunction0 = new SincFunction(); UnivariateRealFunction univariateRealFunction0 = sincFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE; double double0 = illinoisSolver0.solve(2, univariateRealFunction0, (-1112.732), 4.348722948461875E-12, (-231.7797033752), allowedSolution0); assertEquals((-231.7797033752), illinoisSolver0.getStartValue(), 0.01); assertEquals(4.348722948461875E-12, double0, 0.01); } @Test(timeout = 4000) public void test04() throws Throwable { PegasusSolver pegasusSolver0 = new PegasusSolver(2975.4156879, (-2049.0)); Expm1Function expm1Function0 = new Expm1Function(); UnivariateRealFunction univariateRealFunction0 = expm1Function0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE; double double0 = pegasusSolver0.solve(3, univariateRealFunction0, (double) 3, (-2049.0), 2975.4156879, allowedSolution0); assertEquals(2975.4156879, pegasusSolver0.getStartValue(), 0.01); assertEquals((-2049.0), double0, 0.01); } @Test(timeout = 4000) public void test05() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE; illinoisSolver0.solve(834, (UnivariateRealFunction) sinFunction0, (-391.555917183), 0.0, allowedSolution0); double double0 = illinoisSolver0.doSolve(); assertEquals((-195.7779585915), illinoisSolver0.getStartValue(), 0.01); assertEquals(0.0, double0, 0.01); } @Test(timeout = 4000) public void test06() throws Throwable { PegasusSolver pegasusSolver0 = new PegasusSolver(); QuinticFunction quinticFunction0 = new QuinticFunction(); AllowedSolution allowedSolution0 = AllowedSolution.ANY_SIDE; // Undeclared exception! try { pegasusSolver0.solve((-108), (UnivariateRealFunction) quinticFunction0, (double) (-108), (double) (-108), allowedSolution0); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // illegal state: maximal count (-108) exceeded: evaluations // verifyException("org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver", e); } } @Test(timeout = 4000) public void test07() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); AllowedSolution allowedSolution0 = AllowedSolution.RIGHT_SIDE; // Undeclared exception! try { illinoisSolver0.solve(822, (UnivariateRealFunction) sinFunction0, (double) 822, (double) 822, allowedSolution0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // endpoints do not specify an interval: [822, 822] // verifyException("org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", e); } } @Test(timeout = 4000) public void test08() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE; // Undeclared exception! try { illinoisSolver0.solve(0, (UnivariateRealFunction) sinFunction0, 4770.8263563, (-1.0), 616.77164, allowedSolution0); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // illegal state: maximal count (0) exceeded: evaluations // verifyException("org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver", e); } } @Test(timeout = 4000) public void test09() throws Throwable { RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(); SinFunction sinFunction0 = new SinFunction(); AllowedSolution allowedSolution0 = AllowedSolution.ABOVE_SIDE; // Undeclared exception! try { regulaFalsiSolver0.solve(32, (UnivariateRealFunction) sinFunction0, 14.0, 1.0E-6, 14.0, allowedSolution0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // endpoints do not specify an interval: [14, 0] // verifyException("org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", e); } } @Test(timeout = 4000) public void test10() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.ABOVE_SIDE; // Undeclared exception! try { illinoisSolver0.solve(196, univariateRealFunction0, (-120.95131716320704), 0.5, (-391.555917183), allowedSolution0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // function values at endpoints do not have different signs, endpoints: [-120.951, 0.5], values: [0, 0.878] // verifyException("org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", e); } } @Test(timeout = 4000) public void test11() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); MonitoredFunction monitoredFunction0 = new MonitoredFunction((UnivariateRealFunction) null); AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE; // Undeclared exception! try { illinoisSolver0.solve(1541, (UnivariateRealFunction) monitoredFunction0, (-5715.241738593), 121.3931004786, (-195.831654896176), allowedSolution0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.commons.math.analysis.MonitoredFunction", e); } } @Test(timeout = 4000) public void test12() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver((-912.3323)); QuinticFunction quinticFunction0 = new QuinticFunction(); // Undeclared exception! try { illinoisSolver0.solve((-846), (UnivariateRealFunction) quinticFunction0, (-525.258092424), 0.0, 0.0); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // illegal state: maximal count (-846) exceeded: evaluations // verifyException("org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver", e); } } @Test(timeout = 4000) public void test13() throws Throwable { PegasusSolver pegasusSolver0 = new PegasusSolver(2975.4156879, (-2049.0)); Expm1Function expm1Function0 = new Expm1Function(); // Undeclared exception! try { pegasusSolver0.solve(3, (UnivariateRealFunction) expm1Function0, 0.0014544778071581277, (-0.32239692807433), 7.285315404071142E-4); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // endpoints do not specify an interval: [0.001, -0.322] // verifyException("org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", e); } } @Test(timeout = 4000) public void test14() throws Throwable { RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(0.0); // Undeclared exception! try { regulaFalsiSolver0.solve(4084, (UnivariateRealFunction) null, 0.0, 0.0, 0.0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // null is not allowed // verifyException("org.apache.commons.math.util.MathUtils", e); } } @Test(timeout = 4000) public void test15() throws Throwable { RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver((-1040.8051), (-1040.8051), (-1040.8051)); // Undeclared exception! try { regulaFalsiSolver0.doSolve(); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // illegal state: maximal count (0) exceeded: evaluations // verifyException("org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver", e); } } @Test(timeout = 4000) public void test16() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(3.0155139674735216E-6, (-2137.0956873), (-2137.0956873)); XMinus5Function xMinus5Function0 = new XMinus5Function(); illinoisSolver0.setup(2, xMinus5Function0, 2653.7173, (-2137.0956873), (-1774.01625969082)); // Undeclared exception! try { illinoisSolver0.doSolve(); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // endpoints do not specify an interval: [2,653.717, -2,137.096] // verifyException("org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", e); } } @Test(timeout = 4000) public void test17() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); QuinticFunction quinticFunction0 = new QuinticFunction(); UnivariateRealFunction univariateRealFunction0 = quinticFunction0.derivative(); illinoisSolver0.setup(834, univariateRealFunction0, 0.0, 1.0, (-1008.9)); // Undeclared exception! try { illinoisSolver0.doSolve(); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // function values at endpoints do not have different signs, endpoints: [0, 1], values: [0.25, 1.5] // verifyException("org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", e); } } @Test(timeout = 4000) public void test18() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.ABOVE_SIDE; double double0 = illinoisSolver0.solve(834, univariateRealFunction0, (-391.555917183), 0.0, allowedSolution0); assertEquals((-195.7779585915), illinoisSolver0.getStartValue(), 0.01); assertEquals((-391.1282853719292), double0, 0.01); } @Test(timeout = 4000) public void test19() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE; double double0 = illinoisSolver0.solve(834, univariateRealFunction0, (-391.555917183), 0.0, allowedSolution0); assertEquals((-195.7779585915), illinoisSolver0.getStartValue(), 0.01); assertEquals((-391.1282853719293), double0, 0.01); } @Test(timeout = 4000) public void test20() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.RIGHT_SIDE; double double0 = illinoisSolver0.solve(834, univariateRealFunction0, (-391.555917183), 0.7431748490970475, allowedSolution0); assertEquals(0.7431748490970475, illinoisSolver0.getMax(), 0.01); assertEquals((-372.2787294503905), double0, 0.01); } @Test(timeout = 4000) public void test21() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE; double double0 = illinoisSolver0.solve(834, univariateRealFunction0, (-391.555917183), 0.0, allowedSolution0); assertEquals((-195.7779585915), illinoisSolver0.getStartValue(), 0.01); assertEquals((-391.1282853719293), double0, 0.01); } @Test(timeout = 4000) public void test22() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE; double double0 = illinoisSolver0.solve(822, univariateRealFunction0, (-391.555917183), (double) 822, allowedSolution0); assertEquals(822.0, illinoisSolver0.getMax(), 0.01); assertEquals(300.02209841782525, double0, 0.01); } @Test(timeout = 4000) public void test23() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.RIGHT_SIDE; double double0 = illinoisSolver0.solve(834, univariateRealFunction0, (-391.555917183), 0.0, allowedSolution0); assertEquals((-195.7779585915), illinoisSolver0.getStartValue(), 0.01); assertEquals((-391.1282853719292), double0, 0.01); } @Test(timeout = 4000) public void test24() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE; double double0 = illinoisSolver0.solve(834, univariateRealFunction0, (-392.9037481841646), 0.0, allowedSolution0); assertEquals((-196.4518740920823), illinoisSolver0.getStartValue(), 0.01); assertEquals((-58.11946409141227), double0, 0.01); } @Test(timeout = 4000) public void test25() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver((-912.3323)); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); double double0 = illinoisSolver0.solve(320, univariateRealFunction0, (-525.258092424), 0.0, 0.0); assertEquals((-296.8805057642354), double0, 0.01); assertEquals(0.0, illinoisSolver0.getStartValue(), 0.01); } @Test(timeout = 4000) public void test26() throws Throwable { RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(0.0); SincFunction sincFunction0 = new SincFunction(); AllowedSolution allowedSolution0 = AllowedSolution.ABOVE_SIDE; double double0 = regulaFalsiSolver0.solve(408, (UnivariateRealFunction) sincFunction0, (-651.7206), 3765.458786, allowedSolution0); assertEquals(3765.458786, regulaFalsiSolver0.getMax(), 0.01); assertEquals(2412.7431579569616, double0, 0.01); } @Test(timeout = 4000) public void test27() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE; double double0 = illinoisSolver0.solve(822, univariateRealFunction0, (-391.555917183), (-1.4361469323153866), allowedSolution0); assertEquals((-1.4361469323153866), illinoisSolver0.getMax(), 0.01); assertEquals((-1.5707963267948968), double0, 0.01); } @Test(timeout = 4000) public void test28() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SincFunction sincFunction0 = new SincFunction(); AllowedSolution allowedSolution0 = AllowedSolution.RIGHT_SIDE; double double0 = illinoisSolver0.solve(822, (UnivariateRealFunction) sincFunction0, (-362.3359055544395), (-1.436147), allowedSolution0); assertEquals((-1.436147), illinoisSolver0.getMax(), 0.01); assertEquals((-361.2831551628262), double0, 0.01); } @Test(timeout = 4000) public void test29() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE; double double0 = illinoisSolver0.solve(822, univariateRealFunction0, (-391.555917183), (-1.4361469323153866), allowedSolution0); assertEquals((-196.49603205765771), illinoisSolver0.getStartValue(), 0.01); assertEquals((-1.5707963267948968), double0, 0.01); } @Test(timeout = 4000) public void test30() throws Throwable { RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(0.0); SincFunction sincFunction0 = new SincFunction(); UnivariateRealFunction univariateRealFunction0 = sincFunction0.derivative(); double double0 = regulaFalsiSolver0.solve(408, univariateRealFunction0, (double) 408, 512.5699928, 0.12486410089472413); assertEquals(0.12486410089472413, regulaFalsiSolver0.getStartValue(), 0.01); assertEquals(435.1082842477671, double0, 0.01); } @Test(timeout = 4000) public void test31() throws Throwable { RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(0.0); SincFunction sincFunction0 = new SincFunction(); AllowedSolution allowedSolution0 = AllowedSolution.ABOVE_SIDE; double double0 = regulaFalsiSolver0.solve(408, (UnivariateRealFunction) sincFunction0, (-651.7526174197428), 0.12486410089472413, allowedSolution0); assertEquals((-325.81387665942407), regulaFalsiSolver0.getStartValue(), 0.01); assertEquals((-650.3096792930846), double0, 0.01); } @Test(timeout = 4000) public void test32() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(3014.114, 114.78260627163286, 3014.114); XMinus5Function xMinus5Function0 = new XMinus5Function(); illinoisSolver0.solve(207, (UnivariateRealFunction) xMinus5Function0, (-1244.8406823), 114.78260627163286, (-1244.8406823)); double double0 = illinoisSolver0.doSolve(); assertEquals((-1244.8406823), illinoisSolver0.getStartValue(), 0.01); assertEquals(5.0, double0, 0.01); } @Test(timeout = 4000) public void test33() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); UnivariateRealFunction univariateRealFunction0 = sinFunction0.derivative(); // Undeclared exception! try { illinoisSolver0.solve(822, univariateRealFunction0, (-391.555917183), (double) 822, (AllowedSolution) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.commons.math.analysis.solvers.BaseSecantSolver", e); } } @Test(timeout = 4000) public void test34() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver((-2532.3232726)); Expm1Function expm1Function0 = new Expm1Function(); UnivariateRealFunction univariateRealFunction0 = expm1Function0.derivative(); AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE; illinoisSolver0.solve(591, univariateRealFunction0, (-926.9), 443.45315609632615, allowedSolution0); double double0 = illinoisSolver0.doSolve(); assertEquals(443.45315609632615, illinoisSolver0.getMax(), 0.01); assertEquals((-926.9), double0, 0.01); } @Test(timeout = 4000) public void test35() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver((-912.3323)); SinFunction sinFunction0 = new SinFunction(); double double0 = illinoisSolver0.solve(320, (UnivariateRealFunction) sinFunction0, (-525.258092424), 0.0, 0.0); assertEquals((-525.258092424), illinoisSolver0.getMin(), 0.01); assertEquals(0.0, double0, 0.01); } @Test(timeout = 4000) public void test36() throws Throwable { IllinoisSolver illinoisSolver0 = new IllinoisSolver(); SinFunction sinFunction0 = new SinFunction(); // Undeclared exception! try { illinoisSolver0.solve(822, (UnivariateRealFunction) sinFunction0, (-391.555917183), (double) 822, (AllowedSolution) null); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // function values at endpoints do not have different signs, endpoints: [-391.556, 822], values: [-0.91, -0.89] // verifyException("org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", e); } } }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
6205d38f14a6aa01c81833cfad69cba80ef927b5
4aaf1a9fc4137bf133843f64e69ad49bbca2face
/geisa/src/main/java/co/id/app/geisa/web/rest/vm/LoggerVM.java
a4512cfe28e3f3c22c5f7c913609cf9b6f5a14b7
[]
no_license
denagus007/semesta
75d2be4bebd252403fe7f8ff53f3e037842afd3a
838ed8101d2f1fc9b725f1bce32c4754bb2a8a8c
refs/heads/master
2020-05-21T05:55:07.386138
2018-11-30T10:18:24
2018-11-30T10:18:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
883
java
package co.id.app.geisa.web.rest.vm; import ch.qos.logback.classic.Logger; /** * View Model object for storing a Logback logger. */ public class LoggerVM { private String name; private String level; public LoggerVM(Logger logger) { this.name = logger.getName(); this.level = logger.getEffectiveLevel().toString(); } public LoggerVM() { // Empty public constructor used by Jackson. } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } @Override public String toString() { return "LoggerVM{" + "name='" + name + '\'' + ", level='" + level + '\'' + '}'; } }
[ "cipta.ageung@xlplanet.co.id" ]
cipta.ageung@xlplanet.co.id
7c3e005bd3752f7e2575f333d66134160cae4e7f
3b66bcad62b699fab4d3950a39a50d03b594542c
/src/main/java/fishbun/fishbunspring/domain/File.java
2f01bed6ecfeee8c43afcb4f468d79c9ddbb33c3
[]
no_license
pcs9569/fishbun_file_db
abf3a7f9d5eaebb3aeab63cfdc14d1f52e042af6
b53582b5fb0367c5c638588d5992fe164fce31ef
refs/heads/main
2023-04-17T02:23:20.687479
2021-04-18T09:54:50
2021-04-18T09:54:50
358,876,806
0
0
null
null
null
null
UTF-8
Java
false
false
2,220
java
package fishbun.fishbunspring.domain; public class File { private int file_id; private int sto_id; private String file_origin_name; private String file_save_name; private int file_size; private String file_delete_yn; private String file_reg_date; private String file_del_date; // public File(int file_id, int sto_id, String file_origin_name, String file_save_name, int file_size, char file_delete_yn, String file_reg_date, String file_del_date) { // this.file_id = file_id; // this.sto_id = sto_id; // this.file_origin_name = file_origin_name; // this.file_save_name = file_save_name; // this.file_size = file_size; // this.file_delete_yn = file_delete_yn; // this.file_reg_date = file_reg_date; // this.file_del_date = file_del_date; // } public int getFile_id() { return file_id; } public void setFile_id(int file_id) { this.file_id = file_id; } public int getSto_id() { return sto_id; } public void setSto_id(int sto_id) { this.sto_id = sto_id; } public String getFile_origin_name() { return file_origin_name; } public void setFile_origin_name(String file_origin_name) { this.file_origin_name = file_origin_name; } public String getFile_save_name() { return file_save_name; } public void setFile_save_name(String file_save_name) { this.file_save_name = file_save_name; } public int getFile_size() { return file_size; } public void setFile_size(int file_size) { this.file_size = file_size; } public String getFile_delete_yn() { return file_delete_yn; } public void setFile_delete_yn(String file_delete_yn) { this.file_delete_yn = file_delete_yn; } public String getFile_reg_date() { return file_reg_date; } public void setFile_reg_date(String file_reg_date) { this.file_reg_date = file_reg_date; } public String getFile_del_date() { return file_del_date; } public void setFile_del_date(String file_del_date) { this.file_del_date = file_del_date; } }
[ "pcs9569@gmail.com" ]
pcs9569@gmail.com
d63fae9c1e8541329b2dffb72fe8372c3ae6aace
5f2680f9d10395057302e861e93904fc44fb6f12
/one/src/main/java/com/example/one/bean/MyTestBean.java
3f8930f27ea9909280b5732bb3b6e598841e7179
[]
no_license
lushuaiyin/lsy
4267d0c390e5743c6388293481f9222b049300fc
05e597a35b11de71b8afa44acf35f91b375d1b9f
refs/heads/master
2021-09-11T09:27:40.480662
2020-11-17T10:54:33
2020-11-17T10:54:33
246,197,890
0
0
null
2021-06-28T16:59:55
2020-03-10T03:18:21
Java
UTF-8
Java
false
false
1,529
java
package com.example.one.bean; import javax.annotation.PostConstruct; import org.springframework.boot.context.properties.ConfigurationProperties; /** * 在另一个类中使用@EnableConfigurationProperties(MyTestBean.class) 就注释掉@Component * @author lsy * * *ignoreUnknownFields = false告诉Spring Boot在有属性不能匹配到声明的域的时候抛出异常。 *开发的时候很方便! prefix 用来选择哪个属性的prefix名字来绑定。 */ //@Component //@ConfigurationProperties(prefix = "mytest") @ConfigurationProperties(prefix = "mytest", ignoreInvalidFields = true) public class MyTestBean { private String myname; private String myaddress; private String mysalary;//测试ignoreInvalidFields,如果没有改属性,是否报错 public String getMyname() { return myname; } public void setMyname(String myname) { this.myname = myname; } public String getMyaddress() { return myaddress; } public void setMyaddress(String myaddress) { this.myaddress = myaddress; } public String getMysalary() { return mysalary; } public void setMysalary(String mysalary) { this.mysalary = mysalary; } /* * 在对象构建后打印一下. * 经测试世纪打印: * * MyTestBean toPrint: [myname=lsy, myaddress=bejing, mysalary=null] * */ @PostConstruct public String toPrint() { String str= " [myname=" + myname + ", myaddress=" + myaddress + ", mysalary=" + mysalary + "]"; System.out.println("MyTestBean toPrint:"+str); return str; } }
[ "1184072624@qq.com" ]
1184072624@qq.com
f8aed4377eafa6ab5a8917e2b3bef6c91bef0f7f
0f78fb21671a9eccf6f54872916a21a6d59239f1
/src/main/java/springbootstarter/employee/EmployeeService.java
a8fda02d0337e826437b66955dd0e19dc73fb89a
[]
no_license
dpetla/EmployeeApiApp
96748c4468e61dcc2911e835c7ba045d626477d5
2b2bbcfb21a9878d95fd3ad48a56fff5233b91cb
refs/heads/master
2021-01-13T11:12:24.588708
2017-12-08T19:35:14
2017-12-08T19:35:14
81,385,207
1
0
null
null
null
null
UTF-8
Java
false
false
1,177
java
package springbootstarter.employee; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @Service public class EmployeeService { @Autowired private EmployeeRepository employeeRepository; public List<Employee> getAllEmployees() { List<Employee> employees = new ArrayList<>(); employeeRepository.findAll().forEach(employees::add); return employees; } public List<Employee> getEmployeesByDept(String id) { List<Employee> employees = new ArrayList<>(); employeeRepository.findEmployeesByDepartment(id) .forEach(employees::add); return employees; } public Employee getEmployee(String id) { return employeeRepository.findOne(Integer.valueOf(id)); } public void addEmployee(Employee employee) { employeeRepository.save(employee); } public void updateEmployee(Employee employee) { employeeRepository.save(employee); } public void deleteEmployee(String id) { employeeRepository.delete(Integer.valueOf(id)); } }
[ "dpetla@gmail.com" ]
dpetla@gmail.com
bb4b48491286f1356f04088a814bf310d7da3cf6
0cc3358e3e8f81b854f9409d703724f0f5ea2ff7
/src/za/co/mmagon/jwebswing/plugins/jqxwidgets/editor/JQXEditorOptions.java
5a4e2e255e9761f51a22dafadf348fba7db98c9f
[]
no_license
jsdelivrbot/JWebMP-CompleteFree
c229dd405fe44d6c29ab06eedaecb7a733cbb183
d5f020a19165418eb21507204743e596bee2c011
refs/heads/master
2020-04-10T15:12:35.635284
2018-12-10T01:03:58
2018-12-10T01:03:58
161,101,028
0
0
null
2018-12-10T01:45:25
2018-12-10T01:45:25
null
UTF-8
Java
false
false
3,557
java
/* * Copyright (C) 2017 Marc Magon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package za.co.mmagon.jwebswing.plugins.jqxwidgets.editor; import za.co.mmagon.jwebswing.plugins.jqxwidgets.JQXDefaultJavaScriptPart; import za.co.mmagon.jwebswing.htmlbuilder.javascript.JavascriptFunction; /** * All the options for the JQXEditor library * <p> * @author GedMarc * @since Mar 4, 2015 * @version 1.0 * <p> * <p> */ public class JQXEditorOptions extends JQXDefaultJavaScriptPart { private JavascriptFunction createCommand;// Function null private Boolean disabled;// Boolean false private Boolean editable;// Boolean true private String lineBreak;// String "default" //private localization Object { "bold": "Bold", "italic": "Italic", "underline": "Underline", "format": "Format Block", "font": "Font Name", "size": "Font Size", "color": "Text Color", "background": "Fill Color", "left": "Align Left", "center": "Align Center", "right": "Align Right", "outdent": "Indent Less", "indent": "Indent More", "ul": "Insert unordered list", "ol": "Insert ordered list", "image": "Insert image", "link": "Insert link", "html": "View source", "clean": "Remove Formatting" } private String pasteMode;// String "html" private Boolean rtl;// Boolean false //stylesheets Array [] private String toolbarPosition;// String "top" private String tools;// String "bold italic underline | format font size | color background | left center right | outdent indent | ul ol | image | link | clean | html" public JQXEditorOptions() { } public JavascriptFunction getCreateCommand() { return createCommand; } public void setCreateCommand(JavascriptFunction createCommand) { this.createCommand = createCommand; } public Boolean getDisabled() { return disabled; } public void setDisabled(Boolean disabled) { this.disabled = disabled; } public Boolean getEditable() { return editable; } public void setEditable(Boolean editable) { this.editable = editable; } public String getLineBreak() { return lineBreak; } public void setLineBreak(String lineBreak) { this.lineBreak = lineBreak; } public String getPasteMode() { return pasteMode; } public void setPasteMode(String pasteMode) { this.pasteMode = pasteMode; } public Boolean getRtl() { return rtl; } public void setRtl(Boolean rtl) { this.rtl = rtl; } public String getToolbarPosition() { return toolbarPosition; } public void setToolbarPosition(String toolbarPosition) { this.toolbarPosition = toolbarPosition; } public String getTools() { return tools; } public void setTools(String tools) { this.tools = tools; } }
[ "ged_marc@hotmail.com" ]
ged_marc@hotmail.com
805cf2acc76b9af6d21fc124dcea91677b4e5889
4fe72449568b22a02a0878be77a1df49a7d71ee9
/app/src/main/java/com/magdy/drweather/Data/WeatherData.java
73a2786556795b597c157836ae90ae4c11c3d09c
[]
no_license
EngMahmoudMagdy/drweather
e23c78da842d3a8ed05220cbcd5b7db5b93aa789
91eef9f5878d062c100afd9aa50e0c14876d17bc
refs/heads/master
2020-04-01T14:49:32.815884
2018-10-20T09:54:22
2018-10-20T09:54:22
153,309,876
0
0
null
null
null
null
UTF-8
Java
false
false
1,392
java
package com.magdy.drweather.Data; public class WeatherData { private float temp , pm25 , co , no2, o3; private int pressure , humidity ; public WeatherData() { } public float getTemp() { return temp; } public void setTemp(float temp) { this.temp = temp; } public float getPm25() { return pm25; } public void setPm25(float pm25) { this.pm25 = pm25; } public float getCo() { return co; } public void setCo(float co) { this.co = co; } public float getNo2() { return no2; } public void setNo2(float no2) { this.no2 = no2; } public float getO3() { return o3; } public void setO3(float o3) { this.o3 = o3; } public int getPressure() { return pressure; } public void setPressure(int pressure) { this.pressure = pressure; } public int getHumidity() { return humidity; } public void setHumidity(int humidity) { this.humidity = humidity; } public WeatherData(float temp, float pm25, float co, float no2, float o3, int pressure, int humidity) { this.temp = temp; this.pm25 = pm25; this.co = co; this.no2 = no2; this.o3 = o3; this.pressure = pressure; this.humidity = humidity; } }
[ "engmahmoudmagdy11@gmail.com" ]
engmahmoudmagdy11@gmail.com
006972275bbfacb6db43762495c0ba5bf6ab570a
75f59cf045885e03da5ef9714c8e51198a3fe1a6
/UDF-API/src/main/java/formatter/manager/UDFManager.java
712f6e67e35a7d154fd6949164784f1b0eca52da
[ "Apache-2.0" ]
permissive
matee999/UniversalDataFormatter
bf188e612b6614f2af0c6c8a17326585a144bc9e
f36542af3552922860cacba0e9fe88866186e94a
refs/heads/main
2023-04-04T11:28:28.124955
2021-04-04T16:59:54
2021-04-04T16:59:54
354,599,370
0
0
null
null
null
null
UTF-8
Java
false
false
735
java
package formatter.manager; import formatter.DataFormatter; /** * Universal data formatter manager registers and returns * active implementation of the {@link formatter.DataFormatter} */ public class UDFManager { /** * Active registered {@link formatter.DataFormatter} */ private static DataFormatter formatter; /** * <p>Registers given {@link formatter.DataFormatter}</p> * @param dataFormatter formatter implementation */ public static void registerFormatter(DataFormatter dataFormatter) { formatter = dataFormatter; } /** * <p>Provides active {@link formatter.DataFormatter}</p> * @return dataFormatter formatter implementation */ public static DataFormatter getFormatter() { return formatter; } }
[ "matija.pleskonjic99@gmail.com" ]
matija.pleskonjic99@gmail.com
cbbcbcb7f0a7b02642f7a3b7d69715278b450a4a
7a755ffd49791e6af865e64d23f37468758edc78
/DoubleLinkList/reverse.java
e686e61c68c0ecb0137b6f63e1cfaa9dfa4d12a7
[]
no_license
bhagyashripachkor/data-structure
d2e42ee25f6918ec7408c4617e8b902c0987170b
40fb72af5f3e5813af768ba12e38426fe2cdbc8e
refs/heads/master
2021-01-17T12:58:00.348771
2016-07-08T21:12:43
2016-07-08T21:12:43
58,074,873
2
0
null
null
null
null
UTF-8
Java
false
false
3,262
java
package linkList; public class DoubleLinkList { Node head; class Node{ int data; Node prev,next; public Node(int d){ this.data = d; this.prev = null; this.next = null; } } void insertfirst(int d){ Node n = new Node(d); if(head == null){ head = n; }else{ Node temp = head; n.next = temp; temp.prev = n; head = n; } } void insertlast(int d){ Node n = new Node(d); if(head == null){ head = n; }else{ Node temp = head; while(temp.next != null) temp = temp.next; n.prev = temp; temp.next = n; } } void print(){ Node n = head; if(head == null) return; else{ while(n != null){ System.out.print(n.data + " "); n = n.next; } } } void insetatpos(int d, int pos){ Node n = head; if(head == null) return; else{ if(pos == 1) insertfirst(d); else{ Node temp = head; Node newn = new Node(d); for(int i = 1;i < pos - 1; i++){ temp = temp.next; } newn.next = temp.next; temp.next.prev = newn; newn.prev = temp; temp.next = newn; } } } int size(){ int s = 0; Node temp = head; while(temp != null){ s++; temp = temp.next; } s++; return s; } void insertbeforeele(int ele, int d){ int s = size(); if(head == null) insertfirst(ele); else{ Node temp = head; for(int i = 1; i <s; i++) { if(temp.next.data == ele) break; temp=temp.next; } Node n = new Node(d); n.next =temp.next; temp.next.prev = n; n.prev = temp; temp.next = n; } } void insertafterele(int ele, int d){ int s = size(); if(head == null) insertfirst(ele); else{ Node temp = head; for(int i = 1; i <s; i++) { if(temp.data == ele) break; temp=temp.next; } Node n = new Node(d); n.next = temp.next; temp.prev = n; n.prev = temp; temp.next = n; } } void deletefirst(){ if(head == null){ System.out.println("list is empty"); }else{ Node temp = head; temp.next.prev = null; head = temp.next; } } void deleteele(int d){ int s = size(); if(head == null){ System.out.println("list is empty"); }else{ Node temp = head; for(int i = 0;i < s; i++){ if(temp.next.data == d) break; temp = temp.next; } temp.next = temp.next.next; temp.next.next.prev = temp; } } void reverse(){ Node prev = null; while (head != null) { Node next = head.next; head.next = prev; prev = head; head = next; } head = prev; } public static void main(String[] args){ DoubleLinkList dll = new DoubleLinkList(); dll.insertfirst(5); dll.print(); System.out.println(); dll.insertfirst(6); dll.print(); System.out.println(); dll.insertfirst(7); dll.print(); dll.insertlast(4); System.out.println(); dll.print(); dll.insetatpos(1, 3); System.out.println(); dll.print(); dll.insertbeforeele(1,3); System.out.println(); dll.print(); dll.insertafterele(1,2); System.out.println(); dll.print(); dll.deletefirst(); System.out.println(); dll.print(); dll.deleteele(1); System.out.println(); dll.print(); dll.reverse(); System.out.println(); dll.print(); } }
[ "bhagyashrip547@gmail.com" ]
bhagyashrip547@gmail.com
cfe01c157e5bf533fd31d7848b58539067e59b70
866f02270d0b2c91194b2ca037e4fd41cf897ab4
/Tests/src/main/java/com/tle/webtests/pageobject/generic/component/SelectCourseDialog.java
c297a89806a2d5d3584b4037f1893155efadadec
[]
no_license
cbeach47/equella-autotests
3ebe82ab984240431bd22ef50530960235a8e001
f5698103e681a08cd5f5cfab15af04c89404f2dd
refs/heads/master
2021-01-21T23:21:05.328860
2017-06-22T04:48:58
2017-06-22T04:49:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,132
java
package com.tle.webtests.pageobject.generic.component; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.ui.ExpectedCondition; import com.tle.webtests.framework.PageContext; import com.tle.webtests.pageobject.AbstractPage; import com.tle.webtests.pageobject.WaitingPageObject; public class SelectCourseDialog extends AbstractPage<SelectCourseDialog> { private final String baseId; @FindBy(id = "{baseid}_q") private WebElement queryField; @FindBy(id = "{baseid}_s") private WebElement searchButton; @FindBy(id = "{baseid}_ok") private WebElement okButton; @FindBy(id = "{baseid}_close") private WebElement closeButton; @FindBy(id = "results") private WebElement resultsDiv; @FindBy(className = "resultlist") private WebElement resultsList; public SelectCourseDialog(PageContext context, String baseId) { super(context); this.baseId = baseId; } public String getBaseid() { return baseId; } @Override protected void checkLoadedElement() { ensureVisible(queryField, searchButton, okButton); } public SelectCourseDialog search(String query) { queryField.clear(); queryField.sendKeys(query); WaitingPageObject<SelectCourseDialog> ajaxUpdateExpect = ajaxUpdateExpect(resultsDiv, resultsList); searchButton.click(); ajaxUpdateExpect.get(); waitForElement(By.xpath("id('" + baseId + "')//div[@id='results']//ul/li")); return get(); } public boolean searchWithoutMatch(String query) { queryField.clear(); queryField.sendKeys(query); WaitingPageObject<SelectCourseDialog> ajaxUpdateExpect = ajaxUpdateExpect(resultsDiv, resultsList); searchButton.click(); ajaxUpdateExpect.get(); waitForElement(By.xpath("id('" + baseId + "')//div[@id='results']//h4[text()]")); String text = driver.findElement(By.xpath("id('" + baseId + "')//div[@id='results']//h4[text()]")).getText(); if( text.equals("Your search did not match any courses.") ) { return true; } return false; } public boolean containsCourse(String course) { return !driver.findElements(getByForCourse(course)).isEmpty(); } public SelectCourseDialog select(String course) { driver.findElement(getByForCourse(course)).click(); return get(); } private By getByForCourse(String course) { String xpath = "//ul[@id =\"" + baseId + "_c\"]/li/label[text() = " + quoteXPath(course) + "]/../input"; return By.xpath(xpath); } public <T extends AbstractPage<T>> T searchSelectAndFinish(String course, WaitingPageObject<T> page) { search(course); return selectAndFinish(course, page); } public <T extends AbstractPage<T>> T selectAndFinish(String course, WaitingPageObject<T> page) { select(course); return finish(page); } public <T extends AbstractPage<T>> T finish(WaitingPageObject<T> page) { okButton.click(); return page.get(); } public <T extends AbstractPage<T>> T cancel(WaitingPageObject<T> page) { ExpectedCondition<Boolean> removalCondition = removalCondition(closeButton); closeButton.click(); waiter.until(removalCondition); return page.get(); } }
[ "doolse@gmail.com" ]
doolse@gmail.com
ae69e8370728054c51f058b31bea494e9a049b81
d74748f7ae14bc5e87485de33b60bbc5523e9df6
/src/main/java/com/rafarha/ecommerce/domain/OrderDetail.java
b552a4343d7efd3d957f0578c5d3e60ea5c6919c
[]
no_license
rafarha/eCommerceAPI
d0e53e5e0b67bb615cd45c6d785745ef964e4994
eae995e69febac24671a4d827251d04bd27fd7da
refs/heads/master
2023-03-02T08:13:11.677183
2021-02-11T23:21:44
2021-02-11T23:21:44
264,272,025
0
0
null
null
null
null
UTF-8
Java
false
false
1,121
java
package com.rafarha.ecommerce.domain; import javax.persistence.*; import java.math.BigDecimal; @Entity @Table(name = "TB_ORDER_DETAIL") public class OrderDetail { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) @SequenceGenerator(name = "seq_order_detail", allocationSize = 1) private Integer id; @OneToOne private Product product; @OneToOne private Order order; private Integer quantity; private BigDecimal price; public Integer getId() { return id; } public void setId(final Integer pId) { id = pId; } public Product getProduct() { return product; } public void setProduct(final Product pProduct) { product = pProduct; } public Order getOrder() { return order; } public void setOrder(final Order pOrder) { order = pOrder; } public Integer getQuantity() { return quantity; } public void setQuantity(final Integer pQuantity) { quantity = pQuantity; } public BigDecimal getPrice() { return price; } public void setPrice(final BigDecimal pPrice) { price = pPrice; } }
[ "rafael.alves@synchro.com.br" ]
rafael.alves@synchro.com.br
76fccde8c9046884f12d19a6625766bfbb1e3639
fd28e28d665ef4c8d43d73fc1eea4c2c37e979be
/bus-office/src/main/java/org/aoju/bus/office/bridge/LocalOfficeBridgeFactory.java
027c1951b2f9407303466164a9f8e05d56ede505
[ "MIT" ]
permissive
xiaoyue6/bus
c6691b46f9d2e685cbb4a9edf574ba2a0a356a25
a4ad0103bb267b5de5a3c53777bdd67e6d9b86f5
refs/heads/master
2023-07-26T20:54:29.291855
2021-08-31T15:50:42
2021-08-31T15:50:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,007
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2021 aoju.org and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * * * ********************************************************************************/ package org.aoju.bus.office.bridge; import com.sun.star.beans.XPropertySet; import com.sun.star.bridge.XBridge; import com.sun.star.bridge.XBridgeFactory; import com.sun.star.comp.helper.Bootstrap; import com.sun.star.connection.XConnection; import com.sun.star.connection.XConnector; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XDesktop; import com.sun.star.lang.EventObject; import com.sun.star.lang.XComponent; import com.sun.star.lang.XEventListener; import com.sun.star.lang.XMultiComponentFactory; import com.sun.star.uno.XComponentContext; import org.aoju.bus.core.lang.Symbol; import org.aoju.bus.core.lang.exception.InstrumentException; import org.aoju.bus.core.toolkit.ObjectKit; import org.aoju.bus.logger.Logger; import org.aoju.bus.office.magic.Lo; import org.aoju.bus.office.magic.UnoUrl; import org.aoju.bus.office.metric.OfficeConnectEvent; import org.aoju.bus.office.metric.OfficeConnectEventListener; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; /** * 负责使用给定的UnoUrl管理到office进程的连接. * * @author Kimi Liu * @version 6.2.8 * @since JDK 1.8+ */ public class LocalOfficeBridgeFactory implements LocalOfficeContextAware, XEventListener { private static AtomicInteger bridgeIndex = new AtomicInteger(); private final UnoUrl unoUrl; private final List<OfficeConnectEventListener> connectionEventListeners; private final AtomicBoolean connected = new AtomicBoolean(); private Object desktopService; private XComponent bridgeComponent; private XComponentContext componentContext; private XComponentLoader componentLoader; /** * 为指定的UNO URL构造新连接. * * @param unoUrl 为其创建连接的URL. */ public LocalOfficeBridgeFactory(final UnoUrl unoUrl) { this.unoUrl = unoUrl; this.connectionEventListeners = new ArrayList<>(); } /** * 将侦听器添加到此连接的连接事件侦听器列表. * * @param connectionEventListener 当与office进程建立连接和连接丢失时,它将被通知. */ public void addConnectionEventListener(final OfficeConnectEventListener connectionEventListener) { connectionEventListeners.add(connectionEventListener); } /** * 建立到office实例的连接 */ public void connect() throws InstrumentException { synchronized (this) { final String connectPart = unoUrl.getConnectionAndParametersAsString(); Logger.debug("Connecting with connectString '{}'", connectPart); try { // 创建默认的本地组件上下文 final XComponentContext localContext = Bootstrap.createInitialComponentContext(null); // 初始化服务管理器. final XMultiComponentFactory localServiceManager = localContext.getServiceManager(); // 实例化连接器服务. final XConnector connector = Lo.qi(XConnector.class, localServiceManager.createInstanceWithContext( "com.sun.star.connection.Connector", localContext)); // 仅使用uno-url的连接字符串部分进行连接. final XConnection connection = connector.connect(connectPart); // 实例化桥接工厂服务. final XBridgeFactory bridgeFactory = Lo.qi(XBridgeFactory.class, localServiceManager.createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", localContext)); // 使用urp协议创建没有实例提供程序的远程桥接. final String bridgeName = "converter_" + bridgeIndex.getAndIncrement(); final XBridge bridge = bridgeFactory.createBridge( bridgeName, unoUrl.getProtocolAndParametersAsString(), connection, null); // 查询XComponent接口并将其添加为事件监听器. bridgeComponent = Lo.qi(XComponent.class, bridge); bridgeComponent.addEventListener(this); // 获取远程实例 final String rootOid = unoUrl.getRootOid(); final Object bridgeInstance = bridge.getInstance(rootOid); if (ObjectKit.isEmpty(bridgeInstance)) { throw new InstrumentException( "Server didn't provide an instance for '" + rootOid + Symbol.SINGLE_QUOTE, connectPart); } // 查询其主工厂接口的初始对象. final XMultiComponentFactory officeMultiComponentFactory = Lo.qi(XMultiComponentFactory.class, bridgeInstance); // 检索XPropertySet接口的组件上下文(尚未从office导出)查询. final XPropertySet properties = Lo.qi(XPropertySet.class, officeMultiComponentFactory); // 使用来自office服务器的默认上下文查询接口XComponentContext. componentContext = Lo.qi(XComponentContext.class, properties.getPropertyValue("DefaultContext")); // 现在创建处理应用程序窗口和文档的桌面服务 // 注意:在这里使用office组件上下文! desktopService = officeMultiComponentFactory.createInstanceWithContext( "com.sun.star.frame.Desktop", componentContext); componentLoader = Lo.qi(XComponentLoader.class, desktopService); if (ObjectKit.isEmpty(componentLoader)) { throw new InstrumentException("Could not create a desktop service", connectPart); } connected.set(true); Logger.info("Connected: '{}'", connectPart); // 通知所有的监听器我们已经接通了 final OfficeConnectEvent connectionEvent = new OfficeConnectEvent(this); connectionEventListeners.stream().forEach(listener -> listener.connected(connectionEvent)); } catch (InstrumentException connectionEx) { throw connectionEx; } catch (Exception ex) { throw new InstrumentException( String.format("Connection failed: '%s'; %s", connectPart, ex.getMessage()), connectPart, ex); } } } /** * 关闭连接. */ public void disconnect() { synchronized (this) { Logger.debug("Disconnecting from '{}'", unoUrl.getConnectionAndParametersAsString()); bridgeComponent.dispose(); } } @Override public void disposing(final EventObject eventObject) { if (connected.get()) { connected.set(false); componentContext = null; componentLoader = null; desktopService = null; bridgeComponent = null; Logger.info("Disconnected: '{}'", unoUrl.getConnectionAndParametersAsString()); final OfficeConnectEvent connectionEvent = new OfficeConnectEvent(this); connectionEventListeners.stream().forEach(listener -> listener.disconnected(connectionEvent)); } } @Override public XComponentContext getComponentContext() { return componentContext; } @Override public XComponentLoader getComponentLoader() { return componentLoader; } @Override public XDesktop getDesktop() { return Lo.qi(XDesktop.class, desktopService); } /** * 获取是否连接到office实例. * * @return {@code true} 连接到office实例 {@code false} 未连接. */ public boolean isConnected() { return connected.get(); } }
[ "839536@qq.com" ]
839536@qq.com
8a20b54787ee13fc9cd0bc101e8e1ba6361c4d8d
1fecf30fa76b0e2444e32a63cad8c549fdad8951
/src/string/LengthOfLastWord.java
18a807f4eece1e632de9797888e1a81f127a4127
[]
no_license
XiyuanHu/Leetcode
4350165aaaab98d78588df2d00d5a4a588a8efc7
0299dff3fd3e2175635945932b9c5676df5852cb
refs/heads/master
2021-01-20T09:36:35.252616
2015-09-10T19:05:25
2015-09-10T19:05:25
41,372,421
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package string; public class LengthOfLastWord { public int lengthOfLastWord(String s) { if(s == "" || s == " ") return 0; boolean isFirst = false; int count = 0; for(int i = s.length()-1; i >= 0; i--){ char c = s.charAt(i); if(c == ' '){ if(isFirst != false){ break; } }else{ if(isFirst == false){ isFirst = true; count++; }else{ count++; } } } return count; } }
[ "xiyuhu@ebay.com" ]
xiyuhu@ebay.com
fe9ca4c1042261824b407597147eb26caf293552
961016a614c6785e6fe8f6bfd7214676f0d91064
/Portlets/ProgateServiceBuilder-portlet/docroot/WEB-INF/src/larion/progate/service/base/ProGateApplicationsLocalServiceBaseImpl.java
9af523baabd1f7873e302181fd1e5af110afc6e6
[]
no_license
thaond/progate-lmis
f58c447c58c11217e2247c7ca3349a44ad7f3bbd
d143b7e7d56a22cc9ce6256ca6fb77a11459e6d6
refs/heads/master
2021-01-10T03:00:26.888869
2011-07-28T14:12:54
2011-07-28T14:12:54
44,992,742
0
0
null
null
null
null
UTF-8
Java
false
false
66,417
java
/** * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package larion.progate.service.base; import com.liferay.portal.PortalException; import com.liferay.portal.SystemException; import com.liferay.portal.kernel.annotation.BeanReference; import com.liferay.portal.kernel.dao.orm.DynamicQuery; import com.liferay.portal.util.PortalUtil; import larion.progate.model.ProGateApplications; import larion.progate.service.CountryLocalService; import larion.progate.service.CountryService; import larion.progate.service.OrgObjectApprovalLocalService; import larion.progate.service.OrgObjectApprovalService; import larion.progate.service.OrgObjectListLocalService; import larion.progate.service.OrgObjectListService; import larion.progate.service.OrgObjectMeasureLocalService; import larion.progate.service.OrgObjectMeasureService; import larion.progate.service.OrgObjectObjectiveLocalService; import larion.progate.service.OrgObjectObjectiveService; import larion.progate.service.OrgObjectPerspectiveLocalService; import larion.progate.service.OrgObjectPerspectiveService; import larion.progate.service.OrgObjectTargetsLocalService; import larion.progate.service.OrgObjectTargetsService; import larion.progate.service.OrganizationLocalService; import larion.progate.service.OrganizationService; import larion.progate.service.OrganizationViewLocalService; import larion.progate.service.OrganizationViewService; import larion.progate.service.ProGateApplicationsLocalService; import larion.progate.service.ProGateApplicationsService; import larion.progate.service.ProGateCurrencyTypesLocalService; import larion.progate.service.ProGateCurrencyTypesService; import larion.progate.service.ProGateJournalArticleLocalService; import larion.progate.service.ProGateJournalArticlePrioritiesLocalService; import larion.progate.service.ProGateJournalArticlePrioritiesService; import larion.progate.service.ProGateJournalArticleService; import larion.progate.service.ProGateJournalArticleSlideShowLocalService; import larion.progate.service.ProGateJournalArticleSlideShowService; import larion.progate.service.ProGateJournalArticleTypesLocalService; import larion.progate.service.ProGateJournalArticleTypesService; import larion.progate.service.ProGateJournalArticleViewLocalService; import larion.progate.service.ProGateJournalArticleViewService; import larion.progate.service.ProGateMenuViewLocalService; import larion.progate.service.ProGateMenuViewService; import larion.progate.service.ProGateOrgCustomerLocalService; import larion.progate.service.ProGateOrgCustomerRepresenterLocalService; import larion.progate.service.ProGateOrgCustomerRepresenterService; import larion.progate.service.ProGateOrgCustomerService; import larion.progate.service.ProGateOrgTypeLocalService; import larion.progate.service.ProGateOrgTypeService; import larion.progate.service.ProGateOrgsUsersPermissionsLocalService; import larion.progate.service.ProGateOrgsUsersPermissionsService; import larion.progate.service.ProGatePermissionsLocalService; import larion.progate.service.ProGatePermissionsService; import larion.progate.service.ProGateProductsServicesLocalService; import larion.progate.service.ProGateProductsServicesService; import larion.progate.service.ProGateRolesLocalService; import larion.progate.service.ProGateRolesService; import larion.progate.service.ProGateUserApplicationsLocalService; import larion.progate.service.ProGateUserApplicationsService; import larion.progate.service.ProgateApplicationsSettingLocalService; import larion.progate.service.ProgateApplicationsSettingService; import larion.progate.service.ProgateLayoutsMenusLocalService; import larion.progate.service.ProgateLayoutsMenusService; import larion.progate.service.ProgateLayoutsRolesLocalService; import larion.progate.service.ProgateLayoutsRolesService; import larion.progate.service.ProgateMenusLocalService; import larion.progate.service.ProgateOrganizationParticipantsLocalService; import larion.progate.service.ProgateOrganizationParticipantsService; import larion.progate.service.ProgateOrganizationsStaffsLocalService; import larion.progate.service.ProgateOrganizationsStaffsService; import larion.progate.service.ProgatePortalMenuLocalService; import larion.progate.service.ProgatePortalMenuService; import larion.progate.service.RegionLocalService; import larion.progate.service.RegionService; import larion.progate.service.UserInformationViewLocalService; import larion.progate.service.UserInformationViewService; import larion.progate.service.UserLocalService; import larion.progate.service.UserService; import larion.progate.service.ViewOrgUsersPermissionsLocalService; import larion.progate.service.ViewOrgUsersPermissionsService; import larion.progate.service.ViewProGatePermissionsRolesLocalService; import larion.progate.service.ViewProGatePermissionsRolesService; import larion.progate.service.persistence.CountryPersistence; import larion.progate.service.persistence.OrgObjectApprovalPersistence; import larion.progate.service.persistence.OrgObjectListPersistence; import larion.progate.service.persistence.OrgObjectMeasurePersistence; import larion.progate.service.persistence.OrgObjectObjectivePersistence; import larion.progate.service.persistence.OrgObjectPerspectivePersistence; import larion.progate.service.persistence.OrgObjectTargetsPersistence; import larion.progate.service.persistence.OrganizationFinder; import larion.progate.service.persistence.OrganizationPersistence; import larion.progate.service.persistence.OrganizationViewPersistence; import larion.progate.service.persistence.ProGateApplicationsPersistence; import larion.progate.service.persistence.ProGateCurrencyTypesPersistence; import larion.progate.service.persistence.ProGateJournalArticlePersistence; import larion.progate.service.persistence.ProGateJournalArticlePrioritiesPersistence; import larion.progate.service.persistence.ProGateJournalArticleSlideShowPersistence; import larion.progate.service.persistence.ProGateJournalArticleTypesPersistence; import larion.progate.service.persistence.ProGateJournalArticleViewPersistence; import larion.progate.service.persistence.ProGateMenuViewPersistence; import larion.progate.service.persistence.ProGateOrgCustomerPersistence; import larion.progate.service.persistence.ProGateOrgCustomerRepresenterPersistence; import larion.progate.service.persistence.ProGateOrgTypePersistence; import larion.progate.service.persistence.ProGateOrgsUsersPermissionsFinder; import larion.progate.service.persistence.ProGateOrgsUsersPermissionsPersistence; import larion.progate.service.persistence.ProGatePermissionsPersistence; import larion.progate.service.persistence.ProGateProductsServicesPersistence; import larion.progate.service.persistence.ProGateRolesPersistence; import larion.progate.service.persistence.ProGateUserApplicationsPersistence; import larion.progate.service.persistence.ProgateApplicationsSettingPersistence; import larion.progate.service.persistence.ProgateLayoutsMenusPersistence; import larion.progate.service.persistence.ProgateLayoutsRolesPersistence; import larion.progate.service.persistence.ProgateMenusPersistence; import larion.progate.service.persistence.ProgateOrganizationParticipantsPersistence; import larion.progate.service.persistence.ProgateOrganizationsStaffsFinder; import larion.progate.service.persistence.ProgateOrganizationsStaffsPersistence; import larion.progate.service.persistence.ProgatePortalMenuPersistence; import larion.progate.service.persistence.RegionPersistence; import larion.progate.service.persistence.UserFinder; import larion.progate.service.persistence.UserInformationViewFinder; import larion.progate.service.persistence.UserInformationViewPersistence; import larion.progate.service.persistence.UserPersistence; import larion.progate.service.persistence.ViewOrgUsersPermissionsFinder; import larion.progate.service.persistence.ViewOrgUsersPermissionsPersistence; import larion.progate.service.persistence.ViewProGatePermissionsRolesFinder; import larion.progate.service.persistence.ViewProGatePermissionsRolesPersistence; import java.util.List; /** * <a href="ProGateApplicationsLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a> * * @author Brian Wing Shun Chan * */ public abstract class ProGateApplicationsLocalServiceBaseImpl implements ProGateApplicationsLocalService { public ProGateApplications addProGateApplications( ProGateApplications proGateApplications) throws SystemException { proGateApplications.setNew(true); return proGateApplicationsPersistence.update(proGateApplications, false); } public ProGateApplications createProGateApplications( Integer ProGateApplicationsId) { return proGateApplicationsPersistence.create(ProGateApplicationsId); } public void deleteProGateApplications(Integer ProGateApplicationsId) throws PortalException, SystemException { proGateApplicationsPersistence.remove(ProGateApplicationsId); } public void deleteProGateApplications( ProGateApplications proGateApplications) throws SystemException { proGateApplicationsPersistence.remove(proGateApplications); } public List<Object> dynamicQuery(DynamicQuery dynamicQuery) throws SystemException { return proGateApplicationsPersistence.findWithDynamicQuery(dynamicQuery); } public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException { return proGateApplicationsPersistence.findWithDynamicQuery(dynamicQuery, start, end); } public ProGateApplications getProGateApplications( Integer ProGateApplicationsId) throws PortalException, SystemException { return proGateApplicationsPersistence.findByPrimaryKey(ProGateApplicationsId); } public List<ProGateApplications> getProGateApplicationses(int start, int end) throws SystemException { return proGateApplicationsPersistence.findAll(start, end); } public int getProGateApplicationsesCount() throws SystemException { return proGateApplicationsPersistence.countAll(); } public ProGateApplications updateProGateApplications( ProGateApplications proGateApplications) throws SystemException { proGateApplications.setNew(false); return proGateApplicationsPersistence.update(proGateApplications, true); } public ProGateApplications updateProGateApplications( ProGateApplications proGateApplications, boolean merge) throws SystemException { proGateApplications.setNew(false); return proGateApplicationsPersistence.update(proGateApplications, merge); } public UserLocalService getUserLocalService() { return userLocalService; } public void setUserLocalService(UserLocalService userLocalService) { this.userLocalService = userLocalService; } public UserService getUserService() { return userService; } public void setUserService(UserService userService) { this.userService = userService; } public UserPersistence getUserPersistence() { return userPersistence; } public void setUserPersistence(UserPersistence userPersistence) { this.userPersistence = userPersistence; } public UserFinder getUserFinder() { return userFinder; } public void setUserFinder(UserFinder userFinder) { this.userFinder = userFinder; } public UserInformationViewLocalService getUserInformationViewLocalService() { return userInformationViewLocalService; } public void setUserInformationViewLocalService( UserInformationViewLocalService userInformationViewLocalService) { this.userInformationViewLocalService = userInformationViewLocalService; } public UserInformationViewService getUserInformationViewService() { return userInformationViewService; } public void setUserInformationViewService( UserInformationViewService userInformationViewService) { this.userInformationViewService = userInformationViewService; } public UserInformationViewPersistence getUserInformationViewPersistence() { return userInformationViewPersistence; } public void setUserInformationViewPersistence( UserInformationViewPersistence userInformationViewPersistence) { this.userInformationViewPersistence = userInformationViewPersistence; } public UserInformationViewFinder getUserInformationViewFinder() { return userInformationViewFinder; } public void setUserInformationViewFinder( UserInformationViewFinder userInformationViewFinder) { this.userInformationViewFinder = userInformationViewFinder; } public OrganizationLocalService getOrganizationLocalService() { return organizationLocalService; } public void setOrganizationLocalService( OrganizationLocalService organizationLocalService) { this.organizationLocalService = organizationLocalService; } public OrganizationService getOrganizationService() { return organizationService; } public void setOrganizationService(OrganizationService organizationService) { this.organizationService = organizationService; } public OrganizationPersistence getOrganizationPersistence() { return organizationPersistence; } public void setOrganizationPersistence( OrganizationPersistence organizationPersistence) { this.organizationPersistence = organizationPersistence; } public OrganizationFinder getOrganizationFinder() { return organizationFinder; } public void setOrganizationFinder(OrganizationFinder organizationFinder) { this.organizationFinder = organizationFinder; } public OrganizationViewLocalService getOrganizationViewLocalService() { return organizationViewLocalService; } public void setOrganizationViewLocalService( OrganizationViewLocalService organizationViewLocalService) { this.organizationViewLocalService = organizationViewLocalService; } public OrganizationViewService getOrganizationViewService() { return organizationViewService; } public void setOrganizationViewService( OrganizationViewService organizationViewService) { this.organizationViewService = organizationViewService; } public OrganizationViewPersistence getOrganizationViewPersistence() { return organizationViewPersistence; } public void setOrganizationViewPersistence( OrganizationViewPersistence organizationViewPersistence) { this.organizationViewPersistence = organizationViewPersistence; } public OrgObjectListLocalService getOrgObjectListLocalService() { return orgObjectListLocalService; } public void setOrgObjectListLocalService( OrgObjectListLocalService orgObjectListLocalService) { this.orgObjectListLocalService = orgObjectListLocalService; } public OrgObjectListService getOrgObjectListService() { return orgObjectListService; } public void setOrgObjectListService( OrgObjectListService orgObjectListService) { this.orgObjectListService = orgObjectListService; } public OrgObjectListPersistence getOrgObjectListPersistence() { return orgObjectListPersistence; } public void setOrgObjectListPersistence( OrgObjectListPersistence orgObjectListPersistence) { this.orgObjectListPersistence = orgObjectListPersistence; } public OrgObjectApprovalLocalService getOrgObjectApprovalLocalService() { return orgObjectApprovalLocalService; } public void setOrgObjectApprovalLocalService( OrgObjectApprovalLocalService orgObjectApprovalLocalService) { this.orgObjectApprovalLocalService = orgObjectApprovalLocalService; } public OrgObjectApprovalService getOrgObjectApprovalService() { return orgObjectApprovalService; } public void setOrgObjectApprovalService( OrgObjectApprovalService orgObjectApprovalService) { this.orgObjectApprovalService = orgObjectApprovalService; } public OrgObjectApprovalPersistence getOrgObjectApprovalPersistence() { return orgObjectApprovalPersistence; } public void setOrgObjectApprovalPersistence( OrgObjectApprovalPersistence orgObjectApprovalPersistence) { this.orgObjectApprovalPersistence = orgObjectApprovalPersistence; } public OrgObjectPerspectiveLocalService getOrgObjectPerspectiveLocalService() { return orgObjectPerspectiveLocalService; } public void setOrgObjectPerspectiveLocalService( OrgObjectPerspectiveLocalService orgObjectPerspectiveLocalService) { this.orgObjectPerspectiveLocalService = orgObjectPerspectiveLocalService; } public OrgObjectPerspectiveService getOrgObjectPerspectiveService() { return orgObjectPerspectiveService; } public void setOrgObjectPerspectiveService( OrgObjectPerspectiveService orgObjectPerspectiveService) { this.orgObjectPerspectiveService = orgObjectPerspectiveService; } public OrgObjectPerspectivePersistence getOrgObjectPerspectivePersistence() { return orgObjectPerspectivePersistence; } public void setOrgObjectPerspectivePersistence( OrgObjectPerspectivePersistence orgObjectPerspectivePersistence) { this.orgObjectPerspectivePersistence = orgObjectPerspectivePersistence; } public OrgObjectObjectiveLocalService getOrgObjectObjectiveLocalService() { return orgObjectObjectiveLocalService; } public void setOrgObjectObjectiveLocalService( OrgObjectObjectiveLocalService orgObjectObjectiveLocalService) { this.orgObjectObjectiveLocalService = orgObjectObjectiveLocalService; } public OrgObjectObjectiveService getOrgObjectObjectiveService() { return orgObjectObjectiveService; } public void setOrgObjectObjectiveService( OrgObjectObjectiveService orgObjectObjectiveService) { this.orgObjectObjectiveService = orgObjectObjectiveService; } public OrgObjectObjectivePersistence getOrgObjectObjectivePersistence() { return orgObjectObjectivePersistence; } public void setOrgObjectObjectivePersistence( OrgObjectObjectivePersistence orgObjectObjectivePersistence) { this.orgObjectObjectivePersistence = orgObjectObjectivePersistence; } public OrgObjectMeasureLocalService getOrgObjectMeasureLocalService() { return orgObjectMeasureLocalService; } public void setOrgObjectMeasureLocalService( OrgObjectMeasureLocalService orgObjectMeasureLocalService) { this.orgObjectMeasureLocalService = orgObjectMeasureLocalService; } public OrgObjectMeasureService getOrgObjectMeasureService() { return orgObjectMeasureService; } public void setOrgObjectMeasureService( OrgObjectMeasureService orgObjectMeasureService) { this.orgObjectMeasureService = orgObjectMeasureService; } public OrgObjectMeasurePersistence getOrgObjectMeasurePersistence() { return orgObjectMeasurePersistence; } public void setOrgObjectMeasurePersistence( OrgObjectMeasurePersistence orgObjectMeasurePersistence) { this.orgObjectMeasurePersistence = orgObjectMeasurePersistence; } public OrgObjectTargetsLocalService getOrgObjectTargetsLocalService() { return orgObjectTargetsLocalService; } public void setOrgObjectTargetsLocalService( OrgObjectTargetsLocalService orgObjectTargetsLocalService) { this.orgObjectTargetsLocalService = orgObjectTargetsLocalService; } public OrgObjectTargetsService getOrgObjectTargetsService() { return orgObjectTargetsService; } public void setOrgObjectTargetsService( OrgObjectTargetsService orgObjectTargetsService) { this.orgObjectTargetsService = orgObjectTargetsService; } public OrgObjectTargetsPersistence getOrgObjectTargetsPersistence() { return orgObjectTargetsPersistence; } public void setOrgObjectTargetsPersistence( OrgObjectTargetsPersistence orgObjectTargetsPersistence) { this.orgObjectTargetsPersistence = orgObjectTargetsPersistence; } public ProgatePortalMenuLocalService getProgatePortalMenuLocalService() { return progatePortalMenuLocalService; } public void setProgatePortalMenuLocalService( ProgatePortalMenuLocalService progatePortalMenuLocalService) { this.progatePortalMenuLocalService = progatePortalMenuLocalService; } public ProgatePortalMenuService getProgatePortalMenuService() { return progatePortalMenuService; } public void setProgatePortalMenuService( ProgatePortalMenuService progatePortalMenuService) { this.progatePortalMenuService = progatePortalMenuService; } public ProgatePortalMenuPersistence getProgatePortalMenuPersistence() { return progatePortalMenuPersistence; } public void setProgatePortalMenuPersistence( ProgatePortalMenuPersistence progatePortalMenuPersistence) { this.progatePortalMenuPersistence = progatePortalMenuPersistence; } public ProGateRolesLocalService getProGateRolesLocalService() { return proGateRolesLocalService; } public void setProGateRolesLocalService( ProGateRolesLocalService proGateRolesLocalService) { this.proGateRolesLocalService = proGateRolesLocalService; } public ProGateRolesService getProGateRolesService() { return proGateRolesService; } public void setProGateRolesService(ProGateRolesService proGateRolesService) { this.proGateRolesService = proGateRolesService; } public ProGateRolesPersistence getProGateRolesPersistence() { return proGateRolesPersistence; } public void setProGateRolesPersistence( ProGateRolesPersistence proGateRolesPersistence) { this.proGateRolesPersistence = proGateRolesPersistence; } public ProGateOrgTypeLocalService getProGateOrgTypeLocalService() { return proGateOrgTypeLocalService; } public void setProGateOrgTypeLocalService( ProGateOrgTypeLocalService proGateOrgTypeLocalService) { this.proGateOrgTypeLocalService = proGateOrgTypeLocalService; } public ProGateOrgTypeService getProGateOrgTypeService() { return proGateOrgTypeService; } public void setProGateOrgTypeService( ProGateOrgTypeService proGateOrgTypeService) { this.proGateOrgTypeService = proGateOrgTypeService; } public ProGateOrgTypePersistence getProGateOrgTypePersistence() { return proGateOrgTypePersistence; } public void setProGateOrgTypePersistence( ProGateOrgTypePersistence proGateOrgTypePersistence) { this.proGateOrgTypePersistence = proGateOrgTypePersistence; } public ProGateJournalArticleLocalService getProGateJournalArticleLocalService() { return proGateJournalArticleLocalService; } public void setProGateJournalArticleLocalService( ProGateJournalArticleLocalService proGateJournalArticleLocalService) { this.proGateJournalArticleLocalService = proGateJournalArticleLocalService; } public ProGateJournalArticleService getProGateJournalArticleService() { return proGateJournalArticleService; } public void setProGateJournalArticleService( ProGateJournalArticleService proGateJournalArticleService) { this.proGateJournalArticleService = proGateJournalArticleService; } public ProGateJournalArticlePersistence getProGateJournalArticlePersistence() { return proGateJournalArticlePersistence; } public void setProGateJournalArticlePersistence( ProGateJournalArticlePersistence proGateJournalArticlePersistence) { this.proGateJournalArticlePersistence = proGateJournalArticlePersistence; } public ProGateProductsServicesLocalService getProGateProductsServicesLocalService() { return proGateProductsServicesLocalService; } public void setProGateProductsServicesLocalService( ProGateProductsServicesLocalService proGateProductsServicesLocalService) { this.proGateProductsServicesLocalService = proGateProductsServicesLocalService; } public ProGateProductsServicesService getProGateProductsServicesService() { return proGateProductsServicesService; } public void setProGateProductsServicesService( ProGateProductsServicesService proGateProductsServicesService) { this.proGateProductsServicesService = proGateProductsServicesService; } public ProGateProductsServicesPersistence getProGateProductsServicesPersistence() { return proGateProductsServicesPersistence; } public void setProGateProductsServicesPersistence( ProGateProductsServicesPersistence proGateProductsServicesPersistence) { this.proGateProductsServicesPersistence = proGateProductsServicesPersistence; } public ProGateCurrencyTypesLocalService getProGateCurrencyTypesLocalService() { return proGateCurrencyTypesLocalService; } public void setProGateCurrencyTypesLocalService( ProGateCurrencyTypesLocalService proGateCurrencyTypesLocalService) { this.proGateCurrencyTypesLocalService = proGateCurrencyTypesLocalService; } public ProGateCurrencyTypesService getProGateCurrencyTypesService() { return proGateCurrencyTypesService; } public void setProGateCurrencyTypesService( ProGateCurrencyTypesService proGateCurrencyTypesService) { this.proGateCurrencyTypesService = proGateCurrencyTypesService; } public ProGateCurrencyTypesPersistence getProGateCurrencyTypesPersistence() { return proGateCurrencyTypesPersistence; } public void setProGateCurrencyTypesPersistence( ProGateCurrencyTypesPersistence proGateCurrencyTypesPersistence) { this.proGateCurrencyTypesPersistence = proGateCurrencyTypesPersistence; } public ProGateJournalArticlePrioritiesLocalService getProGateJournalArticlePrioritiesLocalService() { return proGateJournalArticlePrioritiesLocalService; } public void setProGateJournalArticlePrioritiesLocalService( ProGateJournalArticlePrioritiesLocalService proGateJournalArticlePrioritiesLocalService) { this.proGateJournalArticlePrioritiesLocalService = proGateJournalArticlePrioritiesLocalService; } public ProGateJournalArticlePrioritiesService getProGateJournalArticlePrioritiesService() { return proGateJournalArticlePrioritiesService; } public void setProGateJournalArticlePrioritiesService( ProGateJournalArticlePrioritiesService proGateJournalArticlePrioritiesService) { this.proGateJournalArticlePrioritiesService = proGateJournalArticlePrioritiesService; } public ProGateJournalArticlePrioritiesPersistence getProGateJournalArticlePrioritiesPersistence() { return proGateJournalArticlePrioritiesPersistence; } public void setProGateJournalArticlePrioritiesPersistence( ProGateJournalArticlePrioritiesPersistence proGateJournalArticlePrioritiesPersistence) { this.proGateJournalArticlePrioritiesPersistence = proGateJournalArticlePrioritiesPersistence; } public ProGateJournalArticleTypesLocalService getProGateJournalArticleTypesLocalService() { return proGateJournalArticleTypesLocalService; } public void setProGateJournalArticleTypesLocalService( ProGateJournalArticleTypesLocalService proGateJournalArticleTypesLocalService) { this.proGateJournalArticleTypesLocalService = proGateJournalArticleTypesLocalService; } public ProGateJournalArticleTypesService getProGateJournalArticleTypesService() { return proGateJournalArticleTypesService; } public void setProGateJournalArticleTypesService( ProGateJournalArticleTypesService proGateJournalArticleTypesService) { this.proGateJournalArticleTypesService = proGateJournalArticleTypesService; } public ProGateJournalArticleTypesPersistence getProGateJournalArticleTypesPersistence() { return proGateJournalArticleTypesPersistence; } public void setProGateJournalArticleTypesPersistence( ProGateJournalArticleTypesPersistence proGateJournalArticleTypesPersistence) { this.proGateJournalArticleTypesPersistence = proGateJournalArticleTypesPersistence; } public RegionLocalService getRegionLocalService() { return regionLocalService; } public void setRegionLocalService(RegionLocalService regionLocalService) { this.regionLocalService = regionLocalService; } public RegionService getRegionService() { return regionService; } public void setRegionService(RegionService regionService) { this.regionService = regionService; } public RegionPersistence getRegionPersistence() { return regionPersistence; } public void setRegionPersistence(RegionPersistence regionPersistence) { this.regionPersistence = regionPersistence; } public CountryLocalService getCountryLocalService() { return countryLocalService; } public void setCountryLocalService(CountryLocalService countryLocalService) { this.countryLocalService = countryLocalService; } public CountryService getCountryService() { return countryService; } public void setCountryService(CountryService countryService) { this.countryService = countryService; } public CountryPersistence getCountryPersistence() { return countryPersistence; } public void setCountryPersistence(CountryPersistence countryPersistence) { this.countryPersistence = countryPersistence; } public ProGateJournalArticleViewLocalService getProGateJournalArticleViewLocalService() { return proGateJournalArticleViewLocalService; } public void setProGateJournalArticleViewLocalService( ProGateJournalArticleViewLocalService proGateJournalArticleViewLocalService) { this.proGateJournalArticleViewLocalService = proGateJournalArticleViewLocalService; } public ProGateJournalArticleViewService getProGateJournalArticleViewService() { return proGateJournalArticleViewService; } public void setProGateJournalArticleViewService( ProGateJournalArticleViewService proGateJournalArticleViewService) { this.proGateJournalArticleViewService = proGateJournalArticleViewService; } public ProGateJournalArticleViewPersistence getProGateJournalArticleViewPersistence() { return proGateJournalArticleViewPersistence; } public void setProGateJournalArticleViewPersistence( ProGateJournalArticleViewPersistence proGateJournalArticleViewPersistence) { this.proGateJournalArticleViewPersistence = proGateJournalArticleViewPersistence; } public ProGateJournalArticleSlideShowLocalService getProGateJournalArticleSlideShowLocalService() { return proGateJournalArticleSlideShowLocalService; } public void setProGateJournalArticleSlideShowLocalService( ProGateJournalArticleSlideShowLocalService proGateJournalArticleSlideShowLocalService) { this.proGateJournalArticleSlideShowLocalService = proGateJournalArticleSlideShowLocalService; } public ProGateJournalArticleSlideShowService getProGateJournalArticleSlideShowService() { return proGateJournalArticleSlideShowService; } public void setProGateJournalArticleSlideShowService( ProGateJournalArticleSlideShowService proGateJournalArticleSlideShowService) { this.proGateJournalArticleSlideShowService = proGateJournalArticleSlideShowService; } public ProGateJournalArticleSlideShowPersistence getProGateJournalArticleSlideShowPersistence() { return proGateJournalArticleSlideShowPersistence; } public void setProGateJournalArticleSlideShowPersistence( ProGateJournalArticleSlideShowPersistence proGateJournalArticleSlideShowPersistence) { this.proGateJournalArticleSlideShowPersistence = proGateJournalArticleSlideShowPersistence; } public ProGateOrgCustomerLocalService getProGateOrgCustomerLocalService() { return proGateOrgCustomerLocalService; } public void setProGateOrgCustomerLocalService( ProGateOrgCustomerLocalService proGateOrgCustomerLocalService) { this.proGateOrgCustomerLocalService = proGateOrgCustomerLocalService; } public ProGateOrgCustomerService getProGateOrgCustomerService() { return proGateOrgCustomerService; } public void setProGateOrgCustomerService( ProGateOrgCustomerService proGateOrgCustomerService) { this.proGateOrgCustomerService = proGateOrgCustomerService; } public ProGateOrgCustomerPersistence getProGateOrgCustomerPersistence() { return proGateOrgCustomerPersistence; } public void setProGateOrgCustomerPersistence( ProGateOrgCustomerPersistence proGateOrgCustomerPersistence) { this.proGateOrgCustomerPersistence = proGateOrgCustomerPersistence; } public ProGateOrgCustomerRepresenterLocalService getProGateOrgCustomerRepresenterLocalService() { return proGateOrgCustomerRepresenterLocalService; } public void setProGateOrgCustomerRepresenterLocalService( ProGateOrgCustomerRepresenterLocalService proGateOrgCustomerRepresenterLocalService) { this.proGateOrgCustomerRepresenterLocalService = proGateOrgCustomerRepresenterLocalService; } public ProGateOrgCustomerRepresenterService getProGateOrgCustomerRepresenterService() { return proGateOrgCustomerRepresenterService; } public void setProGateOrgCustomerRepresenterService( ProGateOrgCustomerRepresenterService proGateOrgCustomerRepresenterService) { this.proGateOrgCustomerRepresenterService = proGateOrgCustomerRepresenterService; } public ProGateOrgCustomerRepresenterPersistence getProGateOrgCustomerRepresenterPersistence() { return proGateOrgCustomerRepresenterPersistence; } public void setProGateOrgCustomerRepresenterPersistence( ProGateOrgCustomerRepresenterPersistence proGateOrgCustomerRepresenterPersistence) { this.proGateOrgCustomerRepresenterPersistence = proGateOrgCustomerRepresenterPersistence; } public ProGateApplicationsLocalService getProGateApplicationsLocalService() { return proGateApplicationsLocalService; } public void setProGateApplicationsLocalService( ProGateApplicationsLocalService proGateApplicationsLocalService) { this.proGateApplicationsLocalService = proGateApplicationsLocalService; } public ProGateApplicationsService getProGateApplicationsService() { return proGateApplicationsService; } public void setProGateApplicationsService( ProGateApplicationsService proGateApplicationsService) { this.proGateApplicationsService = proGateApplicationsService; } public ProGateApplicationsPersistence getProGateApplicationsPersistence() { return proGateApplicationsPersistence; } public void setProGateApplicationsPersistence( ProGateApplicationsPersistence proGateApplicationsPersistence) { this.proGateApplicationsPersistence = proGateApplicationsPersistence; } public ProGateUserApplicationsLocalService getProGateUserApplicationsLocalService() { return proGateUserApplicationsLocalService; } public void setProGateUserApplicationsLocalService( ProGateUserApplicationsLocalService proGateUserApplicationsLocalService) { this.proGateUserApplicationsLocalService = proGateUserApplicationsLocalService; } public ProGateUserApplicationsService getProGateUserApplicationsService() { return proGateUserApplicationsService; } public void setProGateUserApplicationsService( ProGateUserApplicationsService proGateUserApplicationsService) { this.proGateUserApplicationsService = proGateUserApplicationsService; } public ProGateUserApplicationsPersistence getProGateUserApplicationsPersistence() { return proGateUserApplicationsPersistence; } public void setProGateUserApplicationsPersistence( ProGateUserApplicationsPersistence proGateUserApplicationsPersistence) { this.proGateUserApplicationsPersistence = proGateUserApplicationsPersistence; } public ProgateOrganizationParticipantsLocalService getProgateOrganizationParticipantsLocalService() { return progateOrganizationParticipantsLocalService; } public void setProgateOrganizationParticipantsLocalService( ProgateOrganizationParticipantsLocalService progateOrganizationParticipantsLocalService) { this.progateOrganizationParticipantsLocalService = progateOrganizationParticipantsLocalService; } public ProgateOrganizationParticipantsService getProgateOrganizationParticipantsService() { return progateOrganizationParticipantsService; } public void setProgateOrganizationParticipantsService( ProgateOrganizationParticipantsService progateOrganizationParticipantsService) { this.progateOrganizationParticipantsService = progateOrganizationParticipantsService; } public ProgateOrganizationParticipantsPersistence getProgateOrganizationParticipantsPersistence() { return progateOrganizationParticipantsPersistence; } public void setProgateOrganizationParticipantsPersistence( ProgateOrganizationParticipantsPersistence progateOrganizationParticipantsPersistence) { this.progateOrganizationParticipantsPersistence = progateOrganizationParticipantsPersistence; } public ProgateOrganizationsStaffsLocalService getProgateOrganizationsStaffsLocalService() { return progateOrganizationsStaffsLocalService; } public void setProgateOrganizationsStaffsLocalService( ProgateOrganizationsStaffsLocalService progateOrganizationsStaffsLocalService) { this.progateOrganizationsStaffsLocalService = progateOrganizationsStaffsLocalService; } public ProgateOrganizationsStaffsService getProgateOrganizationsStaffsService() { return progateOrganizationsStaffsService; } public void setProgateOrganizationsStaffsService( ProgateOrganizationsStaffsService progateOrganizationsStaffsService) { this.progateOrganizationsStaffsService = progateOrganizationsStaffsService; } public ProgateOrganizationsStaffsPersistence getProgateOrganizationsStaffsPersistence() { return progateOrganizationsStaffsPersistence; } public void setProgateOrganizationsStaffsPersistence( ProgateOrganizationsStaffsPersistence progateOrganizationsStaffsPersistence) { this.progateOrganizationsStaffsPersistence = progateOrganizationsStaffsPersistence; } public ProgateOrganizationsStaffsFinder getProgateOrganizationsStaffsFinder() { return progateOrganizationsStaffsFinder; } public void setProgateOrganizationsStaffsFinder( ProgateOrganizationsStaffsFinder progateOrganizationsStaffsFinder) { this.progateOrganizationsStaffsFinder = progateOrganizationsStaffsFinder; } public ProgateApplicationsSettingLocalService getProgateApplicationsSettingLocalService() { return progateApplicationsSettingLocalService; } public void setProgateApplicationsSettingLocalService( ProgateApplicationsSettingLocalService progateApplicationsSettingLocalService) { this.progateApplicationsSettingLocalService = progateApplicationsSettingLocalService; } public ProgateApplicationsSettingService getProgateApplicationsSettingService() { return progateApplicationsSettingService; } public void setProgateApplicationsSettingService( ProgateApplicationsSettingService progateApplicationsSettingService) { this.progateApplicationsSettingService = progateApplicationsSettingService; } public ProgateApplicationsSettingPersistence getProgateApplicationsSettingPersistence() { return progateApplicationsSettingPersistence; } public void setProgateApplicationsSettingPersistence( ProgateApplicationsSettingPersistence progateApplicationsSettingPersistence) { this.progateApplicationsSettingPersistence = progateApplicationsSettingPersistence; } public ProgateMenusLocalService getProgateMenusLocalService() { return progateMenusLocalService; } public void setProgateMenusLocalService( ProgateMenusLocalService progateMenusLocalService) { this.progateMenusLocalService = progateMenusLocalService; } public ProgateMenusPersistence getProgateMenusPersistence() { return progateMenusPersistence; } public void setProgateMenusPersistence( ProgateMenusPersistence progateMenusPersistence) { this.progateMenusPersistence = progateMenusPersistence; } public ProgateLayoutsRolesLocalService getProgateLayoutsRolesLocalService() { return progateLayoutsRolesLocalService; } public void setProgateLayoutsRolesLocalService( ProgateLayoutsRolesLocalService progateLayoutsRolesLocalService) { this.progateLayoutsRolesLocalService = progateLayoutsRolesLocalService; } public ProgateLayoutsRolesService getProgateLayoutsRolesService() { return progateLayoutsRolesService; } public void setProgateLayoutsRolesService( ProgateLayoutsRolesService progateLayoutsRolesService) { this.progateLayoutsRolesService = progateLayoutsRolesService; } public ProgateLayoutsRolesPersistence getProgateLayoutsRolesPersistence() { return progateLayoutsRolesPersistence; } public void setProgateLayoutsRolesPersistence( ProgateLayoutsRolesPersistence progateLayoutsRolesPersistence) { this.progateLayoutsRolesPersistence = progateLayoutsRolesPersistence; } public ProgateLayoutsMenusLocalService getProgateLayoutsMenusLocalService() { return progateLayoutsMenusLocalService; } public void setProgateLayoutsMenusLocalService( ProgateLayoutsMenusLocalService progateLayoutsMenusLocalService) { this.progateLayoutsMenusLocalService = progateLayoutsMenusLocalService; } public ProgateLayoutsMenusService getProgateLayoutsMenusService() { return progateLayoutsMenusService; } public void setProgateLayoutsMenusService( ProgateLayoutsMenusService progateLayoutsMenusService) { this.progateLayoutsMenusService = progateLayoutsMenusService; } public ProgateLayoutsMenusPersistence getProgateLayoutsMenusPersistence() { return progateLayoutsMenusPersistence; } public void setProgateLayoutsMenusPersistence( ProgateLayoutsMenusPersistence progateLayoutsMenusPersistence) { this.progateLayoutsMenusPersistence = progateLayoutsMenusPersistence; } public ProGateMenuViewLocalService getProGateMenuViewLocalService() { return proGateMenuViewLocalService; } public void setProGateMenuViewLocalService( ProGateMenuViewLocalService proGateMenuViewLocalService) { this.proGateMenuViewLocalService = proGateMenuViewLocalService; } public ProGateMenuViewService getProGateMenuViewService() { return proGateMenuViewService; } public void setProGateMenuViewService( ProGateMenuViewService proGateMenuViewService) { this.proGateMenuViewService = proGateMenuViewService; } public ProGateMenuViewPersistence getProGateMenuViewPersistence() { return proGateMenuViewPersistence; } public void setProGateMenuViewPersistence( ProGateMenuViewPersistence proGateMenuViewPersistence) { this.proGateMenuViewPersistence = proGateMenuViewPersistence; } public ProGateOrgsUsersPermissionsLocalService getProGateOrgsUsersPermissionsLocalService() { return proGateOrgsUsersPermissionsLocalService; } public void setProGateOrgsUsersPermissionsLocalService( ProGateOrgsUsersPermissionsLocalService proGateOrgsUsersPermissionsLocalService) { this.proGateOrgsUsersPermissionsLocalService = proGateOrgsUsersPermissionsLocalService; } public ProGateOrgsUsersPermissionsService getProGateOrgsUsersPermissionsService() { return proGateOrgsUsersPermissionsService; } public void setProGateOrgsUsersPermissionsService( ProGateOrgsUsersPermissionsService proGateOrgsUsersPermissionsService) { this.proGateOrgsUsersPermissionsService = proGateOrgsUsersPermissionsService; } public ProGateOrgsUsersPermissionsPersistence getProGateOrgsUsersPermissionsPersistence() { return proGateOrgsUsersPermissionsPersistence; } public void setProGateOrgsUsersPermissionsPersistence( ProGateOrgsUsersPermissionsPersistence proGateOrgsUsersPermissionsPersistence) { this.proGateOrgsUsersPermissionsPersistence = proGateOrgsUsersPermissionsPersistence; } public ProGateOrgsUsersPermissionsFinder getProGateOrgsUsersPermissionsFinder() { return proGateOrgsUsersPermissionsFinder; } public void setProGateOrgsUsersPermissionsFinder( ProGateOrgsUsersPermissionsFinder proGateOrgsUsersPermissionsFinder) { this.proGateOrgsUsersPermissionsFinder = proGateOrgsUsersPermissionsFinder; } public ProGatePermissionsLocalService getProGatePermissionsLocalService() { return proGatePermissionsLocalService; } public void setProGatePermissionsLocalService( ProGatePermissionsLocalService proGatePermissionsLocalService) { this.proGatePermissionsLocalService = proGatePermissionsLocalService; } public ProGatePermissionsService getProGatePermissionsService() { return proGatePermissionsService; } public void setProGatePermissionsService( ProGatePermissionsService proGatePermissionsService) { this.proGatePermissionsService = proGatePermissionsService; } public ProGatePermissionsPersistence getProGatePermissionsPersistence() { return proGatePermissionsPersistence; } public void setProGatePermissionsPersistence( ProGatePermissionsPersistence proGatePermissionsPersistence) { this.proGatePermissionsPersistence = proGatePermissionsPersistence; } public ViewOrgUsersPermissionsLocalService getViewOrgUsersPermissionsLocalService() { return viewOrgUsersPermissionsLocalService; } public void setViewOrgUsersPermissionsLocalService( ViewOrgUsersPermissionsLocalService viewOrgUsersPermissionsLocalService) { this.viewOrgUsersPermissionsLocalService = viewOrgUsersPermissionsLocalService; } public ViewOrgUsersPermissionsService getViewOrgUsersPermissionsService() { return viewOrgUsersPermissionsService; } public void setViewOrgUsersPermissionsService( ViewOrgUsersPermissionsService viewOrgUsersPermissionsService) { this.viewOrgUsersPermissionsService = viewOrgUsersPermissionsService; } public ViewOrgUsersPermissionsPersistence getViewOrgUsersPermissionsPersistence() { return viewOrgUsersPermissionsPersistence; } public void setViewOrgUsersPermissionsPersistence( ViewOrgUsersPermissionsPersistence viewOrgUsersPermissionsPersistence) { this.viewOrgUsersPermissionsPersistence = viewOrgUsersPermissionsPersistence; } public ViewOrgUsersPermissionsFinder getViewOrgUsersPermissionsFinder() { return viewOrgUsersPermissionsFinder; } public void setViewOrgUsersPermissionsFinder( ViewOrgUsersPermissionsFinder viewOrgUsersPermissionsFinder) { this.viewOrgUsersPermissionsFinder = viewOrgUsersPermissionsFinder; } public ViewProGatePermissionsRolesLocalService getViewProGatePermissionsRolesLocalService() { return viewProGatePermissionsRolesLocalService; } public void setViewProGatePermissionsRolesLocalService( ViewProGatePermissionsRolesLocalService viewProGatePermissionsRolesLocalService) { this.viewProGatePermissionsRolesLocalService = viewProGatePermissionsRolesLocalService; } public ViewProGatePermissionsRolesService getViewProGatePermissionsRolesService() { return viewProGatePermissionsRolesService; } public void setViewProGatePermissionsRolesService( ViewProGatePermissionsRolesService viewProGatePermissionsRolesService) { this.viewProGatePermissionsRolesService = viewProGatePermissionsRolesService; } public ViewProGatePermissionsRolesPersistence getViewProGatePermissionsRolesPersistence() { return viewProGatePermissionsRolesPersistence; } public void setViewProGatePermissionsRolesPersistence( ViewProGatePermissionsRolesPersistence viewProGatePermissionsRolesPersistence) { this.viewProGatePermissionsRolesPersistence = viewProGatePermissionsRolesPersistence; } public ViewProGatePermissionsRolesFinder getViewProGatePermissionsRolesFinder() { return viewProGatePermissionsRolesFinder; } public void setViewProGatePermissionsRolesFinder( ViewProGatePermissionsRolesFinder viewProGatePermissionsRolesFinder) { this.viewProGatePermissionsRolesFinder = viewProGatePermissionsRolesFinder; } protected void runSQL(String sql) throws SystemException { try { PortalUtil.runSQL(sql); } catch (Exception e) { throw new SystemException(e); } } @BeanReference(name = "larion.progate.service.UserLocalService.impl") protected UserLocalService userLocalService; @BeanReference(name = "larion.progate.service.UserService.impl") protected UserService userService; @BeanReference(name = "larion.progate.service.persistence.UserPersistence.impl") protected UserPersistence userPersistence; @BeanReference(name = "larion.progate.service.persistence.UserFinder.impl") protected UserFinder userFinder; @BeanReference(name = "larion.progate.service.UserInformationViewLocalService.impl") protected UserInformationViewLocalService userInformationViewLocalService; @BeanReference(name = "larion.progate.service.UserInformationViewService.impl") protected UserInformationViewService userInformationViewService; @BeanReference(name = "larion.progate.service.persistence.UserInformationViewPersistence.impl") protected UserInformationViewPersistence userInformationViewPersistence; @BeanReference(name = "larion.progate.service.persistence.UserInformationViewFinder.impl") protected UserInformationViewFinder userInformationViewFinder; @BeanReference(name = "larion.progate.service.OrganizationLocalService.impl") protected OrganizationLocalService organizationLocalService; @BeanReference(name = "larion.progate.service.OrganizationService.impl") protected OrganizationService organizationService; @BeanReference(name = "larion.progate.service.persistence.OrganizationPersistence.impl") protected OrganizationPersistence organizationPersistence; @BeanReference(name = "larion.progate.service.persistence.OrganizationFinder.impl") protected OrganizationFinder organizationFinder; @BeanReference(name = "larion.progate.service.OrganizationViewLocalService.impl") protected OrganizationViewLocalService organizationViewLocalService; @BeanReference(name = "larion.progate.service.OrganizationViewService.impl") protected OrganizationViewService organizationViewService; @BeanReference(name = "larion.progate.service.persistence.OrganizationViewPersistence.impl") protected OrganizationViewPersistence organizationViewPersistence; @BeanReference(name = "larion.progate.service.OrgObjectListLocalService.impl") protected OrgObjectListLocalService orgObjectListLocalService; @BeanReference(name = "larion.progate.service.OrgObjectListService.impl") protected OrgObjectListService orgObjectListService; @BeanReference(name = "larion.progate.service.persistence.OrgObjectListPersistence.impl") protected OrgObjectListPersistence orgObjectListPersistence; @BeanReference(name = "larion.progate.service.OrgObjectApprovalLocalService.impl") protected OrgObjectApprovalLocalService orgObjectApprovalLocalService; @BeanReference(name = "larion.progate.service.OrgObjectApprovalService.impl") protected OrgObjectApprovalService orgObjectApprovalService; @BeanReference(name = "larion.progate.service.persistence.OrgObjectApprovalPersistence.impl") protected OrgObjectApprovalPersistence orgObjectApprovalPersistence; @BeanReference(name = "larion.progate.service.OrgObjectPerspectiveLocalService.impl") protected OrgObjectPerspectiveLocalService orgObjectPerspectiveLocalService; @BeanReference(name = "larion.progate.service.OrgObjectPerspectiveService.impl") protected OrgObjectPerspectiveService orgObjectPerspectiveService; @BeanReference(name = "larion.progate.service.persistence.OrgObjectPerspectivePersistence.impl") protected OrgObjectPerspectivePersistence orgObjectPerspectivePersistence; @BeanReference(name = "larion.progate.service.OrgObjectObjectiveLocalService.impl") protected OrgObjectObjectiveLocalService orgObjectObjectiveLocalService; @BeanReference(name = "larion.progate.service.OrgObjectObjectiveService.impl") protected OrgObjectObjectiveService orgObjectObjectiveService; @BeanReference(name = "larion.progate.service.persistence.OrgObjectObjectivePersistence.impl") protected OrgObjectObjectivePersistence orgObjectObjectivePersistence; @BeanReference(name = "larion.progate.service.OrgObjectMeasureLocalService.impl") protected OrgObjectMeasureLocalService orgObjectMeasureLocalService; @BeanReference(name = "larion.progate.service.OrgObjectMeasureService.impl") protected OrgObjectMeasureService orgObjectMeasureService; @BeanReference(name = "larion.progate.service.persistence.OrgObjectMeasurePersistence.impl") protected OrgObjectMeasurePersistence orgObjectMeasurePersistence; @BeanReference(name = "larion.progate.service.OrgObjectTargetsLocalService.impl") protected OrgObjectTargetsLocalService orgObjectTargetsLocalService; @BeanReference(name = "larion.progate.service.OrgObjectTargetsService.impl") protected OrgObjectTargetsService orgObjectTargetsService; @BeanReference(name = "larion.progate.service.persistence.OrgObjectTargetsPersistence.impl") protected OrgObjectTargetsPersistence orgObjectTargetsPersistence; @BeanReference(name = "larion.progate.service.ProgatePortalMenuLocalService.impl") protected ProgatePortalMenuLocalService progatePortalMenuLocalService; @BeanReference(name = "larion.progate.service.ProgatePortalMenuService.impl") protected ProgatePortalMenuService progatePortalMenuService; @BeanReference(name = "larion.progate.service.persistence.ProgatePortalMenuPersistence.impl") protected ProgatePortalMenuPersistence progatePortalMenuPersistence; @BeanReference(name = "larion.progate.service.ProGateRolesLocalService.impl") protected ProGateRolesLocalService proGateRolesLocalService; @BeanReference(name = "larion.progate.service.ProGateRolesService.impl") protected ProGateRolesService proGateRolesService; @BeanReference(name = "larion.progate.service.persistence.ProGateRolesPersistence.impl") protected ProGateRolesPersistence proGateRolesPersistence; @BeanReference(name = "larion.progate.service.ProGateOrgTypeLocalService.impl") protected ProGateOrgTypeLocalService proGateOrgTypeLocalService; @BeanReference(name = "larion.progate.service.ProGateOrgTypeService.impl") protected ProGateOrgTypeService proGateOrgTypeService; @BeanReference(name = "larion.progate.service.persistence.ProGateOrgTypePersistence.impl") protected ProGateOrgTypePersistence proGateOrgTypePersistence; @BeanReference(name = "larion.progate.service.ProGateJournalArticleLocalService.impl") protected ProGateJournalArticleLocalService proGateJournalArticleLocalService; @BeanReference(name = "larion.progate.service.ProGateJournalArticleService.impl") protected ProGateJournalArticleService proGateJournalArticleService; @BeanReference(name = "larion.progate.service.persistence.ProGateJournalArticlePersistence.impl") protected ProGateJournalArticlePersistence proGateJournalArticlePersistence; @BeanReference(name = "larion.progate.service.ProGateProductsServicesLocalService.impl") protected ProGateProductsServicesLocalService proGateProductsServicesLocalService; @BeanReference(name = "larion.progate.service.ProGateProductsServicesService.impl") protected ProGateProductsServicesService proGateProductsServicesService; @BeanReference(name = "larion.progate.service.persistence.ProGateProductsServicesPersistence.impl") protected ProGateProductsServicesPersistence proGateProductsServicesPersistence; @BeanReference(name = "larion.progate.service.ProGateCurrencyTypesLocalService.impl") protected ProGateCurrencyTypesLocalService proGateCurrencyTypesLocalService; @BeanReference(name = "larion.progate.service.ProGateCurrencyTypesService.impl") protected ProGateCurrencyTypesService proGateCurrencyTypesService; @BeanReference(name = "larion.progate.service.persistence.ProGateCurrencyTypesPersistence.impl") protected ProGateCurrencyTypesPersistence proGateCurrencyTypesPersistence; @BeanReference(name = "larion.progate.service.ProGateJournalArticlePrioritiesLocalService.impl") protected ProGateJournalArticlePrioritiesLocalService proGateJournalArticlePrioritiesLocalService; @BeanReference(name = "larion.progate.service.ProGateJournalArticlePrioritiesService.impl") protected ProGateJournalArticlePrioritiesService proGateJournalArticlePrioritiesService; @BeanReference(name = "larion.progate.service.persistence.ProGateJournalArticlePrioritiesPersistence.impl") protected ProGateJournalArticlePrioritiesPersistence proGateJournalArticlePrioritiesPersistence; @BeanReference(name = "larion.progate.service.ProGateJournalArticleTypesLocalService.impl") protected ProGateJournalArticleTypesLocalService proGateJournalArticleTypesLocalService; @BeanReference(name = "larion.progate.service.ProGateJournalArticleTypesService.impl") protected ProGateJournalArticleTypesService proGateJournalArticleTypesService; @BeanReference(name = "larion.progate.service.persistence.ProGateJournalArticleTypesPersistence.impl") protected ProGateJournalArticleTypesPersistence proGateJournalArticleTypesPersistence; @BeanReference(name = "larion.progate.service.RegionLocalService.impl") protected RegionLocalService regionLocalService; @BeanReference(name = "larion.progate.service.RegionService.impl") protected RegionService regionService; @BeanReference(name = "larion.progate.service.persistence.RegionPersistence.impl") protected RegionPersistence regionPersistence; @BeanReference(name = "larion.progate.service.CountryLocalService.impl") protected CountryLocalService countryLocalService; @BeanReference(name = "larion.progate.service.CountryService.impl") protected CountryService countryService; @BeanReference(name = "larion.progate.service.persistence.CountryPersistence.impl") protected CountryPersistence countryPersistence; @BeanReference(name = "larion.progate.service.ProGateJournalArticleViewLocalService.impl") protected ProGateJournalArticleViewLocalService proGateJournalArticleViewLocalService; @BeanReference(name = "larion.progate.service.ProGateJournalArticleViewService.impl") protected ProGateJournalArticleViewService proGateJournalArticleViewService; @BeanReference(name = "larion.progate.service.persistence.ProGateJournalArticleViewPersistence.impl") protected ProGateJournalArticleViewPersistence proGateJournalArticleViewPersistence; @BeanReference(name = "larion.progate.service.ProGateJournalArticleSlideShowLocalService.impl") protected ProGateJournalArticleSlideShowLocalService proGateJournalArticleSlideShowLocalService; @BeanReference(name = "larion.progate.service.ProGateJournalArticleSlideShowService.impl") protected ProGateJournalArticleSlideShowService proGateJournalArticleSlideShowService; @BeanReference(name = "larion.progate.service.persistence.ProGateJournalArticleSlideShowPersistence.impl") protected ProGateJournalArticleSlideShowPersistence proGateJournalArticleSlideShowPersistence; @BeanReference(name = "larion.progate.service.ProGateOrgCustomerLocalService.impl") protected ProGateOrgCustomerLocalService proGateOrgCustomerLocalService; @BeanReference(name = "larion.progate.service.ProGateOrgCustomerService.impl") protected ProGateOrgCustomerService proGateOrgCustomerService; @BeanReference(name = "larion.progate.service.persistence.ProGateOrgCustomerPersistence.impl") protected ProGateOrgCustomerPersistence proGateOrgCustomerPersistence; @BeanReference(name = "larion.progate.service.ProGateOrgCustomerRepresenterLocalService.impl") protected ProGateOrgCustomerRepresenterLocalService proGateOrgCustomerRepresenterLocalService; @BeanReference(name = "larion.progate.service.ProGateOrgCustomerRepresenterService.impl") protected ProGateOrgCustomerRepresenterService proGateOrgCustomerRepresenterService; @BeanReference(name = "larion.progate.service.persistence.ProGateOrgCustomerRepresenterPersistence.impl") protected ProGateOrgCustomerRepresenterPersistence proGateOrgCustomerRepresenterPersistence; @BeanReference(name = "larion.progate.service.ProGateApplicationsLocalService.impl") protected ProGateApplicationsLocalService proGateApplicationsLocalService; @BeanReference(name = "larion.progate.service.ProGateApplicationsService.impl") protected ProGateApplicationsService proGateApplicationsService; @BeanReference(name = "larion.progate.service.persistence.ProGateApplicationsPersistence.impl") protected ProGateApplicationsPersistence proGateApplicationsPersistence; @BeanReference(name = "larion.progate.service.ProGateUserApplicationsLocalService.impl") protected ProGateUserApplicationsLocalService proGateUserApplicationsLocalService; @BeanReference(name = "larion.progate.service.ProGateUserApplicationsService.impl") protected ProGateUserApplicationsService proGateUserApplicationsService; @BeanReference(name = "larion.progate.service.persistence.ProGateUserApplicationsPersistence.impl") protected ProGateUserApplicationsPersistence proGateUserApplicationsPersistence; @BeanReference(name = "larion.progate.service.ProgateOrganizationParticipantsLocalService.impl") protected ProgateOrganizationParticipantsLocalService progateOrganizationParticipantsLocalService; @BeanReference(name = "larion.progate.service.ProgateOrganizationParticipantsService.impl") protected ProgateOrganizationParticipantsService progateOrganizationParticipantsService; @BeanReference(name = "larion.progate.service.persistence.ProgateOrganizationParticipantsPersistence.impl") protected ProgateOrganizationParticipantsPersistence progateOrganizationParticipantsPersistence; @BeanReference(name = "larion.progate.service.ProgateOrganizationsStaffsLocalService.impl") protected ProgateOrganizationsStaffsLocalService progateOrganizationsStaffsLocalService; @BeanReference(name = "larion.progate.service.ProgateOrganizationsStaffsService.impl") protected ProgateOrganizationsStaffsService progateOrganizationsStaffsService; @BeanReference(name = "larion.progate.service.persistence.ProgateOrganizationsStaffsPersistence.impl") protected ProgateOrganizationsStaffsPersistence progateOrganizationsStaffsPersistence; @BeanReference(name = "larion.progate.service.persistence.ProgateOrganizationsStaffsFinder.impl") protected ProgateOrganizationsStaffsFinder progateOrganizationsStaffsFinder; @BeanReference(name = "larion.progate.service.ProgateApplicationsSettingLocalService.impl") protected ProgateApplicationsSettingLocalService progateApplicationsSettingLocalService; @BeanReference(name = "larion.progate.service.ProgateApplicationsSettingService.impl") protected ProgateApplicationsSettingService progateApplicationsSettingService; @BeanReference(name = "larion.progate.service.persistence.ProgateApplicationsSettingPersistence.impl") protected ProgateApplicationsSettingPersistence progateApplicationsSettingPersistence; @BeanReference(name = "larion.progate.service.ProgateMenusLocalService.impl") protected ProgateMenusLocalService progateMenusLocalService; @BeanReference(name = "larion.progate.service.persistence.ProgateMenusPersistence.impl") protected ProgateMenusPersistence progateMenusPersistence; @BeanReference(name = "larion.progate.service.ProgateLayoutsRolesLocalService.impl") protected ProgateLayoutsRolesLocalService progateLayoutsRolesLocalService; @BeanReference(name = "larion.progate.service.ProgateLayoutsRolesService.impl") protected ProgateLayoutsRolesService progateLayoutsRolesService; @BeanReference(name = "larion.progate.service.persistence.ProgateLayoutsRolesPersistence.impl") protected ProgateLayoutsRolesPersistence progateLayoutsRolesPersistence; @BeanReference(name = "larion.progate.service.ProgateLayoutsMenusLocalService.impl") protected ProgateLayoutsMenusLocalService progateLayoutsMenusLocalService; @BeanReference(name = "larion.progate.service.ProgateLayoutsMenusService.impl") protected ProgateLayoutsMenusService progateLayoutsMenusService; @BeanReference(name = "larion.progate.service.persistence.ProgateLayoutsMenusPersistence.impl") protected ProgateLayoutsMenusPersistence progateLayoutsMenusPersistence; @BeanReference(name = "larion.progate.service.ProGateMenuViewLocalService.impl") protected ProGateMenuViewLocalService proGateMenuViewLocalService; @BeanReference(name = "larion.progate.service.ProGateMenuViewService.impl") protected ProGateMenuViewService proGateMenuViewService; @BeanReference(name = "larion.progate.service.persistence.ProGateMenuViewPersistence.impl") protected ProGateMenuViewPersistence proGateMenuViewPersistence; @BeanReference(name = "larion.progate.service.ProGateOrgsUsersPermissionsLocalService.impl") protected ProGateOrgsUsersPermissionsLocalService proGateOrgsUsersPermissionsLocalService; @BeanReference(name = "larion.progate.service.ProGateOrgsUsersPermissionsService.impl") protected ProGateOrgsUsersPermissionsService proGateOrgsUsersPermissionsService; @BeanReference(name = "larion.progate.service.persistence.ProGateOrgsUsersPermissionsPersistence.impl") protected ProGateOrgsUsersPermissionsPersistence proGateOrgsUsersPermissionsPersistence; @BeanReference(name = "larion.progate.service.persistence.ProGateOrgsUsersPermissionsFinder.impl") protected ProGateOrgsUsersPermissionsFinder proGateOrgsUsersPermissionsFinder; @BeanReference(name = "larion.progate.service.ProGatePermissionsLocalService.impl") protected ProGatePermissionsLocalService proGatePermissionsLocalService; @BeanReference(name = "larion.progate.service.ProGatePermissionsService.impl") protected ProGatePermissionsService proGatePermissionsService; @BeanReference(name = "larion.progate.service.persistence.ProGatePermissionsPersistence.impl") protected ProGatePermissionsPersistence proGatePermissionsPersistence; @BeanReference(name = "larion.progate.service.ViewOrgUsersPermissionsLocalService.impl") protected ViewOrgUsersPermissionsLocalService viewOrgUsersPermissionsLocalService; @BeanReference(name = "larion.progate.service.ViewOrgUsersPermissionsService.impl") protected ViewOrgUsersPermissionsService viewOrgUsersPermissionsService; @BeanReference(name = "larion.progate.service.persistence.ViewOrgUsersPermissionsPersistence.impl") protected ViewOrgUsersPermissionsPersistence viewOrgUsersPermissionsPersistence; @BeanReference(name = "larion.progate.service.persistence.ViewOrgUsersPermissionsFinder.impl") protected ViewOrgUsersPermissionsFinder viewOrgUsersPermissionsFinder; @BeanReference(name = "larion.progate.service.ViewProGatePermissionsRolesLocalService.impl") protected ViewProGatePermissionsRolesLocalService viewProGatePermissionsRolesLocalService; @BeanReference(name = "larion.progate.service.ViewProGatePermissionsRolesService.impl") protected ViewProGatePermissionsRolesService viewProGatePermissionsRolesService; @BeanReference(name = "larion.progate.service.persistence.ViewProGatePermissionsRolesPersistence.impl") protected ViewProGatePermissionsRolesPersistence viewProGatePermissionsRolesPersistence; @BeanReference(name = "larion.progate.service.persistence.ViewProGatePermissionsRolesFinder.impl") protected ViewProGatePermissionsRolesFinder viewProGatePermissionsRolesFinder; }
[ "tigerproand@gmail.com" ]
tigerproand@gmail.com
59261b2aed0bcf124755cd8199b8955ecedb9b53
9e820657fe9bd62d2f5165cfeb135249774fb7ee
/04. NestedConditionalStatements/Exercise/src/PointOnRectangleBorder.java
0e6985df016f60d08e26bbaaf218a44b05fc0ed5
[ "MIT" ]
permissive
bfartsov/java-basics
5ebdf2816a9fbd1dfba3ff7e96f93ec3159ebf17
30c68384a1658344939fd776b89ff1835f5fe680
refs/heads/master
2020-04-05T07:33:28.479305
2018-11-03T21:24:04
2018-11-03T21:24:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
751
java
import java.util.Scanner; public class PointOnRectangleBorder { public static void main(String[] args) { Scanner scan = new Scanner(System.in); double x1 = Double.parseDouble(scan.nextLine()); double y1 = Double.parseDouble(scan.nextLine()); double x2 = Double.parseDouble(scan.nextLine()); double y2 = Double.parseDouble(scan.nextLine()); double x = Double.parseDouble(scan.nextLine()); double y = Double.parseDouble(scan.nextLine()); if (((x == x1 || x == x2) && (y >= y1 && y <= y2)) || ((y == y1 || y == y2) && (x >= x1 && x <= x2))) { System.out.println("Border"); } else { System.out.println("Inside / Outside"); } } }
[ "ipetkow90@gmail.com" ]
ipetkow90@gmail.com
17423aaeb7054da31682ea383adf1cd9c8e0d07b
63375636a699a3c6574243db9dceccb1b1286634
/app/src/main/java/solonsky/signal/twitter/adapters/RemoveAdapter.java
32925eb2725a0b9126b3d94c27b176c15311e737
[]
no_license
AlexGladkov/Signal-Android
c1ca95ad584a8dcdc7d2006ade1df929c37e48fa
15e7202b7ef54e738629c3989a3ffd51337472f1
refs/heads/main
2023-06-21T14:17:10.719684
2021-07-09T07:26:35
2021-07-09T07:26:35
384,357,068
0
0
null
null
null
null
UTF-8
Java
false
false
2,239
java
package solonsky.signal.twitter.adapters; import android.content.Context; import android.databinding.DataBindingUtil; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; import solonsky.signal.twitter.databinding.CellRemoveBinding; import solonsky.signal.twitter.models.RemoveModel; /** * Created by neura on 26.05.17. */ public class RemoveAdapter extends RecyclerView.Adapter<RemoveAdapter.ViewHolder> { private final String TAG = "FEEDADAPTER"; private final ArrayList<RemoveModel> models; private final Context mContext; private final RemoveClickListener mClickHandler; public interface RemoveClickListener { void onDeleteClick(View view, RemoveModel removeModel); } public RemoveAdapter(ArrayList<RemoveModel> models, Context mContext, RemoveClickListener clickHandler) { this.models = models; this.mContext = mContext; this.mClickHandler = clickHandler; } @Override public RemoveAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { LayoutInflater inflater = LayoutInflater.from(parent.getContext()); CellRemoveBinding binding = CellRemoveBinding.inflate(inflater, parent, false); return new RemoveAdapter.ViewHolder(binding.getRoot()); } @Override public void onBindViewHolder(RemoveAdapter.ViewHolder holder, int position) { final RemoveModel model = models.get(position); holder.mBinding.setModel(model); holder.mBinding.setClick(new RemoveModel.RemoveClickHandler() { @Override public void onItemClick(View view) { } @Override public void onMinusClick(View view) { mClickHandler.onDeleteClick(view, model); } }); } @Override public int getItemCount() { return models.size(); } public static class ViewHolder extends RecyclerView.ViewHolder { CellRemoveBinding mBinding; public ViewHolder(View itemView) { super(itemView); mBinding = DataBindingUtil.bind(itemView); } } }
[ "bob298@yandex.ru" ]
bob298@yandex.ru
672e14d78672961bedd932893fdfaf776bc77ef6
ac726c6f7dd8c0f88c2840b32ed571ce8b447c9e
/src/main/java/net/binarypaper/springbootframework/entity/ActivatableEntity.java
61c0e90613e9536d7572110e98cf86c45419cf8d
[ "Apache-2.0" ]
permissive
binary-paper/spring-boot-framework
b9b100b20f5d4822840d2cc0b55529452940fc62
50fe3593e6517833669707552e97e3266beec793
refs/heads/master
2018-07-14T16:29:19.980790
2018-06-15T07:13:16
2018-06-15T07:13:16
105,872,679
1
0
null
null
null
null
UTF-8
Java
false
false
2,470
java
/* * Copyright 2016 <a href="mailto:willy.gadney@binarypaper.net">Willy Gadney</a>. * * 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 net.binarypaper.springbootframework.entity; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.persistence.Column; import javax.persistence.MappedSuperclass; import javax.validation.constraints.NotNull; import lombok.Data; import org.hibernate.envers.Audited; import net.binarypaper.springbootframework.exception.BusinessLogicException; /** * Abstract class that may be extended to make an entity class active or * inactive * * @author <a href="mailto:willy.gadney@binarypaper.net">Willy Gadney</a> */ // JPA annotations @MappedSuperclass // Envers annotations @Audited // Lombok annotations @Data public abstract class ActivatableEntity implements Serializable { private static final long serialVersionUID = -9222051304404254188L; // JPA annotations @Column(name = "ACTIVE") // Framework annotations @Updatable // Bean Validation annotations @NotNull(message = "{ActivatableEntity.active.NotNull}") // Jackson annotations @JsonProperty("active") // Swagger annotations @ApiModelProperty( value = "The active status of the entity", example = "true" ) private Boolean active; public static <T extends ActivatableEntity> List<T> filterByActiveStatus(List<T> inputList, Boolean active) throws BusinessLogicException { if (active == null) { return inputList; } List<T> outputList = new ArrayList<>(); for (T t : inputList) { if (t.getActive().equals(active)) { outputList.add(t); } } return outputList; } }
[ "WillyG@discovery.co.za" ]
WillyG@discovery.co.za
04309da501ab11ac3016fb90bf904d065a483542
a0c3aa81f13071928355346261bbdb50e0f94be0
/src/com/lingtong/annotation/Test.java
d593834aa34540071038a85f16ac0efa98a0873e
[]
no_license
wangliyue/AnnotationTest
0746814917f5353c5a7d2ff9de7d7ab439b6788a
69a8da70880eaefde6854eefc18344bc30081c79
refs/heads/master
2021-01-10T18:45:46.925464
2015-07-29T02:43:31
2015-07-29T02:43:31
39,867,335
0
0
null
null
null
null
GB18030
Java
false
false
456
java
package com.lingtong.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) //该注解在运行时起作用 @Target(ElementType.METHOD) //该注解作用在方法上 public @interface Test { //没有任何元素的注解称为标记注解 }
[ "1058101876@qq.com" ]
1058101876@qq.com
1dcb2e768d276417bcbea5ae63a9fc9b13e49f4f
1593dc12efb8d6df79fffa1246d602258dd15cc2
/app/src/main/java/edu/harvard/bwh/shafieelab/embryoimaging/samples/ui/LockableViewPager.java
6d38c01178c88655ea75bfe6b36e600ea54dacf3
[]
no_license
hemanthkandula/Embryo-Imaging-ShafieeLab
1d20e92959543c9b9ca9a749868286228f8c7544
707440ec10bb9fd70b6726ce29b21c4e4d0fd38d
refs/heads/master
2020-06-01T04:00:28.296207
2019-07-09T15:32:59
2019-07-09T15:32:59
190,625,364
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package edu.harvard.bwh.shafieelab.embryoimaging.samples.ui; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import androidx.viewpager.widget.ViewPager; public class LockableViewPager extends ViewPager { private boolean locked; public LockableViewPager(Context context) { super(context); } public LockableViewPager(Context context, AttributeSet attrs) { super(context, attrs); } @Override public boolean onInterceptTouchEvent(MotionEvent ev) { return !locked && super.onInterceptTouchEvent(ev); } public void setLocked(boolean locked) { this.locked = locked; } }
[ "hemanth.kandula@gmail.com" ]
hemanth.kandula@gmail.com
73a7bd7079726f4d551b42a799a1d03199bfd7a7
381154bd6dd2e24d9eb2977ff55ade5ed135206f
/src/BlockNumber.java
65cef5056ebb02b44799d82985419e2e8d7ba648
[]
no_license
mjpark03/acmicpc
c58288d4a26a78bc088f45dfb802e84a7bed9618
4a9d4a068cc6a88a39c0e6485696e9dfba6d63c9
refs/heads/master
2020-09-21T00:41:03.684450
2017-06-25T13:13:34
2017-06-25T13:13:34
66,764,839
0
0
null
null
null
null
UTF-8
Java
false
false
1,970
java
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; /** * Created by Rachel on 2016. 9. 24.. */ public class BlockNumber { static final int MAX = 26; static int[][] map = new int[MAX][MAX]; static int[][] visited = new int[MAX][MAX]; public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = Integer.parseInt(scan.nextLine()); for(int y=1; y<=n; y++) { int x = 1; String line = scan.nextLine(); for(int i=0; i<line.length(); i++) { map[y][x++] = Integer.parseInt("" + line.charAt(i)); } } List<Integer> countList = new ArrayList<>(); int totalCount = 0; for(int y=1; y<=n; y++) { for(int x=1; x<=n; x++) { if(visited[y][x]==0 && map[y][x]==1) { int count = dfs(y, x, 0, n); dfs(y, x, 1, n); countList.add(count); totalCount++; } } } Integer[] countArr = new Integer[countList.size()]; countArr = countList.toArray(countArr); Arrays.sort(countArr); System.out.println(totalCount); for(Integer count: countArr) { System.out.println(count); } } public static int dfs(int y, int x, int count, int n) { visited[y][x] = 1; count++; for(int i=-1; i<=1; i++) { for(int j=-1; j<=1; j++) { if(y+i>=1 && y+i<=n && x+j>=1 && x+j<=n) { if(visited[y+i][x]==0 && map[y+i][x]==1) { count = dfs(y+i, x, count, n); } if(visited[y][x+j]==0 && map[y][x+j]==1) { count = dfs(y, x+j, count, n); } } } } return count; } }
[ "mjpark03@gmail.com" ]
mjpark03@gmail.com
e8880125e6df75b6cf7ad36f82217b967a39d70d
30224212b84107957ddf2dbde7586508bb0172e7
/app/src/main/java/project/jerry/snapask/view/ElasticDragDismissRelativeLayout.java
4e5b56323a3f93ebaaf115767f0b24baf5fc0378
[]
no_license
JerryMig/TrialProject
863ee2c24883e1a8441b82fc33d8cd21d0e81805
77f579ecc82970675ed3bf76faf09cba494f654f
refs/heads/master
2021-01-20T14:39:06.948122
2018-02-15T09:51:18
2018-02-15T09:51:18
90,638,901
0
0
null
null
null
null
UTF-8
Java
false
false
8,495
java
package project.jerry.snapask.view; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.widget.RelativeLayout; import java.util.ArrayList; import java.util.List; import project.jerry.snapask.R; import project.jerry.snapask.util.AnimUtils; /** * Created by Migme_Jerry on 2017/5/25. */ public class ElasticDragDismissRelativeLayout extends RelativeLayout { private final static String TAG = "ElasticDragLayout"; // configurable attrs private float dragDismissDistance = Float.MAX_VALUE; private float dragDismissFraction = -1f; private float dragDismissScale = 1f; private boolean shouldScale = false; private float dragElacticity = 1f; // state private float totalDrag; private boolean draggingDown = false; private boolean draggingUp = false; private List<ElasticDragDismissCallback> callbacks; public ElasticDragDismissRelativeLayout(Context context) { this(context, null, 0, 0); } public ElasticDragDismissRelativeLayout(Context context, AttributeSet attrs) { this(context, attrs, 0, 0); } public ElasticDragDismissRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr) { this(context, attrs, defStyleAttr, 0); } public ElasticDragDismissRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); final TypedArray a = getContext().obtainStyledAttributes( attrs, R.styleable.ElasticDragDismissLayout, 0, 0); if (a.hasValue(R.styleable.ElasticDragDismissLayout_dragDismissDistance)) { dragDismissDistance = a.getDimensionPixelSize(R.styleable .ElasticDragDismissLayout_dragDismissDistance, 0); } else if (a.hasValue(R.styleable.ElasticDragDismissLayout_dragDismissFraction)) { dragDismissFraction = a.getFloat(R.styleable .ElasticDragDismissLayout_dragDismissFraction, dragDismissFraction); } if (a.hasValue(R.styleable.ElasticDragDismissLayout_dragDismissScale)) { dragDismissScale = a.getFloat(R.styleable .ElasticDragDismissLayout_dragDismissScale, dragDismissScale); shouldScale = dragDismissScale != 1f; Log.d(TAG, "ElasticDragDismissRelativeLayout, shouldScale ? " + shouldScale); } if (a.hasValue(R.styleable.ElasticDragDismissLayout_dragDismissScale)) { dragElacticity = a.getFloat(R.styleable.ElasticDragDismissLayout_dragDismissScale, dragElacticity); } a.recycle(); } public static abstract class ElasticDragDismissCallback { /** * Called for each drag event. * * @param elasticOffset Indicating the drag offset with elasticity applied i.e. may * exceed 1. * @param elasticOffsetPixels The elastically scaled drag distance in pixels. * @param rawOffset Value from [0, 1] indicating the raw drag offset i.e. * without elasticity applied. A value of 1 indicates that the * dismiss distance has been reached. * @param rawOffsetPixels The raw distance the user has dragged */ public void onDrag(float elasticOffset, float elasticOffsetPixels, float rawOffset, float rawOffsetPixels) { } /** * Called when dragging is released and has exceeded the threshold dismiss distance. */ public void onDragDismissed() { } } public void addListener(ElasticDragDismissCallback listener) { if (callbacks == null) { callbacks = new ArrayList<>(); } callbacks.add(listener); } public void removeListener(ElasticDragDismissCallback listener) { if (callbacks != null && callbacks.size() > 0) { callbacks.remove(listener); } } @Override public boolean onStartNestedScroll(View child, View target, int nestedScrollAxes) { boolean isNeeded = nestedScrollAxes == View.SCROLL_AXIS_VERTICAL; Log.d(TAG, "onStartNestedScroll, is needed " + isNeeded + " and nestedScrollAxes is " + nestedScrollAxes); return isNeeded; } @Override public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) { // We're only interested in dyUnconsumed. dragYScroll(dyUnconsumed); } @Override public void onStopNestedScroll(View child) { Log.d(TAG, "onStopNestedScroll is called"); if (Math.abs(totalDrag) > dragDismissDistance) { dispatchDismissCallback(); } else { // Just animates back to original position animate() .translationY(0f) .scaleX(1f) .scaleY(1f) .setDuration(200L) .setInterpolator(AnimUtils.getFastOutSlowInInterpolator(getContext())) .setListener(null) .start(); totalDrag = 0; draggingDown = draggingUp = false; dispatchDragCallback(0f, 0f, 0f, 0f); } } private void dragYScroll(int scroll) { if (scroll == 0) return; totalDrag += scroll; /** * This is to decide the pivot point for scaling * Setting the pivot only happens once in case users reverse his scroll direction * */ if (scroll < 0 && !draggingUp && !draggingDown) { draggingDown = true; if (shouldScale) setPivotY(getHeight()); } else if (scroll > 0 && !draggingDown && !draggingUp) { draggingUp = true; if (shouldScale) setPivotY(0f); } // how far have we dragged relative to the distance to perform a dismiss // (0–1 where 1 = dismiss distance). Decreasing logarithmically as we approach the limit float dragFraction = (float) Math.log10(1 + (Math.abs(totalDrag) / dragDismissDistance)); // calculate the desired translation given the drag fraction float dragTo = dragFraction * dragDismissDistance * 0.5f; if (draggingUp) { // as we use the absolute magnitude when calculating the drag fraction, need to // re-apply the drag direction dragTo *= -1; } /** * There's a catch in setTranslationY, when we drag view over the original point, the view goes in the opposite direction. * */ setTranslationY(dragTo); Log.d(TAG, "dragYScroll, dragTo is : " + dragTo + " and total drag is : " + totalDrag); if (shouldScale) { final float scale = 1 - ((1 - dragDismissScale) * dragFraction); setScaleX(scale); setScaleY(scale); } // if we've reversed direction and gone past the settle point then clear the flags to // allow the list to get the scroll events & reset any transforms if ((draggingDown && totalDrag >= 0) || (draggingUp && totalDrag <= 0)) { totalDrag = dragTo = dragFraction = 0; draggingUp = draggingDown = false; setTranslationY(0f); setScaleX(1f); setScaleY(1f); } // Log.d(TAG, "dragYScroll, total drag is : " + totalDrag + " dragDismissDistance is : " + dragDismissDistance); dispatchDragCallback(dragFraction, dragTo, Math.min(1f, Math.abs(totalDrag) / dragDismissDistance), totalDrag); } private void dispatchDragCallback(float elasticOffset, float elasticOffsetPixels, float rawOffset, float rawOffsetPixels) { if (callbacks != null && !callbacks.isEmpty()) { for (ElasticDragDismissCallback callback : callbacks) { callback.onDrag(elasticOffset, elasticOffsetPixels, rawOffset, rawOffsetPixels); } } } private void dispatchDismissCallback() { if (callbacks != null && !callbacks.isEmpty()) { for (ElasticDragDismissCallback callback : callbacks) { callback.onDragDismissed(); } } } }
[ "jerry.c@mig.me" ]
jerry.c@mig.me
dde5a6ef68c2c5a76966f0343968fe402d55410f
63003eef5c7be32f3e1a8324ee72f0b302dccc5f
/src/Search/EightWayLos.java
59b6d3197aeb3917459fbfa54220b98615a5baaa
[]
no_license
tamirYaffe/MapSearch
223be5267f8ada603c376683f04cb29d181927d5
03f37e9e06b031ad71134c6662f2a56dded218f5
refs/heads/master
2021-07-05T12:31:21.912617
2020-10-01T08:13:05
2020-10-01T08:13:05
198,628,207
0
0
null
2019-07-24T17:26:47
2019-07-24T12:08:01
Java
UTF-8
Java
false
false
2,192
java
package Search; import rlforj.los.ILosAlgorithm; import rlforj.los.ILosBoard; import rlforj.math.Point2I; import java.util.List; public class EightWayLos implements ILosAlgorithm { public boolean existsLineOfSight(ILosBoard b, int startX, int startY, int x1, int y1, boolean calculateProject) { int dx = x1 - startX, dy = y1 - startY; //Start to finish path // Left if (dx < 0) { // North West if (dy < 0) { return existsStraightLineOfSight(b, startX, startY, x1, y1, -1, -1); } // West else if (dy == 0) { return existsStraightLineOfSight(b, startX, startY, x1, y1, -1, 0); } // South West else { return existsStraightLineOfSight(b, startX, startY, x1, y1, -1, 1); } } //Middle else if (dx == 0) { // North if (dy < 0) { return existsStraightLineOfSight(b, startX, startY, x1, y1, 0, -1); } // South else if (dy > 0) { return existsStraightLineOfSight(b, startX, startY, x1, y1, 0, 1); } } //Right else { // North East if (dy < 0) { return existsStraightLineOfSight(b, startX, startY, x1, y1, 1, -1); } // East else if (dy == 0) { return existsStraightLineOfSight(b, startX, startY, x1, y1, 1, 0); } // South East else { return existsStraightLineOfSight(b, startX, startY, x1, y1, 1, 1); } } // same position return true; } private boolean existsStraightLineOfSight(ILosBoard b, int x, int y, int goalX, int goalY, int dx, int dy) { while (b.contains(x, y)) { if (x == goalX && y == goalY) return true; if (b.isObstacle(x, y)) return false; x += dx; y += dy; } return false; } public List<Point2I> getProjectPath() { return null; } }
[ "shawn@post.bgu.ac.il" ]
shawn@post.bgu.ac.il
ae849798ddbf697b1000a0206ff6fadb4c648888
ee066e577791210a94f002f427f92083524a29f1
/boot-rest-api/src/main/java/com/learning/spring/repositories/PersonRepository.java
ea942948fe13897b24ee90fcd2991399d41d4a66
[]
no_license
rajaraovellanki/Spring-Boot-Workspace
316f25227584fe2691ad9be56d8b865ca50c0af9
ae35a5741e711e335d6c7033cdc4c261c38bf8d0
refs/heads/master
2022-04-14T12:58:09.856165
2020-04-12T09:53:05
2020-04-12T09:53:05
255,052,927
0
0
null
null
null
null
UTF-8
Java
false
false
227
java
package com.learning.spring.repositories; import org.springframework.data.jpa.repository.JpaRepository; import com.learning.spring.model.Person; public interface PersonRepository extends JpaRepository<Person, Integer> { }
[ "vellanki.raja@gmail.com" ]
vellanki.raja@gmail.com
015eb0becd613c0d293cf6f972ddeeb32a46a6fd
31b66f121dbacab0450b4291a26caae7adbe721b
/app/src/main/java/com/fct/notto/View/Fragment_login.java
1d9558932dd31af235759789d137c4aed9493699
[]
no_license
garridoCarlos/Notto
dc6ee00d28fc68414da9d4489ef9ffd540fb08dc
644787f9a51e01c72c47e54e0cd0b8e54ddc7b49
refs/heads/master
2022-10-22T14:02:10.096131
2020-06-12T11:47:43
2020-06-12T11:47:43
263,394,877
0
0
null
null
null
null
UTF-8
Java
false
false
3,720
java
package com.fct.notto.View; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.lifecycle.ViewModelProvider; import androidx.navigation.Navigation; import com.fct.notto.R; import com.fct.notto.RoomDatabase.User; import com.fct.notto.Utils; import com.fct.notto.ViewModel.UserViewModel; public class Fragment_login extends Fragment { private EditText editTextEmail, editTextPassword; private Button buttonLogin, btnRegister; private View view; @Override public void onAttach(Context context) { super.onAttach(context); } @Override public void onResume() { super.onResume(); ((AppCompatActivity) getActivity()).getSupportActionBar().hide(); } @Override public void onStop() { super.onStop(); ((AppCompatActivity) getActivity()).getSupportActionBar().show(); } @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.login_fragment, container, false); editTextEmail = view.findViewById(R.id.et_email); editTextPassword = view.findViewById(R.id.et_password); buttonLogin = view.findViewById(R.id.btn_login); btnRegister = view.findViewById(R.id.btn_register); buttonLogin.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { login(); } }); btnRegister.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Utils.hideKeyboardFrom(getActivity(), editTextEmail); Utils.hideKeyboardFrom(getActivity(), editTextPassword); Navigation.findNavController(view).navigate(R.id.action_fragment_login_to_fragment_register); } }); return view; } private void login() { String toastLogin = getActivity().getResources().getString(R.string.toast_login_fail); String email = editTextEmail.getText().toString().trim(); String password = editTextPassword.getText().toString().trim(); UserViewModel userViewModel = new ViewModelProvider(getActivity()).get(UserViewModel.class); User user = userViewModel.getUserMailAndPass(email, password); if (user != null) { spLogin(); Utils.hideKeyboardFrom(getActivity(), view); Navigation.findNavController(view).navigate(R.id.loginAction); } else { Toast.makeText(getActivity(), toastLogin, Toast.LENGTH_SHORT).show(); } } //Carga los SharedPReferences para pasar el estado de sesión iniciada, y el email utilizado. //Se inicia cuando el login es correcto. private void spLogin() { SharedPreferences prefsLogged = getActivity().getSharedPreferences("logged", Context.MODE_PRIVATE); SharedPreferences.Editor editorLogged = prefsLogged.edit(); editorLogged.putBoolean("isLogged", true).apply(); SharedPreferences prefsUserMail = getActivity().getSharedPreferences("userMail", Context.MODE_PRIVATE); SharedPreferences.Editor editorUserMail = prefsUserMail.edit(); editorUserMail.putString("Mail", editTextEmail.getText().toString()).apply(); } }
[ "gscarlos.720@gmail.com" ]
gscarlos.720@gmail.com
c1930d5bafe74ed728105787e67ffe1877b3de95
4ef924fb8b4ccb322ce26a8383adf03abf12a309
/Chapter5/src/main/java/com/muke/testNg/parameter/ParameterTest.java
bcc1a8edf19acbd383c0898c0a57e4ebe1fe3af3
[]
no_license
chbl1992/ApiAutoTest1
3bea516704250b12ef73f52b8d2c822f480ca371
543c1682093a71367d65c6ad62eb48ea238877c9
refs/heads/master
2020-04-12T04:18:51.912560
2018-12-18T13:49:30
2018-12-18T13:49:30
162,291,821
0
0
null
null
null
null
UTF-8
Java
false
false
302
java
package com.muke.testNg.parameter; import org.testng.annotations.Parameters; import org.testng.annotations.Test; public class ParameterTest { @Test @Parameters({"name","age"}) public void parameterTest(String name,int age){ System.out.println("name ="+name+",age="+age); } }
[ "chbl1992@163.com" ]
chbl1992@163.com
1646ffb9f72fcc818ad78cf8aca390fa720c7674
15d2df26a01dd85b1bdbd5430957de9e9164c1a4
/Calender/main/java/com/mryhc/app/calendar/ui/custom/CustomMonthView.java
674193353bedd98dd81018266573810221e892aa
[]
no_license
sweeter-melon/android
700144dc4d9ba48518cb6ef5490a620c6d603aee
5627d0404f0f42d0abd4ba431fefd54308bdba43
refs/heads/master
2021-01-21T14:49:23.818645
2017-08-29T07:02:54
2017-08-29T07:02:54
95,342,095
0
0
null
null
null
null
UTF-8
Java
false
false
17,730
java
package com.mryhc.app.calendar.ui.custom; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.widget.Toast; import com.mryhc.app.calendar.utils.Common; import com.mryhc.app.calendar.utils.MyLog; import java.util.Calendar; /** * Created by Yunhao on 2017/7/12. */ public class CustomMonthView extends View{ private static final int COL_NUM = 7; private static final int ROW_NUM = 6; private Paint textPaint; // 画每一天的日期 private Paint redCirclePaint; // 今天的红色圆圈 private Paint linePaint; // 横纵线 private Paint weekPartPaint; // 周标题背景 private Paint selectRectPaint; // 周标题背景 private int viewWidth; private int viewHeight; private int weekTitleViewHeight; // 显示周几的位置高度 private int weekNumViewWidth; // 显示第几周的位置宽度 private int cellWidth; // 每一天所对应的的view的宽度 private int cellHeight; // 每一天所对应的的view的高度 private int dayNumViewSize; // 每一天所对应的的view的高度 private int curMonthDayColor; private int otherMonthDayColor; private int lineColor; private int weekPartBackColor; private int selectRectColor; private int weekNumColor; private Rect textRect; private WeekTitleCell[] weekTitleCells; private WeekNumCell[] weekNumCells; private DayCell[] dayCells; private Calendar calendar; // 当前月份的Calendar private Calendar curPageCalendar; private int todayYear; private int todayMonth; private int today; private int curMonth; private int weekFirstDayIn; // 本月1号所在的周 private LongClickRunnable longClickRunnable; private Context context; private long touchDownTime; private OnDayCellClickListener dayCellClickListener; private OnDayCellLongClickListener dayCellClickLongListener; private SharedPreferences sharedPreferences; private boolean showWeekNum; private int weekStartNum; private int clickedPos; public CustomMonthView(Context context) { super(context); initialize(context, null, 0); } public CustomMonthView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); initialize(context, attrs, 0); } public CustomMonthView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initialize(context, attrs, defStyleAttr); } private void initialize(Context context, AttributeSet attrs, int defStyleAttr){ this.context = context; clickedPos = -1; sharedPreferences = context.getSharedPreferences(Common.SP_NAME, Context.MODE_PRIVATE); showWeekNum = sharedPreferences.getBoolean(Common.SHOW_WEEK_NUM, false); weekStartNum = sharedPreferences.getInt(Common.WEEK_START, 7); MyLog.i(Common.TAG, "每周起始日" + weekStartNum); longClickRunnable = new LongClickRunnable(); calendar = Calendar.getInstance(); curPageCalendar = Calendar.getInstance(); todayYear = calendar.get(Calendar.YEAR); todayMonth = calendar.get(Calendar.MONTH); today = calendar.get(Calendar.DAY_OF_MONTH); curMonthDayColor = Color.BLACK; otherMonthDayColor = Color.parseColor("#BDBDBD"); lineColor = Color.parseColor("#999999"); weekNumColor = Color.parseColor("#00B0FF"); weekPartBackColor = Color.parseColor("#F5F5F5"); selectRectColor = Color.parseColor("#B3E5FC"); textPaint = new Paint(); redCirclePaint = new Paint(); linePaint = new Paint(); weekPartPaint = new Paint(); selectRectPaint = new Paint(); textPaint.setAntiAlias(true); redCirclePaint.setAntiAlias(true); weekPartPaint.setAntiAlias(true); selectRectPaint.setAntiAlias(true); redCirclePaint.setColor(Color.RED); linePaint.setColor(lineColor); weekPartPaint.setColor(weekPartBackColor); selectRectPaint.setColor(selectRectColor); textRect = new Rect(); weekTitleCells = new WeekTitleCell[COL_NUM]; weekNumCells = new WeekNumCell[ROW_NUM]; dayCells = new DayCell[ROW_NUM * COL_NUM]; updateViewData(); } private void updateViewData(){ calendar.set(Calendar.DAY_OF_MONTH, 1); weekFirstDayIn = calendar.get(Calendar.WEEK_OF_YEAR); for(int i=0; i< COL_NUM; i++){ // 初始化周数 weekTitleCells[i] = new WeekTitleCell(i); if(i < 6){ weekNumCells[i] = new WeekNumCell(i); } } int firstDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); curMonth = calendar.get(Calendar.MONTH); if(weekStartNum == 1){ calendar.add(Calendar.DAY_OF_YEAR, -firstDayOfWeek+2); }else{ calendar.add(Calendar.DAY_OF_YEAR, -firstDayOfWeek+1); } for(int i=0; i< COL_NUM * ROW_NUM; i++){ dayCells[i] = new DayCell(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), i); calendar.add(Calendar.DAY_OF_YEAR, 1); } } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); viewWidth = w; viewHeight = h; int tempTitleHeight = h / 20; cellHeight = (h - tempTitleHeight) / ROW_NUM; int heightRemainder= (h - tempTitleHeight) % 6; weekTitleViewHeight = tempTitleHeight + heightRemainder; if(showWeekNum){ int tempNumWidth = w / 20; cellWidth = (w - tempNumWidth) / COL_NUM ; int widthRemainder = (w - tempNumWidth) % 7; weekNumViewWidth = tempNumWidth + widthRemainder; }else{ cellWidth = w / COL_NUM; weekNumViewWidth = 0; } dayNumViewSize = cellWidth / 4; } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); } @Override public boolean onTouchEvent(MotionEvent event) { if (longClickRunnable != null) { //TODO 这里可以增加一些规则,比如:模糊XY的判定,使长按更容易触发 if(event.getAction() == MotionEvent.ACTION_MOVE && event.getPointerCount() == 1){ if(longClickRunnable.getX() != -1 && longClickRunnable.getY() != -1){ if(Math.abs(event.getX() - longClickRunnable.getX()) < 40 && Math.abs(event.getY() - longClickRunnable.getY()) < 40){ MotionEvent eventClone = MotionEvent.obtain(event); eventClone.setAction(MotionEvent.ACTION_CANCEL); eventClone.offsetLocation(longClickRunnable.getX(), longClickRunnable.getY()); return super.onTouchEvent(event); } } } removeCallbacks(longClickRunnable); if (event.getAction() == MotionEvent.ACTION_DOWN && event.getPointerCount() == 1) { touchDownTime = event.getDownTime(); postCheckForLongTouch(event.getX(), event.getY()); } if(event.getAction() == MotionEvent.ACTION_UP){ if(event.getEventTime() - touchDownTime < 100){ int row = ((int)event.getY() - weekTitleViewHeight) / cellHeight; int col = ((int)event.getX() - weekNumViewWidth) / cellWidth; int clickPos = row * COL_NUM + col; if(clickPos == clickedPos){ DayCell dayCell = dayCells[clickPos]; Calendar targetCalendar = Calendar.getInstance(); targetCalendar.set(Calendar.YEAR, dayCell.year); targetCalendar.set(Calendar.MONTH, dayCell.month); targetCalendar.set(Calendar.DAY_OF_MONTH, dayCell.day); if(dayCellClickListener != null){ dayCellClickListener.onDayCellClick(targetCalendar); } }else{ invalidate(); } clickedPos = clickPos; } } } return true; } private void postCheckForLongTouch(float x, float y) { longClickRunnable.setClickPos(x, y); postDelayed(longClickRunnable, 500); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); // 绘制标题背景 canvas.drawRect(0, 0, viewWidth, weekTitleViewHeight, weekPartPaint); canvas.drawRect(0, 0, weekNumViewWidth, viewHeight, weekPartPaint); // 绘制标题 textPaint.setTextSize(dayNumViewSize); textPaint.setTextAlign(Paint.Align.LEFT); measureText("日"); if(showWeekNum){ drawText(canvas, "周", 0, -1); } // 绘制网格线 canvas.drawLine(weekNumViewWidth, 0, weekNumViewWidth, viewHeight, linePaint); // 竖线 for(int i = 0; i < COL_NUM; i++){ weekTitleCells[i].drawSelf(canvas); } for(int i=0; i< ROW_NUM * COL_NUM; i++){ if( i < 6){ canvas.drawLine(0, i * cellHeight + weekTitleViewHeight, viewWidth, i * cellHeight + weekTitleViewHeight, linePaint); // 横线 canvas.drawLine((i+1) * cellWidth + weekNumViewWidth, 0, (i+1) * cellWidth + weekNumViewWidth, viewHeight, linePaint); // 竖线 if(showWeekNum){ weekNumCells[i].drawSelf(canvas); } } dayCells[i].drawSelf(canvas); } } private void drawText(Canvas canvas, String text, int textType, int pos){ if(textType != 1){ measureText(text); } switch (textType){ case 0: // 最左上角的文字 textPaint.setColor(weekNumColor); canvas.drawText(text, weekNumViewWidth / 2 - (textRect.width() / 2), weekTitleViewHeight / 2 + (textRect.height() / 2), textPaint); break; case 1: // 星期几的文字 if ("六".equals(text) || "日".equals(text)) { textPaint.setColor(weekNumColor); } else { textPaint.setColor(otherMonthDayColor); } canvas.drawText(text, weekNumViewWidth + cellWidth * (pos) + cellWidth / 2 - (textRect.width() / 2), weekTitleViewHeight / 2 + (textRect.height() / 2), textPaint); break; case 2: // 第几周的文字 textPaint.setColor(weekNumColor); canvas.drawText(text, weekNumViewWidth / 2 - (textRect.width() / 2), weekTitleViewHeight + cellHeight * pos + weekNumViewWidth / 2 + (textRect.height() / 2), textPaint); break; } } private void measureText(String text){ textPaint.getTextBounds(text, 0, text.length(), textRect); } private void drawDayNum(Canvas canvas, String text, int pos, boolean isToday, boolean isCurMonth){ textPaint.setTextSize(dayNumViewSize *3 / 4); measureText(text); if(isToday){ textPaint.setColor(Color.WHITE); }else if(isCurMonth){ textPaint.setColor(curMonthDayColor); }else{ textPaint.setColor(otherMonthDayColor); } canvas.drawText(text, weekNumViewWidth + cellWidth * (pos % COL_NUM) + dayNumViewSize / 2 - (textRect.width() / 2), weekTitleViewHeight + cellHeight * (pos / COL_NUM) + dayNumViewSize / 2 + (textRect.height() / 2), textPaint); } /** * 设置当前View的Calendar * @param calendar */ public void setCalendar(Calendar calendar){ clickedPos = -1; this.calendar = calendar; curPageCalendar.setTime(calendar.getTime()); updateViewData(); invalidate(); } /** * 设置单元格点击监听 * @param listener */ public void setDayCellClickListener(OnDayCellClickListener listener){ this.dayCellClickListener = listener; } /** * 设置单元格长按监听 * @param longListener */ public void setDayCellClickLongListener(OnDayCellLongClickListener longListener){ this.dayCellClickLongListener = longListener; } class DayCell{ public int year; public int month; public int day; public int pos; public boolean isToday; public boolean isCurMonth; public DayCell(int year, int month, int day, int pos){ this.year = year; this.month = month; this.day = day; this.pos = pos; if(month == curMonth){ isCurMonth = true; } if(year == todayYear && month == todayMonth && day == today){ isToday = true; } } public void drawSelf(Canvas canvas){ if(!isCurMonth){ int left = weekNumViewWidth + cellWidth * (pos % COL_NUM); int top = weekTitleViewHeight + cellHeight * (pos / COL_NUM); canvas.drawRect(left+1, top+1, left + cellWidth-1, top + cellHeight-1, weekPartPaint); } // 画选中的位置所在日期框 if(clickedPos == pos){ int left = weekNumViewWidth + cellWidth * (pos % COL_NUM); int top = weekTitleViewHeight + cellHeight * (pos / COL_NUM); canvas.drawRect(left+1, top+1, left + cellWidth-1, top + cellHeight-1, selectRectPaint); } if(isToday){ canvas.drawCircle(weekNumViewWidth + cellWidth * (pos % COL_NUM) + dayNumViewSize / 2 + 1, weekTitleViewHeight + cellHeight * (pos / COL_NUM) + dayNumViewSize / 2 + 1, dayNumViewSize / 2, redCirclePaint); } drawDayNum(canvas, String.valueOf(day), pos, isToday, isCurMonth); } } class WeekTitleCell{ public String titleStr; public int pos; public WeekTitleCell(int pos){ this.pos = pos; int caseValue = pos; if(weekStartNum == 1){ // 每周起始日为周一 caseValue = (pos + 1) % 7; } switch (caseValue){ case 0: titleStr = "日"; break; case 1: titleStr = "一"; break; case 2: titleStr = "二"; break; case 3: titleStr = "三"; break; case 4: titleStr = "四"; break; case 5: titleStr = "五"; break; case 6: titleStr = "六"; break; } } public void drawSelf(Canvas canvas){ drawText(canvas, titleStr, 1, pos); } } class WeekNumCell{ public int pos; public WeekNumCell(int pos){ this.pos = pos; } public void drawSelf(Canvas canvas){ drawText(canvas, String.valueOf(weekFirstDayIn + pos), 2, pos); } } private class LongClickRunnable implements Runnable{ private int x = -1; private int y = -1; public void setClickPos(float x, float y){ this.x = (int)x; this.y = (int)y; } public int getX() { return x; } public int getY() { return y; } @Override public void run() { int row = (y - weekTitleViewHeight) / cellHeight; int col = (x - weekNumViewWidth) / cellWidth; Toast.makeText(context, "长按单元格:" + dayCells[row * COL_NUM + col].day + "日", Toast.LENGTH_SHORT).show(); } } public interface OnDayCellClickListener{ void onDayCellClick(Calendar targetCalendar); } public interface OnDayCellLongClickListener{ void onDayCellLongClick(); } /** * 响应设置更改 * 在设置更改后调用 */ public void responseSettingChanged(){ showWeekNum = sharedPreferences.getBoolean(Common.SHOW_WEEK_NUM, false); weekStartNum = sharedPreferences.getInt(Common.WEEK_START, 7); calendar.setTime(curPageCalendar.getTime()); if(showWeekNum){ int tempNumWidth = viewWidth / 20; cellWidth = (viewWidth - tempNumWidth) / COL_NUM ; int widthRemainder = (viewWidth - tempNumWidth) % 7; weekNumViewWidth = tempNumWidth + widthRemainder; }else{ cellWidth = viewWidth / COL_NUM; weekNumViewWidth = 0; } dayNumViewSize = cellWidth / 4; updateViewData(); } }
[ "2509697407@qq.com" ]
2509697407@qq.com
fb5f50f572e2031761e895ae5593d724edbf3565
0d91ac61d861cd0d3330e8517e3e8d79e18e6c27
/src/MySelf/MyStack.java
8d13c9bbde8238dc451b201f54e6f5cc549c758b
[]
no_license
wengwentao-666/APIday01
34ae44145d5f3485a0e2c887b7d12024b6f72392
4aac358debc143732526caa9078287e1b73f0625
refs/heads/master
2023-03-13T22:53:59.196070
2021-03-20T02:00:54
2021-03-20T02:00:54
347,316,859
0
0
null
null
null
null
UTF-8
Java
false
false
783
java
package MySelf; import java.util.LinkedList; public class MyStack implements Stack { LinkedList<Hero> heros = new LinkedList<>(); @Override public void push(Hero h) { heros.addLast(h); } @Override public Hero pull() { return heros.removeLast(); } @Override public Hero peek() { return heros.getLast(); } public static void main(String[] args) { MyStack herosStack = new MyStack(); for(int i = 0; i < 5; i++){ Hero h = new Hero("hero name"+i); System.out.println("压入 hero:"+h); herosStack.push(h); } for(int i = 0; i < 5; i++){ Hero h = herosStack.pull(); System.out.println("弹出hero"+h); } } }
[ "2524308445@qq.com" ]
2524308445@qq.com
2abf3f7ee6a354fe5edcdf6f47c21ddaa644fdc2
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/branches/dev5888/code/base/dso-common/src/com/tc/net/protocol/tcm/TCMessageRouter.java
03da7d6c0c8544e9202a583004075e45731c2f09
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
568
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright * notice. All rights reserved. */ package com.tc.net.protocol.tcm; import com.tc.async.api.Sink; /** * Interface for TC message routers * * @author steve */ public interface TCMessageRouter extends TCMessageSink { public void routeMessageType(TCMessageType protocol, TCMessageSink sink); public void routeMessageType(TCMessageType protocol, Sink destSink, Sink hydrateSink); public void unrouteMessageType(TCMessageType protocol); }
[ "teck@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
teck@7fc7bbf3-cf45-46d4-be06-341739edd864
56837ff2b48089b98bd8eacce00964ddd614cf86
379392993a89ede4a49b38a1f0e57dacbe17ec7d
/com/google/android/gms/tasks/TaskCompletionSource.java
963bf92a7f45798cb2169001d6b146e37f86c09d
[]
no_license
mdali602/DTC
d5c6463d4cf67877dbba43e7d50a112410dccda3
5a91a20a0fe92d010d5ee7084470fdf8af5dafb5
refs/heads/master
2021-05-12T02:06:40.493406
2018-01-15T18:06:00
2018-01-15T18:06:00
117,578,063
0
1
null
null
null
null
UTF-8
Java
false
false
702
java
package com.google.android.gms.tasks; import android.support.annotation.NonNull; public class TaskCompletionSource<TResult> { private final zzh<TResult> zzbNG = new zzh(); @NonNull public Task<TResult> getTask() { return this.zzbNG; } public void setException(@NonNull Exception exception) { this.zzbNG.setException(exception); } public void setResult(TResult tResult) { this.zzbNG.setResult(tResult); } public boolean trySetException(@NonNull Exception exception) { return this.zzbNG.trySetException(exception); } public boolean trySetResult(TResult tResult) { return this.zzbNG.trySetResult(tResult); } }
[ "mohd.ali@xotiv.com" ]
mohd.ali@xotiv.com
f7741d2077558c2dd872d2d49908ff01a24fcc94
a26c21ca703394b54053fd8c52876c7550480194
/addOns/soap/src/test/java/org/zaproxy/zap/extension/soap/WSDLCustomParserTestCase.java
8758c554dbce2242658e3660e81c24aa7be7638b
[ "Apache-2.0" ]
permissive
Luiggy/zap-extensions
5a360a39b4b81e7f788d73e88a07d5d4120de8cc
ae79e2fe44d729d129dfabed5035599e5d870c05
refs/heads/master
2020-07-20T13:41:47.200916
2019-09-05T15:08:50
2019-09-05T15:08:50
206,651,585
1
0
Apache-2.0
2019-09-05T20:27:05
2019-09-05T20:27:05
null
UTF-8
Java
false
false
3,079
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * 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.zaproxy.zap.extension.soap; import static org.junit.Assert.*; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.junit.Before; import org.junit.Test; import org.parosproxy.paros.network.HttpMessage; import org.zaproxy.zap.testutils.TestUtils; public class WSDLCustomParserTestCase extends TestUtils { private String wsdlContent; private WSDLCustomParser parser; @Before public void setUp() throws Exception { /* Simple log configuration to prevent Log4j malfunction. */ BasicConfigurator.configure(); Logger rootLogger = Logger.getRootLogger(); rootLogger.setLevel(Level.OFF); /* Gets test wsdl file and retrieves its content as String. */ Path wsdlPath = getResourcePath("resources/test.wsdl"); wsdlContent = new String(Files.readAllBytes(wsdlPath), StandardCharsets.UTF_8); parser = new WSDLCustomParser(); } @Test public void parseWSDLContentTest() { /* Positive case. Checks the method's return value. */ boolean result = parser.extContentWSDLImport(wsdlContent, false); assertTrue(result); /* Negative cases. */ result = parser.extContentWSDLImport("", false); // Empty content. assertFalse(result); result = parser.extContentWSDLImport("asdf", false); // Non-empty invalid content. assertFalse(result); } @Test public void canBeWSDLparsedTest() { /* Positive case. */ boolean result = parser.canBeWSDLparsed(wsdlContent); assertTrue(result); /* Negative cases. */ result = parser.canBeWSDLparsed(""); // Empty content. assertFalse(result); result = parser.canBeWSDLparsed("asdf"); // Non-empty invalid content. assertFalse(result); } @Test public void createSoapRequestTest() { parser.extContentWSDLImport(wsdlContent, false); /* Positive case. */ HttpMessage result = parser.createSoapRequest(parser.getLastConfig()); assertNotNull(result); /* Negative case. */ result = parser.createSoapRequest(new SOAPMsgConfig()); assertNull(result); } }
[ "thc202@gmail.com" ]
thc202@gmail.com
c835e88c1bf34c75e1d59c9d4d9d8eb0f23bd9ac
d30dc6778f64c26981b2fd53e47ef36a6b71ec3a
/src/main/java/org/web3j/methods/request/EthCall.java
f64057ef0abc921513eccde5dcd92ad7ddbfa43e
[ "MIT" ]
permissive
gitter-badger/web3j
6e212f2ac4e5094f1561b9391fa2809b4dc22d7a
8c1590c7183f02ab65cd97751e4182db89e80307
refs/heads/master
2021-01-18T16:40:45.325649
2016-09-15T02:15:43
2016-09-15T02:15:43
68,261,007
0
0
null
2016-09-15T02:36:24
2016-09-15T02:36:24
null
UTF-8
Java
false
false
1,585
java
package org.web3j.methods.request; import java.math.BigInteger; import com.fasterxml.jackson.annotation.JsonInclude; import org.web3j.protocol.utils.Codec; /** * eth_sendTransaction object */ @JsonInclude(JsonInclude.Include.NON_NULL) public class EthCall { private String fromAddress; private String toAddress; private BigInteger gas; private BigInteger gasPrice; private BigInteger value; private String data; public EthCall(String fromAddress, String data) { this.fromAddress = fromAddress; this.data = data; } public EthCall(String fromAddress, String toAddress, BigInteger gas, BigInteger gasPrice, BigInteger value, String data) { this.fromAddress = fromAddress; this.toAddress = toAddress; this.gas = gas; this.gasPrice = gasPrice; this.value = value; this.data = data; } public String getFromAddress() { return fromAddress; } public String getToAddress() { return toAddress; } public String getGas() { return convert(gas); } public String getGasPrice() { return convert(gasPrice); } public String getValue() { return convert(value); } public String getData() { return data; } private static String convert(BigInteger value) { if (value != null) { return Codec.encodeQuantity(value); } else { return null; // we don't want the field to be encoded if not present } } }
[ "conor10@gmail.com" ]
conor10@gmail.com
39e4caa46ef7e456dc708df643d108bbb401137e
061957700a61c8675e3f533a87d8da54b7a20abc
/src/programacao_2017_adebalsalesjunior/Ex10_NumeroDecrescente.java
9749c03dc933a623262788d86426e64997830338
[]
no_license
JuniorSales/TrabalhoProgramacao_2017
1af4bb671372a0983ead0ccbe3986171d2441442
3611ee0afde8397c11e3f57169cb42bf4f4d6e72
refs/heads/master
2021-08-26T07:05:45.006292
2017-11-22T01:22:48
2017-11-22T01:22:48
111,622,391
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
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 programacao_2017_adebalsalesjunior; /** * * @author Júnior Sales */ public class Ex10_NumeroDecrescente { public static void main(String a[]) { int i; int array[] = { 12, 9, 4, 99, 120, 1, 3, 10 }; System.out.println("Values Before the sort:\n"); for (i = 0; i < array.length; i++) System.out.print(array[i] + " "); System.out.println(); bubble_srt(array, array.length); System.out.print("Values after the sort:\n"); for (i = 0; i < array.length; i++) System.out.print(array[i] + " "); System.out.println(); System.out.println("PAUSE"); } public static void bubble_srt(int a[], int n) { int i, j, t = 0; for (i = 0; i < n; i++) { for (j = 1; j < (n - i); j++) { if (a[j - 1] < a[j]) { t = a[j - 1]; a[j - 1] = a[j]; a[j] = t; } } } } }
[ "asalesjunior@gmail.com" ]
asalesjunior@gmail.com
d312dbd9520c44b19be8666b0664c14f2e443150
a01eaed695583aad70bd7e1da1af0ec736c7bf22
/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/level3/RadialPacket.java
b0c4016edda7155930011d55bdfe4faf16b912a0
[]
no_license
SeanTheGuyThatAlwaysHasComputerTrouble/awips2
600d3e6f7ea1b488471e387c642d54cb6eebca1a
c8f8c20ca34e41ac23ad8e757130e91c77b558fe
refs/heads/master
2021-01-19T18:00:12.598133
2013-03-26T17:06:45
2013-03-26T17:06:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,282
java
/** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination * to non-U.S. persons whether in the United States or abroad requires * an export license or other authorization. * * Contractor Name: Raytheon Company * Contractor Address: 6825 Pine Street, Suite 340 * Mail Stop B8 * Omaha, NE 68106 * 402.291.0100 * * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ package com.raytheon.uf.common.dataplugin.radar.level3; import java.io.DataInputStream; import java.io.IOException; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; /** * RadialPacket is a class that will allow access to the actual radar data * contained in a radial product. * * @author randerso * @version 1.0 */ public class RadialPacket extends SymbologyPacket { private final static IUFStatusHandler handler = UFStatus .getHandler(RadialPacket.class); public static final int RADIAL_DATA_PACKET_4BIT = 0xAF1F; static { PacketFactory.registerPacketType(RadialPacket.class, RADIAL_DATA_PACKET_4BIT); } protected int firstBinIndex; protected int numBins; protected int theICenter; protected int theJCenter; protected double scaleFactor; protected int numRadials; protected byte[] radialData; protected float[] angleData; /** * Construct takes a byte array containing a radial symbology layer. * */ public RadialPacket(int packetId, DataInputStream in) throws IOException { super(packetId, in); } /** * Returns the number of range bins in each radial * * @return An int which will be from 1 to 460 */ public int getNumBins() { return numBins; } /** * Returns the I coordinate of the center of sweep * * @return An int which will be from -2048 to 2048 */ public int getICenter() { return theICenter; } /** * Returns the J coordinate of the center of sweep * * @return An int which will be from -2048 to 2048 */ public int getJCenter() { return theJCenter; } /** * Returns the total number of radials in the product. * * @return An int which will be from 1 to 400 */ public int getNumRadials() { return numRadials; } /** * Returns the number of pixels per range bin. * * @return A double from .001 to 8.000 */ public double getScaleFactor() { return scaleFactor; } /** * Parses the radial header */ @Override protected void init(DataInputStream in) throws IOException { firstBinIndex = in.readUnsignedShort(); numBins = in.readUnsignedShort(); theICenter = in.readUnsignedShort(); theJCenter = in.readUnsignedShort(); scaleFactor = in.readUnsignedShort() * 0.001; numRadials = in.readUnsignedShort(); radialData = new byte[numRadials * numBins]; angleData = new float[numRadials]; readRadialData(in); } /** * @param in * @throws IOException */ protected void readRadialData(DataInputStream in) throws IOException { for (int radial = 0; radial < numRadials; radial++) { int remainingBytes = in.readUnsignedShort() * 2; angleData[radial] = (in.readUnsignedShort() * 0.1f) % 360.0f; in.skip(2); // radial angle delta not used int bin = 0; for (int b = 0; b < remainingBytes; b++) { byte dataByte = in.readByte(); int runLength = 0x0F & (dataByte >> 4); byte value = (byte) (0x0F & dataByte); for (int i = 0; i < runLength; ++i) { setRadialDataValue(radial, bin++, value); } } } } /** * @param radial * @param bin * @param value */ protected void setRadialDataValue(int radial, int bin, byte value) { if ((radial < numRadials) && (bin < numBins)) { radialData[radial * numBins + bin] = value; } else { handler.handle(Priority.WARN, "Index out of range. Radial: " + radial + " Bin: " + bin + ". Excess data will be discarded."); } } @Override public String toString() { String s = super.toString() + " Radial Data"; s += "\n\t\tNum Radials: " + numRadials; s += "\n\t\tNum Bins: " + numBins; return s; } public byte[] getRadialData() { return radialData; } public float[] getAngleData() { return angleData; } /** * @return the firstBinIndex */ public int getFirstBinIndex() { return firstBinIndex; } }
[ "root@lightning.(none)" ]
root@lightning.(none)
1c3f527ed29974de68a2b1dfd7d4d2028e2fb925
971174cbddf60dced4841d9a6b767417f66c58d3
/src/test/java/com/epam/ta/library/controller/ControllerTestSignIn.java
089e54b90753937958a868f5a5b29c1ec22157d8
[]
no_license
TATJAVAAliakseiMialeshka/TAT_JAVA_Mialeshka_Task2
ce304871ad7da4b04b54233ea386b93efb19332c
08e00f8374078fae5afc52e2602d21576f141a2d
refs/heads/master
2020-12-02T18:00:53.837869
2017-07-11T09:52:54
2017-07-11T09:52:54
96,460,972
1
1
null
2017-07-19T08:32:03
2017-07-06T18:35:36
Java
UTF-8
Java
false
false
4,991
java
package com.epam.ta.library.controller; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import com.epam.ta.library.bean.User; import com.epam.ta.library.controller.command.CommandName; import com.epam.ta.library.controller.session.SessionStorage; public class ControllerTestSignIn { private Controller controller; private SessionStorage sessionStorage; private static final String DB_ACTIVATED_USERS = "../../db/library_activated_users.sql"; private static final String rootPath = ControllerTestSignIn.class.getProtectionDomain().getCodeSource().getLocation().getPath(); @BeforeClass public void testSetUp(){ sessionStorage = SessionStorage.getInstance(); controller = Controller.getInstance(); ControllerTestUtil.loadDB(rootPath+DB_ACTIVATED_USERS); User user = ControllerTestUtil.emulateUser(); sessionStorage.setSessionUser(user); } @DataProvider public Object[][] command_SignIn_validLoginPassword_DP() { return new Object[][] { { CommandName.AUTHORIZATION.name(),"'tenth' 'tenth'","Welcome"}, }; } @DataProvider public Object[][] command_SignIn_validLoginPlusInvalidSymbols_DP() { return new Object[][] { { CommandName.AUTHORIZATION.name(),"' tenth ' 'tenth'","Login operation failed. Wrong credentials"}, { CommandName.AUTHORIZATION.name(),"'tenth!@#$%^&*()' 'tenth'","Login operation failed. Wrong credentials"}, }; } @DataProvider public Object[][] command_SignIn_notExistingValidLogin_DP() { return new Object[][] { { CommandName.AUTHORIZATION.name(),"'some_-0login' 'tenth'","Login operation failed. Wrong credentials"}, }; } @DataProvider public Object[][] command_SignIn_invalidLogin_DP() { return new Object[][] { { CommandName.AUTHORIZATION.name(),"' smth ' 'tenth'","Login operation failed. Wrong credentials"}, { CommandName.AUTHORIZATION.name(),"'!@#$%^&*()smth' 'tenth'","Login operation failed. Wrong credentials"}, { CommandName.AUTHORIZATION.name(),"'' 'tenth'","Login operation failed. Wrong credentials"}, { CommandName.AUTHORIZATION.name(),"'' 'tenth'","Login operation failed. Wrong credentials"}, }; } @DataProvider public Object[][] command_SignIn_notExistingValidPassword_DP() { return new Object[][] { { CommandName.AUTHORIZATION.name(),"'tenth' 'aZ0_!$%&#'","Login operation failed. Wrong credentials"}, }; } @DataProvider public Object[][] command_SignIn_validPasswordPlusInvalidSymbols_DP() { return new Object[][] { { CommandName.AUTHORIZATION.name(),"'tenth' 'tenth ~'","Login operation failed. Wrong credentials"}, }; } @DataProvider public Object[][] command_SignIn_invalidPassword_DP() { return new Object[][] { { CommandName.AUTHORIZATION.name(),"'tenth' ' ~'","Login operation failed. Wrong credentials"}, { CommandName.AUTHORIZATION.name(),"'tenth' ''","Login operation failed. Wrong credentials"}, }; } @Test (dataProvider="command_SignIn_validLoginPassword_DP", groups={"user","signIn"}) public void command_SignIn_validLoginPassword(String commandName,String paramString, String expectedResponce){ Assert.assertTrue(controller.executeTask(commandName, paramString).startsWith(expectedResponce) ); } @Test (dataProvider="command_SignIn_validLoginPlusInvalidSymbols_DP", groups={"user","signIn"}) public void command_SignIn_validLoginPlusInvalidSymbols(String commandName,String paramString, String expectedResponce){ Assert.assertEquals(controller.executeTask(commandName, paramString), expectedResponce ); } @Test (dataProvider="command_SignIn_notExistingValidLogin_DP", groups={"user","signIn"}) public void command_SignIn_notExistingValidLogin(String commandName,String paramString, String expectedResponce){ Assert.assertEquals(controller.executeTask(commandName, paramString), expectedResponce ); } @Test (dataProvider="command_SignIn_invalidLogin_DP", groups={"user","signIn"}) public void command_SignIn_invalidLogin(String commandName,String paramString, String expectedResponce){ Assert.assertEquals(controller.executeTask(commandName, paramString), expectedResponce ); } @Test (dataProvider="command_SignIn_validPasswordPlusInvalidSymbols_DP", groups={"user","signIn"}) public void command_SignIn_validPasswordPlusInvalidSymbols(String commandName,String paramString, String expectedResponce){ Assert.assertEquals(controller.executeTask(commandName, paramString), expectedResponce ); } @Test (dataProvider="command_SignIn_invalidPassword_DP", groups={"user","signIn"}) public void command_SignIn_invalidPassword(String commandName,String paramString, String expectedResponce){ Assert.assertEquals(controller.executeTask(commandName, paramString), expectedResponce ); } @Test (groups={"user","signIn"}) public void command_SignIn_nullParameters(){ Assert.assertEquals(controller.executeTask( CommandName.AUTHORIZATION.name(), null), "Login operation failed. Wrong credentials"); } }
[ "aliaksei_mialeshka@epam.com" ]
aliaksei_mialeshka@epam.com
dbfc8968e6b08a7bae1443b721465a2ae283e4b8
c394dff13b8b03fad40da73f920fdc62d9cf3607
/src/main/java/com/example/myhome/controller/BoardController.java
dfc05bef56d5eec3a2bbcebde969d9916d40281d
[]
no_license
didzl/myhome
0f1f3ec2492129c521d9e2e74efcb8072b39295d
8eaeaef5dff6ea35707bf23573782b013b68d6c7
refs/heads/master
2023-06-12T17:53:42.963879
2021-07-08T03:05:57
2021-07-08T03:05:57
382,493,339
0
0
null
null
null
null
UTF-8
Java
false
false
2,651
java
package com.example.myhome.controller; import com.example.myhome.model.Board; import com.example.myhome.repository.BoardRepository; import com.example.myhome.service.BoardService; import com.example.myhome.validator.BoardValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.web.PageableDefault; import org.springframework.security.core.Authentication; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @Controller @RequestMapping("/board") public class BoardController { @Autowired private BoardRepository boardrepo; @Autowired private BoardValidator boardValidator; @Autowired private BoardService boardService; @GetMapping("/list") public String list(Model model, @PageableDefault(size = 1) Pageable pageable, @RequestParam(required = false, defaultValue = "") String searchText) { //Page<Board> boards =boardrepo.findAll(pageable); Page<Board> boards =boardrepo.findByTitleOrContentContaining(searchText, searchText, pageable); int startPage = Math.max(1, boards.getPageable().getPageNumber() -4); int endPage = Math.min(boards.getTotalPages(), boards.getPageable().getPageNumber()+4); model.addAttribute("startPage", startPage); model.addAttribute("endPage", endPage); model.addAttribute("board",boards); return "board/list"; } @GetMapping("/form") public String form(Model model, @RequestParam(required = false) Long id){ if (id ==null) { model.addAttribute("board", new Board()); } else { Board board = boardrepo.findById(id).orElse(null); model.addAttribute("board", board); } return "board/form"; } @PostMapping("/form") public String postForm(@Valid Board board, BindingResult bindingResult, Authentication authentication) { //validation 업무 boardValidator.validate(board, bindingResult); if (bindingResult.hasErrors()) { return "board/form"; } // Authentication a = SecurityContextHolder.getContext().getAuthentication(); //같은 방법 String username = authentication.getName(); boardService.save(username, board); boardrepo.save(board); return "redirect:/board/list"; } }
[ "delpiero1987@naver.com" ]
delpiero1987@naver.com
2a8f3bfc4da5003f22b717613159472aaee59f09
efefa35e099309db86bd9ac1bd2bc3cde4427eee
/IR_Project/src/SearchEngine.java
cf5b427ef0e96c74e02f28a054eed55671cde8aa
[]
no_license
yuhuang-cst/IR_Lucene
82de83ff577ec650f4a7cb7b0fb3978f6d2edbad
18ec83e47e3deb05b5e020bb652f409e90d5173e
refs/heads/master
2021-06-13T07:11:11.923144
2017-03-13T03:56:10
2017-03-13T03:56:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,621
java
import org.ansj.lucene6.AnsjAnalyzer; import org.apache.commons.cli.*; import org.apache.log4j.BasicConfigurator; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.cjk.CJKAnalyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.IndexableField; import java.util.*; /** * Created by HY on 16/11/4. */ public class SearchEngine { Options options; String sourceDir = null; String indexDir = null; String word2vecDir = null; IndexWriterConfig.OpenMode indexMode = IndexWriterConfig.OpenMode.CREATE; Analyzer analyzer; TextFileIndexer indexer = null; TextSearcher searcher = null; Set<String> storedSet = new HashSet<String>(Arrays.asList("题名", "作者", "关键词", "出版单位", "出版日期", "摘要", "专题名称", "分类名称")); Set<String> intSet = new HashSet<String>(Arrays.asList("年", "期", "被引年")); String[] allFields = new String[] { "题名", "英文篇名", "作者", "英文作者", "第一责任人", "单位", "来源", "出版单位", "关键词", "英文关键词", "摘要", "英文摘要", "年", "期", "专辑代码", "专题代码", "专题子栏目代码", "专题名称", "分类号", "分类名称", "文件名", "语种", "引证文献", "共引文献", "二级引证文献", "表名", "出版日期", "引证文献数量", "二级参考文献数量", "二级引证文献数量", "共引文献数量", "同被引文献数量", "英文刊名", "ISSN", "CN", "被引年", "参考文献" }; String[] limitField = new String[] {"题名", "作者", "出版单位", "年"}; Map<String, String> fieldFormatMap = new HashMap<String, String >(){{ put("年", "(起始年份 结束年份)"); }}; SearchEngine(){ options = new Options(); options.addOption("h", "help", false, "Print usage information"); options.addOption(createArgOption("i", "index", "Set directory of index.", "Directory")); options.addOption(createArgOption("s", "source", "Set path of source file and create index. You can set mode by using option -m.", "File")); options.addOption(createArgOption("m", "mode", "Index create mode(default mode: create). args: create | append", "Mode")); options.addOption(createArgOption("a", "analyzer", "Set analyzer(default Analyzer: AnsjAnalyzer). args: standard | ansj | cjk", "Analyzer")); options.addOption(createArgOption("w", "word2vec", "Set path of word2vec model and turn on the word association function.", "Directory")); BasicConfigurator.configure(); analyzer = new AnsjAnalyzer(); } void handleArgs(String[] args) { CommandLineParser parser = new DefaultParser(); try{ CommandLine commandLine = parser.parse(options, args); if (commandLine.hasOption('h')){ printUsage(); System.exit(0); } if (commandLine.hasOption('i')){ indexDir = commandLine.getOptionValue('i'); } if (commandLine.hasOption('s')){ sourceDir = commandLine.getOptionValue('s'); } if (commandLine.hasOption("w")){ word2vecDir = commandLine.getOptionValue('w'); } if (commandLine.hasOption('m')){ switch(commandLine.getOptionValue('m')){ case "create" : indexMode = IndexWriterConfig.OpenMode.CREATE; break; case "append" : indexMode = IndexWriterConfig.OpenMode.APPEND; break; default: handleCommandError(); break; } } if (commandLine.hasOption("a")){ switch(commandLine.getOptionValue('a')){ case "standard" : analyzer = new StandardAnalyzer(); break; case "ansj" : break; case "cjk" : analyzer = new CJKAnalyzer(); break; default: handleCommandError(); break; } } if (!legalCommand()) handleCommandError(); } catch(Exception e){ handleCommandError(); } } boolean legalCommand(){ if (indexDir == null) return false; return true; } void handleCommandError(){ printUsage(); System.exit(0); } void printUsage(){ System.out.println("Usage: java Main.java [-options] -i directory"); System.out.println("Options:"); Collection allOpts = options.getOptions(); for (Iterator it = allOpts.iterator(); it.hasNext();){ Option opt = (Option)(it.next()); System.out.println(optionToString(opt)); } } String optionToString(Option opt){ return "-" + opt.getOpt() + " -" + opt.getLongOpt() + " " + (opt.hasArg()? opt.getArgName() : "") + " : " + opt.getDescription(); } Option createArgOption(String opt, String longOpt, String description, String argName){ Option option = new Option(opt, longOpt, true, description); option.setArgName(argName); return option; } void outputDocs(Document[] docs){ System.out.println(docs.length + " results:"); for (Document doc: docs){ for (IndexableField field : doc.getFields()) System.out.println(field.name() + ": " + doc.get(field.name())); System.out.println(""); } System.out.println(""); } String genPromptString(String fieldName){ if (fieldFormatMap.containsKey(fieldName)) return fieldName + fieldFormatMap.get(fieldName); else return fieldName; } void run() throws Exception{ if (sourceDir != null){//建立索引 indexer = new TextFileIndexer(this); indexer.createIndex(); } searcher = new TextSearcher(this); String input; Map<String, String> limitMap = new HashMap<String, String>(); Scanner in = new Scanner(System.in); while(true){ System.out.print("input query: "); input = in.nextLine(); for (String field: limitField){ System.out.print(genPromptString(field) + ":"); limitMap.put(field, in.nextLine()); } outputDocs(searcher.query(input, limitMap)); } } }
[ "vyhuang@tencent.com" ]
vyhuang@tencent.com
efb015cc3c64c1efe407c3971f7b39cae32f61d5
abe1e9f7d3bd03a183de929441578c841c319e16
/app/src/androidTest/java/com/example/homework131/ExampleInstrumentedTest.java
0a6a5c6c8699aa64397bfe3b11b263b90f442ed7
[]
no_license
supernovaw/hw-1-3-1
90449d436519638306bd661d394c8c54475b9e12
01e07c60e3d94ba220afec57416ac8cf30974948
refs/heads/master
2020-12-23T10:39:09.477430
2020-01-30T02:53:36
2020-01-30T02:53:36
237,127,450
0
0
null
null
null
null
UTF-8
Java
false
false
735
java
package com.example.homework131; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.homework131", appContext.getPackageName()); } }
[ "ruszrj@gmail.com" ]
ruszrj@gmail.com
4f1618794959874ce2f0aa4cad0dd3fbcbbb3e8f
d0fe52f6c47f33bba14ae95a0a7966540ee82c9c
/src/package1/TestArrays.java
beaa2f3c5f72bee9797b761ef130a06d03010ae7
[]
no_license
ishan356644/JavaPrograms
baf250292778e1da56b9cc0722b31abdf8121a25
6f666371d73f9f5957b0e7d3259e78b4e2401c2b
refs/heads/master
2020-09-17T05:32:46.337224
2019-02-18T16:50:24
2019-02-18T16:50:24
224,006,999
0
0
null
null
null
null
UTF-8
Java
false
false
507
java
package package1; public class TestArrays { public static void main(String[] args) { // TODO Auto-generated method stub int[] num = new int[5]; num[0]= 23; num[1]= 63; num[2]= 99; num[4]= 100; for(int i = 0;i < num.length;i++){ System.out.println(num[i]); } // For Each Loop for(int i : num){ System.out.println(i); } String[] name = new String[5]; name[0] = "Pune"; name[1] = "Mumbai"; for(String s : name){ System.out.println(s); } } }
[ "kiet.shishu@gmail.com" ]
kiet.shishu@gmail.com
f6a1e945a13962166f494f227ece3ab2d0791545
be1273e7c952ca761d2a8dd8b47c6540be2532c3
/person/src/main/java/com/example/person/controller/JobLogController.java
d5b5cf72969ccb2079e902776902e7e2b4ea7ade
[]
no_license
cctvai/sp-china-pro
27bba83f8a546f8f651a77c44abd6b482f824dab
7acb1f36c5223ec15f2f2300c450d01246e15ffc
refs/heads/master
2020-12-05T10:02:11.065897
2020-01-03T12:38:37
2020-01-03T12:38:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,920
java
package com.example.person.controller; import com.example.person.dto.JobLogAddOrEditInDTO; import com.example.person.dto.JobLogInDTO; import com.example.person.result.Result; import com.example.person.service.JobLogService; import com.example.person.utils.ExceptUtil; import com.example.person.vo.JobLogInfoVo; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import java.util.HashMap; import java.util.List; import java.util.Map; @Slf4j @RestController @RequestMapping("/jobLog") public class JobLogController { @Autowired public JobLogService jobLogService; @RequestMapping(value = "/queryAll", method = RequestMethod.POST) @ResponseBody public Result queryAll(JobLogInDTO inDTO) { log.info("JobLogController.queryAll inDTO =" + inDTO); List<JobLogInfoVo> outList = jobLogService.queryAll(inDTO); Map<String, Object> outMap = new HashMap<>(); outMap.put("total", jobLogService.queryAllTotal(inDTO)); outMap.put("list", outList); log.info("JobLogController.queryAll outMap =" + outMap); return new Result(ExceptUtil.SUCCESS_CODE_200, outMap, null); } @RequestMapping(value = "/addOrEdit", method = RequestMethod.POST) @ResponseBody public void addOrEdit(JobLogAddOrEditInDTO inDTO) { log.info("JobLogController.addOrEdit inDTO =" + inDTO); jobLogService.addOrEdit(inDTO); } @RequestMapping(value = "/delete", method = RequestMethod.GET) @ResponseBody public void delete(String id) { log.info("JobLogController.delete id =" + id); jobLogService.delete(id); } }
[ "3056293188@qq.com" ]
3056293188@qq.com
a57b181d76c1adba4682cf239b377ed3d528ef44
1442d6acb1a9eac4f40426f401decc465df81a0b
/src/main/java/com/trenota/account/web/rest/vm/KeyAndPasswordVM.java
581235c2f01b9b6142cc88280068e6f88d1b7705
[]
no_license
riccardo1990/accountApp
f4ae8eb1d234bc1f61b85aeb5e9bf8aa3f4e53b8
2264f3efc8c1783bb75ed7db9233e0f421ad7449
refs/heads/master
2020-03-23T19:42:10.305904
2018-07-24T17:19:29
2018-07-24T17:19:29
141,997,054
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package com.trenota.account.web.rest.vm; /** * View Model object for storing the user's key and password. */ public class KeyAndPasswordVM { private String key; private String newPassword; public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getNewPassword() { return newPassword; } public void setNewPassword(String newPassword) { this.newPassword = newPassword; } }
[ "riccardo.barbero@capgemini.com" ]
riccardo.barbero@capgemini.com
f05555c6841d4433c64ab691e351969603ef08b8
696ef25e8ec612d29b300be3a2f3a3be2e01035a
/yoholibrary/src/main/spinnerwheel/antistatic/spinnerwheel/adapters/AbstractWheelAdapter.java
64fcd1ab246dc785c8bfd131222f18b44a878c7d
[]
no_license
RainUtopia/School
c3bb7f962fd4cad4a6ef0c8ffb64324371a0fc6b
4e53e940b60a25e5f023a6f14cace32deebae5e8
refs/heads/master
2020-03-25T17:41:13.029161
2015-11-27T04:54:08
2015-11-27T04:54:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,106
java
/* * 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 antistatic.spinnerwheel.adapters; import java.util.LinkedList; import java.util.List; import android.database.DataSetObserver; import android.view.View; import android.view.ViewGroup; /** * Abstract Wheel adapter. */ public abstract class AbstractWheelAdapter implements WheelViewAdapter { // Observers private List<DataSetObserver> datasetObservers; @Override public View getEmptyItem(View convertView, ViewGroup parent) { return null; } @Override public void registerDataSetObserver(DataSetObserver observer) { if (datasetObservers == null) { datasetObservers = new LinkedList<DataSetObserver>(); } datasetObservers.add(observer); } @Override public void unregisterDataSetObserver(DataSetObserver observer) { if (datasetObservers != null) { datasetObservers.remove(observer); } } /** * Notifies observers about data changing */ protected void notifyDataChangedEvent() { if (datasetObservers != null) { for (DataSetObserver observer : datasetObservers) { observer.onChanged(); } } } /** * Notifies observers about invalidating data */ protected void notifyDataInvalidatedEvent() { if (datasetObservers != null) { for (DataSetObserver observer : datasetObservers) { observer.onInvalidated(); } } } }
[ "steven_shine@sina.com" ]
steven_shine@sina.com
4c9e0ef8bcd8913d5ee6522ff36951a833eaad04
dd08849a71940a7cb921dc383e12606e210def97
/src/hackerearth/examples/HaaaaveYouMetTed.java
e63a0e8db82bc2b400c8947695ca32f787ca3a99
[]
no_license
brhmshrnv/Solutions
e3581cf1fc5ac7c391b3f62ef087b55c195ad345
0d3a6124030bbe2a2c5b653fc957eba19b631978
refs/heads/master
2022-12-17T22:52:19.455791
2020-09-26T11:15:52
2020-09-26T11:15:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
package hackerearth.examples; import java.util.Scanner; public class HaaaaveYouMetTed { public static void main(String[] args) { Scanner in = new Scanner(System.in); int testCases = in.nextInt(); for (int t = 1; t <= testCases; t++) { int nos = in.nextInt(); long min = Long.MAX_VALUE; for (int i = 1; i <= nos; i++) { int hammingCode = NumberOfSetBits(in.nextInt()); if (hammingCode < min) { min = hammingCode; } } System.out.println(min); } } static int NumberOfSetBits(int i) { i = i - ((i >> 1) & 0x55555555); i = (i & 0x33333333) + ((i >> 2) & 0x33333333); return (((i + (i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24; } }
[ "Gurpreet-makkar" ]
Gurpreet-makkar
06a50cbb7f18efab446ed680db87b5633bedb6d4
d3270d11af708cdefc2da1b896167168d6a87735
/src/com/rajiv/kthLargestElementInAnArray/KthLargestElementInAnArray.java
19c75684f269fb1b1c1104bd4ca33dfcd4cb32fa
[]
no_license
gyawalirajiv/leetcode-problems
e37e7468087ada7e06de7139829c8074895b140f
6d97f497010ce2a7c91a46d2b7f04d4aeb34f201
refs/heads/master
2023-03-08T22:19:17.495501
2021-02-17T08:49:11
2021-02-17T08:49:11
315,528,030
0
0
null
null
null
null
UTF-8
Java
false
false
635
java
package com.rajiv.kthLargestElementInAnArray; import java.util.Arrays; import java.util.PriorityQueue; import java.util.concurrent.Semaphore; public class KthLargestElementInAnArray { public static void main(String[] args) { System.out.println(findKthLargest(new int[]{3,2,3,1,2,4,5,5,6}, 4)); } public static int findKthLargest(int[] nums, int k) { PriorityQueue<Integer> minHeap = new PriorityQueue<>(); for(int i: nums){ minHeap.add(i); if(minHeap.size() > k){ minHeap.remove(); } } return minHeap.remove(); } }
[ "gyawalirajiv@gmail.com" ]
gyawalirajiv@gmail.com
94e531035c2d61e8cb769b5d859677e1606029eb
3017062f50059d8cb18659287981a7b31ee19280
/src/main/java/com/funtalk/scheduler/SmsResultNoticeJob.java
be1e39c4cab05b4ec92d50bd0bbb740ac175c673
[]
no_license
funtalkTelecom/funtalk-iot-web
e4ee4a8a2c2a66a9b73fb2eee24f658c0b38d1f4
566af392a7afd1ed2e5718b861502ec2bfae6812
refs/heads/master
2022-12-12T11:15:22.043092
2020-09-11T03:55:23
2020-09-11T03:55:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,835
java
package com.funtalk.scheduler; import com.funtalk.mapper.TbSTaskAMapper; import com.funtalk.pojo.SmsNotice; import com.funtalk.pojo.TbSTaskA; import com.funtalk.utils.DateUtil; import com.funtalk.utils.HttpClient4; import net.sf.json.JSONObject; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.util.*; import org.safehaus.uuid.UUID; import org.safehaus.uuid.UUIDGenerator; @Component @ConditionalOnProperty(prefix = "spring.scheduling", name = "enabled", havingValue = "true") public class SmsResultNoticeJob { Logger logger = Logger.getLogger(SmsResultNoticeJob.class); @Autowired TbSTaskAMapper tbSTaskAMapper; /** * 每隔10s查询一次 * developed by simple. */ // @Scheduled(fixedDelay=10000) //fixedRate 任务两次执行时间间隔是任务的开始点. fixedDelay的间隔是前次任务的结束与下次任务的开始. 毫秒 public void smsResultNoticeJob() throws Exception { String smsNoticeSeq="",smsNoticeBack="",state="2",stateMsg=""; UUIDGenerator generator=UUIDGenerator.getInstance(); List<TbSTaskA> subTasks =new ArrayList<TbSTaskA>(); Map<String,Object> paramMap= new HashMap<>(); paramMap.put("json",""); logger.info("The time is:"+ DateUtil.formatFullDate(new Date())+"," + "IOT is performing notice for sms result."); subTasks=tbSTaskAMapper.getNeedNoticeSms(); if (subTasks.size()==0) { logger.info("--smsResultNoticeJob没有需要处理的数据,休息30s--"+Thread.currentThread().getName()); Thread.sleep(30000); } for (TbSTaskA subTask :subTasks){ UUID uuid = generator.generateTimeBasedUUID(); //基于时间版本 smsNoticeSeq = uuid.toString().replaceAll("-", ""); //36位的流水 SmsNotice smsNotice =new SmsNotice(); smsNotice.setUid(smsNoticeSeq); smsNotice.setMobile(subTask.getPhoneB()); smsNotice.setReqseq(subTask.getReqSeq()); if ("4".equals(subTask.getState())) { state = "1"; stateMsg = "发送成功!"; }else stateMsg="发送失败,用户未收到!"; smsNotice.setState(state); smsNotice.setStatemsg(stateMsg); smsNotice.setBacktime(DateUtil.formatFullDate(new Date())); JSONObject json=new JSONObject(); paramMap.put("json",json.fromObject(smsNotice).toString()); try { smsNoticeBack=HttpClient4.doPost(subTask.getNoticeUrl(),paramMap); subTask.setNoticeState("1"); subTask.setNoticeSeq(smsNoticeSeq); subTask.setNoticeTime(new Date()); subTask.setNoticeBack(smsNoticeBack.substring(0,smsNoticeBack.length()>180? 180 : smsNoticeBack.length())); tbSTaskAMapper.updateNoticeStatus(subTask); } catch (Exception e) { logger.error("An error occurred when sending notice message." + e.toString()); subTask.setNoticeState("2"); subTask.setNoticeSeq(smsNoticeSeq); subTask.setNoticeTime(new Date()); subTask.setNoticeBack(smsNoticeBack.substring(0,smsNoticeBack.length()>180? 180 : smsNoticeBack.length())); tbSTaskAMapper.updateNoticeStatus(subTask); } } } }
[ "qiluwxp@126.com" ]
qiluwxp@126.com
0ef81d27fb2da266000723b2827ba31a66029687
f63af04cf321200b1759e76c80ce627992901237
/app/src/main/java/com/vixir/popularmovies/retro/CommentResponse.java
c7981e55148f571fb038e88523d199e92c9ba57b
[]
no_license
vixir/PopularMovies
65d330bc5330af380960d02f43eabc8c0139e3c0
b6bca268695d185ed999f340396ac3b3ee99063f
refs/heads/master
2021-01-12T06:00:32.541538
2017-03-26T19:57:22
2017-03-26T19:57:22
77,277,527
2
0
null
null
null
null
UTF-8
Java
false
false
1,350
java
package com.vixir.popularmovies.retro; import java.util.List; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class CommentResponse { @SerializedName("id") @Expose private Integer id; @SerializedName("page") @Expose private Integer page; @SerializedName("results") @Expose private List<CommentResult> results = null; @SerializedName("total_pages") @Expose private Integer totalPages; @SerializedName("total_results") @Expose private Integer totalResults; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getPage() { return page; } public void setPage(Integer page) { this.page = page; } public List<CommentResult> getResults() { return results; } public void setResults(List<CommentResult> results) { this.results = results; } public Integer getTotalPages() { return totalPages; } public void setTotalPages(Integer totalPages) { this.totalPages = totalPages; } public Integer getTotalResults() { return totalResults; } public void setTotalResults(Integer totalResults) { this.totalResults = totalResults; } }
[ "vivk274@gmail.com" ]
vivk274@gmail.com
77ae2f205cd29932c5fab55dc66a6df4c732b7a4
4f308895cdc94da0ac6a1c062311a376433deb59
/com.id.configuration.remote.proto/src/com/id/configuration/proto/ValueOption.java
c4761bf9c9d97e5028380ed79a02cfb842304325
[]
no_license
pieterjanpintens/grpc-osgi
6ec335ff69ddb55c4ab98bc76e78ba9e6de36f44
44cac988b61dd77120765acf95462600e2eb21d1
refs/heads/master
2021-05-16T17:50:05.072122
2017-09-19T07:31:04
2017-09-19T09:19:39
103,103,208
0
0
null
null
null
null
UTF-8
Java
false
true
21,818
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: remote_configuration.proto package com.id.configuration.proto; /** * Protobuf type {@code ValueOption} */ public final class ValueOption extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ValueOption) ValueOptionOrBuilder { private static final long serialVersionUID = 0L; // Use ValueOption.newBuilder() to construct. private ValueOption(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private ValueOption() { path_ = ""; level_ = 0; type_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ValueOption( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); path_ = s; break; } case 16: { level_ = input.readInt32(); break; } case 24: { int rawValue = input.readEnum(); type_ = rawValue; break; } case 34: { data_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.id.configuration.proto.RemoteConfiguration.internal_static_ValueOption_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.id.configuration.proto.RemoteConfiguration.internal_static_ValueOption_fieldAccessorTable .ensureFieldAccessorsInitialized( com.id.configuration.proto.ValueOption.class, com.id.configuration.proto.ValueOption.Builder.class); } public static final int PATH_FIELD_NUMBER = 1; private volatile java.lang.Object path_; /** * <code>string path = 1;</code> */ public java.lang.String getPath() { java.lang.Object ref = path_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); path_ = s; return s; } } /** * <code>string path = 1;</code> */ public com.google.protobuf.ByteString getPathBytes() { java.lang.Object ref = path_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LEVEL_FIELD_NUMBER = 2; private int level_; /** * <code>int32 level = 2;</code> */ public int getLevel() { return level_; } public static final int TYPE_FIELD_NUMBER = 3; private int type_; /** * <code>.Type type = 3;</code> */ public int getTypeValue() { return type_; } /** * <code>.Type type = 3;</code> */ public com.id.configuration.proto.Type getType() { com.id.configuration.proto.Type result = com.id.configuration.proto.Type.valueOf(type_); return result == null ? com.id.configuration.proto.Type.UNRECOGNIZED : result; } public static final int DATA_FIELD_NUMBER = 4; private com.google.protobuf.ByteString data_; /** * <code>bytes data = 4;</code> */ public com.google.protobuf.ByteString getData() { return data_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getPathBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); } if (level_ != 0) { output.writeInt32(2, level_); } if (type_ != com.id.configuration.proto.Type.VALUE.getNumber()) { output.writeEnum(3, type_); } if (!data_.isEmpty()) { output.writeBytes(4, data_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getPathBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); } if (level_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, level_); } if (type_ != com.id.configuration.proto.Type.VALUE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, type_); } if (!data_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, data_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.id.configuration.proto.ValueOption)) { return super.equals(obj); } com.id.configuration.proto.ValueOption other = (com.id.configuration.proto.ValueOption) obj; boolean result = true; result = result && getPath() .equals(other.getPath()); result = result && (getLevel() == other.getLevel()); result = result && type_ == other.type_; result = result && getData() .equals(other.getData()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); hash = (37 * hash) + LEVEL_FIELD_NUMBER; hash = (53 * hash) + getLevel(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.id.configuration.proto.ValueOption parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.id.configuration.proto.ValueOption parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.id.configuration.proto.ValueOption parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.id.configuration.proto.ValueOption parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.id.configuration.proto.ValueOption parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.id.configuration.proto.ValueOption parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.id.configuration.proto.ValueOption parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.id.configuration.proto.ValueOption parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.id.configuration.proto.ValueOption parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.id.configuration.proto.ValueOption parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.id.configuration.proto.ValueOption parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.id.configuration.proto.ValueOption parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.id.configuration.proto.ValueOption prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code ValueOption} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:ValueOption) com.id.configuration.proto.ValueOptionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.id.configuration.proto.RemoteConfiguration.internal_static_ValueOption_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.id.configuration.proto.RemoteConfiguration.internal_static_ValueOption_fieldAccessorTable .ensureFieldAccessorsInitialized( com.id.configuration.proto.ValueOption.class, com.id.configuration.proto.ValueOption.Builder.class); } // Construct using com.id.configuration.proto.ValueOption.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); path_ = ""; level_ = 0; type_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.id.configuration.proto.RemoteConfiguration.internal_static_ValueOption_descriptor; } public com.id.configuration.proto.ValueOption getDefaultInstanceForType() { return com.id.configuration.proto.ValueOption.getDefaultInstance(); } public com.id.configuration.proto.ValueOption build() { com.id.configuration.proto.ValueOption result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.id.configuration.proto.ValueOption buildPartial() { com.id.configuration.proto.ValueOption result = new com.id.configuration.proto.ValueOption(this); result.path_ = path_; result.level_ = level_; result.type_ = type_; result.data_ = data_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.id.configuration.proto.ValueOption) { return mergeFrom((com.id.configuration.proto.ValueOption)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.id.configuration.proto.ValueOption other) { if (other == com.id.configuration.proto.ValueOption.getDefaultInstance()) return this; if (!other.getPath().isEmpty()) { path_ = other.path_; onChanged(); } if (other.getLevel() != 0) { setLevel(other.getLevel()); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.getData() != com.google.protobuf.ByteString.EMPTY) { setData(other.getData()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.id.configuration.proto.ValueOption parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.id.configuration.proto.ValueOption) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object path_ = ""; /** * <code>string path = 1;</code> */ public java.lang.String getPath() { java.lang.Object ref = path_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); path_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string path = 1;</code> */ public com.google.protobuf.ByteString getPathBytes() { java.lang.Object ref = path_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string path = 1;</code> */ public Builder setPath( java.lang.String value) { if (value == null) { throw new NullPointerException(); } path_ = value; onChanged(); return this; } /** * <code>string path = 1;</code> */ public Builder clearPath() { path_ = getDefaultInstance().getPath(); onChanged(); return this; } /** * <code>string path = 1;</code> */ public Builder setPathBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); path_ = value; onChanged(); return this; } private int level_ ; /** * <code>int32 level = 2;</code> */ public int getLevel() { return level_; } /** * <code>int32 level = 2;</code> */ public Builder setLevel(int value) { level_ = value; onChanged(); return this; } /** * <code>int32 level = 2;</code> */ public Builder clearLevel() { level_ = 0; onChanged(); return this; } private int type_ = 0; /** * <code>.Type type = 3;</code> */ public int getTypeValue() { return type_; } /** * <code>.Type type = 3;</code> */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /** * <code>.Type type = 3;</code> */ public com.id.configuration.proto.Type getType() { com.id.configuration.proto.Type result = com.id.configuration.proto.Type.valueOf(type_); return result == null ? com.id.configuration.proto.Type.UNRECOGNIZED : result; } /** * <code>.Type type = 3;</code> */ public Builder setType(com.id.configuration.proto.Type value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /** * <code>.Type type = 3;</code> */ public Builder clearType() { type_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** * <code>bytes data = 4;</code> */ public com.google.protobuf.ByteString getData() { return data_; } /** * <code>bytes data = 4;</code> */ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } data_ = value; onChanged(); return this; } /** * <code>bytes data = 4;</code> */ public Builder clearData() { data_ = getDefaultInstance().getData(); onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:ValueOption) } // @@protoc_insertion_point(class_scope:ValueOption) private static final com.id.configuration.proto.ValueOption DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.id.configuration.proto.ValueOption(); } public static com.id.configuration.proto.ValueOption getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<ValueOption> PARSER = new com.google.protobuf.AbstractParser<ValueOption>() { public ValueOption parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ValueOption(input, extensionRegistry); } }; public static com.google.protobuf.Parser<ValueOption> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<ValueOption> getParserForType() { return PARSER; } public com.id.configuration.proto.ValueOption getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
[ "Pieter-Jan@Arutha" ]
Pieter-Jan@Arutha
28c48696044c3c2962b4a0de44c9ca61cfc5685b
5595a28469b05145089cba6f7babe7a342c3407c
/user/src/main/java/org/tessell/widgets/StubWidgetsProvider.java
bd4086b7bde314ba95ac3d30641a9cfed169ba84
[ "Apache-2.0" ]
permissive
stephenh/tessell
c8078e92e0e8738a842e7edb51f7a88366458a28
27e03c18b5f271fcdb12984f9a7dfbc4a26b912f
refs/heads/master
2021-10-30T08:02:13.928182
2016-08-03T13:09:58
2016-08-03T13:09:58
766,240
18
11
NOASSERTION
2021-08-17T15:16:43
2010-07-09T16:23:28
Java
UTF-8
Java
false
false
6,261
java
package org.tessell.widgets; import org.tessell.gwt.animation.client.AnimationLogic; import org.tessell.gwt.animation.client.IsAnimation; import org.tessell.gwt.animation.client.StubAnimation; import org.tessell.gwt.animation.client.StubAnimations; import org.tessell.gwt.dom.client.IsElement; import org.tessell.gwt.dom.client.StubElement; import org.tessell.gwt.user.client.*; import org.tessell.gwt.user.client.ui.*; import org.tessell.place.history.IsHistory; import org.tessell.place.history.StubHistory; import org.tessell.widgets.cellview.IsCellList; import org.tessell.widgets.cellview.IsCellTable; import org.tessell.widgets.cellview.StubCellList; import org.tessell.widgets.cellview.StubCellTable; import com.google.gwt.cell.client.Cell; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.user.cellview.client.CellTable.Resources; import com.google.gwt.user.client.ui.SuggestBox.SuggestionDisplay; import com.google.gwt.user.client.ui.SuggestOracle; /** A Widget factory. */ public class StubWidgetsProvider implements WidgetsProvider { public static void install() { Widgets.setProvider(new StubWidgetsProvider()); } private final StubWindow window = new StubWindow(); private final StubCookies cookies = new StubCookies(); private final StubHistory history = new StubHistory(); private final StubAbsolutePanel root = new StubAbsolutePanel(); @Override public IsTimer newTimer(Runnable runnable) { return new StubTimer(runnable); } @Override public IsAnimation newAnimation(AnimationLogic logic) { StubAnimation a = new StubAnimation(logic); StubAnimations.captureIfNeeded(a); return a; } @Override public IsWindow getWindow() { return window; } @Override public IsElement newElement(String tag) { return new StubElement(); } @Override public IsTextArea newTextArea() { return new StubTextArea(); } @Override public IsTextBox newTextBox() { return new StubTextBox(); } @Override public IsTextList newTextList() { return new StubTextList(); } @Override public IsAnchor newAnchor() { return new StubAnchor(); } @Override public IsHyperlink newHyperline() { return new StubHyperlink(); } @Override public IsInlineHyperlink newInlineHyperlink() { return new StubInlineHyperlink(); } @Override public IsInlineLabel newInlineLabel() { return new StubInlineLabel(); } @Override public IsImage newImage() { return new StubImage(); } @Override public IsFlowPanel newFlowPanel() { return new StubFlowPanel(); } @Override public IsScrollPanel newScrollPanel() { return new StubScrollPanel(); } @Override public IsTabLayoutPanel newTabLayoutPanel(double barHeight, Unit barUnit) { return new StubTabLayoutPanel(); } @Override public IsFadingDialogBox newFadingDialogBox() { return new StubFadingDialogBox(); } @Override public IsHTML newHTML() { return new StubHTML(); } @Override public IsHTMLPanel newHTMLPanel(String html) { return new StubHTMLPanel(html); } @Override public IsHTMLPanel newHTMLPanel(String tag, String html) { return new StubHTMLPanel(tag, html); } @Override public <T> IsCellTable<T> newCellTable() { return new StubCellTable<T>(); } @Override public <T> IsCellTable<T> newCellTable(int pageSize, Resources resources) { return new StubCellTable<T>(pageSize); } @Override public <T> IsCellList<T> newCellList(Cell<T> cell) { return new StubCellList<T>(cell); } @Override public IsCheckBox newCheckBox() { return new StubCheckBox(); } @Override public IsPasswordTextBox newPasswordTextBox() { return new StubPasswordTextBox(); } @Override public IsPopupPanel newPopupPanel() { return new StubPopupPanel(); } @Override public IsFocusPanel newFocusPanel() { return new StubFocusPanel(); } @Override public IsLabel newLabel() { return new StubLabel(); } @Override public IsCookies getCookies() { return cookies; } @Override public IsHistory getHistory() { return history; } @Override public IsAbsolutePanel newAbsolutePanel() { return new StubAbsolutePanel(); } @Override public IsAbsolutePanel getRootPanel() { return root; } @Override public IsInlineHTML newInlineHTML() { return new StubInlineHTML(); } @Override public IsButton newButton() { return new StubButton(); } @Override public IsSuggestBox newSuggestBox(SuggestOracle oracle) { return new StubSuggestBox(oracle); } @Override public IsSuggestBox newSuggestBox(SuggestOracle oracle, IsTextBoxBase box) { return new StubSuggestBox(oracle); } @Override public IsSuggestBox newSuggestBox(SuggestOracle oracle, IsTextBoxBase box, SuggestionDisplay display) { return new StubSuggestBox(oracle, display); } @Override public IsDockLayoutPanel newDockLayoutPanel(Unit unit) { return new StubDockLayoutPanel(); } @Override public IsSimplePanel newSimplePanel() { return new StubSimplePanel(); } @Override public IsListBox newListBox() { return new StubListBox(); } @Override public <T> IsDataGrid<T> newDataGrid() { return new StubDataGrid<T>(); } @Override public <T> IsDataGrid<T> newDataGrid(int pageSize, com.google.gwt.user.cellview.client.DataGrid.Resources resources) { return new StubDataGrid<T>(pageSize); } @Override public IsResizeLayoutPanel newResizeLayoutPanel() { return new StubResizeLayoutPanel(); } @Override public IsSimpleCheckBox newSimpleCheckBox() { return new StubSimpleCheckBox(); } @Override public IsRadioButton newRadioButton(String name) { return new StubRadioButton(); } @Override public IsSimpleRadioButton newSimpleRadioButton(String name) { return new StubSimpleRadioButton(); } @Override public IsElementWidget newElementWidget(String tag) { return new StubElementWidget(new StubElement()); } @Override public IsElementWidget newElementWidget(IsElement element) { return new StubElementWidget((StubElement) element); } @Override public IsFrame newFrame() { return new StubFrame(); } }
[ "stephen@exigencecorp.com" ]
stephen@exigencecorp.com
19731dd0b9f07196f36f36dcf5993e8dc0c5ad21
bace31aab2aa164a0249c271f7cf7ba9a1503d04
/app/src/main/java/com/tiendas3b/almacen/dto/receipt/FhojaReciboDetTempDTO.java
387603de5993cc33a847df832105669c9691b532
[]
no_license
opelayoa/Project
a8fab2a6f759f076fd52989e8917f2c02915096b
43788f12e3c7ea39a8bab8e35e85b74ff6c9f9fa
refs/heads/master
2020-04-10T07:33:17.768276
2019-01-04T22:02:31
2019-01-04T22:02:31
160,883,293
0
0
null
null
null
null
UTF-8
Java
false
false
833
java
package com.tiendas3b.almacen.dto.receipt; public class FhojaReciboDetTempDTO { private int num_pallets; private int cantidad_em; private int iclave; public FhojaReciboDetTempDTO(int num_pallets, int cantidad_em, int iclave) { this.num_pallets = num_pallets; this.cantidad_em = cantidad_em; this.iclave = iclave; } public int getNum_pallets() { return num_pallets; } public void setNum_pallets(int num_pallets) { this.num_pallets = num_pallets; } public int getCantidad_em() { return cantidad_em; } public void setCantidad_em(int cantidad_em) { this.cantidad_em = cantidad_em; } public int getIclave() { return iclave; } public void setIclave(int iclave) { this.iclave = iclave; } }
[ "od.pelayo@gmail.com" ]
od.pelayo@gmail.com
20b6bf2d85f842100e9f23e590674ea84170b40c
688dc795e868242e5cab9e2aa5af64f85428c199
/discountapp/src/main/java/com/sincrodigital/services/DiscountServiceImpl.java
1e0a3e4c2375d44437289aaa3bcf8d0a7337b020
[]
no_license
gitofvivek/discountapp
07a6f0adcec53f2ee25e7dcf239e41803cd42198
093391eb1838e455efe1bd5aa8c7ab67c027c385
refs/heads/master
2022-12-19T11:59:38.714846
2020-09-27T10:12:58
2020-09-27T10:12:58
299,004,109
0
0
null
null
null
null
UTF-8
Java
false
false
703
java
package com.sincrodigital.services; import com.sincrodigital.factory.Customer; import static com.sincrodigital.factory.CustomerFactory.getCustomer; import com.sincrodigital.utils.CalculationUtility; import org.springframework.stereotype.Service; @Service public class DiscountServiceImpl implements DiscountService { @Override public Double purchase(String customerType, double purchaseAmount) { Customer customer= getCustomer(customerType); double applicableDiscount = customer.applyDiscount(purchaseAmount); double billAmount = CalculationUtility.calculateBiilingAmount(applicableDiscount, purchaseAmount); return billAmount; } }
[ "kmrvivek3@gmail.com" ]
kmrvivek3@gmail.com
8ab7d8648a7f28ff35468445684f197cb5a0474a
9985cef4a3ef9431e54f65afd68b2703f0265c8a
/src/test/java/com/Datadriven/ReadandWriteExcel.java
67b8d42edfb8d536f638d55c2a4b1bf8fd795017
[]
no_license
Shiva2711/RummyBaazi
4c5fad302c4a26dbce45adcf3da4a4618e1862a9
bd32f79b6e338964192adc37712037467546cceb
refs/heads/master
2023-06-06T03:44:55.534497
2021-06-28T04:30:51
2021-06-28T04:30:51
359,725,605
0
0
null
null
null
null
UTF-8
Java
false
false
1,369
java
package com.Datadriven; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.ss.util.NumberToTextConverter; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class ReadandWriteExcel { public static void main(String[] args) throws IOException { FileInputStream fis = new FileInputStream("C:\\Users\\rshiv\\git\\RummyBaaziProject\\data\\TestData.xlsx"); XSSFWorkbook workbook = new XSSFWorkbook(fis); XSSFSheet sheet =workbook.getSheetAt(0); System.out.println(sheet.getRow(0).getCell(0).getStringCellValue()); System.out.println(sheet.getRow(0).getCell(1).getStringCellValue()); System.out.println(sheet.getRow(1).getCell(0).getStringCellValue()); System.out.println((NumberToTextConverter.toText(sheet.getRow(1).getCell(1).getNumericCellValue()))); System.out.println(sheet.getRow(2).getCell(0).getStringCellValue()); System.out.println(sheet.getRow(2).getCell(1).getStringCellValue()); sheet.getRow(3).getCell(0).setCellValue("rbtest53"); sheet.getRow(3).getCell(1).setCellValue("Test@123"); FileOutputStream fos = new FileOutputStream("C:\\\\Users\\\\rshiv\\\\git\\\\RummyBaaziProject\\\\data\\\\TestData.xlsx"); workbook.write(fos); fos.close(); } }
[ "shiva.rcse@gmail.com" ]
shiva.rcse@gmail.com
ab5c0e769899f7ac3e5479261382a6ac603e134d
e61d0ecb7db37f25d0b8f160a0d16de9f911d2e6
/Day01继承&修饰/src/cn/itcast/myExtends/itheima_02/Demo.java
ed53764428f52a78c745cfbdcd56ebce41b237fe
[]
no_license
LoveXianYu/Four-days-before-the-employment-class
1540dd50c2c4c80cf678b24a1b5ccf30ccd2da05
ae142de34128cd0fed326f34da0199ccf3f3168b
refs/heads/master
2020-06-02T09:50:03.586021
2019-06-10T07:31:10
2019-06-10T07:31:10
191,119,410
0
0
null
null
null
null
UTF-8
Java
false
false
216
java
package cn.itcast.myExtends.itheima_02; /* 测试类 */ public class Demo { public static void main(String[] args) { //创建对象,调用方法 Zi z = new Zi(); z.show(); } }
[ "1617964770@qq.com" ]
1617964770@qq.com
f37d3297e83144cbb2e7c7b0ce778f743a818249
1be3d9984222e0726ffbe23c40d11d3038898863
/Behavioral/iterator/src/main/java/com/pmareke/interfaces/Container.java
146e529f7c7b8b7dacda75af852f9a51b6632094
[ "CC-BY-4.0" ]
permissive
Mayuresh-ATOS/design-patterns-in-java-for-humans
5a7be34222f3be19329b42c22bb89cb23de08139
7f53c576df281912a1327345368df288c3072c92
refs/heads/master
2022-04-21T20:06:27.746321
2019-08-14T16:07:26
2019-08-14T16:07:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
99
java
package com.pmareke.interfaces; public interface Container { public Iterator getIterator(); }
[ "pedro.lopez.mareque@gmail.com" ]
pedro.lopez.mareque@gmail.com
a68d023fe4b50ac7c3f71393304f95b3d53b5452
70e3a111dbd72ff0ec9134dbef332668673e2ef5
/M3-UF5-P1/src/programa/musica/Percussió.java
14f52b1d96055c6394f0845a0defb6d1ce9dba64
[]
no_license
IvanMorenoMora97/Mis-proyectos
131cd669314aa8223466ca58e999ac52fd6b6d07
2f9783de7cb1e60e098e608bb07d3e0806a12a7d
refs/heads/master
2022-04-18T15:35:15.438697
2020-04-13T14:06:45
2020-04-13T14:06:45
212,896,713
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
64
java
package programa.musica; public abstract class Percussió { }
[ "48072126+IvanMorenoMora97@users.noreply.github.com" ]
48072126+IvanMorenoMora97@users.noreply.github.com
876e1a0bbf50e9de6f47b3cc338c6b714767f89b
665f0f5c68b0657b7ec304cd7393c8343df2b0d0
/Week2/app/src/main/java/com/example/myapplication/bean/Bean.java
88be4f96cd8ce0617e5961d5a55854e7645a32a7
[]
no_license
gujianlong/lianx
e2268d5815b89ca7f12a2ba1fb6b808a68b419ff
43684531b0724beea8a94813deba96c644a41c44
refs/heads/master
2021-01-27T00:54:31.434735
2020-03-06T08:48:12
2020-03-06T08:48:12
243,470,216
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
package com.example.myapplication.bean; /* *@auther:谷建龙 *@Date: 2019/12/30 *@Time:15:43 *@Description: * */ public class Bean { private String name; private int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public Bean(String name, int age) { this.name = name; this.age = age; } }
[ "gjl2879905137@163.com" ]
gjl2879905137@163.com
af56d2a75339ab64edadaa64a5ddd831144c6d0c
9bbfe6c0a4533896124969934062ae0e15e130aa
/JavaDemos/JavaIOTest/src/FileReaderWriter.java
53c438094a10e4faa5bd28c3b66ebf67ee07c6f9
[]
no_license
won-now/Practices-and-Demos
fc0990262ecab3b6a9873e2c4c057837cdb07a66
73cf9afc302dee717a117032fe1c66aaec239bad
refs/heads/master
2020-08-21T11:48:44.216028
2019-12-04T08:48:01
2019-12-04T08:48:01
216,153,091
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
import java.io.*; public class FileReaderWriter { public static void main(String[] args) { try { FileReader fr = new FileReader("chartest_buff.txt"); FileWriter fw = new FileWriter("file_writer.txt"); BufferedReader br = new BufferedReader(fr); BufferedWriter bw = new BufferedWriter(fw); String line; while ((line = br.readLine()) != null){ bw.write(line + "\n"); } bw.flush(); bw.close(); br.close(); fw.close(); fr.close(); }catch (IOException e){ e.printStackTrace(); } } }
[ "won-now@users.noreply.github.com" ]
won-now@users.noreply.github.com
cac3e81d6f3d4225ea14fb70aaea54e77dbca443
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_85a5a49118c6a7d8bd5c4b009559eb7b6cc27e1d/EclipsePreferences/2_85a5a49118c6a7d8bd5c4b009559eb7b6cc27e1d_EclipsePreferences_t.java
2bb99c71b804ea10a74e2f8f4151e5d6483099b2
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
37,790
java
/******************************************************************************* * Copyright (c) 2004, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Julian Chen - fix for bug #92572, jclRM *******************************************************************************/ package org.eclipse.core.internal.preferences; import java.io.*; import java.util.*; import org.eclipse.core.internal.runtime.*; import org.eclipse.core.runtime.*; import org.eclipse.core.runtime.preferences.*; import org.eclipse.osgi.util.NLS; import org.osgi.service.prefs.BackingStoreException; import org.osgi.service.prefs.Preferences; /** * Represents a node in the Eclipse preference node hierarchy. This class * is used as a default implementation/super class for those nodes which * belong to scopes which are contributed by the Platform. * * Implementation notes: * * - For thread safety, we always synchronize on the node object when writing * the children or properties fields. Must ensure we don't synchronize when calling * client code such as listeners. * * @since 3.0 */ public class EclipsePreferences implements IEclipsePreferences, IScope { public static final String DEFAULT_PREFERENCES_DIRNAME = ".settings"; //$NON-NLS-1$ public static final String PREFS_FILE_EXTENSION = "prefs"; //$NON-NLS-1$ protected static final IEclipsePreferences[] EMPTY_NODE_ARRAY = new IEclipsePreferences[0]; private static final String[] EMPTY_STRING_ARRAY = new String[0]; private static final String FALSE = "false"; //$NON-NLS-1$ private static final String TRUE = "true"; //$NON-NLS-1$ protected static final String VERSION_KEY = "eclipse.preferences.version"; //$NON-NLS-1$ protected static final String VERSION_VALUE = "1"; //$NON-NLS-1$ protected static final String PATH_SEPARATOR = String.valueOf(IPath.SEPARATOR); protected static final String DOUBLE_SLASH = "//"; //$NON-NLS-1$ protected static final String EMPTY_STRING = ""; //$NON-NLS-1$ private String cachedPath; protected Map children; protected boolean dirty = false; protected boolean loading = false; protected final String name; // the parent of an EclipsePreference node is always an EclipsePreference node. (or null) protected final EclipsePreferences parent; protected HashMapOfString properties; protected boolean removed = false; private ListenerList nodeChangeListeners; private ListenerList preferenceChangeListeners; public EclipsePreferences() { this(null, null); } protected EclipsePreferences(EclipsePreferences parent, String name) { super(); this.parent = parent; this.name = name; } /* * @see org.osgi.service.prefs.Preferences#absolutePath() */ public String absolutePath() { if (cachedPath == null) { if (parent == null) cachedPath = PATH_SEPARATOR; else { String parentPath = parent.absolutePath(); // if the parent is the root then we don't have to add a separator // between the parent path and our path if (parentPath.length() == 1) cachedPath = parentPath + name(); else cachedPath = parentPath + PATH_SEPARATOR + name(); } } return cachedPath; } public void accept(IPreferenceNodeVisitor visitor) throws BackingStoreException { if (!visitor.visit(this)) return; IEclipsePreferences[] toVisit = getChildren(true); for (int i = 0; i < toVisit.length; i++) toVisit[i].accept(visitor); } protected synchronized IEclipsePreferences addChild(String childName, IEclipsePreferences child) { //Thread safety: synchronize method to protect modification of children field if (children == null) children = Collections.synchronizedMap(new HashMap()); children.put(childName, child == null ? (Object) childName : child); return child; } /* * @see org.eclipse.core.runtime.IEclipsePreferences#addNodeChangeListener(org.eclipse.core.runtime.IEclipsePreferences.INodeChangeListener) */ public void addNodeChangeListener(INodeChangeListener listener) { checkRemoved(); if (nodeChangeListeners == null) nodeChangeListeners = new ListenerList(); nodeChangeListeners.add(listener); if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Added preference node change listener: " + listener + " to: " + absolutePath()); //$NON-NLS-1$ //$NON-NLS-2$ } /* * @see org.eclipse.core.runtime.IEclipsePreferences#addPreferenceChangeListener(org.eclipse.core.runtime.IEclipsePreferences.IPreferenceChangeListener) */ public void addPreferenceChangeListener(IPreferenceChangeListener listener) { checkRemoved(); if (preferenceChangeListeners == null) preferenceChangeListeners = new ListenerList(); preferenceChangeListeners.add(listener); if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Added preference property change listener: " + listener + " to: " + absolutePath()); //$NON-NLS-1$ //$NON-NLS-2$ } private IEclipsePreferences calculateRoot() { IEclipsePreferences result = this; while (result.parent() != null) result = (IEclipsePreferences) result.parent(); return result; } /* * Convenience method for throwing an exception when methods * are called on a removed node. */ protected void checkRemoved() { if (removed) { throw new IllegalStateException(NLS.bind(Messages.preferences_removedNode, name)); } } /* * @see org.osgi.service.prefs.Preferences#childrenNames() */ public String[] childrenNames() { // illegal state if this node has been removed checkRemoved(); return internalChildNames(); } protected String[] internalChildNames() { Map temp = children; if (temp == null || temp.size() == 0) return EMPTY_STRING_ARRAY; return (String[]) temp.keySet().toArray(EMPTY_STRING_ARRAY); } /* * @see org.osgi.service.prefs.Preferences#clear() */ public void clear() { // illegal state if this node has been removed checkRemoved(); HashMapOfString temp = properties; if (temp == null) return; // call each one separately (instead of Properties.clear) so // clients get change notification String[] keys = temp.keys(); for (int i = 0; i < keys.length; i++) remove(keys[i]); //Thread safety: protect against concurrent modification synchronized (this) { properties = null; } makeDirty(); } protected String[] computeChildren(IPath root) { if (root == null) return EMPTY_STRING_ARRAY; IPath dir = root.append(DEFAULT_PREFERENCES_DIRNAME); final ArrayList result = new ArrayList(); final String extension = '.' + PREFS_FILE_EXTENSION; File file = dir.toFile(); File[] totalFiles = file.listFiles(); if (totalFiles != null) { for (int i = 0; i < totalFiles.length; i++) { if (totalFiles[i].isFile()) { String filename = totalFiles[i].getName(); if (filename.endsWith(extension)) { String shortName = filename.substring(0, filename.length() - extension.length()); result.add(shortName); } } } } return (String[]) result.toArray(EMPTY_STRING_ARRAY); } protected IPath computeLocation(IPath root, String qualifier) { return root == null ? null : root.append(DEFAULT_PREFERENCES_DIRNAME).append(qualifier).addFileExtension(PREFS_FILE_EXTENSION); } /* * Version 1 (current version) * path/key=value */ protected static void convertFromProperties(EclipsePreferences node, Properties table, boolean notify) { String version = table.getProperty(VERSION_KEY); if (version == null || !VERSION_VALUE.equals(version)) { // ignore for now } table.remove(VERSION_KEY); for (Iterator i = table.keySet().iterator(); i.hasNext();) { String fullKey = (String) i.next(); String value = table.getProperty(fullKey); if (value != null) { String[] splitPath = decodePath(fullKey); String path = splitPath[0]; path = makeRelative(path); String key = splitPath[1]; if (InternalPlatform.DEBUG_PREFERENCE_SET) Policy.debug("Setting preference: " + path + '/' + key + '=' + value); //$NON-NLS-1$ //use internal methods to avoid notifying listeners EclipsePreferences childNode = (EclipsePreferences) node.internalNode(path, false, null); String oldValue = childNode.internalPut(key, value); // notify listeners if applicable if (notify && !value.equals(oldValue)) node.firePreferenceEvent(key, oldValue, value); } } PreferencesService.getDefault().shareStrings(); } /* * Helper method to convert this node to a Properties file suitable * for persistence. */ protected Properties convertToProperties(Properties result, String prefix) throws BackingStoreException { // add the key/value pairs from this node HashMapOfString temp = properties; boolean addSeparator = prefix.length() != 0; if (temp != null) { synchronized (temp) { String[] keys = temp.keys(); for (int i = 0; i < keys.length; i++) { String value = temp.get(keys[i]); if (value != null) result.put(encodePath(prefix, keys[i]), value); } } } // recursively add the child information IEclipsePreferences[] childNodes = getChildren(true); for (int i = 0; i < childNodes.length; i++) { EclipsePreferences child = (EclipsePreferences) childNodes[i]; String fullPath = addSeparator ? prefix + PATH_SEPARATOR + child.name() : child.name(); child.convertToProperties(result, fullPath); } PreferencesService.getDefault().shareStrings(); return result; } /* * @see org.eclipse.core.runtime.preferences.IScope#create(org.eclipse.core.runtime.preferences.IEclipsePreferences) */ public IEclipsePreferences create(IEclipsePreferences nodeParent, String nodeName) { return create((EclipsePreferences) nodeParent, nodeName, null); } protected boolean isLoading() { return loading; } protected void setLoading(boolean isLoading) { loading = isLoading; } public IEclipsePreferences create(EclipsePreferences nodeParent, String nodeName, Plugin context) { EclipsePreferences result = internalCreate(nodeParent, nodeName, context); nodeParent.addChild(nodeName, result); IEclipsePreferences loadLevel = result.getLoadLevel(); // if this node or a parent node is not the load level then return if (loadLevel == null) return result; // if the result node is not a load level, then a child must be if (result != loadLevel) return result; // the result node is a load level if (isAlreadyLoaded(result) || result.isLoading()) return result; try { result.setLoading(true); result.loadLegacy(); result.load(); result.loaded(); result.flush(); } catch (BackingStoreException e) { IPath location = result.getLocation(); String message = NLS.bind(Messages.preferences_loadException, location == null ? EMPTY_STRING : location.toString()); IStatus status = new Status(IStatus.ERROR, Platform.PI_RUNTIME, IStatus.ERROR, message, e); InternalPlatform.getDefault().log(status); } finally { result.setLoading(false); } return result; } /* * @see org.osgi.service.prefs.Preferences#flush() */ public void flush() throws BackingStoreException { // illegal state if this node has been removed checkRemoved(); IEclipsePreferences loadLevel = getLoadLevel(); // if this node or a parent is not the load level, then flush the children if (loadLevel == null) { String[] childrenNames = childrenNames(); for (int i = 0; i < childrenNames.length; i++) node(childrenNames[i]).flush(); return; } // a parent is the load level for this node if (this != loadLevel) { loadLevel.flush(); return; } // this node is a load level // any work to do? if (!dirty) return; //remove dirty bit before saving, to ensure that concurrent //changes during save mark the store as dirty dirty = false; try { save(); } catch (BackingStoreException e) { //mark it dirty again because the save failed dirty = true; throw e; } } /* * @see org.osgi.service.prefs.Preferences#get(java.lang.String, java.lang.String) */ public String get(String key, String defaultValue) { String value = internalGet(key); return value == null ? defaultValue : value; } /* * @see org.osgi.service.prefs.Preferences#getBoolean(java.lang.String, boolean) */ public boolean getBoolean(String key, boolean defaultValue) { String value = internalGet(key); return value == null ? defaultValue : TRUE.equalsIgnoreCase(value); } /* * @see org.osgi.service.prefs.Preferences#getByteArray(java.lang.String, byte[]) */ public byte[] getByteArray(String key, byte[] defaultValue) { String value = internalGet(key); return value == null ? defaultValue : Base64.decode(value.getBytes()); } /* * Return a boolean value indicating whether or not a child with the given * name is known to this node. */ protected synchronized boolean childExists(String childName) { if (children == null) return false; return children.get(childName) != null; } /** * Thread safe way to obtain a child for a given key. Returns the child * that matches the given key, or null if there is no matching child. */ protected IEclipsePreferences getChild(String key, Plugin context, boolean create) { synchronized (this) { if (children == null) return null; Object value = children.get(key); if (value == null) return null; if (value instanceof IEclipsePreferences) return (IEclipsePreferences) value; // if we aren't supposed to create this node, then // just return null if (!create) return null; } return addChild(key, create(this, key, context)); } /** * Thread safe way to obtain all children of this node. Never returns null. */ protected IEclipsePreferences[] getChildren(boolean create) { ArrayList result = new ArrayList(); String[] names = internalChildNames(); for (int i = 0; i < names.length; i++) { IEclipsePreferences child = getChild(names[i], null, create); if (child != null) result.add(child); } return (IEclipsePreferences[]) result.toArray(EMPTY_NODE_ARRAY); } /* * @see org.osgi.service.prefs.Preferences#getDouble(java.lang.String, double) */ public double getDouble(String key, double defaultValue) { String value = internalGet(key); double result = defaultValue; if (value != null) try { result = Double.parseDouble(value); } catch (NumberFormatException e) { // use default } return result; } /* * @see org.osgi.service.prefs.Preferences#getFloat(java.lang.String, float) */ public float getFloat(String key, float defaultValue) { String value = internalGet(key); float result = defaultValue; if (value != null) try { result = Float.parseFloat(value); } catch (NumberFormatException e) { // use default } return result; } /* * @see org.osgi.service.prefs.Preferences#getInt(java.lang.String, int) */ public int getInt(String key, int defaultValue) { String value = internalGet(key); int result = defaultValue; if (value != null) try { result = Integer.parseInt(value); } catch (NumberFormatException e) { // use default } return result; } protected IEclipsePreferences getLoadLevel() { return null; } /* * Subclasses to over-ride */ protected IPath getLocation() { return null; } /* * @see org.osgi.service.prefs.Preferences#getLong(java.lang.String, long) */ public long getLong(String key, long defaultValue) { String value = internalGet(key); long result = defaultValue; if (value != null) try { result = Long.parseLong(value); } catch (NumberFormatException e) { // use default } return result; } protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Plugin context) { return new EclipsePreferences(nodeParent, nodeName); } /** * Returns the existing value at the given key, or null if * no such value exists. */ protected String internalGet(String key) { // throw NPE if key is null if (key == null) throw new NullPointerException(); // illegal state if this node has been removed checkRemoved(); //Thread safety: copy field reference in case of concurrent modification HashMapOfString temp = properties; if (temp == null) { if (InternalPlatform.DEBUG_PREFERENCE_GET) Policy.debug("Getting preference value: " + absolutePath() + '/' + key + "->null"); //$NON-NLS-1$ //$NON-NLS-2$ return null; } String result = temp.get(key); if (InternalPlatform.DEBUG_PREFERENCE_GET) Policy.debug("Getting preference value: " + absolutePath() + '/' + key + "->" + result); //$NON-NLS-1$ //$NON-NLS-2$ return result; } /** * Implements the node(String) method, and optionally notifies listeners. */ protected IEclipsePreferences internalNode(String path, boolean notify, Plugin context) { // illegal state if this node has been removed checkRemoved(); // short circuit this node if (path.length() == 0) return this; // if we have an absolute path use the root relative to // this node instead of the global root // in case we have a different hierarchy. (e.g. export) if (path.charAt(0) == IPath.SEPARATOR) return (IEclipsePreferences) calculateRoot().node(path.substring(1)); int index = path.indexOf(IPath.SEPARATOR); String key = index == -1 ? path : path.substring(0, index); boolean added = false; IEclipsePreferences child = getChild(key, context, true); if (child == null) { child = create(this, key, context); added = true; } // notify listeners if a child was added if (added && notify) fireNodeEvent(new NodeChangeEvent(this, child), true); return (IEclipsePreferences) child.node(index == -1 ? EMPTY_STRING : path.substring(index + 1)); } /** * Stores the given (key,value) pair, performing lazy initialization of the * properties field if necessary. Returns the old value for the given key, * or null if no value existed. */ protected synchronized String internalPut(String key, String newValue) { // illegal state if this node has been removed checkRemoved(); if (properties == null) properties = new HashMapOfString(); String oldValue = properties.get(key); if (InternalPlatform.DEBUG_PREFERENCE_SET) Policy.debug("Setting preference: " + absolutePath() + '/' + key + '=' + newValue); //$NON-NLS-1$ properties.put(key, newValue); return oldValue; } private void internalRemove(String key, String oldValue) { boolean wasRemoved = false; //Thread safety: synchronize when modifying the properties field synchronized (this) { if (properties == null) return; wasRemoved = properties.removeKey(key) != null; if (properties.size() == 0) properties = null; if (wasRemoved) makeDirty(); } if (wasRemoved) firePreferenceEvent(key, oldValue, null); } /* * Subclasses to over-ride. */ protected boolean isAlreadyLoaded(IEclipsePreferences node) { return true; } /* * @see org.osgi.service.prefs.Preferences#keys() */ public String[] keys() { // illegal state if this node has been removed checkRemoved(); HashMapOfString temp = properties; if (temp == null || temp.size() == 0) return EMPTY_STRING_ARRAY; return temp.keys(); } protected void load() throws BackingStoreException { load(getLocation()); } protected static Properties loadProperties(IPath location) throws BackingStoreException { if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Loading preferences from file: " + location); //$NON-NLS-1$ InputStream input = null; Properties result = new Properties(); try { input = new BufferedInputStream(new FileInputStream(location.toFile())); result.load(input); } catch (FileNotFoundException e) { // file doesn't exist but that's ok. if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Preference file does not exist: " + location); //$NON-NLS-1$ return result; } catch (IOException e) { String message = NLS.bind(Messages.preferences_loadException, location); log(new Status(IStatus.INFO, Platform.PI_RUNTIME, IStatus.INFO, message, e)); throw new BackingStoreException(message); } finally { if (input != null) try { input.close(); } catch (IOException e) { // ignore } } return result; } protected void load(IPath location) throws BackingStoreException { if (location == null) { if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Unable to determine location of preference file for node: " + absolutePath()); //$NON-NLS-1$ return; } Properties fromDisk = loadProperties(location); convertFromProperties(this, fromDisk, false); } protected void loaded() { // do nothing } protected void loadLegacy() { // sub-classes to over-ride if necessary } public static void log(IStatus status) { InternalPlatform.getDefault().log(status); } protected void makeDirty() { EclipsePreferences node = this; while (node != null && !node.removed) { node.dirty = true; node = (EclipsePreferences) node.parent(); } } /* * @see org.osgi.service.prefs.Preferences#name() */ public String name() { return name; } /* * @see org.osgi.service.prefs.Preferences#node(java.lang.String) */ public Preferences node(String pathName) { return internalNode(pathName, true, null); } protected void fireNodeEvent(final NodeChangeEvent event, final boolean added) { if (nodeChangeListeners == null) return; Object[] listeners = nodeChangeListeners.getListeners(); for (int i = 0; i < listeners.length; i++) { final INodeChangeListener listener = (INodeChangeListener) listeners[i]; ISafeRunnable job = new ISafeRunnable() { public void handleException(Throwable exception) { // already logged in Platform#run() } public void run() throws Exception { if (added) listener.added(event); else listener.removed(event); } }; Platform.run(job); } } /* * @see org.osgi.service.prefs.Preferences#nodeExists(java.lang.String) */ public boolean nodeExists(String path) throws BackingStoreException { // short circuit for checking this node if (path.length() == 0) return !removed; // illegal state if this node has been removed. // do this AFTER checking for the empty string. checkRemoved(); // use the root relative to this node instead of the global root // in case we have a different hierarchy. (e.g. export) if (path.charAt(0) == IPath.SEPARATOR) return calculateRoot().nodeExists(path.substring(1)); int index = path.indexOf(IPath.SEPARATOR); boolean noSlash = index == -1; // if we are looking for a simple child then just look in the table and return if (noSlash) return childExists(path); // otherwise load the parent of the child and then recursively ask String childName = path.substring(0, index); if (!childExists(childName)) return false; IEclipsePreferences child = getChild(childName, null, true); if (child == null) return false; return child.nodeExists(path.substring(index + 1)); } /* * @see org.osgi.service.prefs.Preferences#parent() */ public Preferences parent() { // illegal state if this node has been removed checkRemoved(); return parent; } /* * Convenience method for notifying preference change listeners. */ protected void firePreferenceEvent(String key, Object oldValue, Object newValue) { if (preferenceChangeListeners == null) return; Object[] listeners = preferenceChangeListeners.getListeners(); final PreferenceChangeEvent event = new PreferenceChangeEvent(this, key, oldValue, newValue); for (int i = 0; i < listeners.length; i++) { final IPreferenceChangeListener listener = (IPreferenceChangeListener) listeners[i]; ISafeRunnable job = new ISafeRunnable() { public void handleException(Throwable exception) { // already logged in Platform#run() } public void run() throws Exception { listener.preferenceChange(event); } }; Platform.run(job); } } /* * @see org.osgi.service.prefs.Preferences#put(java.lang.String, java.lang.String) */ public void put(String key, String newValue) { if (key == null || newValue == null) throw new NullPointerException(); String oldValue = internalPut(key, newValue); if (!newValue.equals(oldValue)) { makeDirty(); firePreferenceEvent(key, oldValue, newValue); } } /* * @see org.osgi.service.prefs.Preferences#putBoolean(java.lang.String, boolean) */ public void putBoolean(String key, boolean value) { if (key == null) throw new NullPointerException(); String newValue = value ? TRUE : FALSE; String oldValue = internalPut(key, newValue); if (!newValue.equals(oldValue)) { makeDirty(); firePreferenceEvent(key, oldValue, newValue); } } /* * @see org.osgi.service.prefs.Preferences#putByteArray(java.lang.String, byte[]) */ public void putByteArray(String key, byte[] value) { if (key == null || value == null) throw new NullPointerException(); String newValue = new String(Base64.encode(value)); String oldValue = internalPut(key, newValue); if (!newValue.equals(oldValue)) { makeDirty(); firePreferenceEvent(key, oldValue, newValue); } } /* * @see org.osgi.service.prefs.Preferences#putDouble(java.lang.String, double) */ public void putDouble(String key, double value) { if (key == null) throw new NullPointerException(); String newValue = Double.toString(value); String oldValue = internalPut(key, newValue); if (!newValue.equals(oldValue)) { makeDirty(); firePreferenceEvent(key, oldValue, newValue); } } /* * @see org.osgi.service.prefs.Preferences#putFloat(java.lang.String, float) */ public void putFloat(String key, float value) { if (key == null) throw new NullPointerException(); String newValue = Float.toString(value); String oldValue = internalPut(key, newValue); if (!newValue.equals(oldValue)) { makeDirty(); firePreferenceEvent(key, oldValue, newValue); } } /* * @see org.osgi.service.prefs.Preferences#putInt(java.lang.String, int) */ public void putInt(String key, int value) { if (key == null) throw new NullPointerException(); String newValue = Integer.toString(value); String oldValue = internalPut(key, newValue); if (!newValue.equals(oldValue)) { makeDirty(); firePreferenceEvent(key, oldValue, newValue); } } /* * @see org.osgi.service.prefs.Preferences#putLong(java.lang.String, long) */ public void putLong(String key, long value) { if (key == null) throw new NullPointerException(); String newValue = Long.toString(value); String oldValue = internalPut(key, newValue); if (!newValue.equals(oldValue)) { makeDirty(); firePreferenceEvent(key, oldValue, newValue); } } /* * @see org.osgi.service.prefs.Preferences#remove(java.lang.String) */ public void remove(String key) { String oldValue = internalGet(key); if (oldValue != null) internalRemove(key, oldValue); } /* * @see org.osgi.service.prefs.Preferences#removeNode() */ public void removeNode() throws BackingStoreException { // illegal state if this node has been removed checkRemoved(); // clear all the property values. do it "the long way" so // everyone gets notification String[] keys = keys(); for (int i = 0; i < keys.length; i++) remove(keys[i]); // don't remove the global root or the scope root from the // parent but remove all its children if (parent != null && !(parent instanceof RootPreferences)) { // remove the node from the parent's collection and notify listeners removed = true; parent.removeNode(this); } IEclipsePreferences[] childNodes = getChildren(false); for (int i = 0; i < childNodes.length; i++) try { childNodes[i].removeNode(); } catch (IllegalStateException e) { // ignore since we only get this exception if we have already // been removed. no work to do. } } /* * Remove the child from the collection and notify the listeners if something * was actually removed. */ protected void removeNode(IEclipsePreferences child) { boolean wasRemoved = false; synchronized (this) { if (children != null) { wasRemoved = children.remove(child.name()) != null; if (wasRemoved) makeDirty(); if (children.isEmpty()) children = null; } } if (wasRemoved) fireNodeEvent(new NodeChangeEvent(this, child), false); } /* * @see org.eclipse.core.runtime.IEclipsePreferences#removeNodeChangeListener(org.eclipse.core.runtime.IEclipsePreferences.removeNodeChangeListener) */ public void removeNodeChangeListener(INodeChangeListener listener) { checkRemoved(); if (nodeChangeListeners == null) return; nodeChangeListeners.remove(listener); if (nodeChangeListeners.size() == 0) nodeChangeListeners = null; if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Removed preference node change listener: " + listener + " from: " + absolutePath()); //$NON-NLS-1$ //$NON-NLS-2$ } /* * @see org.eclipse.core.runtime.IEclipsePreferences#removePreferenceChangeListener(org.eclipse.core.runtime.IEclipsePreferences.IPreferenceChangeListener) */ public void removePreferenceChangeListener(IPreferenceChangeListener listener) { checkRemoved(); if (preferenceChangeListeners == null) return; preferenceChangeListeners.remove(listener); if (preferenceChangeListeners.size() == 0) preferenceChangeListeners = null; if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Removed preference property change listener: " + listener + " from: " + absolutePath()); //$NON-NLS-1$ //$NON-NLS-2$ } protected void save() throws BackingStoreException { save(getLocation()); } protected void save(IPath location) throws BackingStoreException { if (location == null) { if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Unable to determine location of preference file for node: " + absolutePath()); //$NON-NLS-1$ return; } if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Saving preferences to file: " + location); //$NON-NLS-1$ Properties table = convertToProperties(new Properties(), EMPTY_STRING); if (table.isEmpty()) { // nothing to save. delete existing file if one exists. if (location.toFile().exists() && !location.toFile().delete()) { String message = NLS.bind(Messages.preferences_failedDelete, location); log(new Status(IStatus.WARNING, Platform.PI_RUNTIME, IStatus.WARNING, message, null)); } return; } table.put(VERSION_KEY, VERSION_VALUE); OutputStream output = null; FileOutputStream fos = null; try { // create the parent dirs if they don't exist File parentFile = location.toFile().getParentFile(); if (parentFile == null) return; parentFile.mkdirs(); // set append to be false so we overwrite current settings. fos = new FileOutputStream(location.toOSString(), false); output = new BufferedOutputStream(fos); table.store(output, null); output.flush(); fos.getFD().sync(); } catch (IOException e) { String message = NLS.bind(Messages.preferences_saveException, location); log(new Status(IStatus.ERROR, Platform.PI_RUNTIME, IStatus.ERROR, message, e)); throw new BackingStoreException(message); } finally { if (output != null) try { output.close(); } catch (IOException e) { // ignore } } } /** * Traverses the preference hierarchy rooted at this node, and adds * all preference key and value strings to the provided pool. If an added * string was already in the pool, all references will be replaced with the * canonical copy of the string. * * @param pool The pool to share strings in */ public void shareStrings(StringPool pool) { //protect access while destructively sharing strings synchronized (this) { HashMapOfString temp = properties; if (temp != null) temp.shareStrings(pool); } IEclipsePreferences[] myChildren = getChildren(false); for (int i = 0; i < myChildren.length; i++) if (myChildren[i] instanceof EclipsePreferences) ((EclipsePreferences) myChildren[i]).shareStrings(pool); } /* * Encode the given path and key combo to a form which is suitable for * persisting or using when searching. If the key contains a slash character * then we must use a double-slash to indicate the end of the * path/the beginning of the key. */ public static String encodePath(String path, String key) { String result; int pathLength = path == null ? 0 : path.length(); if (key.indexOf(IPath.SEPARATOR) == -1) { if (pathLength == 0) result = key; else result = path + IPath.SEPARATOR + key; } else { if (pathLength == 0) result = DOUBLE_SLASH + key; else result = path + DOUBLE_SLASH + key; } return result; } /* * Return the segment from the given path or null. * "segment" parameter is 0-based. */ public static String getSegment(String path, int segment) { int start = path.indexOf(IPath.SEPARATOR) == 0 ? 1 : 0; int end = path.indexOf(IPath.SEPARATOR, start); if (end == path.length() - 1) end = -1; for (int i = 0; i < segment; i++) { if (end == -1) return null; start = end + 1; end = path.indexOf(IPath.SEPARATOR, start); } if (end == -1) end = path.length(); return path.substring(start, end); } public static int getSegmentCount(String path) { StringTokenizer tokenizer = new StringTokenizer(path, String.valueOf(IPath.SEPARATOR)); return tokenizer.countTokens(); } /* * Return a relative path */ public static String makeRelative(String path) { String result = path; if (path == null) return EMPTY_STRING; if (path.length() > 0 && path.charAt(0) == IPath.SEPARATOR) result = path.length() == 0 ? EMPTY_STRING : path.substring(1); return result; } /* * Return a 2 element String array. * element 0 - the path * element 1 - the key * The path may be null. * The key is never null. */ public static String[] decodePath(String fullPath) { String key = null; String path = null; // check to see if we have an indicator which tells us where the path ends int index = fullPath.indexOf(DOUBLE_SLASH); if (index == -1) { // we don't have a double-slash telling us where the path ends // so the path is up to the last slash character int lastIndex = fullPath.lastIndexOf(IPath.SEPARATOR); if (lastIndex == -1) { key = fullPath; } else { path = fullPath.substring(0, lastIndex); key = fullPath.substring(lastIndex + 1); } } else { // the child path is up to the double-slash and the key // is the string after it path = fullPath.substring(0, index); key = fullPath.substring(index + 2); } // adjust if we have an absolute path if (path != null) if (path.length() == 0) path = null; else if (path.charAt(0) == IPath.SEPARATOR) path = path.substring(1); return new String[] {path, key}; } /* * @see org.osgi.service.prefs.Preferences#sync() */ public void sync() throws BackingStoreException { // illegal state if this node has been removed checkRemoved(); IEclipsePreferences node = getLoadLevel(); if (node == null) { if (InternalPlatform.DEBUG_PREFERENCE_GENERAL) Policy.debug("Preference node is not a load root: " + absolutePath()); //$NON-NLS-1$ return; } if (node instanceof EclipsePreferences) { ((EclipsePreferences) node).load(); node.flush(); } } public String toDeepDebugString() { final StringBuffer buffer = new StringBuffer(); IPreferenceNodeVisitor visitor = new IPreferenceNodeVisitor() { public boolean visit(IEclipsePreferences node) throws BackingStoreException { buffer.append(node); buffer.append('\n'); String[] keys = node.keys(); for (int i = 0; i < keys.length; i++) { buffer.append(node.absolutePath()); buffer.append(PATH_SEPARATOR); buffer.append(keys[i]); buffer.append('='); buffer.append(node.get(keys[i], "*default*")); //$NON-NLS-1$ buffer.append('\n'); } return true; } }; try { accept(visitor); } catch (BackingStoreException e) { System.out.println("Exception while calling #toDeepDebugString()"); //$NON-NLS-1$ e.printStackTrace(); } return buffer.toString(); } public String toString() { return absolutePath(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1bfc92a98507f2148bc615afd17050c40e722abb
329c69bef88d82e866ed79cb3cba9be6dfc8285f
/src/Interfaces/Debuffeable.java
28daa6af5728e89cbd9e74097fbb58a0be398ed0
[]
no_license
Hanto/MyrranPC
8e209bbf223c1dd022d14505c3465584ced1835d
339a3a50d10593115e99fdb49de39fe0a9870b24
refs/heads/master
2020-12-24T13:35:50.614642
2014-03-28T06:41:43
2014-03-28T06:41:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
package Interfaces; import Skill.Aura.BDebuff; import com.badlogic.gdx.scenes.scene2d.Group; import com.badlogic.gdx.utils.Array; /** * Created by Hanto on 26/03/2014. */ public interface Debuffeable { public Array<BDebuff> getListaDeAuras (); public Group getDebuffIcons (); public Group getBuffIcons (); }
[ "jhanto@gmail.com" ]
jhanto@gmail.com
80d93dcc08f8a492f61fe7e6e481084586c1d89f
b5710133971a7fbf329f1541a0c51e7d38df3f42
/common/kr/or/ddit/filter/EncodingFilter.java
262281328f14f9e8ba0efea1e00a6e2e0e9e4da7
[]
no_license
ttlye3764/struts2
013911fe0181f63da4be22f8aea9d679dc3dcc67
c014a68347c70b95d26b03424c8610ef55b988d1
refs/heads/master
2022-12-02T07:02:21.611701
2020-08-23T13:19:02
2020-08-23T13:19:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,568
java
package kr.or.ddit.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.apache.commons.lang3.StringUtils; public class EncodingFilter implements Filter{ @Override public void init(FilterConfig arg0) throws ServletException { } @Override public void destroy() { } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) throws IOException, ServletException { // 클라이언트가 전송하는 쿼리스트링 전송방식 // GET : server.xml <connector URIEncoding="UTF-8"></connector> // POST : jsp 내 스크립트릿 영역 request.setCharactorEncoding("UTF-8"); // 클라이언트의 쿼리스트링 전송시 특정 인코딩 처리 요구를 요청 헤더에 포함시킬 수 있다. // 자바스크립트 : Accept-Charset : UTF-8 -> 으로 보내면 이걸 취득하는 메소드 .getCharacterEncoding() String encodingType = servletRequest.getCharacterEncoding(); //http://commons.apache.org // java.lang.String 클래스의 확장 API 라이브러리 // encodingType이 null이거나 ""이면 true if(StringUtils.isEmpty(encodingType)){ encodingType = "UTF-8"; } servletRequest.setCharacterEncoding(encodingType); chain.doFilter(servletRequest, servletResponse); } }
[ "jaeho@218.38.137.27" ]
jaeho@218.38.137.27
97b7497c986599fbb3cf73c3065dd818c4562766
e29d6091cc58530158f1ba440b79e8a1686cc056
/api/resource/src/test/java/com/mengyunzhi/measurement/controller/OverdueCheckApplyControllerTest.java
ecc24cc28689b9df4cc79c436b65526916b105b3
[]
no_license
liuxiqian/Instrument_platform
16a1a4f91f880fdd8191a4efea89f704e27b3af2
a16d50f8f6f66ab09dfdb83420fa508798725fe5
refs/heads/master
2020-03-08T04:05:57.353838
2018-04-03T13:52:31
2018-04-03T13:52:31
127,911,363
0
0
null
null
null
null
UTF-8
Java
false
false
5,807
java
package com.mengyunzhi.measurement.controller; import com.mengyunzhi.measurement.Service.OverdueCheckApplyServiceImplTestData; import com.mengyunzhi.measurement.Service.WorkService; import com.mengyunzhi.measurement.entity.MandatoryInstrument; import com.mengyunzhi.measurement.entity.OverdueCheckApply; import com.mengyunzhi.measurement.entity.User; import com.mengyunzhi.measurement.entity.Work; import com.mengyunzhi.measurement.repository.OverdueCheckApplyRepository; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.apache.log4j.Logger; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.MediaType; import java.sql.Date; import java.util.Calendar; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.patch; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse; import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; /** * @author panjie on 2017/12/13 * 超期检定申请 */ public class OverdueCheckApplyControllerTest extends ControllerTest { private final static Logger logger = Logger.getLogger(OverdueCheckApplyControllerTest.class.getName()); @Autowired OverdueCheckApplyServiceImplTestData overdueCheckApplyServiceImplTestData; @Autowired OverdueCheckApplyRepository overdueCheckApplyRepository; // 超期检定 @Autowired @Qualifier("WorkService") WorkService workService; // 工作 @Test public void saveTest() throws Exception { logger.info("初始化测试变量,调用M层方法"); OverdueCheckApply overdueCheckApply = overdueCheckApplyServiceImplTestData.save(); JSONObject jsonObject = new JSONObject(); jsonObject.put("reason", "过期未检原因"); JSONArray jsonArray = new JSONArray(); for (MandatoryInstrument mandatoryInstrument : overdueCheckApply.getMandatoryInstrumentSet()) { JSONObject jsonObject1 = new JSONObject(); jsonObject1.put("id", mandatoryInstrument.getId().toString()); } jsonObject.put("mandatoryInstrumentSet", jsonArray); logger.info("登录并发起请求,断言"); String url = "/OverdueCheckApply/"; this.loginByUser(overdueCheckApplyServiceImplTestData.getCurrentUser()); this.mockMvc .perform(post(url) .content(jsonObject.toString()) .contentType(MediaType.APPLICATION_JSON_UTF8) .header("x-auth-token", xAuthToken)) .andDo(document("OverdueCheckApply_save", preprocessResponse(prettyPrint()))) .andExpect(status().is(201)); } /** * 回复 * @throws Exception * panjie */ @Test public void reply() throws Exception { logger.info("初始化数据"); Work work = overdueCheckApplyServiceImplTestData.reply(); JSONObject applyJsonObject = new JSONObject(); applyJsonObject.put("agree", true); applyJsonObject.put("latestCheckDate", "2017-12-13"); JSONObject workJsonObject = new JSONObject(); workJsonObject.put("id", work.getId()); workJsonObject.put("opinion", "申请意见"); JSONObject jsonObject = new JSONObject(); jsonObject.put("work", workJsonObject); jsonObject.put("apply", applyJsonObject); logger.info("发起请求"); String url = "/OverdueCheckApply/"; this.loginByUser(overdueCheckApplyServiceImplTestData.getCurrentUser()); this.mockMvc .perform(patch(url) .content(jsonObject.toString()) .contentType(MediaType.APPLICATION_JSON_UTF8) .header("x-auth-token", xAuthToken)) .andDo(document("OverdueCheckApply_reply", preprocessResponse(prettyPrint()))) .andExpect(status().is(202)); } @Test public void pageOfCurrentUser() throws Exception { User currentUser = userService.loginWithOneUser(); logger.debug("新建申请"); OverdueCheckApply overdueCheckApply = new OverdueCheckApply(); Calendar calendar = Calendar.getInstance(); overdueCheckApply.setApplyTime(calendar); overdueCheckApplyRepository.save(overdueCheckApply); logger.info("新建工作"); Work work = new Work(); work.setApply(overdueCheckApply); workService.saveWorkWithCurrentUserAudit(work); String url = "/OverdueCheckApply/pageOfCurrentUser"; Long time = calendar.getTimeInMillis(); this.mockMvc .perform(get(url) .param("startApplyDate", new Date(time).toString()) .param("endApplyDate", new Date(time).toString()) .param("applyDepartmentId", currentUser.getDepartment().getId().toString()) .param("page", "0") .param("size", "10") .contentType(MediaType.APPLICATION_JSON_UTF8) .header("x-auth-token", xAuthToken)) .andDo(document("OverdueCheckApply_pageOfCurrentUser", preprocessResponse(prettyPrint()))) .andExpect(status().is(200)); } }
[ "1454179583@qq.com" ]
1454179583@qq.com
828c1cfd9d6e4591a95cb40f7ddb068267b3d8f7
28c571e43c5bf87cc71e23482b32922f71cc2bb8
/plugins/OSX/src/main/java/net/java/games/input/OSXMouse.java
b40e3e9f35176fa3c9d481f3ca7f3e086ba2654b
[]
no_license
dmssargent/jinput
0b31eef42f482d34ea3595a209c1308cfca617b5
fea8f07a710eb176d78d40f91f9661ec418894d7
refs/heads/master
2021-01-12T20:50:06.094400
2016-12-28T04:21:33
2016-12-28T04:21:33
47,902,344
1
0
null
2015-12-13T02:01:50
2015-12-13T02:01:50
null
UTF-8
Java
false
false
2,940
java
/* * %W% %E% * * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /***************************************************************************** * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * <p> * - Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * <p> * - Redistribution in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materails provided with the distribution. * <p> * Neither the name Sun Microsystems, Inc. or the names of the contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * <p> * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING * ANY IMPLIED WARRANT OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NON-INFRINGEMEN, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS * A RESULT OF USING, MODIFYING OR DESTRIBUTING THIS SOFTWARE OR ITS * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, * INCIDENTAL OR PUNITIVE DAMAGES. HOWEVER CAUSED AND REGARDLESS OF THE THEORY * OF LIABILITY, ARISING OUT OF THE USE OF OUR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * <p> * You acknowledge that this software is not designed or intended for us in * the design, construction, operation or maintenance of any nuclear facility *****************************************************************************/ package net.java.games.input; import java.io.IOException; /** Represents an OSX Mouse * @author elias * @version 1.0 */ final class OSXMouse extends Mouse { private final PortType port; private final OSXHIDQueue queue; OSXMouse(OSXHIDDevice device, OSXHIDQueue queue, Component[] components, Controller[] children, Rumbler[] rumblers) { super(device.getProductName(), components, children, rumblers); this.queue = queue; this.port = device.getPortType(); } protected final boolean getNextDeviceEvent(Event event) throws IOException { return OSXControllers.getNextDeviceEvent(event, queue); } protected final void setDeviceEventQueueSize(int size) throws IOException { queue.setQueueDepth(size); } public final PortType getPortType() { return port; } }
[ "dmssargent@yahoo.com" ]
dmssargent@yahoo.com
55058be690fa391fac8bcd25db2c2ecd06e524e4
a3e9de23131f569c1632c40e215c78e55a78289a
/alipay/alipay_sdk/src/main/java/com/alipay/api/request/ZhimaCreditEpEntityMonitorSetRequest.java
3b2eece4c47954dec8152f1583d773573e094460
[]
no_license
P79N6A/java_practice
80886700ffd7c33c2e9f4b202af7bb29931bf03d
4c7abb4cde75262a60e7b6d270206ee42bb57888
refs/heads/master
2020-04-14T19:55:52.365544
2019-01-04T07:39:40
2019-01-04T07:39:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,024
java
package com.alipay.api.request; import com.alipay.api.domain.ZhimaCreditEpEntityMonitorSetModel; import java.util.Map; import com.alipay.api.AlipayRequest; import com.alipay.api.internal.util.AlipayHashMap; import com.alipay.api.response.ZhimaCreditEpEntityMonitorSetResponse; import com.alipay.api.AlipayObject; /** * ALIPAY API: zhima.credit.ep.entity.monitor.set request * * @author auto create * @since 1.0, 2018-03-22 19:33:51 */ public class ZhimaCreditEpEntityMonitorSetRequest implements AlipayRequest<ZhimaCreditEpEntityMonitorSetResponse> { private AlipayHashMap udfParams; // add user-defined text parameters private String apiVersion="1.0"; /** * 风险雷达添加商户联系方式列表接口 */ private String bizContent; public void setBizContent(String bizContent) { this.bizContent = bizContent; } public String getBizContent() { return this.bizContent; } private String terminalType; private String terminalInfo; private String prodCode; private String notifyUrl; private String returnUrl; private boolean needEncrypt=false; private AlipayObject bizModel=null; public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getReturnUrl() { return this.returnUrl; } public void setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; } public String getApiVersion() { return this.apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public void setTerminalType(String terminalType){ this.terminalType=terminalType; } public String getTerminalType(){ return this.terminalType; } public void setTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public String getTerminalInfo(){ return this.terminalInfo; } public void setProdCode(String prodCode) { this.prodCode=prodCode; } public String getProdCode() { return this.prodCode; } public String getApiMethodName() { return "zhima.credit.ep.entity.monitor.set"; } public Map<String, String> getTextParams() { AlipayHashMap txtParams = new AlipayHashMap(); txtParams.put("biz_content", this.bizContent); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new AlipayHashMap(); } this.udfParams.put(key, value); } public Class<ZhimaCreditEpEntityMonitorSetResponse> getResponseClass() { return ZhimaCreditEpEntityMonitorSetResponse.class; } public boolean isNeedEncrypt() { return this.needEncrypt; } public void setNeedEncrypt(boolean needEncrypt) { this.needEncrypt=needEncrypt; } public AlipayObject getBizModel() { return this.bizModel; } public void setBizModel(AlipayObject bizModel) { this.bizModel=bizModel; } }
[ "jiaojianjun1991@gmail.com" ]
jiaojianjun1991@gmail.com
318e1f8535bfb7e40d46840ecfeeb3e38fb38280
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/cd2d9b5b5cff96b07c5b22c0d139ffa2aa36b01823c9eb4db6eca19065a0ce2c4d2516bfcc2f1bc95daeae5b0bbd5e9c15b83feda776735e7bc3de6c49d25144/009/mutations/96/grade_cd2d9b5b_009.java
8d14ba348f58bf66296483404ad36cc497415762
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,408
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_cd2d9b5b_009 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_cd2d9b5b_009 mainClass = new grade_cd2d9b5b_009 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj num1 = new FloatObj (), num2 = new FloatObj (), num3 = new FloatObj (), num4 = new FloatObj (); FloatObj score = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > ")); num1.value = scanner.nextFloat (); num2.value = scanner.nextFloat (); if (true) return ; num3.value = scanner.nextFloat (); num4.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) >")); score.value = scanner.nextFloat (); if (score.value >= num1.value) { output += (String.format ("Student has an A grade")); } else if (score.value >= num2.value) { output += (String.format ("Student has an B grade")); } else if (score.value >= num3.value) { output += (String.format ("Student has an C grade")); } else if (score.value >= num4.value) { output += (String.format ("Student has an D grade")); } output += (String.format ("\n")); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
11db970e88223fc48eebaf0d96a40b2e7c431e67
ee7525b12d1b2548da44855d2fc0e70e6f58bff5
/util/src/main/java/com/zjf/utils/http/HttpClientUtil.java
fa721a6cb83ba4e4bff002cf77edf5482d29e8b0
[]
no_license
crazyblackwolf/maple
b7963b0b00d150b8908419aac06fcb08d0754e3e
2a26ff79767881ed6c7fe1e5f805ee31b201525c
refs/heads/master
2022-01-09T19:49:15.637585
2019-04-29T07:28:09
2019-04-29T07:28:09
111,052,683
0
0
null
null
null
null
UTF-8
Java
false
false
7,064
java
package com.zjf.utils.http; import org.apache.http.HttpEntity; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.utils.URIBuilder; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Map; /** * @author : jacky * @description :本工具类基于httpclient4.5.1实现 摘自http://blog.csdn.net/wangnan537/article/details/50374061 * @date : 2017/11/18. */ public final class HttpClientUtil { private HttpClientUtil() { throw new AssertionError(); } private static final Logger LOGGER = LoggerFactory.getLogger(HttpClientUtil.class); private static PoolingHttpClientConnectionManager cm; private static String EMPTY_STR = ""; private static String UTF_8 = "UTF-8"; private static void init() { if (cm == null) { cm = new PoolingHttpClientConnectionManager(); cm.setMaxTotal(50);// 整个连接池最大连接数 cm.setDefaultMaxPerRoute(5);// 每路由最大连接数,默认值是2 } } /** * 通过连接池获取HttpClient * * @return */ private static CloseableHttpClient getHttpClient() { init(); return HttpClients.custom().setConnectionManager(cm).build(); } /** * get请求 * * @param url 请求url * @return java.lang.String */ public static String httpGetRequest(String url) { if (LOGGER.isInfoEnabled()) { LOGGER.info("----------请求URL={}", url); } HttpGet httpGet = new HttpGet(url); return getResult(httpGet); } /** * get请求 * * @param url 请求url * @param params 请求参数 * @return java.lang.String * @throws URISyntaxException */ public static String httpGetRequest(String url, Map<String, Object> params) throws URISyntaxException { if (LOGGER.isInfoEnabled()) { LOGGER.info("----------请求URL={},请求参数={}", url, params); } URIBuilder ub = new URIBuilder(); ub.setPath(url); ArrayList<NameValuePair> pairs = covertParams2NVPS(params); ub.setParameters(pairs); HttpGet httpGet = new HttpGet(ub.build()); return getResult(httpGet); } /** * get请求 * * @param url 请求url * @param headers 请求头 * @param params 请求参数 * @return java.lang.String * @throws URISyntaxException */ public static String httpGetRequest(String url, Map<String, Object> headers, Map<String, Object> params) throws URISyntaxException { if (LOGGER.isInfoEnabled()) { LOGGER.info("----------请求URL={},请求头={},请求参数={}", url, headers, params); } URIBuilder ub = new URIBuilder(); ub.setPath(url); ArrayList<NameValuePair> pairs = covertParams2NVPS(params); ub.setParameters(pairs); HttpGet httpGet = new HttpGet(ub.build()); for (Map.Entry<String, Object> param : headers.entrySet()) { httpGet.addHeader(param.getKey(), String.valueOf(param.getValue())); } return getResult(httpGet); } /** * post请求 * * @param url 请求url * @return java.lang.String */ public static String httpPostRequest(String url) { if (LOGGER.isInfoEnabled()) { LOGGER.info("----------请求URL={}", url); } HttpPost httpPost = new HttpPost(url); return getResult(httpPost); } /** * post请求 * * @param url 请求url * @param params 请求参数 * @return java.lang.String * @throws UnsupportedEncodingException */ public static String httpPostRequest(String url, Map<String, Object> params) throws UnsupportedEncodingException { if (LOGGER.isInfoEnabled()) { LOGGER.info("----------请求URL={},请求参数={}", url, params); } HttpPost httpPost = new HttpPost(url); ArrayList<NameValuePair> pairs = covertParams2NVPS(params); httpPost.setEntity(new UrlEncodedFormEntity(pairs, UTF_8)); return getResult(httpPost); } /** * post请求 * * @param url 请求url * @param params 请求参数 * @param headers 请求头 * @return java.lang.String * @throws UnsupportedEncodingException */ public static String httpPostRequest(String url, Map<String, Object> headers, Map<String, Object> params) throws UnsupportedEncodingException { if (LOGGER.isInfoEnabled()) { LOGGER.info("----------请求URL={},请求头={},请求参数={}", url, headers, params); } HttpPost httpPost = new HttpPost(url); for (Map.Entry<String, Object> param : headers.entrySet()) { httpPost.addHeader(param.getKey(), String.valueOf(param.getValue())); } ArrayList<NameValuePair> pairs = covertParams2NVPS(params); httpPost.setEntity(new UrlEncodedFormEntity(pairs, UTF_8)); return getResult(httpPost); } private static ArrayList<NameValuePair> covertParams2NVPS(Map<String, Object> params) { ArrayList<NameValuePair> pairs = new ArrayList<>(); for (Map.Entry<String, Object> param : params.entrySet()) { pairs.add(new BasicNameValuePair(param.getKey(), String.valueOf(param.getValue()))); } return pairs; } /** * 处理Http请求 * * @param request * @return */ private static String getResult(HttpRequestBase request) { CloseableHttpClient httpClient = getHttpClient(); try { CloseableHttpResponse response = httpClient.execute(request); HttpEntity entity = response.getEntity(); if (entity != null) { String result = EntityUtils.toString(entity); if (LOGGER.isDebugEnabled()) { LOGGER.debug("----------请求结果={}", result); } response.close(); return result; } } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { } return EMPTY_STR; } }
[ "18583018804@163.com" ]
18583018804@163.com
db9c23507db27290d95579255275678ef257eb95
2fd0dac07d07a36a584218200e7c5e578a2f84e2
/src/main/java/io/metersphere/streaming/report/impl/ResponseTimePercentilesChartReport.java
9dc2e28dded692d9c4fe7991160ad58a4c714f3c
[]
no_license
wangzhi0571/data-streaming
3091057983c42641b21791a7165bad0351748e8d
36da62e422697a833ca4789c3284aaf3c05cc5c6
refs/heads/master
2023-07-26T22:53:13.304446
2021-09-03T02:24:39
2021-09-03T02:24:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
936
java
package io.metersphere.streaming.report.impl; import io.metersphere.streaming.commons.constants.ReportKeys; import io.metersphere.streaming.report.base.ChartsData; import io.metersphere.streaming.report.parse.ResultDataParse; import org.apache.jmeter.report.processor.SampleContext; import org.apache.jmeter.report.processor.graph.impl.ResponseTimePercentilesOverTimeGraphConsumer; import java.util.List; public class ResponseTimePercentilesChartReport extends AbstractReport { @Override public String getReportKey() { return ReportKeys.ResponseTimePercentilesChart.name(); } @Override public void execute() { SampleContext responseTimeMap = sampleContextMap.get(ResponseTimePercentilesOverTimeGraphConsumer.class.getSimpleName()); List<ChartsData> resultList = ResultDataParse.graphMapParsing(responseTimeMap.getData(), "", "yAxis"); saveResult(reportId, resultList); } }
[ "bin@fit2cloud.com" ]
bin@fit2cloud.com
7bd4d17689625c1a2f5b55a1c625f535efaf1063
62644447caa24126a675391de8791ed076ba7c85
/src/main/java/ec/edu/ups/vista/VentanIniciarSesion.java
80bc2dcceaeddf5e14e0b0c3445dc57ceae63d97
[ "MIT" ]
permissive
RomelAvila2001/Examen-Interciclo-Programacion-Aplicada
a8542ed1729ba7637d310a5a52825965dba75806
1b5c726c48328f3c0bb845e693d165ebaaab96fb
refs/heads/master
2023-01-22T13:12:59.642020
2020-12-02T04:56:12
2020-12-02T04:56:12
317,737,944
2
0
null
null
null
null
UTF-8
Java
false
false
9,818
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 ec.edu.ups.vista; import ec.edu.ups.controlador.ControladorDocente; import ec.edu.ups.controlador.ControladorRector; import ec.edu.ups.modelo.Docente; import ec.edu.ups.modelo.Rector; import javax.swing.JOptionPane; /** * * @author NANCY */ public class VentanIniciarSesion extends javax.swing.JInternalFrame { private ControladorRector controladorRector; private ControladorDocente controladorDocente; private VentanaPrincipal ventanaPrincipal; private VentanaRegistraEstudiante ventanaRegistraEstudiante; private VentanaGestionActividades ventanaGestionActividades; /** * Creates new form VentanIniciarSesion * @param controladorRector * @param ventanaPrincipal * @param controladorDocente * @param ventanaRegistraEstudiante * @param ventanaGestionActividades */ public VentanIniciarSesion(ControladorRector controladorRector, VentanaPrincipal ventanaPrincipal, ControladorDocente controladorDocente, VentanaRegistraEstudiante ventanaRegistraEstudiante, VentanaGestionActividades ventanaGestionActividades) { initComponents(); this.controladorRector= controladorRector; this.controladorDocente=controladorDocente; this.ventanaPrincipal=ventanaPrincipal; this.ventanaGestionActividades= ventanaGestionActividades; } public void limpiar() { txtCorreo.setText(""); txtContra.setText(""); cbxOpcion.setSelectedIndex(0); } /** * 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() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); cbxOpcion = new javax.swing.JComboBox<>(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); txtCorreo = new javax.swing.JTextField(); txtContra = new javax.swing.JPasswordField(); btnIniciar = new javax.swing.JButton(); setClosable(true); jLabel1.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N jLabel1.setText("Iniciar Sesion"); jLabel2.setText("Rector o Docente"); cbxOpcion.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Seleccione", "Rector", "Docente" })); jLabel3.setText("Correo"); jLabel4.setText("Contraseña"); txtContra.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtContraActionPerformed(evt); } }); btnIniciar.setText("Iniciar Sesion"); btnIniciar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnIniciarActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(24, 24, 24) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(cbxOpcion, 0, 182, Short.MAX_VALUE) .addComponent(txtCorreo) .addComponent(txtContra)) .addGap(37, 37, 37)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(126, 126, 126) .addComponent(jLabel1)) .addGroup(layout.createSequentialGroup() .addGap(139, 139, 139) .addComponent(btnIniciar))) .addContainerGap(153, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addGap(30, 30, 30) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(cbxOpcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(txtCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(txtContra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE) .addComponent(btnIniciar) .addGap(23, 23, 23)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void txtContraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtContraActionPerformed // TODO add your handling code here: }//GEN-LAST:event_txtContraActionPerformed private void btnIniciarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnIniciarActionPerformed String correo = txtCorreo.getText(); char[] contra = txtContra.getPassword(); String password = String.valueOf(contra); String opcion = cbxOpcion.getSelectedItem().toString(); if(correo.isEmpty()||password.isEmpty()||opcion.equalsIgnoreCase("Seleccione")){ JOptionPane.showMessageDialog(this, "Llene todos los campos solicitados"); }else{ if (opcion.equals("Rector")) { Rector rector = controladorRector.iniciarSesion(correo, password); if (rector != null) { ventanaPrincipal.getMenuItemAbrirCurso().setVisible(true); ventanaPrincipal.getMenuItemCerrarSesion().setVisible(true); ventanaPrincipal.getMenuItemRegistrarDocente().setVisible(true); JOptionPane.showMessageDialog(this, "¡Sesion iniciada con exito! Bienvenido Rector:"+rector.getNombre()); limpiar(); ventanaPrincipal.getMenuItemIniciarSesion().setVisible(false); this.setVisible(false); } else { JOptionPane.showMessageDialog(this, "Usuario no encontrado. Intentelo otra vez"); } }else{ Docente docente= controladorDocente.iniciarSesion(correo, password); if (docente != null) { System.out.println(docente); //ventanaRegistraEstudiante.setDocente(docente); ventanaPrincipal.getMenuItemCrearActividad().setVisible(true); ventanaPrincipal.getMenuItemCerrarSesion().setVisible(true); ventanaPrincipal.getMenuItemRegistrarAlumno().setVisible(true); JOptionPane.showMessageDialog(this, "¡Sesion iniciada con exito! Bienvenido Docente:"+docente.getApellido()); limpiar(); ventanaPrincipal.getMenuItemIniciarSesion().setVisible(false); this.setVisible(false); } else { JOptionPane.showMessageDialog(this, "Usuario no encontrado. Intentelo otra vez"); } } } }//GEN-LAST:event_btnIniciarActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnIniciar; private javax.swing.JComboBox<String> cbxOpcion; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JPasswordField txtContra; private javax.swing.JTextField txtCorreo; // End of variables declaration//GEN-END:variables }
[ "NANCY@DESKTOP-1JG1RL0" ]
NANCY@DESKTOP-1JG1RL0
abc8b0994f8a53a14cc4c0a3110145211f108095
d6d52f612abc3a88273454b7d3244628f5214153
/myLoan-base/src/main/java/com/maiyajf/base/constants/ProductType.java
cbd13ef3f2e8b918691e0e5859b9baa6ae5145e2
[]
no_license
XxSuper/cland-websiteManage
850119014777640bd7c206124042bf4b25310c6e
45f23cdbabe9ae184e8bbd1362af2a630750c3f0
refs/heads/master
2022-12-22T19:46:38.426391
2019-06-23T03:49:41
2019-06-23T03:49:41
191,586,731
0
0
null
2022-12-16T06:23:04
2019-06-12T14:25:51
JavaScript
UTF-8
Java
false
false
734
java
package com.maiyajf.base.constants; /** * 〈一句话功能简述〉<br> * 〈功能详细描述〉 * * @author xinpei.xu * @see [相关类/方法](可选) * @since [产品/模块版本] (可选) */ public class ProductType { /** * 小贷类型 */ public static final String MAIYA_XIAODAI = "1111111"; /** * 分期类型 */ public static final String MAIYA_FENQI = "2222222"; /** * 期限单位 按天 */ public static final String XJBK_TERM_TYPE_DAY = "1"; /** * 期限单位 按月 */ public static final String XJBK_TERM_TYPE_MONTH = "2"; /** * 期限单位 按年 */ public static final String TERM_TYPE_YEAR = "3"; }
[ "521dreamFAN" ]
521dreamFAN