blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
65d9b57a92ede2ac5f71d70444d63334e623c440
67bba4fa0bb56233d2e9a08989959e85c389928f
/src/main/java/org/mybatis/dynamic/sql/util/PropertyWhenPresentMapping.java
59b0956311f7b5f36162f8b7dfcecd8a5eb22b43
[ "Apache-2.0" ]
permissive
Jeysin/mybatis-dynamic-sql
805be264dd8d71df7a70835c4ddb12d5536b50e8
ecf8142f03214bae228bc40e87d23c8d945b51cc
refs/heads/master
2022-12-13T06:18:06.416179
2020-09-16T10:20:30
2020-09-16T10:20:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,538
java
/* * Copyright 2016-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mybatis.dynamic.sql.util; import java.util.Objects; import java.util.function.Supplier; import org.mybatis.dynamic.sql.SqlColumn; public class PropertyWhenPresentMapping extends PropertyMapping { private final Supplier<?> valueSupplier; private PropertyWhenPresentMapping(SqlColumn<?> column, String property, Supplier<?> valueSupplier) { super(column, property); this.valueSupplier = Objects.requireNonNull(valueSupplier); } public boolean shouldRender() { return valueSupplier.get() != null; } @Override public <R> R accept(ColumnMappingVisitor<R> visitor) { return visitor.visit(this); } public static PropertyWhenPresentMapping of(SqlColumn<?> column, String property, Supplier<?> valueSupplier) { return new PropertyWhenPresentMapping(column, property, valueSupplier); } }
[ "jeffgbutler@gmail.com" ]
jeffgbutler@gmail.com
7d86760e83f82dc386f914d7c0eed46318723374
7b4fd58090aa7013137ba2734d7f256b812861e1
/src/Ellias/rm/com/tencent/component/net/http/request/AsyncHttpRequest.java
42dd08728a019904f29ba3502e87a0e6edb8abfe
[]
no_license
daihuabin/Ellias
e37798a6a2e63454f80de512319ece885b6a2237
fd010991a5677e6aa104b927b82fc3d6da801887
refs/heads/master
2023-03-16T21:12:33.908495
2020-02-10T15:42:22
2020-02-10T15:42:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,887
java
package com.tencent.component.net.http.request; import android.content.Context; import com.tencent.component.annotation.PluginApi; import com.tencent.component.net.http.AsyncRequestListener; import com.tencent.component.net.http.AsyncResponseHandler; import com.tencent.component.net.http.FluentCaseInsensitiveStringsMap; import com.tencent.component.net.http.strategy.AsyncRetryHandler; import com.tencent.component.utils.HttpUtil.RequestOptions; import com.tencent.component.utils.thread.ThreadPool.Priority; import org.apache.http.client.methods.HttpUriRequest; @PluginApi(a=8) public abstract interface AsyncHttpRequest { @PluginApi(a=8) public abstract void cancel(); @PluginApi(a=8) public abstract HttpUriRequest generateHttpRequest(Context paramContext, HttpUtil.RequestOptions paramRequestOptions); @PluginApi(a=8) public abstract Object getExtra(String paramString); @PluginApi(a=8) public abstract FluentCaseInsensitiveStringsMap getHeaders(); @PluginApi(a=8) public abstract String getIdentifier(); @PluginApi(a=8) public abstract ThreadPool.Priority getPriority(); @PluginApi(a=8) public abstract AsyncRequestListener getRequestListener(); @PluginApi(a=8) public abstract AsyncResponseHandler getResponseHandler(); @PluginApi(a=8) public abstract AsyncRetryHandler getRetryHandler(); @PluginApi(a=8) public abstract int getSeqNo(); @PluginApi(a=8) public abstract long getTimeout(); @PluginApi(a=8) public abstract String getUrl(); @PluginApi(a=8) public abstract boolean isCanceled(); @PluginApi(a=8) public abstract void putExtra(String paramString, Object paramObject); @PluginApi(a=8) public abstract void setSeqNo(int paramInt); } /* Location: D:\rm_src\classes_dex2jar\ * Qualified Name: com.tencent.component.net.http.request.AsyncHttpRequest * JD-Core Version: 0.6.0 */
[ "sevarsti@sina.com" ]
sevarsti@sina.com
6999202a1e572eff845977a89f2350cd2ecf13d9
af4707a9960da448114bf94766afa5da6fa20353
/service-message/src/main/java/com/edu/message/actionFactory/impl/LogoutAction.java
8cf9e10cfca20f8a814744f9e0786bf6c8e33eb4
[]
no_license
Mjhhh/mc
281e99dfaba735532718662640c743f1233d4187
a9ade643a92b80d94a77e2f9da1c59b7b15ff833
refs/heads/master
2022-12-05T00:07:04.462670
2020-05-04T10:02:23
2020-05-04T10:02:23
220,754,046
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
package com.edu.message.actionFactory.impl; import com.edu.framework.domain.message.DataContent; import com.edu.framework.domain.message.UserChannelRel; import com.edu.message.actionFactory.Action; import com.edu.message.netty.ChatHandler; import io.netty.channel.Channel; public class LogoutAction implements Action { /** * 2.7 强制用户登出 */ @Override public void doAction(Channel currentChannel, DataContent dataContent) { String receiverId = dataContent.getUserChatMsg().getAcceptUserId(); Channel receiverChannel = UserChannelRel.get(receiverId); ChatHandler.sendMsgAndNotSave(receiverChannel, dataContent); } }
[ "majunhong58520" ]
majunhong58520
22b88f447ba27ee13ef5276c6581a6384dcc1adb
cab643c3a6ae057cc695f7dbce4f310ace5d6302
/fap/app/controllers/SoporteController.java
03c61482a93f9c8dcff24875f20d6ed120198b36
[]
no_license
franoliver/Fap-Module
76457d65698ed9ddda6ae09198d7e98bebbfb7bf
468bd6b776cc8ed8019983a9cdde2002fa8c0893
refs/heads/master
2021-01-20T21:24:04.475761
2011-12-22T13:24:54
2011-12-22T13:24:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,268
java
package controllers; import messages.Messages; import models.Agente; import models.Incidencia; import play.Logger; import play.mvc.Util; import controllers.fap.AgenteController; import controllers.fap.SecureController; import controllers.gen.SoporteControllerGen; public class SoporteController extends SoporteControllerGen { public static void index(){ Incidencia incidencia = getIncidencia(); Agente agente = AgenteController.getAgente(); if(agente != null){ //Rellena campos de la incidencia con la información del agente incidencia.email = agente.email; incidencia.nombre = agente.name; } renderTemplate( "gen/Soporte/Soporte.html" , incidencia); } public static void incidencia(Incidencia incidencia){ checkAuthenticity(); Incidencia dbincidencia = getIncidencia(); incidenciaValidateCopy(dbincidencia, incidencia); if(!validation.hasErrors()){ emails.Mails.enviar("incidencia",incidencia); dbincidencia.save(); Logger.info("Guardando incidencia"); } incidenciaRender(); } @Util public static void incidenciaRender(){ if (!Messages.hasMessages()) { Messages.ok("Su consulta o incidencia se ha enviado correctamente"); } Messages.keep(); redirect( "SoporteController.index" ); } }
[ "jelcaf@gmail.com" ]
jelcaf@gmail.com
556b2c750ad7f9a7835c9333c4c2fe209ddbba8e
d7ea7d8d5545f4a72191ac3d6d28a8aa6ada2b29
/src/main/java/com/mycompany/atsp_excercise/ATSP_Model.java
fc4ab6ffa06bbaf25433285af279d162ef5a6c07
[]
no_license
Diego-Fabbri/Travel-Salesman-Problem_-ATSP-
935df7f82c056cfbd60ca0d4d6869723cc3ed157
33ef1bb72b6fff45aee22b3f3448b1489d900e63
refs/heads/main
2023-07-08T09:15:01.496495
2021-08-03T21:04:05
2021-08-03T21:04:05
285,330,822
0
0
null
null
null
null
UTF-8
Java
false
false
3,296
java
package com.mycompany.atsp_excercise; import ilog.concert.*; import ilog.cplex.*; import java.awt.Color; import java.awt.Paint; import java.io.File; import java.io.IOException; import java.text.NumberFormat; import java.util.Iterator; import java.util.List; public class ATSP_Model { public static void solveATSP(int n, double[][] dist) { double[][] c = dist; //Modeling try { IloCplex cplex = new IloCplex(); // Variables IloNumVar[][] x = new IloNumVar[n][]; for (int i = 0; i < n; i++) { x[i] = cplex.boolVarArray(n); } IloNumVar[] u = new IloNumVar[n]; for (int i = 0; i < n; i++) { u[i] = cplex.numVar(0, Double.MAX_VALUE); } //Objective IloLinearNumExpr objective = cplex.linearNumExpr(); for (int i = 0; i < n; i++) { int pos_i = i + 1; for (int j = 0; j < n; j++) { int pos_j = j + 1; x[i][j] = cplex.boolVar("x[" + pos_i + "][" + pos_j + "]"); objective.addTerm(c[i][j], x[i][j]); } } cplex.addMinimize(objective); //Constraints for (int j = 0; j < n; j++) {//degree constraints. IloLinearNumExpr exp = cplex.linearNumExpr(); for (int i = 0; i < n; i++) { if (i != j) { exp.addTerm(1, x[i][j]); } } cplex.addEq(exp, 1); } for (int i = 0; i < n; i++) {//degree constraints. IloLinearNumExpr exp = cplex.linearNumExpr(); for (int j = 0; j < n; j++) { if (j != i) { exp.addTerm(1, x[i][j]); } } cplex.addEq(exp, 1); } //WARNING:if i,j=0, this is the Depot. for (int i = 1; i < n; i++) {//connectivity constraints). for (int j = 1; j < n; j++) { if (i != j) { IloLinearNumExpr exp = cplex.linearNumExpr(); exp.addTerm(1, u[i]); exp.addTerm(-1, u[j]); exp.addTerm((n - 1), x[i][j]); cplex.addLe(exp, (n - 2)); } } } //Solving cplex.solve(); System.out.println(); System.out.println("Solution status = " + cplex.getStatus()); System.out.println(); cplex.exportModel("ATSP_Exercise.lp"); System.out.println("Optimal value = " + cplex.getObjValue()); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (cplex.getValue(x[i][j]) != 0) { System.out.println("x[" + i + "][" + j + "] = " + cplex.getValue(x[i][j])); } } // System.out.println("u[" + i + "] = "+ cplex.getValue(u[i])); } } catch (IloException exc) { exc.printStackTrace(); } } }
[ "diegofabbri96@gmail.com" ]
diegofabbri96@gmail.com
50c9e4e5639d6c777807f1db3fd19ec6feddf865
d28d8db9855eaffa9631087db24c3b0d762cfe41
/src/chapter06/exercise/PrinterExample.java
e27e0bff79633044f5712ae64407f362840e651f
[]
no_license
dnjsp/JAVA
7bd4b3771fbbb70710f6ac8b44d8c3c337902d2d
c2fa0c119a55f8fd67057e186e0ea6e762d4bfc4
refs/heads/master
2023-09-05T16:57:01.996987
2021-11-12T11:36:53
2021-11-12T11:36:53
385,136,135
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package chapter06.exercise; public class PrinterExample { public static void main(String[] args) { Printer printer = new Printer(); printer.println(10); printer.println(true); printer.println(5.7); printer.println("홍길동"); } }
[ "PC-13@DESKTOP-JQN4RP0" ]
PC-13@DESKTOP-JQN4RP0
73c66dfb17eb3f829f51bbcb1bf4ec60baec5452
15692ee8017bc5a555be985bc6bf31e7339d40aa
/techguy/mods/undead/client/ModUndeadTexturePortalFX.java
4b1165aa8f6a43bddbb48a2a5bd09c5fb027c870
[]
no_license
TechGuy543/UndeadPlus
b777153565c74e73a49bec1576b4ffc115bb23aa
c96fd00cbeb034675bad1c847037b105899fb9b8
refs/heads/master
2021-03-12T23:11:27.731320
2013-01-26T13:53:20
2013-01-26T13:53:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,275
java
package techguy.mods.undead.client; import java.util.Random; import techguy.mods.undead.common.ModUndeadMainRegistry; import net.minecraft.util.MathHelper; import cpw.mods.fml.client.FMLTextureFX; public class ModUndeadTexturePortalFX extends FMLTextureFX { /** Portal tick counter */ private int portalTickCounter = 0; /** Portal texture data */ private byte[][] portalTextureData; public ModUndeadTexturePortalFX() { super(ModUndeadMainRegistry.dimPortalBlock.blockIndexInTexture); setup(); } @Override public void setup() { super.setup(); portalTextureData = new byte[32][tileSizeSquare << 4]; Random var1 = new Random(100L); for (int var2 = 0; var2 < 32; ++var2) { for (int var3 = 0; var3 < tileSizeBase; ++var3) { for (int var4 = 0; var4 < tileSizeBase; ++var4) { float var5 = 0.0F; int var6; for (var6 = 0; var6 < 2; ++var6) { float var7 = (float)(var6 * tileSizeBase) * 0.5F; float var8 = (float)(var6 * tileSizeBase) * 0.5F; float var9 = ((float)var3 - var7) / (float)tileSizeBase * 2.0F; float var10 = ((float)var4 - var8) / (float)tileSizeBase * 2.0F; if (var9 < -1.0F) { var9 += 2.0F; } if (var9 >= 1.0F) { var9 -= 2.0F; } if (var10 < -1.0F) { var10 += 2.0F; } if (var10 >= 1.0F) { var10 -= 2.0F; } float var11 = var9 * var9 + var10 * var10; float var12 = (float)Math.atan2((double)var10, (double)var9) + ((float)var2 / 32.0F * (float)Math.PI * 2.0F - var11 * 10.0F + (float)(var6 * 2)) * (float)(var6 * 2 - 1); var12 = (MathHelper.sin(var12) + 1.0F) / 2.0F; var12 /= var11 + 1.0F; var5 += var12 * 0.5F; } var5 += var1.nextFloat() * 0.1F; var6 = (int)(var5 * 100.0F + 155.0F); int var13 = (int)(var5 * var5 * 200.0F + 55.0F); int var14 = (int)(var5 * var5 * var5 * var5 * 255.0F); int var15 = (int)(var5 * 100.0F + 155.0F); int var16 = var4 * tileSizeBase + var3; this.portalTextureData[var2][var16 * 4 + 0] = (byte)var13; this.portalTextureData[var2][var16 * 4 + 1] = (byte)var14; this.portalTextureData[var2][var16 * 4 + 2] = (byte)var6; this.portalTextureData[var2][var16 * 4 + 3] = (byte)var15; } } } portalTickCounter = 0; } public void onTick() { ++this.portalTickCounter; byte[] var1 = this.portalTextureData[this.portalTickCounter & 31]; for (int var2 = 0; var2 < tileSizeSquare; ++var2) { int var3 = var1[var2 * 4 + 0] & 255; int var4 = var1[var2 * 4 + 1] & 255; int var5 = var1[var2 * 4 + 2] & 255; int var6 = var1[var2 * 4 + 3] & 255; if (this.anaglyphEnabled) { int var7 = (var3 * 30 + var4 * 59 + var5 * 11) / 100; int var8 = (var3 * 30 + var4 * 70) / 100; int var9 = (var3 * 30 + var5 * 70) / 100; var3 = var7; var4 = var8; var5 = var9; } this.imageData[var2 * 4 + 0] = (byte)var3; this.imageData[var2 * 4 + 1] = (byte)var4; this.imageData[var2 * 4 + 2] = (byte)var5; this.imageData[var2 * 4 + 3] = (byte)var6; } } }
[ "techguy.mc@gmail.com" ]
techguy.mc@gmail.com
3bfc1f307be869f6ab19c066f2eea0b45b0c745c
56d34406d4b12c308bbaef32c30f03ad1fa5e5fa
/Olio-ohjelmointi/src/Harjoitus22lokakuu/Tietorakenteita.java
d1e693667b70eac16af2afcbf91f587441a93dbd
[]
no_license
Lesuz/R0317-Olio-ohjelmointi
6dcb0127aaf537f894bdb31fe6ed222d23ace4da
ee7ef7b4e54efa48e79501b8856fe66e78af00ce
refs/heads/master
2020-08-23T15:20:50.911079
2019-12-03T17:00:54
2019-12-03T17:00:54
216,649,604
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package Harjoitus22lokakuu; import java.util.ArrayList; public class Tietorakenteita { public static void main(String[] args) { String[] taulu = new String[10]; ArrayList<String> uusiTaulu = new ArrayList<String>(); for (int i = 0; i < 1000000; i++) { uusiTaulu.add("Hoi Maailma"); } System.out.println("Alkion x on: " + uusiTaulu.get(999999)); } }
[ "Lesuz@users.noreply.github.com" ]
Lesuz@users.noreply.github.com
6f33d573d77b511c7dc2dba610c8b44841aaa943
5b6c155f5bb2a579903406c615669aef9fce8b78
/SAEHAMANO_MANAGE/src/mvc/adminCulture/controller/CultureAddServlet.java
a118ec12d7c4542726761d762b8e94036c91f0ba
[]
no_license
Pyeon0904/SAEHAMANO_MANAGE
0b4358dfe4efc4d1b413f1665bdad6a3f07ca648
19753a3d3021e85b9cb689892ebf828c506c3f61
refs/heads/main
2023-05-04T17:04:39.640869
2021-05-25T11:54:07
2021-05-25T11:54:07
363,107,400
0
0
null
null
null
null
UTF-8
Java
false
false
3,264
java
//20210430 19:43 이재용 package mvc.adminCulture.controller; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.oreilly.servlet.MultipartRequest; import mvc.adminCulture.model.service.CultureService; import mvc.adminCulture.model.vo.Culture; import mvc.common.util.FileRename; @WebServlet("/culture/add") public class CultureAddServlet extends HttpServlet { private static final long serialVersionUID = 1L; private CultureService service = new CultureService(); public CultureAddServlet() { } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String viewName = "/views/cultureGuide/adminCulAdd.jsp"; request.getRequestDispatcher(viewName).forward(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Culture culture = new Culture(); Culture cul_img = new Culture(); String path = getServletContext().getRealPath("/resources/upload/culture"); int maxSize = 10485760; String encoding = "UTF-8"; MultipartRequest mr =new MultipartRequest(request, path, maxSize, encoding, new FileRename()); String cul_no = mr.getParameter("cul_no"); String cul_name = mr.getParameter("name"); String cul_region = mr.getParameter("region"); String cul_location = mr.getParameter("location"); String cul_invalid = mr.getParameter("invalid"); String deg_date = mr.getParameter("deg_date"); String cul_era = mr.getParameter("era"); String cul_category = mr.getParameter("category"); String cul_field = mr.getParameter("field"); String cul_description = mr.getParameter("description"); String cul_img1 = mr.getParameter("img1"); String cul_img2 = mr.getParameter("img2"); String cul_img3 = mr.getParameter("img3"); String original_filename = mr.getOriginalFileName("upfile"); String renamed_filename = mr.getFilesystemName("upfile"); culture.setCul_no(cul_no); culture.setCul_name(cul_name); culture.setCul_region(cul_region); culture.setCul_location(cul_location); culture.setCul_invalid(cul_invalid); culture.setDeg_date(deg_date); culture.setCul_era(cul_era); culture.setCul_category(cul_category); culture.setCul_field(cul_field); culture.setCul_description(cul_description); int result2 = service.save(culture); String find_no = service.findNo(culture); cul_img.setImg1(cul_img1); cul_img.setImg2(cul_img2); cul_img.setImg3(cul_img3); cul_img.setCul_no(find_no); cul_img.setOriginal_filename(original_filename); cul_img.setRenamed_filename(renamed_filename); int result1 = service.saveCulImg(cul_img); if(result2 > 0) { request.setAttribute("msg", "게시글 등록 성공"); request.setAttribute("location", "/cultural/list"); }else { request.setAttribute("msg", "게시글 등록 실패"); request.setAttribute("location", "/culture/add"); } request.getRequestDispatcher("/views/common/msg.jsp").forward(request, response); } }
[ "jjp2548@naver.com" ]
jjp2548@naver.com
0f3c96146dbb56ca56198ea63ed0eb467fa78d23
6547601586526047e94c885e0870c5a730d6ec21
/spring/src/main/java/kr/green/tottenham/controller/HomeController.java
13ec47d7bbf19925c0b5063bdebf487f26a79e23
[]
no_license
Hyunkee/tottenham
3375775f1c23fdb7233f7253582ceed1607e4d7f
5dddad28426f67a2cb5284197e7f5716e34491e8
refs/heads/master
2022-12-23T00:16:11.942632
2019-09-29T15:29:02
2019-09-29T15:29:02
201,146,288
0
0
null
2022-12-16T09:43:16
2019-08-08T00:13:37
JavaScript
UTF-8
Java
false
false
5,247
java
package kr.green.tottenham.controller; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestBody; 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.servlet.ModelAndView; import kr.green.tottenham.service.MemberService; import kr.green.tottenham.vo.MemberVO; @Controller public class HomeController { @Autowired MemberService memberService; private static final Logger logger = LoggerFactory.getLogger(HomeController.class); @RequestMapping(value="/", method=RequestMethod.GET) public ModelAndView mainGet(ModelAndView mv) throws Exception{ mv.setViewName("/main/home"); return mv; } @RequestMapping(value="/member/signin", method=RequestMethod.GET) public ModelAndView memberSigninGet(ModelAndView mv) throws Exception{ mv.setViewName("/member/signin"); return mv; } @RequestMapping(value="/member/signin", method=RequestMethod.POST) public String memberSigninPost(MemberVO mVo, Model model){ MemberVO user = memberService.signin(mVo); if(user != null) { model.addAttribute("user",user); return "redirect:/"; } return "redirect:/member/signin"; } @RequestMapping(value="/member/signout", method=RequestMethod.GET) public String memberSignoutGet(HttpServletRequest r) throws Exception{ r.getSession().removeAttribute("user"); return "redirect:/"; } @RequestMapping(value="/member/register", method=RequestMethod.GET) public ModelAndView memberRegisterGet(ModelAndView mv) throws Exception{ mv.setViewName("/member/register"); return mv; } @RequestMapping(value="/member/register", method=RequestMethod.POST) public String memberRegisterPost(MemberVO mVo){ if(memberService.register(mVo)) return "redirect:/"; else { return "redirect:/member/register"; } } @RequestMapping(value ="/member/dup") @ResponseBody public Map<Object, Object> idcheck(@RequestBody String id){ Map<Object, Object> map = new HashMap<Object, Object>(); boolean isMember = memberService.isMember(id); map.put("isMember",isMember); return map; } @RequestMapping(value="/member/modify", method=RequestMethod.GET) public ModelAndView memberModifyGet(ModelAndView mv) throws Exception{ mv.setViewName("/member/modify"); return mv; } @RequestMapping(value = "/member/modify", method = RequestMethod.POST) public String memberModifyPost(MemberVO mVo, String oldPw) { if(memberService.modify(mVo,oldPw)) return "redirect:/"; else { return "redirect:/member/modify"; } } @RequestMapping(value="/member/find", method=RequestMethod.GET) public ModelAndView memberPasswordGet(ModelAndView mv) throws Exception{ mv.setViewName("/member/find"); return mv; } @RequestMapping(value ="/checkid") @ResponseBody public Map<Object, Object> idfind(@RequestBody String str){ Map<Object, Object> map = new HashMap<Object, Object>(); String [] arr = str.split("&"); String name = arr[0]; String email = ""; try { email = URLDecoder.decode(arr[1], "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } name = memberService.getVal(name); email = memberService.getVal(email); System.out.println(name); System.out.println(email); MemberVO isOk = memberService.checkId(name,email); map.put("isOk", isOk.getId()); return map; } @RequestMapping(value = "/id/send") public String idSend() { return "redirect:/member/signin"; } // 아이디와 이메일체크 @RequestMapping(value ="/checkpw") @ResponseBody public Map<Object, Object> pwfind(@RequestBody String str){ Map<Object, Object> map = new HashMap<Object, Object>(); System.out.println(str); String [] arr = str.split("&"); String id = arr[0]; String email = ""; try { email = URLDecoder.decode(arr[1], "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } System.out.println(id); System.out.println(email); id = memberService.getVal(id); email = memberService.getVal(email); boolean isOk = memberService.checkMember(id,email); map.put("isOk", isOk); System.out.println(str); return map; } // 임시 비밀번호 메일로 발송 @RequestMapping(value = "/password/send") public String passwordSend(String email,String id) { String newPw = memberService.createPw(); memberService.modify(id, email, newPw); String title = "변경된 비밀번호입니다."; String contents = "변경된 비밀번호입니다.\n"+newPw+"\n"; memberService.sendMail(email,title,contents); return "redirect:/member/signin"; } }
[ "khk2909@daum.net" ]
khk2909@daum.net
be859ad35a202a30cffa99e1461683f5b36dfea1
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/google/android/gms/ads/formats/NativeContentAd.java
2f6fe95f953bc46fe1707185c5e893ddc5191100
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
831
java
package com.google.android.gms.ads.formats; import com.google.android.gms.ads.C2412j; import com.google.android.gms.ads.formats.C2356c.C2355b; import java.util.List; public abstract class NativeContentAd extends C2356c { public interface OnContentAdLoadedListener { void onContentAdLoaded(NativeContentAd nativeContentAd); } /* renamed from: b */ public abstract CharSequence m14166b(); /* renamed from: c */ public abstract List<C2355b> m14167c(); /* renamed from: d */ public abstract CharSequence m14168d(); /* renamed from: e */ public abstract C2355b m14169e(); /* renamed from: f */ public abstract CharSequence m14170f(); /* renamed from: g */ public abstract CharSequence m14171g(); /* renamed from: h */ public abstract C2412j m14172h(); }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
1b3a6c1fb1f32b1b386f28dfea0d10f9be13c606
47f068783ceda233fedf5829ce847544c3895ba4
/22_arrays_separated-array_sep_09_decl_C_style/array_sep_09_decl_C_style.java
c3b16440ecf023e1d4bea98bba3673169ac89ffe
[]
no_license
pengyunie/gvm-kbenchmark
ffef100cf9be46fa07ea04ffee16d0d2901a2394
2915cbd930aa82f8c26a4e63dab90faf59f9b08d
refs/heads/master
2022-01-19T04:06:49.659426
2019-04-04T05:06:39
2019-04-04T05:06:39
195,458,348
1
0
null
null
null
null
UTF-8
Java
false
false
817
java
/* Array variable, [] as part of the declarator (compatibility with C): - int[] b[]. Assign, access. - int[] b[][]. Assign, access. - int[][] b[][] = new[][][][]. Assign, access. */ public class array_sep_09_decl_C_style { public static void main(String[] args) { new main(); System.out.println(); System.out.println("Done!"); } } class main { main() { int[] m[]; m = new int[2][2]; m[0][0] = 44; System.out.println(m[0][0]); int[] m3[][]; m3 = new int[1][1][1]; m3[0][0][0] = 555; System.out.println(m3[0][0][0]); int[][] m4[][] = new int[1][1][1][1]; m4[0][0][0][0] = 6666; System.out.println(m4[0][0][0][0]); int a = 1, v[] = new int[3]; v[1] = a; System.out.print(a ); System.out.print(" "); System.out.println( v[1]); } }
[ "prodigy.sov@gmail.com" ]
prodigy.sov@gmail.com
16af762cdd6f1776535730621a84140df2f9c405
c4b161b7d4e36d86ef9207a227d3d6fb47b92464
/java/com/google/gerrit/server/mail/MailFilter.java
d50064dfde5880536f680e01468407f4a6a64eed
[ "Apache-2.0" ]
permissive
19317362/gerrit
fb9a1883f94c7fe7e142d802b7a6df956551dac0
bd1e5e9a194dbef18ca502db5c5564f4863011a4
refs/heads/master
2020-03-15T09:32:13.342045
2018-05-03T18:22:36
2018-05-03T18:22:36
132,077,273
1
0
Apache-2.0
2018-05-04T02:50:25
2018-05-04T02:50:25
null
UTF-8
Java
false
false
1,200
java
// Copyright (C) 2017 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.gerrit.server.mail; import com.google.gerrit.extensions.annotations.ExtensionPoint; import com.google.gerrit.server.mail.receive.MailMessage; /** * Listener to filter incoming email. * * <p>Invoked by Gerrit for each incoming email. */ @ExtensionPoint public interface MailFilter { /** * Determine if Gerrit should discard or further process the message. * * @param message MailMessage parsed by Gerrit. * @return {@code true}, if Gerrit should process the message, {@code false} otherwise. */ boolean shouldProcessMessage(MailMessage message); }
[ "hiesel@google.com" ]
hiesel@google.com
e34714296352fa8cb973e57faef51f8fc996f805
cdc9a334996b0c933269b7aa8b39357c97176ca5
/java/service-buc/src/main/java/com/suneee/ucp/base/model/UcpBaseModel.java
eae08aa07710f8f768d7ae9e3fba9ff9b459b298
[]
no_license
lmr1109665009/oa
857c2729398f08f2094f47824f383cfa4d808ae6
21cf4bac10ab72520a1f0dfdd965b9378081823c
refs/heads/master
2020-05-16T10:39:51.316044
2019-04-23T10:13:26
2019-04-23T10:13:26
182,986,352
2
3
null
null
null
null
UTF-8
Java
false
false
197
java
/** * */ package com.suneee.ucp.base.model; import com.suneee.core.model.BaseModel; /** * 实体基类 * @author Administrator * */ public class UcpBaseModel extends BaseModel { }
[ "lmr1109665009@163.com" ]
lmr1109665009@163.com
2412025326671e5da93d2b3aff9e229d580d02d7
98ccdade8192b9510532eef45b97313cd1f35808
/src/main/java/nl/aartj/GarageApp/security/UserDetailsServiceImpl.java
20ef904a0ab228bf6f6792d668fd0eb57b2c41ef
[]
no_license
jeaust8/EindopdrachtBootcamp
82211f478b922728aa729719d101a05687b5e3e5
3c88e6d318cbf67d5b81817e30619ae47aa64aed
refs/heads/master
2023-05-31T17:07:10.493107
2021-06-21T17:13:17
2021-06-21T17:13:17
373,161,621
0
0
null
null
null
null
UTF-8
Java
false
false
2,255
java
package nl.aartj.GarageApp.security; import nl.aartj.GarageApp.customer.CustomerAccount; import nl.aartj.GarageApp.customer.CustomerAccountService; import nl.aartj.GarageApp.employee.EmployeeAccount; import nl.aartj.GarageApp.employee.EmployeeAccountService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import java.util.Optional; @Service public class UserDetailsServiceImpl implements UserDetailsService { @Autowired EmployeeAccountService employeeAccountService; @Autowired CustomerAccountService customerAccountService; public String userEmail; public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException { Optional<EmployeeAccount> optionalEmployeeAccount = employeeAccountService.getEmployeeByEmail(email); if (optionalEmployeeAccount.isEmpty()) { Optional<CustomerAccount> optionalCustomerAccount = customerAccountService.getCustomerByEmail(email); CustomerAccount customerAccount = optionalCustomerAccount.get(); if(optionalCustomerAccount.isPresent()){ UserDetails user = User.builder() .username(customerAccount.getEmail()) .password(customerAccount.getPassword()) .roles("ROLE_CUSTOMER") .build(); userEmail = customerAccount.getEmail(); return user; } throw new UsernameNotFoundException("Gebruikersnaam niet gevonden."); } EmployeeAccount employeeAccount = optionalEmployeeAccount.get(); UserDetails user = User.builder() .username(employeeAccount.getEmail()) .password(employeeAccount.getPassword()) .roles(employeeAccount.getRole()) .build(); userEmail = employeeAccount.getEmail(); return user; } }
[ "joostvanaartsen@gmail.com" ]
joostvanaartsen@gmail.com
88310303bceca8abfdfec11259a8a4f6cb174bcf
8490ca5fcdc4ee6ecaa530746e2d313b008cb239
/src/Controller/Them_SuaExam.java
002d51c449de6606eae44f9ab8a0842266579d08
[]
no_license
ThiMy46/DoAnCuoiKiWeb_Nhi_Khoa_Dung
601f4dfd1c67720529faccbd5e7c7eb2b1dbc3c8
9ca2b2ecc42b40c68c62fc68c7bfe69984c675b7
refs/heads/master
2021-09-02T07:28:28.761587
2017-12-31T12:41:47
2017-12-31T12:41:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,638
java
package Controller; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.mysql.jdbc.Connection; import DAO.ExamDAO; import DAO.UsersDAO; import DTO.User; import DTO.exam; @WebServlet("/Them_SuaExam") public class Them_SuaExam extends HttpServlet { private static final long serialVersionUID = 1L; public Them_SuaExam() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Connection conn = (Connection) DB.DBConnection.CreateConnection(); int UserID= Integer.parseInt(request.getParameter("temp")); User user1=DAO.UsersDAO.Display_1User(UserID, conn); request.setAttribute("Users", user1); if(request.getParameter("ExamCanSua")==null) { RequestDispatcher rd = request.getRequestDispatcher("themexam.jsp"); rd.forward(request, response); } else { int id = Integer.parseInt(request.getParameter("ExamCanSua")); System.out.println("ExamCanSua nhan duoc la"+id); exam exams = ExamDAO.Display_1Exam(id, conn); request.setAttribute("exams", exams); RequestDispatcher rd = request.getRequestDispatcher("suaexam.jsp"); rd.forward(request, response); } } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }
[ "daothimy46@gmail.com" ]
daothimy46@gmail.com
3cba43a3aaa4d27d0eca256a64ea2db58535aa89
7fa650454f1a13da4e7269a9c1ce9d8b706f6898
/src/main/java/com/lgb/function/support/dictionary/impl/DictionaryService.java
41865b407d26ab94274f538e324f01d75f66b093
[]
no_license
SmithWenge/lgb_manage
ce8599fc8acfa70c2792ca711d83a6f62aec3cac
a19921f0e78ddce6e2dbd2e5d0b4f461abf0930a
refs/heads/master
2021-01-13T03:39:02.422959
2017-01-04T11:28:38
2017-01-04T11:28:38
77,285,583
1
0
null
null
null
null
UTF-8
Java
false
false
759
java
package com.lgb.function.support.dictionary.impl; import com.lgb.function.support.dictionary.Dictionary; import com.lgb.function.support.dictionary.IDictionaryRepository; import com.lgb.function.support.dictionary.IDictionaryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class DictionaryService implements IDictionaryService { @Autowired private IDictionaryRepository repository; @Override public Dictionary getDictionaryById(String id) { return repository.selectById(id); } @Override public List<Dictionary> getAllDictionaries() { return repository.selectAll(); } }
[ "weinipingfan@gmail.com" ]
weinipingfan@gmail.com
74fad79fe4d5ffe7c9b525fa91a0db1972181200
bec82f72610a2038264e303c23c21fd2d917189c
/src/main/java/pmdm/controller/Controller.java
d86e86eb55b7ac1d352908d820bbc7787987d144
[]
no_license
Agios90/demo-pmdm
e62503d8be3ab66ab7e82eb09c23b4ffaf985b6c
a4ab94d11ffc6892253dcd954b9f425fae9d19b8
refs/heads/main
2023-01-14T19:00:40.953867
2020-11-19T17:24:39
2020-11-19T17:24:39
314,307,771
0
0
null
null
null
null
UTF-8
Java
false
false
726
java
package pmdm.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import pmdm.model.Item; import pmdm.model.TransformedItem; import pmdm.service.Service; @RestController @RequestMapping("/") public class Controller { private Service service; public Controller(Service service) { this.service = service; } @PostMapping(path = "/test") public String transformAndPropagate(@RequestBody Item item) throws Exception { return service.propagate(item); } @PostMapping(path = "/print") public String print(@RequestBody TransformedItem transformedItem) { return service.print(transformedItem); } }
[ "angelos.agiorgitis@intrasoft-intl.com" ]
angelos.agiorgitis@intrasoft-intl.com
292855f4265a22ee0a53e4335b1659efee43d091
63d2a77ecd997de7f0b6cd53aaa52efa66f9896e
/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/MessageDeserializerInitializer.java
5ed6dc4e7ab1a22a795ed3be05e86ee3901c4a41
[]
no_license
TTTXXX777/ODL1
7aa138f9cd9bc859620b2255ce6b43a7b1cdf8ba
1dcc105ef745c784298e22a768627c0672652030
refs/heads/master
2020-12-03T00:18:37.407559
2017-07-02T11:58:16
2017-07-02T11:58:16
96,013,576
0
0
null
null
null
null
UTF-8
Java
false
false
9,191
java
/* * Copyright (c) 2013 Pantheon Technologies s.r.o. 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 */ package org.opendaylight.openflowjava.protocol.impl.deserialization; import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry; import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.BarrierReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.EchoReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.EchoRequestMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.ErrorMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.ExperimenterMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.FeaturesReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.FlowRemovedMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetAsyncReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetConfigReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.HelloMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10BarrierReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10EchoReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10EchoRequestMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10ErrorMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FeaturesReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FlowRemovedMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10GetConfigReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10HelloMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PacketInMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PortStatusMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10QueueGetConfigReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10StatsReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.PacketInMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.PortStatusMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.QueueGetConfigReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.RoleReplyMessageFactory; import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.VendorMessageFactory; //IROF yuhao import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.IrofFeaturesReplyMessageFactory; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeatureReplyMessage; //yuhao import org.opendaylight.openflowjava.protocol.impl.util.SimpleDeserializerRegistryHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoRequestMessage; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessage; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetConfigOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloMessage; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessage; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestOutput; /** * @author michal.polkorab * */ public final class MessageDeserializerInitializer { private MessageDeserializerInitializer() { throw new UnsupportedOperationException("Utility class shouldn't be instantiated"); } /** * Registers message deserializers * * @param registry * registry to be filled with deserializers */ public static void registerMessageDeserializers(DeserializerRegistry registry) { // register OF v1.0 message deserializers SimpleDeserializerRegistryHelper helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF10_VERSION_ID, registry); helper.registerDeserializer(0, null, HelloMessage.class, new OF10HelloMessageFactory()); helper.registerDeserializer(1, null, ErrorMessage.class, new OF10ErrorMessageFactory()); helper.registerDeserializer(2, null, EchoRequestMessage.class, new OF10EchoRequestMessageFactory()); helper.registerDeserializer(3, null, EchoOutput.class, new OF10EchoReplyMessageFactory()); helper.registerDeserializer(4, null, ExperimenterMessage.class, new VendorMessageFactory()); helper.registerDeserializer(6, null, GetFeaturesOutput.class, new OF10FeaturesReplyMessageFactory()); helper.registerDeserializer(8, null, GetConfigOutput.class, new OF10GetConfigReplyMessageFactory()); helper.registerDeserializer(10, null, PacketInMessage.class, new OF10PacketInMessageFactory()); helper.registerDeserializer(11, null, FlowRemovedMessage.class, new OF10FlowRemovedMessageFactory()); helper.registerDeserializer(12, null, PortStatusMessage.class, new OF10PortStatusMessageFactory()); helper.registerDeserializer(17, null, MultipartReplyMessage.class, new OF10StatsReplyMessageFactory()); helper.registerDeserializer(19, null, BarrierOutput.class, new OF10BarrierReplyMessageFactory()); helper.registerDeserializer(21, null, GetQueueConfigOutput.class, new OF10QueueGetConfigReplyMessageFactory()); // register Of v1.3 message deserializers helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID, registry); helper.registerDeserializer(0, null, HelloMessage.class, new HelloMessageFactory()); helper.registerDeserializer(1, null, ErrorMessage.class, new ErrorMessageFactory()); helper.registerDeserializer(2, null, EchoRequestMessage.class, new EchoRequestMessageFactory()); helper.registerDeserializer(3, null, EchoOutput.class, new EchoReplyMessageFactory()); helper.registerDeserializer(4, null, ExperimenterMessage.class, new ExperimenterMessageFactory()); helper.registerDeserializer(6, null, GetFeaturesOutput.class, new FeaturesReplyMessageFactory()); helper.registerDeserializer(8, null, GetConfigOutput.class, new GetConfigReplyMessageFactory()); helper.registerDeserializer(10, null, PacketInMessage.class, new PacketInMessageFactory()); helper.registerDeserializer(11, null, FlowRemovedMessage.class, new FlowRemovedMessageFactory()); helper.registerDeserializer(12, null, PortStatusMessage.class, new PortStatusMessageFactory()); helper.registerDeserializer(19, null, MultipartReplyMessage.class, new MultipartReplyMessageFactory()); helper.registerDeserializer(21, null, BarrierOutput.class, new BarrierReplyMessageFactory()); helper.registerDeserializer(23, null, GetQueueConfigOutput.class, new QueueGetConfigReplyMessageFactory()); helper.registerDeserializer(25, null, RoleRequestOutput.class, new RoleReplyMessageFactory()); helper.registerDeserializer(27, null, GetAsyncOutput.class, new GetAsyncReplyMessageFactory()); //IROF yuhao helper.registerDeserializer(59, null, FeatureReplyMessage.class, new IrofFeaturesReplyMessageFactory()); } }
[ "13031080188@163.com" ]
13031080188@163.com
6e239bf13d47712d1671bd086a893583fe6ac6ff
8455ec4d4dc7b787e873b9d31cea4fa1e8c4dbc8
/Selenium/src/main/java/impquestions/febnocciSeries.java
6c30246dc131712ab64fd6e599c6087bc10996a3
[]
no_license
HarikaMadarapu/Selenium
ebee3dd011ecac06a8a3cc780ba16f3a74154f48
293cbb588dcfeafa48cc480e5133671dffee1d15
refs/heads/master
2022-07-30T04:56:30.745042
2019-08-30T10:13:50
2019-08-30T10:13:50
199,837,469
0
0
null
2022-06-29T17:32:47
2019-07-31T10:51:20
Java
UTF-8
Java
false
false
242
java
package impquestions; public class febnocciSeries { public static void main(String[] args) { int n1=0,n2=1,num=10; for(int i=0;i<=num;i++) { int sum=n1+n2; n1=n2; n2=sum; System.out.println(sum); } } }
[ "HarikaMadarapu@137.237.2.53" ]
HarikaMadarapu@137.237.2.53
d11db8ea586e87be232c33316a94b85899a65f40
912e2c879732f9d0cfcc82accd3c4d5e8f99bc3a
/lab1Aserver/src/com/company/server.java
721333b47282b9c0608ce08224963433021541cd
[]
no_license
luben93/komsys
506fabc69110a8e8bfa694aefd96624e11342633
9b67980a65c436052f9358bea4ac1403202084ba
refs/heads/master
2020-03-31T02:08:22.010111
2015-09-23T14:23:58
2015-09-23T14:23:58
42,586,855
0
0
null
2015-10-25T14:40:48
2015-09-16T12:53:03
Java
UTF-8
Java
false
false
3,074
java
package com.company; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketTimeoutException; import java.util.LinkedList; import java.util.NoSuchElementException; /** * Created by luben on 15-09-23. */ public class Server { private int port; private int bufferSize = 1024; private DatagramSocket serverSocket = null; public void serve() throws IOException, NoSuchElementException { System.out.println("Waiting for connection....."); byte[] buffer = new byte[bufferSize]; DatagramPacket packet = new DatagramPacket(buffer, buffer.length); LinkedList<InetAddress> clients = new LinkedList<>(); Protocol p = new Protocol(); serverSocket.receive(packet); String message = new String(packet.getData(), 0, packet.getLength()); clients.add(packet.getAddress()); send(p.game(message), clients.peek(), packet.getPort()); while (true) { try { serverSocket.receive(packet); message = new String(packet.getData(), 0, packet.getLength()); System.out.println("Packet from: " + packet.getAddress().getHostName() + ":" + packet.getPort() + " contained:" + message + ":");//TODO remove last char in message, its a fucking \n if (packet.getAddress().equals(clients.peek())) { // Print information String out = p.game(message); InetAddress addr = clients.peek(); if (out.equals("DONE")) { p = new Protocol(); out = "You have guessed correct\n" + " the game has now ended\n" + " if want to play again you have to stand last in line"; addr = clients.pop(); } send(out, addr, packet.getPort()); //start protocol } else { send("BUSY", packet.getAddress(), packet.getPort()); if (!clients.contains(packet.getAddress())) { clients.add(packet.getAddress()); } } }catch (SocketTimeoutException timeout){ timeout.printStackTrace(); clients.pop(); p=new Protocol(); } } } public Server(int port) { this.port = port; try { serverSocket = new DatagramSocket(port); serverSocket.setSoTimeout(20000); } catch (IOException e) { System.err.println("Could not listen on port: " + port); System.exit(1); } } private void send(String msg, InetAddress recv, int recvPort) throws IOException { byte[] bufOut = msg.getBytes(); DatagramPacket out = new DatagramPacket(bufOut, bufOut.length, recv, recvPort); serverSocket.send(out); } }
[ "luben93@gmail.com" ]
luben93@gmail.com
42ac513ba67233bc05ff97ae1cdff4227cfd4a2b
7d169e796639b01c6b652f12effa1d59951b8345
/src/java/org/apache/bcel/generic/FieldInstruction.java
df8fcb50a3c8679a367d287525450930234fde54
[ "Apache-2.0" ]
permissive
dubenju/javay
65555744a895ecbd345df07e5537072985095e3b
29284c847c2ab62048538c3973a9fb10090155aa
refs/heads/master
2021-07-09T23:44:55.086890
2020-07-08T13:03:50
2020-07-08T13:03:50
47,082,846
7
1
null
null
null
null
UTF-8
Java
false
false
4,277
java
package org.apache.bcel.generic; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache BCEL" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Apache BCEL", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ import org.apache.bcel.classfile.ConstantPool; /** * Super class for the GET/PUTxxx family of instructions. * * @version $Id: FieldInstruction.java,v 1.2 2006/08/23 13:48:30 andos Exp $ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> */ public abstract class FieldInstruction extends FieldOrMethod implements TypedInstruction { /** * Empty constructor needed for the Class.newInstance() statement in * Instruction.readInstruction(). Not to be used otherwise. */ FieldInstruction() {} /** * @param index to constant pool */ protected FieldInstruction(short opcode, int index) { super(opcode, index); } /** * @return mnemonic for instruction with symbolic references resolved */ public String toString(ConstantPool cp) { return org.apache.bcel.Constants.OPCODE_NAMES[opcode] + " " + cp.constantToString(index, org.apache.bcel.Constants.CONSTANT_Fieldref); } /** @return size of field (1 or 2) */ protected int getFieldSize(ConstantPoolGen cpg) { return getType(cpg).getSize(); } /** @return return type of referenced field */ public Type getType(ConstantPoolGen cpg) { return getFieldType(cpg); } /** @return type of field */ public Type getFieldType(ConstantPoolGen cpg) { return Type.getType(getSignature(cpg)); } /** @return name of referenced field. */ public String getFieldName(ConstantPoolGen cpg) { return getName(cpg); } }
[ "dubenju@163.com" ]
dubenju@163.com
53011b770be8d9dfc0bc43b3a8a15cb7411bc877
c171a86e7c59a971ee2b9d1d1116a998fd858e69
/JPA-Hibernate/src/com/ib/demoJPA/metier/Film.java
22771a4e547032a28333541f694a0a2dbb28abca
[]
no_license
serviceshuios/git-aix-java-avance
f6870e56cc2391fefbf4a82a59dc9a7e41146cfe
1d2585bb478240d896f7585f4eb378ad91af75c2
refs/heads/master
2020-04-05T20:32:36.853264
2018-11-15T14:05:31
2018-11-15T14:05:31
157,185,009
0
0
null
null
null
null
UTF-8
Java
false
false
1,255
java
package com.ib.demoJPA.metier; import java.util.HashSet; import java.util.Set; import javax.persistence.DiscriminatorColumn; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.ManyToMany; @Entity @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name="TYPE_FILM") @DiscriminatorValue("FILM") public class Film { @Id @GeneratedValue(strategy=GenerationType.AUTO) private int idFilm; private String nomFilm; @ManyToMany(mappedBy="films") private Set<Contact> contacts = new HashSet<Contact>(); public Set<Contact> getContacts() { return contacts; } public void setContacts(Set<Contact> contacts) { this.contacts = contacts; } public int getIdFilm() { return idFilm; } public void setIdFilm(int idFilm) { this.idFilm = idFilm; } public String getNomFilm() { return nomFilm; } public void setNomFilm(String nomFilm) { this.nomFilm = nomFilm; } @Override public String toString() { return "Film [idFilm=" + idFilm + ", nomFilm=" + nomFilm + "]"; } }
[ "services.huios@gmail.com" ]
services.huios@gmail.com
bb5b1ffd0f205f247696d93ce9585d7c408b3e57
aede7c3841ff6d621ab5f9973da438e68388a2f5
/src/main/java/com/zt/demo_test/util/HttpUtils.java
f00654b4d1559625ae09431772d96b0f0be87830
[]
no_license
cnzhoutao/demo_test
11949c277639381a1db1d47b01c7c36555e06b4f
b09cbf2b5b641ae3b88709c7b06db6d5e91f6210
refs/heads/master
2021-09-20T17:10:58.056574
2018-08-09T00:43:04
2018-08-09T00:43:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
16,197
java
package com.zt.demo_test.util; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.net.ssl.*; import java.io.*; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.HashMap; import java.util.List; import java.util.Map; //import static com.zt.demo_test.controller.StaticResourceController.readInputStream; /** * @Author: zt * @Date: 2018/5/16 11:41 */ public class HttpUtils { private static final Logger LOGGER = LoggerFactory.getLogger(HttpUtils.class); /** * 从另一台服务器获取json数据 * * @param url * @param nameValuePairs * @return */ public static String getJsonFromServer(String url, List<NameValuePair> nameValuePairs) { LOGGER.info("进入网络请求url:" + url); HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); CloseableHttpClient closeableHttpClient = httpClientBuilder.build(); HttpPost httpPost = new HttpPost(url); httpPost.addHeader("Content-type", "application/x-www-form-urlencoded"); try { httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs, "UTF-8")); HttpResponse response = closeableHttpClient.execute(httpPost); if (response.getStatusLine().getStatusCode() == 200) { /*读返回数据*/ return EntityUtils.toString(response.getEntity()); } else { String err = response.getStatusLine().getStatusCode() + ""; LOGGER.error("发送HTTP请求失败:" + err); } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } /** * 向指定URL发送GET方法的请求 * * @param url 发送请求的URL * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 * @return URL 所代表远程资源的响应结果 */ public static String sendGet(String url, String param) { String result = ""; BufferedReader in = null; try { String urlNameString = url + "?" + param; URL realUrl = new URL(urlNameString); // 打开和URL之间的连接 URLConnection connection = realUrl.openConnection(); // 设置通用的请求属性 connection.setRequestProperty("accept", "*/*"); connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); // 建立实际的连接 connection.connect(); // 获取所有响应头字段 Map<String, List<String>> map = connection.getHeaderFields(); // 遍历所有的响应头字段 for (String key : map.keySet()) { System.out.println(key + "--->" + map.get(key)); } // 定义 BufferedReader输入流来读取URL的响应 in = new BufferedReader(new InputStreamReader( connection.getInputStream())); String line; while ((line = in.readLine()) != null) { result += line; } System.out.println(result); } catch (Exception e) { System.out.println("发送GET请求出现异常!" + e); e.printStackTrace(); } // 使用finally块来关闭输入流 finally { try { if (in != null) { in.close(); } } catch (Exception e2) { e2.printStackTrace(); } } return result; } public static String sendGetAndGetCookie(String url, String param, List cookieList) { String result = ""; BufferedReader in = null; try { String urlNameString = url + "?" + param; URL realUrl = new URL(urlNameString); // 打开和URL之间的连接 URLConnection connection = realUrl.openConnection(); // 设置通用的请求属性 connection.setRequestProperty("accept", "*/*"); connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); for (Object o : cookieList) { System.err.println("发送GET请求,票据信息:"+o.toString()); String [] cookie=o.toString().split("="); if("WBX11Ticket".equals(cookie[0])){ connection.setRequestProperty("WBX11Ticket",cookie[1]); } } // 建立实际的连接 connection.connect(); // 获取所有响应头字段 /* Map<String, List<String>> map = connection.getHeaderFields(); // 遍历所有的响应头字段 for (String key : map.keySet()) { System.out.println(key + "--->" + map.get(key)); }*/ // 定义 BufferedReader输入流来读取URL的响应 in = new BufferedReader(new InputStreamReader( connection.getInputStream())); String line; while ((line = in.readLine()) != null) { result += line; } // System.out.println(result); } catch (Exception e) { System.out.println("发送GET请求出现异常!" + e); e.printStackTrace(); } // 使用finally块来关闭输入流 finally { try { if (in != null) { in.close(); } } catch (Exception e2) { e2.printStackTrace(); } } return result; } /** * 向指定 URL 发送POST方法的请求 * * @param url 发送请求的 URL * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 * @return 所代表远程资源的响应结果 */ public static String sendPost(String url, String param) { PrintWriter out = null; BufferedReader in = null; String result = ""; try { URL realUrl = new URL(url); // 打开和URL之间的连接 URLConnection conn = realUrl.openConnection(); // 设置通用的请求属性 conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); // 发送POST请求必须设置如下两行 conn.setDoOutput(true); conn.setDoInput(true); // 获取URLConnection对象对应的输出流 out = new PrintWriter(conn.getOutputStream()); // 发送请求参数 out.print(param); // flush输出流的缓冲 out.flush(); // 定义BufferedReader输入流来读取URL的响应 in = new BufferedReader( new InputStreamReader(conn.getInputStream())); String line; while ((line = in.readLine()) != null) { result += line; } } catch (Exception e) { System.out.println("发送 POST 请求出现异常!" + e); e.printStackTrace(); } //使用finally块来关闭输出流、输入流 finally { try { if (out != null) { out.close(); } if (in != null) { in.close(); } } catch (IOException ex) { ex.printStackTrace(); } } return result; } public static Map<String, Object> sendPostGetCokie(String url, String param) { Map<String, Object> resMap = new HashMap<>(); PrintWriter out = null; BufferedReader in = null; StringBuilder result = new StringBuilder(); try { URL realUrl = new URL(url); // 打开和URL之间的连接 URLConnection conn = realUrl.openConnection(); // 设置通用的请求属性 conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); // 发送POST请求必须设置如下两行 conn.setDoOutput(true); conn.setDoInput(true); // 获取URLConnection对象对应的输出流 out = new PrintWriter(conn.getOutputStream()); // 发送请求参数 out.print(param); // flush输出流的缓冲 out.flush(); // 获取返回的头部信息 Map<String, List<String>> map = conn.getHeaderFields(); //获取cookie信息 List cookies = map.get("Set-Cookie"); resMap.put("cookie", cookies); // 定义BufferedReader输入流来读取URL的响应 in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; while ((line = in.readLine()) != null) { result.append(line); } resMap.put("result", result.toString()); } catch (Exception e) { System.out.println("发送 POST 请求出现异常!" + e); e.printStackTrace(); } //使用finally块来关闭输出流、输入流 finally { try { if (out != null) { out.close(); } if (in != null) { in.close(); } } catch (IOException ex) { ex.printStackTrace(); } } return resMap; } /* * 处理https GET/POST请求 请求地址、请求方法、参数 */ public static String doHttpsRequest(String requestUrl, String param, String method) { StringBuffer buffer = null; try { // 创建SSLContext SSLContext sslContext = SSLContext.getInstance("SSL"); TrustManager[] tm = {new MyX509TrustManager()}; // 初始化 sslContext.init(null, tm, new java.security.SecureRandom()); // 获取SSLSocketFactory对象 SSLSocketFactory ssf = sslContext.getSocketFactory(); URL url = new URL(requestUrl); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setDoOutput(true); // 允许输出流,即允许上传 conn.setDoInput(true); // 允许输入流,即允许下载 conn.setUseCaches(false); // 不使用缓冲 conn.setRequestMethod(method); // 设置当前实例使用的SSLSoctetFactory conn.setSSLSocketFactory(ssf); conn.setHostnameVerifier(new HostnameVerifier() { @Override public boolean verify(String arg0, SSLSession arg1) { return true; } }); // conn.connect(); // 往服务器端写内容 if (StringUtils.isNotBlank(param)) { OutputStream os = conn.getOutputStream(); os.write(param.getBytes("utf-8")); os.flush(); os.close(); } // 读取服务器端返回的内容 InputStream is = conn.getInputStream(); InputStreamReader isr = new InputStreamReader(is, "utf-8"); BufferedReader br = new BufferedReader(isr); buffer = new StringBuffer(); String line = null; while ((line = br.readLine()) != null) { buffer.append(line); } } catch (Exception e) { e.printStackTrace(); } // System.out.println(buffer); return buffer.toString(); } public static class MyX509TrustManager implements X509TrustManager { @Override public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { // TODO Auto-generated method stub } @Override public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { // TODO Auto-generated method stub } @Override public X509Certificate[] getAcceptedIssuers() { // TODO Auto-generated method stub return null; } } public static byte[] getImageFromNetByUrl(String strUrl) { try { URL url = new URL(strUrl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); conn.setConnectTimeout(5 * 1000); InputStream inStream = conn.getInputStream();//通过输入流获取图片数据 byte[] btImg = readInputStream(inStream);//得到图片的二进制数据 return btImg; } catch (Exception e) { e.printStackTrace(); } return null; } public static byte[] getHttpsImg(String requestUrl) { try { // 创建SSLContext SSLContext sslContext = SSLContext.getInstance("SSL"); TrustManager[] tm = {new MyX509TrustManager()}; // 初始化 sslContext.init(null, tm, new java.security.SecureRandom()); // 获取SSLSocketFactory对象 SSLSocketFactory ssf = sslContext.getSocketFactory(); URL url = new URL(requestUrl); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setDoOutput(true); // 允许输出流,即允许上传 conn.setDoInput(true); // 允许输入流,即允许下载 conn.setUseCaches(false); // 不使用缓冲 conn.setRequestMethod("GET"); // 设置当前实例使用的SSLSoctetFactory conn.setSSLSocketFactory(ssf); conn.setHostnameVerifier((arg0, arg1) -> true); // 读取服务器端返回的内容 InputStream is = conn.getInputStream(); byte[] imgByte = new byte[4086]; is.read(imgByte); File file = new File("C:\\Users\\61959\\Desktop\\logo\\logo4.jpg"); FileOutputStream fileOutputStream = new FileOutputStream(file); fileOutputStream.write(imgByte); return imgByte; } catch (Exception e) { e.printStackTrace(); } return null; } public static byte[] readInputStream(InputStream inStream) throws Exception { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int len = 0; while ((len = inStream.read(buffer)) != -1) { outStream.write(buffer, 0, len); } inStream.close(); return outStream.toByteArray(); } }
[ "619598856@qq.com" ]
619598856@qq.com
d338133d90f057c6eec44004f937bd0e9fcf9199
d10489149e45a3ee8f0bfcfe8b917feb68c0bbfc
/NetBeansProjects/VutureTaskOne/src/main/java/com/jamesidowu/vuturetaskone/IOccurrences.java
a1c616dee1a9d1090ed941fdfe67031fb6ca0aca
[]
no_license
jamesidowu/VutureAssignment
7bc679476b44b02d669e51215f1e490ec9a730fa
0fc60c66b4845cdc71e500ed7fdefb1c2f777a2f
refs/heads/master
2021-07-05T15:22:25.880621
2019-06-10T11:13:49
2019-06-10T11:13:49
191,152,572
0
0
null
2020-10-13T13:47:53
2019-06-10T11:08:08
Java
UTF-8
Java
false
false
366
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.jamesidowu.vuturetaskone; import java.util.Map; /** * * @author jamesidowu */ public interface IOccurrences { public Map<String, Integer> countOccurrences(); }
[ "jamesidowu@192.168.0.2" ]
jamesidowu@192.168.0.2
41a5ce561d688a10fe3ff323e92a0d8738f794fd
1ba7adbd9fc138e941549a392efc84c6975b86db
/src/test/java/com/example/basiccrud/BasicCrudApplicationTests.java
2340b69bbe0cc32debc780a93c599078d850d88c
[]
no_license
tumusucharitha/Springboot-mysql-rest-basicCRUD
4c3968b0e16496e2dfdfbd170401fb6291e3a1a6
165154fdde647ab0ca8dcc3203ff8af8e216ef71
refs/heads/master
2023-02-15T06:06:45.273897
2021-01-13T19:10:04
2021-01-13T19:10:04
329,405,916
0
0
null
null
null
null
UTF-8
Java
false
false
216
java
package com.example.basiccrud; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class BasicCrudApplicationTests { @Test void contextLoads() { } }
[ "pavankumar.tumu@outlook.com" ]
pavankumar.tumu@outlook.com
456ae62a3cbfd71268b6a42d9d910abcd9e5aaf7
3afb44b3adaea8d2f1d972cab5de011a47eaf14c
/src/main/java/com/wangsen/callback/Ricky.java
4f665b6adcd0f93c5b18437a7f2be10d22424185
[]
no_license
wangsanmu/threadPool
70d25a2568f47aae535c9412a5d4f7b561c79a6d
6e25cacc967cec0ef47689cb1d5b74b35f400347
refs/heads/master
2021-06-21T08:35:04.789815
2018-06-04T16:15:28
2018-06-04T16:15:28
128,794,586
2
2
null
null
null
null
UTF-8
Java
false
false
382
java
package com.wangsen.callback; /** * @author wangsen * @data 2018/4/13 20:57 */ public class Ricky implements Student { @Override public void resolveQuestion(Callback callback) { try { Thread.sleep(30000); } catch (InterruptedException e) { e.printStackTrace(); } callback.tallAnswer(3); } }
[ "466348638@qq.com" ]
466348638@qq.com
069fa2ae35fcb025817dc7ddd76279823471c75d
c6076445957a4a0a43e279993f0a2907b6d1d640
/GMail Clone/src/signup.java
3df00c4b8932519d983ed4f340baebb6928fc6e3
[]
no_license
hackerstown27/GMail
93365eeb2b81485bce8176e8d3b0b38941b231ca
5fb1431a31ed6eebc53161bce6344c56e87fb2a2
refs/heads/master
2021-04-04T13:17:21.953615
2020-03-19T09:26:32
2020-03-19T09:26:32
248,460,748
0
0
null
null
null
null
UTF-8
Java
false
false
23,097
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. */ import java.sql.DriverManager; import com.mysql.jdbc.Connection; import com.mysql.jdbc.Statement; import javax.swing.JOptionPane; /** * * @author VARUN BHARDWAJ */ public class signup extends javax.swing.JFrame { String port1; /** * Creates new form signup */ public signup() { initComponents(); } public signup(String port) { port1 = port; initComponents(); } /** * 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() { jPanel1 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jname = new javax.swing.JTextField(); jphone_no = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); jaddress = new javax.swing.JTextArea(); jLabel1 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jsec_ques = new javax.swing.JTextField(); jPanel2 = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jusername = new javax.swing.JTextField(); jpassword = new javax.swing.JTextField(); jconfirm_password = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); jsec_ans = new javax.swing.JTextField(); jButton2 = new javax.swing.JButton(); jLabel11 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "USER DETAILS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Serif", 3, 24))); // NOI18N jLabel2.setFont(new java.awt.Font("AR DELANEY", 2, 24)); // NOI18N jLabel2.setText("NAME"); jLabel3.setFont(new java.awt.Font("AR DELANEY", 2, 24)); // NOI18N jLabel3.setText("ADDRESS"); jLabel4.setFont(new java.awt.Font("AR DELANEY", 2, 24)); // NOI18N jLabel4.setText("PHONE NO."); jname.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jphone_no.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jaddress.setColumns(20); jaddress.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jaddress.setRows(5); jScrollPane1.setViewportView(jaddress); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel4) .addGap(132, 132, 132) .addComponent(jphone_no)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(147, 147, 147) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jname) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(jname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addComponent(jphone_no, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); jLabel1.setFont(new java.awt.Font("Arial Black", 3, 36)); // NOI18N jLabel1.setText("SIGN UP"); jButton1.setFont(new java.awt.Font("Microsoft PhagsPa", 3, 24)); // NOI18N jButton1.setText("SIGN UP"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel9.setFont(new java.awt.Font("AR DELANEY", 2, 24)); // NOI18N jLabel9.setText("SECURITY QUESTION"); jLabel10.setFont(new java.awt.Font("AR DELANEY", 2, 24)); // NOI18N jLabel10.setText("ANSWER"); jsec_ques.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "LOGIN DETAILS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Serif", 3, 24))); // NOI18N jLabel5.setFont(new java.awt.Font("AR DELANEY", 2, 24)); // NOI18N jLabel5.setText("USERNAME"); jLabel6.setFont(new java.awt.Font("AR DELANEY", 2, 24)); // NOI18N jLabel6.setText("PASSWORD"); jLabel7.setFont(new java.awt.Font("AR DELANEY", 2, 24)); // NOI18N jLabel7.setText("CONFIRM PASSWORD"); jusername.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jusername.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jusernameActionPerformed(evt); } }); jpassword.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jconfirm_password.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jLabel8.setFont(new java.awt.Font("AR DESTINE", 2, 24)); // NOI18N jLabel8.setText("@csgn.com"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 215, Short.MAX_VALUE) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jusername, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jconfirm_password) .addComponent(jpassword))))) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(31, 31, 31) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(jusername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(2, 2, 2) .addComponent(jLabel8) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jpassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7) .addComponent(jconfirm_password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(29, 29, 29)) ); jsec_ans.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jButton2.setFont(new java.awt.Font("Stencil", 3, 24)); // NOI18N jButton2.setText("BACK"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/signup-icon4.png"))); // NOI18N jLabel11.setText("jLabel11"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(57, 57, 57)) .addGroup(layout.createSequentialGroup() .addGap(404, 404, 404) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jsec_ques) .addComponent(jsec_ans, javax.swing.GroupLayout.DEFAULT_SIZE, 420, Short.MAX_VALUE)) .addGap(269, 269, 269)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jButton2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 244, Short.MAX_VALUE) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(560, 560, 560)))) .addGroup(layout.createSequentialGroup() .addGap(587, 587, 587) .addComponent(jButton1) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jButton2) .addGap(167, 167, 167)) .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jLabel1) .addGap(68, 68, 68))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(28, 28, 28)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, 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.TRAILING) .addComponent(jsec_ques, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel10) .addGroup(layout.createSequentialGroup() .addComponent(jsec_ans) .addGap(2, 2, 2))) .addGap(24, 24, 24) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed String name,address,username_temp,username,password,confirm_password,phone_no,sec_ques,sec_ans; phone_no = jphone_no.getText(); name = jname.getText(); address = jaddress.getText(); username_temp = jusername.getText(); username = username_temp+"@csgn.com"; password = jpassword.getText(); confirm_password=jconfirm_password.getText(); sec_ques=jsec_ques.getText(); sec_ans=jsec_ans.getText(); if(name.isEmpty()) { JOptionPane.showMessageDialog(this,"PLEASE ENTER YOUR NAME"); } else if(address.isEmpty()) { JOptionPane.showMessageDialog(this,"PLEASE ENTER YOUR ADDRESS"); } else if(phone_no.isEmpty()) { JOptionPane.showMessageDialog(this,"PLEASE ENTER YOUR PHONE NO."); } else if(username_temp.isEmpty()) { JOptionPane.showMessageDialog(this,"PLEASE ENTER YOUR USERNAME"); } else if(password.isEmpty()) { JOptionPane.showMessageDialog(this,"PLEASE ENTER YOUR PASSWORD"); } else if(confirm_password.isEmpty()) { JOptionPane.showMessageDialog(this,"PLEASE ENTER CONFIRM PASSWORD"); } else if(sec_ques.isEmpty()) { JOptionPane.showMessageDialog(this,"PLEASE ENTER YOUR SECURITY QUESTION"); } else if(sec_ans.isEmpty()) { JOptionPane.showMessageDialog(this,"PLEASE ENTER YOUR SECURITY ANSWER"); } else if (password.equals(confirm_password)) { try { Class.forName("java.sql.DriverManager"); Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://0.tcp.ngrok.io:"+port1+"/mail","root","toor"); Statement stmt = (Statement) con.createStatement(); String query = "insert into users values ('"+name+"','"+address+"','"+phone_no+"','"+username+"','"+password+"','"+sec_ques+"','"+sec_ans+"')"; stmt.executeUpdate(query); JOptionPane.showMessageDialog(this,"ACCOUNT CREATED SUCCESSFULLY"); this.setVisible(false); new login().setVisible(true); } catch(Exception e) { JOptionPane.showMessageDialog(this,e.getMessage()); } } else { JOptionPane.showMessageDialog(this,"PASSWORD AND CONFIRM PASSWORD ARE NOT SAME"); } }//GEN-LAST:event_jButton1ActionPerformed private void jusernameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jusernameActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jusernameActionPerformed private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed this.setVisible(false); new login().setVisible(true); }//GEN-LAST:event_jButton2ActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(signup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(signup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(signup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(signup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new signup().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea jaddress; private javax.swing.JTextField jconfirm_password; private javax.swing.JTextField jname; private javax.swing.JTextField jpassword; private javax.swing.JTextField jphone_no; private javax.swing.JTextField jsec_ans; private javax.swing.JTextField jsec_ques; private javax.swing.JTextField jusername; // End of variables declaration//GEN-END:variables }
[ "noreply@github.com" ]
noreply@github.com
1b568e437fd6bfe11d221655abee07f9eea4d43c
2935ed67070bdce9ff887342b95919251a269f48
/src/easy/SingleNumber.java
bf7be9e99c353257c09a3568ebe3b68aeeac5724
[]
no_license
wenkie077/leet_code
e780c8fdcff1bafc9023d18fa8af2bf3cda27440
6c155b81486ef5e6379406fff961cc6a4f98f30b
refs/heads/master
2020-05-09T12:12:35.468100
2020-01-16T19:01:46
2020-01-16T19:01:46
181,105,305
0
0
null
2019-04-13T22:20:29
2019-04-13T01:24:42
null
UTF-8
Java
false
false
349
java
package easy; import java.util.Arrays; public class SingleNumber { public int singleNumber(int[] nums) { Arrays.sort(nums); for (int i = 0; i < nums.length - 1; i = i + 2){ if (nums[i] < nums[i + 1]){ return nums[i]; } } return nums[nums.length - 1]; } }
[ "wenqi.wang077@gmail.com" ]
wenqi.wang077@gmail.com
ba463cdb7bdeb609da5aec12e17e4a9fe6873cf0
6288db8e43814261d3f41351845fc900078acc42
/jbSA-GUI/src/org/ilap/javabacula/model/ClientManagerModel.java
9798a884e3f32f7256107c9d97087b7da731d5af
[]
no_license
ilap/JavaBacula
ad1111a74acb45b2804434928784c22c86caa6eb
12741e7f2830e5bc6b6d8ec0bdf6ad7d4941e4d1
refs/heads/master
2020-05-20T11:09:09.148152
2019-05-22T23:05:03
2019-05-22T23:05:03
185,541,537
0
1
null
null
null
null
UTF-8
Java
false
false
4,012
java
/* * JavaBacula -- Java frontend of the Bacula® - The Network Backup Solution * Copyright (C) 2007 by Pal DOROGI * * 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 2 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, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Contact: Pal DOROGI * mailto: pal.dorogi@gmail.com * * $Id$ */ package org.ilap.javabacula.model; import org.ilap.javabacula.network.*; import java.util.StringTokenizer; import com.jgoodies.binding.list.ArrayListModel; import org.ilap.javabacula.util.NumberParser; /** * * @author ilap */ public class ClientManagerModel extends BaculaObjectManagerModel { /** Creates a new instance of ClientManagerModel */ public ClientManagerModel(ClientManager clientManager) { super(clientManager); initModel(); } private void initModel() { } protected ArrayListModel parseShowCommand(String result) { ClientDaemon cld = null; String line; ArrayListModel lm = new ArrayListModel(); // Return an empty list if (result == null) { return lm; } boolean otherToken = false; StringTokenizer st = new StringTokenizer(result, "\n"); while (st.hasMoreTokens()) { line = st.nextToken(); if (line.startsWith("Client:")) { otherToken = false; line = line.replaceAll("^Client:[ ]+", ""); cld= (ClientDaemon) this.getBaculaManager().createBaculaItem(); lm.add(cld); } else if (line.startsWith(" -->")) { otherToken = true; continue; } if ((cld !=null) && (!otherToken)) { String[] tokens = parseLine(line, "="); for (int i=0; i<tokens.length; i+=2) { // isEven if ((i%2 == 0)) { if (tokens[i].equals("name")) { cld.setName(tokens[i+1]); } else if (tokens[i].equals("address")) { cld.setAddress(tokens[i+1]); } else if (tokens[i].equals("FDport")) { cld.setPort(new Integer(tokens[i+1])); } else if (tokens[i].equals("MaxJobs")) { cld.setMaxJobs(NumberParser.parseLong(tokens[i+1])); } else if (tokens[i].equals("JobRetention")) { cld.setJobRetention(tokens[i+1]); } else if (tokens[i].equals("FileRetention")) { cld.setFileRetention(tokens[i+1]); } else if (tokens[i].equals("AutoPrune")) { cld.setAutoPrune(tokens[i+1] == "1"); } } } } } return lm; } public void startModel() { reloadByCommand("show clients"); } public void stopModel() { // Do nothig; } public int compare(Object one, Object two) { String str = ((BaculaObject)two).getName(); return ((BaculaObject)one).getName().equals(str)?0:1; } public void doNew() {} public void doEdit() {} public void doDelete() {} public void doRefresh() {} }
[ "" ]
4c24706401d2bf9bb6cc19bd3d088a898c28502c
0b4a65b61a71296afcbd97ea91c5dfca9ff8ec04
/src/finalPJ/z01_vo/Project.java
ff5d88347cd0b5b6a8dd6a7815e554e428c0a444
[]
no_license
jang0928/pms_1
16acaadbff53327ce3031390105d58b0edda1215
6c5c38e7e7d7e6e1d8fa0424ea1984ef5db34f80
refs/heads/master
2023-04-11T18:19:35.234802
2021-05-10T07:19:41
2021-05-10T07:19:41
364,776,166
0
0
null
null
null
null
UTF-8
Java
false
false
1,027
java
package finalPJ.z01_vo; public class Project { private int pr_no; private String pr_title; // 날짜 String으로 처리? private String pr_date; private String pr_sdate; private String pr_edate; private String pr_state; public int getPr_no() { return pr_no; } public void setPr_no(int pr_no) { this.pr_no = pr_no; } public String getPr_title() { return pr_title; } public void setPr_title(String pr_title) { this.pr_title = pr_title; } public String getPr_date() { return pr_date; } public void setPr_date(String pr_date) { this.pr_date = pr_date; } public String getPr_sdate() { return pr_sdate; } public void setPr_sdate(String pr_sdate) { this.pr_sdate = pr_sdate; } public String getPr_edate() { return pr_edate; } public void setPr_edate(String pr_edate) { this.pr_edate = pr_edate; } public String getPr_state() { return pr_state; } public void setPr_state(String pr_state) { this.pr_state = pr_state; } }
[ "dooboo_1@naver.com" ]
dooboo_1@naver.com
29ea74623a6602aed312b0826dfb98f56ddd3f5c
223e482fee0033209270145d4f5ffdb428f680b2
/JavaCafe/src/common/GetEmpListJsonServ.java
09fe1e73f020fbe733af2aaaad559f9353c918be
[]
no_license
Songyesol/cafe
7e0aa2ca8a3a8fc345a0c763eac84fc7d7911b08
b57b46835c54678f42bf097f35cfeb8faf57217a
refs/heads/master
2023-02-16T08:30:01.674619
2021-01-14T08:54:19
2021-01-14T08:54:19
328,923,670
0
0
null
null
null
null
UTF-8
Java
false
false
1,422
java
package common; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/getEmpList") public class GetEmpListJsonServ extends HttpServlet { private static final long serialVersionUID = 1L; public GetEmpListJsonServ() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { EmpDAO dao = new EmpDAO(); List<EmployeeVO> list = dao.getEmpList(); PrintWriter out = response.getWriter(); String json = "["; int cnt =1; for(EmployeeVO emp:list) { json += "{"; json += "\"empId\":\""+ emp.getEmployeeId() + "\""; json += ",\"firstName\":\""+ emp.getFirstName() + "\""; json += ",\"lastName\":\""+ emp.getLastName() + "\""; json += ",\"email\":\""+ emp.getEmail() + "\""; json += ",\"hireDate\":\""+emp.getHireDate() + "\""; json += ",\"salary\":\""+ emp.getSalary() + "\""; json += "}"; if(list.size() != cnt++) { json += ","; } } json += "]"; out.print(json); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }
[ "yellowsys92@naver.com" ]
yellowsys92@naver.com
df1087a67d60374f9c1ae29f80662d4e42970400
844ce61e1265ddacc83c767b1ae1936fe4f2edfe
/src/main/java/mhfc/net/common/world/area/IExtendedConfiguration.java
c96d96bb774f75a83760e835c1d185079f3767d1
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
ClaymanTwinkle/MHFC
26e8955bdb98140591027cf32b56b6ab81871e53
738b7ffe2280b94fbebbd87b64f04d4eec701d12
refs/heads/master
2020-07-15T22:24:20.040638
2018-11-11T17:20:47
2018-11-11T17:20:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
406
java
package mhfc.net.common.world.area; import mhfc.net.common.util.ISavableToNBT; import net.minecraft.nbt.NBTTagCompound; public interface IExtendedConfiguration extends ISavableToNBT { public static IExtendedConfiguration EMPTY = new IExtendedConfiguration() { @Override public void saveTo(NBTTagCompound nbtTag) {} @Override public void readFrom(NBTTagCompound nbtTag) {} }; }
[ "jayrol_rante2006@yahoo.com" ]
jayrol_rante2006@yahoo.com
2adf15443210659ceff0187235f23ff3b234f644
056eb7899a015ca873e549be302201a4d455ae99
/src/ch/epfl/alpano/summit/GazetteerParser.java
a3a1afb8e4a6d5ec4191b68852f859841bfdff6e
[]
no_license
gkarray/alpano
66305bcb58e644f6d49d5142b6027dd88eaee699
2b57c537d93b2bd5a0aacf073c22c552bc32555c
refs/heads/master
2020-12-30T00:53:17.024387
2020-02-07T00:24:44
2020-02-07T00:24:44
238,803,907
0
0
null
null
null
null
UTF-8
Java
false
false
1,564
java
package ch.epfl.alpano.summit; import java.io.*; import java.util.*; import ch.epfl.alpano.*; /** * * @author Ghassen Karray (257478) */ public class GazetteerParser { private GazetteerParser() { } /** * * @param file * @return Retourne un tableau dynamique non modifiable contenant les * sommets lus depuis le fichier file. * @throws IOException * en cas d'erreur d'entrée/sortie ou si une ligne du fichier * n'obéit pas au format. */ public static List<Summit> readSummitsFrom(File file) throws IOException { ArrayList<Summit> list = new ArrayList<Summit>(); try (BufferedReader b = new BufferedReader(new InputStreamReader(new FileInputStream(file)))) { String s; s = b.readLine(); while (s != null) { s = b.readLine(); if (s != null) list.add(newSummit(s)); } } catch (StringIndexOutOfBoundsException | NumberFormatException e) { throw new IOException(); } return Collections.unmodifiableList(list); } private static Summit newSummit(String s) throws IOException { String longitude = s.substring(0, 9); String latitude = s.substring(10, 18); String name = s.substring(36); String elevation = s.substring(20, 24); return new Summit(name, new GeoPoint(decoup(longitude), decoup(latitude)), Integer.parseInt(elevation.trim())); } private static double decoup(String s) { String[] hms = s.trim().split(":"); return Math.toRadians( Integer.parseInt(hms[0]) + Integer.parseInt(hms[1]) / 60.0 + Integer.parseInt(hms[2]) / 3600.0); } }
[ "ghassen.karray@epfl.ch" ]
ghassen.karray@epfl.ch
3fe0e8031ba600097964d1d682ee6a89c7098ed5
67ef517c11e5fcde8364fc9082029930a8bba06b
/laticobsa/src/java/com/laticobsa/modelo/LcGestiones.java
f7a4fd859a6be0f0ad26b4f998cfe347988a75d8
[ "Apache-2.0" ]
permissive
estalisto/DEMPNMF
c6b5602a0833301e649fcda7c2c0fd2c7bd20692
1957d7c7a93f2e698cc83d698a6a291d912a4012
refs/heads/master
2021-05-07T23:15:29.606823
2017-10-18T03:08:45
2017-10-18T03:08:45
107,352,136
0
0
null
null
null
null
UTF-8
Java
false
false
3,017
java
package com.laticobsa.modelo; // Generated 30-ago-2017 1:41:34 by Hibernate Tools 4.3.1 import java.util.Date; /** * LcGestiones generated by hbm2java */ public class LcGestiones implements java.io.Serializable { private int idGestion; private LcClientes lcClientes; private LcDatosDeudores lcDatosDeudores; private LcEmpleados lcEmpleados; private LcTipoGestion lcTipoGestion; private LcTipoResultado lcTipoResultado; private String observacion; private Date fechaTransaccion; private String estado; public LcGestiones() { } public LcGestiones(int idGestion) { this.idGestion = idGestion; } public LcGestiones(int idGestion, LcClientes lcClientes, LcDatosDeudores lcDatosDeudores, LcEmpleados lcEmpleados, LcTipoGestion lcTipoGestion, LcTipoResultado lcTipoResultado, String observacion, Date fechaTransaccion, String estado) { this.idGestion = idGestion; this.lcClientes = lcClientes; this.lcDatosDeudores = lcDatosDeudores; this.lcEmpleados = lcEmpleados; this.lcTipoGestion = lcTipoGestion; this.lcTipoResultado = lcTipoResultado; this.observacion = observacion; this.fechaTransaccion = fechaTransaccion; this.estado = estado; } public int getIdGestion() { return this.idGestion; } public void setIdGestion(int idGestion) { this.idGestion = idGestion; } public LcClientes getLcClientes() { return this.lcClientes; } public void setLcClientes(LcClientes lcClientes) { this.lcClientes = lcClientes; } public LcDatosDeudores getLcDatosDeudores() { return this.lcDatosDeudores; } public void setLcDatosDeudores(LcDatosDeudores lcDatosDeudores) { this.lcDatosDeudores = lcDatosDeudores; } public LcEmpleados getLcEmpleados() { return this.lcEmpleados; } public void setLcEmpleados(LcEmpleados lcEmpleados) { this.lcEmpleados = lcEmpleados; } public LcTipoGestion getLcTipoGestion() { return this.lcTipoGestion; } public void setLcTipoGestion(LcTipoGestion lcTipoGestion) { this.lcTipoGestion = lcTipoGestion; } public LcTipoResultado getLcTipoResultado() { return this.lcTipoResultado; } public void setLcTipoResultado(LcTipoResultado lcTipoResultado) { this.lcTipoResultado = lcTipoResultado; } public String getObservacion() { return this.observacion; } public void setObservacion(String observacion) { this.observacion = observacion; } public Date getFechaTransaccion() { return this.fechaTransaccion; } public void setFechaTransaccion(Date fechaTransaccion) { this.fechaTransaccion = fechaTransaccion; } public String getEstado() { return this.estado; } public void setEstado(String estado) { this.estado = estado; } }
[ "barcestalyn@gmail.com" ]
barcestalyn@gmail.com
69ca6307da69c2a893c81b36398a2399e72333fb
6ede5ae9be30daf07df4f6eab34b034e228e1ae4
/Struts 2 Code/Lesson 4/struts2/src/com/shengsiyuan/exception/UsernameException.java
85a4ac377fddd9a4b1d66cf0446a31d19a516938
[]
no_license
salingers/Struts
959b8329098b871a6f7c38f88e7344bfcc8d2ae0
8d176de383eef8179dbbc3809d9a25b0a279a836
refs/heads/master
2021-01-13T09:28:45.030419
2016-11-01T03:39:11
2016-11-01T03:41:08
72,090,138
0
0
null
null
null
null
UTF-8
Java
false
false
337
java
package com.shengsiyuan.exception; public class UsernameException extends Exception { private String message; public UsernameException(String message) { super(message); this.message = message; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "salingersms@msn.com" ]
salingersms@msn.com
bb810e64f1d76b89770496c64d541d50f3f85582
627e4dc53d06e554857798b60c59c80d9b7f4554
/src/Model/ToyDetailDAO.java
762f41fa0ee518ba97ea0d61b87805ad608f1775
[]
no_license
gga4638/1stProject
eaf7f5bce99c8058ec6890eda2538f120d2c6510
34a08143a5cf4462664137a7f9e8a744e2ca9b67
refs/heads/master
2022-12-06T16:34:06.209383
2020-08-03T04:32:46
2020-08-03T04:32:46
null
0
0
null
null
null
null
UHC
Java
false
false
1,090
java
package Model; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; public class ToyDetailDAO { Connection conn = null; PreparedStatement psmt = null; ResultSet rs = null; public void getConnect() { try { Class.forName("oracle.jdbc.driver.OracleDriver"); // 2.DB연결 String url = "jdbc:oracle:thin:@127.0.0.1:1521:xe"; String user_id = "hr"; String user_pw = "hr"; conn = DriverManager.getConnection(url, user_id, user_pw); if (conn != null) { System.out.println("연결 성공"); } else { System.out.println("연결 실패"); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } // close 메소드 가져오기 } public void close() { try { if (rs != null) { } if (psmt != null) { psmt.close(); } if (conn != null) { conn.close(); } } catch (SQLException e) { e.printStackTrace(); } } }
[ "SMT039@210.105.224.105" ]
SMT039@210.105.224.105
419218f29cf9b9fe54028a20216fac58cbabd1e6
46f84e1dd5a8677fccd558461c25f04c7d3a3dee
/src/test/java/br/ufg/inf/es/tacs/atividade01/AnoBissextoTest.java
6387394b9bda57759702e28519878a1ac47283a6
[]
no_license
aassilva/example-tdd
ba8ff177a1de7c668901a66fe7089bd9ad0b0115
16b61c8b38dd03e6724d0a9fed4eb35b5c630eb8
refs/heads/master
2020-04-06T15:38:06.988586
2018-11-14T19:25:59
2018-11-14T19:25:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
830
java
package br.ufg.inf.es.tacs.atividade01; import br.ufg.inf.es.tacs.atividade01.AnoBissexto; import org.junit.Assert; import org.junit.Test; /** * Created by Alunoinf_2 on 14/11/2018. */ public class AnoBissextoTest { @Test public void testCasoTrivial() { Assert.assertEquals(true, AnoBissexto.anoBissexto(400)); Assert.assertEquals(false, AnoBissexto.anoBissexto(500)); Assert.assertEquals(true, AnoBissexto.anoBissexto(1200)); Assert.assertEquals(false, AnoBissexto.anoBissexto(1500)); Assert.assertEquals(true, AnoBissexto.anoBissexto(2000)); Assert.assertEquals(false, AnoBissexto.anoBissexto(2001)); Assert.assertEquals(true, AnoBissexto.anoBissexto(2004)); Assert.assertEquals(false, AnoBissexto.anoBissexto(2100)); } }
[ "antoni-s@outlook.com" ]
antoni-s@outlook.com
9c50f742c98eabd078171b373d4d571b6431bba2
498615494072cbd836bc9d9f123f9c44a7c746bc
/src/com/bit/three/Time.java
f6154e06538b9c8db0e9d23f82abffe8466bc42f
[]
no_license
JungKyuHyun/school-certification-java-project
8ac4bd3c97754ddb29a7154da91f4845aac0344f
f486077e0b9149ca63ce85fb84d3af5285a57d0c
refs/heads/master
2020-07-06T12:57:17.566734
2019-08-18T15:45:11
2019-08-18T15:45:11
203,024,713
0
0
null
null
null
null
UTF-8
Java
false
false
1,182
java
package com.bit.three; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.concurrent.TimeUnit; public class Time { private DateTimeFormatter dateTimePattern; private LocalDateTime now; private String pattern; private SimpleDateFormat dateformat; public Time(){ this.pattern = "yyyy/MM/dd HH:mm:ss"; this.dateTimePattern = DateTimeFormatter.ofPattern(pattern); this.now = LocalDateTime.now(); this.dateformat = new SimpleDateFormat(pattern); } public String currentDateTime() { return dateTimePattern.format(this.now); } public void setPattern(String pattern) { this.pattern = pattern; } public long diffDateTime(String dateTime1, String dateTime2) { try { Date d1 = dateformat.parse(dateTime1); Date d2 = dateformat.parse(dateTime2); long diff = d2.getTime()-d1.getTime(); long result = TimeUnit.MILLISECONDS.toSeconds(diff); return result; } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println("오류발생"); return 0; } } }
[ "ajdkfl6445@gmail.com" ]
ajdkfl6445@gmail.com
d4c5be571879b29802a5e1e5466a83aeaf772c31
9357be9307ec90dd5e2255c97362a1497444f5b9
/SSM Task/SSM-Task/src/main/java/com/internship/ssm_task/entity/ExpenseEntity.java
bbc00cbba2518a1ecb9b19587289c598aafc0649
[]
no_license
Apurv-1998/Expenditure-Calculator
53a89a632b062981abac8ebfa85d316e4c4325d3
2142af9baed1020e919a5208559eb42de47db999
refs/heads/master
2022-12-16T02:36:10.755399
2020-09-09T16:48:19
2020-09-09T16:48:19
283,963,863
1
0
null
null
null
null
UTF-8
Java
false
false
2,012
java
package com.internship.ssm_task.entity; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity(name = "expense") @Table(name = "expense") public class ExpenseEntity implements Serializable { private static final long serialVersionUID = 2421024776745927242L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @Column(nullable = true) private double amount; @Column(nullable = true) private Date date; @Column(nullable = true) private String expense; @Column(nullable = true) private String type; @Column(nullable = true) private String category; @Column(nullable = true) private String paymentMode; public long getId() { return id; } public void setId(long id) { this.id = id; } public double getAmount() { return amount; } public void setAmount(double amount) { this.amount = amount; } public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public String getExpense() { return expense; } public void setExpense(String expense) { this.expense = expense; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public String getPaymentMode() { return paymentMode; } public void setPaymentMode(String paymentMode) { this.paymentMode = paymentMode; } @Override public String toString() { return "ExpenseEntity [id=" + id + ", amount=" + amount + ", date=" + date + ", expense=" + expense + ", type=" + type + ", category=" + category + ", paymentMode=" + paymentMode + "]"; } }
[ "noreply@github.com" ]
noreply@github.com
71bb05f3b874755fbfee04e80fbb2085658cd76a
cc54adf6882da167dec8946f5ca9b768ee2b89e8
/src/main/java/org/aaron/t1/T1.java
236024adef28baf548dcd5430d7be357118da87c
[]
no_license
AaronHxm/java8
84b983b07de59acf048f055f93051433e6c1d8e7
49aa5e06c450b2ca6399cfa7e1fd71c6a32b1ce3
refs/heads/master
2023-04-29T06:06:58.769213
2019-12-30T05:35:06
2019-12-30T05:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package org.aaron.t1; /** * @author : Aaron * * create at: 2019-12-10 16:46 * * description: 接口 */ /** * 函数接口:有且只有一个抽象方法 * 当然接口可以包含其他方法(默认、静态、私有 * @FunctionalInterface 检测接口是否是一个函数是接口 * 是:编译成功 * 否:编译失败,接口中没有抽象方法,或者抽象方法大于1 */ @FunctionalInterface //此注解保证只有一个抽象接口 public interface T1 { abstract void method1(); }
[ "hxm520WHL" ]
hxm520WHL
9c14d9c747b14d9dff1e90c4757109ff9e523ec9
f5679d1895a2fc17f9102330fc580dfcd46c2045
/src/main/java/HistoryList.java
7da487c15bc572dd5947cf43ce0301b0e3986da1
[ "MIT" ]
permissive
Leonlit/Data_struct_final_project
5d0d769da2c70ad6f63bc780717103b98ef99d4c
c9802be1ef10a71869b015e00be4b265cd4d908b
refs/heads/main
2023-06-15T07:23:39.896615
2021-06-21T16:06:00
2021-06-21T16:06:00
372,182,579
0
0
null
null
null
null
UTF-8
Java
false
false
2,489
java
public class HistoryList { private Node head; private int size; Node temp; public Node getHead () { return this.head; } public Node getLast () { if (isHeadNull()) { warningNullParam(); return null; }else { Node current = this.head; while (current.getNextNode() != null) { current = current.getNextNode(); } return current; } } public boolean isHeadNull() { return this.head == null; } //adding a node to the last position of the list public void pushNode (String[] newNode) { if (newNode != null) { temp = new Node(newNode); if (isHeadNull()) { this.head = temp; }else { Node current = this.head; while (current.getNextNode() != null) { current = current.getNextNode(); } current.setNextNode(temp); } this.size++; }else { warningNullParam(); } } //printing out the linkedlist in a customized way public void printList() { if (!isHeadNull()) { System.out.println(toString()); } } public int getSize () { return this.size; } private void warningNullParam () { System.out.println("Warning, The value given into the method is null!"); } //overriding the toString() method public String[][] getAll () { String list[][] = new String[size][2]; int idx = 0; if (!isHeadNull()) { Node current = this.head; while (current != null) { String temp[] = current.getValue(); list[idx] = temp; current = current.getNextNode(); idx++; } } return list; } } class Node{ private Node next; private String[] value; public Node (String[] value) { this.value = value; } public Node (Node next, String[] value) { this.next = next; this.value = value; } public Node getNextNode() { return this.next; } public String[] getValue() { return this.value; } public void setNextNode (Node newNode) { this.next = newNode; } public void updateValue (String[] newValue) { this.value = newValue; } }
[ "leonlit123@gmail.com" ]
leonlit123@gmail.com
34e520d65f98479e670b42cc1e5dd8b1d856bf96
61924a77370b4b66720b8d6254b464a0404222a7
/src/main/java/com/dwl/rep/controller/ChartController.java
76d41abad1187cd3704a857a2671ee4b43c5c435
[]
no_license
snail987/reports
479a934db0b46e120d09088164ebc40de686dec0
47122f9a3e52e0cf9cc55cc064f40fdd0e71d27d
refs/heads/master
2020-03-22T21:03:13.988538
2018-06-15T06:09:38
2018-06-15T06:09:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,552
java
package com.dwl.rep.controller; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.quartz.CronExpression; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.dwl.rep.common.ConUtils; import com.dwl.rep.common.Strings; import com.dwl.rep.common.quartz.ChartJobs; import com.dwl.rep.common.quartz.QuartzManager; import com.dwl.rep.pojo.ChartInfo; import com.dwl.rep.service.ChartService; import com.dwl.rep.service.NumService; import com.github.pagehelper.Page; import com.github.pagehelper.PageInfo; /** * 图表控制器 * @author dwl * */ @Controller @RequestMapping("/chart") public class ChartController { @Resource private ChartService chartService; @Resource private NumService numService; /** * 图表首页列表 * @param model * @param request * @return */ @RequestMapping("/getInfoList") public String getChartList(Model model,HttpServletRequest request){ Page<ChartInfo> page = ConUtils.setPage(request); chartService.getChartList(); PageInfo<ChartInfo> pageInfo = page.toPageInfo(); model.addAttribute("pageInfo", pageInfo); return "chart/info_list"; } /** * 新增或编辑 * @param info * @param model * @return */ @RequestMapping("/edit") public String editOrAdd(String chartId,Model model){ ChartInfo info = null; if(!Strings.isEmpty(chartId)){ info = chartService.getChartById(chartId); } model.addAttribute("info", info); return "chart/info_edit"; } /** * 保存 * @return */ @RequestMapping("/save") public String editOrAdd(ChartInfo info,Model model){ if(Strings.isEmpty(info.getChartId())){ info.setChartId(numService.getNum("CT")); chartService.addChartInfo(info); }else{ chartService.updateChartInfo(info); } if("1".equals(info.getIsCache())){//加入定时任务 QuartzManager.removeJob(info.getChartName()); QuartzManager.addJob(info.getChartId(), ChartJobs.class,info.getCornTime()); }else{ QuartzManager.removeJob(info.getChartName()); } return "redirect:/chart/getInfoList"; } /** * 删除 * @param chartId * @return */ @RequestMapping("/delete") @ResponseBody public String delete(String chartId){ if(chartService.deleteChartInfo(chartId)>0) return "delete success!"; return "delete failed!"; } /** * 查看图表 * @param chartId * @return */ @RequestMapping("/view") public String view(String chartId,Model model){ ChartInfo info = chartService.getChartById(chartId); if("1".equals(info.getIsCache())&&Strings.isEmpty(info.getResult())){ info.setResult(chartService.getChartResultById(chartId)); chartService.updateChartInfo(info); } model.addAttribute("info", info); return "chart/info_view"; } /** * 获取图表数据 * @param chartId * @return */ @RequestMapping(value="/result",produces = "application/json; charset=utf-8") @ResponseBody public String result(String chartId){ return chartService.getChartResultById(chartId); } /** * corn校验 * @param corn * @return */ @RequestMapping(value="/check",produces = "application/json; charset=utf-8") @ResponseBody public boolean checkCorn(String corn){ return CronExpression.isValidExpression(corn); } }
[ "dwl0208@163.com" ]
dwl0208@163.com
598dfb52a42717141540f7a7841a4cb1950812d0
959fa2302839507bd3967b8c42caf79e61e12ce6
/app/src/test/java/com/example/destinyminiproject/ExampleUnitTest.java
f485eaabe58728e7392f3b23e6e942969e9e4bd8
[]
no_license
bhavitha333/Destiny_app
e55086b99591da5fbf3e92f10e82832294918a15
5b854238a69094995c61f227a11509cbea6dff18
refs/heads/master
2023-06-30T02:48:40.412477
2021-08-05T13:26:40
2021-08-05T13:26:40
393,051,398
0
0
null
null
null
null
UTF-8
Java
false
false
391
java
package com.example.destinyminiproject; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "60336446+bhavitha333@users.noreply.github.com" ]
60336446+bhavitha333@users.noreply.github.com
776bc13f07667698a3bb5e02337bcfc5ea892084
a1e912f3a36f42998cbb71df0ba816d9c4533598
/src/test/java/walkingkooka/tree/search/BigIntegerSearchNodeTest.java
cd2e8fb5cdd79ba668b80d64fec4e6ebd15907b6
[ "Apache-2.0" ]
permissive
mP1/walkingkooka-tree-search
c235566b2cd86279fc5efd73d5cdd241df0a6f4b
6aac8c5304ed20897fc855f8bd65b1c1867c3b3b
refs/heads/master
2023-02-25T00:50:12.798715
2023-02-09T08:57:26
2023-02-09T08:57:26
217,678,302
0
0
Apache-2.0
2023-02-09T08:57:27
2019-10-26T08:21:11
Java
UTF-8
Java
false
false
2,998
java
/* * Copyright 2019 Miroslav Pokorny (github.com/mP1) * * 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 walkingkooka.tree.search; import org.junit.jupiter.api.Test; import walkingkooka.visit.Visiting; import java.math.BigInteger; import static org.junit.jupiter.api.Assertions.assertSame; public final class BigIntegerSearchNodeTest extends SearchNodeLeafTestCase<BigIntegerSearchNode, BigInteger> { @Test public void testAccept() { final StringBuilder b = new StringBuilder(); final BigIntegerSearchNode node = this.createSearchNode(); new FakeSearchNodeVisitor() { @Override protected Visiting startVisit(final SearchNode n) { assertSame(node, n); b.append("1"); return Visiting.CONTINUE; } @Override protected void endVisit(final SearchNode n) { assertSame(node, n); b.append("2"); } @Override protected void visit(final BigIntegerSearchNode n) { assertSame(node, n); b.append("3"); } }.accept(node); this.checkEquals("132", b.toString()); } // ToString ................................................................................................... @Test public void testToString() { this.toStringAndCheck(this.createSearchNode(BigInteger.valueOf(123)), "123"); } @Test public void testToString2() { this.toStringAndCheck(this.createSearchNode(BigInteger.valueOf(234)), "234"); } @Test public void testToStringWithName() { this.toStringAndCheck(this.createSearchNode("123", BigInteger.valueOf(123)).setName(SearchNodeName.with("Name123")), "Name123=123"); } @Override BigIntegerSearchNode createSearchNode(final String text, final BigInteger value) { return BigIntegerSearchNode.with(text, value); } @Override String text() { return this.value().toString(); } @Override BigInteger value() { return BigInteger.valueOf(12345); } @Override String differentText() { return this.differentValue().toString(); } @Override BigInteger differentValue() { return BigInteger.valueOf(999); } @Override Class<BigIntegerSearchNode> searchNodeType() { return BigIntegerSearchNode.class; } }
[ "miroslav.pokorny@gmail.com" ]
miroslav.pokorny@gmail.com
1a2cb6359da1c409e2e495b013285537f603b462
56a26f83e238962e3cc8c32f012f1c019230602e
/src/com/teststore/beans/OrderBean.java
1990ad7d196088504c3928e69b402a2e80997845
[]
no_license
pirogki/JsfStoreTest
2494eb7ebbf2f39b6b24d0eeb730c47cb1aee8d9
5ef9cc79a21b3acfb6ef9d3b8b26f864c750a38f
refs/heads/master
2020-12-26T08:32:16.769698
2016-09-20T15:51:57
2016-09-20T15:51:57
68,725,921
0
0
null
null
null
null
UTF-8
Java
false
false
3,597
java
/** * */ package com.teststore.beans; import java.util.Date; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedProperty; import javax.faces.bean.RequestScoped; import com.teststore.classes.BasketLine; import com.teststore.crud.Service; import com.teststore.database.GoodsInOrder; import com.teststore.database.Order; import com.teststore.database.SiteUser; import com.teststore.database.OrderStatus; import com.teststore.database.OrderStatusesType; import com.teststore.debug.Tools; /** * @author Andrey * */ @ManagedBean @RequestScoped public class OrderBean { @ManagedProperty(value="#{userBean}") private UserBean userBean; @ManagedProperty(value="#{basketBean}") private BasketBean basketBean; private String firstName; private String lastName; private String middleName; private String phone; private String address; private String email; private Order order; public UserBean getUserBean() { return userBean; } public void setUserBean(UserBean userBean) { this.userBean = userBean; } public BasketBean getBasketBean() { return basketBean; } public void setBasketBean(BasketBean basketBean) { this.basketBean = basketBean; } @PostConstruct public void init() { if(userBean.isLogged()) { firstName = userBean.getFirstName(); lastName = userBean.getLastName(); middleName = userBean.getMiddleName(); phone = userBean.getPhone(); address = userBean.getAddress(); email = userBean.getEmail(); } } public String checkout() { Tools.writeToLog("1"); Tools.writeToLog("2"); //Create order order = new Order(); //set fields order.setAddress(address); order.setEmail(email); order.setPhone(phone); order.setFirstName(firstName); order.setLastName(lastName); order.setMiddleName(middleName); order.setOrderDate(new Date()); //Set user order.setSiteUser(Service.get(userBean.getLogin(), SiteUser.class)); //create order in DB order = Service.add(order); //Set order status OrderStatus orderStatus = new OrderStatus(); orderStatus.setOrderStatusesType(Service.get(1, OrderStatusesType.class)); orderStatus.setOrder(order); orderStatus.setStatusDate(new Date()); orderStatus = Service.add(orderStatus); //set goods for(BasketLine basketLine : basketBean.getBasketLines()) { GoodsInOrder gio = new GoodsInOrder(); gio.setGood(basketLine.getGood()); gio.setQuantity(basketLine.getQuantity()); gio.setOrder(order); gio.setPrice(basketLine.getGood().getPrice()); gio = Service.add(gio); } basketBean.getBasketLines().clear(); return ("confirmOrder?faces-redirect=true&amp;order_id=" + order.getId()); } public int getOrderId() { if(order != null) return order.getId(); else return 0; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getMiddleName() { return middleName; } public void setMiddleName(String middleName) { this.middleName = middleName; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } }
[ "pirogki1@gmail.com" ]
pirogki1@gmail.com
2b3751a5857e882cd27b64cba7a493f9e562319f
7396b1b07779d5abc72a4eb52a6f93eb9334cca4
/base_database/src/androidTest/java/com/sj/base_database/ExampleInstrumentedTest.java
697dd10379da4f4a316bc7ee8cdde6b536b6abdf
[]
no_license
ticksj/SJDemoApp
4c4c9515414532aab65a466792109305b1037552
f0aa9010f9ad1543e7f43b5bb74ff3546d0e358d
refs/heads/master
2020-07-21T15:05:49.363031
2020-06-23T06:49:32
2020-06-23T06:49:32
206,903,216
0
1
null
null
null
null
UTF-8
Java
false
false
756
java
package com.sj.base_database; 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.sj.base_database", appContext.getPackageName()); } }
[ "1085798032@qq.com" ]
1085798032@qq.com
21298c8407b835f677aaa4f9b25f6218b1a3d6ac
ab686807ffd638cb0626056360a8775b115b4b7c
/basejava/src/com/kwb/pattern/structural/adapter/Main.java
7dc12c71d084a1915bc5d98676504f2b1a23a97b
[]
no_license
weibangkong/corejava
cd487c03b481394abab500e72e3f740ce2d34c62
5760ecd8ea2c1609453ee042f363360f2d4f2246
refs/heads/master
2020-04-24T18:47:20.750167
2019-03-18T10:12:45
2019-03-18T10:12:45
172,191,043
0
0
null
null
null
null
UTF-8
Java
false
false
201
java
package com.kwb.pattern.structural.adapter; public class Main { public static void main(String[] args) { IEnglish english = new TranslateAdapter(); english.speakEnglish(); } }
[ "weibangkong@outlook.com" ]
weibangkong@outlook.com
145aec2bff750922e0c1b85c32d13891af67abf9
43a6d2fd41c31b936db5b201ce02a32ec366dd86
/src/test/java/com/crm/qa/pageObjects/LoginPage.java
6c2506f4849d4e6cafdc5453bb3739e4456d4923
[]
no_license
Poonam-creator/crmpro.Pageobject.bdd.Endtoend
82b47b6f4ff8556ce660581f4d9671a7721af486
253712c4650b4e4b85af9dd2d9e31a5f6224e202
refs/heads/master
2020-12-19T15:56:57.808052
2020-01-23T11:42:55
2020-01-23T11:42:55
235,781,836
0
0
null
2020-10-13T19:02:11
2020-01-23T11:33:43
Java
UTF-8
Java
false
false
696
java
package com.crm.qa.pageObjects; import com.crm.qa.driver.BaseClass; import org.junit.Test; import org.openqa.selenium.By; public class LoginPage extends BaseClass { public void login_page_url(){ driver.getCurrentUrl(); } public void validateLogin(){ driver.findElement(By.name("email")).sendKeys("poonamr.1999@gmail.com"); driver.findElement(By.name("password")).sendKeys("Test@123"); } public void clickLoginbtn(){ driver.findElement(By.xpath("//div[@class='ui fluid large blue submit button']")).click(); } public void validateforgot_paswd_link(){ driver.findElement(By.linkText("Forgot your password?")).click(); } }
[ "jagdalepoonam99@gmail.com" ]
jagdalepoonam99@gmail.com
99494b47826db4acd08cc943226d8e43288ca69c
c5ff9d4c3806887abd6a017a2f11ca3958211a42
/job-portal/src/main/java/com/portal/job/filter/AuthorizationFilter.java
2da345fab14adab6e7dbb89a5ece49c7eb925d34
[]
no_license
behinddwalls/job-portal
f61afcedcd33698d1afade64ddd35a6a9a82c370
449d104a19a299efb07962e35295f8da0631e4af
refs/heads/main
2023-04-06T03:47:52.579501
2023-03-25T22:21:27
2023-03-25T22:21:27
54,529,678
0
0
null
null
null
null
UTF-8
Java
false
false
1,387
java
package com.portal.job.filter; import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * @author preetam * */ @WebFilter(filterName = "AuthorizationFilter") public class AuthorizationFilter extends AbstractAuthorizationFilter { public final String UNAUTHORIZED_PAGE = "/signin/jobseeker"; private String skipAuthRegex; public void destroy() { this.skipAuthRegex = null; } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletResponse httpResponse = (HttpServletResponse) response; HttpServletRequest httpRequest = (HttpServletRequest) request; boolean isAuthorized = this.isUserAuthorized(request, response); if (!skipUrlRegex(httpRequest, skipAuthRegex) && !isAuthorized) { httpResponse.sendRedirect(getContextPath(httpRequest) + UNAUTHORIZED_PAGE); } else { chain.doFilter(request, response); } return; } public void init(FilterConfig filterConfig) throws ServletException { skipAuthRegex = filterConfig.getInitParameter("skipAuthentication"); } }
[ "preetam@88665a372c28.ant.amazon.com" ]
preetam@88665a372c28.ant.amazon.com
275f4c7c981030208f2d7aa70102d78e8a1d2e11
9ac8dd623984749fbf7e1978614cd0c35f2199de
/app/src/main/java/com/juanantonio/recordador/presenter/ListadoPresenter.java
82f968c364e9598ba9a79a9241890b190680f64f
[]
no_license
juanantonioCB/recordador
f6f03ad7db70f8a860d3e7ce79893581d2711928
7c39336ea2a53e5724093f7fa6d5706501301b4b
refs/heads/master
2020-12-03T07:43:52.627601
2020-03-02T15:28:10
2020-03-02T15:28:10
231,246,472
0
0
null
null
null
null
UTF-8
Java
false
false
1,354
java
package com.juanantonio.recordador.presenter; import android.database.sqlite.SQLiteDatabase; import com.juanantonio.recordador.interfaces.ListadoInterface; import com.juanantonio.recordador.model.PersonaModel; import com.juanantonio.recordador.view.ListadoView; public class ListadoPresenter implements ListadoInterface.Presenter { private ListadoInterface.View view; PersonaModel personModel = PersonaModel.get(); public ListadoPresenter(ListadoView v) { SQLiteDatabase db = personModel.getWritableDatabase(); db.close(); this.view = v; } public void getPersons() { view.reload(personModel.recuperarListado()); } public void cargarPersonaBuscada() { view.abrirBusqueda(); } public void irFormulario() { view.abrirFormulario(); } public void setLayout() { view.setLayout(); } @Override public void abrirPersona(int position) { view.abrirPersona(position); } @Override public void borrarPersona(int id) { personModel.eliminarPersona(id); } @Override public void cargarBusqueda(String nombre, String provincia, String fecha) { view.reload(personModel.personasBusqueda(nombre, fecha, provincia)); } @Override public void abrirAyuda() { view.abrirAyuda(); } }
[ "juanantonio186@hotmail.com" ]
juanantonio186@hotmail.com
8100964007665df0114fa8048e5f2aded67dc1f6
da4a9ce11348b206e8659cfaa629516d474801fb
/src/main/java/asv/exercise/web/websocket/ActivityService.java
037a191b1a8bf1ed1f54263ee4f5835d000a0f36
[ "Apache-2.0" ]
permissive
BulkSecurityGeneratorProject/Point-Of-Sale-JHipster-Exercise
1f04c5ecb9be22a52c6171818a65ba7e137883fa
c3a59813e54c144635c4d010e615b4895ea862ae
refs/heads/master
2022-12-20T23:05:33.519636
2016-10-22T06:06:04
2016-10-22T06:06:04
296,666,482
0
0
NOASSERTION
2020-09-18T15:55:47
2020-09-18T15:55:46
null
UTF-8
Java
false
false
2,506
java
package asv.exercise.web.websocket; import asv.exercise.security.SecurityUtils; import asv.exercise.web.websocket.dto.ActivityDTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationListener; import org.springframework.messaging.handler.annotation.Payload; import org.springframework.messaging.handler.annotation.SendTo; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.messaging.simp.annotation.SubscribeMapping; import org.springframework.messaging.simp.stomp.StompHeaderAccessor; import org.springframework.stereotype.Controller; import org.springframework.web.socket.messaging.SessionDisconnectEvent; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import javax.inject.Inject; import java.security.Principal; import java.util.Calendar; import static asv.exercise.config.WebsocketConfiguration.IP_ADDRESS; @Controller public class ActivityService implements ApplicationListener<SessionDisconnectEvent> { private static final Logger log = LoggerFactory.getLogger(ActivityService.class); private DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); @Inject SimpMessageSendingOperations messagingTemplate; @SubscribeMapping("/topic/activity") @SendTo("/topic/tracker") public ActivityDTO sendActivity(@Payload ActivityDTO activityDTO, StompHeaderAccessor stompHeaderAccessor, Principal principal) { activityDTO.setUserLogin(SecurityUtils.getCurrentUserLogin()); activityDTO.setUserLogin(principal.getName()); activityDTO.setSessionId(stompHeaderAccessor.getSessionId()); activityDTO.setIpAddress(stompHeaderAccessor.getSessionAttributes().get(IP_ADDRESS).toString()); Instant instant = Instant.ofEpochMilli(Calendar.getInstance().getTimeInMillis()); activityDTO.setTime(dateTimeFormatter.format(ZonedDateTime.ofInstant(instant, ZoneOffset.systemDefault()))); log.debug("Sending user tracking data {}", activityDTO); return activityDTO; } @Override public void onApplicationEvent(SessionDisconnectEvent event) { ActivityDTO activityDTO = new ActivityDTO(); activityDTO.setSessionId(event.getSessionId()); activityDTO.setPage("logout"); messagingTemplate.convertAndSend("/topic/tracker", activityDTO); } }
[ "javier.j.fuentes@gmail.com" ]
javier.j.fuentes@gmail.com
7b21d4246d3a4e71ea11ab52f0348f76d3ee32f9
c6f66ffc2f3fcbf035ef68bb509b468446e7e699
/src/test/java/com/example/demo/KhdemoApplicationTests.java
956921196501bdc592739455727b241042358c92
[]
no_license
ekosal/khdemo
05fe5fa7b9ae9736b1a0be8f5e24257c0d43f00e
ddd57178769dc1f09f3b676720f65acea3dd1c0e
refs/heads/master
2020-04-11T14:47:19.345976
2018-12-16T10:50:08
2018-12-16T10:50:08
161,641,647
0
0
null
null
null
null
UTF-8
Java
false
false
334
java
package com.example.demo; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class KhdemoApplicationTests { @Test public void contextLoads() { } }
[ "noreply@github.com" ]
noreply@github.com
4d2d39acf3e2b9be7b1e7e6f56b98a00a1fbdaf5
a8825c4187d33881510b543cf1b7d733d9c7d10a
/java/cupboard/CupboardBuilder.java
faa4da66222d7ba309a3a3451d48d1bf8a51b042
[ "MIT" ]
permissive
joancefet/LOLExplorer
f613368c03a27c29a2a45e33b3290f0596fe34b4
1be964747ace3506531ba6a5a4b6f256ae010d91
refs/heads/master
2020-01-23T21:32:06.689413
2016-02-02T17:38:07
2016-02-02T17:38:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,027
java
/* * Copyright (C) 2014 Qbus B.V. * * 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 cupboard; import cupboard.convert.EntityConverterFactory; import cupboard.convert.FieldConverter; import cupboard.convert.FieldConverterFactory; /** * Aids in creating specialized {@link cupboard.Cupboard} instances */ public class CupboardBuilder { private Cupboard mCupboard; public CupboardBuilder() { mCupboard = new Cupboard(); } /** * Create a builder based on an existing Cupboard instance. All entities registered with this instance will * be registered with the instance that this builder is building. Other settings such as FieldConverters, EntityConverters and * whether annotations are used are not duplicated. * * @param cupboard the instance to retrieve the registered entities from. */ public CupboardBuilder(Cupboard cupboard) { mCupboard = new Cupboard(); for (Class<?> entity : cupboard.getRegisteredEntities()) { mCupboard.register(entity); } } /** * Register a {@link cupboard.convert.EntityConverterFactory} * * @param factory the factory * @return the builder for chaining */ public CupboardBuilder registerEntityConverterFactory(EntityConverterFactory factory) { mCupboard.registerEntityConverterFactory(factory); return this; } /** * Register a {@link cupboard.convert.FieldConverterFactory} * * @param factory the factory * @return the builder for chaining */ public CupboardBuilder registerFieldConverterFactory(FieldConverterFactory factory) { mCupboard.registerFieldConverterFactory(factory); return this; } /** * Register a field converter * * @param fieldClass the field class * @param converter the converter * @return the builder for chaining */ public <T> CupboardBuilder registerFieldConverter(Class<T> fieldClass, FieldConverter<T> converter) { mCupboard.registerFieldConverter(fieldClass, converter); return this; } /** * Enable the use of annotations * * @return the builder for chaining */ public CupboardBuilder useAnnotations() { mCupboard.setUseAnnotations(true); return this; } /** * Create the {@link cupboard.Cupboard} instance. * * @return the Cupboard instance */ public Cupboard build() { return mCupboard; } }
[ "111" ]
111
5a8669a2a7b70293ecec14e521a6850987fcdd80
ba9ae131c6f5c11922e52d31f99963dece6b0424
/Testind_GameJava/src/main/java/Main.java
ed80fb1b5166741df587643553d5437c841b6abe
[]
no_license
annasenpai47/JavaMape
27f2f1eb4835507cd2496542e46e8b28745b087b
94e979ebd2b3e1db41e26bc2b600e74602f9cc31
refs/heads/master
2023-08-24T19:35:52.551919
2021-09-22T17:59:50
2021-09-22T17:59:50
402,379,666
0
0
null
null
null
null
UTF-8
Java
false
false
254
java
import GameJava.Controller; import GameJava.Model; import GameJava.View; public class Main { public static void main(String[] args) { Controller controller = new Controller(new Model(),new View()); controller.startGame(); } }
[ "annasenpai47@gmail.com" ]
annasenpai47@gmail.com
6e9cd67f8c576f4b1918453a864e50ae5e7a2d8b
a7b919ba419f3d559788670fafc89e2b7ba75c15
/src/main/java/de/exelxp/rsl/security/jwt/JWTFilter.java
b6e1bcc41b528c70d4acbee046e4c138303f61c2
[]
no_license
Michael-Exel-6767/jhipster-rsl-manager
33cbf1c4c76f4b1cd755ae14fefd9e88ad6f0312
de93cab35baab0d0d878f8a41098ed1c4b657fa3
refs/heads/main
2023-05-15T02:33:40.759200
2021-06-11T11:11:44
2021-06-11T11:11:44
375,998,764
0
0
null
null
null
null
UTF-8
Java
false
false
1,845
java
package de.exelxp.rsl.security.jwt; import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.util.StringUtils; import org.springframework.web.filter.GenericFilterBean; /** * Filters incoming requests and installs a Spring Security principal if a header corresponding to a valid user is * found. */ public class JWTFilter extends GenericFilterBean { public static final String AUTHORIZATION_HEADER = "Authorization"; private final TokenProvider tokenProvider; public JWTFilter(TokenProvider tokenProvider) { this.tokenProvider = tokenProvider; } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest; String jwt = resolveToken(httpServletRequest); if (StringUtils.hasText(jwt) && this.tokenProvider.validateToken(jwt)) { Authentication authentication = this.tokenProvider.getAuthentication(jwt); SecurityContextHolder.getContext().setAuthentication(authentication); } filterChain.doFilter(servletRequest, servletResponse); } private String resolveToken(HttpServletRequest request) { String bearerToken = request.getHeader(AUTHORIZATION_HEADER); if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer ")) { return bearerToken.substring(7); } return null; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
fc5009be7a39c410be32093a00bd8f8226f546f1
53047bcf0cdd8570c624ab4419a5dfc19ccde9b1
/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/datastore/callables/GetConflictedDocumentIdsCallable.java
2936c46758575f4a6936eef49170f5adf5f28285
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
RathanSRK/sync-android
ee52671c06e6152e5ffd84db928cbb44e383172e
948a034f59d8dc734f9c87d17e1480cb7caea783
refs/heads/master
2021-01-11T19:53:43.698708
2016-12-29T11:27:21
2016-12-29T11:27:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,698
java
/* * Copyright (C) 2016 IBM Corp. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.cloudant.sync.datastore.callables; import com.cloudant.sync.datastore.DatastoreException; import com.cloudant.sync.datastore.DatastoreImpl; import com.cloudant.sync.sqlite.Cursor; import com.cloudant.sync.sqlite.SQLCallable; import com.cloudant.sync.sqlite.SQLDatabase; import com.cloudant.sync.util.DatabaseUtils; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; /** * Get all document IDs of Documents having conflicted Revisions: more than one non-deleted leaf * Revision * * @api_private */ public class GetConflictedDocumentIdsCallable implements SQLCallable<List<String>> { private static final Logger logger = Logger.getLogger(DatastoreImpl.class.getCanonicalName()); @Override public List<String> call(SQLDatabase db) throws Exception { // the "SELECT DISTINCT ..." subquery selects all the parent // sequence, and so the outer "SELECT ..." practically selects // all the leaf nodes. The "GROUP BY" and "HAVING COUNT(*) > 1" // make sure only those document with more than one leafs are // returned. final String sql = "SELECT docs.docid, COUNT(*) FROM docs,revs " + "WHERE revs.doc_id = docs.doc_id " + "AND deleted = 0 AND revs.sequence NOT IN " + "(SELECT DISTINCT parent FROM revs WHERE parent NOT NULL) " + "GROUP BY docs.docid HAVING COUNT(*) > 1"; List<String> conflicts = new ArrayList<String>(); Cursor cursor = null; try { cursor = db.rawQuery(sql, new String[]{}); while (cursor.moveToNext()) { String docId = cursor.getString(0); conflicts.add(docId); } } catch (SQLException e) { logger.log(Level.SEVERE, "Error getting conflicted document: ", e); throw new DatastoreException(e); } finally { DatabaseUtils.closeCursorQuietly(cursor); } return conflicts; } }
[ "tblench@uk.ibm.com" ]
tblench@uk.ibm.com
dcd8cda5ca70a4bad5e139ce48419d327ec35391
6c8d64589d978c5728acaf059758405f292577f5
/IdeaProjects/MusicUI/src/sample/Main.java
c044855addd19fd2cc843a721ca8d6a94c29ea74
[]
no_license
jithinvariyar/jithinvariyar.github.io
b67ae8094a57f469ab1c87c769a0b97f047dcad3
70c9d88a10b1a2ac4533449f0fccecd581a80a27
refs/heads/master
2023-05-06T01:55:14.790338
2021-06-01T15:07:25
2021-06-01T15:07:25
294,984,382
0
0
null
null
null
null
UTF-8
Java
false
false
1,199
java
package sample; import javafx.application.Application; import javafx.application.Platform; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; import sample.model.DataSource; public class Main extends Application { @Override public void start(Stage primaryStage) throws Exception{ FXMLLoader fxmlLoader = new FXMLLoader(); fxmlLoader.setLocation(getClass().getResource("main.fxml")); Parent root = fxmlLoader.load(); Controller controller = fxmlLoader.getController(); controller.listArtists(); primaryStage.setTitle("Music Database"); primaryStage.setScene(new Scene(root, 800, 600)); primaryStage.show(); } @Override public void init() throws Exception { super.init(); if(!DataSource.getInstance().open()){ System.out.println("FATAL_ERROR: couldn't connect to database"); Platform.exit(); } } @Override public void stop() throws Exception { super.stop(); DataSource.getInstance().close(); } public static void main(String[] args) { launch(args); } }
[ "jithinvariyarmv@gmail.com" ]
jithinvariyarmv@gmail.com
a36b048f74bcc6786799f800ad2a9260cd550a77
6976a5504b71e41169fd22e4249e4364c8e3328f
/Login/app/src/main/java/com/example/xiaoxiong/login/lianxiren.java
960e0218eef4108d4458edb1dd818247ecde83e0
[]
no_license
sugobanana/an
4a97274509b4d9d48b6816f9b9e05014cecac6c6
1061b678e4a8b2e08b5484b395fff8760ce5b93a
refs/heads/master
2020-03-07T05:43:11.121957
2018-03-29T13:41:33
2018-03-29T13:41:33
127,303,799
0
0
null
null
null
null
UTF-8
Java
false
false
3,172
java
package com.example.xiaoxiong.login; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.database.Cursor; import android.provider.ContactsContract; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.Toast; import java.util.ArrayList; import java.util.List; public class lianxiren extends AppCompatActivity { private Button mReturnButton; ArrayAdapter<String> adapter; List<String> contactsList = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_lianxiren ); ListView contactsView = (ListView) findViewById(R.id.contacts_view); adapter = new ArrayAdapter<String>(this, android.R.layout. simple_list_item_1, contactsList); contactsView.setAdapter(adapter); if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_CONTACTS }, 1); } else { readContacts(); } mReturnButton = (Button)findViewById(R.id.returnto); } private void readContacts() { Cursor cursor = null; try { // 查询联系人数据 cursor = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null, null, null); if (cursor != null) { while (cursor.moveToFirst()) { // 获取联系人姓名 String displayName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)); // 获取联系人手机号 String number = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); contactsList.add(displayName + "\n" + number); } adapter.notifyDataSetChanged(); } } catch (Exception e) { e.printStackTrace(); } finally { if (cursor != null) { cursor.close(); } } } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { switch (requestCode) { case 1: if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { readContacts(); } else { Toast.makeText(this, "You denied the permission", Toast.LENGTH_SHORT).show(); } break; default: } } public void ret(View view) { Intent intent5 = new Intent(lianxiren.this,User.class) ; startActivity(intent5); finish(); } }
[ "annahana@163.com" ]
annahana@163.com
6e75f4ce28ab52b5e9e625aac0b46352489b3d80
1f077db3c85e5a21b4cd3143e4aa905f29574582
/app/src/main/java/com/example/divyanshujain/edoteng/Adapters/CountryAdapter.java
b1f5f6efe739576aabe93cc89123bbf2a6648503
[]
no_license
divyanshujain12/EdoTenG
61fa27e7a50ad25dd3ddd3123793ffd40885596a
71c9f6da251723f526d3aaffe94c1893d89e81b0
refs/heads/master
2020-06-17T19:37:36.325826
2017-04-26T07:32:32
2017-04-26T07:32:32
74,975,879
0
0
null
null
null
null
UTF-8
Java
false
false
1,454
java
package com.example.divyanshujain.edoteng.Adapters; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import com.example.divyanshujain.edoteng.Models.CountryModel; import com.example.divyanshujain.edoteng.R; import com.neopixl.pixlui.components.textview.TextView; import java.util.ArrayList; /** * Created by divyanshuPC on 4/2/2017. */ public class CountryAdapter extends ArrayAdapter<CountryModel> { LayoutInflater inflater; ArrayList<CountryModel> countryModels; public CountryAdapter(Context context, int resource, ArrayList<CountryModel> objects) { super(context, resource, objects); this.countryModels = objects; inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } @Override public View getDropDownView(int position, View convertView, ViewGroup parent) { return getCustomView(position, convertView, parent); } @Override public View getView(int position, View convertView, ViewGroup parent) { return getCustomView(position, convertView, parent); } private View getCustomView(int position, View convertView, ViewGroup parent) { TextView row = (TextView) inflater.inflate(R.layout.spinner_rows, parent, false); row.setText(countryModels.get(position).getName()); return row; } }
[ "divyanshujain12@hotmail.com" ]
divyanshujain12@hotmail.com
ae0abd51c031e77a1c2bc1aa460d459ea7b8abc5
ddc20aeee538e0d397a71ceb0dce40b6b526ef33
/src/main/java/com/example/Enum.java
465dd8f770481adbf76fe44f9daed74dc4d41841
[]
no_license
NexThoughts/deshraj_dec_17
e08252668d41818bb693f4ed4b3e309bf4d586bf
d0d99b85a96b169dadc2033d11fb03e2231436a2
refs/heads/master
2021-08-30T06:32:09.923335
2017-12-16T14:03:42
2017-12-16T14:03:42
114,437,288
0
0
null
null
null
null
UTF-8
Java
false
false
116
java
package com.example; public class Enum { public enum taskStatus { INITIALIZED, CLOSED } }
[ "khatter.sakshi@gmail.com" ]
khatter.sakshi@gmail.com
dc6d0b2d29e61fc5f7a6a6ce7290f9db2f11a9e3
d64c079c09e8a21dd19eda7571551cf6d16ddca4
/Add first and third digit/Main.java
306ccbbb2b93b4ef7618e21b4000c962be438663
[]
no_license
Deepthireddy2811/Playground
dbddb1e8e47fc546aacccebc015789a18aac6373
aa260bc1fb752a4c857acff36d17f1c0099d4af4
refs/heads/master
2020-05-18T19:38:32.555652
2019-07-21T17:39:28
2019-07-21T17:39:28
184,612,312
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
import java.util.Scanner; class Main{ public static void main (String[] args) { // Type your code here Scanner sa=new Scanner(System.in); int n1=sa.nextInt(); int n2=n1/100; int n3=n1%10; int n4=n2+n3; System.out.println(n4); } }
[ "50210766+Deepthireddy2811@users.noreply.github.com" ]
50210766+Deepthireddy2811@users.noreply.github.com
371ade780d1608588bd6f2f1fda3c6b4559c3b69
1690664ae6238d1fa0341ade158af8d2d0073d5f
/engine/src/main/java/org/camunda/bpm/engine/impl/migration/MigrationInstructionImpl.java
e9d8371b2ed52605ba07164ed89dc0106da045dd
[ "Apache-2.0" ]
permissive
tonybotla/camunda-bpm-platform
d5661f751033c15ae5dbf55d287afdf7021aa078
178cabc57f043246624b4d9fe4662285d90143bf
refs/heads/master
2021-05-30T19:28:45.933999
2016-02-05T15:21:16
2016-02-05T15:21:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,861
java
/* 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.camunda.bpm.engine.impl.migration; import java.util.List; import org.camunda.bpm.engine.migration.MigrationInstruction; /** * @author Thorben Lindhauer * */ public class MigrationInstructionImpl implements MigrationInstruction { protected List<String> sourceActivityIds; protected List<String> targetActivityIds; public MigrationInstructionImpl(List<String> sourceActivityIds, List<String> targetActivityIds) { this.sourceActivityIds = sourceActivityIds; this.targetActivityIds = targetActivityIds; } public List<String> getSourceActivityIds() { return sourceActivityIds; } public List<String> getTargetActivityIds() { return targetActivityIds; } public String toString() { StringBuilder sb = new StringBuilder(); sb.append("MigrationInstruction[sourceActivities=["); for (int i = 0; i < sourceActivityIds.size(); i++) { sb.append(sourceActivityIds.get(i)); if (i < sourceActivityIds.size() - 1) { sb.append(", "); } } sb.append("], targetActivityIds=["); for (int i = 0; i < targetActivityIds.size(); i++) { sb.append(targetActivityIds.get(i)); if (i < targetActivityIds.size() - 1) { sb.append(", "); } } sb.append("]]"); return sb.toString(); } }
[ "sebastian@menski.org" ]
sebastian@menski.org
8984bb0fcf65e1b335672514fd73fec175091dc9
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13916-9-24-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/job/AbstractJob_ESTest.java
99c31c0c4743e846e5a7c8ae26ac9c6d900a7bce
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 14:45:37 UTC 2020 */ package org.xwiki.job; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractJob_ESTest extends AbstractJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2ee0f990e38a370f4e2338aadf28f1b30c5ee8f9
b66fbef33278dc605540ca0838c1efa21b8d9be2
/src/main/java/builder/AdvertisementMessageBuilder.java
aea996c3282d2c43a77ad4ef47b5ab4a9d6f51e7
[]
no_license
stackfing/design-pattern
addd337647c288af504d6cf2fec3d8a830de6138
61bd6452e7f521416eef52f9fb99377dd1e7d583
refs/heads/master
2020-04-08T22:16:12.529219
2018-12-02T09:16:50
2018-12-02T09:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
package main.java.builder; /** * @Author: fing * @Description: * @Date: 下午4:46 18-12-2 */ public class AdvertisementMessageBuilder extends MessageBuilder { @Override public void buildFrom() { System.out.println("ad msg from"); } @Override public void buildRejection() { System.out.println("ad msg rejection"); } @Override public void buildSubject() { System.out.println("ad msg subject"); } @Override public void buildText() { System.out.println("ad msg text"); } @Override public void buildSendDate() { System.out.println("ad msg send date"); } }
[ "stackfing@gmail.com" ]
stackfing@gmail.com
78cc8296161f2f1a4b3455b97b39c33b95cfc4db
9e73f3177a927ad2b8bbd17b643bc2aa50a05a8c
/.history/src/test/java/nc/si2p/peche/service/MarkerDataLoaderTestMock_20181006190538.java
198b13f6336a4602f60ef4574ea44fb2336dd985
[]
no_license
1halfplusminus/peche-nc
ea19962cb647dde560207dfd5ba985336a63ae94
e2229c0568293c3db504e222d9ca00f630ad21fb
refs/heads/master
2022-07-26T06:14:28.551082
2018-10-06T10:26:31
2018-10-06T10:26:31
151,383,015
0
0
null
null
null
null
UTF-8
Java
false
false
1,255
java
package nc.si2p.peche.service; import java.util.ArrayList; import java.util.List; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; import org.springframework.boot.ApplicationArguments; import nc.si2p.peche.domain.Marker; import nc.si2p.peche.repository.MarkersRepository; public class MarkerDataLoaderTestMock { private MarkerDataLoader dataLoader; @Mock private MarkersRepository repo; @Mock private ApplicationArguments argument; @Captor private ArgumentCaptor<ArrayList<Marker>> captor; @Before public void setup() { MockitoAnnotations.initMocks(this); dataLoader = new MarkerDataLoader(repo); } @Test public void testDeserializeDCP() throws Exception { dataLoader.run(argument); verify(repo).saveAll(captor.capture()); List<Marker> markers = captor.getValue(); for (Marker marker : markers) { assertThat(marker).hasNoNullFieldsOrProperties(); assertThat(marker.getTitre()).isInstanceOf(String.class); } } }
[ "sautron.gael@laposte.net" ]
sautron.gael@laposte.net
241de375c749f1387ce53db96963bbdfdcf8c24d
86919e6394439be48f2e0fd9e9feeef842b6803e
/Common/src/main/java/cn/mageek/common/command/AbstractClientCommand.java
2681c589e36643395441a654310df44bf5449bbe
[]
no_license
chenjh880730/CHKV
cf1a56f628fc7fcb45e9afbe2aa6a6623ff4ed11
82204cb94fee417e983c9cd602031ef0d8f2948b
refs/heads/master
2020-03-29T04:58:11.044865
2018-07-18T08:08:57
2018-07-18T08:08:57
149,558,572
1
0
null
2018-09-20T05:55:38
2018-09-20T05:55:38
null
UTF-8
Java
false
false
627
java
package cn.mageek.common.command; import cn.mageek.common.model.DataRequest; import cn.mageek.common.model.DataResponse; import cn.mageek.common.model.WebMsgObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; /** * client抽象命令类,处理不同的请求类型 * @author Mageek Chiu * @date 2018/5/10 0007:19:27 */ public abstract class AbstractClientCommand { // client 解析 收到的 data response public abstract void receive(DataResponse response); // client 根据参数合成 DataRequest public abstract DataRequest send(String CMD,String... args); }
[ "qiukang@mail.ustc.edu.cn" ]
qiukang@mail.ustc.edu.cn
087014aec9f71f3dfa0d92fe0aa8f2fb39072022
ec104ab64f3e4df8b95eccbcf06de3885e50118b
/subprojects/griffon-core/src/main/java/org/codehaus/griffon/runtime/core/injection/InjectorProvider.java
941a183b067bca7d8815666ddfe5bb633ef9a6ab
[ "Apache-2.0" ]
permissive
effrafax/griffon
f806c837cdf1cfb9cecd04c17e4765b342a17153
4348abc4d6df14d54c607496d476933fda60fa7e
refs/heads/master
2020-12-24T13:15:58.305212
2015-02-28T22:19:01
2015-02-28T22:44:14
20,661,693
0
0
null
null
null
null
UTF-8
Java
false
false
1,103
java
/* * Copyright 2008-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.codehaus.griffon.runtime.core.injection; import griffon.core.injection.Injector; import javax.annotation.Nonnull; import javax.inject.Provider; /** * @author Andres Almiray * @since 2.0.0 */ public final class InjectorProvider implements Provider<Injector> { private Injector injector; public void setInjector(@Nonnull Injector injector) { this.injector = injector; } @Override public Injector get() { return injector; } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
997dda6ab2f5ad37fac8945545a710e4ee6056e5
4fbbec1dce1f346cc9f70be37800cfc8a9196a14
/src/main/java/com/meat/businessdelegate/service/SubCategoryAttributesContext.java
c45e22a5223eb8bb11c3e0408f9dc1215efa7a91
[]
no_license
jerryjazzz/BuyNonVeg
0946312f9f4b5e2ee839dd4952813e6100e7333e
3f7213aab32a69e876a4fcdb03de7b6945912f76
refs/heads/master
2021-06-01T11:32:40.985570
2016-08-20T12:55:54
2016-08-20T12:55:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
package com.meat.businessdelegate.service; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** * @author Administrator * */ @Component("subCategoryAttributesContext") @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class SubCategoryAttributesContext implements IBusinessDelegateContext { private String all; public void setAll(final String all) { this.all = all; } }
[ "narendra.uppalapati@arthvedi.com" ]
narendra.uppalapati@arthvedi.com
03fa29949d4d29776e46377419768bd20d063e9e
c52c00ba0d76d3120a374eb09d3a7d5ce565ab02
/src/main/java/com/managers/repositories/CustomerReporitory.java
56fa239871f7dc5117667cce80e45d227e4b5761
[]
no_license
TomNCH/Codegym_Module2_SS19_ProvinceManager
e3fbe0392690221c2bd96b5fd466af9317550932
867c8b21074a96746c39d1dc11142063bac846a0
refs/heads/master
2020-08-04T19:02:24.711503
2019-10-02T09:34:35
2019-10-02T09:34:35
212,246,162
0
0
null
null
null
null
UTF-8
Java
false
false
514
java
package com.managers.repositories; import com.managers.models.Customer; import com.managers.models.Province; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.repository.PagingAndSortingRepository; public interface CustomerReporitory extends PagingAndSortingRepository<Customer, Long> { Iterable<Customer> findAllByProvince(Province province); Page<Customer> findAllByFirstNameContaining(String firstname, Pageable pageable); }
[ "nguyenchihieu.10390@gamil.com" ]
nguyenchihieu.10390@gamil.com
f3be3757454e40f29729d0f1ef7042448199f2e0
daa176407e354225c1ed5e71175ef7ea7d9dfb48
/sniffer-core/com.network.core/src/main/java/com/network/core/service/ByteOrderConverter.java
3a32326ff4c2cb704645d1b1544cdba88cbda853
[]
no_license
joja5627/packet-sniffer-app
fa0b17b243825745ab899e9bbdf14efff4941811
8e49c8ccc7622043260394e5897dbee5c1fecf97
refs/heads/master
2020-03-25T07:36:06.815385
2018-08-05T01:02:11
2018-08-05T01:02:11
143,570,562
0
0
null
null
null
null
UTF-8
Java
false
false
1,708
java
/* * Copyright 2010 NCHOVY * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.network.core.service; /** * @author mindori */ public class ByteOrderConverter { private ByteOrderConverter() { } public static int swap(int value) { int a = value; int b = (a >> 24) & 0xFF; int c = (a >> 8) & 0xFF00; int d = (a << 8) & 0xFF0000; int e = (a << 24) & 0xFF000000; return (b | c | d | e); } public static short swap(short value) { short a = value; short b = (short) ((a >> 8) & 0xFF); short c = (short) ((a << 8) & 0xFF00); return (short)(b | c); } public static long swap(long value){ long v = 0; for (int i = 7; i >= 0; i--) { v |= ((value >> ((7 - i) * 8)) & 0xff); if(i ==0){ break; } v <<= 8; } return v; /* long convert=0; convert = ((value & 0xff00000000000000l) >> 56) | ((value & 0x00ff000000000000l) >> 40) | ((value & 0x0000ff0000000000l) >> 24) | ((value & 0x000000ff00000000l) >> 8) | ((value & 0x00000000ff000000l) << 8) | ((value & 0x0000000000ff0000l) << 24) | ((value & 0x000000000000ff00l) << 40) | ((value & 0x00000000000000ffl) << 56); return convert;*/ } }
[ "joja5627@gmail.com" ]
joja5627@gmail.com
ed9f3950ebc9401902029b5c57c9b6930651983a
19bb2e19c66cee3ae3be9953a97b2e008951b719
/app/src/main/java/com/java/trucks/InteriorActivity.java
afd3187dbc650bcc9ebc91ec3c259b61d7854ece
[]
no_license
ProsperChuks/Daily-Truck-Check
b0dc4e47f909dc0008d90f5e65d5900494150d9d
fc333882e952ee3e27ffab53c1ac7dda16598938
refs/heads/master
2021-04-02T15:27:20.713386
2020-03-23T10:59:53
2020-03-23T10:59:53
248,289,624
2
0
null
null
null
null
UTF-8
Java
false
false
2,615
java
package com.java.trucks; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.DefaultItemAnimator; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; public class InteriorActivity extends AppCompatActivity { private RecyclerView.LayoutManager layoutManager; private static RecyclerView recyclerView; Dialog commentDialog; static View.OnClickListener interiorOnClick; private static ArrayList<InteriorModel> data; private static RecyclerView.Adapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_interior); setTitle(R.string.interior); commentDialog = new Dialog(this); interiorOnClick = new InteriorOnClickListener(this); recyclerView = findViewById(R.id.recycler_view_3); recyclerView.setHasFixedSize(true); layoutManager = new LinearLayoutManager(this); recyclerView.setLayoutManager(layoutManager); recyclerView.setItemAnimator(new DefaultItemAnimator()); data = new ArrayList<InteriorModel>(); for (int i = 0; i < InteriorData.interiorName.length; i++) { data.add(new InteriorModel( InteriorData.interiorName[i], InteriorData.id[i] )); } adapter = new InteriorAdapter(data); recyclerView.setAdapter(adapter); } public void popup(View v){ commentDialog.setContentView(R.layout.commentpopup); EditText comment; Button submit; TextView cancel; cancel = commentDialog.findViewById(R.id.cancel); cancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { commentDialog.dismiss(); } }); commentDialog.show(); } private class InteriorOnClickListener implements View.OnClickListener { private final Context context; private InteriorOnClickListener(Context context) { this.context = context; } @Override public void onClick(View v) { Toast.makeText(context, "Shown", Toast.LENGTH_SHORT).show(); } } }
[ "prosperc40@gmail.com" ]
prosperc40@gmail.com
406e463393784e16c496275894bc285d8fadc96b
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
/sources/androidx/arch/core/executor/DefaultTaskExecutor.java
6eb83015a4a1ecebe16b51eb66c5baee52658bb5
[]
no_license
shalviraj/greenlens
1c6608dca75ec204e85fba3171995628d2ee8961
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
refs/heads/main
2023-04-20T13:50:14.619773
2021-04-26T15:45:11
2021-04-26T15:45:11
361,799,768
0
0
null
null
null
null
UTF-8
Java
false
false
1,642
java
package androidx.arch.core.executor; import android.os.Handler; import android.os.Looper; import androidx.annotation.Nullable; import androidx.annotation.RestrictTo; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; @RestrictTo({RestrictTo.Scope.LIBRARY_GROUP}) public class DefaultTaskExecutor extends TaskExecutor { private final ExecutorService mDiskIO = Executors.newFixedThreadPool(2, new ThreadFactory() { private static final String THREAD_NAME_STEM = "arch_disk_io_%d"; private final AtomicInteger mThreadId = new AtomicInteger(0); public Thread newThread(Runnable runnable) { Thread thread = new Thread(runnable); thread.setName(String.format(THREAD_NAME_STEM, new Object[]{Integer.valueOf(this.mThreadId.getAndIncrement())})); return thread; } }); private final Object mLock = new Object(); @Nullable private volatile Handler mMainHandler; public void executeOnDiskIO(Runnable runnable) { this.mDiskIO.execute(runnable); } public boolean isMainThread() { return Looper.getMainLooper().getThread() == Thread.currentThread(); } public void postToMainThread(Runnable runnable) { if (this.mMainHandler == null) { synchronized (this.mLock) { if (this.mMainHandler == null) { this.mMainHandler = new Handler(Looper.getMainLooper()); } } } this.mMainHandler.post(runnable); } }
[ "73280944+shalviraj@users.noreply.github.com" ]
73280944+shalviraj@users.noreply.github.com
a9d177ca91a639cd33e6da6e887179029848390b
18c70f2a4f73a9db9975280a545066c9e4d9898e
/mirror-inspection/inspection-api/src/main/java/com/aspire/mirror/inspection/api/dto/TaskObjectBatchCreateRequst.java
057f475146936fcadce0645008f65273f4a30e75
[]
no_license
iu28igvc9o0/cmdb_aspire
1fe5d8607fdacc436b8a733f0ea44446f431dfa8
793eb6344c4468fe4c61c230df51fc44f7d8357b
refs/heads/master
2023-08-11T03:54:45.820508
2021-09-18T01:47:25
2021-09-18T01:47:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
877
java
package com.aspire.mirror.inspection.api.dto; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.validator.constraints.NotEmpty; import java.io.Serializable; import java.util.List; /** * 任务设备批量创建请求 * <p> * 项目名称: mirror平台 * 包: com.aspire.mirror.inspection.api.dto * 类名称: TaskObjectBatchCreateRequst.java * 类描述: 任务设备批量创建请求 * 创建人: JinSu * 创建时间: 2018/8/11 13:37 * 版本: v1.0 */ @Data @NoArgsConstructor public class TaskObjectBatchCreateRequst implements Serializable { private static final long serialVersionUID = 6311884597098588381L; /** * 任务设备列表 */ @JsonProperty("object_list") @NotEmpty private List<TaskObjectCreateRequest> objectList; }
[ "jiangxuwen7515@163.com" ]
jiangxuwen7515@163.com
97c3ce5a03ed35a7164e17593fc09c77ff91d50c
2af8baac81d30f3b2abe17fce0645f256b1c5dd3
/app/src/main/java/com/wickeddevs/easywars/ui/loadingsplash/LoadingSplashPresenter.java
20a44921fba8ce9457a09604fe32fbf43debdd8c
[]
no_license
HickeyMW/EasyWars
56639236e3401732e81f132e5bc090beb6488556
9e4599b41884ec04fdc3a190d0d93bef808c9b0a
refs/heads/master
2021-03-30T16:49:23.941013
2016-10-24T15:33:38
2016-10-24T15:33:38
64,255,863
0
0
null
null
null
null
UTF-8
Java
false
false
4,404
java
package com.wickeddevs.easywars.ui.loadingsplash; import android.util.Log; import com.wickeddevs.easywars.data.model.Member; import com.wickeddevs.easywars.data.model.User; import com.wickeddevs.easywars.data.service.contract.ClanService; import com.wickeddevs.easywars.data.service.contract.UserService; import com.wickeddevs.easywars.data.service.contract.VersionService; import javax.inject.Inject; /** * Created by 375csptssce on 7/26/16. */ public class LoadingSplashPresenter implements LoadingSplashContract.ViewListener { private final static String TAG = "LoadingSplashPresenter"; public static final int MAJOR_VERSION = 0; public static final int MINOR_VERSION = 0; private LoadingSplashContract.View view; private UserService userService; private VersionService versionService; private ClanService clanService; private boolean navigated = false; //Hack because when creating navigate fires twice @Inject public LoadingSplashPresenter(UserService userService, VersionService versionService, ClanService clanService) { this.userService = userService; this.versionService = versionService; this.clanService = clanService; } @Override public void registerView(LoadingSplashContract.View activity) { view = activity; } @Override public void onCreate() { versionService.getCurrentVersion(new VersionService.CheckVersionCallback() { @Override public void onVersionLoaded(int major, int minor) { if (major > MAJOR_VERSION) { view.displayBehindMajorVersion(); } else if (minor > MAJOR_VERSION) { view.displayBehindMinorVersion(); } else { startLogin(); } } }); } @Override public void returnedFromLogin(boolean successful) { if (successful) { navigateOnUserState(); } else { view.displayMessage("Error logging in. Please try again."); } } @Override public void pressedOkMajor() { view.closeApp(); } @Override public void pressedOkMinor() { startLogin(); } private void startLogin() { if (userService.isLoggedIn()) { navigateOnUserState(); } else { view.navigateToLoginUi(); } } private void navigateOnUserState() { userService.getUser(new UserService.LoadUserCallback() { @Override public void onUserLoaded(final User user) { if (!navigated) { navigated = true; switch (user.state) { case User.STATE_BLANK: view.navigateToNoClanUi(); break; case User.STATE_CREATING: view.navigateToCreatingClanUi(); break; case User.STATE_JOINING: view.navigateToJoiningClanUi(); break; case User.STATE_MEMBER: case User.STATE_ADMIN: clanService.getSelf(new ClanService.LoadMemberCallback() { @Override public void onMemberLoaded(Member member) { if (member.admin) { if (user.state == User.STATE_MEMBER) { userService.setAdmin(true); } view.navigateToHomeUi(true); } else { if (user.state == User.STATE_ADMIN) { userService.setAdmin(false); } view.navigateToHomeUi(false); } } }); break; default: Log.e(TAG, "User doesn't have a valid state"); } } } }); } }
[ "hickey.mw@gmail.com" ]
hickey.mw@gmail.com
a454576be8a1a5e18ce277f57e12bafebeed344f
05d797d73d5e3670f9f458c3fed303ad2b4ef81e
/Connection servlet.java
70a5a3ffc87baea37cda7477030ff69a230176fa
[]
no_license
Amar123-ui-web/Amar123-ui-web
77dedf7c22834852182c0a87c738449f019823ea
1876708e2f51203356fc3bb8674d9952e29b9994
refs/heads/main
2023-05-29T06:51:04.496102
2021-06-05T16:23:00
2021-06-05T16:23:00
371,918,663
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.user; /** * * @author dell */ class connection { }
[ "noreply@github.com" ]
noreply@github.com
517e9dcbf9fb17643084da58c694c54be0119b79
ae35f72b923414dd1614f851f2c97e31034c64b5
/BDD with Cucumber/Cucumber1/src/main/java/com/qa/cucumber/CheckoutPage.java
7d5334fe51c646ebb54fa7d9b35d18accc920090
[]
no_license
emallsop/Selenium-AutomatedTesting
72d52c50e9739750dfee49dff1cfec402b651e4b
fe63fb52ed98743622ee2c200dae04449f2462ce
refs/heads/master
2020-04-02T13:04:01.777987
2018-10-18T16:59:47
2018-10-18T16:59:47
154,465,506
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package com.qa.cucumber; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; public class CheckoutPage { @FindBy(xpath = "//*[@id=\"wsb-element-00000000-0000-0000-0000-000452010925\"]/div/div/form/div/button") private WebElement placeorderButton; public WebElement getOrderButton() { return placeorderButton; } }
[ "emilyallsop1@gmail.com" ]
emilyallsop1@gmail.com
5a7f3f9bea914ada9f0cf6fbe8c80392ddf8ba1d
fe2b7ef81529bc7a638a48a253f59bb25d875698
/src/main/pl/pgnig/serwis/auction/view/AvailableAuctionItemBrowseView.java
7030fc05a08887f3656fa1ffe029d6d3daf1b992
[]
no_license
sntBanzai/cp
6ea2fb23d8e37b4f9ee04ddbc62fa9a681dde76b
c48b36cb761f83f037dd61bff668b4e26c1c9d90
refs/heads/master
2022-01-12T12:13:44.549702
2019-05-15T12:36:37
2019-05-15T12:36:37
186,822,890
0
0
null
null
null
null
UTF-8
Java
false
false
5,083
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 pl.pgnig.serwis.auction.view; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import javax.annotation.PostConstruct; import javax.faces.application.ViewHandler; import javax.faces.component.UIViewRoot; import javax.faces.context.FacesContext; import org.primefaces.PrimeFaces; import org.primefaces.event.SelectEvent; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import pl.pgnig.serwis.auction.entity.AuctionItem; /** * * @author a6jmalyszko */ @Component @Scope("view") public class AvailableAuctionItemBrowseView extends AbstractBrowseView{ private static final SimpleDateFormat SDF = new SimpleDateFormat("dd-MM-yyyy"); // @Autowired // private OrdersService ordersService; private EquipType category; private List<AuctionItem> auctionItems = new ArrayList<>(); public void openItemDetailsDialog(Long auctionItemId) { // Orders itemBought = ordersService.isAllowedToBuyItem(UserUtil.getUserId(), auctionItemId); // if (itemBought == null) { Map<String, List<String>> params = new HashMap<>(); params.put(OrderItemStageView.AUCTION_ITEM_ID, Arrays.asList(auctionItemId.toString())); PrimeFaces.current().dialog().openDynamic("orderItemStageOneView", DialogOptionsBuilder.of("modal") .set("draggable", Boolean.FALSE) .set("resizable", Boolean.FALSE).set("contentHeight", "445px").build(), params); // } else { // final ResourceBundle bundle = ResourceBundle.getBundle("messages"); // String tit = bundle.getString("orders_notAllowedToOrderItem_title"); // String mess = bundle.getString("orders_notAllowedToOrderItem_messOne"); // mess = mess.replace("{0}", SDF.format(itemBought.getPurchaseDate())) // .replace("{1}", itemBought.getUsers().getNameUser() + " " + itemBought.getUsers().getSurnameUser()) // .replace("{2}", itemBought.getAuctionItem().getSerialNumber()); // mess = mess + "<br/>" + bundle.getString("orders_notAllowedToOrderItem_messTwo").replace("{0}", String.valueOf(LocalDate.now().plusYears(1).getYear())); // mess = "<center>" + mess + "</center>"; // PrimeFaces.current().dialog().showMessageDynamic(new FacesMessage(FacesMessage.SEVERITY_INFO, tit, mess)); // } } public void openPhotosDialog(String serialNumber, Character equipType) { Map<String, List<String>> params = new HashMap<>(); params.put(AuctionItemPhotosView.SERIAL_NUMBER, Arrays.asList(serialNumber)); params.put(EquipType.class.getSimpleName(), Arrays.asList(String.valueOf(equipType))); PrimeFaces.current().dialog().openDynamic("showPhotosView", DialogOptionsBuilder.of("modal") .set("draggable", Boolean.FALSE) .set("resizable", Boolean.FALSE).set("contentWidth", "1050px") .set("contentHeight", "900px").build(), params); } public void openPhotosDialog(AuctionItem auctionItem) { String serialNumber = auctionItem.getSerialNumber(); EquipType et = EquipType.translate(auctionItem); openPhotosDialog(serialNumber, et.name().charAt(0)); } @PostConstruct public void refresh() { this.auctionItems = itemService.getAvailableAuctionItems(); } public void onDialogReturn(SelectEvent event) throws IOException { if (event.getObject() != null && ((boolean) event.getObject())) { FacesContext context = FacesContext.getCurrentInstance(); String refreshpage = context.getViewRoot().getViewId(); ViewHandler handler = context.getApplication().getViewHandler(); UIViewRoot root = handler.createView(context, refreshpage); root.setViewId(refreshpage); context.setViewRoot(root); context.getExternalContext().redirect("purchaseHist.xhtml?category=3"); } } public List<AuctionItem> getAuctionItems() { return this.auctionItems.stream().filter(ai -> EquipType.translate(ai).equals(getCategory())).collect(Collectors.toList()); } public void setAuctionItems(List<AuctionItem> auctionItems) { this.auctionItems = auctionItems; } public void setCategory(Integer equipTypeOrdinal) { try { this.category = EquipType.values()[equipTypeOrdinal]; } catch (Exception e) { if (this.category == null) { this.category = EquipType.K; } } } public EquipType getCategory() { return category; } }
[ "jerzy.malyszko@pgn.corp" ]
jerzy.malyszko@pgn.corp
e899cabaa2d70490201280f6792c9e2b4bd95944
5e714a2f42befccb6f7ab2690472806fcf673479
/AndBible/src/net/bible/android/view/activity/base/Callback.java
683bfebb76f598295f263adc821c4490890fb89a
[]
no_license
tuomas2/and-bible
8b92824ff094d2b234e6da51a2ed62f876c0da26
61aaa124d2b58d86d02ba3208598a225ff258560
refs/heads/master
2020-05-28T01:01:35.724708
2015-04-11T07:59:52
2015-04-11T07:59:52
37,821,990
2
0
null
2018-09-03T07:13:59
2015-06-21T19:09:47
Java
UTF-8
Java
false
false
274
java
package net.bible.android.view.activity.base; /** * @author Martin Denham [mjdenham at gmail dot com] * @see gnu.lgpl.License for license details.<br> * The copyright to this program is held by it's author. */ public interface Callback { void okay(); }
[ "mjdenham@gmail.com" ]
mjdenham@gmail.com
5d6dc8326273322866db562d5ada3de604660267
c2745516073be0e243c2dff24b4bb4d1d94d18b8
/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharesDeleteHeaders.java
5e1ebf679bce63372a382d2fa41d10509a8d543e
[ "MIT", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause", "CC0-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later" ]
permissive
milismsft/azure-sdk-for-java
84b48d35e3fca8611933b3f86929788e5e8bceed
f4827811c870d09855417271369c592412986861
refs/heads/master
2022-09-25T19:29:44.973618
2022-08-17T14:43:22
2022-08-17T14:43:22
90,779,733
1
0
MIT
2021-12-21T21:11:58
2017-05-09T18:37:49
Java
UTF-8
Java
false
false
3,417
java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.storage.file.share.implementation.models; import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The SharesDeleteHeaders model. */ @JacksonXmlRootElement(localName = "null") @Fluent public final class SharesDeleteHeaders { /* * The x-ms-version property. */ @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Date property. */ @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; // HttpHeaders containing the raw property values. /** * Creates an instance of SharesDeleteHeaders class. * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public SharesDeleteHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue("x-ms-version"); this.xMsRequestId = rawHeaders.getValue("x-ms-request-id"); if (rawHeaders.getValue("Date") != null) { this.dateProperty = new DateTimeRfc1123(rawHeaders.getValue("Date")); } } /** * Get the xMsVersion property: The x-ms-version property. * * @return the xMsVersion value. */ public String getXMsVersion() { return this.xMsVersion; } /** * Set the xMsVersion property: The x-ms-version property. * * @param xMsVersion the xMsVersion value to set. * @return the SharesDeleteHeaders object itself. */ public SharesDeleteHeaders setXMsVersion(String xMsVersion) { this.xMsVersion = xMsVersion; return this; } /** * Get the xMsRequestId property: The x-ms-request-id property. * * @return the xMsRequestId value. */ public String getXMsRequestId() { return this.xMsRequestId; } /** * Set the xMsRequestId property: The x-ms-request-id property. * * @param xMsRequestId the xMsRequestId value to set. * @return the SharesDeleteHeaders object itself. */ public SharesDeleteHeaders setXMsRequestId(String xMsRequestId) { this.xMsRequestId = xMsRequestId; return this; } /** * Get the dateProperty property: The Date property. * * @return the dateProperty value. */ public OffsetDateTime getDateProperty() { if (this.dateProperty == null) { return null; } return this.dateProperty.getDateTime(); } /** * Set the dateProperty property: The Date property. * * @param dateProperty the dateProperty value to set. * @return the SharesDeleteHeaders object itself. */ public SharesDeleteHeaders setDateProperty(OffsetDateTime dateProperty) { if (dateProperty == null) { this.dateProperty = null; } else { this.dateProperty = new DateTimeRfc1123(dateProperty); } return this; } }
[ "noreply@github.com" ]
noreply@github.com
3a18d4da21b398e327e1b34cc0c86448cde56753
9f2f5130ef63138c1a452e6cf40e592f996774f4
/app/src/androidTest/java/com/isil/appperuanisimosv2/ExampleInstrumentedTest.java
19e89d112c1abe86d71ecbba912895a8b0cf3245
[]
no_license
yoshio001/AppPeruanisimosV2
ffad16c5ed62e89daf9123e76b6239fda74897bb
34196651e03abf607ece58d9a9c53018a043a87f
refs/heads/master
2020-05-24T05:21:08.738242
2019-05-16T23:16:49
2019-05-16T23:16:49
187,113,521
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
package com.isil.appperuanisimosv2; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.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.getTargetContext(); assertEquals("com.isil.appperuanisimosv2", appContext.getPackageName()); } }
[ "yoshiohiromitsu@MacBook-Pro-de-Yoshio.local" ]
yoshiohiromitsu@MacBook-Pro-de-Yoshio.local
844d5cb39d4ce67d6cae6f2ba5b650af3c7c5338
098631a39ac91022959007d28492b20fdfa7d667
/src/main/java/org/sky/utils/ExcelUtils.java
9cc21eb22ac3fc8b7df6b663a02d9a70df4ee9af
[]
no_license
weifengxiang/abduct
82c0043f9b175c9f428abe73813dee7e0929c98b
79f6f6ad03a269aec969c306ad11eb928bcff1ff
refs/heads/master
2022-12-23T01:33:49.100788
2019-07-11T09:01:35
2019-07-11T09:01:35
128,015,468
0
1
null
2022-12-16T09:46:00
2018-04-04T06:09:57
JavaScript
UTF-8
Java
false
false
3,094
java
package org.sky.utils; import java.io.IOException; import java.io.Writer; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.xssf.usermodel.XSSFCellStyle; import org.apache.poi.xssf.usermodel.XSSFDataFormat; import org.apache.poi.xssf.usermodel.XSSFFont; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.sky.sys.utils.ExcelMax.SpreadsheetWriter; public class ExcelUtils { public static Map<String, XSSFCellStyle> createStyles(XSSFWorkbook wb) { Map<String, XSSFCellStyle> styles = new HashMap<String, XSSFCellStyle>(); XSSFDataFormat fmt = wb.createDataFormat(); XSSFCellStyle style1 = wb.createCellStyle(); style1.setAlignment(XSSFCellStyle.ALIGN_RIGHT); style1.setDataFormat(fmt.getFormat("0.0%")); styles.put("percent", style1); XSSFCellStyle style2 = wb.createCellStyle(); style2.setAlignment(XSSFCellStyle.ALIGN_CENTER); style2.setDataFormat(fmt.getFormat("0.0X")); styles.put("coeff", style2); XSSFCellStyle style3 = wb.createCellStyle(); style3.setAlignment(XSSFCellStyle.ALIGN_RIGHT); style3.setDataFormat(fmt.getFormat("$#,##0.00")); styles.put("currency", style3); XSSFCellStyle style4 = wb.createCellStyle(); style4.setAlignment(XSSFCellStyle.ALIGN_RIGHT); style4.setDataFormat(fmt.getFormat("mmm dd")); styles.put("date", style4); XSSFCellStyle style5 = wb.createCellStyle(); XSSFFont headerFont = wb.createFont(); headerFont.setBold(true); style5.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); style5.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND); style5.setFont(headerFont); styles.put("header", style5); return styles; } public static void dataInsert(SpreadsheetWriter sw, String[] headersArray, List dataList, List showNameList, int i, int rows) { // write data rows try { for (int excelKey = 0; excelKey < dataList.size(); excelKey++) { Map map = (Map) dataList.get(excelKey); sw.insertRow((i - 1) * rows + excelKey + 1); for (int k = 0; k < showNameList.size(); k++) { String fieldName = (String) showNameList.get(k); Object value = map.get(fieldName); String textValue = value == null || "null".equals(value.toString()) ? "" : value .toString(); sw.createCell(k, StringEscapeUtils.escapeXml(textValue)); } sw.endRow(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static SpreadsheetWriter getWrite(Writer out, Map<String, XSSFCellStyle> styles, Object[] headers) throws Exception { SpreadsheetWriter sw = new SpreadsheetWriter(out); sw.beginSheet(); // insert header row sw.insertRow(0); int styleIndex = styles.get("header").getIndex(); for (int i = 0; i < headers.length; i++) { sw.createCell(i, StringEscapeUtils.escapeXml(headers[i] + "")); } sw.endRow(); return sw; } }
[ "weifx@192.168.0.107" ]
weifx@192.168.0.107
065fec6b61d2ca7e949733301bad3ede3d3ded9c
da9ee1aac1ca3c0f987a6cdb90ecd91a3938cbb3
/sse/src/main/java/sse/servlet/SSEEchoServlet.java
8dcca479594e8938f549711d1e3b51998b82247d
[]
no_license
mengqhai/appbasement
6d12cc1036f6e2a8159ee4a16526ff0d30d61aa1
8b100d1367e5eda85b128438bbf6311df5f84bb9
refs/heads/master
2021-06-17T06:09:38.654516
2017-03-24T03:11:14
2017-03-24T03:11:14
16,940,729
0
0
null
null
null
null
UTF-8
Java
false
false
971
java
package sse.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * https://weblogs.java.net/blog/swchan2/archive/2014/05/21/server-sent-events-async-servlet-example * * * @author qinghai * */ @WebServlet(urlPatterns = { "/simplesse" }) public class SSEEchoServlet extends HttpServlet { /** * */ private static final long serialVersionUID = 9164581443599768094L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // set content type resp.setContentType("text/event-stream"); resp.setCharacterEncoding("UTF-8"); String msg = req.getParameter("msg"); PrintWriter writer = resp.getWriter(); writer.write("data: " + msg + "\n\n"); } }
[ "mengqhai@gmail.com" ]
mengqhai@gmail.com
f971df310b0360d050ff5693ce2690b133d71ffe
28b530277edb9d17240cf7235940f83927ee8532
/TD10/Correction/TPChenillesEtFormes-v3.1/src/ufrim2ag/m2pcci/pl2/formesanimees/appli/AppliChenille3.java
de7fa538739dca5207a678b42fcf211ca6654c22
[]
no_license
lanaflonform/PL2_TP
569fcbacb36e11a501c934b70112871c7814722b
d1a146e1dbc389d5d147488be08640f6d87cc198
refs/heads/master
2021-06-19T06:26:20.036945
2017-03-24T09:22:53
2017-03-24T09:22:53
260,838,845
0
1
null
2020-05-03T06:01:51
2020-05-03T06:01:50
null
UTF-8
Java
false
false
3,517
java
/* * Copyright (C) 2017 Philippe GENOUD - Université Grenoble Alpes - Lab LIG-Steamer * * 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 ufrim2ag.m2pcci.pl2.formesanimees.appli; import ufrim2ag.m2pcci.pl2.formesanimees.dessin.Dessin; import ufrim2ag.m2pcci.pl2.formesanimees.chenille.ChenilleCouleur; import ufrim2ag.m2pcci.pl2.formesanimees.chenille.Chenille; import java.awt.Color; import javax.swing.JFrame; import javax.swing.WindowConstants; /** * Ouvre une fenêtre et affiche plusieurs chenilles intialement toutes * positionnées au centre de la fenêtre et qui ensuite se déplacent de manière * aléatoire. Une chenille sur deux est une chenille "normale", l'autre étant * une chenille colorée dont la couleur est fixée au hasard.<BR> * Le nombre de chenille peut être fixé par la ligne de commande; par exemple * pour avoir 6 chenilles :<BR> * <code>java AppliChenille3 6</code> * * @author Philippe Genoud - UGA - LIG Steamer */ public class AppliChenille3 { public static final int NBCH = 30; public static void main(String[] args) { int nbChenilles; // nombre de chenille a afficher if (args.length == 0) { nbChenilles = NBCH; } else { nbChenilles = Integer.parseInt(args[0]); } // création de la fenêtre de l'application JFrame laFenetre = new JFrame("Chenilles"); laFenetre.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); laFenetre.setSize(512, 512); // création de la zône de dessin dans la fenêtre Dessin d = new Dessin(); laFenetre.getContentPane().add(d); // affiche la fenêtre laFenetre.setVisible(true); // creation des chenilles. elles sont stockées dans un tableau et // ajoutées // à la zône de dessin. Les chenilles d'indice impair sont des chenilles // "normales" // les chenilles d'indice pair sont des chenilles colorées Chenille[] chen = new Chenille[nbChenilles]; for (int i = 0; i < nbChenilles; i++) { if (i % 2 != 0) { chen[i] = new Chenille(d, 10, 10); } else { chen[i] = new ChenilleCouleur( new Color((float) Math.random(), (float) Math.random(), (float) Math.random()), d, 10, 10 ); } d.ajouterObjet(chen[i]); } // la boucle d'animation while (true) { // fait réaliser aux chenilles un déplacement élémentaire for (Chenille ch : chen) { ch.deplacer(); } // la zone de dessin se réaffiche d.repaint(); // un temps de pause pour avoir le temps de voir le nouveau dessin d.pause(50); } } } // AppliChenille3
[ "thierryeric@free.fr" ]
thierryeric@free.fr
fe00268c3a0457f231139a779a09e654cf9ba203
6a77baab0ba3286f97adec30e77f930307e5d26c
/src/main/java/test/PropertyLoaderTest.java
9ec190be78a8ac765ce5df3c29883612a56f0c0b
[]
no_license
gtorchia/seleniumexercises
bcdf87ededaaa188ffab08bebf39e644820b085a
9f76f175763d11602d1f763af6832bccab3f9224
refs/heads/master
2021-06-06T14:48:56.153881
2020-11-17T14:34:04
2020-11-17T14:34:04
141,556,769
0
0
null
2021-03-31T20:52:45
2018-07-19T09:31:42
Java
UTF-8
Java
false
false
1,213
java
package test; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import utils.PropertyLoader; import java.io.FileNotFoundException; import java.io.IOException; import java.lang.reflect.Constructor; import static org.hamcrest.core.Is.is; import static org.junit.Assert.*; public class PropertyLoaderTest { @Before public void setUp() throws Exception { } @After public void tearDown() throws Exception { } @Test public void loadNullProperty() { assertNull("The property is null", PropertyLoader.loadProperty("")); } @Test public void loadBlankValueProperty() { assertNotEquals("The property is blank"," ", PropertyLoader.loadProperty(" ")); } @Test public void loadSpecialCharsProperty() { String match ="@*@*"; assertThat( "The value of variable passed is "+ match , null, is(PropertyLoader.loadProperty(match))); } @Test public void loadPropertyWhenConfigurationFileNotFound ( ) { assertEquals (" (The system cannot find the path specified)" , PropertyLoader.loadProperty ("PIPPO" , "")); } @Test public void testLoadProperty() { } }
[ "giuseppe.torchia1@nhs.net" ]
giuseppe.torchia1@nhs.net
b02b328547af40a2d6525fe0bc5f90f34a564e69
ce5e10846b3146205ae94e9f506a4c4307cf000e
/27_BoardCast/app/src/main/java/com/example/rylan/boardcast/MyReceiver.java
7d9adba3ba23434a576e113edb459b251fcb17be
[]
no_license
Rylan1996/2014011365Liuyangyue
ecbda7731cab80d77e668c2aa67f9329a0e4b4bd
3c4cbe1c968ec1d4509398b046f16bc8cf0a989e
refs/heads/master
2020-09-15T08:04:43.124061
2016-11-15T10:59:43
2016-11-15T10:59:43
67,717,707
0
0
null
null
null
null
UTF-8
Java
false
false
537
java
package com.example.rylan.boardcast; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class MyReceiver extends BroadcastReceiver { public MyReceiver() { } @Override public void onReceive(Context context, Intent intent) { String strMsg=intent.getStringExtra("broadcast"); Toast.makeText(context,strMsg,Toast.LENGTH_LONG).show(); //throw new UnsupportedOperationException("Not yet implemented"); } }
[ "1105027029@qq.com" ]
1105027029@qq.com
d126b75e8ead339e1efb284133b1d0bb24a58d25
e3f50a97b37dc5c1415b2d0348564ceb78832698
/1909 NSA Codebreaker Challenge/terrortime_jadx/java/org/jivesoftware/smack/filter/AbstractFromToMatchesFilter.java
ff7b596c1832be833bc7433d8009f06693ce5a06
[]
no_license
sears-s/ctf
b8d13f121deb43189487b168a68f18dfc5538212
c0e5960b1b975ba7073dae28b0c0f28a6eab563e
refs/heads/master
2021-07-26T21:12:01.384166
2021-06-29T04:42:52
2021-06-29T04:42:52
145,129,430
0
0
null
null
null
null
UTF-8
Java
false
false
1,435
java
package org.jivesoftware.smack.filter; import org.jivesoftware.smack.packet.Stanza; import org.jxmpp.jid.Jid; public abstract class AbstractFromToMatchesFilter implements StanzaFilter { private final Jid address; private final boolean ignoreResourcepart; /* access modifiers changed from: protected */ public abstract Jid getAddressToCompare(Stanza stanza); protected AbstractFromToMatchesFilter(Jid address2, boolean ignoreResourcepart2) { if (address2 == null || !ignoreResourcepart2) { this.address = address2; } else { this.address = address2.asBareJid(); } this.ignoreResourcepart = ignoreResourcepart2; } public final boolean accept(Stanza stanza) { Jid stanzaAddress = getAddressToCompare(stanza); if (stanzaAddress == null) { return this.address == null; } if (this.ignoreResourcepart) { stanzaAddress = stanzaAddress.asBareJid(); } return stanzaAddress.equals((CharSequence) this.address); } public final String toString() { String matchMode = this.ignoreResourcepart ? "ignoreResourcepart" : "full"; StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ("); sb.append(matchMode); sb.append("): "); sb.append(this.address); return sb.toString(); } }
[ "sears-s@users.noreply.github.com" ]
sears-s@users.noreply.github.com
20843485d8264c3288251d50a97d77ab104f9c12
4909deb4d18834db974c846bf95679a8f708cfdf
/src/gov/guilin/controller/admin/ReviewController.java
1992b994d1b69ea9e7bfe38c06f99198eca23c87
[]
no_license
aryanugroho/E-commerce-2
2dea46195148e330bf82f2cfab88ebf103ddf54f
253b299d845ad979c9ddb68027a0962082ec3d29
refs/heads/master
2020-05-22T17:51:14.722595
2016-03-01T22:58:29
2016-03-01T22:58:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,779
java
/* * Copyright 2014 guilin. All rights reserved. * Support: guilin * License: guilin */ package gov.guilin.controller.admin; import java.util.ArrayList; import java.util.Set; import gov.guilin.Message; import gov.guilin.Page; import gov.guilin.Pageable; import gov.guilin.entity.Consultation; import gov.guilin.entity.Review; import gov.guilin.entity.Supplier; import gov.guilin.entity.Review.Type; import gov.guilin.service.AdminService; import gov.guilin.service.ReviewService; import javax.annotation.Resource; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.mvc.support.RedirectAttributes; /** * Controller - 评论 * * @author guilin * @version */ @Controller("adminReviewController") @RequestMapping("/admin/review") public class ReviewController extends BaseController { @Resource(name = "reviewServiceImpl") private ReviewService reviewService; @Resource(name = "adminServiceImpl") private AdminService adminService; /** * 编辑 */ @RequestMapping(value = "/edit", method = RequestMethod.GET) public String edit(Long id, ModelMap model) { model.addAttribute("review", reviewService.find(id)); return "/admin/review/edit"; } /** * 更新 */ @RequestMapping(value = "/update", method = RequestMethod.POST) public String update(Long id, @RequestParam(defaultValue = "false") Boolean isShow, RedirectAttributes redirectAttributes) { Review review = reviewService.find(id); if (review == null) { return ERROR_VIEW; } review.setIsShow(isShow); reviewService.update(review); addFlashMessage(redirectAttributes, SUCCESS_MESSAGE); return "redirect:list.jhtml"; } /** * 列表 */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Type type, Pageable pageable, ModelMap model) { model.addAttribute("type", type); model.addAttribute("types", Type.values()); //Add by DanielChen 20140503 Set<Supplier> suppliers = adminService.getCurrent().getSuppliers(); if((suppliers !=null) && (!suppliers.isEmpty())){ model.addAttribute("page", reviewService.findPage(null, null, type, null, pageable,suppliers)); }else{ model.addAttribute("page", new Page<Review>(new ArrayList<Review>(),0,new Pageable(0,100))); } return "/admin/review/list"; } /** * 删除 */ @RequestMapping(value = "/delete", method = RequestMethod.POST) public @ResponseBody Message delete(Long[] ids) { reviewService.delete(ids); return SUCCESS_MESSAGE; } }
[ "qianji.zheng@gmail.com" ]
qianji.zheng@gmail.com
bba288c0b1f64165e8af1159fd862781789a596c
8c5e64d7000edf7a201179eeb1020c591d8fd0cd
/Minecraft/build/tmp/recompileMc/sources/net/minecraftforge/fml/common/asm/ASMTransformerWrapper.java
b5b0d7d1a2e8150729a0d66b6b2631baa9512849
[ "LGPL-2.0-or-later", "LGPL-2.1-only", "BSD-3-Clause", "MIT" ]
permissive
shaw-wong/Malmo
1f1bec86ff5b2c8038540d029a9d2288201e0f3a
2683891206e8ab7f015d5d0feb6b5a967f02c94f
refs/heads/master
2021-06-25T13:14:30.097602
2018-06-03T14:25:19
2018-06-03T14:25:19
125,961,215
1
0
MIT
2018-04-10T05:34:35
2018-03-20T04:35:00
Java
UTF-8
Java
false
false
8,749
java
/* * Minecraft Forge * Copyright (c) 2016. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation version 2.1 * of the 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. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.minecraftforge.fml.common.asm; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.net.URLStreamHandler; import java.security.Permission; import java.util.Map; import net.minecraft.launchwrapper.IClassTransformer; import net.minecraft.launchwrapper.LaunchClassLoader; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.commons.GeneratorAdapter; import org.objectweb.asm.commons.Method; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.google.common.collect.Maps; import javax.annotation.Nullable; public class ASMTransformerWrapper { private static final Map<String, String> wrapperModMap = Maps.newHashMap(); private static final Map<String, String> wrapperParentMap = Maps.newHashMap(); private static final LoadingCache<String, byte[]> wrapperCache = CacheBuilder.newBuilder() .maximumSize(30) .weakValues() .build(new CacheLoader<String, byte[]>() { public byte[] load(String file) throws Exception { return makeWrapper(file); } }); private static final URL asmGenRoot; private static boolean injected = false; static { try { asmGenRoot = new URL("asmgen", null, -1, "/", new ASMGenHandler()); } catch(MalformedURLException e) { throw new RuntimeException(e); } } private static class ASMGenHandler extends URLStreamHandler { @Nullable protected URLConnection openConnection(URL url) throws IOException { String file = url.getFile(); if(file.equals("/")) { return new URLConnection(url) { public void connect() throws IOException { throw new UnsupportedOperationException(); } }; } if(!file.startsWith("/")) throw new RuntimeException("Malformed URL: " + url); file = file.substring(1); if(wrapperModMap.containsKey(file)) { return new ASMGenConnection(url, file); } return null; } } private static class ASMGenConnection extends URLConnection { private final String file; protected ASMGenConnection(URL url, String file) { super(url); this.file = file; } public void connect() throws IOException { throw new UnsupportedOperationException(); } @Override public InputStream getInputStream() { return new ByteArrayInputStream(wrapperCache.getUnchecked(file)); } @Override @Nullable public Permission getPermission() { return null; } } public static String getTransformerWrapper(LaunchClassLoader launchLoader, String parentClass, String coreMod) { if(!injected) { injected = true; launchLoader.addURL(asmGenRoot); } String name = getWrapperName(parentClass); String fileName = name.replace('.', '/') + ".class"; wrapperModMap.put(fileName, coreMod); wrapperParentMap.put(fileName, parentClass); return name; } private static byte[] makeWrapper(String fileName) { if(!wrapperModMap.containsKey(fileName) || !wrapperParentMap.containsKey(fileName) || !fileName.endsWith(".class")) { throw new IllegalArgumentException("makeWrapper called with strange argument: " + fileName); } String name = fileName.substring(0, fileName.length() - ".class".length()); try { Type wrapper = Type.getType(TransformerWrapper.class); ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES); writer.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC, name, null, wrapper.getInternalName(), null); Method m = Method.getMethod("void <init> ()"); GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, m, null, null, writer); mg.loadThis(); mg.invokeConstructor(wrapper, m); mg.returnValue(); mg.endMethod(); m = Method.getMethod("java.lang.String getParentClass ()"); mg = new GeneratorAdapter(Opcodes.ACC_PROTECTED, m, null, null, writer); mg.push(wrapperParentMap.get(fileName)); mg.returnValue(); mg.endMethod(); m = Method.getMethod("java.lang.String getCoreMod ()"); mg = new GeneratorAdapter(Opcodes.ACC_PROTECTED, m, null, null, writer); mg.push(wrapperModMap.get(fileName)); mg.returnValue(); mg.endMethod(); writer.visitEnd(); return writer.toByteArray(); } catch (Exception e) { throw new RuntimeException(e); } } private static String getWrapperName(String parentClass) { return "$wrapper." + parentClass; } @SuppressWarnings("unused") private static class WrapperVisitor extends ClassVisitor { private final String name; private final String parentClass; public WrapperVisitor(ClassVisitor cv, String name, String parentClass) { super(Opcodes.ASM5, cv); this.name = name.replace('.', '/'); this.parentClass = parentClass; } @Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { super.visit(version, access, this.name, signature, superName, interfaces); } @Override public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { if(name.equals("parentClass")) { return super.visitField(access, name, desc, signature, parentClass); } return super.visitField(access, name, desc, signature, value); } } public static abstract class TransformerWrapper implements IClassTransformer { private final IClassTransformer parent; public TransformerWrapper() { try { this.parent = (IClassTransformer)this.getClass().getClassLoader().loadClass(getParentClass()).newInstance(); } catch(Exception e) { throw new RuntimeException(e); } } public byte[] transform(String name, String transformedName, byte[] basicClass) { try { return parent.transform(name, transformedName, basicClass); } catch(Throwable e) { throw new TransformerException("Exception in class transformer " + parent + " from coremod " + getCoreMod(), e); } } @Override public String toString() { return "TransformerWrapper(" + getParentClass() + ", " + getCoreMod() + ")"; } protected abstract String getParentClass(); protected abstract String getCoreMod(); } static class TransformerException extends RuntimeException { private static final long serialVersionUID = -6616232415696157218L; public TransformerException(String message, Throwable cause) { super(message, cause); } } }
[ "254664427@qq.com" ]
254664427@qq.com
83891fc7f20cd58baa263b0f8f98d75dc526e5c3
7075421b84bdbf4e31fee33a24ffc78e43e4be50
/src/main/java/dev/arielalvesdutra/hcrpr/controllers/dto/UpdateSolutionAttemptTechniquesDTO.java
fe7c03425b9aff9ca9fbd5bc04e77c9c4fe04aac
[]
no_license
arielalvesdutra/hcrpr-backend
2b04a019b7a9d26e1eb96febe07f680669a30bb2
b04bd73c14d5ad6bc1b23f7b75d51039052754a9
refs/heads/master
2022-01-28T11:35:14.329641
2020-06-22T12:39:33
2020-06-22T12:39:33
221,792,508
1
0
null
2022-01-21T23:44:22
2019-11-14T21:47:11
Java
UTF-8
Java
false
false
387
java
package dev.arielalvesdutra.hcrpr.controllers.dto; import java.util.ArrayList; import java.util.List; public class UpdateSolutionAttemptTechniquesDTO { private List<Long> techniquesIds = new ArrayList<Long>(); public List<Long> getTechniquesIds() { return techniquesIds; } public void setTechniquesIds(List<Long> techniquesIds) { this.techniquesIds = techniquesIds; } }
[ "alves.lsn@gmail.com" ]
alves.lsn@gmail.com
4f7e5f60d3790e3a3c6f94531e6cc737f8426791
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-44-11-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/plugin/webdav/XWikiDavFilter_ESTest.java
aa5359edd57214e79c173fcddd9828fd8301f2b5
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 02:50:32 UTC 2020 */ package com.xpn.xwiki.plugin.webdav; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWikiDavFilter_ESTest extends XWikiDavFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
6fc61cff2e68a3c497366578447b6eefef443268
116b5b315bc1897dfaed6c5f103bcbd1681a2e84
/app/src/androidTest/java/com/example/uietfest/ExampleInstrumentedTest.java
f495cdaacd530eea2e72e05ae2992cc3e3f678fd
[]
no_license
piyush33patel/UIET-Fest-App
c0d7acbd3421e7c8c0be497e1e4f9e3a54375af1
435c4965e39a70b9f79aa885b4a1f5b674c21059
refs/heads/master
2021-06-25T13:51:16.512604
2021-04-03T21:45:45
2021-04-03T21:45:45
224,165,253
3
0
null
null
null
null
UTF-8
Java
false
false
738
java
package com.example.uietfest; import android.content.Context; import androidx.test.InstrumentationRegistry; import androidx.test.runner.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.getTargetContext(); assertEquals("com.example.uietfest", appContext.getPackageName()); } }
[ "noreply@github.com" ]
noreply@github.com
bc03a8d09e2439dcd1150b6c331cbff770d1c6f3
5a46f220f5e10f528097e0aaa97161ff83068651
/solutions/ExcelSheetColumnTitle.java
52b111b07d5b9e5929cead6d4163211dc1275a00
[]
no_license
Abhishek-AC/leetcode-again
814a590487485535b43d01624b6f49b58d986b08
3eb17ee9b2994b20a62c7c8b34a3a30311839542
refs/heads/master
2022-02-17T14:29:19.676720
2019-08-26T05:50:34
2019-08-26T05:50:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,402
java
/* Problem Statement: Given a positive integer, return its corresponding column title as appear in an Excel sheet. Problem Link: Excel Sheet Column Title: https://leetcode.com/problems/excel-sheet-column-title/description/ Solution: https://github.com/sunnypatel165/leetcode-again/blob/master/solutions/ExcelSheetColumnTitle.java Author: Sunny Patel sunnypatel165@gmail.com https://github.com/sunnypatel165 https://www.linkedin.com/in/sunnypatel165/ */ class Solution { public boolean isBalanced(TreeNode root) { if(root==null) return true; if(Math.abs(maxDepth(root.left) - maxDepth(root.right))>1) return false; return isBalanced(root.left) && isBalanced(root.right); } public int maxDepth(TreeNode root) { if(root==null) return 0; if(root.left==null && root.right == null){ return 1; } return 1 + Math.max(maxDepth(root.left), maxDepth(root.right)); } } class Solution { public String convertToTitle(int n) { StringBuilder builder = new StringBuilder(); while(n>0){ if(n%26==0){ builder.append((char)('Z')+""); n--; } else builder.append((char)(n%26+'A'-1)+""); n/=26; } return builder.reverse().toString(); } }
[ "sunnydep@usc.edu" ]
sunnydep@usc.edu
7d6ea8aa2ebef252d685287af228ec6a59904302
526457f0077becd0bb32f52f99266addd45d1e2f
/biz/JFP-Framework-Core/src/main/java/org/isotope/jfp/framework/mybatis/plugin/dialect/MySQLDialect.java
29151f08791d2cb7664105e26de7ccf411f53fa0
[ "Apache-2.0" ]
permissive
qxs820624/ishome
58cfc8dbfeb147e2c3934485776617468a578d3b
d095bd92380d7e058f5c5c9c07c9ca8abf86b3e8
refs/heads/master
2020-03-09T03:51:54.761986
2017-09-19T03:33:21
2017-09-19T03:33:21
128,574,471
0
0
null
null
null
null
UTF-8
Java
false
false
661
java
package org.isotope.jfp.framework.mybatis.plugin.dialect; /** * @author */ public class MySQLDialect extends DefaultDialect{ public boolean supportsLimitOffset(){ return true; } public boolean supportsLimit() { return true; } public String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder) { if (offset > 0) { return sql + super.getSupportsOrderby() + " limit "+offsetPlaceholder+","+limitPlaceholder; } else { return sql + super.getSupportsOrderby() + " limit "+limitPlaceholder; } } }
[ "ishome@0f64846e-ad2d-472a-bb4f-a9ad5a697426" ]
ishome@0f64846e-ad2d-472a-bb4f-a9ad5a697426
2f6a5ae73b1fbf82f7a3a49f4f463dadad5e808b
e0a77f146b8602bb329a14013075b2e7247b4d0e
/disanxuetangparent/src/main/java/com/shengzhe/disan/xuetangparent/mvp/view/OneOnOneView.java
631132d5ab12c89a806da25a94a49c8ef5f3edf9
[]
no_license
led-os/3rdedu_android
526ee66ee91bf357e670da9136745a08d54354f9
7ba4b3d8d1536591dc263f6eca5842ebde10a7cf
refs/heads/master
2021-10-10T19:44:55.466911
2019-01-16T05:11:22
2019-01-16T05:11:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,235
java
package com.shengzhe.disan.xuetangparent.mvp.view; import android.content.Context; import android.content.Intent; import android.graphics.Paint; import android.support.v4.app.Fragment; import android.text.TextUtils; import android.view.Gravity; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.main.disanxuelib.adapter.SimpleAdapter.SimpleAdapter; import com.main.disanxuelib.adapter.SimpleAdapter.TrdViewHolder; import com.main.disanxuelib.bean.CourseType; import com.main.disanxuelib.util.ArithUtils; import com.main.disanxuelib.util.ContentUtil; import com.main.disanxuelib.util.ImageUtil; import com.main.disanxuelib.util.LogUtils; import com.main.disanxuelib.view.DropDownMenu; import com.main.disanxuelib.view.RefreshCommonView; import com.shengzhe.disan.xuetangparent.R; import com.main.disanxuelib.bean.BasePageBean; import com.shengzhe.disan.xuetangparent.bean.TeacherInformation; import com.shengzhe.disan.xuetangparent.fragment.ScreenConditionFragment; import com.shengzhe.disan.xuetangparent.mvp.activity.OfflineTeacherActivity; import com.shengzhe.disan.xuetangparent.mvp.fragment.offline.OfflineOneOnOneFragment; import com.shengzhe.disan.xuetangparent.mvp.activity.TeacherNewPagerActivity; import com.shengzhe.disan.xuetangparent.utils.SharedPreferencesManager; import com.shengzhe.disan.xuetangparent.utils.StringUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by Administrator on 2018/5/2. */ public class OneOnOneView extends BaseView implements ScreenConditionFragment.SelectListener{ private List<Fragment> popupFragment = new ArrayList<>();//下拉view 列表 private List<TeacherInformation> oneOneList = new ArrayList<>(); private Map<String, Object> param = new HashMap<>(); private SimpleAdapter adapter; public OneOnOneView(Context context) { super(context); } private IOneOnOneView iView; public void setIOneOnOneView(IOneOnOneView iView){ this.iView = iView; } public void initDatas(DropDownMenu.DropMenuFragmentManage fragmentManage, RefreshCommonView.RefreshLoadMoreListener listener) { oneOneList.clear(); for(int i = 0; i< ContentUtil.selectXXYDY.length; i++){ if(i==0){ ScreenConditionFragment fragment = ScreenConditionFragment.newInstance(StringUtils.select_grade); fragment.setSelectListener(this); popupFragment.add(fragment); }else if(i==1){ ScreenConditionFragment fragment = ScreenConditionFragment.newInstance(StringUtils.select_course); fragment.setSelectListener(this); popupFragment.add(fragment); }else if(i==2){ ScreenConditionFragment fragment = ScreenConditionFragment.newInstance(StringUtils.select_subject); fragment.setSelectListener(this); popupFragment.add(fragment); }else{ ScreenConditionFragment fragment = ScreenConditionFragment.newInstance(StringUtils.select_order,OfflineOneOnOneFragment.class.getName()); fragment.setSelectListener(this); popupFragment.add(fragment); } } iView.getDropDownMenuView().setRequestFragmentManage(fragmentManage); float[] weight = {3,3,3,2}; iView.getDropDownMenuView().setItwmWeight(weight); iView.getDropDownMenuView().setDropDownFragment(Arrays.asList(ContentUtil.selectXXYDY), popupFragment); adapter = new SimpleAdapter<TeacherInformation>(mContext, oneOneList, R.layout.item_oneone_teacher) { @Override protected void onBindViewHolder(TrdViewHolder holder, final TeacherInformation data) { holder.setText(R.id.iv_oneone_name,data.getTeacherName()) .setText(R.id.iv_oneone_message,StringUtils.getSex(data.getSex()) +" | "+data.getGradeName()+" "+data.getSubjectName()+" | "+data.getTeachingAge()+"年教龄") .setText(R.id.iv_oneone_latelycourse,"新开课:"+data.getMaxCourseName()) .setVisible(R.id.tv_oneone_isplant,data.getIdentity()>0) .setVisible(R.id.iv_quality_certification,data.getIpmpStatus()==2) .setVisible(R.id.iv_realname_certification,data.getCardApprStatus()!=0) .setVisible(R.id.iv_teacher_certification,data.getQtsStatus()==2) .setVisible(R.id.iv_education_certification,data.getQuaStatus()==2) .setVisible(R.id.v_oneone_line,oneOneList.indexOf(data)!=oneOneList.size()-1) .setOnItemListener(new View.OnClickListener() { @Override public void onClick(View v) { //Intent intent = new Intent(mContext, TeacherNewPagerActivity.class); Intent intent = new Intent(mContext, OfflineTeacherActivity.class); intent.putExtra(StringUtils.TEACHER_ID,data.getTeacherId()); mContext.startActivity(intent); } }); //原价和折扣 if(data.getCoursePrice()>data.getDiscountPrice()){ //原价大于折扣价 holder .setText(R.id.iv_oneone_price,"¥"+ ArithUtils.round(data.getDiscountPrice())); holder .setText(R.id.iv_oneone_priprice,"¥"+ArithUtils.round(data.getCoursePrice())); holder.setVisible(R.id.iv_oneone_priprice,true); } else { //原价小于等于折扣价 holder .setText(R.id.iv_oneone_price,"¥"+ArithUtils.round(data.getCoursePrice())); holder.setVisible(R.id.iv_oneone_priprice,false); } if(data.getCourseType()==1){ ImageUtil.setCompoundDrawable(holder.<TextView>getView(R.id.iv_oneone_latelycourse),16,R.mipmap.one_lines, Gravity.LEFT,0); }else if(data.getCourseType()==2){ ImageUtil.setCompoundDrawable(holder.<TextView>getView(R.id.iv_oneone_latelycourse),16,R.mipmap.ic_course_min, Gravity.LEFT,0); } String address=""; if(!(TextUtils.isEmpty(data.getCityName()))){ address=data.getCityName(); } if(!(TextUtils.isEmpty(data.getAreaName()))){ address=address+"-"+data.getAreaName(); } holder.setText(R.id.tv_oneone_address,address); holder.<TextView>getView(R.id.iv_oneone_priprice).getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG); ImageUtil.loadCircleImageView(mContext, data.getPhotoUrl(), holder.<ImageView>getView(R.id.iv_oneone_image),R.mipmap.teacher); } }; iView.getRefreshCommonView().setRecyclerViewAdapter(adapter); iView.getRefreshCommonView().setIsAutoLoad(false); iView.getRefreshCommonView().setRefreshLoadMoreListener(listener); } @Override public void tagOnClickListener(View v, String tag, CourseType type, int mFatherId) { iView.getDropDownMenuView().setTabText(type.name); iView.getDropDownMenuView().closeMenu(); if(tag.equals(StringUtils.select_grade)){ //年级 if(type.id!=-1){ param.put("gradeId",mFatherId); }else{ param.remove("gradeId"); } }else if(tag.equals(StringUtils.select_subject)){ //科目 if(type.id==0){ param.remove("teacherMethod1"); param.remove("teacherMethod2"); param.remove("teacherMethod3"); }else{ LogUtils.e("type.id = " +type.id); switch (type.id){ case 1: param.put("teacherMethod2",1);//是否老师上门 1是 0否 break; case 2: param.put("teacherMethod3",1);//是否校区上课 1是 0否 break; case 3: param.put("teacherMethod1",1);//是否学生上门 1是 0否 break; } } }else if(tag.equals("course")){ if(type.id==-1){ param.remove("subjectId"); }else{ param.put("subjectId",type.id); } } iView.getRefreshCommonView().notifyData(); } @Override public void tagMoreListener(View v, String tag,Map<Integer,CourseType> selectOrderMap) { if(tag.equals(StringUtils.select_order)){ //排序 iView.getDropDownMenuView().closeMenu(); // 性别(1:男,0:女) CourseType sex = selectOrderMap.get(10); if(sex!=null&&sex.id!=-1){ param.put("sex",sex.id); }else{ param.remove("sex"); } // 教龄(字典属性propValue值。获取值传”seniority”) CourseType seniority = selectOrderMap.get(11); if(seniority!=null&&seniority.id!=-1){ param.put("seniority",seniority.id); }else{ param.remove("seniority"); } //教师身份 0自由老师,1平台教师 CourseType identity = selectOrderMap.get(12); if(identity!=null&&identity.id!=-1){ param.put("identity",identity.id); }else{ param.remove("identity"); } //城市code CourseType cityCode = selectOrderMap.get(13); if(cityCode!=null&&cityCode.id!=-1){ param.put("areaCode",cityCode.id); }else{ param.remove("areaCode"); } if(selectOrderMap==null|| selectOrderMap.isEmpty()) return; param.put("cityCode",SharedPreferencesManager.getCityId()); iView.getRefreshCommonView().notifyData(); } } public void setResultDatas(BasePageBean<TeacherInformation> teacher) { finishLoad(); oneOneList.addAll(teacher.getList()); if (oneOneList.isEmpty()){ oneOneList.clear(); iView.getRefreshCommonView().setIsEmpty(true); }else{ iView.getRefreshCommonView().setIsEmpty(false); iView.getRefreshCommonView().setIsLoadMore(teacher.isHasNextPage()); } adapter.notifyDataSetChanged(); } public void finishLoad(){ iView.getRefreshCommonView().finishRefresh(); iView.getRefreshCommonView().finishLoadMore(); } public void clearDatas() { oneOneList.clear(); } public interface IOneOnOneView{ DropDownMenu getDropDownMenuView(); RefreshCommonView getRefreshCommonView(); } }
[ "13120850176@163.com" ]
13120850176@163.com
3fc13adee6d7dd04c0560be250ec67ef1ede5a3e
e1af7696101f8f9eb12c0791c211e27b4310ecbc
/MCP/temp/src/minecraft/net/minecraft/block/BlockStructure.java
7742b337d7a4a0c4ccad21471341da1c0a4520e4
[]
no_license
VinmaniaTV/Mania-Client
e36810590edf09b1d78b8eeaf5cbc46bb3e2d8ce
7a12b8bad1a8199151b3f913581775f50cc4c39c
refs/heads/main
2023-02-12T10:31:29.076263
2021-01-13T02:29:35
2021-01-13T02:29:35
329,156,099
0
0
null
null
null
null
UTF-8
Java
false
false
4,445
java
package net.minecraft.block; import java.util.Random; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityStructure; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockStructure extends BlockContainer { public static final PropertyEnum<TileEntityStructure.Mode> field_185587_a = PropertyEnum.<TileEntityStructure.Mode>func_177709_a("mode", TileEntityStructure.Mode.class); public BlockStructure() { super(Material.field_151573_f, MapColor.field_151680_x); this.func_180632_j(this.field_176227_L.func_177621_b()); } public TileEntity func_149915_a(World p_149915_1_, int p_149915_2_) { return new TileEntityStructure(); } public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumHand p_180639_5_, EnumFacing p_180639_6_, float p_180639_7_, float p_180639_8_, float p_180639_9_) { TileEntity tileentity = p_180639_1_.func_175625_s(p_180639_2_); return tileentity instanceof TileEntityStructure ? ((TileEntityStructure)tileentity).func_189701_a(p_180639_4_) : false; } public void func_180633_a(World p_180633_1_, BlockPos p_180633_2_, IBlockState p_180633_3_, EntityLivingBase p_180633_4_, ItemStack p_180633_5_) { if (!p_180633_1_.field_72995_K) { TileEntity tileentity = p_180633_1_.func_175625_s(p_180633_2_); if (tileentity instanceof TileEntityStructure) { TileEntityStructure tileentitystructure = (TileEntityStructure)tileentity; tileentitystructure.func_189720_a(p_180633_4_); } } } public int func_149745_a(Random p_149745_1_) { return 0; } public EnumBlockRenderType func_149645_b(IBlockState p_149645_1_) { return EnumBlockRenderType.MODEL; } public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_) { return this.func_176223_P().func_177226_a(field_185587_a, TileEntityStructure.Mode.DATA); } public IBlockState func_176203_a(int p_176203_1_) { return this.func_176223_P().func_177226_a(field_185587_a, TileEntityStructure.Mode.func_185108_a(p_176203_1_)); } public int func_176201_c(IBlockState p_176201_1_) { return ((TileEntityStructure.Mode)p_176201_1_.func_177229_b(field_185587_a)).func_185110_a(); } protected BlockStateContainer func_180661_e() { return new BlockStateContainer(this, new IProperty[]{field_185587_a}); } public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_) { if (!p_189540_2_.field_72995_K) { TileEntity tileentity = p_189540_2_.func_175625_s(p_189540_3_); if (tileentity instanceof TileEntityStructure) { TileEntityStructure tileentitystructure = (TileEntityStructure)tileentity; boolean flag = p_189540_2_.func_175640_z(p_189540_3_); boolean flag1 = tileentitystructure.func_189722_G(); if (flag && !flag1) { tileentitystructure.func_189723_d(true); this.func_189874_a(tileentitystructure); } else if (!flag && flag1) { tileentitystructure.func_189723_d(false); } } } } private void func_189874_a(TileEntityStructure p_189874_1_) { switch(p_189874_1_.func_189700_k()) { case SAVE: p_189874_1_.func_189712_b(false); break; case LOAD: p_189874_1_.func_189714_c(false); break; case CORNER: p_189874_1_.func_189706_E(); case DATA: } } }
[ "vinmaniamc@gmail.com" ]
vinmaniamc@gmail.com
0e9c6b11a8c6239957f8caf96da89ff336754e73
e9ba5c13b55fab5601fc80f5af5cc252d3520034
/app/src/main/java/greencoder/com/joke/MainActivity.java
3fe786468a3c58d083f61520a5348c09cb4fcccc
[]
no_license
avishekworld/Joke
cc93819269cfc35ff753f8688397bcab10b636d7
d5bf6c53573c6446b95b37491df5da8966fc120a
refs/heads/master
2021-01-15T21:20:40.495218
2015-09-05T19:35:50
2015-09-05T19:35:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,373
java
package greencoder.com.joke; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } public void findButtonClicked(View v) { Intent intent = new Intent(this,DelayedMessageService.class); intent.putExtra(DelayedMessageService.EXTRA_MESSAGE,"Timing"); startService(intent); } }
[ "avishek.ahmed@gmail.com" ]
avishek.ahmed@gmail.com
d24491ffdf203c20a1a0391de0353bdc569ce5c5
63a6fa32642612fac7e21a94831dcb9c67f53109
/src/main/java/com/monochrome/rabbitmq/SpringbootRabbitmqApplication.java
b4c7cea8a0360404f768a780c00ad1a0e2057632
[]
no_license
zhaoyangmushiyi/springboot-rabbitmq
47cf582d5c558eff74f2d30acdcbc353962e040b
5d2fcb2cb027d5455f4762c4fd4c87f0e6661ec7
refs/heads/master
2023-06-14T22:07:04.037855
2021-07-05T08:06:44
2021-07-05T08:06:44
383,062,618
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package com.monochrome.rabbitmq; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringbootRabbitmqApplication { public static void main(String[] args) { SpringApplication.run(SpringbootRabbitmqApplication.class, args); } }
[ "zhaoyangmushiyi@gmail.com" ]
zhaoyangmushiyi@gmail.com
b1486ad0c29efdc39dbe3763ab3bf87125e9ec9b
ec24f15c68be5008b26cd7307c4d666fcd2b6109
/src/com/login/Logout.java
71b229d7db53ff677d4cd9314cdcbabc636968e7
[]
no_license
santhanakrishnanstark/Project-Spotter
9a55a0d5f4cf00c2ca0bf4793a924171a015cb91
1bae3a84a6186c7383c24ebc1bab95969f04d3d9
refs/heads/master
2021-08-11T08:54:34.612945
2017-11-13T13:11:56
2017-11-13T13:11:56
110,416,720
0
0
null
null
null
null
UTF-8
Java
false
false
649
java
package com.login; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @WebServlet("/Logout") public class Logout extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); session.removeAttribute("username"); session.invalidate(); response.sendRedirect("index.html"); } }
[ "santhanakrishnanstark@gmail.com" ]
santhanakrishnanstark@gmail.com
354b5c0f9f9c4a8874d97e31101c1bc8105ae7ee
d4aef3ea4458c3458600f49b355a631f90ed9afc
/src/main/java/SeleniumSession/Artifact/SendEmail.java
449e3855f854db3685a0fd8b143abb684c4eb545
[]
no_license
SurajKolekar/Demo-Repo
63bee931c9f9905e6029bc83cd2f1cd30eb800e2
cea7488f7c5c6eeee1ad184ae3b9dadd9bed8b09
refs/heads/master
2020-04-19T04:24:15.483853
2019-01-29T06:01:29
2019-01-29T06:01:29
167,961,921
0
0
null
null
null
null
UTF-8
Java
false
false
796
java
package SeleniumSession.Artifact; import org.apache.commons.mail.DefaultAuthenticator; import org.apache.commons.mail.Email; import org.apache.commons.mail.EmailException; import org.apache.commons.mail.SimpleEmail; public class SendEmail { public static void main(String[] args) throws EmailException{ System.out.println("================"); Email email = new SimpleEmail(); email.setHostName("smtp.gmail.com"); email.setSmtpPort(468); email.setAuthenticator(new DefaultAuthenticator("sk", "123")); email.setSSLOnConnect(true); email.setFrom("surajkolekar222r@gmail.com"); email.setSubject("TestMail"); email.setMsg("This is a test mail ... :-)"); email.addTo("surajkolekar7@gmail.com"); email.send(); System.out.println("++++++++Email send +++++++++++++"); } }
[ "surajkolekar7@gmail.com" ]
surajkolekar7@gmail.com