text
stringlengths
10
2.72M
// Sun Certified Java Programmer // Chapter 4, P291 // Operators class CompareTest { public static void main(String[] args) { boolean b = 100 > 99; System.out.println("The value of b is " + b); } }
package com.example.passin.encryption; import org.springframework.stereotype.Component; @Component public class CtrMode { public final AesUtils aesUtils; public CtrMode(AesUtils aesUtils) { this.aesUtils = aesUtils; } public byte[] encrypt(byte[] iv,byte[] message,byte[] key) throws Exception { return getBytes(iv, message, key); } public byte[] decrypt(byte[] iv,byte[] cipherText,byte[] key) throws Exception { return getBytes(iv, cipherText, key); } private byte[] getBytes(byte[] iv, byte[] message, byte[] key) throws Exception { byte[] cipherIv; if(message.length<16){ System.out.println("Message should be at least 128 bits"); } int length = message.length; int n = (length + 15)/16*16; byte[] cipher = new byte[n]; if(length == 16){ cipherIv = aesUtils.encryptText(iv,key); cipher = aesUtils.XOR(cipherIv,message); return cipher; } int i = 0; int k = 0; while (i < length){ byte[] block = new byte[16]; byte[] result; int j = 0; for (; j < 16 && i < length; j++, i++) { block[j] = message[i]; } while (j < 16) { /* pad with white spaces */ block[j++] = 0x20; } cipherIv = aesUtils.encryptText(iv,key); result = aesUtils.XOR(cipherIv,block); for (j = 0 ; j < 16 && k < cipher.length; j++, k++) { cipher[k] = result[j]; } increment(iv); } return cipher; } public static void increment(byte[] a) { for (int i = a.length - 1; i >= 0; --i) { if (++a[i] != 0) { return; } } throw new IllegalStateException("Counter overflow"); } }
package controlador; 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 modelo.MySQLConnection; /** * Servlet implementation class DeleteController */ @WebServlet("/delete") public class DeleteController extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public DeleteController() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub String nombre = request.getParameter("nombre"); MySQLConnection connection = new MySQLConnection(); connection.createConnection(); connection.deleteLugar(nombre); connection.closeConnection(); response.sendRedirect("consulta.jsp"); } }
package com.thyssenkrupp.tks.fls.qf.server.qcs.receive.xml.builder; import com.thyssenkrupp.tks.fls.qf.server.qcs.receive.xml.BeschichtungsInformationLackListeType; import java.io.StringWriter; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.namespace.QName; public class BeschichtungsInformationLackListeTypeBuilder { public static String marshal(BeschichtungsInformationLackListeType beschichtungsInformationLackListeType) throws JAXBException { JAXBElement<BeschichtungsInformationLackListeType> jaxbElement = new JAXBElement<>(new QName("TESTING"), BeschichtungsInformationLackListeType.class , beschichtungsInformationLackListeType); StringWriter stringWriter = new StringWriter(); return stringWriter.toString(); } public BeschichtungsInformationLackListeType build() { BeschichtungsInformationLackListeType result = new BeschichtungsInformationLackListeType(); return result; } }
package com.alium.ic.domains; // Generated 2013-06-19 17:36:03 by Hibernate Tools 3.4.0.CR1 import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * Polisa generated by hbm2java */ @Entity @Table(name = "polisa", catalog = "finalna") public class Polisa implements java.io.Serializable { private Integer id; private Obiekt obiekt; private Agencja agencja; private String nrPolisa; private Date dataZawarcia; private Date dataOd; private Date dataDo; private byte iloscRat; private Date wd; private String op; private Set<AgencjaWyplata> agencjaWyplatas = new HashSet<AgencjaWyplata>(0); private Set<PolisaRyzyko> polisaRyzykos = new HashSet<PolisaRyzyko>(0); private Set<PolisaRaty> polisaRaties = new HashSet<PolisaRaty>(0); private Set<PolisaOplacenie> polisaOplacenies = new HashSet<PolisaOplacenie>( 0); public Polisa() { } public Polisa(Obiekt obiekt, Agencja agencja, String nrPolisa, Date dataZawarcia, Date dataOd, Date dataDo, byte iloscRat, Date wd, String op) { this.obiekt = obiekt; this.agencja = agencja; this.nrPolisa = nrPolisa; this.dataZawarcia = dataZawarcia; this.dataOd = dataOd; this.dataDo = dataDo; this.iloscRat = iloscRat; this.wd = wd; this.op = op; } public Polisa(Obiekt obiekt, Agencja agencja, String nrPolisa, Date dataZawarcia, Date dataOd, Date dataDo, byte iloscRat, Date wd, String op, Set<AgencjaWyplata> agencjaWyplatas, Set<PolisaRyzyko> polisaRyzykos, Set<PolisaRaty> polisaRaties, Set<PolisaOplacenie> polisaOplacenies) { this.obiekt = obiekt; this.agencja = agencja; this.nrPolisa = nrPolisa; this.dataZawarcia = dataZawarcia; this.dataOd = dataOd; this.dataDo = dataDo; this.iloscRat = iloscRat; this.wd = wd; this.op = op; this.agencjaWyplatas = agencjaWyplatas; this.polisaRyzykos = polisaRyzykos; this.polisaRaties = polisaRaties; this.polisaOplacenies = polisaOplacenies; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id", unique = true, nullable = false) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "id_osoba", nullable = false) public Obiekt getObiekt() { return this.obiekt; } public void setObiekt(Obiekt obiekt) { this.obiekt = obiekt; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "id_agencja", nullable = false) public Agencja getAgencja() { return this.agencja; } public void setAgencja(Agencja agencja) { this.agencja = agencja; } @Column(name = "nr_polisa", nullable = false, length = 20) public String getNrPolisa() { return this.nrPolisa; } public void setNrPolisa(String nrPolisa) { this.nrPolisa = nrPolisa; } @Temporal(TemporalType.DATE) @Column(name = "data_zawarcia", nullable = false, length = 10) public Date getDataZawarcia() { return this.dataZawarcia; } public void setDataZawarcia(Date dataZawarcia) { this.dataZawarcia = dataZawarcia; } @Temporal(TemporalType.DATE) @Column(name = "data_od", nullable = false, length = 10) public Date getDataOd() { return this.dataOd; } public void setDataOd(Date dataOd) { this.dataOd = dataOd; } @Temporal(TemporalType.DATE) @Column(name = "data_do", nullable = false, length = 10) public Date getDataDo() { return this.dataDo; } public void setDataDo(Date dataDo) { this.dataDo = dataDo; } @Column(name = "ilosc_rat", nullable = false) public byte getIloscRat() { return this.iloscRat; } public void setIloscRat(byte iloscRat) { this.iloscRat = iloscRat; } @Temporal(TemporalType.TIMESTAMP) @Column(name = "wd", nullable = false, length = 19) public Date getWd() { return this.wd; } public void setWd(Date wd) { this.wd = wd; } @Column(name = "op", nullable = false, length = 30) public String getOp() { return this.op; } public void setOp(String op) { this.op = op; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "polisa") public Set<AgencjaWyplata> getAgencjaWyplatas() { return this.agencjaWyplatas; } public void setAgencjaWyplatas(Set<AgencjaWyplata> agencjaWyplatas) { this.agencjaWyplatas = agencjaWyplatas; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "polisa") public Set<PolisaRyzyko> getPolisaRyzykos() { return this.polisaRyzykos; } public void setPolisaRyzykos(Set<PolisaRyzyko> polisaRyzykos) { this.polisaRyzykos = polisaRyzykos; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "polisa") public Set<PolisaRaty> getPolisaRaties() { return this.polisaRaties; } public void setPolisaRaties(Set<PolisaRaty> polisaRaties) { this.polisaRaties = polisaRaties; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "polisa") public Set<PolisaOplacenie> getPolisaOplacenies() { return this.polisaOplacenies; } public void setPolisaOplacenies(Set<PolisaOplacenie> polisaOplacenies) { this.polisaOplacenies = polisaOplacenies; } }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.client.utils; import org.apache.hadoop.conf.Configuration; import org.apache.hudi.common.table.HoodieTableMetaClient; import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion; import org.apache.hudi.common.util.Option; import org.apache.hudi.config.HoodieWriteConfig; public class ClientUtils { /** * Create Consistency Aware MetaClient. * * @param hadoopConf Configuration * @param config HoodieWriteConfig * @param loadActiveTimelineOnLoad early loading of timeline */ public static HoodieTableMetaClient createMetaClient(Configuration hadoopConf, HoodieWriteConfig config, boolean loadActiveTimelineOnLoad) { return new HoodieTableMetaClient(hadoopConf, config.getBasePath(), loadActiveTimelineOnLoad, config.getConsistencyGuardConfig(), Option.of(new TimelineLayoutVersion(config.getTimelineLayoutVersion()))); } }
package Sorting; import java.util.Arrays; /** * * Q- https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/800/ * * A - https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/800/discuss/60294/Solution-explained * * Tags - Sorting, Array, Easy * @author vignesh * */ public class KthLargestElement { public int findKthLargest(int[] nums, int k) { final int N = nums.length; Arrays.sort(nums); return nums[N - k]; } }
package com.chiriyankandath.englishvowelssounds.manager; import android.app.Activity; import android.content.Context; import com.chiriyankandath.englishvowelssounds.util.SharedPreferenceHelper; /** * Created by puannjoy on 1/6/2016. */ public class ProfileManager { SharedPreferenceHelper sharedPreferenceHelper; public ProfileManager(Context context){ System.out.println("Punnya context in ProfileManager: "+ context); sharedPreferenceHelper = new SharedPreferenceHelper(context); } public boolean isProfileCreated(){ return sharedPreferenceHelper.getBooleanValue("status"); } public void setProfileData(CharSequence name, CharSequence age, int gender){ System.out.println("Punnya : name : " + name + " age: " + age + " gender: " + gender); sharedPreferenceHelper.saveString("name", name); sharedPreferenceHelper.saveString("age", age); sharedPreferenceHelper.saveIntValues("gender", gender); if(name != null || age != null) { sharedPreferenceHelper.saveBooleanValues("status", true); } } public void updateScore(int score){ sharedPreferenceHelper.saveIntValues("score", score); } public CharSequence getProfileName(){ return sharedPreferenceHelper.getStringValue("name"); } public CharSequence getProfileAge(){ return sharedPreferenceHelper.getStringValue("age"); } public int getProfileGender(){ return sharedPreferenceHelper.getIntValue("gender"); } public int getProfileTopScore(){ return sharedPreferenceHelper.getIntValue("score"); } }
package kr.pe.ssun.bark.database; /** * Created by x1210x on 2016. 7. 24.. */ public class User { public String name; public String email; public User() { } public User(String name, String email) { this.name = name; this.email = email; } }
/** * Class MyMath3 extends Homework3 * * @author C. Thurston * @version 5/7/2014 */ public class MyMath extends Homework { MyMath() { super(); } public void createAssignment(int pages) { setPagesRead(pages); setTypeHomework("Math"); } public String toString() { return getTypeHomework() + " - must read " + getPagesRead() + " pages."; } }
package com.service.leave.dao; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.stereotype.Repository; import com.service.leave.domain.Employee; import com.service.leave.domain.LeaveDetails; @Repository public class LeaveDaoImpl extends AbstractGenericDao<LeaveDetails> implements ILeaveDao { @SuppressWarnings("unchecked") public List<LeaveDetails> getLeaveDetailsByEmployee(long empId) { String hql = "FROM LeaveDetails where employee.empId = :empId order by appliedOn desc"; Map<String,Object> parameterMap = new HashMap<>(); parameterMap.put("empId",empId); return ( List<LeaveDetails>)queryForObject(hql, parameterMap); } @SuppressWarnings("unchecked") public List<LeaveDetails> getLeaveDetailsByManagerId(long managerEmpId) { String hql = "FROM LeaveDetails where employee.manager.empId = :empId order by appliedOn"; Map<String,Object> parameterMap = new HashMap<>(); parameterMap.put("empId",managerEmpId); return ( List<LeaveDetails>)queryForObject(hql, parameterMap); } @SuppressWarnings("rawtypes") public Employee getEmployeeDetail(long empId) { String hql = "FROM Employee e where empId = :empId"; Map<String,Object> parameterMap = new HashMap<>(); parameterMap.put("empId",empId); List results = queryForObject(hql, parameterMap); return results.size() > 0 ? (Employee)results.get(0) : new Employee(); } public void updateEmployeeLeaveBalance(double leaveBalance, long empId) { String hql = "update Employee set leaveBalance = :LEAVE_BALANCE where empId = :EMP_ID"; Map<String,Object> parameterMap = new HashMap<>(); parameterMap.put("LEAVE_BALANCE",leaveBalance); parameterMap.put("EMP_ID",empId); queryForInserUpdateDelete(hql, parameterMap); } }
package br.com.treinarminas.academico.classandobject; public class Principal { public static void main(String[] args) { Pessoa p = new Pessoa(); p = new Pessoa(); p.nome = "Maria Sophia"; p.idade = 6; p.sexo = 'F'; System.out.println(p.nome); Pessoa p1 = p; System.out.println(p1.idade); p.nome = "Larissa"; System.out.println(p1.nome); p = null; System.out.println(p1.sexo); p = new Pessoa(); } }
package com.he.jsbinding; import java.nio.ByteBuffer; public class JsObject { final int ctx_id; final int id; private final long vm; JsObject(long paramLong, int paramInt1, int paramInt2) { this.vm = paramLong; this.ctx_id = paramInt1; this.id = paramInt2; } public int arrayGetLength() { return JsEngine.getArrayLength(this.vm, this.ctx_id, this.id); } public final ByteBuffer asArrayBuffer() { return JsEngine.makeDirectBuffer(this.vm, this.ctx_id, this.id); } public final void call(int paramInt) { JsEngine.callObject(this.ctx_id, this.id, paramInt); } public final void callMethod(String paramString, int paramInt) { JsEngine.callObjectMethod(this.ctx_id, this.id, paramString, paramInt); } public final boolean getBoolean(int paramInt) { JsEngine.getArrayField(this.ctx_id, this.id, paramInt); return JsEngine.getBooleanResult(); } public final boolean getBoolean(String paramString) { JsEngine.getObjectProp(this.ctx_id, this.id, paramString); return JsEngine.getBooleanResult(); } public final JsEngine getEngine() { return new JsEngine(this.vm); } public final int getInt(int paramInt) { JsEngine.getArrayField(this.ctx_id, this.id, paramInt); return JsEngine.getIntResult(this.ctx_id); } public final int getInt(String paramString) { JsEngine.getObjectProp(this.ctx_id, this.id, paramString); return JsEngine.getIntResult(this.ctx_id); } public final double getNumber(int paramInt) { JsEngine.getArrayField(this.ctx_id, this.id, paramInt); return JsEngine.getNumberResult(this.ctx_id); } public final double getNumber(String paramString) { JsEngine.getObjectProp(this.ctx_id, this.id, paramString); return JsEngine.getNumberResult(this.ctx_id); } public final JsObject getObject(int paramInt) { JsEngine.getArrayField(this.ctx_id, this.id, paramInt); return (new JsScopedContext(this.vm, this.ctx_id)).popObject(); } public final JsObject getObject(String paramString) { JsEngine.getObjectProp(this.ctx_id, this.id, paramString); return (new JsScopedContext(this.vm, this.ctx_id)).popObject(); } public JsScopedContext getScopedContext() { return new JsScopedContext(this.vm, this.ctx_id); } public final String getString(int paramInt) { JsEngine.getArrayField(this.ctx_id, this.id, paramInt); return JsEngine.getStringResult(this.ctx_id); } public final String getString(String paramString) { JsEngine.getObjectProp(this.ctx_id, this.id, paramString); return JsEngine.getStringResult(this.ctx_id); } public final void release() { JsEngine.releaseObject(this.vm, this.ctx_id, this.id); } public final ByteBuffer serialize() { return JsEngine.serialize(this.vm, this.ctx_id, this.id); } public final void set(String paramString) { JsEngine.setObjectProp(this.ctx_id, this.id, paramString); } public final void set(String paramString, double paramDouble) { JsEngine.pushDouble(paramDouble); JsEngine.setObjectProp(this.ctx_id, this.id, paramString); } public final void set(String paramString, int paramInt) { JsEngine.pushInt(paramInt); JsEngine.setObjectProp(this.ctx_id, this.id, paramString); } public final void set(String paramString, JsObject paramJsObject) { JsEngine.pushObject(paramJsObject.ctx_id, paramJsObject.id); JsEngine.setObjectProp(this.ctx_id, this.id, paramString); } public final void set(String paramString1, String paramString2) { JsEngine.pushString(paramString2); JsEngine.setObjectProp(this.ctx_id, this.id, paramString1); } public final void set(String paramString, boolean paramBoolean) { JsEngine.pushBoolean(paramBoolean); JsEngine.setObjectProp(this.ctx_id, this.id, paramString); } public final void setNull(String paramString) { JsEngine.pushNull(); JsEngine.setObjectProp(this.ctx_id, this.id, paramString); } public final void setUndefined(String paramString) { JsEngine.pushUndefined(); JsEngine.setObjectProp(this.ctx_id, this.id, paramString); } public final String toJSON() { return JsEngine.toJSON(this.vm, this.ctx_id, this.id); } public String toString() { JsEngine.objectToString(this.ctx_id, this.id); return JsEngine.getStringResult(this.ctx_id); } } /* Location: C:\Users\august\Desktop\tik\df_miniapp\classes.jar!\com\he\jsbinding\JsObject.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
package com.tencent.mm.plugin.scanner.ui; import android.widget.TextView; class SelectScanModeGrid$a$a { public TextView lSz; public TextView mLP; SelectScanModeGrid$a$a() { } }
package algorithms.tasks; import org.junit.Rule; import org.junit.Test; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; import java.util.concurrent.ThreadLocalRandom; import java.util.stream.IntStream; import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.*; public class DutchNationalFlagTest { private ThreadLocalRandom random = ThreadLocalRandom.current(); @Rule public MockitoRule mrule = MockitoJUnit.rule(); private int[] createRandomItems(int size) { return IntStream.range(0, size) .mapToObj(i -> random.nextInt(3)).mapToInt(i -> i).toArray(); } @Test public void sort() throws Exception { int size = 100; int[] items = createRandomItems(size); DutchNationalFlag service = spy(new DutchNationalFlag(items)); service.sort(); int i = 0; while (i < size && items[i++] == 0) ; assertTrue(items[i] == 1); while (i < size && items[i++] == 1) ; assertTrue(items[i] == 2); while (i < size && items[i++] == 2) ; assertEquals(i, size); verify(service, atMost(size)).getColor(anyInt()); verify(service, atMost(size)).swap(anyInt(), anyInt()); } }
package com.healthiq.entities; import java.util.Date; /** * This is an input data in the format [time, type, id] * * Examples: * [07:00, "EXERCISE", 1] * [07:31, "FOOD", 1] * * @author Bakhy * */ public class Entry { public Date time; public String type; public Integer id; public Entry(Date time, String type, Integer id) { this.time = time; this.type = type; this.id = id; } public void setTime(Date time) { this.time = time; } public String getType() { return type; } public void setType(String type) { this.type = type; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } /** * @return minutes diff between BeginningOfDay and Entry time */ public Integer getTime(Date beginingOfDay) { if( beginingOfDay == null || time == null ) return 0; return (int)((time.getTime()/60000) - (beginingOfDay.getTime()/60000)); } public Date getTimestamp() { return time; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Entry [time="); builder.append(time); builder.append(", type="); builder.append(type); builder.append(", id="); builder.append(id); builder.append("]"); return builder.toString(); } }
package com.taikang.healthcare.cust; import java.util.HashMap; import java.util.Map; import javax.annotation.Resource; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.taikang.healthcare.cust.UserService; import com.taikang.healthcare.sdk.SecurityUtil; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations="classpath:conf/spring/applicationContext.xml") public class RegisterTest extends AbstractJUnit4SpringContextTests{ @Resource UserService userService; @Test public final void register(){ Map<String,Object> map=new HashMap<String,Object>(); map.put("mobile","18510083045"); map.put("password",SecurityUtil.MD5("gsuolong11")); map.put("nickname","gsuolong"); map.put("email","12735@qq.com"); map.put("image","sarw2"); map.put("message","1344"); map.put("session_message","1344"); map.put("session_image","sarw2"); Boolean bool= userService.getByIdType(map); if(bool==true){ System.out.println("注册成功"); }else{ System.out.println("注册失败"); } } @Test public final void login(){ Map<String,Object> map=new HashMap<String,Object>(); map.put("longinValue", "14310357013"); map.put("password", SecurityUtil.MD5("password")); Boolean bool=userService.passwordValidate(map); if(bool==true){ System.out.println("登录成功"); }else{ System.out.println("登录失败"); } } @Test public final void identityVarify(){ Map<String,Object> map=new HashMap<String,Object>(); map.put("id",25); map.put("password", SecurityUtil.MD5("password")); map.put("image","12324"); map.put("session_image","12324"); Boolean bool=userService.identityVarify(map); if(bool==true){ System.out.println("验证身份成功"); }else{ System.out.println("验证身份失败"); } } @Test public final void alterPassword(){ Map<String,Object> map=new HashMap<String,Object>(); map.put("id",26); map.put("password",SecurityUtil.MD5("password111")); map.put("image","32546"); map.put("session_image","32546"); Boolean bool=userService.alterPassword(map); if(bool==true){ System.out.println("修改密码成功"); }else{ System.out.println("修改密码失败"); } } @Test public final void userIdentity(){ Map<String,Object> map=new HashMap<String,Object>(); map.put("loginValue","14310357013"); map.put("image","sadgh"); map.put("session_image","sadgh"); Map<String,Object> resultmap=userService.searchUser(map); if(resultmap!=null){ System.out.println("验证用户名成功"); }else{ System.out.println("验证用户名失败"); } } @Test public final void submit(){ String message="asrewet"; if(message.equals("asrewet")){ System.out.println("手机验证码提交成功"); }else{ System.out.println("手机验证码提交失败"); } } @Test public final void reset(){ Map<String,Object> map=new HashMap<String,Object>(); String password1="password"; String password2="password"; if(password1==password2){ map.put("password", SecurityUtil.MD5(password1)); map.put("id", 40); Boolean bool=userService.alterPassword(map); if(bool==true){ System.out.println("重置密码成功"); }else{ System.out.println("重置密码失败"); } }else{ System.out.println("输入两次密码不相同"); } } }
import javax.swing.*; public interface MainForm { JPanel getContent(); JButton getButton(); JTextField [] getTextFields(); }
package com.ireslab.sendx.electra.service; import com.ireslab.sendx.electra.model.ClientAssetMgmtRequest; /** * @author iRESlab * */ public interface ClientAssetMgmtService { public void createAccountOnStellar(ClientAssetMgmtRequest clientAssetMgmtRequest); }
// Authors: Mika, Thomas, Mason, Sohan package org.team3128.compbot.autonomous; import edu.wpi.first.wpilibj.command.CommandGroup; import org.team3128.common.utility.math.Pose2D; import org.team3128.common.utility.math.Rotation2D; import org.team3128.common.drive.Drive; import org.team3128.common.hardware.gyroscope.Gyro; import org.team3128.common.hardware.limelight.Limelight; import org.team3128.common.drive.DriveCommandRunning; import org.team3128.compbot.autonomous.*; import org.team3128.compbot.commands.*; import org.team3128.compbot.subsystems.Constants.VisionConstants; import org.team3128.compbot.subsystems.*; import com.kauailabs.navx.frc.AHRS; public class AutoDevour extends CommandGroup { public AutoDevour(FalconDrive drive, Shooter shooter, Arm arm, Hopper hopper, AHRS ahrs, Limelight limelight, DriveCommandRunning cmdRunning, double timeoutMs) { addSequential(new CmdAlignShoot(drive, shooter, arm, hopper, ahrs, limelight, cmdRunning, Constants.VisionConstants.TX_OFFSET, 3)); for (int i = 0; i < 3; i++) { // picking up three balls addSequential(new CmdIntake(hopper, arm)); } addSequential(new CmdAlignShoot(drive, shooter, arm, hopper, ahrs, limelight, cmdRunning, Constants.VisionConstants.TX_OFFSET, 3)); addSequential(new CmdAutoTrajectory(drive, 120, 0.5, 10000, new Pose2D(0, 0, Rotation2D.fromDegrees(0)), new Pose2D(-12 * Constants.MechanismConstants.inchesToMeters, -12 * Constants.MechanismConstants.inchesToMeters, Rotation2D.fromDegrees(0)), new Pose2D(12 * Constants.MechanismConstants.inchesToMeters, 12 * Constants.MechanismConstants.inchesToMeters, Rotation2D.fromDegrees(0)))); // if enough time run AutoRendezvous } }
package micro.catalogos.services; import java.util.concurrent.TimeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import dto.main.Respuesta; import micro.catalogos.interfaces.ITimeUnitsService; import utils._config.language.Translator; @Service public class TimeUnitsService implements ITimeUnitsService { Logger logger = LoggerFactory.getLogger(this.getClass()); @Override public Respuesta<String[]> listAll() { String[] timeUnits = new String[4]; timeUnits[0] = TimeUnit.DAYS.name(); timeUnits[1] = TimeUnit.HOURS.name(); timeUnits[2] = TimeUnit.MINUTES.name(); timeUnits[3] = TimeUnit.SECONDS.name(); return new Respuesta<String[]>(200, timeUnits, Translator.toLocale("catalogos.timeunitsservice.listAll")); } }
package com.tencent.mm.pluginsdk.ui; import android.text.Editable; import android.text.TextWatcher; import com.tencent.mm.sdk.platformtools.bi; class MMPhoneNumberEditText$2 implements TextWatcher { final /* synthetic */ MMPhoneNumberEditText qFR; MMPhoneNumberEditText$2(MMPhoneNumberEditText mMPhoneNumberEditText) { this.qFR = mMPhoneNumberEditText; } public final void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MMPhoneNumberEditText.c(this.qFR); if (!charSequence.toString().equals("") || MMPhoneNumberEditText.d(this.qFR)) { if (charSequence.toString().equals("") || !MMPhoneNumberEditText.d(this.qFR)) { if (MMPhoneNumberEditText.b(this.qFR) != null && this.qFR.isFocused()) { MMPhoneNumberEditText.b(this.qFR).cdm(); } } else if (MMPhoneNumberEditText.b(this.qFR) != null && this.qFR.isFocused()) { MMPhoneNumberEditText.b(this.qFR).cdl(); } } else if (MMPhoneNumberEditText.b(this.qFR) != null && this.qFR.isFocused()) { MMPhoneNumberEditText.b(this.qFR).g(this.qFR); } } public final void afterTextChanged(Editable editable) { } public final void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { if (bi.oW(charSequence.toString())) { MMPhoneNumberEditText.a(this.qFR, true); } else { MMPhoneNumberEditText.a(this.qFR, false); } } }
package com.example.l03.projektpaszport; import android.app.DatePickerDialog; import android.app.Dialog; import android.app.DialogFragment; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Build; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.DatePicker; import android.widget.EditText; import android.widget.ImageView; import android.widget.Spinner; import android.widget.TextView; import java.util.ArrayList; import java.util.Calendar; /** * Created by Tomek on 2016-11-17. */ public class EdytujLekarstwoActivity extends AppCompatActivity { private Button bEdytujLekarstwo; private Button bZdjecie; private EditText etGodzina; private EditText etIlosc; private EditText etSposobZazycia; private ImageView ivZdjecie; private String sciezka; private DatabaseHelper db; Lekarstwo lekarstwo; @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { finish(); return true; } return super.onKeyDown(keyCode, event); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); Zdjecie zdjecie = new Zdjecie(); sciezka = zdjecie.getObrazekURI(requestCode,resultCode,data,getApplicationContext()); if(sciezka == null) { sciezka=""; Bitmap bitmap = BitmapFactory.decodeFile(sciezka); ivZdjecie.setImageBitmap(bitmap); }else{ Log.e("sciezka", sciezka); Bitmap bitmap = BitmapFactory.decodeFile(sciezka); ivZdjecie.setImageBitmap(bitmap); } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_edytuj_lekarstwo); bEdytujLekarstwo= (Button) findViewById(R.id.bEdytujLekarstwo); bZdjecie = (Button) findViewById(R.id.bZdjecie); etGodzina = (EditText) findViewById(R.id.etGodzina); etIlosc = (EditText) findViewById(R.id.etIlosc); etSposobZazycia = (EditText) findViewById(R.id.etSposobZazycia); ivZdjecie = (ImageView) findViewById(R.id.ivZdjecie); db = new DatabaseHelper(getApplicationContext()); Intent intent = getIntent(); lekarstwo = (Lekarstwo) intent.getSerializableExtra("lekarstwo"); sciezka = lekarstwo.getZdjecie(); Bitmap bitmap = BitmapFactory.decodeFile(lekarstwo.getZdjecie()); ivZdjecie.setImageBitmap(bitmap); etIlosc.setText(lekarstwo.getIlosc()); etGodzina.setText(lekarstwo.getGodzina()); etSposobZazycia.setText(lekarstwo.getSposob_zazycia()); bZdjecie.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (Build.VERSION.SDK_INT <= 19) { Intent i = new Intent(); i.setType("image/*"); i.setAction(Intent.ACTION_GET_CONTENT); i.addCategory(Intent.CATEGORY_OPENABLE); startActivityForResult(i, 10); } else if (Build.VERSION.SDK_INT > 19) { Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(intent, 10); } } }); bEdytujLekarstwo.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(etSposobZazycia.getText().length()>0 && etGodzina.getText().length()>0 && etIlosc.getText().length()>0) { lekarstwo.setZdjecie(sciezka); lekarstwo.setGodzina(etGodzina.getText().toString()); lekarstwo.setIlosc(etIlosc.getText().toString()); lekarstwo.setSposob_zazycia(etSposobZazycia.getText().toString()); db.updateLekarstwo(lekarstwo); finish(); } } }); } }
/* * FileName: SimpleEditMethodService.java * Description: * Company: 南宁超创信息工程有限公司 * Copyright: ChaoChuang (c) 2005 * History: 2005-12-7 (guig) 1.0 Create */ package com.spower.basesystem.common.service.spring; import java.io.Serializable; import java.util.Iterator; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import org.springframework.beans.factory.InitializingBean; import org.springframework.util.StringUtils; import com.spower.basesystem.common.command.BaseCommandInfo; import com.spower.basesystem.common.defaultvalue.IDefaultValueService; import com.spower.basesystem.common.service.IEditMethodService; import com.spower.basesystem.common.service.dao.ICommonDao; import com.spower.basesystem.propertyeditor.support.AbstractPropertyEditorBind; import com.spower.utils.ClassHelper; /** * @author guig * @version 1.0 2005-12-7 */ public class SimpleEditMethodService extends SimpleCommonService implements IEditMethodService, InitializingBean { /** * 公用数据访问Dao */ private ICommonDao commonDao; /** * 从command复制属性到对象时,不用复制的对象的属性的名称表,多各属性名称之间用逗号分隔。 */ private String ignoreProperties; /** 数据对象的类名 */ private String valueObjectClassName; /** 数据对象的id属性的类名 */ private String idClassName; /** 数据对象的id属性的属性名 */ private String idPropertyName; /** 生成新的编辑的值对象赋缺省值的Map,Map中的"key=value"可以是"propertyName=字符串值"或者"propertyName=IDefaultValueService接口对象" */ private Map newDefaultValueMap; /** 保存编辑的值对象赋缺省值的Map,Map中的"key=value"可以是"propertyName=字符串值"或者"propertyName=IDefaultValueService接口对象" */ private Map saveDefaultValueMap; //以下的属性不输出,在类内使用 /** * 由ignoreProperties分解得到的数组 */ private String[] ignorePropertiesArray; /** 值对象的属性类 */ private Class valueObjectClass; /** 数据对象的id属性的类 */ private Class idClass; /** (non Javadoc) * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ public void afterPropertiesSet() throws Exception { valueObjectClass = ClassHelper.forName(this.valueObjectClassName); idClass = ClassHelper.forName(this.idClassName); ignorePropertiesArray = StringUtils.commaDelimitedListToStringArray(ignoreProperties); if (null != ignorePropertiesArray && ignorePropertiesArray.length == 0) { ignorePropertiesArray = null; } } /** * 根据defaultValueMap的内容,给object的属性设置缺省值 * @param request web上下文 * @param object 要设置值的对象 */ private void setDefaultValue(HttpServletRequest request, Object object, Map defaultValueMap) { if (defaultValueMap != null) { if (valueObjectClass.isInstance(object)) { BeanWrapper wrapper = new BeanWrapperImpl(object); try { AbstractPropertyEditorBind.initBinder(request, wrapper); } catch (Exception e) { throw new RuntimeException("初始化BeanWrapper属性编辑器失败!", e); } for (Iterator iter = defaultValueMap.entrySet().iterator(); iter.hasNext();) { Map.Entry element = (Map.Entry) iter.next(); if (String.class.isInstance(element.getValue())) { wrapper.setPropertyValue((String) element.getKey(), element.getValue()); } else if (IDefaultValueService.class.isInstance(element.getValue())) { ((IDefaultValueService) element.getValue()).setDefaultValue(request, wrapper, (String) element.getKey()); } } } else { throw new RuntimeException("object's class must be " + valueObjectClass.getName() + " but now is " + object.getClass().getName()); } } } /** (non Javadoc) * @see com.spower.basesystem.common.service.IEditMethodService#saveEditedObject(javax.servlet.http.HttpServletRequest, com.spower.basesystem.common.command.BaseCommandInfo) */ public Object saveEditedObject(HttpServletRequest request, BaseCommandInfo info) { Object obj = null; BeanWrapper commandWrapper = new BeanWrapperImpl(info); Serializable id = (Serializable) commandWrapper.getPropertyValue(this.idPropertyName); if (null == id) { //新增 try { obj = ClassHelper.newInstance(valueObjectClass); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } else { //修改 obj = this.commonDao.load(valueObjectClass, id); } BeanUtils.copyProperties(info, obj, ignorePropertiesArray); setDefaultValue(request, obj, this.saveDefaultValueMap); this.commonDao.save(obj); return obj; } /** (non Javadoc) * @see com.spower.basesystem.common.service.IEditMethodService#selectEditedObjectById(java.lang.String) */ public Object selectEditedObjectById(String id) { return this.commonDao.load(valueObjectClass, (Serializable) ClassHelper.simpleNewInstance(this.idClass, id)); } /** (non Javadoc) * @see com.spower.basesystem.common.service.IEditMethodService#getNullEditedObject(javax.servlet.http.HttpServletRequest) */ public Object getNullEditedObject(HttpServletRequest request) { try { Object obj = ClassHelper.newInstance(valueObjectClass); setDefaultValue(request, obj, this.newDefaultValueMap); return obj; } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } /** (non Javadoc) * @see com.spower.basesystem.common.service.IEditMethodService#getModelDataById(java.lang.String, java.lang.String) */ public Object getModelDataById(String modelName, String id) { // TODO 自动生成方法存根 return null; } /** * @return 返回 commonDao。 */ public ICommonDao getCommonDao() { return commonDao; } /** * @param commonDao 要设置的 commonDao。 */ public void setCommonDao(ICommonDao commonDao) { this.commonDao = commonDao; } /** * @return 返回 ignoreProperties。 */ public String getIgnoreProperties() { return ignoreProperties; } /** * @param ignoreProperties 要设置的 ignoreProperties。 */ public void setIgnoreProperties(String ignoreProperties) { this.ignoreProperties = ignoreProperties; } /** * @return 返回 valueObjectClassName。 */ public String getValueObjectClassName() { return valueObjectClassName; } /** * @param valueObjectClassName 要设置的 valueObjectClassName。 */ public void setValueObjectClassName(String valueObjectClassName) { this.valueObjectClassName = valueObjectClassName; } /** * @return 返回 idClassName。 */ public String getIdClassName() { return idClassName; } /** * @param idClassName 要设置的 idClassName。 */ public void setIdClassName(String idClassName) { this.idClassName = idClassName; } /** * @return 返回 idPropertyName。 */ public String getIdPropertyName() { return idPropertyName; } /** * @param idPropertyName 要设置的 idPropertyName。 */ public void setIdPropertyName(String idPropertyName) { this.idPropertyName = idPropertyName; } /** * @return 返回 idClass。 */ public Class getIdClass() { return idClass; } /** * @return 返回 ignorePropertiesArray。 */ public String[] getIgnorePropertiesArray() { return ignorePropertiesArray; } /** * @return 返回 valueObjectClass。 */ public Class getValueObjectClass() { return valueObjectClass; } /** * @return 返回 defaultValueMap。 */ public Map getNewDefaultValueMap() { return newDefaultValueMap; } /** * @param defaultValueMap 要设置的 defaultValueMap。 */ public void setNewDefaultValueMap(Map nullDefaultValueMap) { this.newDefaultValueMap = nullDefaultValueMap; } /** * @return 返回 saveDefaultValueMap。 */ public Map getSaveDefaultValueMap() { return saveDefaultValueMap; } /** * @param saveDefaultValueMap 要设置的 saveDefaultValueMap。 */ public void setSaveDefaultValueMap(Map saveDefaultValueMap) { this.saveDefaultValueMap = saveDefaultValueMap; } }
package Chapter7; public class CastingTest2 { public static void main(String args[]) { //Car car = new Car(); Car car = new FireEngine(); //이와 같이 변경하면 에러가 발생하지 않는다. Car car2 = null; FireEngine fe = null; car.drvie(); //fe = (FireEngine)car; //< error ! 참조변수 car가 참조하고 있는 인스턴스가 Car타입의 인스턴스인 것이 문제. //조상타입의 인스턴스를 자손타입의 참조변수로 참조하는 것은 허용되지 않는다. //fe.drvie(); car2 = fe; //조상타입 <- 자손타입 :: 형변환 생략 가능 //car2.drvie(); <여기서는 왜 에러가 나는거지 ,, ,,? } }
package com.elasticsearch.synchronization.synchronization.service.impl; import com.elasticsearch.synchronization.synchronization.model.User; import com.elasticsearch.synchronization.synchronization.model.dto.UserDTO; import com.elasticsearch.synchronization.synchronization.repo.IUserDAO; import com.elasticsearch.synchronization.synchronization.service.IUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; import java.util.List; @Component public class UserService implements IUserService { private final IUserDAO userDAO; private final UserMapper userMapper; public UserService(IUserDAO userDAO, UserMapper userMapper) { this.userDAO = userDAO; this.userMapper = userMapper; } @Override public UserDTO save(UserDTO userDTO) { User user = this.userDAO.save(this.userMapper.toUser(userDTO)); return this.userMapper.toUserDTO(user); } @Override public UserDTO findById(Long id) { return this.userMapper.toUserDTO(this.userDAO.findById(id).orElse(null)); } @Override public List<UserDTO> findAll() { return this.userMapper.toUserDtos(this.userDAO.findAll()); } }
/** * The WaveGameRevisit program implements an application that * presents the user with a game of "dodge the bullets and enemies' * like nature. The objective is to reach as high a score as possible. * * @author Aaron Gore * @version 1.0 * @since 2019-06-02 */ package wavegamerevisit; import java.awt.image.BufferedImage; /** * SpriteSheet gets and provides the spirtesheet for the game to use * @author Aaron Gore * @since 2019-06-01 */ public class SpriteSheet { private BufferedImage sprite; /** * Constructor for SpriteSheet * @param ss, BufferedImage, image for the sprite sheet to be loaded to */ public SpriteSheet(BufferedImage ss) { this.sprite = ss; } /** * Gets a particular image from the coordinates provided, from the spritesheet * @param col, int, the vertical section of the sprite sheet the image is wanted from * @param row, int, the horizontal section of the sprite sheet the image is wanted from * @param width, int, the horizontal size of the sprite sheet area selected wanted * @param height, int, the vertical size of the sprite sheet area selected wanted */ public BufferedImage grabImage(int col, int row, int width, int height) { //Gets image from sprite sheet and places as a new image BufferedImage img = sprite.getSubimage((row * 32) - 32, (col * 32) - 32, width, height); return img; } }
package com.tt.miniapp.launchcache.meta; import android.content.Context; import android.text.TextUtils; import android.util.Log; import com.storage.async.Action; import com.storage.async.Scheduler; import com.tt.miniapp.launchcache.RequestType; import com.tt.miniapp.thread.ThreadUtil; import com.tt.miniapphost.AppBrandLogger; import d.f.b.g; import d.f.b.l; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.json.JSONObject; public abstract class BaseBatchMetaRequester { public static final Companion Companion = new Companion(null); private final Context mContext; private final RequestType mRequestType; public BaseBatchMetaRequester(Context paramContext, RequestType paramRequestType) { this.mContext = paramContext; this.mRequestType = paramRequestType; } public final List<RequestResultInfo> adaptResult(BatchMetaRequestResult paramBatchMetaRequestResult) { ArrayList<RequestResultInfo> arrayList = new ArrayList(); for (String str : paramBatchMetaRequestResult.originDataList) { JSONObject jSONObject = new JSONObject(); jSONObject.put("data", new JSONObject(str)); jSONObject.put("error", 0); RequestResultInfo requestResultInfo = new RequestResultInfo(); if (AppInfoHelper.parseAppInfo(jSONObject.toString(), paramBatchMetaRequestResult.encryKey, paramBatchMetaRequestResult.encryIV, paramBatchMetaRequestResult.url, this.mRequestType, requestResultInfo) && requestResultInfo.appInfo != null) requestResultInfo.appInfo.getFromType = 0; arrayList.add(requestResultInfo); } return arrayList; } protected final Context getMContext() { return this.mContext; } protected final RequestType getMRequestType() { return this.mRequestType; } protected BatchMetaRequestResult onRequestSync(Collection<String> paramCollection) { l.b(paramCollection, "appIdList"); AppBrandLogger.i("BaseBatchMetaRequester", new Object[] { this.mRequestType, "onRequestSync" }); BatchMetaRequestResult batchMetaRequestResult = AppInfoHelper.requestBatchMeta(this.mContext, paramCollection, this.mRequestType); l.a(batchMetaRequestResult, "AppInfoHelper.requestBat… appIdList, mRequestType)"); return batchMetaRequestResult; } public abstract void onSaveMetaList(List<? extends RequestResultInfo> paramList); public final void request(Collection<String> paramCollection, Scheduler paramScheduler, AppInfoBatchRequestListener paramAppInfoBatchRequestListener) { l.b(paramScheduler, "scheduler"); l.b(paramAppInfoBatchRequestListener, "listener"); AppBrandLogger.i("BaseBatchMetaRequester", new Object[] { this.mRequestType, "request" }); ThreadUtil.runOnWorkThread(new BaseBatchMetaRequester$request$1(paramCollection, paramAppInfoBatchRequestListener), paramScheduler); } public static final class Companion { private Companion() {} } static final class BaseBatchMetaRequester$request$1 implements Action { BaseBatchMetaRequester$request$1(Collection param1Collection, AppInfoBatchRequestListener param1AppInfoBatchRequestListener) {} public final void act() { Collection collection = this.$appIdList; if (collection == null || collection.isEmpty()) { AppInfoBatchRequestListener appInfoBatchRequestListener = this.$listener; StringBuilder stringBuilder = new StringBuilder("appIdList is null or empty: "); stringBuilder.append(this.$appIdList); appInfoBatchRequestListener.requestBatchAppInfoFail(stringBuilder.toString()); return; } try { String str; BatchMetaRequestResult batchMetaRequestResult = BaseBatchMetaRequester.this.onRequestSync(this.$appIdList); if (batchMetaRequestResult.originDataList == null || batchMetaRequestResult.originDataList.isEmpty()) { if (!TextUtils.isEmpty(batchMetaRequestResult.errorMsg)) { AppInfoBatchRequestListener appInfoBatchRequestListener1 = this.$listener; str = batchMetaRequestResult.errorMsg; l.a(str, "batchResult.errorMsg"); appInfoBatchRequestListener1.requestBatchAppInfoFail(str); return; } AppInfoBatchRequestListener appInfoBatchRequestListener = this.$listener; StringBuilder stringBuilder = new StringBuilder("requestSync return null or empty: "); stringBuilder.append(((BatchMetaRequestResult)str).originDataList); appInfoBatchRequestListener.requestBatchAppInfoFail(stringBuilder.toString()); return; } List<RequestResultInfo> list = BaseBatchMetaRequester.this.adaptResult((BatchMetaRequestResult)str); BaseBatchMetaRequester.this.onSaveMetaList(list); if ((list.isEmpty() ^ true) != 0) { this.$listener.requestBatchAppInfoSuccess(list); return; } this.$listener.requestBatchAppInfoFail("adaptResult return empty."); return; } catch (Exception exception) { AppInfoBatchRequestListener appInfoBatchRequestListener = this.$listener; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(exception.getMessage()); stringBuilder.append('\n'); stringBuilder.append(Log.getStackTraceString(exception)); appInfoBatchRequestListener.requestBatchAppInfoFail(stringBuilder.toString()); return; } } } } /* Location: C:\Users\august\Desktop\tik\df_miniapp\classes.jar!\com\tt\miniapp\launchcache\meta\BaseBatchMetaRequester.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
package org.timesheet.web; import java.text.SimpleDateFormat; import java.util.Date; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.RememberMeAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.util.StringUtils; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.ModelAttribute; 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.servlet.ModelAndView; import org.timesheet.domain.User; import org.timesheet.forms.LoginForm; import org.timesheet.forms.SignupForm; import org.timesheet.security.MD5; import org.timesheet.service.dao.UserDao; /** * Controller for handling login, registration and others. */ @Controller @RequestMapping("/site") public class SiteController { static final Logger logger = Logger.getLogger(SiteController.class); private UserDao userDao; @Autowired public void setUserDao(UserDao userDao) { this.userDao = userDao; } public UserDao getUserDao() { return userDao; } /** * This is main page * */ // http://localhost:8083/timesheet/site/home @RequestMapping(value = { "/", "/home**" }, method = RequestMethod.GET) public String Home(Model model) { model.addAttribute("view", "site/home"); return "layout/content"; } // ========================== CREATE USER ======================================= @ModelAttribute("userCreate") public SignupForm createEmployeeForm() { return new SignupForm(); } /** * Creates form for new user * * @param model Model to bind to HTML form */ // http://localhost:8083/timesheet/site/signup @RequestMapping(value = "signup", params = "new", method = RequestMethod.GET) public String createUserForm(Model model) { model.addAttribute("view", "site/signup_get"); return "layout/content"; } /** * Saves new user to the database * * @param user User to save * @return redirects to login */ // http://localhost:8083/site/signup @RequestMapping(value = "signup", method = RequestMethod.POST) public String addUser(@ModelAttribute("userCreate") @Validated SignupForm signupForm, BindingResult bindingResult, Model model) { logger.info("=== SiteController === method:addUser --- start"); if (bindingResult.hasErrors()) { // when button "Signup" has been clicked model.addAttribute("try_signup", "signup"); // see file content.jsp model.addAttribute("view", "site/signup_post"); return "layout/content"; } User user = new User(signupForm.getUsername()); user.setEmail(signupForm.getEmail()); user.setPassword_hash(MD5.get_MD5_SecurePassword(signupForm.getPassword())); // not email approved user.setStatus(0); user.setPassword_reset_token("1"); Date date = new Date(); // convert milliseconds to seconds int currTime_sec = (int) (date.getTime() / 1000L); user.setCreated_at(currTime_sec); user.setUpdated_at(currTime_sec); userDao.add(user); logger.info("=== SiteController === method:addUser --- end"); return "redirect:/site/login"; } private int getDateTime(int unixSeconds) { // convert seconds to milliseconds Date date = new Date(unixSeconds * 1000L); // the format of your date SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss z"); // give a timezone reference for formatting (see comment at the bottom) sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+3")); String formattedDate = sdf.format(date); int d = Integer.parseInt(formattedDate); return d; } // =========================== LOGIN ======================================= @ModelAttribute("userLogin") public LoginForm createLoginForm() { return new LoginForm(); } /** * This is login * */ // http://localhost:8083/timesheet/site/login @RequestMapping(value = "login", method = RequestMethod.GET) public String createLoginForm(Model model) { model.addAttribute("view", "site/login_get"); return "layout/content"; } /** * Try login user * * @param user User to login */ // http://localhost:8083/site/login @RequestMapping(value = "login", method = RequestMethod.POST) public String login(@ModelAttribute("userLogin") @Validated LoginForm loginForm, BindingResult bindingResult, Model model) { logger.info("=== SiteController === method:login --- start"); // when button "Login" has been clicked model.addAttribute("try_login", "login"); if (bindingResult.hasErrors()) { // see file content.jsp model.addAttribute("view", "site/login_post"); return "layout/content"; } String password = loginForm.getPassword(); String username = loginForm.getUsername(); User user = new User(); user.setUsername(username); user.setPassword_hash(MD5.get_MD5_SecurePassword(password)); boolean login = userDao.tryLogin(user); if (login) { logger.info("=== SiteController === method:login --- end"); // when button "Login" has been clicked model.addAttribute("user", "user_exists"); // user model.addAttribute("username", username); return "redirect:/site/home"; } else { logger.info("=== SiteController === method:login --- end"); // when button "Login" has been clicked model.addAttribute("user", "user_not_exists"); // see file content.jsp model.addAttribute("view", "site/login_post"); return "layout/content"; } } /** * both "normal login" and "login for update" shared this form. * */ // http://localhost:8083/spring-security-remember-me/login // @RequestMapping(value = "/login", method = RequestMethod.GET) // public ModelAndView login(@RequestParam(value = "error", required = false) String error, // @RequestParam(value = "logout", required = false) String logout, // HttpServletRequest request) { // // ModelAndView model = new ModelAndView(); // if (error != null) { // model.addObject("error", "Invalid username and password!"); // // //login form for update, if login error, get the targetUrl from session again. // String targetUrl = getRememberMeTargetUrlFromSession(request); // System.out.println(targetUrl); // if (StringUtils.hasText(targetUrl)) { // model.addObject("targetUrl", targetUrl); // model.addObject("loginUpdate", true); // } // // } // // if (logout != null) { // model.addObject("msg", "You've been logged out successfully."); // } // model.setViewName("login"); // // return model; // // } // // /** // * If the login in from remember me cookie, refer // * org.springframework.security.authentication.AuthenticationTrustResolverImpl // */ private boolean isRememberMeAuthenticated() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (authentication == null) { return false; } return RememberMeAuthenticationToken.class.isAssignableFrom(authentication.getClass()); } /** * save targetURL in session */ private void setRememberMeTargetUrlToSession(HttpServletRequest request) { HttpSession session = request.getSession(false); if (session != null) { session.setAttribute("targetUrl", "/admin/update"); } } /** * get targetURL from session */ private String getRememberMeTargetUrlFromSession(HttpServletRequest request) { String targetUrl = ""; HttpSession session = request.getSession(false); if (session != null) { targetUrl = session.getAttribute("targetUrl") == null ? "" : session.getAttribute("targetUrl").toString(); } return targetUrl; } }
package com.sula.util; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.UUID; /** * 短信 * @author Administrator * */ public class SmsUtil { //执行发送 public static void exece(String mobile, String content) { // 短信网关发送 Map<String, String> rep = new HashMap<String, String>(); rep.put("username", Status.username); rep.put("password", Status.pwd); rep.put("mobile", mobile); rep.put("content", content); //rep.put("needstatus", "true"); // 开始发送 String code = HttpClientUtil.sendPostRequest(Status.smsUrl, rep); //String code ="CLOSE~"; //发送记录写入到日志表中去 System.out.println("发送后收到的回应代码为:" + code); } public static void main(String[] args){ SmsUtil.exece("18538083321", "你好,我是短信小助手【速拉】"); } }
/* * 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 halloween.game.jam; import entity.PlayerData; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import javax.swing.JButton; import javax.swing.JPanel; import map.BasicMap; import map.Map; import map.Map1; import map.Map2; import map.Tutorial0; import map.Tutorial1; import map.Tutorial2; import map.Tutorial3; import map.Tutorial4; /** * * @author Spencer Pelton */ public class LevelPicker extends JPanel { public LevelPicker() { ArrayList<JButton> maps = new ArrayList<>(); maps.add(new JButton("Tutorial1")); maps.add(new JButton("Tutorial2")); maps.add(new JButton("Tutorial3")); maps.add(new JButton("Tutorial4")); maps.add(new JButton("Tutorial5")); maps.add(new JButton("Map 1")); maps.add(new JButton("Map 2")); maps.add(new JButton("Testing")); for (int i = 0; i < maps.size(); i ++) { maps.get(i).addActionListener(createListener(maps.get(i).getText())); add(maps.get(i)); } // JButton testBtn = new JButton("Hello World"); // testBtn.addActionListener(new ActionListener() { // @Override // public void actionPerformed(ActionEvent e) { // System.exit(0); // } // }); // // add(testBtn); } public ActionListener createListener(String mapName) { return new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { launchMap(mapName); } }; } public void launchMap(String mapName) { PlayerData.run = false; Map map = new BasicMap(MainFrame.GAME_WIDTH, MainFrame.GAME_HEIGHT); switch (mapName) { case "Tutorial1": map = new Tutorial0(MainFrame.GAME_WIDTH, MainFrame.GAME_HEIGHT); break; case "Tutorial2": map = new Tutorial1(MainFrame.GAME_WIDTH, MainFrame.GAME_HEIGHT); break; case "Tutorial3": map = new Tutorial2(MainFrame.GAME_WIDTH, MainFrame.GAME_HEIGHT); break; case "Tutorial4": map = new Tutorial3(); break; case "Tutorial5": map = new Tutorial4(); break; case "Map 1": map = new Map1(); break; case "Map 2": map = new Map2(); break; case "Testing": map = new BasicMap(MainFrame.GAME_WIDTH, MainFrame.GAME_HEIGHT); break; } PlayerData.run = true; MainFrame.switchPanel(new GamePanel(map)); } public static void launchMap(Map map) { PlayerData.run = false; PlayerData.run = true; MainFrame.switchPanel(new GamePanel(map)); } }
class Maca extends Produto { public Maca() { super(1.10,"Maçã"); } @Override public double getPreco() { return this.getPrecoUnitario()*this.getQtde(); } }
package com.perfectorial.entity; import java.io.Serializable; /** * @author Reza Safarpour (rsafarpour1991@gmail.com) on 9/11/2015 */ public interface Entity extends Serializable { String getId(); void setId(String id); }
/* * Copyright (c) 2014 Anthony Benavente * * 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.ambenavente.origins.util; import org.newdawn.slick.geom.Rectangle; import org.newdawn.slick.geom.Vector2f; /** * Represents a camera that is used for navigating the game world * * @author Anthony Benavente * @version 2/9/14 */ public class Camera { /** * The position of the camera on the screen */ private Vector2f pos; /** * The maximum point that the position can be */ private Vector2f max; /** * The minimum point that the position can be */ private Vector2f min; /** * The width of the camera's view area */ private int viewWidth; /** * The height of the camera's view area */ private int viewHeight; /** * The rectangular bounding area of the camera */ private Rectangle bounds; /** * The zoom setting that the camera sees */ private float zoom = 1.0f; /** * Creates a default camera with a position at (0,0), * a width of 0, and a height of 0 */ public Camera() { this(0, 0, 0, 0); } /** * Creates a camera with a position at (0, 0) and a * specified width and height * * @param viewWidth The width of the camera's viewing area in pixels * @param viewHeight The height of the camera's viewing area in pixels */ public Camera(int viewWidth, int viewHeight) { this(0, 0, viewWidth, viewHeight); } /** * Creates a camera with a specified x coordinate, * y coordinate, width of the viewing area, and * height of the viewing area * * @param x The x position of the camera * @param y The y position of the camera * @param viewWidth The width of the camera's viewing area in pixels * @param viewHeight The height of the camera's viewing area in pixels */ public Camera(float x, float y, int viewWidth, int viewHeight) { this(new Vector2f(x, y), viewWidth, viewHeight); } /** * Creates a camera with a specified vector position, * width of the viewing area, and height of the viewing * area * * @param pos The position of the camera * @param viewWidth The width of the camera's viewing area in pixels * @param viewHeight The height of the camera's viewing area in pixels */ public Camera(Vector2f pos, int viewWidth, int viewHeight) { this.pos = pos; this.viewWidth = viewWidth; this.viewHeight = viewHeight; this.max = new Vector2f(Float.MAX_VALUE, Float.MAX_VALUE); this.min = new Vector2f(-Float.MAX_VALUE - 1, -Float.MAX_VALUE - 1); this.bounds = new Rectangle(pos.x, pos.y, viewWidth, viewHeight); } /** * @return The camera's x coordinate from its vector position */ public float getX() { return pos.x; } /** * Sets the x coordinate of the camera's x position * * @param x The new x position of the camera */ public void setX(float x) { pos = checkBounds(new Vector2f(x, pos.y)); updateRect(); } /** * @return The camera's y coordinate from its vector position */ public float getY() { return pos.y; } /** * Sets the y coordinate of the camera's y position * * @param y The new y position of the camera */ public void setY(float y) { pos = checkBounds(new Vector2f(pos.x, y)); updateRect(); } /** * @return The width of the camera's viewing area in pixels */ public int getViewWidth() { return viewWidth; } /** * Sets the width of the camera's viewing area * * @param viewWidth The width of the camera's viewing area in pixels */ public void setViewWidth(int viewWidth) { this.viewWidth = viewWidth; updateRect(); } /** * @return The height of the camera's viewing area in pixels */ public int getViewHeight() { return viewHeight; } /** * Sets the height of the camera's viewing area * * @param viewHeight The height of the camera's viewing area in pixels */ public void setViewHeight(int viewHeight) { this.viewHeight = viewHeight; updateRect(); } /** * @return The vector representing where the top left point of the camera * exists in the game */ public Vector2f getPos() { return pos; } /** * Sets the vector position representing the camera's top left point * * @param pos The new position of the camera */ public void setPos(Vector2f pos) { this.pos = checkBounds(pos); updateRect(); } /** * Makes sure that the camera's bounds is updated with the its position * and size */ private void updateRect() { bounds.setX(pos.x); bounds.setY(pos.y); bounds.setWidth(viewWidth); bounds.setHeight(viewHeight); } /** * Clamps the point passed in in between 2 Vector points (max and min) * * @param pos The point to clamp * @return The position passed in, but adjusted to the max and min bounds */ private Vector2f checkBounds(Vector2f pos) { // Verify the x bounds if (pos.x < min.x) pos.x = min.x; else if (pos.x > max.x - viewWidth) pos.x = max.x - viewWidth; // Verify the y bounds if (pos.y < min.y) pos.y = min.y; else if (pos.y > max.y - viewHeight) pos.y = max.y - viewHeight; return pos; } /** * @return The max point that the camera can be at */ public Vector2f getMax() { return max; } /** * Sets the maximum point that the camera's position can be * * @param max The maximum point the camera's position can be */ public void setMax(Vector2f max) { this.max = max; } /** * @return The min point that the camera can be at */ public Vector2f getMin() { return min; } /** * Sets the minimum point that the camera can be at * * @param min The new minimum point that the camera's position can be at */ public void setMin(Vector2f min) { this.min = min; } /** * @return The rectangular bounds that represents what the camera can see */ public Rectangle getBounds() { return bounds; } /** * @return the zoom value of the camera */ public float getZoom() { return zoom; } /** * Sets the zoom value of the camera * * @param zoom The zoom setting that the camera sees */ public void setZoom(float zoom) { if (zoom < .05f) zoom = .05f; else if (zoom > 15.0f) zoom = 15.0f; this.zoom = zoom; } /** * Zooms in the camera * * @param amount The amount to zoom the camera in */ public void zoomIn(float amount) { setZoom(zoom + amount); } /** * Zooms out the camera * * @param amount The amount to zoom the camera out */ public void zoomOut(float amount) { setZoom(zoom - amount); } }
public class Origem{ //Atributos private int id; private String pais; private int ano; //Metodos //Setters public void setId(int id){ this.id = id; } public void setPais(String pais){ this.pais = pais; } public void setAno(int ano){ this.ano = ano; } //Getters public int getId(){ return id; } public String getPais(){ return pais; } public int getAno(){ return ano; } }
package com.lubarov.daniel.data.deque; import com.lubarov.daniel.data.queue.MutableQueue; import com.lubarov.daniel.data.stack.MutableStack; /** * A structure which supports pushing and popping elements on both the front and the back. */ public interface MutableDeque<A> extends MutableStack<A>, MutableQueue<A> { void pushFront(A value); }
package org.lxy.innerclass; /** * @author menglanyingfei * @date 2017-5-25 */ class Bar { void doStuff(Foo f) { f.foo(); } } interface Foo { void foo(); } public class Test2 { static void go() { Bar b = new Bar(); // 参数式的匿名内部类 b.doStuff(new Foo() { public void foo() { System.out.println("foo"); } }); } public static void main(String[] args) { } }
/** * */ package alg.code123; import java.util.Arrays; import java.util.Comparator; /** * 给定一组整数,拼接成最大的整数 */ public class ConcatMaxInt { public static void main(String[] args) { String[] ints = new String[] { "73", "7", "4", "21" }; Arrays.sort(ints, new Comparator<String> () { @Override public int compare(String s1, String s2) { int n = s1.length() + s2.length(); String a = s1 + s2; // 737 String b = s2 + s1; // 773 int i = 0; while(i < n && a.charAt(i) == b.charAt(i)) ++ i; if(i < n) { int aa = a.charAt(i) - '0'; int bb = b.charAt(i) - '0'; return bb - aa; } return 0; } }); StringBuilder b = new StringBuilder(); for(String i : ints) b.append(i); System.out.println(b.toString()); } }
package com.tencent.mm.plugin.game.wepkg.utils; import com.tencent.mm.plugin.game.wepkg.model.e; import com.tencent.mm.sdk.platformtools.bi; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; public class b$a { public final Map<String, e> kgm = new ConcurrentHashMap(); public final e Er(String str) { if (bi.oW(str)) { return null; } return (e) this.kgm.get(str); } public final e Es(String str) { return (e) this.kgm.remove(str); } }
package com.company; import java.util.Scanner; public class LinearSearch { static int arr[] = {10, 20, 80, 30, 60, 50, 110, 100, 130, 170}; public static void main(String[] args) { System.out.println("Enter the number to Search:"); Scanner inputReader = new Scanner(System.in); int numberToSearch = inputReader.nextInt(); int count = 0; for(int i = 0; i<arr.length; i++){ if(numberToSearch == arr[i]) break; else count++; } System.out.println("The Element is in Index : "+count); } }
package vanadis.launcher; import vanadis.blueprints.ResourceLoader; import vanadis.core.lang.Not; import org.osgi.framework.BundleContext; import java.net.URL; public class BundleResourceLoader implements ResourceLoader { private final BundleContext bundleContext; @Override public URL get(String res) { return bundleContext.getBundle().getResource(res); } public BundleResourceLoader(BundleContext bundleContext) { this.bundleContext = Not.nil(bundleContext, "bundle context"); } }
/* * 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 model.bean; /** * * @author sampa */ public class HistoricodeConsumo { private Destino destino; private Item item; private int Mes; private int QuantidadeMensal; public HistoricodeConsumo (){ } public HistoricodeConsumo (Destino destino, Item item, int Mes, int QuantidadeMensal){ this.destino = destino; this.item = item; this.Mes = Mes; this.QuantidadeMensal = QuantidadeMensal; } public Destino getDestino() { return destino; } public void setDestino(Destino destino) { this.destino = destino; } public Item getItem() { return item; } public void setItem(Item item) { this.item = item; } public int getMes() { return Mes; } public void setMes(int Mes) { this.Mes = Mes; } public int getQuantidadeMensal() { return QuantidadeMensal; } public void setQuantidadeMensal(int QuantidadeMensal) { this.QuantidadeMensal = QuantidadeMensal; } }
package cn.xyz.repository.mongo; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.bson.types.ObjectId; import org.mongodb.morphia.query.Query; import org.mongodb.morphia.query.UpdateOperations; import org.mongodb.morphia.query.UpdateResults; import org.springframework.stereotype.Service; import com.mongodb.BasicDBObject; import com.mongodb.DBCursor; import com.mongodb.DBObject; import com.mongodb.QueryBuilder; import com.mongodb.WriteResult; import cn.xyz.commons.utils.DateUtil; import cn.xyz.commons.utils.StringUtil; import cn.xyz.mianshi.vo.Friends; import cn.xyz.mianshi.vo.PublicNum; import cn.xyz.mianshi.vo.UPublicNum; import cn.xyz.repository.PublicNumRepository; @Service public class PublicNumRepositoryImpl extends BaseRepositoryImpl<PublicNum, ObjectId> implements PublicNumRepository { public static PublicNumRepositoryImpl getInstance() { return new PublicNumRepositoryImpl(); } @Override public Integer addPublicNum(PublicNum publicNum) { BasicDBObject jo = new BasicDBObject(); jo.put("publicId", publicNum.getPublicId());// 索引 if (!StringUtil.isEmpty(publicNum.getNickname())) { jo.put("nickname", publicNum.getNickname());// 索引 } jo.put("createTime", DateUtil.currentTimeSeconds()); if(null!=publicNum.getCsUserId()){ jo.put("csUserId", publicNum.getCsUserId()); } if(!StringUtil.isEmpty(publicNum.getMessage())){ jo.put("message", publicNum.getMessage()); } if(!StringUtil.isEmpty(publicNum.getMessageUrl())){ jo.put("messageUrl", publicNum.getMessageUrl()); } if(!StringUtil.isEmpty(publicNum.getIntroduce())){ jo.put("introduce", publicNum.getIntroduce()); } if(!StringUtil.isEmpty(publicNum.getIndexUrlTital())){ jo.put("indexUrlTital", publicNum.getIndexUrlTital()); } if(!StringUtil.isEmpty(publicNum.getIndexUrl())){ jo.put("indexUrl", publicNum.getIndexUrl()); } if(!StringUtil.isEmpty(publicNum.getPortraitUrl())){ jo.put("portraitUrl", publicNum.getPortraitUrl()); } if(null!=publicNum.getPhone()){ jo.put("phone",publicNum.getPhone()); } jo.put("type", publicNum.getType()); jo.put("isDel", publicNum.getIsDel()); jo.put("updateTime", publicNum.getUpdateTime()); // 1、生成新公众号 dsForRW.getDB().getCollection("publicNum").save(jo); return publicNum.getPublicId(); } @Override public PublicNum getPublicNum(Integer publicId) { PublicNum one = this.findOne("publicId", publicId); return one; } @Override public List<Integer> getServiceIds(Integer publicId) { List<Integer> result = new ArrayList<>(); DBObject projection = new BasicDBObject("csUserId", 1); projection.put("_id", 0); DBCursor find = dsForRW.getDB().getCollection("publicNum").find(new BasicDBObject("publicId", publicId), projection); List<DBObject> array = find.toArray(); for (DBObject dbObject : array) { Integer object = (Integer) dbObject.get("csUserId"); result.add(object); } return result; } @Override public List<PublicNum> getPublcNumListForCS(Integer csUserId) { Query<PublicNum> query = dsForRW.createQuery(PublicNum.class); query.field("csUserId").equal(csUserId).field("isDel").equal(0); return query.asList(); } @Override public PublicNum removePublicNum(Integer publicId, Integer csUserId) { Query<PublicNum> query = dsForRW.createQuery(PublicNum.class); query.field("publicId").equal(publicId); query.field("userId").equals(csUserId); PublicNum delete = dsForRW.findAndDelete(query); System.out.println("结束绑定公众号" + delete); UpdateOperations<PublicNum> ops = dsForRW.createUpdateOperations(PublicNum.class); UpdateResults update = dsForRW.update(query, ops); return delete; } @Override public UpdateResults deletePublicNum(Integer publicId) { Query<PublicNum> query = dsForRW.createQuery(PublicNum.class); query.field("publicId").equal(publicId); UpdateOperations<PublicNum> ops = dsForRW.createUpdateOperations(PublicNum.class); ops.set("isDel", 1); UpdateResults update = dsForRW.update(query, ops); System.out.println("软删除公众号" + update); return update; } }
package models; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @JsonIgnoreProperties(ignoreUnknown = true) @Data @NoArgsConstructor public class Films { private int count; }
package com.tencent.mm.plugin.freewifi.ui; import com.tencent.mm.plugin.freewifi.m; import com.tencent.mm.plugin.freewifi.model.d; import com.tencent.mm.plugin.freewifi.model.j; import com.tencent.mm.plugin.freewifi.ui.c.a; import com.tencent.mm.plugin.report.service.h; import com.tencent.mm.sdk.platformtools.x; class d$1 implements a { d$1() { } public final void H(float f, float f2) { try { String valueOf = String.valueOf(f); String valueOf2 = String.valueOf(f2); if (j.aOK().Cg(d.aOz()) != null) { h.mEJ.h(12073, new Object[]{r2.field_ssid, r2.field_mac, r2.field_url, r2.field_url, valueOf2, valueOf}); x.i("MicroMsg.FreeWifi.FreeWifiLocationReporter", "report location. ssid=%s, mac=%s, mp_url=%s, qrcode=%s, longtitued=%s, latitude=%s", new Object[]{r2.field_ssid, r2.field_mac, r2.field_url, r2.field_url, valueOf, valueOf2}); } } catch (Exception e) { x.e("MicroMsg.FreeWifi.FreeWifiLocationReporter", "report location exception. " + e.getMessage() + m.h(e)); } } }
package org.w3c.dom; /** * ----- * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of * Technology, Institut National de Recherche en Informatique et en * Automatique, Keio University). All Rights Reserved. * http://www.w3.org/Consortium/Legal/ * ----- */ /** * DOM operations only raise exceptions in "exceptional" circumstances, i.e., * when an operation is impossible to perform (either for logical reasons, * because data is lost, or because the implementation has become unstable). * In general, DOM methods return specific error values in ordinary * processing situation, such as out-of-bound errors when using * <code>NodeList</code>. * <p>Implementations may raise other exceptions under other circumstances. * For example, implementations may raise an implementation-dependent * exception if a <code>null</code> argument is passed. * <p>Some languages and object systems do not support the concept of * exceptions. For such systems, error conditions may be indicated using * native error reporting mechanisms. For some bindings, for example, methods * may return error codes similar to those listed in the corresponding method * descriptions. * */ public abstract class DOMException extends RuntimeException { public short code; // ExceptionCode public static final short INDEX_SIZE_ERR = 1; public static final short DOMSTRING_SIZE_ERR = 2; public static final short HIERARCHY_REQUEST_ERR = 3; public static final short WRONG_DOCUMENT_ERR = 4; public static final short INVALID_CHARACTER_ERR = 5; public static final short NO_DATA_ALLOWED_ERR = 6; public static final short NO_MODIFICATION_ALLOWED_ERR = 7; public static final short NOT_FOUND_ERR = 8; public static final short NOT_SUPPORTED_ERR = 9; public static final short INUSE_ATTRIBUTE_ERR = 10; public DOMException(short code, String message) { super(message); this.code = code; } }
package jp.mironal.java.aws.app.glacier; import static org.junit.Assert.*; import jp.mironal.java.aws.app.glacier.AwsTools.AwsService; import jp.mironal.java.aws.app.glacier.AwsTools.Region; import org.junit.Test; public class AwsToolsTest { @Test public void testMakeUrl_Glacier_US_EAST_1() { assertEquals("https://glacier.us-east-1.amazonaws.com", AwsTools.makeUrl(AwsService.Glacier, Region.US_EAST_1)); } @Test public void testMakeUrl_Glacier_EU_WEST_1() { assertEquals("https://glacier.eu-west-1.amazonaws.com", AwsTools.makeUrl(AwsService.Glacier, Region.EU_WEST_1)); } @Test public void testMakeUrl_Sqs_US_WEST_1() { assertEquals("https://sqs.us-west-1.amazonaws.com", AwsTools.makeUrl(AwsService.Sqs, Region.US_WEST_1)); } @Test public void testMakeUrl_Sqs_US_WEST_2() { assertEquals("https://sqs.us-west-2.amazonaws.com", AwsTools.makeUrl(AwsService.Sqs, Region.US_WEST_2)); } @Test public void testMakeUrl_Sns_AP_NORTHEAST_1() { assertEquals("https://sns.ap-northeast-1.amazonaws.com", AwsTools.makeUrl(AwsService.Sns, Region.AP_NORTHEAST_1)); } @Test public void testPropFileName() { assertEquals("AwsCredentials.properties", AwsTools.AWS_PROPERTIES_FILENAME); } }
package gxc.domain; import java.io.Serializable; import java.util.Date; public class Board implements Serializable{ private static final long serialVersionUID = 7960485363539460207L; private Integer bid; private String uid; private String username; private String email; private String msgTitle; //标题 private String message; //内容 private Date createDate;//时间 public Integer getBid() { return bid; } public void setBid(Integer bid) { this.bid = bid; } public String getMsgTitle() { return msgTitle; } public void setMsgTitle(String msgTitle) { this.msgTitle = msgTitle; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getUid() { return uid; } public void setUid(String uid) { this.uid = uid; } @Override public String toString() { return "Board [bid=" + bid + ", uid=" + uid + ", username=" + username + ", email=" + email + ", message=" + message + ", createDate=" + createDate + "]"; } }
package com.example.custom; import com.example.custom.widget.CircleAnimation; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.View.OnClickListener; import android.widget.LinearLayout; /** * Created by ouyangshen on 2017/10/14. */ public class CircleAnimationActivity extends AppCompatActivity implements OnClickListener { private CircleAnimation mAnimation; // 定义一个圆弧动画对象 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_circle_animation); findViewById(R.id.btn_play).setOnClickListener(this); LinearLayout ll_layout = findViewById(R.id.ll_layout); // 创建一个新的圆弧动画 mAnimation = new CircleAnimation(this); // 把圆弧动画添加到线性布局ll_layout之中 ll_layout.addView(mAnimation); // 渲染圆弧动画。渲染操作包括初始化与播放两个动作 mAnimation.render(); } @Override public void onClick(View v) { if (v.getId() == R.id.btn_play) { // 开始播放圆弧动画 mAnimation.play(); } } }
package com.samer.funshine.model; import android.util.Log; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; /** * Created by Samer AlShurafa on 1/17/2018. */ public class DailyWeatherReport { public static final String WEATHER_TYPE_CLOUDS = "Clouds"; public static final String WEATHER_TYPE_PARTIALLY_CLOUDS = "Partially Cloudy"; public static final String WEATHER_TYPE_CLEAR = "Clear"; public static final String WEATHER_TYPE_RAIN = "Rain"; public static final String WEATHER_TYPE_WIND = "Wind"; public static final String WEATHER_TYPE_SNOW = "Snow"; public static final String WEATHER_TYPE_THUNDER_LIGHTNING = "Thunder Lightning"; private String cityName; private String countryName; private int currentTemp; private int minTemp; private int maxTemp; private String rawDate; private String weatherType; public DailyWeatherReport() {} public DailyWeatherReport(String cityName, String countryName, int currentTemp, int minTemp, int maxTemp, String rawDate, String weatherType) { this.cityName = cityName; this.countryName = countryName; this.currentTemp = currentTemp; this.minTemp = minTemp; this.maxTemp = maxTemp; this.rawDate = rawDate; this.weatherType = weatherType; } public String getCityName() { return cityName; } public String getCountryName() { return countryName; } public int getCurrentTemp() { return currentTemp; } public int getMinTemp() { return minTemp; } public int getMaxTemp() { return maxTemp; } public String getWeatherType() { return weatherType; } public String getRawDate() { return rawDate; } public String getFormattedDateMonthAndDay() { return formattedDateMonthAndDay(getRawDate()); } public String getFormattedDateDay() { return formattedDateDay(getRawDate()); } private String formattedDateMonthAndDay(String rawDate) { // convert raw date to formatted date Monthe and day (May 1) String outputDate = ""; try { Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ROOT).parse(rawDate); outputDate = new SimpleDateFormat("MMM dd", Locale.US).format(date).toUpperCase(Locale.ROOT); //String stringTime = new SimpleDateFormat("HH:mm", Locale.ROOT).format(date); //Log.v("ToFormattedDate", "Date: " + outputDate); } catch (ParseException e) { Log.v("ToFormattedDate", "Exception: " + e.getLocalizedMessage()); } return outputDate; } private String formattedDateDay(String rawDate) { // convert raw date to formatted date day only (Monday) String outputDate = ""; try { Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ROOT).parse(rawDate); outputDate = new SimpleDateFormat("EEEE", Locale.US).format(date).toUpperCase(Locale.ROOT); //String stringTime = new SimpleDateFormat("HH:mm", Locale.ROOT).format(date); //Log.v("ToFormattedDate", "Date: " + outputDate); } catch (ParseException e) { Log.v("ToFormattedDate", "Exception: " + e.getLocalizedMessage()); } return outputDate; } }
package concurrent_test; import java.util.concurrent.TimeUnit; /** * Description: * * @author Baltan * @date 2018/12/27 10:50 */ public class InterruptTest { public static void main(String[] args) { Thread thread1 = new Thread(() -> { try { TimeUnit.SECONDS.sleep(5); System.out.println("thread-1睡醒了……"); } catch (InterruptedException e) { e.printStackTrace(); } }, "Thread-1"); thread1.start(); new Thread(() -> { try { TimeUnit.SECONDS.sleep(2); System.out.println("thread-1中断了-----" + thread1.isInterrupted()); System.out.println("thread-2中断了-----" + Thread.currentThread().isInterrupted()); /** * 中断Thread-1 */ thread1.interrupt(); System.out.println("thread-1中断了-----" + thread1.isInterrupted()); /** * 中断当前线程,即Thread-2 */ Thread.currentThread().interrupt(); System.out.println("thread-2中断了-----" + Thread.currentThread().isInterrupted()); /** * interrupted()测试当前线程是否已经是中断状态,执行后会将状态标志清除 */ System.out.println("thread-2中断了-----" + Thread.interrupted()); System.out.println("thread-2中断了-----" + Thread.interrupted()); System.out.println("thread-2中断了-----" + Thread.currentThread().isInterrupted()); } catch (InterruptedException e) { e.printStackTrace(); } }, "Thread-2").start(); } }
package utils; /** * Enum class for different types of payment usage in CTM. * It has got a variable visibleText which contains the visible text option for the enum under the dropdown. * * @author Thiru */ public enum PAYMENT_TYPE { MONTHLY_DIRECT_DEBIT("Monthly Direct Debit"), PAY_ON_RECEIPT_OF_BILL("Pay On Receipt Of Bill"), PREPAYMENT_METER("Prepayment Meter"), QUATERLY_DIRECT_DEBIT("Quarterly Direct Debit"), ALL_PAYMENT_TYPES("All payment types"); private String visibleText; private PAYMENT_TYPE(String visibleText){ this.visibleText = visibleText; } public String getVisibleText(){ return visibleText; } }
package com.tt.miniapphost.monitor; import com.tt.miniapphost.host.HostDependManager; import java.util.Collection; import java.util.Map; public class AppBrandEnsure { public static boolean ensureFalse(boolean paramBoolean) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); boolean bool = paramBoolean; if (iEnsure != null) bool = iEnsure.ensureFalse(paramBoolean); return bool; } public static boolean ensureFalse(boolean paramBoolean, String paramString) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); boolean bool = paramBoolean; if (iEnsure != null) bool = iEnsure.ensureFalse(paramBoolean, paramString); return bool; } public static boolean ensureFalse(boolean paramBoolean, String paramString, Map<String, String> paramMap) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); boolean bool = paramBoolean; if (iEnsure != null) bool = iEnsure.ensureFalse(paramBoolean, paramString, paramMap); return bool; } public static boolean ensureNotEmpty(Collection paramCollection) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); return (iEnsure != null) ? iEnsure.ensureNotEmpty(paramCollection) : ((paramCollection != null && paramCollection.size() != 0)); } public static boolean ensureNotNull(Object paramObject) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); return (iEnsure != null) ? iEnsure.ensureNotNull(paramObject) : ((paramObject != null)); } public static boolean ensureNotNull(Object paramObject, String paramString) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); return (iEnsure != null) ? iEnsure.ensureNotNull(paramObject, paramString) : ((paramObject != null)); } public static void ensureNotReachHere() { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); if (iEnsure != null) iEnsure.ensureNotReachHere(); } public static void ensureNotReachHere(String paramString) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); if (iEnsure != null) iEnsure.ensureNotReachHere(paramString); } public static void ensureNotReachHere(String paramString, Map<String, String> paramMap) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); if (iEnsure != null) iEnsure.ensureNotReachHere(paramString, paramMap); } public static void ensureNotReachHere(Throwable paramThrowable) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); if (iEnsure != null) iEnsure.ensureNotReachHere(paramThrowable); } public static void ensureNotReachHere(Throwable paramThrowable, String paramString) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); if (iEnsure != null) iEnsure.ensureNotReachHere(paramThrowable, paramString); } public static void ensureNotReachHere(Throwable paramThrowable, String paramString, Map<String, String> paramMap) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); if (iEnsure != null) iEnsure.ensureNotReachHere(paramThrowable, paramString, paramMap); } public static boolean ensureTrue(boolean paramBoolean) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); boolean bool = paramBoolean; if (iEnsure != null) bool = iEnsure.ensureTrue(paramBoolean); return bool; } public static boolean ensureTrue(boolean paramBoolean, String paramString) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); boolean bool = paramBoolean; if (iEnsure != null) bool = iEnsure.ensureTrue(paramBoolean, paramString); return bool; } public static boolean ensureTrue(boolean paramBoolean, String paramString, Map<String, String> paramMap) { IEnsure iEnsure = HostDependManager.getInst().getEnsure(); boolean bool = paramBoolean; if (iEnsure != null) bool = iEnsure.ensureTrue(paramBoolean, paramString, paramMap); return bool; } public static interface IEnsure { boolean ensureFalse(boolean param1Boolean); boolean ensureFalse(boolean param1Boolean, String param1String); boolean ensureFalse(boolean param1Boolean, String param1String, Map<String, String> param1Map); boolean ensureNotEmpty(Collection param1Collection); boolean ensureNotNull(Object param1Object); boolean ensureNotNull(Object param1Object, String param1String); void ensureNotReachHere(); void ensureNotReachHere(String param1String); void ensureNotReachHere(String param1String, Map<String, String> param1Map); void ensureNotReachHere(Throwable param1Throwable); void ensureNotReachHere(Throwable param1Throwable, String param1String); void ensureNotReachHere(Throwable param1Throwable, String param1String, Map<String, String> param1Map); boolean ensureTrue(boolean param1Boolean); boolean ensureTrue(boolean param1Boolean, String param1String); boolean ensureTrue(boolean param1Boolean, String param1String, Map<String, String> param1Map); } } /* Location: C:\Users\august\Desktop\tik\df_miniapp\classes.jar!\com\tt\miniapphost\monitor\AppBrandEnsure.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
package org.nmrg.common.utils.clazz; import org.nmrg.common.BaseCommon; import org.nmrg.model.ResultMsgModel; /** ** 类相关的信息 ** @ClassName: ClazzUtils ** @Description: TODO ** @author CC ** @date 2017年9月1日 - 上午10:13:44 */ public class ClazzUtils extends BaseCommon { }
package nl.jtosti.hermes.image.advice; import nl.jtosti.hermes.image.exception.CacheFileNotFoundException; import nl.jtosti.hermes.util.ErrorDTO; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; @ControllerAdvice public class CacheFileNotFoundAdvice { @ResponseBody @ExceptionHandler(CacheFileNotFoundException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) ErrorDTO cacheFileNotFoundHandler(CacheFileNotFoundException ex) { return new ErrorDTO(ex.getMessage()); } }
package com.spring1.UserServiceProxyFactopry; import com.spring1.Service.UserService; import com.spring1.Service.UserServiceImpl; import org.springframework.cglib.proxy.Enhancer; import org.springframework.cglib.proxy.MethodInterceptor; import org.springframework.cglib.proxy.MethodProxy; import java.lang.reflect.Method; /** * com.spring1.UserServiceProxyFactopry * * @author jh * @date 2018/8/21 16:58 * description:实现CGlib动态代理,继承代理 */ public class UserServiceProxyFactory2 implements MethodInterceptor { //生成CGlib public UserService getUserServiceProxy() { Enhancer enhancer = new Enhancer (); //生成代理对象 enhancer.setSuperclass (UserServiceImpl.class);//设置代理的对象 enhancer.setCallback (this);//代理作什么 UserService us = (UserService)enhancer.create (); return us; } @Override public Object intercept(Object obj, Method method, Object[] arg, MethodProxy methodProxy) throws Throwable { //打开事务 System.out.println ("------>打开事务---->"); //调用原有方法 Object returnValue = methodProxy.invokeSuper (obj, arg); //提交事务 System.out.println ("------>提交事务---->"); return returnValue; } }
package com.tencent.mm.plugin.appbrand.ui.recents; import android.view.View; class e$2 implements Runnable { final /* synthetic */ e gAf; final /* synthetic */ View val$view; e$2(e eVar, View view) { this.gAf = eVar; this.val$view = view; } public final void run() { this.val$view.setVisibility(8); } }
/* */ package boardFinder.demo.repository; import boardFinder.demo.domain.Bend; import boardFinder.demo.domain.Snowboard; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; /** * * @author Erik */ @Repository public interface BendRepository extends JpaRepository<Bend, Long> { Bend findById(long id); Bend findByName(String name); }
/** * */ package exception; /** * Classe do tipo Exception que ao fazer a verificacao do erro lança a mensagem no cadastro do prato no restaurante * @author Gabriel Alves - Joao Carlos - Melissa Diniz - Thais Nicoly * */ @SuppressWarnings("serial") public class CadastroPratoInvalidoException extends Exception{ /** * Metodo que lanca a mensagem de erro quando o cadastro do prato * nao for realizado corretamente * @param mensagem relativa ao erro em especifico da verificacao */ public CadastroPratoInvalidoException(String msgErro){ super("Erro no cadastro do prato. " + msgErro); } }
package com.lcss.spikegoodssystem.controller; import com.lcss.spikegoodssystem.api.*; import com.lcss.spikegoodssystem.entity.Order; import com.lcss.spikegoodssystem.service.GoodsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.List; /** * @ClassName SpikeGoodsController * @Description TODO * @Author xusisi * @Date 2020/6/27 下午5:13 */ @RestController @RequestMapping("spikeGoods") public class SpikeGoodsController { @Autowired private GoodsService goodsService; @GetMapping("/getSpikeDescriptions/{goodsId}") public ResponseEntity<ResponseGoodsInformation> getSpikeGoods(@PathVariable("goodsId") String goodsId){ return ResponseEntity.ok(goodsService.getGoodDetail(goodsId)); } @PostMapping("/createOrder") public ResponseEntity<ResponseOrderInformation> createOrder(@RequestBody RequestOrder requestOrder){ return ResponseEntity.ok(new ResponseOrderInformation()); } @GetMapping("/getOrderLists") public ResponseEntity<List<Order>> getOrderLists(){ return ResponseEntity.ok(new ArrayList<>()); } @GetMapping("/getOrderDetail/{orderId}") public ResponseEntity<ResponseOrderInformation> getOrderDetail(@PathVariable("orderId") String orderId){ return ResponseEntity.ok(new ResponseOrderInformation()); } @PostMapping("/updateOrder") public ResponseEntity<ResponseOrderInformation> updateOrder(@RequestParam("orderId") String orderId){ return ResponseEntity.ok(new ResponseOrderInformation()); } }
package com.example.retrofit_firebase; import androidx.appcompat.app.AppCompatActivity; //import android.graphics.Movie; import android.os.Bundle; import android.util.Log; import java.util.Arrays; import java.util.List; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class); // GET a specific movie Call<Movie> call = apiService.getMovie("M2"); call.enqueue(new Callback<Movie>() { @Override public void onResponse(Call<Movie> call, Response<Movie> response) { Log.d("Banan","URL successfully responded "+response.toString()); Log.d("Banan","Movie Title: "+response.body().getTitle()); Log.d("Banan","Movie ImageURL: "+response.body().getImageUrl()); Log.d("Banan","Movie Genre: "+response.body().getMovieGenre()); } @Override public void onFailure(Call<Movie> call, Throwable t) { Log.d("Banan","NO Response. Reason: "+t.toString()); } }); //POST // Call<List<Movie>> call1 = apiService.setMovie("M1", new Movie("Mulan", "https://cdn.pixabay.com/photo/2014/01/05/01/19/dragon-238931_1280.jpg", "Action/Adventure")); // call1.enqueue(new Callback<List<Movie>>() { // @Override // public void onResponse(Call<List<Movie>>call, Response<List<Movie>> response) { // Log.d("BananPOST","URL successfully responded "+response.toString()); // // } // // @Override // public void onFailure(Call<List<Movie>> call, Throwable t) { // Log.d("BananPOST","NO Response. Reason: "+t.toString()); // } // // // }); //PUT Call<List<Movie>> call2=apiService.setMovieWithoutRandomness("M2", new Movie("Lion King", "https://cdn.pixabay.com/photo/2014/12/12/19/43/lion-565818_1280.jpg", "Drama/Adventure/Musical")); call2.enqueue(new Callback<List<Movie>>() { @Override public void onResponse(Call<List<Movie>> call, Response<List<Movie>> response) { Log.d("BananPUT","URL successfully responded "+response.toString()); } @Override public void onFailure(Call<List<Movie>> call, Throwable t) { Log.d("BananPUT","NO Response. Reason: "+t.toString()); } }); //DELETE // Call<List<Movie>> call3=apiService.deleteMovie("M2"); // call3.enqueue(new Callback<List<Movie>>() { // @Override // public void onResponse(Call<List<Movie>> call, Response<List<Movie>> response) { // Log.d("BananDEL","URL successfully responded "+response.toString()); // } // // @Override // public void onFailure(Call<List<Movie>> call, Throwable t) { // Log.d("BananDEL","NO Response. Reason: "+t.toString()); // // } // // // // }); //PATCH Call<List<Movie>> call4=apiService.updateMovie("M3", new Movie("Aladdin","https://cdn.pixabay.com/photo/2015/08/13/04/53/aladdin-886589_1280.jpg","Animation")); call4.enqueue(new Callback<List<Movie>>() { @Override public void onResponse(Call<List<Movie>> call, Response<List<Movie>> response) { Log.d("BananPATCH","URL successfully responded "+response.toString()); } @Override public void onFailure(Call<List<Movie>> call, Throwable t) { Log.d("BananPATCH","NO Response. Reason: "+t.toString()); } }); } }
/* * SearchCacheServiceImpl.java * This file was last modified at 2018.12.03 20:05 by Victor N. Skurikhin. * $Id$ * This is free and unencumbered software released into the public domain. * For more information, please refer to <http://unlicense.org> */ package ru.otus.server.services; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import ru.otus.server.cache.CacheEngine; import ru.otus.server.cache.CacheEngineImpl; import ru.otus.server.cache.MyElement; import ru.otus.shared.Emp; import ru.otus.shared.Search; import java.util.List; public class SearchCacheServiceImpl implements SearchCacheService { public static final int cacheSize = 10; private static final Logger LOGGER = LogManager.getLogger(SearchCacheServiceImpl.class.getName()); private CacheEngine<Integer, List<Emp>> cache; public SearchCacheServiceImpl() { cache = new CacheEngineImpl<>(cacheSize, 0, 0, true); } public SearchCacheServiceImpl(long lifeTimeMs, long idleTimeMs) { cache = new CacheEngineImpl<>(cacheSize, lifeTimeMs, idleTimeMs, false); } @Override public void putToCache(Search search, List<Emp> content) { Integer hash = search.hashCode(); LOGGER.info("Put to cache by hash: {}", hash); cache.put(new MyElement<>(hash, content)); } /** * The method return element from cache. * If element hasn't in cache method return null. * * @param search search request. * @return - element from cache or null. */ @Override public List<Emp> searchInCache(Search search) { if (null == search) return null; Integer hash = search.hashCode(); LOGGER.info("Searching by hash: {} ...", hash); MyElement<Integer, List<Emp>> element = cache.get(hash); if (null == element) return null; LOGGER.info("Get from cache by hash: {}", hash); return element.getValue(); } } /* vim: syntax=java:fileencoding=utf-8:fileformat=unix:tw=78:ts=4:sw=4:sts=4:et */ //EOF
import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; public class TestHungPhan { HungPhan hp; @BeforeEach public void beforeFunction(){ hp = new HungPhan(); } @Test public void testGetFullName() { assertEquals("Hung Phan", hp.getFullName(), "getFullName() should return Hung Phan."); } @Test public void testGetFirstName() { assertEquals("Hung", hp.getFirstName(), "hp.getFirstName() should return Hung."); } @Test public void testGetLastName() { assertEquals("Phan", hp.getLastName(), "hp.getLastName() should return Phan."); } @Test public void testGetUCInetID() { assertEquals("hpphan", hp.getUCInetID(), "hp.getUCInetID() should return hpphan."); } @Test public void testGetStudentNumber() { assertEquals(20243133, hp.getStudentNumber(), "hp.getStudentNumber() should return 20243133."); } @Test public void testGetRotatedFullNamePositiveShift() { assertEquals("ng PhanHu", hp.getRotatedFullName(2), "hp.getRotatedFullName(2) should return ng Phan."); } @Test public void testGetRotatedFullNameNegativeShift() { assertEquals("PhanHung ", hp.getRotatedFullName(-4), "hp.getRotatedFullName(-4) should return PhanHung ."); } @Test public void testGetRotatedFullNameOtherShift() { assertEquals("Shift value is out of bound", hp.getRotatedFullName(10), "hp.getRotatedFullName(10) should return Shift value is out of bound."); assertEquals("Shift value is out of bound", hp.getRotatedFullName(-10), "hp.getRotatedFullName(-10) should return Shift value is out of bound."); assertEquals("Hung Phan", hp.getRotatedFullName(0), "hp.getRotatedFullName(0) should return Hung Phan."); } }
package pro.eddiecache.utils.discovery; import java.util.HashMap; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import pro.eddiecache.core.model.IContextCacheManager; import pro.eddiecache.core.model.IProvideScheduler; public class UDPDiscoveryManager { private static final Log log = LogFactory.getLog(UDPDiscoveryManager.class); private static UDPDiscoveryManager INSTANCE = new UDPDiscoveryManager(); private final Map<String, UDPDiscoveryService> services = new HashMap<String, UDPDiscoveryService>(); private UDPDiscoveryManager() { } public static UDPDiscoveryManager getInstance() { return INSTANCE; } public synchronized UDPDiscoveryService getService(String discoveryAddress, int discoveryPort, int servicePort, IContextCacheManager cacheMgr) { String key = discoveryAddress + ":" + discoveryPort + ":" + servicePort; UDPDiscoveryService service = services.get(key); if (service == null) { if (log.isInfoEnabled()) { log.info("Create service for address:port:servicePort [" + key + "]"); } UDPDiscoveryAttributes attributes = new UDPDiscoveryAttributes(); attributes.setUdpDiscoveryAddr(discoveryAddress); attributes.setUdpDiscoveryPort(discoveryPort); attributes.setServicePort(servicePort); service = new UDPDiscoveryService(attributes); cacheMgr.registerShutdownObserver(service); /** * 如果本地的缓存是提供数据的主缓存(可以提供数据的缓存) * 则使用一个定时线程池,进行定时发送注册信息 15s */ if (cacheMgr instanceof IProvideScheduler) { service.setScheduledExecutorService(((IProvideScheduler) cacheMgr).getScheduledExecutorService()); } service.startup(); services.put(key, service); } if (log.isDebugEnabled()) { log.debug("Return service [" + service + "] for key [" + key + "]"); } return service; } }
package com.geektech.beerapp; import android.app.Application; import android.util.Log; import com.geektech.beerapp.data.beers.BeerRepository; import com.geektech.beerapp.data.beers.IBeerDataSource; import com.geektech.beerapp.data.beers.local.BeerLocalDataSource; public class BeerApp extends Application { public static IBeerDataSource beerRepository; @Override public void onCreate() { super.onCreate(); beerRepository = new BeerRepository( new BeerLocalDataSource(), null ); Log.d("ololo", "On application create"); } }
package parser.lexer; import java.io.*; class Input { public static final int EOF = -1; private InputStream inputStream; private Reader reader; private int[] buffer; private int readPos, readLen; private int readOffset; private boolean eof = false; private boolean buffering = false; Input(Object input) throws IOException { if (input instanceof InputStream) this.inputStream = input instanceof BufferedInputStream ? (InputStream) input : new BufferedInputStream((InputStream) input); else if (input instanceof Reader) this.reader = input instanceof BufferedReader ? (Reader) input : new BufferedReader((Reader) input); else if (input instanceof File) this.reader = new BufferedReader(new FileReader((File) input)); else if (input instanceof StringBuffer || input instanceof String) this.reader = new StringReader(input.toString()); else throw new IllegalArgumentException("Unknown input object: " + (input != null ? input.getClass().getName() : "null")); } public int read() throws IOException { int i; if (readLen > readPos) { // use buffer if buffer is not at end i = buffer[readPos]; readPos++; return i; } if (eof) return EOF; // read one character from input i = (reader != null) ? reader.read() : inputStream.read(); // recognize end of input if (i == -1) { eof = true; try { if (reader != null) reader.close(); else inputStream.close(); } catch (IOException e) { System.out.println(e.getMessage()); } } else { readOffset++; convertInput(i); // input hook for subclasses if (buffering) // store character if in buffering state storeRead(i); else readPos = readLen = 0; } return i; } public int peek() throws IOException { int mark = getMark(); int c = read(); setMark(mark); return c; } protected int convertInput(int i) { return i; } public int getScanOffset() { return getReadOffset() - getUnreadLength(); } public int getReadOffset() { return readOffset; } public int getMark() { buffering = true; return readPos; } public void setMark(int mark) { readPos = mark; } public void resolveBuffer() { buffering = false; if (readLen > readPos) { if (readPos > 0) { // copy unread buffer to bottom int diff = getUnreadLength(); System.arraycopy(buffer, readPos, buffer, 0, diff); readLen = diff; readPos = 0; } } else { readPos = readLen = 0; } } // store the int to buffer private void storeRead(int i) { if (buffer == null) // allocate buffer buffer = new int[128]; if (readPos == buffer.length) { // reallocate buffer as it is too small //System.err.println("enlarging lexer buffer from "+buffer.length); int[] old = buffer; // the buffer must not be as long as the input, it just serves as lookahead buffer. buffer = new int[old.length * 2]; System.arraycopy(old, 0, buffer, 0, old.length); } if (readPos != readLen) throw new IllegalStateException("Can not read to buffer when it was not read empty!"); buffer[readPos] = i; readPos++; readLen++; } public int[] getUnreadBuffer() { int diff; if (buffer == null || (diff = getUnreadLength()) <= 0) return new int[0]; int[] ret = new int[diff]; System.arraycopy(buffer, readPos, ret, 0, diff); return ret; } protected int getUnreadLength() { return readLen - readPos; } }
package uk.gov.hmcts.befta.dse.ccd.definition.converter; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; public class SheetWriter { private ArrayList<String> keys; private CellStyle cellDateStyle; public XSSFWorkbook addSheetToXlxs(XSSFWorkbook workbook, String sheetName, ArrayNode sheetArrayNode) { setCellDateStyle(ExcelProcessingUtils.getExcelDateCellStyle(workbook)); if (sheetArrayNode.size() > 0) { Sheet sheet = workbook.createSheet(sheetName); sheet.createRow(0).createCell(0).setCellValue(sheetName); sheet.createRow(1); // blank row required - normally contains description createHeaderRow(sheet, sheetArrayNode); Iterator<JsonNode> iterator = sheetArrayNode.iterator(); while (iterator.hasNext()) { JsonNode row = iterator.next(); writeRowToSheet(sheet, row); } } return workbook; } /** * Create a row consisting of the column headers for the particular ccd * definition sheet/tab * * @param sheet * @param sheetArrayNode */ private void createHeaderRow(Sheet sheet, ArrayNode sheetArrayNode) { Iterator<String> headers = sheetArrayNode.get(0).fieldNames(); ArrayList<String> keys = new ArrayList<>(); int nextRow = sheet.getPhysicalNumberOfRows(); Row row = sheet.createRow(nextRow); int columnIndex = 0; while (headers.hasNext()) { Cell cell = row.createCell(columnIndex); String headerName = headers.next(); cell.setCellValue(headerName); keys.add(headerName); columnIndex++; } setKeys(keys); } /** * Generate a row on the excel sheet/tab from the json node * * @param sheet * @param jsonNodeRow */ private void writeRowToSheet(Sheet sheet, JsonNode jsonNodeRow) { int nextRow = sheet.getPhysicalNumberOfRows(); Row row = sheet.createRow(nextRow); Iterator<JsonNode> jsonNodeCellIterator = jsonNodeRow.elements(); int columnIndex = 0; while (jsonNodeCellIterator.hasNext()) { String column = getKeys().get(columnIndex); Cell cell = row.createCell(columnIndex); JsonNode jsonCellObject = jsonNodeCellIterator.next(); switch (jsonCellObject.getNodeType()) { // todo if we change the read operations to read blank cells as null we will // need to handle the corresponding write filtering here case STRING: String value = jsonCellObject.asText(); if ((column.equals("LiveFrom") || column.equals("LiveTo")) && value.length() > 0) { try { Date dt = new SimpleDateFormat("dd/MM/yy").parse(value); cell.setCellValue(dt); cell.setCellStyle(getCellDateStyle()); } catch (ParseException e) { throw new RuntimeException(e); } } else if (value.length() > 0) { cell.setCellValue(jsonCellObject.asText()); } break; case NUMBER: cell.setCellValue(jsonCellObject.asInt()); break; default: throw new RuntimeException("not sure what data type this json node is"); } columnIndex++; } } private ArrayList<String> getKeys() { return keys; } private void setKeys(ArrayList<String> keys) { this.keys = keys; } public CellStyle getCellDateStyle() { return cellDateStyle; } public void setCellDateStyle(CellStyle cellDateStyle) { this.cellDateStyle = cellDateStyle; } }
package com.jim.multipos.ui.admin_main_page.fragments.company.di; import android.support.v4.app.Fragment; import com.jim.multipos.config.scope.PerFragment; import com.jim.multipos.ui.admin_main_page.fragments.company.CompanyAddFragment; import com.jim.multipos.ui.admin_main_page.fragments.company.presenter.CompanyFragmentPresenter; import com.jim.multipos.ui.admin_main_page.fragments.company.presenter.CompanyFragmentPresenterImpl; import com.jim.multipos.ui.admin_main_page.fragments.company.presenter.CompanyFragmentView; import dagger.Binds; import dagger.Module; @Module public abstract class CompanyFragmentModule { @Binds @PerFragment abstract Fragment provideFragment(CompanyAddFragment companyFragment); @Binds @PerFragment abstract CompanyFragmentView provideView(CompanyAddFragment companyFragment); @Binds @PerFragment abstract CompanyFragmentPresenter providePresenter(CompanyFragmentPresenterImpl presenter); }
package br.com.globallabs.java.bootcamp.desenvolvimento.avancado.java11;public class ClientHttp { }
package org.wikipedia.search; import org.wikipedia.PageTitle; public class FullSearchResult { private final PageTitle title; private final String thumbUrl; private final String wikiBaseId; public FullSearchResult(PageTitle title, String thumbUrl, String wikiBaseId) { this.thumbUrl = thumbUrl; this.wikiBaseId = wikiBaseId; this.title = title; } public PageTitle getTitle() { return title; } public String getThumbUrl() { return thumbUrl; } public String getWikiBaseId() { return wikiBaseId; } }
/* * 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 src; import java.util.LinkedList; /** * * @author kannie */ public class FactorNode extends ParseTreeNode { public FactorNode(ParseTreeNode node) { super(); this.addNode(node); } @Override public void run(LinkedList<String> functionNameList) { super.run(functionNameList); this.inheritFrom(this.getChild(0)); } }
package lab; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; public class FilmDAO { public static List<Film> findAll(int currentPage, int pageSize, String ss, String st, String od) throws Exception { String sql = "call film_findAll(?, ?, ?, ?, ?)"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setInt(1, (currentPage - 1) * pageSize); statement.setInt(2, pageSize); statement.setString(3, ss); statement.setString(4, st + "%"); statement.setString(5, od); try (ResultSet resultSet = statement.executeQuery()) { ArrayList<Film> list = new ArrayList<Film>(); while (resultSet.next()) { Film film = new Film(); film.setId(resultSet.getInt("film_id")); film.setTitle(resultSet.getString("title")); film.setDescription(resultSet.getString("description")); film.setReleaseYear(resultSet.getInt("release_year")); film.setRentalDuration(resultSet.getInt("rental_duration")); film.setRentalRate(resultSet.getDouble("rental_rate")); film.setSpecialFeatures(resultSet.getString("special_features")); film.setLength(resultSet.getInt("length")); film.setLastUpdate(resultSet.getTimestamp("last_update")); film.setCategory(resultSet.getString("category")); film.setLanguageId(resultSet.getInt("language_id")); list.add(film); } return list; } } } public static Film findOne(int id) throws Exception { String sql = "select f.*, c.name category , l.name language" + " from film f left join film_category fc on f.film_id=fc.film_id" + " left join category c on fc.category_id=c.category_id" + " left join language l on f.language_id=l.language_id" + " where f.film_id = ? "; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setInt(1, id); try (ResultSet resultSet = statement.executeQuery()) { if (resultSet.next()) { Film film = new Film(); film.setId(resultSet.getInt("film_id")); film.setTitle(resultSet.getString("title")); film.setDescription(resultSet.getString("description")); film.setReleaseYear(resultSet.getInt("release_year")); film.setRentalDuration(resultSet.getInt("rental_duration")); film.setRentalRate(resultSet.getDouble("rental_rate")); film.setSpecialFeatures(resultSet.getString("special_features")); film.setLength(resultSet.getInt("length")); film.setLastUpdate(resultSet.getTimestamp("last_update")); film.setCategory(resultSet.getString("category")); film.setLanguageId(resultSet.getInt("language_id")); return film; } } return null; } } public static int count(String ss, String st) throws Exception { String sql = "call film_count(?, ?)"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setString(1, ss); statement.setString(2, st + "%"); try (ResultSet resultSet = statement.executeQuery()) { if (resultSet.next()) return resultSet.getInt(1); } } return 0; } public static void update(Film film,int categoryId) throws Exception { String sql = "UPDATE film SET title=?, description=?, release_year=?, language_id=?, rental_duration=?, rental_rate=?, length=?, special_features=?, last_update=?" + " WHERE film_id = ?"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setString(1, film.getTitle()); statement.setString(2, film.getDescription()); statement.setInt(3, film.getReleaseYear()); statement.setInt(4, film.getLanguageId()); statement.setInt(5, film.getRentalDuration()); statement.setDouble(6, film.getRentalRate()); statement.setInt(7, film.getLength()); statement.setString(8, film.getSpecialFeatures()); statement.setTimestamp(9, new Timestamp(System.currentTimeMillis())); statement.setInt(10, film.getId()); statement.executeUpdate(); } sql = "UPDATE film_category set category_id=?" + " WHERE film_id = ?"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setInt(1, categoryId); statement.setInt(2, film.getId()); statement.executeUpdate(); } } public static int idSearch(String name) throws Exception { String sql = "SELECT * from film where title=?"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setString(1, name); try(ResultSet resultSet = statement.executeQuery()){ if(resultSet.next()) return resultSet.getInt("film_id"); } } return 0; } public static void insert(Film film) throws Exception { String sql = "INSERT film (title, description, release_year, language_id, rental_duration, rental_rate, length, last_update)" + " VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setString(1, film.getTitle()); statement.setString(2, film.getDescription()); statement.setInt(3, film.getReleaseYear()); statement.setInt(4, film.getLanguageId()); statement.setInt(5, film.getRentalDuration()); statement.setDouble(6, film.getRentalRate()); statement.setInt(7, film.getLength()); statement.setTimestamp(8, new Timestamp(System.currentTimeMillis())); statement.executeUpdate(); } int id = idSearch(film.getTitle()); int id2 = CategoryDAO.findOne(film.getCategory()); sql = "INSERT film_category (film_id, category_id)" + " VALUES (?, ?)"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setInt(1, id); statement.setInt(2, id2); statement.executeUpdate(); } } public static void delete(int id) throws Exception { String sql = "DELETE FROM film_category WHERE film_id = ?"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setInt(1, id); statement.executeUpdate(); } sql = "DELETE FROM film WHERE film_id = ?"; try (Connection connection = DB.getConnection("sakila"); PreparedStatement statement = connection.prepareStatement(sql)) { statement.setInt(1, id); statement.executeUpdate(); } } }
package fr.lteconsulting.servlet.vue; import java.io.IOException; import java.util.List; import javax.ejb.EJB; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import fr.lteconsulting.dao.BigDao; import fr.lteconsulting.model.Quizz; import fr.lteconsulting.model.Utilisateur; import fr.lteconsulting.servlet.Rendu; public class HomeServlet extends HttpServlet { private static final long serialVersionUID = 4623134370840447179L; @EJB private BigDao dao; @Override protected void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { // Je regarde l'objet associé à la clé "nom" dans la session de l'utilisateur Utilisateur utilisateur = (Utilisateur) req.getSession().getAttribute( "utilisateur" ); if( utilisateur != null ) { List<Quizz> quizzs = dao.getQuizzs(); Rendu.pageBienvenue( utilisateur.getNomComplet(), quizzs, getServletContext(), req, resp ); } else { Rendu.pageLogin( getServletContext(), req, resp ); } } }
<#assign className=table.className> <#assign classNameLower=className?uncap_first> package ${basepackage}.controller; import ${basepackage}.service.CommonService; import com.appc.litsso.common.util.PageDto; import com.appc.litsso.common.util.PageUtils; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.util.StringUtils; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.*; import java.io.Serializable; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; /** * UserController * * @author : panda * @version : Ver 1.0 * @date : 2017-6-28 */ public class CommonController<T, BaseService extends CommonService<T>> { @InitBinder public void initBinder(WebDataBinder binder) { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormat.setLenient(true); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); } @Autowired protected BaseService baseService; @ApiOperation(value = "新增", notes = "新增") @RequestMapping(value = "/insert", method = RequestMethod.POST) public int insert(@RequestBody T t) { return baseService.insert(t); } @ApiOperation(value = "修改", notes = "修改") @RequestMapping(value = "/updateById", method = RequestMethod.POST) public int updateById(@RequestBody T t) { return baseService.updateById(t); } @ApiOperation(value = "删除", notes = "删除") @RequestMapping(value = "/deleteById", method = RequestMethod.GET) public int deleteById(@ApiParam("主键") @RequestParam(required = true) Serializable pk) { return baseService.deleteById(pk); } @ApiOperation(value = "根据ID获取", notes = "根据ID获取") @RequestMapping(value = "/getById", method = RequestMethod.GET) public T getById(@ApiParam("主键") @RequestParam(required = true) Serializable pk) { return baseService.getById(pk); } @ApiOperation(value = "根据参数获取对象", notes = "根据参数获取对象") @RequestMapping(value = "/getEntity", method = RequestMethod.POST) public T getEntity(@RequestBody T t) { return baseService.getEntity(t); } @ApiOperation(value = "根据主键和字段获取相应的值", notes = "根据主键和字段获取相应的值") @RequestMapping(value = "/getValueById", method = RequestMethod.GET) public <V> V getValueById(@ApiParam("主键") @RequestParam(required = true) Object pk, @ApiParam("字段") @RequestParam(required = true) String fieldName) { return baseService.getValueById(pk, fieldName); } @ApiOperation(value = "批量新增", notes = "批量新增") @RequestMapping(value = "/insertBatch", method = RequestMethod.POST) public int insertBatch(@RequestBody List<T> list) { return baseService.insertBatch(list); } @ApiOperation(value = "根据参数获取对象", notes = "根据参数获取对象") @RequestMapping(value = "/getEntityList", method = RequestMethod.POST) public List<T> getEntityList(@RequestBody T t) { return baseService.getEntityList(t); } @ApiOperation(value = "根据参数分页获取对象", notes = "根据参数分页获取对象") @RequestMapping(value = "/getEntityListForPage", method = RequestMethod.POST) public PageDto<T> getEntityListForPage(@RequestBody T t, @ApiParam("第几页") @RequestParam(value = "page", defaultValue = "1") int page, @ApiParam("每页几条数据") @RequestParam(value = "rows", defaultValue = "10") int rows, @ApiParam("正序还是反序") @RequestParam(required = false) String sort, @ApiParam("排序字段") @RequestParam(required = false) String order) { Pageable pageable = null; if (!StringUtils.isEmpty(order) && !StringUtils.isEmpty(sort)) { Sort sortObj = new Sort(Sort.Direction.fromStringOrNull(order), sort); pageable = new PageRequest(page - 1, rows, sortObj); } else { pageable = new PageRequest(page - 1, rows); } return PageUtils.loadPage(baseService.getEntityListForPage(t, pageable)); } }
package com.kelompoka.tubes; import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.view.inputmethod.EditorInfo; import android.widget.SearchView; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import com.kelompoka.tubes.adapter.GuruRecyclerViewAdapter; import com.kelompoka.tubes.database.DatabaseClient; import com.kelompoka.tubes.model.Guru; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.textfield.TextInputEditText; import java.util.List; public class GuruActivity extends AppCompatActivity { private TextInputEditText editText; private FloatingActionButton addBtn; private RecyclerView recyclerView; private SwipeRefreshLayout refreshLayout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_guru); editText = findViewById(R.id.input_name); addBtn = findViewById(R.id.add_member); refreshLayout = findViewById(R.id.swipe_refresh); recyclerView = findViewById(R.id.user_rv); recyclerView.setLayoutManager(new LinearLayoutManager(this)); addBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Fragment AddFragment = new AddGuruFragment(); getSupportFragmentManager() .beginTransaction() .replace(R.id.frame_layout, AddFragment) .commit(); } }); refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { getUsers(); refreshLayout.setRefreshing(false); } }); getUsers(); } private void getUsers(){ class GetUsers extends AsyncTask<Void, Void, List<Guru>> { @Override protected List<Guru> doInBackground(Void... voids) { List<Guru> guruList = DatabaseClient .getInstance(getApplicationContext()) .getDatabase() .guruDao() .getAll(); return guruList; } @Override protected void onPostExecute(List<Guru> users) { super.onPostExecute(users); final GuruRecyclerViewAdapter adapter = new GuruRecyclerViewAdapter(GuruActivity.this, users); recyclerView.setAdapter(adapter); if (users.isEmpty()){ Toast.makeText(getApplicationContext(), "Empty List", Toast.LENGTH_SHORT).show(); } SearchView searchView = findViewById(R.id.search); searchView.setImeOptions(EditorInfo.IME_ACTION_DONE); searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String s) { return false; } @Override public boolean onQueryTextChange(String s) { adapter.getFilter().filter(s); return false; } }); } } GetUsers get = new GetUsers(); get.execute(); } }
// Maryam Athar Khan // Lab 09 // October 30, 2015 // This program assigns students their midterm grades using arrays import java.util.Scanner; // import Scanner class public class Students { // define a class public static void main(String[] args) { // define the main method Scanner myScanner=new Scanner(System.in);// declare scanner variable int x=(int)(Math.random()*6)+5; // random integer between 5-10 String[] students= new String[x]; // declare an array, and create an array System.out.println("Enter " +x+ " student names:"); // ask the user to input x amount of names for (int i=0; i<x; i++) { // loop created to run until all the arrays are filed students[i]=myScanner.next(); // user's input assigned inside the array } // end of for loop int[] midterms= new int[x]; // declare the midterms array, create it, and assign it the same size as the student's arrays for (int i=0; i<x; i++) { /// loop runs and fills all the midterm arrays midterms[i]=(int)(Math.random()*101);// assigns random integers to midterm arrays } // end of loop for (int i=0; i<x;i++) { System.out.println(students[i]+": "+midterms[i]); } } // end of main method } // end of class
package com.peng.pp_app_sdk.utils.handler; import android.os.Handler; import android.os.Looper; import android.os.Message; /** * Created on 2015/12/9 0009. * Author wangpengpeng * Email 1678173987@qq.com * Description Handler的封装类 */ public class HandlerUtils extends Handler implements IHandler { private IHandler iHandler; public HandlerUtils(Looper looper) { super(looper); } public HandlerUtils(IHandler iHandler) { this.iHandler = iHandler; } public HandlerUtils(Looper looper, IHandler handlerInterface) { super(looper); this.iHandler = handlerInterface; } //设置监听 public void setiHandler(IHandler iHandler) { this.iHandler = iHandler; } /** * 设置回调让其执行handlerMessage方法 * @param msg */ @Override public void handleMessage(Message msg) { super.handleMessage(msg); if (iHandler != null) { iHandler.handleMessage(msg); } } }
package com.tinroof; import javax.persistence.*; /** * Created by Brett on 12/21/16. */ @Entity @Table(name="calendar") public class Calendar { @Id @GeneratedValue int calendarId; @Column String name; @ManyToOne User user; public Calendar(String name, User user) { this.name = name; this.user = user; } public int getCalendarId() { return calendarId; } public void setCalendarId(int calendarId) { this.calendarId = calendarId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } }
package dentistrymanager; @SuppressWarnings("serial") public class DentistCalendar extends PartnerCalendar { public DentistCalendar() { super(0); super.setTitle("Dentist Calender"); } }
package com.corejsf.ch7; import java.io.Serializable; import java.util.Date; import javax.enterprise.context.SessionScoped; import javax.inject.Named; import javax.validation.constraints.Future; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.Size; @Named @SessionScoped public class PaymentBean2 implements Serializable { /** * */ private static final long serialVersionUID = 3986272311274828564L; @Min(10) @Max(10000) private double amount; @Size(min=13, message="com.corejsf.creditCardLength") @LuhnCheck private String card; @Future private Date date = new Date(); public double getAmount() { return amount; } public void setAmount(double amount) { this.amount = amount; } public String getCard() { return card; } public void setCard(String card) { this.card = card; } public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } }
package de.jmda.app.cgol.xy; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Optional; import de.jmda.app.cgol.Cell; import de.jmda.app.cgol.Population; /** * Implements {@link Population} so that it contains only living {@link Cell}s. */ public class XYPopulation implements Population<XYCell> { private Map<Integer, Map<Integer, XYCell>> cellsByCol = new HashMap<>(); private Map<Integer, Map<Integer, XYCell>> cellsByRow = new HashMap<>(); @Override public Collection<XYCell> getCells() { Collection<XYCell> result = new HashSet<>(); // iterates over cells by col // for each entry // iterates over cells by row // add cell to result cellsByCol.forEach((col, cellsByCol) -> { cellsByCol.forEach((row, cell) -> result.add(cell)); }); return result; } public Optional<XYCell> remove(int x, int y) { XYCell resultForCol = null; XYCell resultForRow = null; Map<Integer, XYCell> cellsInCol = cellsByCol.get(x); if (cellsInCol != null) { resultForCol = cellsInCol.remove(y); } Map<Integer, XYCell> cellsInRow = cellsByRow.get(y); if (cellsInRow != null) { resultForRow = cellsInRow.remove(x); } if (resultForCol == resultForRow) { return Optional.of(resultForCol); } throw new IllegalStateException("inconsistency in internal data at " + getClass().getName()); } public Optional<XYCell> add(int x, int y) { if (getCellByCol(x, y).isPresent()) { // there already is a cell at x,y return Optional.empty(); } else { XYCell result = new XYCell(x, y, this); // update cellsByCol Map<Integer, XYCell> col = cellsByCol.get(x); if (col != null) { col.put(y, result); } else { col = new HashMap<>(); col.put(y, result); cellsByCol.put(x, col); } // update cellsByRow Map<Integer, XYCell> row = cellsByRow.get(y); if (row != null) { row.put(x, result); } else { row = new HashMap<>(); row.put(x, result); cellsByRow.put(y, row); } // finally update neighbourship result.updateNeighbourship(); return Optional.of(result); } } public String asString(int xStart, int xStop, int yStart, int yStop) { StringBuffer result = new StringBuffer(); for (int y = (yStop - 1); y >= yStart; y--) { result.append("row " + y + " ["); Optional<Map<Integer, XYCell>> row = Optional.ofNullable(cellsByRow.get(y)); if (row.isPresent()) { for (int x = xStart; x < xStop; x++) { Optional<Cell> cell = Optional.ofNullable(row.get().get(x)); if (cell.isPresent()) { result.append('*'); } else { result.append(' '); } } } else { for (int x = xStart; x < xStop; x++) { result.append(' '); } } result.append("]\n"); } return result.toString(); } public Map<Integer, Map<Integer, XYCell>> getCellsByCol() { return cellsByCol; } public Map<Integer, Map<Integer, XYCell>> getCellsByRow() { return cellsByRow; } public Optional<XYCell> getCell(int x, int y) { Optional<XYCell> resultByCol = getCellByCol(x, y); Optional<XYCell> resultByRow = getCellByRow(x, y); Optional<XYCell> result = Optional.ofNullable(null); if (resultByCol.isPresent() && resultByRow.isPresent()) { if (resultByCol.get() == resultByRow.get()) { result = Optional.of(resultByCol.get()); } } return result; } public Optional<XYCell> getCellByCol(int x, int y) { Container<XYCell> result = new Container<>(); Optional<Map<Integer, XYCell>> optionalCol = Optional.ofNullable(cellsByCol.get(x)); optionalCol.ifPresent( col -> { result.value = col.get(y); }); return Optional.ofNullable(result.value); } public Optional<XYCell> getCellByRow(int x, int y) { Container<XYCell> result = new Container<>(); Optional<Map<Integer, XYCell>> optionalRow = Optional.ofNullable(cellsByRow.get(y)); optionalRow.ifPresent( row -> { result.value = row.get(x); }); return Optional.ofNullable(result.value); } /** * container for objects that get accessed (assigned) inside lambdas * * @param <T> */ private class Container<T> { private T value; } }
package com.tencent.mm.boot.svg.a.a; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint.Cap; import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.os.Looper; import com.tencent.mm.svg.WeChatSVGRenderC2Java; import com.tencent.mm.svg.c; public final class th extends c { private final int height = 120; private final int width = 120; protected final int b(int i, Object... objArr) { switch (i) { case 0: return 120; case 1: return 120; case 2: Canvas canvas = (Canvas) objArr[0]; Looper looper = (Looper) objArr[1]; Matrix f = c.f(looper); float[] e = c.e(looper); Paint i2 = c.i(looper); i2.setFlags(385); i2.setStyle(Style.FILL); Paint i3 = c.i(looper); i3.setFlags(385); i3.setStyle(Style.STROKE); i2.setColor(-16777216); i3.setStrokeWidth(1.0f); i3.setStrokeCap(Cap.BUTT); i3.setStrokeJoin(Join.MITER); i3.setStrokeMiter(4.0f); i3.setPathEffect(null); Paint a = c.a(i3, looper); a.setStrokeWidth(1.0f); canvas.save(); float[] a2 = c.a(e, 1.0f, 0.0f, 15.0f, 0.0f, 1.0f, 0.0f); f.reset(); f.setValues(a2); canvas.concat(f); Paint a3 = c.a(i2, looper); a3.setColor(-1); canvas.save(); Paint a4 = c.a(a3, looper); Path j = c.j(looper); j.moveTo(60.0f, 0.0f); j.lineTo(90.0f, 30.0f); j.lineTo(90.0f, 116.0f); j.cubicTo(90.0f, 118.20914f, 88.20914f, 120.0f, 86.0f, 120.0f); j.lineTo(4.0f, 120.0f); j.cubicTo(1.790861f, 120.0f, 2.705415E-16f, 118.20914f, 0.0f, 116.0f); j.lineTo(0.0f, 4.0f); j.cubicTo(-2.705415E-16f, 1.790861f, 1.790861f, 4.0581224E-16f, 4.0f, 0.0f); j.lineTo(60.0f, 0.0f); j.close(); WeChatSVGRenderC2Java.setFillType(j, 2); canvas.drawPath(j, a4); canvas.restore(); a3 = c.a(i2, looper); a3.setColor(201326592); canvas.save(); a4 = c.a(a3, looper); j = c.j(looper); j.moveTo(60.0f, 0.0f); j.lineTo(90.0f, 30.0f); j.lineTo(90.0f, 116.0f); j.cubicTo(90.0f, 118.20914f, 88.20914f, 120.0f, 86.0f, 120.0f); j.lineTo(4.0f, 120.0f); j.cubicTo(1.790861f, 120.0f, 2.705415E-16f, 118.20914f, 0.0f, 116.0f); j.lineTo(0.0f, 4.0f); j.cubicTo(-2.705415E-16f, 1.790861f, 1.790861f, 4.0581224E-16f, 4.0f, 0.0f); j.lineTo(60.0f, 0.0f); j.close(); WeChatSVGRenderC2Java.setFillType(j, 2); canvas.drawPath(j, a4); canvas.restore(); i2 = c.a(i2, looper); i2.setColor(-16777216); j = c.j(looper); j.moveTo(90.0f, 30.0f); j.lineTo(64.0f, 30.0f); j.cubicTo(61.79086f, 30.0f, 60.0f, 28.209139f, 60.0f, 26.0f); j.lineTo(60.0f, 0.0f); j.lineTo(90.0f, 30.0f); j.close(); canvas.saveLayerAlpha(null, 25, 4); i3 = c.a(i2, looper); WeChatSVGRenderC2Java.setFillType(j, 2); canvas.drawPath(j, i3); canvas.restore(); canvas.save(); i2 = c.a(a, looper); i2.setColor(-8553091); e = c.a(a2, 1.0f, 0.0f, 22.0f, 0.0f, 1.0f, 44.0f); f.reset(); f.setValues(e); canvas.concat(f); canvas.save(); a = c.a(i2, looper); a.setStrokeWidth(2.2881355f); e = c.a(e, 0.70710677f, -0.70710677f, 22.135817f, 0.70710677f, 0.70710677f, -9.168955f); f.reset(); f.setValues(e); canvas.concat(f); Path j2 = c.j(looper); j2.moveTo(14.207197f, 14.207197f); j2.lineTo(7.4411693f, 36.830467f); j2.lineTo(30.064438f, 30.064438f); j2.lineTo(36.830467f, 7.4411693f); j2.lineTo(14.207197f, 14.207197f); j2.close(); canvas.drawPath(j2, a); canvas.restore(); canvas.save(); a = c.a(i2, looper); a.setStrokeWidth(2.2881355f); e = c.a(e, 0.70710677f, -0.70710677f, 22.135817f, 0.70710677f, 0.70710677f, -9.168955f); f.reset(); f.setValues(e); canvas.concat(f); j = c.j(looper); j.moveTo(14.207197f, 14.207197f); j.lineTo(7.4411693f, 36.830467f); j.lineTo(30.064438f, 30.064438f); j.lineTo(36.830467f, 7.4411693f); j.lineTo(14.207197f, 14.207197f); j.close(); canvas.drawPath(j, a); canvas.restore(); canvas.save(); Paint a5 = c.a(i2, looper); a5.setStrokeWidth(2.4f); a5.setStrokeCap(Cap.ROUND); a5.setStrokeJoin(Join.MITER); j = c.j(looper); j.moveTo(1.5254238f, 28.220339f); j.lineTo(21.624678f, 38.93592f); j.cubicTo(22.047419f, 39.172733f, 22.447042f, 39.172733f, 22.823547f, 38.93592f); j.cubicTo(23.200052f, 38.69911f, 29.506357f, 35.127247f, 41.742462f, 28.220339f); canvas.drawPath(j, a5); canvas.restore(); canvas.save(); a5 = c.a(i2, looper); a5.setStrokeWidth(2.4f); a5.setStrokeCap(Cap.ROUND); a5.setStrokeJoin(Join.MITER); j = c.j(looper); j.moveTo(2.0f, 34.0f); j.lineTo(22.099253f, 44.71558f); j.cubicTo(22.521996f, 44.952393f, 22.921618f, 44.952393f, 23.298124f, 44.71558f); j.cubicTo(23.67463f, 44.478767f, 29.980934f, 40.906906f, 42.217037f, 34.0f); canvas.drawPath(j, a5); canvas.restore(); canvas.restore(); canvas.restore(); c.h(looper); break; } return 0; } }
/* * 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.mycompany.springwebapp.dao; import com.mycompany.springwebapp.model.UserDetail; import com.mycompany.springwebapp.model.UserDto; import java.util.ArrayList; /** * * @author Siron */ public interface UserDao { public boolean insert(UserDto user); public ArrayList<UserDetail> selectAll(); }
package com.andy.weexlab.activity; /** * Created by Andy on 2017/9/12. */ public class StorageActivity extends BaseWXActivity { private boolean firstCreate; @Override public boolean renderLocal() { return false; } @Override public String urlRend() { return "http://192.168.31.212/storage_a.js"; } }
package com.test.inheritance.multi_level; /** * Created by srikanth on 21/12/16. */ public class IndianBike extends Bike{ }
package com.atguigu.springcloud.controller; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; @RestController @Slf4j public class PaymentController { @Value("${server.port}") private String serverPort; @GetMapping(value = "/payment/zk") public String paymentzk(){ return "springcloud with zookeeper:"+serverPort+"\t"+ UUID.randomUUID().toString(); } public static void main(String[] args) { AtomicInteger atomicInteger = new AtomicInteger(5); atomicInteger.compareAndSet(5,100); atomicInteger.getAndIncrement(); } }
package com.CoreJava; public class ExceptionFinally { String a="10"; int b=Integer.parseInt(a); public static void main(String s[]) { try { int length=s[0].length()+s[1].length(); if(length<10) return; System.out.println("Name length should be less than 20 in total"); } catch(ArrayIndexOutOfBoundsException e) { System.out.println("Two command line arguments required"); } finally { System.out.println("Thank You"); } } }
package com.ci.tileentity; import com.ci.api.tileentity.TileEntityWire; import java.util.Arrays; public class TileEntityWireCopper extends TileEntityWire { public TileEntityWireCopper(int type){ super(type); } }
package com.ceiba.parkingceiba.unit; import static org.junit.Assert.assertNotNull; import org.junit.Test; import com.ceiba.parkingceiba.domain.imp.RestriccionPlacaImp; public class RestriccionPlacaTest { @Test public void diaHabilParaPlacaQueIniciaPorA() { // Arrange RestriccionPlacaImp restriccionPlaca = new RestriccionPlacaImp(); // Act boolean diaHabil = restriccionPlaca.validadSiEsDomingoOLunes(); // Assert assertNotNull(diaHabil); } @Test public void diaNoHabilParaPlacaQueIniciaPorA() { // Arrange RestriccionPlacaImp restriccionPlaca = new RestriccionPlacaImp(); // Act boolean diaHabil = restriccionPlaca.validadSiEsDomingoOLunes(); // Assert assertNotNull(diaHabil); } }
package com.fordprog.matrix.interpreter.error.semantic; import com.fordprog.matrix.interpreter.CodePoint; public class OperationWithVoidFunctionSemanticError extends SemanticError { private final String identifier; public OperationWithVoidFunctionSemanticError(CodePoint codePoint, String identifier) { super(codePoint); this.identifier = identifier; } @Override public String getMessage() { return "Void function \'" + identifier + "\' can not be used in operation at " + getCodePoint(); } public String getIdentifier() { return identifier; } }
/** * 275. H-Index II * Medium */ public class Solution { public int hIndex(int[] citations) { int n = citations.length, l = 0, r = n; while (l < r) { int m = l + (r - l) / 2; if (n - m > citations[m]) { l = m + 1; } else { r = m; } } return n - l; } public static void main(String[] args) { int[][] citations = { { 0, 1, 3, 5, 6 }, { 1, 2, 100 }, {0} }; Solution s = new Solution(); for (int[] c : citations) { System.out.println(s.hIndex(c)); } } }
package Lab01.Zad3; public class Car { private String name; private CarSpeed speed; public Car(CarSpeed speed, String name) { this.speed = speed; this.name = name; } public void getCarName() { System.out.println(this.name); } public void getSpeed() { System.out.println(this.speed.getSpeed()); } public void setCarState(CarSpeed speed) { this.speed = speed; } public void setCarName(String name){ this.name = name; } }
package com.tencent.mm.plugin.fav.ui; import android.graphics.Bitmap; import com.tencent.mm.plugin.fav.ui.k.6; class k$6$1 implements Runnable { final /* synthetic */ Bitmap jaX; final /* synthetic */ 6 jaY; k$6$1(6 6, Bitmap bitmap) { this.jaY = 6; this.jaX = bitmap; } public final void run() { this.jaY.ixr.setImageBitmap(this.jaX); } }
/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/7.0.47 * Generated at: 2016-06-06 03:03:52 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp.WEB_002dINF.view; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private javax.el.ExpressionFactory _el_expressionfactory; private org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public void _jspInit() { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=utf-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write('\r'); out.write('\n'); String path = request.getContextPath(); out.write("\r\n"); out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n"); out.write("<html lang=\"en\">\r\n"); out.write("<head>\r\n"); out.write("<title>智能果云平台</title>\r\n"); out.write("<meta charset=\"UTF-8\" />\r\n"); out.write("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n"); out.write("<link rel=\"stylesheet\" href=\""); out.print(path); out.write("/css/bootstrap.min.css\" />\r\n"); out.write("<link rel=\"stylesheet\" href=\""); out.print(path); out.write("/css/bootstrap-responsive.min.css\" />\r\n"); out.write("<link rel=\"stylesheet\" href=\""); out.print(path); out.write("/css/uniform.css\" />\r\n"); out.write("<link rel=\"stylesheet\" href=\""); out.print(path); out.write("/css/select2.css\" />\r\n"); out.write("<link rel=\"stylesheet\" href=\""); out.print(path); out.write("/css/unicorn.main.css\" />\r\n"); out.write("<link rel=\"stylesheet\" href=\""); out.print(path); out.write("/css/unicorn.grey.css\" class=\"skin-color\" />\r\n"); out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n"); out.write("<script language=\"javascript\">\r\n"); out.write("\tfunction open_table(html_name) {\r\n"); out.write("\t\t//$(\".container-fluid\").html(\"<h1>aaaaa</h1>\");\r\n"); out.write("\t\t$.ajax({\r\n"); out.write("\t\t\tasync : true,\r\n"); out.write("\t\t\tdataType : 'html',\r\n"); out.write("\t\t\turl : html_name + \".html\",\r\n"); out.write("\t\t\tsuccess : function(result) {\r\n"); out.write("\t\t\t\t$(\".container-fluid\").html(result);\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t});\r\n"); out.write("\t}\r\n"); out.write("</script>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\t<div id=\"header\" style=\"line-height: 77px;\">\r\n"); out.write("\t\t<span style=\"color: #fff; font-size: 36px; margin-left: 20px;\">智能果云平台</span>\r\n"); out.write("\t</div>\r\n"); out.write("\r\n"); out.write("\t<div id=\"user-nav\" class=\"navbar navbar-inverse\">\r\n"); out.write("\t\t<ul class=\"nav btn-group\">\r\n"); out.write("\t\t\t<li class=\"btn btn-inverse\"><a title=\"\" href=\"#\"><i class=\"icon icon-cog\"></i> <span class=\"text\">Settings</span></a></li>\r\n"); out.write("\t\t</ul>\r\n"); out.write("\t</div>\r\n"); out.write("\r\n"); out.write("\t<div id=\"sidebar\">\r\n"); out.write("\t\t<a href=\"\" class=\"visible-phone\"><i class=\"icon icon-home\"></i> Dashboard</a>\r\n"); out.write("\t\t<ul>\r\n"); out.write("\r\n"); out.write("\t\t\t<li><a href=\"#\" onclick=\"open_table('员工管理')\"><i class=\"icon icon-signal\"></i> <span>员工管理</span></a></li>\r\n"); out.write("\r\n"); out.write("\t\t\t<li class=\"submenu\"><a href=\"#\"><i class=\"icon icon-th-list\"></i> <span>桌台管理</span></a>\r\n"); out.write("\t\t\t\t<ul>\r\n"); out.write("\t\t\t\t\t<li><a href=\"#\" onclick=\"open_table('桌台列表管理')\">桌台列表</a></li>\r\n"); out.write("\t\t\t\t\t<li><a href=\"#\" onclick=\"open_table('桌台类型管理')\">桌台类型管理</a></li>\r\n"); out.write("\t\t\t\t</ul></li>\r\n"); out.write("\r\n"); out.write("\t\t\t<li class=\"submenu\"><a href=\"#\"><i class=\"icon icon-th-list\"></i> <span>菜品管理</span></a>\r\n"); out.write("\t\t\t\t<ul>\r\n"); out.write("\t\t\t\t\t<li><a href=\"#\" onclick=\"open_table('菜品列表')\">菜品列表</a></li>\r\n"); out.write("\t\t\t\t\t<li><a href=\"#\" onclick=\"open_table('菜品类别管理')\">菜品类别管理</a></li>\r\n"); out.write("\t\t\t\t</ul></li>\r\n"); out.write("\r\n"); out.write("\t\t\t<li><a href=\"#.html\" onclick=\"open_table('订单管理')\"><i class=\"icon icon-signal\"></i> <span>订单管理</span></a></li>\r\n"); out.write("\t\t\t<li><a href=\"#.html\"><i class=\"icon icon-inbox\"></i> <span>营业额</span></a></li>\r\n"); out.write("\t\t</ul>\r\n"); out.write("\t</div>\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\t<div id=\"content\">\r\n"); out.write("\t\t<div id=\"breadcrumb\">\r\n"); out.write("\t\t\t<a href=\"#\" title=\"Go to Home\" class=\"tip-bottom\"><i class=\"icon-home\"></i>导航</a> <a href=\"#\" class=\"current\">导航1</a>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t\t<div class=\"container-fluid\">\r\n"); out.write("\t\t\t<div class=\"row-fluid\">\r\n"); out.write("\t\t\t\t<div class=\"span12\">\r\n"); out.write("\r\n"); out.write("\t\t\t\t\t<div class=\"widget-box\">\r\n"); out.write("\t\t\t\t\t\t<div class=\"widget-title\">\r\n"); out.write("\t\t\t\t\t\t\t<h5>Dynamic table</h5>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"widget-content nopadding\">\r\n"); out.write("\t\t\t\t\t\t\t<table class=\"table table-bordered data-table\">\r\n"); out.write("\t\t\t\t\t\t\t\t<thead>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th>Rendering engine</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th>Browser</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th>Platform(s)</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th>Engine version</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t</thead>\r\n"); out.write("\t\t\t\t\t\t\t\t<tbody>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeX\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Trident</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Internet Explorer 4.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">4</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeC\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Trident</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Internet Explorer 5.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Trident</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Internet Explorer 5.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">5.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Trident</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Internet Explorer 6</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">6</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Trident</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Internet Explorer 7</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win XP SP2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">7</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Trident</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>AOL browser (AOL desktop)</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win XP</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">6</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Firefox 1.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98+ / OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.7</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Firefox 1.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98+ / OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Firefox 2.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98+ / OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Firefox 3.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 2k+ / OSX.3+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.9</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Camino 1.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Camino 1.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>OSX.3+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Netscape 7.2</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / Mac OS 8.6-9.2</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.7</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Netscape Browser 8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98SE+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.7</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Netscape Navigator 9</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98+ / OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.2</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.2</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.4</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.4</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.6</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.6</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.7</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.7</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mozilla 1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Seamonkey 1.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 98+ / OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gecko</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Epiphany 2.20</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Gnome</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Webkit</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Safari 1.2</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>OSX.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">125.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Webkit</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Safari 1.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>OSX.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">312.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Webkit</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Safari 2.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>OSX.4+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">419.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Webkit</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Safari 3.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>OSX.4+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">522.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Webkit</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>OmniWeb 5.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>OSX.4+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">420</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Webkit</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>iPod Touch / iPhone</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>iPod</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">420.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Webkit</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>S60</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>S60</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">413</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Opera 7.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.1+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Opera 7.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Opera 8.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Opera 8.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.2+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Opera 9.0</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 95+ / OSX.3+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Opera 9.2</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 88+ / OSX.3+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Opera 9.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Win 88+ / OSX.3+</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Opera for Wii</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Wii</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Nokia N800</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>N800</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Presto</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Nintendo DS browser</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Nintendo DS</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">8.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeC\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>KHTML</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Konqureror 3.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>KDE 3.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">3.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>KHTML</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Konqureror 3.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>KDE 3.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">3.3</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>KHTML</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Konqureror 3.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>KDE 3.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">3.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeX\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Tasman</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Internet Explorer 4.5</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mac OS 8-9</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeC\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Tasman</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Internet Explorer 5.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mac OS 7.6-9</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeC\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Tasman</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Internet Explorer 5.2</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Mac OS 8-X</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Misc</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>NetFront 3.1</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Embedded devices</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeA\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Misc</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>NetFront 3.4</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Embedded devices</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeX\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Misc</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Dillo 0.8</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Embedded devices</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeX\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Misc</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Links</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Text only</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeX\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Misc</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Lynx</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Text only</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeC\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Misc</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>IE Mobile</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Windows Mobile 6</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeC\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Misc</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>PSP browser</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>PSP</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr class=\"gradeU\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>Other browsers</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>All others</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td>-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<td class=\"center\">-</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t</tbody>\r\n"); out.write("\t\t\t\t\t\t\t</table>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\r\n"); out.write("\t\t\t<div class=\"row-fluid\">\r\n"); out.write("\t\t\t\t<div id=\"footer\" class=\"span12\">\r\n"); out.write("\t\t\t\t\t2012 &copy; Unicorn Admin. Brought to you by <a href=\"https://wrapbootstrap.com/user/diablo9983\">diablo9983</a>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\t<script src=\""); out.print(path); out.write("/js/jquery.min.js\"></script>\r\n"); out.write("\t<script src=\""); out.print(path); out.write("/js/jquery.ui.custom.js\"></script>\r\n"); out.write("\t<script src=\""); out.print(path); out.write("/js/bootstrap.min.js\"></script>\r\n"); out.write("\t<script src=\""); out.print(path); out.write("/js/jquery.uniform.js\"></script>\r\n"); out.write("\t<script src=\""); out.print(path); out.write("/js/select2.min.js\"></script>\r\n"); out.write("\t<script src=\""); out.print(path); out.write("/js/jquery.dataTables.min.js\"></script>\r\n"); out.write("\t<script src=\""); out.print(path); out.write("/js/unicorn.js\"></script>\r\n"); out.write("\t<script src=\""); out.print(path); out.write("/js/unicorn.tables.js\"></script>\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
/* * Copyright 2008 Kjetil Valstadsve * * 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 vanadis.remoting; public final class TargetMatch<T> { private final Session session; private final T target; public static <T> TargetMatch<T> create(Session session, T target) { return new TargetMatch<T>(session, target); } private TargetMatch(Session session, T target) { this.session = session; this.target = target; } public T getTarget() { return target; } public Session getSession() { return session; } }
package Raghu1; import java.util.Scanner; public class HelloScan { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("enter the name"); sc.next(); System.out.println("enter the number"); sc.next(); } }
package market; public class Fruit { private String name; private int price; private static Fruit cheapestFruit; private Fruit(String name, int price) { this.name = name; this.price = price; if ((cheapestFruit == null) || (price < cheapestFruit.price)) cheapestFruit = this; } public static Fruit make(String name, int price) { if (name.length() < 2 || price <= 0 || price > 5000 || price%5 != 0) return null; int i = 0; while (i < name.length()) { if (!Character.isLetter(name.charAt(i))) return null; ++i; } return new Fruit(name, price); } public int getPrice() { return price; } public boolean cheaperThan(Fruit other) { return (price < other.price); } public String show() { if (price >= 1000) return String.format("%s (%d %03d Ft)", name, price/1000, price%1000); else return String.format("%s (%d Ft)", name, price); } public static Fruit getCheapestFruit() { return cheapestFruit; } }
package com.appc.report.controller; import org.springframework.stereotype.Controller; 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.servlet.ModelAndView; @Controller @RequestMapping("/demo") public class DemoController { @RequestMapping(value = "table", method = RequestMethod.GET) public ModelAndView source(@RequestParam(required = false) Long id) { ModelAndView mv = new ModelAndView("demo/table"); return mv; } }
package solution; /** * User: jieyu * Date: 10/29/16. */ public class SpiralMatrixII59 { public int[][] generateMatrix(int n) { int count = 0; int x = 0, y = 0, temp = 0; int[][] result = new int[n][n]; while (count < n * n) { temp = goRight(result, x, y, count + 1); y += temp - 1; x++; count += temp; if (count == n*n) { return result; } temp = goDown(result, x, y, count + 1); x += temp - 1; y--; count += temp; if (count == n*n) { return result; } temp = goLeft(result, x, y, count + 1); y -= temp - 1; x--; count += temp; if (count == n*n) { return result; } temp = goUp(result, x, y, count + 1); x -= temp - 1; y++; count += temp; } return result; } private int goRight(int[][] result, int x, int y, int num) { int start = num; while (y < result.length && result[x][y] == 0) { result[x][y] = num; y++; num++; } return num-start; } private int goDown(int[][] result, int x, int y, int num) { int start = num; while (x < result.length && result[x][y] == 0) { result[x][y] = num; x++; num++; } return num-start; } private int goLeft(int[][] result, int x, int y, int num) { int start = num; while (y >= 0 && result[x][y] == 0) { result[x][y] = num; y--; num++; } return num-start; } private int goUp(int[][] result, int x, int y, int num) { int start = num; while (x >= 0 && result[x][y] == 0) { result[x][y] = num; x--; num++; } return num-start; } }
package com.swmansion.gesturehandler.react; import android.support.v4.f.l; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; import com.facebook.react.uimanager.events.Event; import com.facebook.react.uimanager.events.RCTEventEmitter; public final class b extends Event<b> { private static final l.c<b> a = new l.c(7); private WritableMap b; public static b a(com.swmansion.gesturehandler.b paramb, c<com.swmansion.gesturehandler.b> paramc) { b b2 = (b)a.acquire(); b b1 = b2; if (b2 == null) b1 = new b(); b1.init(paramb.f.getId()); b1.b = Arguments.createMap(); if (paramc != null) paramc.a(paramb, b1.b); b1.b.putInt("handlerTag", paramb.e); b1.b.putInt("state", paramb.g); return b1; } public final boolean canCoalesce() { return false; } public final void dispatch(RCTEventEmitter paramRCTEventEmitter) { paramRCTEventEmitter.receiveEvent(getViewTag(), "onGestureHandlerEvent", this.b); } public final short getCoalescingKey() { return 0; } public final String getEventName() { return "onGestureHandlerEvent"; } public final void onDispose() { this.b = null; a.release(this); } } /* Location: C:\Users\august\Desktop\tik\df_rn_kit\classes.jar.jar!\com\swmansion\gesturehandler\react\b.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */