blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
3135a6dced8697e634295aa722e2c18e50d3843a
377405a1eafa3aa5252c48527158a69ee177752f
/src/com/biznessapps/music/MusicDetailFragment$1$1.java
72176f405c70610825b197583be50c74443980ac
[]
no_license
apptology/AltFuelFinder
39c15448857b6472ee72c607649ae4de949beb0a
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
refs/heads/master
2016-08-12T04:00:46.440301
2015-10-25T18:25:16
2015-10-25T18:25:16
44,921,258
0
1
null
null
null
null
UTF-8
Java
false
false
1,131
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.biznessapps.music; import android.os.Handler; import com.biznessapps.api.AppHandlers; import com.biznessapps.player.PlayerStateListener; // Referenced classes of package com.biznessapps.music: // MusicDetailFragment class this._cls1 implements Runnable { final is._cls0 this$1; public void run() { MusicDetailFragment.access$000(_fld0); } it>() { this$1 = this._cls1.this; super(); } // Unreferenced inner class com/biznessapps/music/MusicDetailFragment$1 /* anonymous class */ class MusicDetailFragment._cls1 extends PlayerStateListener { final MusicDetailFragment this$0; public void onStateChanged(int i) { AppHandlers.getUiHandler().post(new MusicDetailFragment._cls1._cls1()); } { this$0 = MusicDetailFragment.this; super(); } } }
[ "rich.foreman@apptology.com" ]
rich.foreman@apptology.com
eb0d7fc784100d3cb207b5636adaa786e5cd213c
91adc264eb26be39c656f054005ec740d07900bd
/hongshi_project/hrhi/src/public/nc/itf/hi/IPsnCardBrowser.java
9a3e2b63a34178a8e762cd01bb44d6fb8044c1cd
[]
no_license
xhrise/nc-workspaces
9f30caf273e932bd1b4c2d419ac6bef4ef55e1cc
d5fcbce810ba4d4b5405edabfb5a26c36a19e7f8
refs/heads/master
2020-05-19T10:43:29.058686
2013-06-20T02:40:27
2013-06-20T02:40:27
37,459,512
0
1
null
null
null
null
GB18030
Java
false
false
2,596
java
package nc.itf.hi; import nc.vo.hi.hi_301.HRMainVO; import nc.vo.hi.hi_401.PsnDataVO; import nc.vo.hr.formulaset.BusinessFuncParser_sql; import nc.vo.pub.BusinessException; import nc.vo.pub.query.ConditionVO; public interface IPsnCardBrowser { /** * 查询人数 * * @param pk_corp * @param deptdoclist * @param iPsnScope * @param conditions * @param powerSql * @param normalwheresql * @return * @throws BusinessException */ public int queryPersonCount(String pk_corp, String[] deptdoclist, int iPsnScope, ConditionVO[] conditions, String powerSql, String normalwheresql) throws BusinessException; /** * 根据人员pk,信息集字典vo获得人员信息集信息 * * @param pk_psndoc * @param tablecode * @param corpID * @param condition * @return * @throws BusinessException */ public PsnDataVO[][] queryCorpPsndataBySet(String pk_psndoc, String[] tablecode, String corpID, int condition) throws BusinessException; /** * 通过公司主键和部门主键人员归属范围,返回一个VO数组,如果部门为空,则返回该公司下的所有vo * * @param pk_corp * @param pk_psndoc * @return * @throws BusinessException */ public HRMainVO queryPsnByPsnIdScope(String pk_corp, String pk_psndoc, BusinessFuncParser_sql funcParser) throws BusinessException; /** * * @param pk_corp * @param pk_psndoc * @return * @throws BusinessException */ public HRMainVO queryPsnByPsnIdScopeNotTransPk(String pk_corp, String pk_psndoc, BusinessFuncParser_sql funcParser) throws BusinessException; /** * * @param pk_corp * @param deptdoclist * @param iPsnScope * @param conditions * @param powerSql * @param normalwheresql * @return * @throws BusinessException */ public HRMainVO[] queryAllByCorpDeptScopeIncludeChild(String pk_corp, String[] deptdoclist, int iPsnScope, ConditionVO[] conditions, String powerSql, String normalwheresql, BusinessFuncParser_sql funcParser) throws BusinessException; /** * * @param pk_corp * @param deptdoclist * @param iPsnScope * @param defFieldNames * @param defFieldTypes * @param sPsnPkFilter * @param printpara * @return * @throws BusinessException */ public HRMainVO[] queryAllByCorpDeptScopeIncludeChild(String pk_corp, String[] deptdoclist, int iPsnScope, ConditionVO[] conditions, String powerSql, String normalwheresql, int[] printpara, BusinessFuncParser_sql funcParser) throws BusinessException; }
[ "comicme_yanghe@126.com" ]
comicme_yanghe@126.com
b6874e0ed3eb8520b1fa50fdd8e6c5d0d881072e
19c445c78c95e340dac3c838150c40e1580b4e92
/src/test/java/perf/RecordBase.java
1d9ad01616e13fa9dc8908c224aeb4ede46a85ef
[ "Apache-2.0" ]
permissive
FasterXML/jackson-databind
c718cf79367c61e8e56c35defe3d8a75d8969c1c
39c4f1f5b5d1c03e183a141641021019b87e61a0
refs/heads/2.16
2023-08-29T00:20:02.632707
2023-08-26T01:58:29
2023-08-26T01:58:29
3,038,937
3,270
1,604
Apache-2.0
2023-09-12T16:54:41
2011-12-23T07:17:41
Java
UTF-8
Java
false
false
380
java
package perf; public class RecordBase { public int age; public String firstName, lastName; public char gender; public boolean insured; protected RecordBase() { } protected RecordBase(int a, String fn, String ln, char g, boolean ins) { age = a; firstName = fn; lastName = ln; gender = g; insured = ins; } }
[ "tsaloranta@gmail.com" ]
tsaloranta@gmail.com
dbbd05192955f530bf712664d8cace668d43587a
63b5fdc6824b1fcbd6990fa23621794feaa85eab
/lesson9/src/main/java/otus/spring/albot/lesson9/business/BookCommentPreparerImpl.java
7890f584000c9a7bf264ec5997265cfd8c6c94a0
[]
no_license
DmitriyAl/2020-02-otus-spring-albot
32e228e6bb944b1de0088f40d02e6f39fe289d26
65fe2512c1f32cea1e91eefa5922fa7cac418a69
refs/heads/master
2021-02-17T17:12:29.749801
2020-09-07T09:33:32
2020-09-07T09:33:32
245,113,832
0
0
null
2020-08-31T19:43:24
2020-03-05T08:58:59
Java
UTF-8
Java
false
false
1,731
java
package otus.spring.albot.lesson9.business; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import otus.spring.albot.lesson9.dao.BookDao; import otus.spring.albot.lesson9.dao.CommentDao; import otus.spring.albot.lesson9.entity.Book; import otus.spring.albot.lesson9.entity.Comment; import otus.spring.albot.lesson9.model.BookComments; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * <pre> * $Id: $ * $LastChangedBy: $ * $LastChangedRevision: $ * $LastChangedDate: $ * </pre> * * @author Dmitrii Albot */ @Service @AllArgsConstructor public class BookCommentPreparerImpl implements BookCommentPreparer { private BookDao bookDao; private CommentDao commentDao; @Override @Transactional public BookComments extractAllCommentsForBookById(long id) { Book book = bookDao.findBookById(id); List<Comment> commentsForBook = commentDao.getCommentsForBook(book); return fillInBookComments(book, commentsForBook); } @Override @Transactional public List<BookComments> extractAllCommentsForBookByTemplate(String template) { List<Book> books = bookDao.findBookByName(template); if (books.isEmpty()) { return Collections.emptyList(); } List<BookComments> bookComments = new ArrayList<>(); for (Book book : books) { bookComments.add(extractAllCommentsForBookById(book.getId())); } return bookComments; } private BookComments fillInBookComments(Book book, List<Comment> comments) { return new BookComments(book.getName(), comments); } }
[ "dvalbot@mail.ru" ]
dvalbot@mail.ru
f5c0a606da90cd480a4f5b328a94486b2ead8af4
cbd008fd2a51bdce386bba16190869a75e897f6c
/java/src/PartOne/BiteCompute/q190/q190.java
2f7ef143476d60391b3af7328a3ce6f594acd16f
[]
no_license
Archer-Fang/algorithm
06e0ba598bc128bb28aca88ae6514976769bf411
6c3eb27998c1f21ecb5d65c422ad8d4da67ebf90
refs/heads/master
2022-03-09T09:45:56.365126
2022-03-09T09:09:06
2022-03-09T09:09:06
230,906,996
1
0
null
null
null
null
UTF-8
Java
false
false
548
java
package PartOne.BiteCompute.q190; /** * @author Created by Fangzj * @data 2021/3/18 20:28 **/ class Solution { // you need treat n as an unsigned value public int reverseBits(int n) { int ans=0; for (int i=0;i<32;i++){ ans<<=1; ans+=n&1; n>>=1; } return ans; } } public class q190 { public static void main(String[] args) { Solution solution=new Solution(); System.out.println(solution.reverseBits(0b00000010100101000001111010011100)); } }
[ "1091053002@qq.com" ]
1091053002@qq.com
5def9750878fe5bbe5ec652f43b518d3a1a70497
bbdcd6b5285345f663b6ba2a5c6b1c82dde31730
/server/game/src/main/java/com/wanniu/game/request/item/GetAllEquipDetailsHandler.java
4ecc12ea0bb2b42c05da2c3f3a81fdef9141f1fa
[]
no_license
daxingyou/yxdl
644074e78a9bdacf351959b00dc06322953a08d7
ac571f9ebfb5a76e0c00e8dc3deddb5ea8c00b61
refs/heads/master
2022-12-23T02:25:23.967485
2020-09-27T09:05:34
2020-09-27T09:05:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,538
java
package com.wanniu.game.request.item; import com.wanniu.core.game.entity.GClientEvent; import com.wanniu.core.game.protocol.PomeloRequest; import com.wanniu.core.game.protocol.PomeloResponse; import com.wanniu.game.bag.WNBag; import com.wanniu.game.player.WNPlayer; import java.io.IOException; import java.util.ArrayList; import java.util.List; import pomelo.area.ItemHandler; import pomelo.item.ItemOuterClass; @GClientEvent("area.itemHandler.getAllEquipDetailsRequest") public class GetAllEquipDetailsHandler extends PomeloRequest { public PomeloResponse request() throws Exception { final WNPlayer player = (WNPlayer) this.pak.getPlayer(); final WNBag wnBag = player.getWnBag(); ItemHandler.GetAllEquipDetailsRequest req = ItemHandler.GetAllEquipDetailsRequest.parseFrom(this.pak.getRemaingBytes()); return new PomeloResponse() { protected void write() throws IOException { ItemHandler.GetAllEquipDetailsResponse.Builder res = ItemHandler.GetAllEquipDetailsResponse.newBuilder(); List<ItemOuterClass.ItemDetail> data = new ArrayList<>(); data.addAll(wnBag.getAllEquipDetails4PayLoad()); data.addAll(player.equipManager.getAllEquipDetails4PayLoad()); data.addAll(player.wareHouse.getAllEquipDetails4PayLoad()); res.setS2CCode(200); res.addAllS2CItems(data); this.body.writeBytes(res.build().toByteArray()); } }; } }
[ "parasol_qian@qq.com" ]
parasol_qian@qq.com
76b1eb21979f0bfc6518f679e09468f70f73676d
03e124899c0998e104f5acb3e2f8917d04868434
/JAX-WS08-RI-Consumer-Stub-BookStore/src/com/nt/service/BookConsumer.java
64a8c521b06b5b46ddf7db2536659f397e65572d
[]
no_license
devajdev/Webservices
72420c8e1860863f199d477762677d64651112e1
3d0b74949980d3aa939d612df63abf4fd6b7e0a4
refs/heads/master
2020-04-17T07:05:37.181187
2019-01-18T06:13:15
2019-01-18T06:13:15
166,353,429
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
package com.nt.service; import com.nt.res.bindings.BookResType; public class BookConsumer { public static void main(String[] args) { BookImplService service=new BookImplService(); Book book=service.getBookImplPort(); BookResType type=book.searchBook(101); System.out.println("BookId : "+type.getBookId()); System.out.println("Book Price : "+type.getPrice()); System.out.println("Book Author : "+type.getAuthor()); System.out.println("Book Publication : "+type.getPublicationYear()); } }
[ "devaj04@gmail.com" ]
devaj04@gmail.com
ce82871f515e247289fbb8b01855a0a85ad4ea4c
b6e99b0346572b7def0e9cdd1b03990beb99e26f
/src/gcom/gui/cobranca/spcserasa/PesquisarNegativadorMovimentoAction.java
c885c0739d6ec96960f28091df67af8be361c747
[]
no_license
prodigasistemas/gsan
ad64782c7bc991329ce5f0bf5491c810e9487d6b
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
refs/heads/master
2023-08-31T10:47:21.784105
2023-08-23T17:53:24
2023-08-23T17:53:24
14,600,520
19
20
null
2015-07-29T19:39:10
2013-11-21T21:24:16
Java
ISO-8859-1
Java
false
false
8,048
java
package gcom.gui.cobranca.spcserasa; import gcom.cobranca.Negativador; import gcom.cobranca.NegativadorMovimento; import gcom.fachada.Fachada; import gcom.gui.ActionServletException; import gcom.gui.GcomAction; import gcom.spcserasa.FiltroNegativador; import gcom.spcserasa.FiltroNegativadorMovimento; import gcom.util.ConstantesSistema; import gcom.util.Util; import gcom.util.filtro.Intervalo; import gcom.util.filtro.ParametroSimples; import java.util.Collection; import java.util.Date; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * [UC0674] Pesquisar Negativador Movimento * * @author Yara Taciane * @date 27/128/2007 * */ public class PesquisarNegativadorMovimentoAction extends GcomAction { /** * [UC0674] Esse caso de uso efetua pesquisa de Negativador Movimento * * @author Yara Taciane * @date 27/12/2007 * * @param actionMapping * @param actionForm * @param httpServletRequest * @param httpServletResponse * @return ActionForward */ public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { HttpSession sessao = httpServletRequest.getSession(false); ActionForward retorno = actionMapping.findForward("listaNegativadorMovimento"); //Obtém a instância da Fachada Fachada fachada = Fachada.getInstancia(); //HttpSession sessao = httpServletRequest.getSession(false); // Obtém o action form PesquisarNegativadorMovimentoActionForm form = (PesquisarNegativadorMovimentoActionForm) actionForm; // Recupera os parâmetros do form String idNegativador = (String) form.getIdNegativador(); String codigoMovimento = (String) form.getCodigoMovimento(); String numeroSequencialEnvio = (String) form.getNumeroSequencialEnvio(); String dataProcessamentoInicial = (String) form.getDataProcessamentoInicial(); String dataProcessamentoFinal = (String) form.getDataProcessamentoFinal(); boolean peloMenosUmParametroInformado = false; FiltroNegativadorMovimento filtroNegativadorMovimento = new FiltroNegativadorMovimento(); //verificar se está certo se esse id é o do cliente ou do negativador if (idNegativador != null && !idNegativador.equals("-1")) { filtroNegativadorMovimento.adicionarParametro(new ParametroSimples(FiltroNegativadorMovimento.NEGATIVADOR_ID,idNegativador)); peloMenosUmParametroInformado = true; } else { throw new ActionServletException("atencao.required", null, "Negativador"); } if (codigoMovimento != null && !codigoMovimento.equals("")) { if(!codigoMovimento.equals("3")){ filtroNegativadorMovimento.adicionarParametro(new ParametroSimples( FiltroNegativadorMovimento.CODIGO_MOVIMENTO, new Integer(codigoMovimento))); peloMenosUmParametroInformado = true; } }else { throw new ActionServletException("atencao.required", null, "Tipo Movimento"); } if (numeroSequencialEnvio != null && !numeroSequencialEnvio.equals("") ) { filtroNegativadorMovimento.adicionarParametro(new ParametroSimples( FiltroNegativadorMovimento.NUMERO_SEQUENCIAL_ENVIO, new Integer(numeroSequencialEnvio))); peloMenosUmParametroInformado = true; } if ((dataProcessamentoInicial != null && !dataProcessamentoInicial.equals("")) && ((dataProcessamentoFinal != null && !dataProcessamentoFinal .equals("")))) { if (Util.validarDiaMesAno(dataProcessamentoInicial)) { throw new ActionServletException( "atencao.data.inicio.Contrato.invalida"); } if (Util.validarDiaMesAno(dataProcessamentoFinal)) { throw new ActionServletException( "atencao.data.fim.Contrato.invalida"); } Date dataProcessamentoInicialFormatada = Util.converteStringParaDate(dataProcessamentoInicial); Date dataProcessamentoFinalFormatada = Util.converteStringParaDate(dataProcessamentoFinal); if (dataProcessamentoInicialFormatada.after(dataProcessamentoFinalFormatada)) { String dataInicio = Util.formatarData(dataProcessamentoInicialFormatada); throw new ActionServletException( "atencao.data.inicio.nao.superior.data.corrente", null,dataInicio); } filtroNegativadorMovimento .adicionarParametro(new Intervalo( FiltroNegativadorMovimento.DATA_PROCESSAMENTO_ENVIO, dataProcessamentoInicialFormatada, dataProcessamentoFinalFormatada)); } // Erro caso o usuário mandou filtrar sem nenhum parâmetro if (!peloMenosUmParametroInformado) { throw new ActionServletException("atencao.filtro.nenhum_parametro_informado"); } // Faz a pesquisa baseada no filtro Collection collNegativadorMovimento = fachada.pesquisar(filtroNegativadorMovimento, NegativadorMovimento.class.getName()); // Verificar se a pesquisa de NegativadorMovimento não está vazia if (collNegativadorMovimento != null && !collNegativadorMovimento.isEmpty()) { // Aciona o controle de paginação para que sejam pesquisados apenas // os registros que aparecem na página filtroNegativadorMovimento.adicionarCaminhoParaCarregamentoEntidade("negativador.cliente"); Map resultado = controlarPaginacao(httpServletRequest, retorno, filtroNegativadorMovimento, NegativadorMovimento.class.getName()); collNegativadorMovimento = (Collection) resultado.get("colecaoRetorno"); retorno = (ActionForward) resultado.get("destinoActionForward"); // Manda a coleção das collNegativadorMovimento pesquisadas para o request httpServletRequest.getSession(false).setAttribute("collNegativadorMovimento", collNegativadorMovimento); } else if (collNegativadorMovimento == null || collNegativadorMovimento.isEmpty()) { // Nenhuma imovel cadastrado throw new ActionServletException( "atencao.pesquisa.nenhumresultado", null, "NegativadorMovimento"); } else if (collNegativadorMovimento.size() > ConstantesSistema.NUMERO_MAXIMO_REGISTROS_PESQUISA) { // Muitos registros encontrados throw new ActionServletException( "atencao.pesquisa.muitosregistros"); } //Exibe na Tela o nome do Cliente Negativador FiltroNegativador filtroNegativador = new FiltroNegativador(); filtroNegativador.adicionarParametro(new ParametroSimples(FiltroNegativador.ID,idNegativador)); filtroNegativador.adicionarCaminhoParaCarregamentoEntidade("cliente"); Collection collNegativador = fachada.pesquisar(filtroNegativador, Negativador.class.getName()); // Recupera da coleção o Negativador que vai ser atualizado Negativador negativador = (Negativador) Util.retonarObjetoDeColecao(collNegativador); if(negativador != null){ sessao.setAttribute("negativador", negativador); } return retorno; } }
[ "piagodinho@gmail.com" ]
piagodinho@gmail.com
76cd53a973b0609d2fcb3aff3c31f7d5a3ce8d88
da371006a02c6e80b68c32ae3bbdd32bc421c38a
/playgrounds/ivtExt/src/main/java/playground/clruch/jmapviewer/tilesources/MapnikTileSource.java
66744a7c7d12c778a3353c1fe0a7d3d0b9bfddc4
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
Udacity-repo/matsim
bf994ce83b50798bba6fc9d03f1d74fa6668a58f
7da270848e8b98f5447ed172a5115a1a27c48457
refs/heads/master
2020-12-02T22:08:09.188553
2017-06-27T16:06:40
2017-06-27T16:06:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
411
java
package playground.clruch.jmapviewer.tilesources; /** * The default "Mapnik" OSM tile source. */ public class MapnikTileSource extends CyclicTileSource { private static final String[] SERVER = { "a", "b", "c" }; /** * Constructs a new {@code "Mapnik"} tile source. */ public MapnikTileSource() { super("Mapnik", "https://%s.tile.openstreetmap.org", "MAPNIK", SERVER); } }
[ "jan.hakenberg@gmail.com" ]
jan.hakenberg@gmail.com
cdd00a16cb73d4a940a9e8ec026025034622e38a
14c8213abe7223fe64ff89a47f70b0396e623933
/com/google/api/client/repackaged/com/google/common/base/CharMatcher$RangesMatcher.java
0fae538f7b69b44976a1e2e960f9804f1cfe3c90
[ "MIT" ]
permissive
PolitePeoplePlan/backdoored
c804327a0c2ac5fe3fbfff272ca5afcb97c36e53
3928ac16a21662e4f044db9f054d509222a8400e
refs/heads/main
2023-05-31T04:19:55.497741
2021-06-23T15:20:03
2021-06-23T15:20:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package com.google.api.client.repackaged.com.google.common.base; import java.util.*; private static class RangesMatcher extends CharMatcher { private final String description; private final char[] rangeStarts; private final char[] rangeEnds; RangesMatcher(final String a3, final char[] v1, final char[] v2) { super(); this.description = a3; this.rangeStarts = v1; this.rangeEnds = v2; Preconditions.checkArgument(v1.length == v2.length); for (int a4 = 0; a4 < v1.length; ++a4) { Preconditions.checkArgument(v1[a4] <= v2[a4]); if (a4 + 1 < v1.length) { Preconditions.checkArgument(v2[a4] < v1[a4 + 1]); } } } @Override public boolean matches(final char a1) { int v1 = Arrays.binarySearch(this.rangeStarts, a1); if (v1 >= 0) { return true; } v1 = ~v1 - 1; return v1 >= 0 && a1 <= this.rangeEnds[v1]; } @Override public String toString() { return this.description; } @Override public /* bridge */ boolean apply(final Object a1) { return super.apply((Character)a1); } }
[ "66845682+chrispycreme420@users.noreply.github.com" ]
66845682+chrispycreme420@users.noreply.github.com
d01ad68ea542a333c00cdaa9c5d2fa3afefa1aae
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_1483488_0/java/twds/Main.java
f6df51b6e936815c3d2193f05c47172a5d91c30b
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
2,260
java
import java.io.FileInputStream; import java.util.*; import java.math.*; public class Main { static int[] toDigits(int val) { int count = 1; int temp = val / 10; while (temp > 0) { count++; temp /= 10; } int[] arr = new int[count]; temp = val; for (int i = 0; i < arr.length; i++) { arr[i] = temp % 10; temp /= 10; } return arr; } static int toInt(int[] digits) { int res = 0; int p = 1; for (int i = 0; i < digits.length; i++) { res += p * digits[i]; p *= 10; } return res; } public static void main(String[] args) throws Exception{ Scanner scan = new Scanner(System.in); //Scanner scan = new Scanner(new FileInputStream("C:\\Users\\wd\\Desktop\\")); char[] map = "yhesocvxduiglbkrztnwjpfmaq".toCharArray(); int taskCount = scan.nextInt(); scan.nextLine(); for (int taskIndex = 1; taskIndex <= taskCount; taskIndex++) { int A = scan.nextInt(); int B = scan.nextInt(); long result = 0; for (int i = A; i <= B; i++) { HashSet<Integer> checker = new HashSet<Integer>(); int[] base = toDigits(i); int[] copy = new int[base.length]; for (int j = 0; j < base.length; j++) { int index = base.length - 1; for (int k = j; k >= 0; k--) { copy[index--] = base[k]; } for (int k = base.length - 1; k > j; k--) { copy[index--] = base[k]; } int convert = toInt(copy); if (convert <= i || convert > B || checker.contains(convert)) { continue; } //System.out.println(i + " " + convert); checker.add(convert); result++; } } System.out.println("Case #" + taskIndex + ": " + result); } } }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
90367b3e8334fd0c4d27a0992413491a74111718
ea866a11daf4ebbecd080c19595867154ca95f45
/app/src/main/java/com/szy/yishopcustomer/Util/json/NullStringToEmptyAdapterFactory.java
b541338d2302c9705c704d64130dbe5b3fb8c285
[]
no_license
wongainia/lyzb
a7def27abf59371164a19344eede2b734403472c
22fcb1f45672c4186c883df88621b1913f789c80
refs/heads/master
2022-01-08T14:23:22.605769
2019-07-18T04:48:46
2019-07-18T04:48:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
package com.szy.yishopcustomer.Util.json; import com.google.gson.Gson; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; /** * Created by shidengzhong on 2019/1/3. */ public class NullStringToEmptyAdapterFactory<T> implements TypeAdapterFactory { public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { Class<T> rawType = (Class<T>) type.getRawType(); if (rawType != String.class) { return null; } return (TypeAdapter<T>) new StringAdapter(); } }
[ "chenchaozheng@lyzb.cn" ]
chenchaozheng@lyzb.cn
497b644e0e1c7001f67b38006e1f73cb705b1561
0a20a3db6c959204c3dc2c6e9d48b3d01757e2db
/app/src/main/java/com/TBI/Client/Bluff/Model/getNewNotification/DataSuggest.java
33f166b681ce8ef734717c73369fecaa5ea62992
[]
no_license
MeghaPatel2022/Blufff-Social-Media
60562661c2e49fe525119e145c76df162a76d5eb
c844ba06ee65b77bb3392ec790b93c1a03cea76b
refs/heads/master
2023-08-13T15:15:08.891655
2021-10-18T07:21:33
2021-10-18T07:21:33
418,386,265
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package com.TBI.Client.Bluff.Model.getNewNotification; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; public class DataSuggest { @SerializedName("success") @Expose private Boolean success; @SerializedName("message") @Expose private String message; @SerializedName("data") @Expose private List<Suggested> data = null; public Boolean getSuccess() { return success; } public void setSuccess(Boolean success) { this.success = success; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public List<Suggested> getData() { return data; } public void setData(List<Suggested> data) { this.data = data; } }
[ "megha.bpatel2022@gmail.com" ]
megha.bpatel2022@gmail.com
74ff7aedea3d11ada5857a97218c760e2664ac35
e861c6590f6ece5e3c31192e2483c4fa050d0545
/app/src/main/java/plugin/android/ss/com/testsettings/settings/development/EmulateDisplayCutoutPreferenceController.java
6e8a0f37110e758f8640be5d46e9828ac30afb87
[]
no_license
calm-sjf/TestSettings
fc9a9c466f007d5eac6b4acdf674cd2e0cffb9a1
fddbb049542ff8423bdecb215b71dbdcc143930c
refs/heads/master
2023-03-22T02:46:23.057328
2020-12-10T07:37:27
2020-12-10T07:37:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,729
java
/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package plugin.android.ss.com.testsettings.settings.development; import static android.os.UserHandle.USER_SYSTEM; import android.content.Context; import android.content.pm.PackageManager; import android.support.annotation.VisibleForTesting; import android.support.v7.preference.ListPreference; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceScreen; import android.text.TextUtils; import android.view.DisplayCutout; import com.android.settings.R; import com.android.settings.core.PreferenceControllerMixin; import com.android.settings.wrapper.OverlayManagerWrapper; import com.android.settings.wrapper.OverlayManagerWrapper.OverlayInfo; import com.android.settingslib.development.DeveloperOptionsPreferenceController; import java.util.List; public class EmulateDisplayCutoutPreferenceController extends DeveloperOptionsPreferenceController implements Preference.OnPreferenceChangeListener, PreferenceControllerMixin { private static final String KEY = "display_cutout_emulation"; private final OverlayManagerWrapper mOverlayManager; private final boolean mAvailable; private ListPreference mPreference; private PackageManager mPackageManager; @VisibleForTesting EmulateDisplayCutoutPreferenceController(Context context, PackageManager packageManager, OverlayManagerWrapper overlayManager) { super(context); mOverlayManager = overlayManager; mPackageManager = packageManager; mAvailable = overlayManager != null && getOverlayInfos().length > 0; } public EmulateDisplayCutoutPreferenceController(Context context) { this(context, context.getPackageManager(), new OverlayManagerWrapper()); } @Override public boolean isAvailable() { return mAvailable; } @Override public String getPreferenceKey() { return KEY; } @Override public void displayPreference(PreferenceScreen screen) { super.displayPreference(screen); setPreference((ListPreference) screen.findPreference(getPreferenceKey())); } @VisibleForTesting void setPreference(ListPreference preference) { mPreference = preference; } @Override public boolean onPreferenceChange(Preference preference, Object newValue) { return setEmulationOverlay((String) newValue); } private boolean setEmulationOverlay(String packageName) { OverlayInfo[] overlays = getOverlayInfos(); String currentPackageName = null; for (OverlayInfo o : overlays) { if (o.isEnabled()) { currentPackageName = o.packageName; } } if (TextUtils.isEmpty(packageName) && TextUtils.isEmpty(currentPackageName) || TextUtils.equals(packageName, currentPackageName)) { // Already set. return true; } final boolean result; if (TextUtils.isEmpty(packageName)) { result = mOverlayManager.setEnabled(currentPackageName, false, USER_SYSTEM); } else { result = mOverlayManager.setEnabledExclusiveInCategory(packageName, USER_SYSTEM); } updateState(mPreference); return result; } @Override public void updateState(Preference preference) { OverlayInfo[] overlays = getOverlayInfos(); CharSequence[] pkgs = new CharSequence[overlays.length + 1]; CharSequence[] labels = new CharSequence[pkgs.length]; int current = 0; pkgs[0] = ""; labels[0] = mContext.getString(R.string.display_cutout_emulation_none); for (int i = 0; i < overlays.length; i++) { OverlayInfo o = overlays[i]; pkgs[i+1] = o.packageName; if (o.isEnabled()) { current = i+1; } } for (int i = 1; i < pkgs.length; i++) { try { labels[i] = mPackageManager.getApplicationInfo(pkgs[i].toString(), 0) .loadLabel(mPackageManager); } catch (PackageManager.NameNotFoundException e) { labels[i] = pkgs[i]; } } mPreference.setEntries(labels); mPreference.setEntryValues(pkgs); mPreference.setValueIndex(current); mPreference.setSummary(labels[current]); } private OverlayInfo[] getOverlayInfos() { @SuppressWarnings("unchecked") List<OverlayInfo> overlayInfos = mOverlayManager.getOverlayInfosForTarget("android", USER_SYSTEM); for (int i = overlayInfos.size() - 1; i >= 0; i--) { if (!DisplayCutout.EMULATION_OVERLAY_CATEGORY.equals( overlayInfos.get(i).category)) { overlayInfos.remove(i); } } return overlayInfos.toArray(new OverlayInfo[overlayInfos.size()]); } @Override protected void onDeveloperOptionsSwitchDisabled() { super.onDeveloperOptionsSwitchDisabled(); setEmulationOverlay(""); updateState(mPreference); } }
[ "xiaoxiaoyu@bytedance.com" ]
xiaoxiaoyu@bytedance.com
097c57526ab8db4144639910c7f66063c4bb6ebb
c79a207f5efdc03a2eecea3832b248ca8c385785
/com.googlecode.jinahya/ocap-api/1.1.3/src/main/java/org/ocap/si/PATProgram.java
812ffcace7d41491112c2f3540bc78f334534fa4
[]
no_license
jinahya/jinahya
977e51ac2ad0af7b7c8bcd825ca3a576408f18b8
5aef255b49da46ae62fb97bffc0c51beae40b8a4
refs/heads/master
2023-07-26T19:08:55.170759
2015-12-02T07:32:18
2015-12-02T07:32:18
32,245,127
2
1
null
2023-07-12T19:42:46
2015-03-15T04:34:19
Java
UTF-8
Java
false
false
765
java
/* * PATProgram.java */ package org.ocap.si; /** * This interface represents an program block in the information loop of * the MPEG-2 PAT.Each PAT will contain a loop of these blocks. */ public interface PATProgram { /** * Get the program_number field. Sixteen bit field, specifies the * program to which the program_map_PID applies. If the value is * 0x0000, the program_map_PID, as returned bygetPID(), references * the network PID. * * @return The program number. */ public int getProgramNumber(); /** * Get the program_map_PID field. Thirteen bit field specifying * the PID of the transport stream packets. * * @return The program map PID. */ public int getPID(); }
[ "onacit@e3df469a-503a-0410-a62b-eff8d5f2b914" ]
onacit@e3df469a-503a-0410-a62b-eff8d5f2b914
3f94e29b464196f672d9de37dedbf5e06c8c892a
b2af4f7c12b481a08e266c4f3e934860719ac414
/p2p-exterface/src/main/java/com/bjpowernode/p2p/service/vo/ResultObject.java
8199093534bc3de9f3d9c051dcbbbd95e0abff6b
[]
no_license
yachaowang/p2p
d235f8b0d5625fedf2d34761b4cd28a6b74120f7
597359b2c7ec35720d58acbe50d5695bc0256b2c
refs/heads/master
2020-05-23T11:33:37.056628
2019-05-15T03:13:13
2019-05-15T03:13:13
186,738,789
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package com.bjpowernode.p2p.service.vo; import lombok.Data; import java.io.Serializable; /** * @ClassName ResultObject * @Description * @Version 1.0 * @Date 2019/3/28 21:37 * @Author wyc **/ @Data public class ResultObject implements Serializable { /** * SUCCESS|FAIL */ private String errorCode; }
[ "zs@bjpowernode.com" ]
zs@bjpowernode.com
b5096a843c952389881e0a2ff4fec8f717e2c5eb
1294552da428420f5106c1f705e67ceb44b44058
/think/src/thinkInJava/zyq15/Holder2.java
e99647e6b0754a70709f82f3008bdc2e3982cb72
[]
no_license
xiaodupi-zyq/javaStudy
e0137f4017dfa185b17df16b3ef76fb710c5b2e6
3a906107968b736bc39c2a16e93e20a322e3f7e2
refs/heads/master
2021-06-23T03:20:00.184844
2021-03-13T13:15:14
2021-03-13T13:15:14
198,929,279
1
0
null
null
null
null
UTF-8
Java
false
false
510
java
package thinkInJava.zyq15; public class Holder2 { private Object a; public void Holder2(Object a) { this.a = a; } public void set(Object a) { this.a = a; } public Object get() { return a; } public static void main(String[] args){ Holder2 h2 = new Holder2(); Automobile a = (Automobile)h2.get(); h2.set("Not an Automobile"); String s = (String) h2.get(); h2.set(1); Integer x = (Integer) h2.get(); } }
[ "741883796@qq.com" ]
741883796@qq.com
a87103ebbb9c7042e1ded83a5919599889e745e3
ef03c8f258d69e39c71e1de5492511323a7cc3af
/security-core/src/main/java/security/core/DTO/Role.java
29bc31d05d539c2f5aa33086a2571ddd39e7a0f3
[]
no_license
ysyl/security_module
f758a68d803000262769788544864987463fd2cf
01bd0b13294ef0e594f13b482fd1cdea52584c9f
refs/heads/master
2020-03-22T20:55:49.777749
2018-08-13T09:26:36
2018-08-13T09:26:36
140,643,252
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package security.core.DTO; import java.io.Serializable; import org.springframework.security.core.GrantedAuthority; public class Role implements Serializable, GrantedAuthority { /** * */ private static final long serialVersionUID = 1L; private Integer id; private String roleName; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getRoleName() { return roleName; } public void setRoleName(String roleName) { this.roleName = roleName; } @Override public String getAuthority() { // TODO Auto-generated method stub return this.roleName; } }
[ "zhoujian1237@gmail.com" ]
zhoujian1237@gmail.com
21877539bf1a90045699d77ee8ca64333378ff3f
dfbc143422bb1aa5a9f34adf849a927e90f70f7b
/Contoh Project/video walp/com/google/android/gms/internal/ads/fl.java
1ebecd4ac6f1967af850e0c712fa49e19de7bb70
[]
no_license
IrfanRZ44/Set-Wallpaper
82a656acbf99bc94010e4f74383a4269e312a6f6
046b89cab1de482a9240f760e8bcfce2b24d6622
refs/heads/master
2020-05-18T11:18:14.749232
2019-05-01T04:17:54
2019-05-01T04:17:54
184,367,300
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package com.google.android.gms.internal.ads; import android.content.Context; public abstract interface fl { public abstract ne<fm> a(Context paramContext); } /* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar * Qualified Name: com.google.android.gms.internal.ads.fl * JD-Core Version: 0.7.0.1 */
[ "irfan.rozal44@gmail.com" ]
irfan.rozal44@gmail.com
5816f26a98276e582e2991c914943eec0c75df9e
2cb35835bd987728f6a0173cad9df853e76fc1d6
/JavaCore/Collections/ListExample/src/main/java/vn/techmaster/Employee.java
62acb9dd774c80ad2c507c3da4ad191d3ff5efe1
[]
no_license
TechMaster/JavaCore
39b3773f82b3f8ecefff3b8e6bf62767900540fb
86f6ca5e210b56d410b47e56e0dd7d20f98d9f5a
refs/heads/main
2023-07-02T08:19:48.860211
2021-07-30T08:02:39
2021-07-30T08:02:39
326,530,123
3
9
null
null
null
null
UTF-8
Java
false
false
353
java
package vn.techmaster; public class Employee { int id; String name; int age; // phím tắt Alt + insert public Employee(int id, String name, int age){ this.id = id; this.name = name; this.age = age; } @Override public String toString() { return id + " - " +name +" - " + age; } }
[ "=" ]
=
9dadc2a3a2b3855b8abb17e36f32300b654e3bb6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_892c84a295de4d21652c0d4c7ed0e6d3d78bfffb/BaseCoreRenderer/20_892c84a295de4d21652c0d4c7ed0e6d3d78bfffb_BaseCoreRenderer_t.java
a16ff9e19fcf20a57a1c5fe88044734358b27b39
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,545
java
/* * Copyright 2004-2013 ICEsoft Technologies Canada Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.icemobile.renderkit; import java.io.IOException; import org.icemobile.component.IMobiComponent; import org.icemobile.util.ClientDescriptor; import java.lang.StringBuilder; import java.util.logging.Logger; import static org.icemobile.util.HTML.*; import static org.icemobile.util.Constants.*; public abstract class BaseCoreRenderer{ private static final Logger logger = Logger.getLogger(BaseCoreRenderer.class.toString()); public void writeStandardAttributes(IResponseWriter writer, IMobiComponent component, String baseClass, String disabledClass) throws IOException { StringBuilder inputStyle = new StringBuilder(baseClass); if (component.isDisabled()){ inputStyle.append(" ").append(disabledClass); } if (null != component.getStyleClass()) { inputStyle.append(" ").append(component.getStyleClass()); } if( inputStyle.length() > 0 ){ writer.writeAttribute(CLASS_ATTR, inputStyle); } if (null != component.getStyle()) { writer.writeAttribute(STYLE_ATTR, component.getStyle()); } if (component.isDisabled()) { writer.writeAttribute(DISABLED_ATTR, DISABLED_ATTR); } } public void writeStandardLayoutAttributes(IResponseWriter writer, IMobiComponent component, String baseClass) throws IOException { StringBuilder inputStyle = new StringBuilder(baseClass); if (null != component.getStyleClass()) { inputStyle.append(SPACE).append(component.getStyleClass()); } if( inputStyle.length() > 0 ){ writer.writeAttribute(CLASS_ATTR, inputStyle); } if (null != component.getStyle()) { writer.writeAttribute(STYLE_ATTR, component.getStyle()); } } public void writeHiddenInput(IResponseWriter writer, IMobiComponent comp) throws IOException{ writer.startElement(SPAN_ELEM, comp); writer.startElement(INPUT_ELEM, comp); writer.writeAttribute(TYPE_ATTR, INPUT_TYPE_HIDDEN); writer.writeAttribute(ID_ATTR, comp.getClientId()+SUFFIX_HIDDEN); writer.writeAttribute(NAME_ATTR, comp.getClientId()+SUFFIX_HIDDEN); writer.endElement(INPUT_ELEM); writer.endElement(SPAN_ELEM); } public void writeHiddenInput(IResponseWriter writer, IMobiComponent comp, String value) throws IOException{ writer.startElement(SPAN_ELEM, comp); writer.startElement(INPUT_ELEM, comp); writer.writeAttribute(TYPE_ATTR, INPUT_TYPE_HIDDEN); writer.writeAttribute(ID_ATTR, comp.getClientId()+SUFFIX_HIDDEN); writer.writeAttribute(NAME_ATTR, comp.getClientId()+SUFFIX_HIDDEN); writer.writeAttribute(VALUE_ATTR, value); writer.endElement(INPUT_ELEM); writer.endElement(SPAN_ELEM); } protected boolean isTouchEventEnabled(ClientDescriptor client) { // commenting out Blackberry at this time as support of touch events is // problematic // if (uai.sniffIphone() || uai.sniffAndroid() || uai.sniffBlackberry() if (client.isAndroidOS() && client.isTabletBrowser()) return false; if (client.isIOS() || client.isAndroidOS() ) { //assuming android phone return true; } return false; } protected boolean isStringAttributeEmpty(String inString){ if (inString==null){ return true; } if (inString.trim().equals("")) { return true; } if (inString.length()<1){ return true; } return false; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
03969a36771d7ef7c850cbb865f7a0c290ab54e9
58c23f6d66d08ef81c89d24f642f24f09704ec48
/csas-framework/hs-common/src/main/java/com/hoomsun/common/security/RSA.java
a76b4cc127f82194185498cb75a2ee20ca48e0e9
[]
no_license
ybak/casc-framework
5ed651901eb4357e807d3c3d3440ed26c1848d56
b76e68dd53cf26ce6302db545afd572a38aac3e3
refs/heads/master
2021-03-24T01:11:12.632781
2018-05-16T06:49:09
2018-05-16T06:49:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,671
java
/** * Copyright www.hoomsun.com 红上金融信息服务(上海)有限公司 */ package com.hoomsun.common.security; import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.PublicKey; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.X509EncodedKeySpec; import java.util.HashMap; import java.util.Map; import javax.crypto.Cipher; import org.apache.commons.codec.binary.Base64; /** * 作者:ywzou <br> * 创建时间:2017年11月17日 <br> * 描述:非对称加密 */ public class RSA { private final static String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXFicoMTUOU0VIzqejkmA3h5OIavgJUDAh4QEXjXwTaz/KbHT/P0U3xud3CBO1gwYwILy/45RhHaskeuXYanT4UwvPZ4UhKulSWu+kyruDNYReob61qTE22eALovWWeXQNEprvRThOcN0qMzYl1tbjA2OcMXrP0Joobm9BNjWnOQIDAQAB"; private final static String privateKey = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANcWJygxNQ5TRUjOp6OSYDeHk4hq+AlQMCHhAReNfBNrP8psdP8/RTfG53cIE7WDBjAgvL/jlGEdqyR65dhqdPhTC89nhSEq6VJa76TKu4M1hF6hvrWpMTbZ4Aui9ZZ5dA0Smu9FOE5w3SozNiXW1uMDY5wxes/Qmihub0E2Nac5AgMBAAECgYBAEp5Zj8cRXGcAWGeCB8HX6PBfLBZ1l8iu3vtXS9ORaVqYb5Su0OdKxVsAj4xnfv+h6K6xrxbtk0v/UwkTXis3np66sFau7vyNt4bLe9GZZybSEmKnso6M/oavjU3GpSeYPH/HXAj6Z21jqC2agA5JfBk08RUUMvDtynLElc42gQJBAOwyk0QZlbt1TYOKvoyiemi1O6c2xUQqwud0mx3m/GIbNjcRuhcpP0MGAaq/x8QTFIWY9R0jplxuLpiLUcASxkkCQQDpHnqva4BzgwK6q6fUvGB5nnWPWd92myudtzDYLKTU2WQ2LyNgEP6FRAugCSEkkyNddasgo9QTlOhWkkuIFxlxAkEAuEY08rprQRchZHEIfLv+eFZ8tdZbTPV3nhAxPMELQpcsUwZ3gr5hZq72+foppmWkax6MjTFVB2PG4qg/HXUIUQJAMxqybIhVlX0P+RouZa2SPLcnMHDUUyz7J80EES/gRqUNme9FgwbWtSJQphm6QUlcRF3KURJ5KH3JXUke88uUkQJBANNC6zz7DRB87NZkfmjEggDjgHU21l3tGQfUIlwn+ATBKmMy7FQy7FW2D31Mx2zZs5QbNZPw9Hi/swNEE80u24w="; /** * 作者:ywzou <br> * 创建时间:2017年11月17日 <br> * 描述: 私钥加密 —— 加密 * * @param data 要加密签名的数据 * @return * @throws Exception */ public static String codePrivate(String data) throws Exception { // 2.私钥加密、公钥解密——加密 PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKey.getBytes())); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec); Cipher cipher = Cipher.getInstance("RSA"); cipher.init(Cipher.ENCRYPT_MODE, privateKey); byte[] result = cipher.doFinal(data.getBytes()); return Base64.encodeBase64String(result); } /** * 作者:ywzou <br> * 创建时间:2017年11月17日 <br> * 描述: 私钥加密、公钥解密——解密 * @param sing 签名 * @return * @throws Exception */ public static String encodePublic(String sign) throws Exception { X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKey.getBytes())); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec); Cipher cipher = Cipher.getInstance("RSA"); cipher.init(Cipher.DECRYPT_MODE, publicKey); byte[] result = cipher.doFinal(Base64.decodeBase64(sign)); return new String(result); } /** * 作者:ywzou <br> * 创建时间:2017年11月17日 <br> * 描述: 公钥加密、私钥解密——加密 * @param data 要加密签名的数据 * @return * @throws Exception */ public static String codePublic(String data) throws Exception { X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKey.getBytes())); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec); Cipher cipher = Cipher.getInstance("RSA"); cipher.init(Cipher.ENCRYPT_MODE, publicKey); byte[] result = cipher.doFinal(data.getBytes()); return Base64.encodeBase64String(result); } /** * 作者:ywzou <br> * 创建时间:2017年11月17日 <br> * 描述: 公钥加密、私钥解密——解密 * @param sing 签名 * @return * @throws Exception */ public static String encodePrivate(String sign) throws Exception { PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKey.getBytes())); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec); Cipher cipher = Cipher.getInstance("RSA"); cipher.init(Cipher.DECRYPT_MODE, privateKey); byte[] result = cipher.doFinal(Base64.decodeBase64(sign)); return new String(result); } public static Map<String,String> getKeyPair() throws Exception { KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); keyPairGenerator.initialize(1024); KeyPair keyPair = keyPairGenerator.generateKeyPair(); RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic(); RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate(); Map<String,String> map = new HashMap<String,String>(); System.out.println(Base64.encodeBase64String(rsaPublicKey.getEncoded())); System.out.println(Base64.encodeBase64String(rsaPrivateKey.getEncoded())); map.put("publicKey", Base64.encodeBase64String(rsaPublicKey.getEncoded())); map.put("privateKey", Base64.encodeBase64String(rsaPrivateKey.getEncoded())); return map; } public static void main(String[] args) throws Exception { System.out.println(getKeyPair()); // String sign = codePrivate("zouyiwei2017"); // System.out.println(sign); // System.out.println(encodePublic(sign)); } }
[ "936707967@qq.com" ]
936707967@qq.com
f81ff9f583c8008ea4644e60165d890edbbecc9f
e1af8e2f102a8c13c21064f538cf20e704374f42
/777-Android-40-IntentForResult/src/android/te40/MainActivity.java
6d6612152886e93a0b0737cf1e5edde8cf31a87c
[]
no_license
hishark/Android
c06d5008143a2242ffe79d403d8746b80f44264b
1e7dc5b98be9e3f9dea3250b8ca3129bcf7372b9
refs/heads/master
2021-01-24T21:12:26.344779
2018-03-27T09:05:03
2018-03-27T09:05:03
123,268,181
1
0
null
null
null
null
GB18030
Java
false
false
3,681
java
package android.te40; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.Menu; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends Activity { //1.定义成员变量 EditText etUsernmae,etPassword; Button btOk,btCancel; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //2.初始化 init(); //3.定义注册事件监听器 btOk.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub //获得EditText输入的数据 把这些数据都交给intent带到DealLoginActivity界面里去处理 String userName,password; userName=etUsernmae.getText().toString().trim(); password=etPassword.getText().toString().trim(); //创建新的意图intent Intent intent=new Intent(); //往intent里面放数据 intent这时相当于一个大货车 intent.putExtra("userName", userName); intent.putExtra("password", password); //指定意图启动哪个东西 这里就是要启动DealLoginActivity intent.setClass(MainActivity.this, DealLoginActivity.class); //启动的同时要等待结果,所以用ForResult,不直接用之前的startActivity了 //二参数就是一个请求码,用来对这个活动进行标识。可以是任意整数 startActivityForResult(intent, 101); //发现一个有趣的事情-。- //startActivityForResult(intent,code)请求码在第二参数位置 //setResult(code,intent)结果码在第一个参数位置 } }); } //请求结果是一对多的, 一个MainActivity可能向多个activity请求了结果 //并且希望每个activity执行完了都能够返回一个状态,每当状态返回的时候都是执行这个onActivityResult函数。 //现在就有一个问题,这么多activity该如何区分这个返回的状态是哪个activity发出的 //这时就需要用到请求码requestCode和结果码resultCode //-----------------这个函数用source-override methods可以找到----------------------- //参数列表:1.请求码 2.结果码 3.数据data @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub if(requestCode==101&&resultCode==RESULT_OK) { //当请求码是101且结果码是RESULT_OK的时候就执行下面这些动作 //下面两句意思的一样 直接用getStringExtra更方便啦 //if(data.getExtras().getString("logState").equals(object)) //这个data就是 if(data.getStringExtra("logState").equals("未找到此用户!登录失败!")) { //如果数据库(假装自己有个数据库)中找不到输入的用户名,则跳转到注册页面 //---------不要瞎改包名--------- Intent intent=new Intent(MainActivity.this,RegeditActivity.class); startActivity(intent); //finish(); } } super.onActivityResult(requestCode, resultCode, data); } private void init() { // TODO Auto-generated method stub etUsernmae=(EditText)this.findViewById(R.id.et1); etPassword=(EditText)this.findViewById(R.id.et2); btOk=(Button)this.findViewById(R.id.bt1); btCancel=(Button)this.findViewById(R.id.bt2); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
[ "hishark@yeah.net" ]
hishark@yeah.net
e1379942033fdc1faa94ac83b70bbfdbd0b20c81
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_7c89bf051e316b431f61535561a04f07fba5cb29/Closure/14_7c89bf051e316b431f61535561a04f07fba5cb29_Closure_t.java
1e91e04cde334e1c58ddb126bf3f9ed4d1cbb660
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,767
java
package core; import java.util.HashSet; import java.util.Iterator; public class Closure { //HashSet<FunctionalDependency> dependencies; HashSet<String> closureAttributes; HashSet<String> startAttributes; public Closure(){ //dependencies = new HashSet<FunctionalDependency>(); this.startAttributes = new HashSet<String>(); this.closureAttributes = new HashSet<String>(); } @SuppressWarnings("unchecked") public Closure(HashSet<String> startAttributes, HashSet<FunctionalDependency> knownDependencies){ //dependencies = new HashSet<FunctionalDependency>(); this.startAttributes = (HashSet<String>) startAttributes.clone(); this.closureAttributes = (HashSet<String>) startAttributes.clone(); computeClosure(knownDependencies); } public void addStartAttribute(String s){ startAttributes.add(s); closureAttributes.add(s); } @SuppressWarnings("unchecked") public void computeClosure(HashSet<FunctionalDependency> knownDependencies){ HashSet<FunctionalDependency> known = (HashSet<FunctionalDependency>) knownDependencies.clone(); Iterator<FunctionalDependency> it = known.iterator(); while(it.hasNext()){ FunctionalDependency dep = it.next(); if(attributesInLeftSide(closureAttributes, dep)){ if(closureAttributes.containsAll(dep.getRightList())){ continue; } //dependencies.add(dep); closureAttributes.addAll(dep.getRightList()); computeClosure(known); } } } private boolean attributesInLeftSide(HashSet<String> attributes, FunctionalDependency dependency){ return attributes.containsAll(dependency.getLeftList()); } public HashSet<String> getClosureAttributes() { return closureAttributes; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fef74583aeda3e6fb366eef47a971a75ce0882ab
775a8814cf11ecf2536e0c569fad7e8a932b8b24
/src/main/java/com/hq/nettySix/TestHttpServerHanler.java
17493e35e74e320240b87cbcde796a15b477269b
[ "Apache-2.0" ]
permissive
sdisk/him
e7312710afc65fc068f74babe6e74c0e956061f6
1192c47ce993bf4a935c8620090c36eea27fdd1f
refs/heads/master
2022-10-16T19:06:05.384124
2022-04-01T02:47:16
2022-04-01T02:47:16
201,966,761
0
0
Apache-2.0
2022-10-05T00:28:38
2019-08-12T16:20:11
Java
UTF-8
Java
false
false
438
java
package com.hq.nettySix; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; /** * @program: him * @description: * @author: Mr.Huang * @create: 2019-08-15 14:06 **/ /*public class TestHttpServerHanler extends SimpleChannelInboundHandler<MyData.MyMessage> { @Override protected void channelRead0(ChannelHandlerContext ctx, MyData.MyMessage msg) throws Exception { } }*/
[ "huang50179@163.com" ]
huang50179@163.com
2d59ae2525fe546042caa53f2db0cac6c2104262
900b0bc2822aeafff5bc91903af5d241a97da511
/gameserver/data/scripts/ai/KrateisFighter.java
661766e96d22b02ad6a2588f2f109c76d1e83115
[]
no_license
LacosteR/mesdev
43ae3e63ef02b482a6e10a340f41c5bbe735a094
e0e46269ef0440b54dd38bfb84235393b29b55ed
refs/heads/master
2021-07-16T02:57:53.101176
2017-10-20T01:38:51
2017-10-20T01:38:51
107,477,817
0
1
null
null
null
null
UTF-8
Java
false
false
1,114
java
package ai; import l2p.gameserver.ai.Fighter; import l2p.gameserver.model.Creature; import l2p.gameserver.model.Player; import l2p.gameserver.model.entity.events.impl.KrateisCubeEvent; import l2p.gameserver.model.entity.events.objects.KrateisCubePlayerObject; import l2p.gameserver.model.instances.NpcInstance; /** * @author VISTALL * @date 11:31/18.11.2010 */ public class KrateisFighter extends Fighter { public KrateisFighter(NpcInstance actor) { super(actor); } @Override protected void onEvtDead(Creature killer) { super.onEvtDead(killer); Player player = killer.getPlayer(); if (player == null) return; KrateisCubeEvent cubeEvent = getActor().getEvent(KrateisCubeEvent.class); if (cubeEvent == null) return; KrateisCubePlayerObject particlePlayer = cubeEvent.getParticlePlayer(player); if (particlePlayer == null) return; particlePlayer.setPoints(particlePlayer.getPoints() + 3); cubeEvent.updatePoints(particlePlayer); } }
[ "pavel.shuckii@yandex.ru" ]
pavel.shuckii@yandex.ru
09fa09dd25f657a9952eae2fc591d7836cadb2e3
7c9f40c50e5cabcb320195e3116384de139002c6
/Plugin_Parser/src/tinyos/yeti/nesc12/parser/actions/Action355.java
e506ae997d44c27a777004d6de4d03ebb8883a54
[]
no_license
phsommer/yeti
8e89ad89f1a4053e46693244256d03e71fe830a8
dec8c79e75b99c2a2a43aa5425f608128b883e39
refs/heads/master
2021-01-10T05:33:57.285499
2015-05-21T19:41:02
2015-05-21T19:41:02
36,033,399
3
0
null
null
null
null
UTF-8
Java
false
false
2,330
java
/* * Yeti 2, NesC development in Eclipse. * Copyright (C) 2009 ETH Zurich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * Web: http://tos-ide.ethz.ch * Mail: tos-ide@tik.ee.ethz.ch */ package tinyos.yeti.nesc12.parser.actions; import tinyos.yeti.nesc12.lexer.Token; import tinyos.yeti.nesc12.lexer.Lexer; import tinyos.yeti.nesc12.parser.ast.*; import tinyos.yeti.nesc12.parser.ast.nodes.*; import tinyos.yeti.nesc12.parser.ast.nodes.declaration.*; import tinyos.yeti.nesc12.parser.ast.nodes.definition.*; import tinyos.yeti.nesc12.parser.ast.nodes.error.*; import tinyos.yeti.nesc12.parser.ast.nodes.expression.*; import tinyos.yeti.nesc12.parser.ast.nodes.general.*; import tinyos.yeti.nesc12.parser.ast.nodes.nesc.*; import tinyos.yeti.nesc12.parser.ast.nodes.statement.*; import tinyos.yeti.nesc12.parser.*; public final class Action355 implements ParserAction{ public final java_cup.runtime.Symbol do_action( int CUP$parser$act_num, java_cup.runtime.lr_parser CUP$parser$parser, java.util.Stack CUP$parser$stack, int CUP$parser$top, parser parser) throws java.lang.Exception{ java_cup.runtime.Symbol CUP$parser$result; // c_unary_operator ::= P_EXCLAMATION { UnaryOperator RESULT =null; Token p = (Token)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new UnaryOperator( p, UnaryOperator.Operator.NOT ); CUP$parser$result = parser.getSymbolFactory().newSymbol("c_unary_operator",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; } }
[ "besigg@2a69fd7c-12de-fc47-e5bb-db751a41839b" ]
besigg@2a69fd7c-12de-fc47-e5bb-db751a41839b
7e926272630c3e8c7bf2388540de5d2b0fd47231
82ce797dcb91dc849a87ec50684811e06cb9a091
/app/src/main/java/com/coahr/thoughtrui/mvp/model/Bean/EvenBus_SubjectList_id.java
e986cfa1d26870b01d22f460e28f4a6d5e32cfce
[]
no_license
LEEHOR/ThoughtRui
f0864f8f8ee01eeab8931267bb33020cecdf03e4
684c424c7ac4850d3d058863c08e6a819e5845d2
refs/heads/master
2020-04-07T01:31:47.073843
2019-08-15T01:23:36
2019-08-15T01:23:36
157,943,972
0
0
null
null
null
null
UTF-8
Java
false
false
493
java
package com.coahr.thoughtrui.mvp.model.Bean; /** * @author Leehor * 版本: * 创建日期:2019/3/5 * 描述:点击三级列表回调给答题页 */ public class EvenBus_SubjectList_id { private String Sub_id; public String getSub_id() { return Sub_id; } public void setSub_id(String sub_id) { Sub_id = sub_id; } public EvenBus_SubjectList_id() { } public EvenBus_SubjectList_id(String sub_id) { Sub_id = sub_id; } }
[ "1622293788@qq.com" ]
1622293788@qq.com
c72279d86ef9411bfce13aa8f8819ab09f322dd3
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.5.1/sources/com/iqoption/view/c/a.java
4984fdbc5b3fc7eccb0054d197c13866f22c0303
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
752
java
package com.iqoption.view.c; import android.graphics.Canvas; import android.graphics.Rect; import com.iqoption.util.aa; /* compiled from: ViewFrameHelper */ public class a { private float dGq; private float dGr; private int dGs; private float dGt; private Rect dGu = new Rect(); public a(float f, int i, float f2, float f3) { this.dGq = f; this.dGs = i; this.dGt = f2; this.dGr = f3; } public void setFrameTopGapSize(float f) { this.dGr = f; } public void onDraw(Canvas canvas) { canvas.getClipBounds(this.dGu); aa.a(canvas, 0.0f, 0.0f, (float) (this.dGu.width() - 1), (float) (this.dGu.height() - 1), this.dGq, this.dGr, this.dGs, this.dGt); } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
2aab7e7dcdca2f79c43a717afbe72ff64eb52a4b
8e555bc3fa12263de5085ce6e7d037b62131c1ee
/integration/recyclerview/src/main/java/com/bumptech/glide/integration/recyclerview/RecyclerToListViewScrollListener.java
4240c965e8361479c6b9875f6a77c416919d99ee
[ "BSD-2-Clause-Views", "Xfig", "MIT", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-generic-cla" ]
permissive
FY6/glide
3797c8b461005fabc8c23e722dbf75a20bb89108
70e0ee01ac0a0ace196be2b045b683b6459327ea
refs/heads/master
2020-05-16T23:47:35.413093
2019-05-31T01:52:49
2019-05-31T01:52:49
183,376,563
1
0
null
2019-04-25T07:05:54
2019-04-25T07:05:54
null
UTF-8
Java
false
false
2,596
java
package com.bumptech.glide.integration.recyclerview; import android.support.annotation.NonNull; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.widget.AbsListView; import android.widget.ListView; /** * Converts {@link android.support.v7.widget.RecyclerView.OnScrollListener} events to * {@link AbsListView} scroll events. * * <p>Requires that the the recycler view be using a {@link LinearLayoutManager} subclass. */ // Public API. @SuppressWarnings("WeakerAccess") public final class RecyclerToListViewScrollListener extends RecyclerView.OnScrollListener { public static final int UNKNOWN_SCROLL_STATE = Integer.MIN_VALUE; private final AbsListView.OnScrollListener scrollListener; private int lastFirstVisible = -1; private int lastVisibleCount = -1; private int lastItemCount = -1; public RecyclerToListViewScrollListener(@NonNull AbsListView.OnScrollListener scrollListener) { this.scrollListener = scrollListener; } @Override public void onScrollStateChanged(RecyclerView recyclerView, int newState) { int listViewState; switch (newState) { case RecyclerView.SCROLL_STATE_DRAGGING: listViewState = ListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL; break; case RecyclerView.SCROLL_STATE_IDLE: listViewState = ListView.OnScrollListener.SCROLL_STATE_IDLE; break; case RecyclerView.SCROLL_STATE_SETTLING: listViewState = ListView.OnScrollListener.SCROLL_STATE_FLING; break; default: listViewState = UNKNOWN_SCROLL_STATE; } scrollListener.onScrollStateChanged(null /*view*/, listViewState); } @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager(); int firstVisible = layoutManager.findFirstVisibleItemPosition(); int visibleCount = Math.abs(firstVisible - layoutManager.findLastVisibleItemPosition()); int itemCount = recyclerView.getAdapter().getItemCount(); if (firstVisible != lastFirstVisible || visibleCount != lastVisibleCount || itemCount != lastItemCount) { scrollListener.onScroll(null, firstVisible, visibleCount, itemCount); lastFirstVisible = firstVisible; lastVisibleCount = visibleCount; lastItemCount = itemCount; } } }
[ "f_y_wang6@163.com" ]
f_y_wang6@163.com
f36232148d380d91aec5be24a79424a722a26f7c
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.27.0/sources/io/fabric/sdk/android/services/common/IdManager.java
197f625d55912d509b0e93a784a7a9896ec4c92b
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
7,051
java
package io.fabric.sdk.android.services.common; import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.os.Build; import android.os.Build.VERSION; import android.text.TextUtils; import io.fabric.sdk.android.c; import io.fabric.sdk.android.h; import io.fabric.sdk.android.k; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; import java.util.UUID; import java.util.concurrent.locks.ReentrantLock; import java.util.regex.Pattern; public class IdManager { private static final Pattern eNm = Pattern.compile("[^\\p{Alnum}]"); private static final String eNn = Pattern.quote("/"); private final Context cO; private final String eMt; private final String eMu; private final ReentrantLock eNo = new ReentrantLock(); private final q eNp; private final boolean eNq; private final boolean eNr; c eNs; b eNt; boolean eNu; p eNv; private final Collection<h> nJ; public enum DeviceIdentifierType { WIFI_MAC_ADDRESS(1), BLUETOOTH_MAC_ADDRESS(2), FONT_TOKEN(53), ANDROID_ID(100), ANDROID_DEVICE_ID(101), ANDROID_SERIAL(102), ANDROID_ADVERTISING_ID(103); public final int protobufIndex; private DeviceIdentifierType(int i) { this.protobufIndex = i; } } public IdManager(Context context, String str, String str2, Collection<h> collection) { if (context == null) { throw new IllegalArgumentException("appContext must not be null"); } else if (str == null) { throw new IllegalArgumentException("appIdentifier must not be null"); } else if (collection != null) { this.cO = context; this.eMu = str; this.eMt = str2; this.nJ = collection; this.eNp = new q(); this.eNs = new c(context); this.eNv = new p(); this.eNq = CommonUtils.a(context, "com.crashlytics.CollectDeviceIdentifiers", true); String str3 = "Fabric"; if (!this.eNq) { k biX = c.biX(); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("Device ID collection disabled for "); stringBuilder.append(context.getPackageName()); biX.d(str3, stringBuilder.toString()); } this.eNr = CommonUtils.a(context, "com.crashlytics.CollectUserIdentifiers", true); if (!this.eNr) { k biX2 = c.biX(); StringBuilder stringBuilder2 = new StringBuilder(); stringBuilder2.append("User information collection disabled for "); stringBuilder2.append(context.getPackageName()); biX2.d(str3, stringBuilder2.toString()); } } else { throw new IllegalArgumentException("kits must not be null"); } } public boolean bjz() { return this.eNr; } private String ls(String str) { return str == null ? null : eNm.matcher(str).replaceAll("").toLowerCase(Locale.US); } public String bjA() { String str = this.eMt; if (str != null) { return str; } SharedPreferences co = CommonUtils.co(this.cO); d(co); String string = co.getString("crashlytics.installation.id", null); return string == null ? c(co) : string; } public String bjB() { return this.eMu; } public String bjC() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(bjD()); stringBuilder.append("/"); stringBuilder.append(bjE()); return stringBuilder.toString(); } public String bjD() { return lt(VERSION.RELEASE); } public String bjE() { return lt(VERSION.INCREMENTAL); } public String bjF() { return String.format(Locale.US, "%s/%s", new Object[]{lt(Build.MANUFACTURER), lt(Build.MODEL)}); } private String lt(String str) { return str.replaceAll(eNn, ""); } @SuppressLint({"CommitPrefEdits"}) private String c(SharedPreferences sharedPreferences) { String str = "crashlytics.installation.id"; this.eNo.lock(); try { String string = sharedPreferences.getString(str, null); if (string == null) { string = ls(UUID.randomUUID().toString()); sharedPreferences.edit().putString(str, string).commit(); } this.eNo.unlock(); return string; } catch (Throwable th) { this.eNo.unlock(); } } private void d(SharedPreferences sharedPreferences) { b bjl = bjl(); if (bjl != null) { f(sharedPreferences, bjl.eMM); } } @SuppressLint({"CommitPrefEdits"}) private void f(SharedPreferences sharedPreferences, String str) { String str2 = "crashlytics.advertising.id"; this.eNo.lock(); try { if (!TextUtils.isEmpty(str)) { String string = sharedPreferences.getString(str2, null); if (TextUtils.isEmpty(string)) { sharedPreferences.edit().putString(str2, str).commit(); } else if (!string.equals(str)) { sharedPreferences.edit().remove("crashlytics.installation.id").putString(str2, str).commit(); } this.eNo.unlock(); } } finally { this.eNo.unlock(); } } public Map<DeviceIdentifierType, String> eC() { HashMap hashMap = new HashMap(); for (h hVar : this.nJ) { if (hVar instanceof l) { for (Entry entry : ((l) hVar).eC().entrySet()) { a(hashMap, (DeviceIdentifierType) entry.getKey(), (String) entry.getValue()); } } } return Collections.unmodifiableMap(hashMap); } public String getInstallerPackageName() { return this.eNp.V(this.cO); } public Boolean bjG() { return bjH() ? bjI() : null; } private void a(Map<DeviceIdentifierType, String> map, DeviceIdentifierType deviceIdentifierType, String str) { if (str != null) { map.put(deviceIdentifierType, str); } } /* Access modifiers changed, original: protected */ public boolean bjH() { return this.eNq && !this.eNv.cE(this.cO); } /* Access modifiers changed, original: declared_synchronized */ public synchronized b bjl() { if (!this.eNu) { this.eNt = this.eNs.bjl(); this.eNu = true; } return this.eNt; } private Boolean bjI() { b bjl = bjl(); return bjl != null ? Boolean.valueOf(bjl.eMN) : null; } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
7452c4dac128074bcb3ed615ec3609d875bd4e2e
afb256b6bbc5c4d4e907fb48a7782e8a08299458
/beige-uml-base/src/main/java/org/beigesoft/uml/service/edit/SrvEditRelationshipBinaryVarious.java
e9d1921179d3832c80d30c4f7843ef059e6cc661
[ "Apache-2.0" ]
permissive
rudyENgithub/beige-uml
ab457b516f56e0572e82953a97963bf0328e65e2
0f32391b9cd0c00696bf6fbd77c7cc7932f883cb
refs/heads/master
2021-01-11T22:30:54.037189
2016-09-23T13:18:51
2016-09-23T13:18:51
78,979,715
0
0
null
null
null
null
UTF-8
Java
false
false
2,239
java
package org.beigesoft.uml.service.edit; import java.util.Set; import org.beigesoft.service.ISrvI18n; import org.beigesoft.ui.service.ISrvDialog; import org.beigesoft.uml.app.model.SettingsGraphicUml; import org.beigesoft.uml.pojo.RelationshipBinaryVarious; public class SrvEditRelationshipBinaryVarious<M extends RelationshipBinaryVarious, DLI> extends ASrvEditElementUml<M, DLI> { public SrvEditRelationshipBinaryVarious(ISrvI18n srvI18n, ISrvDialog<DLI> srvDialog, SettingsGraphicUml graphicSettings) { super(srvI18n, srvDialog, graphicSettings); } @Override public boolean isEquals(M m1, M m2) { if(!super.isEquals(m1, m2)) { return false; } if(m1.getItsKind() != m2.getItsKind()) { return false; } if(m1.getShapeRelationshipStart().getEndType() != m2.getShapeRelationshipStart().getEndType()) { return false; } if(m1.getShapeRelationshipEnd().getEndType() != m2.getShapeRelationshipEnd().getEndType()) { return false; } if(m1.getShapeRelationshipEnd().getIsOwned() != m2.getShapeRelationshipEnd().getIsOwned()) { return false; } if(m1.getShapeRelationshipStart().getIsOwned() != m2.getShapeRelationshipStart().getIsOwned()) { return false; } if(m1.getShapeRelationshipStart().getShapeFull() == null ? m2.getShapeRelationshipStart().getShapeFull() != null : !m1.getShapeRelationshipStart().getShapeFull().getId().equals(m2.getShapeRelationshipStart().getShapeFull().getId())) { return false; } if(m1.getShapeRelationshipEnd().getShapeFull() == null ? m2.getShapeRelationshipEnd().getShapeFull() != null : !m1.getShapeRelationshipEnd().getShapeFull().getId().equals(m2.getShapeRelationshipEnd().getShapeFull().getId())) { return false; } return true; } @SuppressWarnings("unchecked") @Override public M createClone(M m) { return (M) m.clone(); } @Override public void validate(M m, Set<String> result) { if(m.getShapeRelationshipStart().getShapeFull() == null) { result.add(getSrvI18n().getMsg("complete_shape1")); } if(m.getShapeRelationshipEnd().getShapeFull() == null) { result.add(getSrvI18n().getMsg("complete_shape2")); } } }
[ "demidenko05@gmail.com" ]
demidenko05@gmail.com
126d931f40acc10fe7bccd886f1e6a9efd2c84e7
84c3301dd799d1d0e7de58ed50f30719568760e6
/pu/.svn/pristine/23/234fdb3c1f552c63ad6eba953912df32959b1522.svn-base
d9c9ff22e031bd762ffb572269c2b04c34b6f2f0
[]
no_license
hljlgj/YonyouNC
264d1f38b76fb3c9937603dd48753a9b2666c3ee
fec9955513594a3095be76c4d7f98b0927d721b6
refs/heads/master
2020-06-12T08:25:44.710709
2018-07-04T09:11:33
2018-07-04T09:11:33
null
0
0
null
null
null
null
GB18030
Java
false
false
1,075
/** * $文件说明$ * * @author lixyp * @version 6.1 * @see * @since 6.1 * @time 2011-12-19 上午09:31:59 */ package nc.pubimpl.pu.m21.mm.m55B4; import nc.pubimpl.pu.m21.action.mm.m55b4.OrderPushSaveFor55B4Action; import nc.pubitf.pu.m21.mm.m55B4.IOrderPushSaveFor55B4; import nc.vo.pu.m21.entity.OrderVO; import nc.vo.pub.BusinessException; import nc.vo.pubapp.pattern.exception.ExceptionUtils; import nc.vo.scmf.sourcing.entity.SourceReturnVO; /** * <p> * <b>本类主要完成以下功能:</b> * <ul> * <li>计划订单推式保存采购订单 * </ul> * <p> * <p> * * @version 6.1 * @since 6.1 * @author lixyp * @time 2011-12-19 上午09:31:59 */ public class OrderPushSaveFor55B4Impl implements IOrderPushSaveFor55B4 { @Override public OrderVO[] pushSave(OrderVO[] orderVOs, SourceReturnVO[] SourceReturnVOs) throws BusinessException { try { return new OrderPushSaveFor55B4Action().pushSave(orderVOs, SourceReturnVOs); } catch (Exception e) { ExceptionUtils.marsh(e); } return null; } }
[ "944482059@qq.com" ]
944482059@qq.com
b4f5bb81750fa03b2d0e8dc488d55520d299e369
753244933fc4465b0047821aea81c311738e1732
/core/target/java-D no-pattern-matching/ts42/src/thx/Functions8.java
d77b4fdd822014294237cf00d8bd973c0237a058
[ "MIT" ]
permissive
mboussaa/HXvariability
abfaba5452fecb1b83bc595dc3ed942a126510b8
ea32b15347766b6e414569b19cbc113d344a56d9
refs/heads/master
2021-01-01T17:45:54.656971
2017-07-26T01:27:49
2017-07-26T01:27:49
98,127,672
0
0
null
null
null
null
UTF-8
Java
false
true
1,071
java
// Generated by Haxe 3.3.0 package thx; import haxe.root.*; @SuppressWarnings(value={"rawtypes", "unchecked"}) public class Functions8 extends haxe.lang.HxObject { public Functions8(haxe.lang.EmptyObject empty) { } public Functions8() { //line 262 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Functions.hx" thx.Functions8.__hx_ctor_thx_Functions8(this); } public static void __hx_ctor_thx_Functions8(thx.Functions8 __temp_me109) { } public static <A, B, C, D, E, F, G, H, I> haxe.lang.Function curry(haxe.lang.Function f) { //line 264 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Functions.hx" return new thx.Functions8_curry_264__Fun<H, I, G, F, E, D, C, B, A>(f); } public static java.lang.Object __hx_createEmpty() { //line 262 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Functions.hx" return new thx.Functions8(haxe.lang.EmptyObject.EMPTY); } public static java.lang.Object __hx_create(haxe.root.Array arr) { //line 262 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Functions.hx" return new thx.Functions8(); } }
[ "mohamed.boussaa@inria.fr" ]
mohamed.boussaa@inria.fr
9adabb3f7acd01357f206251b25fd811294134fd
c343a8813468197d31a5a3593ea7a8a389899293
/permission-aop/src/main/java/com/nepxion/permission/annotation/UserType.java
a0473c5507e569c143ba2509173d3aa8a50fdad8
[ "Apache-2.0" ]
permissive
Nepxion/Permission
2cd07fef8bdf49a8a555eb442781964bc0f18e86
25aa82b3bd7dd143f103a03d1075aec4850ea56d
refs/heads/master
2023-04-13T01:20:35.507487
2023-04-09T12:10:23
2023-04-09T12:10:23
117,720,342
86
36
null
null
null
null
UTF-8
Java
false
false
760
java
package com.nepxion.permission.annotation; /** * <p>Title: Nepxion Permission</p> * <p>Description: Nepxion Permission</p> * <p>Copyright: Copyright (c) 2017-2050</p> * <p>Company: Nepxion</p> * @author Haojun Ren * @version 1.0 */ import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ ElementType.PARAMETER, ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented public @interface UserType { /** * 用户类型,UserId和UserType联合索引,全局唯一 * @return String */ String value() default ""; }
[ "1394997@qq.com" ]
1394997@qq.com
d7d2ca3e62c2f9ae2f6ee85950dae737cb28d47d
ec5b1dfacd9942c660b0dfa0e840ccc9ecd3ff3e
/app/src/main/java/com/gxysj/shareysj/delegate/SignUpDelegate.java
f45c0e82ba7a3e03d57afb41d235a951dd9d1bb9
[]
no_license
ljrRookie/ShareYSJ
3e4c27a7d8e4ddc0c826bd2568cbd35920060953
56b14f4f336c433ce3073b083a97f2ef9bb07043
refs/heads/master
2020-03-21T12:12:36.116368
2018-06-25T03:51:34
2018-06-25T03:51:34
138,540,618
0
0
null
null
null
null
UTF-8
Java
false
false
8,196
java
package com.gxysj.shareysj.delegate; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import com.gxysj.shareysj.R; import com.gxysj.shareysj.bean.GetCodeBean; import com.gxysj.shareysj.config.ShareYSJ; import com.gxysj.shareysj.delegate.base.YSJDelegate; import com.gxysj.shareysj.listener.ITimerListener; import com.gxysj.shareysj.network.RequestCenter; import com.gxysj.shareysj.utils.BaseTimerTask; import com.gxysj.shareysj.utils.SPUtil; import com.ljr.delegate_sdk.okhttp.exception.OkHttpException; import com.ljr.delegate_sdk.okhttp.listener.DisposeDataListener; import com.ljr.delegate_sdk.okhttp.request.RequestParams; import com.vondear.rxtools.RxLogTool; import com.vondear.rxtools.view.RxToast; import java.text.MessageFormat; import java.util.Timer; import butterknife.BindView; import butterknife.OnClick; import butterknife.Unbinder; /** * Created by Administrator on 2018/1/30. * 注册页面 */ public class SignUpDelegate extends YSJDelegate implements ITimerListener { @BindView(R.id.btn_login) TextView mBtnLogin; @BindView(R.id.edit_phone) EditText mEditPhone; @BindView(R.id.edit_code) EditText mEditCode; @BindView(R.id.btn_code) Button mBtnCode; @BindView(R.id.edit_pwd) EditText mEditPwd; @BindView(R.id.edit_pwd_again) EditText mEditPwdAgain; @BindView(R.id.edit_invite_code) EditText mEditInviteCode; @BindView(R.id.btn_regist) Button mBtnRegist; Unbinder unbinder; private Timer mTimer = null; private int mCount = 60; private String mPhoneNumCode; @Override public Object setLayout() { return R.layout.delegate_sign_up; } @Override public void onBindView(@Nullable Bundle savedInstanceState, @NonNull View rootView) { } private void initTime() { mTimer = new Timer(); final BaseTimerTask task = new BaseTimerTask(this); mTimer.schedule(task, 0, 1000); } @OnClick({R.id.btn_login, R.id.btn_code, R.id.btn_regist}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.btn_login: getSupportDelegate().pop(); break; case R.id.btn_code: mPhoneNumCode = mEditPhone.getText().toString().trim(); String type = "0"; if (TextUtils.isEmpty(mPhoneNumCode)) { RxToast.normal("请输入手机号码"); return; } RequestCenter.GetCodeData(mPhoneNumCode, type, new DisposeDataListener() { @Override public void onSuccess(Object responseObj) { GetCodeBean getCode = (GetCodeBean) responseObj; RxToast.normal("发送成功"); mCount = 60; mBtnCode.setText("60"); initTime(); mBtnCode.setClickable(false); } @Override public void onFailure(Object responseObj) { OkHttpException error = (OkHttpException) responseObj; int errorCode = error.getCode(); RxToast.normal("操作失败:"+error.getEmsg()); } }); break; case R.id.btn_regist: String code = mEditCode.getText().toString().trim(); final String pwd = mEditPwd.getText().toString().trim(); String pwdAgain = mEditPwdAgain.getText().toString().trim(); String inviteCode = ""; inviteCode = mEditInviteCode.getText().toString().trim(); final String phoneNum = mEditPhone.getText().toString().trim(); if (TextUtils.isEmpty(phoneNum)) { RxToast.normal("请输入手机号码"); return; } if (!mPhoneNumCode.equals(phoneNum)) { RxToast.normal("获取验证码的手机号码与注册手机号码不一致"); return; } if (TextUtils.isEmpty(code)) { RxToast.normal("请输入验证码"); return; } if (TextUtils.isEmpty(pwd)) { RxToast.normal("请输入密码"); return; } if (TextUtils.isEmpty(pwdAgain)) { RxToast.normal("请再次输入密码"); return; } if (!pwd.equals(pwdAgain)) { RxToast.normal("输入的密码不一致"); return; } final RequestParams requestParams = new RequestParams(); requestParams.put("username", phoneNum); requestParams.put("password", pwd); requestParams.put("code", code); requestParams.put("invitationcode", inviteCode); RequestCenter.RegUserData(requestParams, new DisposeDataListener() { @Override public void onSuccess(Object responseObj) { RxToast.normal("注册成功"); Bundle bundle = new Bundle(); bundle.putString("phone", phoneNum); bundle.putString("pwd", pwd); setFragmentResult(RESULT_OK, bundle); getSupportDelegate().pop(); } @Override public void onFailure(Object responseObj) { OkHttpException error = (OkHttpException) responseObj; int errorCode = error.getCode(); RxLogTool.e("注册用户", "失败码:" + errorCode); if (errorCode == 10010) { RxToast.normal("验证码错误"); } else if (errorCode == 10011) { RxToast.normal("验证码超时"); } else if (errorCode == 10012) { RxToast.normal("邀请码不存在"); } else if (errorCode == 10013) { RxToast.normal("密码设置太简单"); } else if (errorCode == 10014) { RxToast.normal("密码少于6位"); } else if (errorCode == 10015) { RxToast.normal("账号已存在"); } else if (errorCode == 10016) { RxToast.normal("注册失败"); } else if (errorCode == 10017) { RxToast.normal("注册账号失败"); } else if (errorCode == 10018) { RxToast.normal("手机号码频率限制"); } else { RxToast.normal("注册失败"); } } }); break; } } @Override public void onTimer() { getProxyActivity().runOnUiThread(new Runnable() { @Override public void run() { if (mBtnCode != null) { mBtnCode.setText(MessageFormat.format("{0} s", mCount)); mCount--; if (mCount < 0) { if (mTimer != null) { mTimer.cancel(); mTimer = null; } mBtnCode.setText("发送验证码"); mBtnCode.setClickable(true); } } } }); } }
[ "15622732935@163.com" ]
15622732935@163.com
740549ad041484a19ecb4453d1b6325fdeab450c
5c8b7185e2f3799cc66b6818aa4ee583485c7829
/com/planet_ink/coffee_mud/Locales/IcePlains.java
e238fad45ea6834ed0d450a75990a467861bedc6
[ "Apache-2.0" ]
permissive
cmk8514/BrainCancerMud
6ec70a47afac7a9239a6181554ce309b211ed790
cc2ca1defc9dd9565b169871c8310a3eece2500a
refs/heads/master
2021-04-07T01:28:52.961472
2020-03-21T16:29:03
2020-03-21T16:29:03
248,631,086
1
1
null
null
null
null
UTF-8
Java
false
false
2,290
java
package com.planet_ink.coffee_mud.Locales; import java.util.Arrays; import java.util.List; import java.util.Vector; import com.planet_ink.coffee_mud.Items.interfaces.RawMaterial; import com.planet_ink.coffee_mud.Locales.interfaces.Room; import com.planet_ink.coffee_mud.core.interfaces.Places; /* Copyright 2014-2017 Bo Zimmerman 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. */ public class IcePlains extends StdRoom { @Override public String ID() { return "IcePlains"; } public IcePlains() { super(); name="the snow"; basePhyStats.setWeight(2); recoverPhyStats(); climask=Places.CLIMASK_COLD|Places.CLIMASK_WET; } @Override public int domainType() { return Room.DOMAIN_OUTDOORS_PLAINS; } public static final Integer[] resourceList={ Integer.valueOf(RawMaterial.RESOURCE_ELM), Integer.valueOf(RawMaterial.RESOURCE_MAPLE), Integer.valueOf(RawMaterial.RESOURCE_BERRIES), Integer.valueOf(RawMaterial.RESOURCE_CARROTS), Integer.valueOf(RawMaterial.RESOURCE_GREENS), Integer.valueOf(RawMaterial.RESOURCE_ONIONS), Integer.valueOf(RawMaterial.RESOURCE_FLINT), Integer.valueOf(RawMaterial.RESOURCE_COTTON), Integer.valueOf(RawMaterial.RESOURCE_MEAT), Integer.valueOf(RawMaterial.RESOURCE_EGGS), Integer.valueOf(RawMaterial.RESOURCE_BEEF), Integer.valueOf(RawMaterial.RESOURCE_HIDE), Integer.valueOf(RawMaterial.RESOURCE_FUR), Integer.valueOf(RawMaterial.RESOURCE_FEATHERS), Integer.valueOf(RawMaterial.RESOURCE_LEATHER), Integer.valueOf(RawMaterial.RESOURCE_WOOL)}; public static final List<Integer> roomResources=new Vector<Integer>(Arrays.asList(resourceList)); @Override public List<Integer> resourceChoices() { return Plains.roomResources; } }
[ "cscordias@gmail.com" ]
cscordias@gmail.com
fb302e48ebf625bd7413b96cbc2065c33345ffb2
4e8fbbe30f17a92e8101f2c43d77a4dd0c951f8f
/SSM框架整合/1.Spring从入门到进阶/3.Spring AOP/源码/spring_aop/src/main/java/com/hn/aop/demo1/MyJdkProxy.java
2d24b10ed9de92dba04fe534b12c77b192e90bb5
[]
no_license
ARainyNight/TheRoadOfBaldness
d75b9c8934807ebdd26125bf72d7b6d78c6177f6
225c70090fbe6281551f9879f3ab13f56eea5138
refs/heads/master
2021-07-05T12:55:11.171062
2019-04-16T04:18:11
2019-04-16T04:18:11
148,400,416
2
0
null
null
null
null
UTF-8
Java
false
false
927
java
package com.hn.aop.demo1; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /*** * ClassName : MyJdkProxy * Author : lin * Date : 2018/11/10 11:16 * Remark : 我的JDK动态代理 */ public class MyJdkProxy implements InvocationHandler { private UserDao userDao; public MyJdkProxy(UserDao userDao){ this.userDao = userDao; } public Object createProxy(){ Object proxy = Proxy.newProxyInstance(userDao.getClass().getClassLoader(),userDao.getClass().getInterfaces(),this); return proxy; } public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("save".equals(method.getName())){ System.out.println("权限校验============"); return method.invoke(userDao,args); } return method.invoke(userDao,args); } }
[ "18234168426@163.com" ]
18234168426@163.com
379dda35fa729e036a755baf20eed5346c0e26fc
4be61634117a0aa988f33246d0f425047c027f4c
/zkredis-app/src/jdk6/com/sun/corba/se/spi/activation/ServerManagerHelper.java
9905e560d235f7a44befa0925aa0ea6cad41129f
[]
no_license
oldshipmaster/zkredis
c02e84719f663cd620f1a76fba38e4452d755a0c
3ec53d6904a47a5ec79bc7768b1ca6324facb395
refs/heads/master
2022-12-27T01:31:23.786539
2020-08-12T01:22:07
2020-08-12T01:22:07
34,658,942
1
3
null
2022-12-16T04:32:34
2015-04-27T09:55:48
Java
UTF-8
Java
false
false
2,894
java
package com.sun.corba.se.spi.activation; /** * com/sun/corba/se/spi/activation/ServerManagerHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/com/sun/corba/se/spi/activation/activation.idl * Sunday, October 11, 2009 1:27:26 AM GMT-08:00 */ abstract public class ServerManagerHelper { private static String _id = "IDL:activation/ServerManager:1.0"; public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.spi.activation.ServerManager that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static com.sun.corba.se.spi.activation.ServerManager extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (com.sun.corba.se.spi.activation.ServerManagerHelper.id (), "ServerManager"); } return __typeCode; } public static String id () { return _id; } public static com.sun.corba.se.spi.activation.ServerManager read (org.omg.CORBA.portable.InputStream istream) { return narrow (istream.read_Object (_ServerManagerStub.class)); } public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.spi.activation.ServerManager value) { ostream.write_Object ((org.omg.CORBA.Object) value); } public static com.sun.corba.se.spi.activation.ServerManager narrow (org.omg.CORBA.Object obj) { if (obj == null) return null; else if (obj instanceof com.sun.corba.se.spi.activation.ServerManager) return (com.sun.corba.se.spi.activation.ServerManager)obj; else if (!obj._is_a (id ())) throw new org.omg.CORBA.BAD_PARAM (); else { org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); com.sun.corba.se.spi.activation._ServerManagerStub stub = new com.sun.corba.se.spi.activation._ServerManagerStub (); stub._set_delegate(delegate); return stub; } } public static com.sun.corba.se.spi.activation.ServerManager unchecked_narrow (org.omg.CORBA.Object obj) { if (obj == null) return null; else if (obj instanceof com.sun.corba.se.spi.activation.ServerManager) return (com.sun.corba.se.spi.activation.ServerManager)obj; else { org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); com.sun.corba.se.spi.activation._ServerManagerStub stub = new com.sun.corba.se.spi.activation._ServerManagerStub (); stub._set_delegate(delegate); return stub; } } }
[ "oldshipmaster@163.com" ]
oldshipmaster@163.com
0e943d250ed715460ddf479345cfd29f6bc725f1
81a6dca5c8f3dec7f0495b2c3ef8007c8a060612
/hybris/bin/ext-accelerator/alipay/src/de/hybris/platform/chinaaccelerator/alipay/setup/PaymentSystemSetup.java
a679f8eeabc5d7e6a1398512db59609f7e40c255
[]
no_license
BaggaShivanshu/hybris-hy400
d8dbf4aba43b3dccfef7582b687480dafaa69b0b
6914d3fc7947dcfb2bbe87f59d636525187c72ad
refs/heads/master
2020-04-22T09:41:49.504834
2018-12-04T18:44:28
2018-12-04T18:44:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,534
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.chinaaccelerator.alipay.setup; import java.util.ArrayList; import java.util.List; //import de.hybris.platform.acceleratorservices.setup.AbstractSystemSetup; import de.hybris.platform.chinaaccelerator.alipay.constants.AlipayConstants; import de.hybris.platform.commerceservices.setup.AbstractSystemSetup; import de.hybris.platform.core.initialization.SystemSetup; import de.hybris.platform.core.initialization.SystemSetup.Process; import de.hybris.platform.core.initialization.SystemSetup.Type; import de.hybris.platform.core.initialization.SystemSetupContext; import de.hybris.platform.core.initialization.SystemSetupParameter; @SystemSetup(extension = AlipayConstants.EXTENSIONNAME) public class PaymentSystemSetup extends AbstractSystemSetup { @SystemSetup(type = Type.ESSENTIAL, process = Process.ALL) public void createEssentialData(final SystemSetupContext context) { importImpexFile(context, "/alipay/import/essential/payments.impex"); } @Override public List<SystemSetupParameter> getInitializationOptions() { return new ArrayList<SystemSetupParameter>(); } }
[ "richard.leiva@digitaslbi.com" ]
richard.leiva@digitaslbi.com
620ea8f861f3bef92e6635af96cc561ad1049fe6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_45d3c116165e19b52eeb88110930b5e420106ac6/AbstractLayoutManager/9_45d3c116165e19b52eeb88110930b5e420106ac6_AbstractLayoutManager_t.java
c6f07437a786bc70608c6b83145e40aa0d940a1c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,335
java
/* * $Id$ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ package org.apache.fop.layoutmgr; import org.apache.fop.fo.FObj; import org.apache.fop.area.Area; import java.util.Iterator; /** * The base class for all LayoutManagers. */ public abstract class AbstractLayoutManager implements LayoutManager { protected LayoutManager parentLM; protected FObj fobj; public AbstractLayoutManager(FObj fobj) { this.fobj = fobj; this.parentLM = null; } public void setParentLM(LayoutManager lm) { this.parentLM = lm; } /** * Propagates to lower level layout managers. It iterates over the * children of its FO, asks each for its LayoutManager and calls * its generateAreas method. */ public void generateAreas() { Iterator children = fobj.getChildren(); while (children.hasNext()) { LayoutManager lm = ((FObj)children.next()).getLayoutManager(); if (lm != null) { lm.setParentLM(this); lm.generateAreas(); } } flush(); // Add last area to parent } // /** // * Ask the parent LayoutManager to add the current (full) area to the // * appropriate parent area. // * @param bFinished If true, this area is finished, either because it's // * completely full or because there is no more content to put in it. // * If false, we are in the middle of this area. This can happen, // * for example, if we find floats in a line. We stop the current area, // * and add it (temporarily) to its parent so that we can see if there // * is enough space to place the float(s) anchored in the line. // */ // protected void flush(Area area, boolean bFinished) { // if (area != null) { // // area.setFinished(true); // parentLM.addChild(area, bFinished); // ???? // if (bFinished) { // setCurrentArea(null); // } // } // } /** * Force current area to be added to parent area. */ abstract protected void flush(); /** * Return an Area which can contain the passed childArea. The childArea * may not yet have any content, but it has essential traits set. * In general, if the LayoutManager already has an Area it simply returns * it. Otherwise, it makes a new Area of the appropriate class. * It gets a parent area for its area by calling its parent LM. * Finally, based on the dimensions of the parent area, it initializes * its own area. This includes setting the content IPD and the maximum * BPD. */ abstract public Area getParentArea(Area childArea); public boolean generatesInlineAreas() { return false; } public boolean generatesLineAreas() { return false; } /** * Add a child area to the current area. If this causes the maximum * dimension of the current area to be exceeded, the parent LM is called * to add it. */ abstract public void addChild(Area childArea) ; /** Do nothing */ public boolean splitArea(Area areaToSplit, SplitContext context) { context.nextArea = areaToSplit; return false; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9efd770fded50957b433471faae6589b8a8539d7
a483186ef0d30ac3e9b9e9b22d7e7548436314d7
/spring-cloud-base/main-data/main-data-provider/src/main/java/com/peng/main/provider/service/BaseRoleModuleService.java
384581affc8ebc62476348c0f4092a01850fa7bd
[]
no_license
chenzhenpin/mySpringCloud
b9b49fb89512d087b18a4de0140eabdc60ec522a
49bd75f8564ca7eb12a2d286f9d1d45159ef5a7c
refs/heads/master
2020-04-13T15:31:54.180694
2018-12-27T12:53:42
2018-12-27T12:53:42
163,294,326
1
0
null
null
null
null
UTF-8
Java
false
false
1,357
java
package com.peng.main.provider.service; import com.peng.common.utils.UUID; import com.peng.db.spring.boot.autoconfigure.service.BaseService; import com.peng.main.api.mapper.model.BaseRole; import com.peng.main.api.mapper.model.BaseRoleModule; import com.peng.main.provider.mapper.mapper.BaseRoleMapper; import com.peng.main.provider.mapper.mapper.BaseRoleModuleMapper; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * Created by fp295 on 2018/4/9. */ @Service public class BaseRoleModuleService extends BaseService<BaseRoleModule>{ @Transactional public void saveRoleModule(List<BaseRoleModule> roleModule) { if (roleModule.size() > 0 && !StringUtils.isEmpty(roleModule.get(0).getRoleId())) { BaseRoleModule module = new BaseRoleModule(); module.setRoleId(roleModule.get(0).getRoleId()); mapper.delete(module); roleModule.forEach(it -> { it.setId(UUID.uuid32()); mapper.insertSelective(it); }); } } // 查询关联角色的叶子模块 public List<BaseRoleModule> selectLeafRoleModule(String roleId) { return ((BaseRoleModuleMapper)mapper).selectLeafRoleModule(roleId); } }
[ "1595347682@qq.com" ]
1595347682@qq.com
4fab8865eaff7e80fc5a911023dcc25ff0ecf9fd
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/live/component/x$a.java
224fe217dc445ff9a7cf63c2f3a4e42cc585431b
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
613
java
package com.tencent.mm.plugin.finder.live.component; import kotlin.Metadata; @Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/finder/live/component/FinderLiveGameWelfareTaskBubblePresenter$Companion;", "", "()V", "PORTRAIT_ACTION", "", "PORTRAIT_ACTION_BUNDLE_GAME_WELFARE_INFO", "PORTRAIT_ACTION_BUNDLE_OPEN_MINI_APP", "TAG", "plugin-finder-live_release"}, k=1, mv={1, 5, 1}, xi=48) public final class x$a {} /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar * Qualified Name: com.tencent.mm.plugin.finder.live.component.x.a * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
6821856ea8e71da146702eb16601c46a6a0e8b45
22d241acc029c53fec9b1098b7f2d0a4f5d3ad4c
/src/main/java/com/github/atomicblom/endlessocean/world/EndlessSeaWorldType.java
2db4672769eb145873ac8802908bb319ce2f5c97
[]
no_license
Crushing-Depths/EndlessOcean
810e4b64f5dcc8ceafe27bd8cf442ef0b22e2f3d
2e420813a8e87b4c8c1f8c3ce4a503062e9bf63a
refs/heads/master
2021-01-15T09:28:58.979887
2016-04-28T14:15:44
2016-04-28T14:15:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
692
java
package com.github.atomicblom.endlessocean.world; import net.minecraft.world.World; import net.minecraft.world.WorldType; import net.minecraft.world.biome.BiomeProvider; import net.minecraft.world.chunk.IChunkGenerator; public class EndlessSeaWorldType extends WorldType { public EndlessSeaWorldType() { super("endlessocean"); } @Override public BiomeProvider getBiomeProvider(World world) { return super.getBiomeProvider(world); } @Override public IChunkGenerator getChunkGenerator(World world, String generatorOptions) { return new EndlessSeaChunkProvider(world, world.getSeed(), world.getWorldInfo().isMapFeaturesEnabled()); } }
[ "atomicblom@binaryvibrance.net" ]
atomicblom@binaryvibrance.net
07233d3acb84144719d05ec8fec37fa635287142
7927344fbe02af07ef137a3b3453a9891c586238
/net/minecraft/block/state/BlockPistonStructureHelper.java
77934b188b166b9a28e24ebd2f5a77aeecb6c15f
[ "MIT" ]
permissive
Hexeption/How-to-code-an-advanced-hacked-client-for-1.9
a9d4df9c1254402c5ccf47912dbd8c6e1d9894c3
f23beceb4b2996e0de24b2822aae940dae1fc88e
refs/heads/master
2021-01-18T22:41:13.800852
2016-12-11T18:25:26
2016-12-11T18:25:26
53,270,980
9
19
null
2016-06-05T07:24:26
2016-03-06T19:04:09
Java
UTF-8
Java
false
false
7,058
java
package net.minecraft.block.state; import com.google.common.collect.Lists; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.EnumPushReaction; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockPistonStructureHelper { private final World world; private final BlockPos pistonPos; private final BlockPos blockToMove; private final EnumFacing moveDirection; private final List<BlockPos> toMove = Lists.<BlockPos>newArrayList(); private final List<BlockPos> toDestroy = Lists.<BlockPos>newArrayList(); public BlockPistonStructureHelper(World worldIn, BlockPos posIn, EnumFacing pistonFacing, boolean extending) { this.world = worldIn; this.pistonPos = posIn; if (extending) { this.moveDirection = pistonFacing; this.blockToMove = posIn.offset(pistonFacing); } else { this.moveDirection = pistonFacing.getOpposite(); this.blockToMove = posIn.offset(pistonFacing, 2); } } public boolean canMove() { this.toMove.clear(); this.toDestroy.clear(); IBlockState iblockstate = this.world.getBlockState(this.blockToMove); if (!BlockPistonBase.func_185646_a(iblockstate, this.world, this.blockToMove, this.moveDirection, false)) { if (iblockstate.getMobilityFlag() != EnumPushReaction.DESTROY) { return false; } else { this.toDestroy.add(this.blockToMove); return true; } } else if (!this.func_177251_a(this.blockToMove)) { return false; } else { for (int i = 0; i < this.toMove.size(); ++i) { BlockPos blockpos = (BlockPos)this.toMove.get(i); if (this.world.getBlockState(blockpos).getBlock() == Blocks.slime_block && !this.func_177250_b(blockpos)) { return false; } } return true; } } private boolean func_177251_a(BlockPos origin) { IBlockState iblockstate = this.world.getBlockState(origin); Block block = iblockstate.getBlock(); if (iblockstate.getMaterial() == Material.air) { return true; } else if (!BlockPistonBase.func_185646_a(iblockstate, this.world, origin, this.moveDirection, false)) { return true; } else if (origin.equals(this.pistonPos)) { return true; } else if (this.toMove.contains(origin)) { return true; } else { int i = 1; if (i + this.toMove.size() > 12) { return false; } else { while (block == Blocks.slime_block) { BlockPos blockpos = origin.offset(this.moveDirection.getOpposite(), i); iblockstate = this.world.getBlockState(blockpos); block = iblockstate.getBlock(); if (iblockstate.getMaterial() == Material.air || !BlockPistonBase.func_185646_a(iblockstate, this.world, blockpos, this.moveDirection, false) || blockpos.equals(this.pistonPos)) { break; } ++i; if (i + this.toMove.size() > 12) { return false; } } int i1 = 0; for (int j = i - 1; j >= 0; --j) { this.toMove.add(origin.offset(this.moveDirection.getOpposite(), j)); ++i1; } int j1 = 1; while (true) { BlockPos blockpos1 = origin.offset(this.moveDirection, j1); int k = this.toMove.indexOf(blockpos1); if (k > -1) { this.func_177255_a(i1, k); for (int l = 0; l <= k + i1; ++l) { BlockPos blockpos2 = (BlockPos)this.toMove.get(l); if (this.world.getBlockState(blockpos2).getBlock() == Blocks.slime_block && !this.func_177250_b(blockpos2)) { return false; } } return true; } iblockstate = this.world.getBlockState(blockpos1); if (iblockstate.getMaterial() == Material.air) { return true; } if (!BlockPistonBase.func_185646_a(iblockstate, this.world, blockpos1, this.moveDirection, true) || blockpos1.equals(this.pistonPos)) { return false; } if (iblockstate.getMobilityFlag() == EnumPushReaction.DESTROY) { this.toDestroy.add(blockpos1); return true; } if (this.toMove.size() >= 12) { return false; } this.toMove.add(blockpos1); ++i1; ++j1; } } } } private void func_177255_a(int p_177255_1_, int p_177255_2_) { List<BlockPos> list = Lists.<BlockPos>newArrayList(); List<BlockPos> list1 = Lists.<BlockPos>newArrayList(); List<BlockPos> list2 = Lists.<BlockPos>newArrayList(); list.addAll(this.toMove.subList(0, p_177255_2_)); list1.addAll(this.toMove.subList(this.toMove.size() - p_177255_1_, this.toMove.size())); list2.addAll(this.toMove.subList(p_177255_2_, this.toMove.size() - p_177255_1_)); this.toMove.clear(); this.toMove.addAll(list); this.toMove.addAll(list1); this.toMove.addAll(list2); } private boolean func_177250_b(BlockPos p_177250_1_) { for (EnumFacing enumfacing : EnumFacing.values()) { if (enumfacing.getAxis() != this.moveDirection.getAxis() && !this.func_177251_a(p_177250_1_.offset(enumfacing))) { return false; } } return true; } public List<BlockPos> getBlocksToMove() { return this.toMove; } public List<BlockPos> getBlocksToDestroy() { return this.toDestroy; } }
[ "minecraftfun201@gmail.com" ]
minecraftfun201@gmail.com
822aa4bfeaa8737f2692ca41d5359efce0ca8889
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_2e1c47aec123ddf201cc479bd66b097076168d63/DateTime/7_2e1c47aec123ddf201cc479bd66b097076168d63_DateTime_t.java
1ed83f297e09cf1daf86f56d4d5ab369ef81b92a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
8,844
java
/** * Copyright 2011-2013 Asakusa Framework Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.asakusafw.runtime.value; import java.text.MessageFormat; /** * 日付時刻に関する軽量クラス。 */ public class DateTime implements Comparable<DateTime> { /** * 日付時刻のフォーマット。 */ public static final String FORMAT = "yyyy-MM-dd HH:mm:ss"; private long elapsedSeconds = 0L; /** * 0001/01/01 00:00:00 を表すインスタンスを生成する。 */ public DateTime() { this(0L); } /** * インスタンスを生成する。 * @param elapsedSeconds 0001/01/01 00:00:00 からの経過日数(0起算) */ public DateTime(long elapsedSeconds) { this.elapsedSeconds = elapsedSeconds; } /** * インスタンスを生成する。 * @param year 年 (1-...) * @param month 月 (1-12) * @param day 日 (1-31) * @param hour 時 (0-23) * @param minute 分 (0-59) * @param second 秒 (0-59) */ public DateTime( int year, int month, int day, int hour, int minute, int second) { int date = DateUtil.getDayFromDate(year, month, day); int secondsInDay = DateUtil.getSecondFromTime(hour, minute, second); this.elapsedSeconds = (long) date * 86400 + secondsInDay; } /** * 0001/01/01 00:00:00 からの経過秒数を返す。 * @return 0001/01/01 00:00:00 からの経過秒数(0起算) */ public long getElapsedSeconds() { return elapsedSeconds; } /** * 0001/01/01 00:00:00 からの経過秒数を変更する。 * @param elapsed 設定する経過秒数 (0起算) */ public void setElapsedSeconds(long elapsed) { this.elapsedSeconds = elapsed; } /** * この日付の西暦年(1-)を返す。 * @return この日付の西暦年 */ public int getYear() { int days = DateUtil.getDayFromSeconds(elapsedSeconds); return DateUtil.getYearFromDay(days); } /** * この日付の月(1-12)を返す。 * @return この日付の月 */ public int getMonth() { int days = DateUtil.getDayFromSeconds(elapsedSeconds); int year = getYear(); int dayInYear = days - DateUtil.getDayFromYear(year); return DateUtil.getMonthOfYear(dayInYear, DateUtil.isLeap(year)); } /** * この日付の日(1-31)を返す。 * @return この日付の日 */ public int getDay() { int year = getYear(); int days = DateUtil.getDayFromSeconds(elapsedSeconds); int dayInYear = days - DateUtil.getDayFromYear(year); return DateUtil.getDayOfMonth(dayInYear, DateUtil.isLeap(year)); } /** * この時刻の時間(0-23)を返す。 * @return この時刻の時間 */ public int getHour() { int sec = DateUtil.getSecondOfDay(elapsedSeconds); return sec / (60 * 60); } /** * この時刻の分(0-59)を返す。 * @return この時刻の分 */ public int getMinute() { int sec = DateUtil.getSecondOfDay(elapsedSeconds); return sec / 60 % 60; } /** * この時刻の秒(0-59)を返す。 * @return この時刻の秒 */ public int getSecond() { int sec = DateUtil.getSecondOfDay(elapsedSeconds); return sec % 60; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (int) (elapsedSeconds ^ (elapsedSeconds >>> 32)); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } DateTime other = (DateTime) obj; if (elapsedSeconds != other.elapsedSeconds) { return false; } return true; } @Override public int compareTo(DateTime o) { long a = elapsedSeconds; long b = o.elapsedSeconds; if (a == b) { return 0; } if (a < b) { return -1; } return +1; } @Override public String toString() { return String.format( "%04d-%02d-%02d %02d:%02d:%02d", getYear(), getMonth(), getDay(), getHour(), getMinute(), getSecond()); } /** * 指定の文字列を指定のフォーマットで解析し、対応する時刻を返す。 * @param timeString 解析対象の文字列 * @param format フォーマット形式 * @return 対応する時刻 * @throws IllegalArgumentException 引数が時刻を表さない場合 */ public static DateTime valueOf(StringOption timeString, DateTime.Format format) { if (timeString == null) { throw new IllegalArgumentException("timeString must not be null"); //$NON-NLS-1$ } if (format == null) { throw new IllegalArgumentException("format must not be null"); //$NON-NLS-1$ } if (timeString.isNull()) { return null; } return valueOf(timeString.getAsString(), format); } /** * 指定の文字列を指定のフォーマットで解析し、対応する時刻を返す。 * @param timeString 解析対象の文字列 * @param format フォーマット形式 * @return 対応する時刻 * @throws IllegalArgumentException 引数が時刻を表さない場合 */ public static DateTime valueOf(String timeString, DateTime.Format format) { if (timeString == null) { throw new IllegalArgumentException("timeString must not be null"); //$NON-NLS-1$ } if (format == null) { throw new IllegalArgumentException("format must not be null"); //$NON-NLS-1$ } DateTime time = new DateTime(); time.setElapsedSeconds(format.parse(timeString)); return time; } /** * 日付のフォーマット。 */ public enum Format { /** * {@code YYYYMMDDhhmmss}の形式 (24時間表記)。 */ SIMPLE { @Override public long parse(String timeString) { if (timeString == null) { throw new IllegalArgumentException("dateString must not be null"); //$NON-NLS-1$ } if (timeString.length() != 14) { throw new IllegalArgumentException(MessageFormat.format( "\"{0}\" is not form of \"{1}\"", timeString, "YYYYMMDDhhmmss")); } int year = get(timeString, 0, 4); int month = get(timeString, 4, 6); int day = get(timeString, 6, 8); int hour = get(timeString, 8, 10); int minute = get(timeString, 10, 12); int second = get(timeString, 12, 14); int date = DateUtil.getDayFromDate(year, month, day); long seconds = (long) date * 86400 + DateUtil.getSecondFromTime(hour, minute, second); return seconds; } }, ; /** * 指定の文字列をこのフォーマットで解析し、0000/01/01 00:00:00からの経過秒数を返す。 * @param timeString 対象の文字列 * @return 0000/01/01 00:00:00からの経過秒数 * @throws IllegalArgumentException 引数に不正な文字列が指定された場合 */ public abstract long parse(String timeString); static int get(String string, int from, int to) { return Integer.parseInt(string.substring(from, to)); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6a55a4dc88ce5c408a2ce7a31602c937abce07e0
db8b6350520b61dbe5f9939682375b242b1fe676
/src/main/java/com/marcos/cursomc/domain/Estado.java
a02d242db20762fcd2cd93a23f47fca42e44fb4f
[]
no_license
marcosdavii/cursomc
757e8f0bc947ec889eac0de64abbb3f80dd9b4da
a092b31cd695bdbc158b7331eea28163c2ad54c1
refs/heads/master
2021-11-18T20:23:15.171285
2019-06-27T21:09:43
2019-06-27T21:09:43
193,553,274
1
0
null
null
null
null
UTF-8
Java
false
false
1,617
java
package com.marcos.cursomc.domain; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import com.fasterxml.jackson.annotation.JsonIgnore; @Entity public class Estado implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer id; private String nome; @JsonIgnore @OneToMany(mappedBy = "estado") private List<Cidade> cidades = new ArrayList<>(); public Estado() { } public Estado(Integer id, String nome) { super(); this.id = id; this.nome = nome; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public List<Cidade> getCidades() { return cidades; } public void setCidades(List<Cidade> cidades) { this.cidades = cidades; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Estado other = (Estado) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } }
[ "you@example.com" ]
you@example.com
70536b27dca008e7ff56fa8afaafce71caaf07e0
a770e95028afb71f3b161d43648c347642819740
/sources/org/telegram/tgnet/TLRPC$TL_phone_groupParticipants.java
71d2cb0c5e349b93ef64a34e01b8439cf4fc3dab
[]
no_license
Edicksonjga/TGDecompiledBeta
d7aa48a2b39bbaefd4752299620ff7b72b515c83
d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b
refs/heads/master
2023-08-25T04:12:15.592281
2021-10-28T20:24:07
2021-10-28T20:24:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,916
java
package org.telegram.tgnet; import java.util.ArrayList; public class TLRPC$TL_phone_groupParticipants extends TLObject { public static int constructor = -NUM; public ArrayList<TLRPC$Chat> chats = new ArrayList<>(); public int count; public String next_offset; public ArrayList<TLRPC$TL_groupCallParticipant> participants = new ArrayList<>(); public ArrayList<TLRPC$User> users = new ArrayList<>(); public int version; public static TLRPC$TL_phone_groupParticipants TLdeserialize(AbstractSerializedData abstractSerializedData, int i, boolean z) { if (constructor == i) { TLRPC$TL_phone_groupParticipants tLRPC$TL_phone_groupParticipants = new TLRPC$TL_phone_groupParticipants(); tLRPC$TL_phone_groupParticipants.readParams(abstractSerializedData, z); return tLRPC$TL_phone_groupParticipants; } else if (!z) { return null; } else { throw new RuntimeException(String.format("can't parse magic %x in TL_phone_groupParticipants", new Object[]{Integer.valueOf(i)})); } } public void readParams(AbstractSerializedData abstractSerializedData, boolean z) { this.count = abstractSerializedData.readInt32(z); int readInt32 = abstractSerializedData.readInt32(z); int i = 0; if (readInt32 == NUM) { int readInt322 = abstractSerializedData.readInt32(z); int i2 = 0; while (i2 < readInt322) { TLRPC$TL_groupCallParticipant TLdeserialize = TLRPC$TL_groupCallParticipant.TLdeserialize(abstractSerializedData, abstractSerializedData.readInt32(z), z); if (TLdeserialize != null) { this.participants.add(TLdeserialize); i2++; } else { return; } } this.next_offset = abstractSerializedData.readString(z); int readInt323 = abstractSerializedData.readInt32(z); if (readInt323 == NUM) { int readInt324 = abstractSerializedData.readInt32(z); int i3 = 0; while (i3 < readInt324) { TLRPC$Chat TLdeserialize2 = TLRPC$Chat.TLdeserialize(abstractSerializedData, abstractSerializedData.readInt32(z), z); if (TLdeserialize2 != null) { this.chats.add(TLdeserialize2); i3++; } else { return; } } int readInt325 = abstractSerializedData.readInt32(z); if (readInt325 == NUM) { int readInt326 = abstractSerializedData.readInt32(z); while (i < readInt326) { TLRPC$User TLdeserialize3 = TLRPC$User.TLdeserialize(abstractSerializedData, abstractSerializedData.readInt32(z), z); if (TLdeserialize3 != null) { this.users.add(TLdeserialize3); i++; } else { return; } } this.version = abstractSerializedData.readInt32(z); } else if (z) { throw new RuntimeException(String.format("wrong Vector magic, got %x", new Object[]{Integer.valueOf(readInt325)})); } } else if (z) { throw new RuntimeException(String.format("wrong Vector magic, got %x", new Object[]{Integer.valueOf(readInt323)})); } } else if (z) { throw new RuntimeException(String.format("wrong Vector magic, got %x", new Object[]{Integer.valueOf(readInt32)})); } } public void serializeToStream(AbstractSerializedData abstractSerializedData) { abstractSerializedData.writeInt32(constructor); abstractSerializedData.writeInt32(this.count); abstractSerializedData.writeInt32(NUM); int size = this.participants.size(); abstractSerializedData.writeInt32(size); for (int i = 0; i < size; i++) { this.participants.get(i).serializeToStream(abstractSerializedData); } abstractSerializedData.writeString(this.next_offset); abstractSerializedData.writeInt32(NUM); int size2 = this.chats.size(); abstractSerializedData.writeInt32(size2); for (int i2 = 0; i2 < size2; i2++) { this.chats.get(i2).serializeToStream(abstractSerializedData); } abstractSerializedData.writeInt32(NUM); int size3 = this.users.size(); abstractSerializedData.writeInt32(size3); for (int i3 = 0; i3 < size3; i3++) { this.users.get(i3).serializeToStream(abstractSerializedData); } abstractSerializedData.writeInt32(this.version); } }
[ "fabian_pastor@msn.com" ]
fabian_pastor@msn.com
1d22a5aea3f7e9b1aa0edfb059909f5478a4829f
f97cf61c36e03e6f0dc8aad512bebbb4af14d97b
/app/src/main/java/com/aliyun/ayland/utils/ATCallbackUtil.java
acc4152c1fc119b2f695129e2b52a7b56c3714f7
[]
no_license
584393321/aite_zhuoyue
be735aff9e3a1481c33752597fb34ba14dfe55be
7fc0b302f58aebfed158aea8aa2dadaa405b5ea0
refs/heads/main
2023-04-04T01:57:43.834761
2021-04-14T02:56:50
2021-04-14T02:56:50
357,750,366
0
1
null
null
null
null
UTF-8
Java
false
false
349
java
package com.aliyun.ayland.utils; import com.aliyun.ayland.interfaces.ATCallBack; public class ATCallbackUtil { private static ATCallBack mCallBack; public static void setCallBack(ATCallBack callBack) { mCallBack = callBack; } public static void doCallBackMethod(String authCode){ mCallBack.auth(authCode); } }
[ "584393321@qq.com" ]
584393321@qq.com
e0e0d8bcf371df3f3f2615c24ff0bbad0bef6df6
319531f0ef01900b83d106d53cb4e9502e33f355
/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/TestNonPrimaryKeyQueryParameters.java
b8a775bd394898e9d2e060f5b9ad19e1faf41683
[ "Apache-2.0", "CDDL-1.0", "LicenseRef-scancode-oracle-openjdk-exception-2.0", "GPL-2.0-only" ]
permissive
wso2/wso2-openjpa
798822ee319590eed5a00ae21b65b6977faf162d
9c3801c861d1a0c9d93a9fa5cfa0cbe749114b92
refs/heads/master
2023-08-14T23:55:26.907881
2022-04-05T09:32:59
2022-04-05T09:32:59
97,706,188
35
16
Apache-2.0
2022-04-05T09:33:00
2017-07-19T10:56:02
Java
UTF-8
Java
false
false
6,057
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.jdbc.query.cache; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityTransaction; import javax.persistence.Query; import org.apache.openjpa.persistence.test.SQLListenerTestCase; /** * Tests that find() queries that use non-primary keys can be cached. * * SQL Query Cache caches SQL queries generated to select single entity. * However, single instance queries may also join to other relations. Hence, * primary key and foreign keys are normally the parameters to these queries * which cached query binds again when being reused. * * The test verifies the case where non-primary keys are used as query * parameters. The test employs a inheritance hierarchy mapped to SINGLE_TABLE. * When derived instances are used in relationship, the discriminator values * must be used in to join to the target type. * * For further details, refer <A * HREF="https://issues.apache.org/jira/browse/OPENJPA-660">OPENJPA-660</A> * * * @author Pinaki Poddar * @author Vikram Bhatia * @author David Blevins */ public class TestNonPrimaryKeyQueryParameters extends SQLListenerTestCase { private static final int FULLTIME_EMPLOYEE_COUNT = 3; private static final int PARTTIME_EMPLOYEE_COUNT = 2; private static final int LINEITEM_PER_INVOICE = 1; private static final String DEPT_NAME = "ENGINEERING"; public void setUp() { super.setUp(CLEAR_TABLES, Department.class, Employee.class, FullTimeEmployee.class, PartTimeEmployee.class, Invoice.class, LineItem.class, "openjpa.jdbc.QuerySQLCache", "true"); createDepartment(DEPT_NAME); createInvoice(); sql.clear(); } public void testSelectQueryWithPrimaryKeyParameter() { EntityManager em = emf.createEntityManager(); Query query = em .createQuery("SELECT d from Department d where d.name=?1"); query.setParameter(1, DEPT_NAME); Department dept = (Department) query.getSingleResult(); assertEquals(FULLTIME_EMPLOYEE_COUNT, dept.getFullTimeEmployees() .size()); assertEquals(PARTTIME_EMPLOYEE_COUNT, dept.getPartTimeEmployees() .size()); assertSQL(".* AND t0.TYPE = .*"); em.close(); } public void testSelectQueryWithNoParameter() { EntityManager em = emf.createEntityManager(); Query query = em.createQuery("SELECT d from Department d"); Department dept = (Department) query.getSingleResult(); assertEquals(FULLTIME_EMPLOYEE_COUNT, dept.getFullTimeEmployees() .size()); assertEquals(PARTTIME_EMPLOYEE_COUNT, dept.getPartTimeEmployees() .size()); assertSQL(".* AND t0.TYPE = .*"); em.close(); } public void testFind() { EntityManager em = emf.createEntityManager(); Department dept = em.find(Department.class, DEPT_NAME); assertEquals(FULLTIME_EMPLOYEE_COUNT, dept.getFullTimeEmployees() .size()); assertEquals(PARTTIME_EMPLOYEE_COUNT, dept.getPartTimeEmployees() .size()); assertSQL(".* AND t0.TYPE = .*"); Invoice invoice = em.find(Invoice.class, new InvoiceKey(1, "Red")); List<LineItem> list = invoice.getLineItems(); assertEquals(LINEITEM_PER_INVOICE, list.size()); em.close(); } public void testSelectSubClass() { EntityManager em = emf.createEntityManager(); Query query = em.createQuery("SELECT e from FullTimeEmployee e"); assertEquals(FULLTIME_EMPLOYEE_COUNT, query.getResultList().size()); query = em.createQuery("SELECT e from PartTimeEmployee e"); assertEquals(PARTTIME_EMPLOYEE_COUNT, query.getResultList().size()); assertSQL(".* WHERE t0.TYPE = .*"); } public void testSelectBaseClass() { EntityManager em = emf.createEntityManager(); Query query = em.createQuery("SELECT e from Employee e"); assertEquals(FULLTIME_EMPLOYEE_COUNT + PARTTIME_EMPLOYEE_COUNT, query.getResultList().size()); assertNotSQL(".* WHERE t0.TYPE = .*"); } private void createDepartment(String deptName) { if (count(Department.class) > 0) return; Department dept = new Department(); dept.setName(deptName); for (int i = 1; i <= FULLTIME_EMPLOYEE_COUNT; i++) { FullTimeEmployee e = new FullTimeEmployee(); e.setSsn("888-PP-001" + i); e.setSalary(100000); dept.addEmployee(e); } for (int i = 1; i <= PARTTIME_EMPLOYEE_COUNT; i++) { PartTimeEmployee e = new PartTimeEmployee(); e.setSsn("999-PP-001" + i); e.setHourlyWage(20); dept.addEmployee(e); } EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); em.persist(dept); em.getTransaction().commit(); em.close(); } private void createInvoice() { EntityManager em = emf.createEntityManager(); EntityTransaction tran = em.getTransaction(); tran.begin(); Invoice invoice = new Invoice(1, "Red", 1.30); for (int i = 1; i <= LINEITEM_PER_INVOICE; i++) { LineItem item = new LineItem(String.valueOf(i), 10); item.setInvoice(invoice); invoice.getLineItems().add(item); em.persist(invoice); } em.flush(); tran.commit(); em.close(); } }
[ "nandika@wso2.com" ]
nandika@wso2.com
a9a0e4d137a201cab3ff9487290e6afaaa1ade72
46167791cbfeebc8d3ddc97112764d7947fffa22
/quarkus/src/main/java/com/justexample/repository/Entity1637Repository.java
84264f601ec13ba91d0f410b73f63ada9276fe89
[]
no_license
kahlai/unrealistictest
4f668b4822a25b4c1f06c6b543a26506bb1f8870
fe30034b05f5aacd0ef69523479ae721e234995c
refs/heads/master
2023-08-25T09:32:16.059555
2021-11-09T08:17:22
2021-11-09T08:17:22
425,726,016
0
0
null
null
null
null
UTF-8
Java
false
false
244
java
package com.example.repository; import java.util.List; import com.example.entity.Entity1637; import org.springframework.data.jpa.repository.JpaRepository; public interface Entity1637Repository extends JpaRepository<Entity1637,Long>{ }
[ "laikahhoe@gmail.com" ]
laikahhoe@gmail.com
b172a4f2398c1f6df78d9cc78df6fe87ed33dd27
d44961b736d956be5e294d3e6def8ffb008376ee
/crp-rule-endoscopy/src/main/java/com/clinical/dao/cluster/GastroscopeMapper.java
b4386bda5ecf7b4cdf63b5701378d8970e7facb1
[]
no_license
zhiji6/rule-2
2b5062f2e77797a87e43061b190d90fef5bbdbd8
cb58cde99257242bd0c394f75f1f2d02dd00b5c2
refs/heads/master
2023-08-15T06:21:07.833357
2021-03-06T08:28:14
2021-03-06T08:28:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.clinical.dao.cluster; import java.util.List; import com.clinical.model.cluster.Gastroscope; public interface GastroscopeMapper { List<Gastroscope> findGastroscope(String uniqueId); void saveGastroscope(Gastroscope gastroscope); void updateGastroscope(Gastroscope gastroscope); }
[ "sdlqmc@yeah.net" ]
sdlqmc@yeah.net
0a7c69123734fadf85805a0e891dac097486a146
64f0a73f1f35078d94b1bc229c1ce6e6de565a5f
/dataset/Top APKs Java Files/com.wiseplay-com-heyzap-house-Manager.java
5a08b327e43072d91af74d727fe7c0c5eab0a74f
[ "MIT" ]
permissive
S2-group/mobilesoft-2020-iam-replication-package
40d466184b995d7d0a9ae6e238f35ecfb249ccf0
600d790aaea7f1ca663d9c187df3c8760c63eacd
refs/heads/master
2021-02-15T21:04:20.350121
2020-10-05T12:48:52
2020-10-05T12:48:52
244,930,541
2
2
null
null
null
null
UTF-8
Java
false
false
6,614
java
package com.heyzap.house; import android.content.Context; import android.content.pm.PackageInfo; import android.os.Handler; import android.os.Looper; import com.heyzap.common.cache.FileCache; import com.heyzap.common.concurrency.ExecutorPool; import com.heyzap.common.concurrency.FutureUtils; import com.heyzap.common.concurrency.SettableFuture; import com.heyzap.house.abstr.AbstractActivity; import com.heyzap.house.model.AdModel; import com.heyzap.house.request.DisplayCache; import com.heyzap.house.request.FetchRequest; import com.heyzap.internal.ContextReference; import com.heyzap.internal.Logger; import com.heyzap.internal.Utils; import com.heyzap.sdk.ads.HeyzapAds; import com.heyzap.sdk.ads.HeyzapAds.AdsConfig; import java.io.File; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicReference; public class Manager { public static final String ACTION_URL_PLACEHOLDER = "market://details?id=%s&referrer=%s"; public static final String ACTION_URL_REFERRER = "utm_source%3Dheyzap%26utm_medium%3Dmobile%26utm_campaign%3Dheyzap_ad_network"; public static String AD_SERVER; public static final String FIRST_RUN_KEY = "HeyzapAdsFirstRun"; public static final long MAX_CACHE_SIZE = 30000000L; public static Boolean SLOW_CLOSE; public static Context applicationContext; private static DisplayCache displayCache; private static FileCache fileCache; public static final Handler handler; private static AtomicReference<SettableFuture> initializationFutureRef = new AtomicReference(); public static AbstractActivity lastActivity; public static long maxClickDifference = 1000L; private static volatile Manager ref; public static Boolean started; private ContextReference contextRef = null; public long lastClickedTime = 0L; static { SLOW_CLOSE = Boolean.valueOf(false); AD_SERVER = "http://ads.heyzap.com/in_game_api/ads"; handler = new Handler(Looper.getMainLooper()); started = Boolean.valueOf(false); lastActivity = null; } private Manager(ContextReference paramContextReference, String paramString) { setPublisherId(paramString); setContextRef(paramContextReference); clearAndCreateImageFileCache(); displayCache = new DisplayCache(); fileCache = new FileCache(ExecutorPool.getInstance(), new File(Utils.getCacheDirAbsolutePath(paramContextReference.getApp())), Long.valueOf(30000000L)); } public static Manager getInstance() { try { if (ref == null) { throw new RuntimeException("Heyzap has not been started yet! Start Heyzap by calling HeyzapAds.start(<your-publisher-id>) in your launch Activity."); } } finally {} Manager localManager = ref; return localManager; } public static Boolean isStarted() { return started; } public static void runOnUiThread(Runnable paramRunnable) { new Handler(Looper.getMainLooper()).post(paramRunnable); } public static void setAdsHost(String paramString) { FetchRequest.setDefaultHost(paramString); com.heyzap.common.net.APIClient.DOMAIN = paramString; AD_SERVER = "http://" + paramString + "/in_game_api/ads"; } public static SettableFuture start(ContextReference paramContextReference, String paramString) { if (initializationFutureRef.compareAndSet(null, SettableFuture.create())) { if (paramContextReference.getApp() == null) { throw new IllegalArgumentException(); } applicationContext = paramContextReference.getApp(); ref = new Manager(paramContextReference, paramString); com.heyzap.internal.PackageManager.checkInstalledPackages(paramContextReference.getApp()); paramContextReference = ref.getFileCache().open(); paramContextReference.addListener(new Manager.1(), ExecutorPool.getInstance()); FutureUtils.bind(paramContextReference, (SettableFuture)initializationFutureRef.get(), ExecutorPool.getInstance()); ((SettableFuture)initializationFutureRef.get()).addListener(new Manager.2(), ExecutorPool.getInstance()); } return (SettableFuture)initializationFutureRef.get(); } public void clearAndCreateFileCache() { String str = Utils.getCacheDirAbsolutePath(applicationContext); try { if (new File(str).exists()) { Utils.deleteDirectory(new File(str)); } new File(str).mkdirs(); return; } catch (Exception localException) { Logger.trace(localException); } } public void clearAndCreateImageFileCache() { String str = Utils.getImageCacheDirAbsolutePath(applicationContext); try { if (new File(str).exists()) { Utils.deleteDirectory(new File(str)); } new File(str).mkdirs(); return; } catch (Exception localException) { Logger.trace(localException); } } public Object clone() { return null; } public DisplayCache getDisplayCache() { return displayCache; } public FileCache getFileCache() { return fileCache; } public List<String> getLocalPackages() { if (applicationContext == null) { return null; } Object localObject = applicationContext.getPackageManager().getInstalledPackages(0); ArrayList localArrayList = new ArrayList(); localObject = ((List)localObject).iterator(); while (((Iterator)localObject).hasNext()) { PackageInfo localPackageInfo = (PackageInfo)((Iterator)localObject).next(); if ((!localPackageInfo.packageName.startsWith("android.")) && (!localPackageInfo.packageName.startsWith("com.google.android")) && (!localPackageInfo.packageName.startsWith("com.android")) && (!localPackageInfo.packageName.startsWith("com.htc")) && (!localPackageInfo.packageName.startsWith("com.samsung")) && (!localPackageInfo.packageName.startsWith("com.sec")) && (!localPackageInfo.packageName.startsWith("com.monotype")) && (!localPackageInfo.packageName.startsWith("com.verizon")) && (!localPackageInfo.packageName.startsWith("com.qualcomm")) && (!localPackageInfo.packageName.startsWith("com.vzw"))) { localArrayList.add(localPackageInfo.packageName); } } return localArrayList; } public String getPublisherId() { return HeyzapAds.config.publisherId; } public void installHeyzap(AdModel paramAdModel) {} public void setContextRef(ContextReference paramContextReference) { this.contextRef = paramContextReference; } public void setPublisherId(String paramString) { HeyzapAds.config.publisherId = paramString; } }
[ "ibrahimkanj@outlook.com" ]
ibrahimkanj@outlook.com
f2b8effc1a93baa3accd6badeac78ec701b85ad3
02d23a346883c46c9b321260331441aa87f5aa52
/leetcode/leetcode/SpiralMatrixII.java
fa0e57cd751684c0c2004597e4791a42460fda61
[]
no_license
whztt07/AlgoSolutions
9870d02df1d70cd9e5002950643c92666b6fee04
a13e2207b6b87c94825bf6299a66b7d149017722
refs/heads/master
2020-07-11T02:45:24.206198
2019-07-30T11:45:57
2019-07-30T11:45:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
892
java
/* Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] */ public class SpiralMatrixII { public int[][] generateMatrix(int n) { int[][] result = new int[n][n]; for (int i = 0, value = 1;i < (n + 1) / 2; ++i) { for (int col = i; col < n - i; ++col) { result[i][col] = value++; } for (int row = i + 1; row < n - i; ++row) { result[row][n - 1 - i] = value++; } for (int col = n - 2 - i; col >= i; --col) { result[n - 1 - i][col] = value++; } for (int row = n - 2 - i; row > i; --row) { result[row][i] = value++; } } return result; } }
[ "mitcc@qq.com" ]
mitcc@qq.com
fff729b4c6bdea68765233003fc95c1e27777ee2
34e577215a763f08fba3ece626365cc67f1d6d51
/src/base/iv/ComparatorTest.java
0cef049b6ac682ade6dc8e5ede783207d4463917
[]
no_license
luolili/java-jdk-study-demo
79d22214e844dd3ce7484231278a9a629c20c118
f21626dcf2019c4c082a589759900748bcd67eeb
refs/heads/master
2022-12-21T14:24:53.430876
2020-07-05T09:26:51
2020-07-05T09:26:51
187,483,450
0
0
null
2022-12-15T23:25:22
2019-05-19T13:56:23
Java
UTF-8
Java
false
false
580
java
package base.iv; import java.util.Arrays; import java.util.Comparator; import java.util.List; /** * */ public class ComparatorTest { public static void main(String[] args) { //对整数进行排序 List<Integer> nums = Arrays.asList(3, 5, 1, 0, -2); nums.sort(Comparator.naturalOrder()); System.out.println(nums);//[-2, 0, 1, 3, 5] //对字符串排序 List<String> cites = Arrays.asList("Milan", "Lo", "San"); cites.sort(Comparator.naturalOrder()); System.out.println(cites);//[Lo, Milan, San] } }
[ "2084267015@qq.com" ]
2084267015@qq.com
63af8d9de2874b3ee3892f974469482cc478571d
5b5defd093d62cc7e05a7a7c798356c7983e7866
/test/src/test/java/org/zstack/test/compute/hostallocator/TestReservedHostCapacity.java
00f0ec89c444a2bad5cdbb0d27a6e4a6b83cadbf
[ "Apache-2.0" ]
permissive
tbyes/zstack
0bddaf6a1be4e46e181dfffacdbd5aaff5ec803b
7f8ae92fa3d95c1e3ac876a9846f9fe0cbf63d5e
refs/heads/master
2020-06-30T20:42:07.888244
2016-11-21T09:12:13
2016-11-21T09:12:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,029
java
package org.zstack.test.compute.hostallocator; import org.junit.Before; import org.junit.Test; import org.zstack.core.cloudbus.CloudBus; import org.zstack.core.componentloader.ComponentLoader; import org.zstack.core.db.DatabaseFacade; import org.zstack.header.configuration.InstanceOfferingInventory; import org.zstack.header.image.ImageInventory; import org.zstack.header.network.l3.L3NetworkInventory; import org.zstack.kvm.KVMGlobalConfig; import org.zstack.test.*; import org.zstack.test.deployer.Deployer; /** * 1. set KVMGlobalConfig.RESERVED_CPU_CAPACITY to a big value that makes allocation failure * * confirm vm creation failure */ @Deprecated public class TestReservedHostCapacity { Deployer deployer; Api api; ComponentLoader loader; CloudBus bus; DatabaseFacade dbf; @Before public void setUp() throws Exception { DBUtil.reDeployDB(); WebBeanConstructor con = new WebBeanConstructor(); deployer = new Deployer("deployerXml/hostAllocator/TestReservedHostCapacity.xml", con); deployer.addSpringConfig("KVMRelated.xml"); deployer.build(); api = deployer.getApi(); loader = deployer.getComponentLoader(); bus = loader.getComponent(CloudBus.class); dbf = loader.getComponent(DatabaseFacade.class); } @Test(expected = ApiSenderException.class) public void test() throws ApiSenderException { KVMGlobalConfig.RESERVED_CPU_CAPACITY.updateValue(10 * 2600L); L3NetworkInventory l3 = deployer.l3Networks.get("TestL3Network1"); InstanceOfferingInventory instanceOffering = deployer.instanceOfferings.get("TestInstanceOffering"); ImageInventory imageInventory = deployer.images.get("TestImage"); VmCreator creator = new VmCreator(api); creator.timeout = 600; creator.addL3Network(l3.getUuid()); creator.imageUuid = imageInventory.getUuid(); creator.instanceOfferingUuid = instanceOffering.getUuid(); creator.create(); } }
[ "xuexuemiao@yeah.net" ]
xuexuemiao@yeah.net
60ac5098ffe9a5d80c24c1061e8c5171164bec73
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-31b-4-25-SPEA2-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/special/Beta_ESTest_scaffolding.java
acb1d132c7d804e227aa4951743b0f53212ece8b
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Jan 19 03:38:49 UTC 2020 */ package org.apache.commons.math3.special; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class Beta_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
042c9482cc4d75f4b7c6633f0c76a3ebddabe906
bee40bed1a25806f45d147720260d52a6d149694
/Allgemeines/JDBC/src/main/java/de/sql/tests/RawSpringJDBCWithPoolExample.java
696da09d5a74ac2335062c4bdef50c5e1ef04bea
[]
no_license
alephzed/JavaForFun
de0c02fd562b54d10a26965b920e0884b8072f9d
199131b8dc8224faa2bfcfe0de3dc3310483d8e5
refs/heads/master
2022-03-08T11:04:47.676423
2019-11-10T21:34:24
2019-11-10T21:34:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,432
java
package de.sql.tests; import java.beans.PropertyVetoException; import java.util.HashMap; import java.util.Map; import javax.sql.DataSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.jdbc.core.JdbcOperations; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.jdbc.core.simple.SimpleJdbcCall; import org.springframework.jdbc.core.simple.SimpleJdbcInsert; import org.springframework.jdbc.core.simple.SimpleJdbcInsertOperations; import org.springframework.jdbc.core.simple.SimpleJdbcOperations; import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; import com.mchange.v2.c3p0.ComboPooledDataSource; public class RawSpringJDBCWithPoolExample { private static final Logger logger = LoggerFactory.getLogger(RawSpringJDBCWithPoolExample.class); public static void main(final String[] args) throws PropertyVetoException { // Just for fun, programmatic configuration. final DataSource dataSource = getDataSource(); final Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("AD_ID", 1); // 3. Using Spring JdbcTemplate final JdbcOperations jdbcTemplate = new JdbcTemplate(dataSource); jdbcTemplate.execute("SELECT * FROM AD"); // 4. Using SimpleJdbcTemplate final SimpleJdbcOperations simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource); final int deprecatedResult = simpleJdbcTemplate.queryForInt("SELECT * FROM AD", parameters); logger.info("Deprecated result: " + deprecatedResult); // 5. Using NamedParameterJdbcTemplate final NamedParameterJdbcOperations namedParameterJdbcOperations = new NamedParameterJdbcTemplate(dataSource); final int namedResult = namedParameterJdbcOperations.queryForInt("SELECT * FROM AD", parameters); logger.info("Named result: " + namedResult); // 6. Using Spring SimpleJdbcInsert final SimpleJdbcInsertOperations simpleJdbcInsert = new SimpleJdbcInsert(dataSource); simpleJdbcInsert.withTableName("ad"); simpleJdbcInsert.execute(parameters); // 7. Using Spring SimpleJdbcCall final SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(dataSource); // Now we close the whole pool :) ((ComboPooledDataSource)dataSource).close(); } /** * Just for fun, programmatic configuration. * @return * @throws PropertyVetoException */ private static DataSource getDataSource() throws PropertyVetoException { final ComboPooledDataSource pool = new ComboPooledDataSource(); pool.setUser("root"); pool.setPassword(""); // We are going to use the JDBC driver pool.setDriverClass("com.mysql.jdbc.Driver"); pool.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/n2a?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF-8"); pool.setInitialPoolSize(5); pool.setMaxPoolSize(35); pool.setMinPoolSize(10); pool.setAcquireIncrement(1); pool.setAcquireRetryAttempts(5); pool.setAcquireRetryDelay(1000); pool.setAutomaticTestTable("con_test"); pool.setCheckoutTimeout(5000); return pool; } }
[ "gu.martinm@gmail.com" ]
gu.martinm@gmail.com
d76cd2adce2a5cd5769a3981790c1f1c5d0c805c
30e2cb0f82d70cab392f70518c16067705c752eb
/src/main/java/org/hyperskill/hstest/dynamic/input/DynamicTestingMethod.java
0fd84c3d19221e517e6da695ce25f02c8236f752
[]
no_license
hyperskill/hs-test
7afb9fbfb32d3efea9f810be8116f6d99728b8d1
94a14529121e3509a0db1e1a552378085587f34d
refs/heads/master
2023-08-10T04:28:38.330242
2023-06-12T10:25:57
2023-06-12T10:25:57
167,659,709
35
19
null
2023-06-12T10:25:58
2019-01-26T06:55:37
Java
UTF-8
Java
false
false
433
java
package org.hyperskill.hstest.dynamic.input; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Deprecated, use hstest.dynamic.DynamicTest instead * * It is deprecated to be consistent with the python's hs-test library * that uses decorator @dynamic_test in module hstest.dynamic.dynamic_test */ @Deprecated @Retention(RetentionPolicy.RUNTIME) public @interface DynamicTestingMethod { }
[ "aaaaaa2493@yandex.ru" ]
aaaaaa2493@yandex.ru
3619b214629ad9403d99896730ee4bad2992f55d
2efc9296543b7e6d3ad875ce8e036b028550ca01
/kingroup_java/kingroup/algorithm/window/AlgWinAccessOrder.java
ae5c5d14668c6eca3a668e5816dc11d82287d197
[]
no_license
dmitryako/kingroup
4127ecc56744120cd4a1f3d3801665b318b9267c
93614aef0fba4af34a281cae076fb51eb44b73a2
refs/heads/master
2021-05-28T15:13:27.783984
2010-12-01T23:45:50
2010-12-01T23:45:50
34,374,747
1
0
null
null
null
null
UTF-8
Java
false
false
799
java
package kingroup.algorithm.window; import javax.utilx.bitset.CompBitSet; import java.util.BitSet; /** * Copyright KinGroup Team. * User: jc138691, Date: 12/01/2006, Time: 15:27:41 */ public abstract class AlgWinAccessOrder { public static final int NOT_SET = -1; protected final int popSize; protected BitSet pool; public AlgWinAccessOrder(int size) { popSize = size; } public void setUnassignedPool(BitSet unassign) { pool = unassign; } public void setAssignedPool(BitSet done) { pool = new CompBitSet(); pool.set(0, popSize, true); pool.andNot(done); //Clears all of the bits in this BitSet whose corresponding bit is set in the specified BitSet. } public abstract boolean hasNext(); public abstract int nextIdx(); }
[ "dmitry.a.konovalov@186c7d38-ed03-11dd-97d9-e7a3ff7b18fb" ]
dmitry.a.konovalov@186c7d38-ed03-11dd-97d9-e7a3ff7b18fb
1d2d6914f0c1d86f862ee3964d2eaa7078df104e
dc17a43f25cfd1d3ecf0ffebf709b2721c80031d
/IDE/device/com.lembed.lite.studio.device.project/src/com/lembed/lite/studio/device/project/ui/handlers/UpdateConfigFileHandler.java
c59a51ad65d76fc9e951ed201c7ba922e8b4fd6a
[]
no_license
skykying/bundle
e7b25a8d56668a5cb1cd70932d14958927960e50
0b3b590760baa953677eb99e07d7e1a37af5434c
refs/heads/master
2023-01-07T20:03:42.318642
2020-11-08T06:36:39
2020-11-08T06:36:39
306,216,461
0
0
null
null
null
null
UTF-8
Java
false
false
4,508
java
package com.lembed.lite.studio.device.project.ui.handlers; import java.util.Map; import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.ISelectionService; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.commands.IElementUpdater; import org.eclipse.ui.handlers.HandlerUtil; import org.eclipse.ui.menus.UIElement; import com.lembed.lite.studio.device.core.data.ICpFile; import com.lembed.lite.studio.device.core.enums.EFileCategory; import com.lembed.lite.studio.device.core.enums.EFileRole; import com.lembed.lite.studio.device.core.info.ICpFileInfo; import com.lembed.lite.studio.device.project.CpProjectPlugIn; import com.lembed.lite.studio.device.project.ILiteProject; import com.lembed.lite.studio.device.project.Messages; import com.lembed.lite.studio.device.project.impl.LiteProjectStorage; import com.lembed.lite.studio.device.project.utils.ProjectUtils; import com.lembed.lite.studio.device.utils.DeviceUIUtils; public class UpdateConfigFileHandler extends AbstractHandler implements IElementUpdater { @Override public Object execute(ExecutionEvent event) throws ExecutionException { ISelection selection = HandlerUtil.getCurrentSelection(event); if (!(selection instanceof IStructuredSelection)) { return null; } IStructuredSelection sel = (IStructuredSelection) selection; for (Object obj : sel.toArray()) { IFile file = ProjectUtils.getLiteFileResource(obj); String dstFile = file.getProjectRelativePath().toString(); ICpFileInfo fi = ProjectUtils.getCpFileInfo(file); ICpFile f = fi.getFile(); String srcFile = fi.getAbsolutePath(f.getName()); EFileRole role = fi.getRole(); if (role == EFileRole.CONFIG || role == EFileRole.COPY) { int index = -1; EFileCategory cat = fi.getCategory(); if (cat.isHeader() || cat.isSource()) { String baseSrc = DeviceUIUtils.extractBaseFileName(srcFile); String baseDst = DeviceUIUtils.extractBaseFileName(dstFile); int len = baseSrc.length() + 1; if (baseDst.length() > len) { String instance = baseDst.substring(len); try { index = Integer.decode(instance); } catch (NumberFormatException e) { // do nothing, use -1 } } } try { int bCopied = ProjectUtils.copyFile(file.getProject(), srcFile, dstFile, index, null, true); if (bCopied == 1) { // do the version update and save it in the .cproject // file fi.setVersion(f.getVersion()); ILiteProject liteProject = CpProjectPlugIn.getLiteProjectManager().getLiteProject(file.getProject()); LiteProjectStorage projectStorage = liteProject.getProjectStorage(); projectStorage.setConfigFileVersion(dstFile, f.getVersion()); projectStorage.save(CoreModel.getDefault().getProjectDescription(file.getProject())); liteProject.save(); } } catch (CoreException e) { e.printStackTrace(); } } } return null; } @Override public void updateElement(UIElement element, @SuppressWarnings("rawtypes") Map parameters) { ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); ISelection selection = selectionService.getSelection("org.eclipse.ui.navigator.ProjectExplorer"); //$NON-NLS-1$ if (selection instanceof IStructuredSelection) { IStructuredSelection sel = (IStructuredSelection) selection; if (sel.size() == 1) { Object obj = sel.getFirstElement(); IFile file = ProjectUtils.getLiteFileResource(obj); ICpFileInfo fi = ProjectUtils.getCpFileInfo(file); if (fi == null || fi.getFile() == null) { return; } int versionDiff = fi.getVersionDiff(); String versionText = " (" + fi.getVersion() + " -> " + fi.getFile().getVersion() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (versionDiff < 0) { element.setText(Messages.UpdateConfigFileHandler_Upgrade + file.getName() + versionText); } else if (versionDiff > 2) { element.setText(Messages.UpdateConfigFileHandler_Downgrade + file.getName() + versionText); } } else if (sel.size() > 1) { element.setText(Messages.UpdateConfigFileHandler_UpdateSelectedFiles); } } } }
[ "root@lembed.com" ]
root@lembed.com
60c81ddd5ec9ded5f2d76c7853ff5faddaef8ccd
a76f19f22c8ccf566df396dc64bced29e253e77a
/src/filters/EncodingFilter.java
aefa0982ac415160fe733ec28ce019b7c70202b1
[]
no_license
kin0ako/kadai-tasklist
655563cc8c9efe51c509087e74e2435b4a5324c9
bc0db776b9989a0c73b209c4f9379f923675e586
refs/heads/master
2023-07-03T08:59:15.083987
2021-08-12T04:24:12
2021-08-12T04:24:12
395,193,974
0
0
null
null
null
null
UTF-8
Java
false
false
1,140
java
package filters; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFilter; /** * Servlet Filter implementation class EncodingFilter */ @WebFilter("/*") //文字化け防止の「おまじない」 public class EncodingFilter implements Filter { /** * Default constructor. */ public EncodingFilter() { } /** * @see Filter#destroy() */ public void destroy() { } /** * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain) */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); chain.doFilter(request, response); } /** * @see Filter#init(FilterConfig) */ public void init(FilterConfig fConfig) throws ServletException { } }
[ "email@example.com" ]
email@example.com
4e605aeb38528c3369d9c6b2a6143f5dab403391
e75dd2de08c8ea344b79279d182edd027ff954c7
/src/main/java/com/fameden/service/loginregistration/ForgotPasswordService.java
6914ab3e5d9fece5fcf12d82992ae959c0d89b98
[]
no_license
FamedenDev/FameDenDesktopApplication
b7440409ba7ba3dd71166d8e2bda9431a48c0b2f
6dc254273348d8fc1e22504543495b1231f68b22
refs/heads/master
2021-01-04T02:36:40.464371
2014-01-04T18:51:58
2014-01-04T18:51:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,501
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.fameden.service.loginregistration; import com.fameden.constants.loginregistration.LoginRegistrationConstants; import com.fameden.dto.loginregistration.LoginRegistrationDTO; import com.fameden.service.IService; import com.fameden.webservice.contracts.useroperations.CommonRequestAttributes; import com.fameden.webservice.contracts.useroperations.CommonResponseAttributes; import com.fameden.webservice.useroperations.UserOperationsService; import com.fameden.webservice.useroperations.UserOperationsService_Service; import java.security.NoSuchAlgorithmException; import java.util.logging.Level; import java.util.logging.Logger; import javax.crypto.NoSuchPaddingException; /** * * @author ravjotsingh */ public class ForgotPasswordService implements IService { private static ForgotPasswordService SINGLETON; private ForgotPasswordService() throws Exception, NoSuchAlgorithmException, NoSuchPaddingException { if (SINGLETON != null) { throw new Exception(ForgotPasswordService.class.getName()); } } public static ForgotPasswordService getInstance() throws Exception, NoSuchAlgorithmException, NoSuchPaddingException { if (SINGLETON == null) { SINGLETON = new ForgotPasswordService(); } return SINGLETON; } @Override public Object processRequest(Object obj) { UserOperationsService_Service service = new UserOperationsService_Service(); UserOperationsService servicePort = service.getUserOperationsPort(); CommonResponseAttributes response = null; try { response = servicePort.forgotPassword((CommonRequestAttributes) populateRequest(obj)); } catch (Exception ex) { Logger.getLogger(RegistrationService.class.getName()).log(Level.SEVERE, null, ex); } return response; } @Override public Object populateRequest(Object obj) throws Exception { CommonRequestAttributes request = new CommonRequestAttributes(); LoginRegistrationDTO dto = (LoginRegistrationDTO) obj; request.setRequestType(LoginRegistrationConstants.FORGOT_PASSWORD_REQUEST_TYPE); request.setUserEmailAddress(dto.getForogotEmailAddress()); return request; } }
[ "ravjot28@gmail.com" ]
ravjot28@gmail.com
a2ef5676facd727e1f58573ace8a0d78bd49fcc5
b777c7a10237da84c132238af66a942da563529e
/Rusted/game-lib/com/corrodinggames/rts/gameFramework/f/class_405.java
3388e90571161e7a5d7930b71f65152313d189d3
[]
no_license
macuser47/SaltyRust
6ce11ffe9a8d6bcd609e3346f6c17f5f580ce4a8
02db02c7dadbd5397367d66e9e39331fe3f438b7
refs/heads/master
2020-04-20T13:09:11.311551
2019-02-02T18:03:02
2019-02-02T18:03:02
168,861,365
0
0
null
null
null
null
UTF-8
Java
false
false
1,656
java
package com.corrodinggames.rts.gameFramework.f; import com.corrodinggames.rts.game.units.class_39; // $FF: renamed from: com.corrodinggames.rts.gameFramework.f.f public class class_405 extends class_404 { // $FF: renamed from: a java.lang.String public String field_3310 = ""; // $FF: renamed from: a (int) void public strictfp void method_2541(int var1) { this.field_3310 = this.field_3310 + "|" + var1; super.method_2541(var1); } // $FF: renamed from: a (float) void public strictfp void method_2542(float var1) { this.field_3310 = this.field_3310 + "|" + var1; super.method_2542(var1); } // $FF: renamed from: a (short) void public strictfp void method_2561(short var1) { this.field_3310 = this.field_3310 + "|" + var1; super.method_2561(var1); } // $FF: renamed from: a (boolean) void public strictfp void method_2540(boolean var1) { this.field_3310 = this.field_3310 + "|" + var1; super.method_2540(var1); } // $FF: renamed from: a (java.lang.String, boolean) void public strictfp void method_2566(String var1, boolean var2) { this.field_3310 = this.field_3310 + "<" + var1 + ">"; super.method_2566(var1, var2); } // $FF: renamed from: a (java.lang.String) void public strictfp void method_2567(String var1) { this.field_3310 = this.field_3310 + "</" + var1 + ">"; super.method_2567(var1); } // $FF: renamed from: a (com.corrodinggames.rts.game.units.aa) void public strictfp void method_2550(class_39 var1) { this.field_3310 = this.field_3310 + "|u:" + var1; super.method_2550(var1); } }
[ "nichodlofski@gmail.com" ]
nichodlofski@gmail.com
0ffbc3a3e2c814cea1670365acafe81898fa365f
960218c71b56e83debdedd03b666601efdfc8bb5
/amadeus-stub/src/main/java/com/amadeus/xml/tibnrr_15_1_1a/ExcessBaggageDetailsTypeI.java
2c9d53a130fe08337c307676c8873768b1b8d91c
[]
no_license
gaurav-rupnar/xtravel
4d823a64c0ac2e870c78fd19ab229c89870bc2a0
827942629739d187c4d579bc45cc2c150624b205
refs/heads/master
2021-09-03T19:19:24.912249
2018-01-11T09:58:56
2018-01-11T09:58:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,891
java
package com.amadeus.xml.tibnrr_15_1_1a; import java.math.BigDecimal; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * To specify details concerning a traveller's excess baggage. * * <p>Java class for ExcessBaggageDetailsTypeI complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ExcessBaggageDetailsTypeI"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="currency" type="{http://xml.amadeus.com/TIBNRR_15_1_1A}AlphaNumericString_Length1To3" minOccurs="0"/> * &lt;element name="amount" type="{http://xml.amadeus.com/TIBNRR_15_1_1A}NumericDecimal_Length1To18" minOccurs="0"/> * &lt;element name="processIndicator" type="{http://xml.amadeus.com/TIBNRR_15_1_1A}AlphaNumericString_Length1To3" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ExcessBaggageDetailsTypeI", propOrder = { "currency", "amount", "processIndicator" }) public class ExcessBaggageDetailsTypeI { protected String currency; protected BigDecimal amount; protected String processIndicator; /** * Gets the value of the currency property. * * @return * possible object is * {@link String } * */ public String getCurrency() { return currency; } /** * Sets the value of the currency property. * * @param value * allowed object is * {@link String } * */ public void setCurrency(String value) { this.currency = value; } /** * Gets the value of the amount property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getAmount() { return amount; } /** * Sets the value of the amount property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setAmount(BigDecimal value) { this.amount = value; } /** * Gets the value of the processIndicator property. * * @return * possible object is * {@link String } * */ public String getProcessIndicator() { return processIndicator; } /** * Sets the value of the processIndicator property. * * @param value * allowed object is * {@link String } * */ public void setProcessIndicator(String value) { this.processIndicator = value; } }
[ "gauravrupnar@gmail.com" ]
gauravrupnar@gmail.com
44955524fc21d4f007a61d344e251bcaa7e714f4
54615e118092509c5dce981fc245c42507a772b1
/custom/src/main/java/com/example/custom/util/AppUtil.java
eb8e901c73adec586f0c28e599f5a453ac151435
[]
no_license
haitingzhao/android2
cdf0d15b7e313d412ccbd9d6096bd351f52646fd
39ef7cb0475fd322e96c186f2b633f9226bef484
refs/heads/master
2020-03-09T09:11:13.247096
2018-04-07T07:09:52
2018-04-07T07:09:52
128,706,825
1
0
null
2018-04-09T03:02:47
2018-04-09T03:02:47
null
UTF-8
Java
false
false
3,847
java
package com.example.custom.util; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import com.example.custom.bean.AppInfo; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.util.SparseIntArray; public class AppUtil { // 获取已安装的应用信息队列 public static ArrayList<AppInfo> getAppInfo(Context ctx, int type) { ArrayList<AppInfo> appList = new ArrayList<AppInfo>(); SparseIntArray siArray = new SparseIntArray(); PackageManager pm = ctx.getPackageManager(); // 获取系统中已经安装的应用列表 List<ApplicationInfo> installList = pm.getInstalledApplications( PackageManager.PERMISSION_GRANTED); for (int i = 0; i < installList.size(); i++) { ApplicationInfo item = installList.get(i); // 去掉重复的应用信息 if (siArray.indexOfKey(item.uid) >= 0) { continue; } siArray.put(item.uid, 1); try { // 获取该应用的权限列表 String[] permissions = pm.getPackageInfo(item.packageName, PackageManager.GET_PERMISSIONS).requestedPermissions; if (permissions == null) { continue; } boolean isQueryNetwork = false; for (String permission : permissions) { // 过滤那些具备上网权限的应用 if (permission.equals("android.permission.INTERNET")) { isQueryNetwork = true; break; } } // 类型为0表示所有应用,为1表示只要联网应用 if (type == 0 || (type == 1 && isQueryNetwork)) { AppInfo app = new AppInfo(); app.uid = item.uid; // 获取应用的编号 app.label = item.loadLabel(pm).toString(); // 获取应用的名称 app.package_name = item.packageName; // 获取应用的包名 app.icon = item.loadIcon(pm); // 获取应用的图标 appList.add(app); } } catch (Exception e) { e.printStackTrace(); continue; } } return appList; } // 填充应用的完整信息。主要做两个事情:其一是补充应用的图标字段,其二是将列表按照流量排序 public static ArrayList<AppInfo> fillAppInfo(Context ctx, ArrayList<AppInfo> originArray) { ArrayList<AppInfo> fullArray = (ArrayList<AppInfo>) originArray.clone(); PackageManager pm = ctx.getPackageManager(); // 获取系统中已经安装的应用列表 List<ApplicationInfo> installList = pm.getInstalledApplications(PackageManager.PERMISSION_GRANTED); for (int i = 0; i < fullArray.size(); i++) { AppInfo app = fullArray.get(i); for (ApplicationInfo item : installList) { if (app.uid == item.uid) { // 填充应用的图标信息。因为数据库没保存图标的位图,所以取出数据库记录之后还要补上图标数据 app.icon = item.loadIcon(pm); break; } } fullArray.set(i, app); } // 各应用按照流量大小降序排列 Collections.sort(fullArray, new Comparator<AppInfo>() { @Override public int compare(AppInfo o1, AppInfo o2) { return (o1.traffic < o2.traffic) ? 1 : -1; } }); return fullArray; } }
[ "aqi00@163.com" ]
aqi00@163.com
337f10e756ae2f25a338a74ae38c58677bcea683
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_cc57dbd55b8e1c2c563f909bdbdba35d41331081/GWMSServerData/18_cc57dbd55b8e1c2c563f909bdbdba35d41331081_GWMSServerData_s.java
167d1a6aab339394d9c34828c844c4d6eadcaa30
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,771
java
package es.igosoftware.experimental.wms; import java.io.Serializable; public final class GWMSServerData implements Serializable { /** * */ private static final long serialVersionUID = 1L; private String _name; private String _URL; private String _user; private String _password; public GWMSServerData() { } public GWMSServerData(final String name, final String uRL) { super(); _name = name; _URL = uRL; _user = ""; _password = ""; } public GWMSServerData(final String name, final String uRL, final String user, final String password) { super(); if ((user == null) || (user == "")) { _name = name; _URL = uRL; _user = ""; _password = ""; } else { _name = name; _URL = uRL; _user = user; _password = password; } } /** * @return the name */ public String getName() { return _name; } /** * @param name * the name to set */ public void setName(final String name) { _name = name; } /** * @return the uRL */ public String getURL() { return _URL; } /** * @param uRL * the uRL to set */ public void setURL(final String uRL) { _URL = uRL; } /** * @return the user */ public String getUser() { return _user; } /** * @param user * the user to set */ public void setUser(final String user) { _user = user; } /** * @return the password */ public String getPassword() { return _password; } /** * @param password * the password to set */ public void setPassword(final String password) { _password = password; } // @Override // public boolean equals(final Object obj) { // // if (getClass() != obj.getClass()) { // return false; // } // // final GWMSServerData server = (GWMSServerData) obj; // System.out.println("POS ESTOY EJECUTANDO AQUI !!!!!!!!!!!!"); // //System.exit(1); // if ((_name.compareTo(server._name) == 0) && (_user.compareTo(server._user) == 0) && (_URL.compareTo(server._URL) == 0) // && (_password.compareTo(server._password) == 0)) { // return true; // } // // return false; // } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f593c7dae17c10a8a929470e36cd40332938f48a
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
/src/main/java/com/google/firebase/firestore/model/mutation/DeleteMutation.java
0baa8b63205f59cecec4b5ed28792fa3bd9588b7
[]
no_license
redpicasso/fluffy-octo-robot
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
b2b62d7344da65af7e35068f40d6aae0cd0835a6
refs/heads/master
2022-11-15T14:43:37.515136
2020-07-01T22:19:16
2020-07-01T22:19:16
276,492,708
0
0
null
null
null
null
UTF-8
Java
false
false
2,211
java
package com.google.firebase.firestore.model.mutation; import com.google.firebase.Timestamp; import com.google.firebase.firestore.model.DocumentKey; import com.google.firebase.firestore.model.MaybeDocument; import com.google.firebase.firestore.model.NoDocument; import com.google.firebase.firestore.model.SnapshotVersion; import com.google.firebase.firestore.util.Assert; import javax.annotation.Nullable; /* compiled from: com.google.firebase:firebase-firestore@@19.0.0 */ public final class DeleteMutation extends Mutation { @Nullable public FieldMask getFieldMask() { return null; } public boolean isIdempotent() { return true; } public DeleteMutation(DocumentKey documentKey, Precondition precondition) { super(documentKey, precondition); } public boolean equals(Object obj) { if (this == obj) { return true; } return (obj == null || getClass() != obj.getClass()) ? false : hasSameKeyAndPrecondition((DeleteMutation) obj); } public int hashCode() { return keyAndPreconditionHashCode(); } public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("DeleteMutation{"); stringBuilder.append(keyAndPreconditionToString()); stringBuilder.append("}"); return stringBuilder.toString(); } public MaybeDocument applyToRemoteDocument(@Nullable MaybeDocument maybeDocument, MutationResult mutationResult) { verifyKeyMatches(maybeDocument); Assert.hardAssert(mutationResult.getTransformResults() == null, "Transform results received by DeleteMutation.", new Object[0]); return new NoDocument(getKey(), mutationResult.getVersion(), true); } @Nullable public MaybeDocument applyToLocalView(@Nullable MaybeDocument maybeDocument, @Nullable MaybeDocument maybeDocument2, Timestamp timestamp) { verifyKeyMatches(maybeDocument); if (getPrecondition().isValidFor(maybeDocument)) { return new NoDocument(getKey(), SnapshotVersion.NONE, false); } return maybeDocument; } }
[ "aaron@goodreturn.org" ]
aaron@goodreturn.org
8616bcfe2d1b6d4262666889d256cc1c615aa7af
021775be92277f5a128409606efb320f9e5c56d2
/src/main/java/com/bucheng/structure/net/netty/client/NettyClient.java
30695f28c5917b90262e7b7fde8d97f758a139ca
[]
no_license
yinbucheng/datastructure
ae7792d304174e4cf9ba5ad142254a59258e360c
9d7f090a9c27edf4797693a5528876113fe71c8b
refs/heads/master
2020-04-10T21:24:15.574185
2018-12-13T02:32:42
2018-12-13T02:32:42
161,295,796
0
0
null
null
null
null
UTF-8
Java
false
false
2,446
java
package com.bucheng.structure.net.netty.client; import com.bucheng.structure.net.netty.server.MessageHandler; import io.netty.bootstrap.Bootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.codec.LineBasedFrameDecoder; import io.netty.handler.codec.string.LineEncoder; import io.netty.handler.codec.string.StringDecoder; import io.netty.handler.codec.string.StringEncoder; import io.netty.handler.timeout.IdleStateHandler; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; import java.util.concurrent.TimeUnit; /** * @ClassName NettyClient * @Author buchengyin * @Date 2018/12/11 15:53 **/ public class NettyClient { public static void main(String[] args) { NioEventLoopGroup workGroup = new NioEventLoopGroup(); try { Bootstrap bootstrap = new Bootstrap(); bootstrap.channel(NioSocketChannel.class); bootstrap.group(workGroup); bootstrap.option(ChannelOption.SO_KEEPALIVE, true); bootstrap.handler(new ChannelInitializer<NioSocketChannel>() { protected void initChannel(NioSocketChannel ch) throws Exception { ch.pipeline().addLast("timeout",new IdleStateHandler(0,5,0, TimeUnit.SECONDS)); ch.pipeline().addLast("decode1", new LineBasedFrameDecoder(1024)); ch.pipeline().addLast("decode2", new StringDecoder()); ch.pipeline().addFirst("encode1", new LineEncoder()); ch.pipeline().addFirst("encode2", new StringEncoder()); ch.pipeline().addLast("myHandler", new ClientMessageHandler()); } }); ChannelFuture sync = bootstrap.connect("127.0.0.1", 9090).sync(); sync.addListener(new GenericFutureListener<Future<? super Void>>() { public void operationComplete(Future<? super Void> future) throws Exception { if(future.isSuccess()){ System.out.println("启动成功"); } } }); sync.channel().closeFuture().sync(); }catch (Exception e){ throw new RuntimeException(e); } } }
[ "yin.chong@intellif.com" ]
yin.chong@intellif.com
cd19384ff6a95e4475edd55d6ebb6a53bed3bec9
6374eaf729bb32a8dea25b73f0599ede8ace1b14
/app/src/main/java/com/journals/riped_online/ui/fragments/ArchiveFragment.java
e8c2518676f3e9f5249f71b339c9cf2e302cef3e
[]
no_license
suresh429/riped_online
c61e971b78dcd9d85ae50a46b87f368208cd805a
f5fe6e88009eef669e89e0ab0baa36b6ccbce504
refs/heads/master
2023-01-06T12:47:10.912115
2020-11-06T06:50:11
2020-11-06T06:50:11
310,515,727
0
0
null
null
null
null
UTF-8
Java
false
false
4,224
java
package com.journals.riped_online.ui.fragments; import android.graphics.Color; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.lifecycle.ViewModelProvider; import com.google.android.material.snackbar.Snackbar; import com.journals.riped_online.databinding.FragmentArchiveBinding; import com.journals.riped_online.helper.utils; import com.journals.riped_online.model.ArchiveResponse; import com.journals.riped_online.ui.adapter.ArchiveHeadAdapter; import com.journals.riped_online.ui.viewmodel.ArchiveViewModel; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** * A simple {@link Fragment} subclass. * Use the {@link ArchiveFragment#} factory method to * create an instance of this fragment. */ public class ArchiveFragment extends Fragment { private static final String TAG = "ArchiveFragment"; FragmentArchiveBinding fragmentArchiveBinding; ArrayList<ArchiveResponse.ArchiveYearsBean> archiveDetailsBeanArrayList = new ArrayList<>(); ArchiveViewModel archiveViewModel; ArchiveHeadAdapter archiveHeadAdapter; String ActionBarTitle,journalcode; public ArchiveFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(@NotNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment fragmentArchiveBinding = FragmentArchiveBinding.inflate(getLayoutInflater(), container, false); Bundle bundle = this.getArguments(); if (bundle != null) { ActionBarTitle = getArguments().getString("ActionBarTitle"); journalcode = getArguments().getString("journalcode"); } Objects.requireNonNull(((AppCompatActivity) requireActivity()).getSupportActionBar()).setTitle(ActionBarTitle); archiveViewModel = new ViewModelProvider(this).get(ArchiveViewModel.class); archiveViewModel.init(journalcode,requireActivity()); // progress bar archiveViewModel.getProgressbarObservable().observe(getViewLifecycleOwner(), aBoolean -> { if (aBoolean){ fragmentArchiveBinding.progressBar.setVisibility(View.VISIBLE); }else { fragmentArchiveBinding.progressBar.setVisibility(View.GONE); } }); // Alert toast msg archiveViewModel.getToastObserver().observe(getViewLifecycleOwner(), message -> { Snackbar snackbar = Snackbar.make(fragmentArchiveBinding.getRoot().getRootView(), message, Snackbar.LENGTH_LONG); View snackBarView = snackbar.getView(); snackBarView.setBackgroundColor(Color.BLACK); snackbar.show(); utils.noNetworkAlert(getActivity(),message); }); // get home data archiveViewModel.getArchiveRepository().observe(getViewLifecycleOwner(), homeResponse -> { if (homeResponse != null){ archiveDetailsBeanArrayList.clear(); List<ArchiveResponse.ArchiveYearsBean> catDetailsBeanList = homeResponse.getArchive_years(); archiveDetailsBeanArrayList.addAll(catDetailsBeanList); archiveHeadAdapter = new ArchiveHeadAdapter(archiveDetailsBeanArrayList); fragmentArchiveBinding.recyclerArchiveHeadList.setAdapter(archiveHeadAdapter); archiveHeadAdapter.notifyDataSetChanged(); fragmentArchiveBinding.progressBar.setVisibility(View.GONE); fragmentArchiveBinding.txtEmptyView.setVisibility(View.GONE); }else { fragmentArchiveBinding.recyclerArchiveHeadList.setVisibility(View.GONE); fragmentArchiveBinding.txtEmptyView.setVisibility(View.VISIBLE); } }); return fragmentArchiveBinding.getRoot(); } }
[ "ksuresh.unique@gmail.com" ]
ksuresh.unique@gmail.com
8472cd4b56b2c50c36da0e19194ce9dbaf94266f
5b0e74f54bcc449e0f1c04de113b8cd7e9d73d1e
/src/main/java/com/example/demo/CorsFilter.java
1ede90a5aee6085ae8d309d01553ae8ba9b4778d
[]
no_license
hanchangjian/tk
fc2517badde91f65b7c1b44a51c0c337635b7593
022d4bb823fc78ad136bd839385133cbf70298a8
refs/heads/master
2023-05-09T15:34:24.837811
2021-05-24T01:51:55
2021-05-24T01:51:55
370,198,483
0
0
null
null
null
null
UTF-8
Java
false
false
1,790
java
package com.example.demo; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; /** * 允许跨域过滤器(Cross-Origin Resource Sharing) * * @author user */ @Component public class CorsFilter implements Filter { private final Logger logger = Logger.getLogger(this.getClass().getPackage().getName()); public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletResponse response = (HttpServletResponse) res; response.setHeader("Access-Control-Allow-Origin", "*"); response.setHeader("Access-Control-Allow-Credentials", "true"); response.setHeader("Access-Control-Allow-Methods", "*"); response.setHeader("Access-Control-Max-Age", "3600"); // response.setHeader("Access-Control-Allow-Headers", "*"); response.setHeader("Access-Control-Allow-Headers", "Authorization,Origin,X-Requested-With,Content-Type,Accept," + "content-Type,origin,x-requested-with,content-type,accept,authorization,token,id,X-Custom-Header,X-Cookie,Connection,User-Agent,Cookie,*"); response.setHeader("Access-Control-Request-Headers", "Authorization,Origin, X-Requested-With,content-Type,Accept"); response.setHeader("Access-Control-Expose-Headers", "*"); chain.doFilter(req, response); } public void init(FilterConfig filterConfig) { } public void destroy() { } }
[ "email@example.com" ]
email@example.com
d0890a96c13a3f91657b0569aaf18f9449ca1159
595c840602e2dfbd67e854a1ab61954ef9af5835
/openstock-impl/src/main/java/daydayup/openstock/RtException.java
be2b3565f584ff42fd15eab8dffd73b5585700bf
[]
no_license
stockbrother/openstock
79035734fb641bb80b98f3574ebe1170e7acb197
7f15a573db4e3c5cfd4f9114ff9f3372dd48aab3
refs/heads/master
2021-08-23T19:14:08.567566
2017-12-06T05:27:09
2017-12-06T05:27:09
113,272,521
0
0
null
null
null
null
UTF-8
Java
false
false
826
java
package daydayup.openstock; public class RtException extends RuntimeException { public RtException() { super(); } public RtException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } public RtException(String message, Throwable cause) { super(message, cause); } public RtException(String message) { super(message); } public RtException(Throwable cause) { super(cause); } public static RuntimeException toRtException(Exception t) { if (t instanceof RuntimeException) { return (RuntimeException) t; } else { return new RtException(t); } } public static RtException toRtException(String string) { // return new RtException(string); } }
[ "wkz808@163.com" ]
wkz808@163.com
581fdad8a36e41372977b3a17f4d100e15540816
b9451c54b2ff7ddb797afc029672c57181a79bf9
/documentation/src/main/asciidoc/topics/code_examples/ConfigLoadCustomCache.java
1996d757740785c07c9564dd6293c57d74b45d94
[ "Apache-2.0", "LicenseRef-scancode-dco-1.1" ]
permissive
infinispan/infinispan
4c16a7f7381894e1c38c80e39cc9346b566407ad
1babc3340f2cf9bd42c84102a42c901d20feaa84
refs/heads/main
2023-08-31T19:46:06.326430
2023-06-20T08:14:50
2023-08-31T17:54:31
1,050,944
920
527
Apache-2.0
2023-09-14T21:00:45
2010-11-04T12:33:19
Java
UTF-8
Java
false
false
163
java
public static void main(String args[]) throws Exception { Cache<Object, Object> c = new DefaultCacheManager("infinispan.xml").getCache("xml-configured-cache"); }
[ "ttarrant@redhat.com" ]
ttarrant@redhat.com
47cf5cdd649657f6c562ba0b3f8a2aa6d6ce9ef3
d8ad832b122e21fb15d8cb48900b58340f9f77f6
/agency/zfPayBackOver/src/main/java/com/ruoyi/project/deveagent/usertrapos/service/AgentUserTraposUnbindService.java
42a89a6ec9773573ed6a37de6797c1f06dead5a0
[ "MIT" ]
permissive
s284309258/zfpay
1aa3e954f693004b54e151ce292a89122a77ff10
b05510a6fadc33d4f97658865c0d59082690c887
refs/heads/master
2022-12-20T05:22:04.281543
2020-07-31T02:03:27
2020-07-31T02:03:27
253,762,177
0
0
null
2022-12-12T21:42:12
2020-04-07T10:34:58
Java
UTF-8
Java
false
false
566
java
package com.ruoyi.project.deveagent.usertrapos.service; import com.ruoyi.project.develop.common.domain.R; import java.util.List; import java.util.Map; /** * 代理======用户MPOS解绑记录管理 * @author Administrator * */ public interface AgentUserTraposUnbindService { /** * 查询用户MPOS解绑记录列表 * @param params * @return */ List<Map<String, Object>> getAgentUserTraposUnbindList(Map<String, Object> params); /*** * 批量解绑操作 * @param params * @return */ R removePosBind(Map<String, Object> params); }
[ "s284309258@163.com" ]
s284309258@163.com
c3e32c73512c328eba3b1c990df2dc42aa46ae60
1c5a94920862febc1ac1c658ff61f796485b7068
/app/src/main/java/com/rakbny/Utils/LatLngInterpolator.java
33ad36404ae40a83914689165c6c31d13d6a1a88
[]
no_license
Sotra970/rakbny
8d52aa423f47e8a7068ccdfab3edf8f9b35a10ec
1af15a393235f457aa1bf80597b1ef0bb2e7575a
refs/heads/master
2021-01-21T21:19:32.204469
2017-06-19T20:33:02
2017-06-19T20:33:02
94,818,415
0
0
null
null
null
null
UTF-8
Java
false
false
2,464
java
package com.rakbny.Utils; import com.google.android.gms.maps.model.LatLng; import static java.lang.Math.asin; import static java.lang.Math.atan2; import static java.lang.Math.cos; import static java.lang.Math.pow; import static java.lang.Math.sin; import static java.lang.Math.sqrt; import static java.lang.Math.toDegrees; import static java.lang.Math.toRadians; /** * Created by Sotraa on 6/21/2016. */ /* Copyright 2013 Google Inc. Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */ public interface LatLngInterpolator { public LatLng interpolate(float fraction, LatLng a, LatLng b); public class Spherical implements LatLngInterpolator { /* From github.com/googlemaps/android-maps-utils */ @Override public LatLng interpolate(float fraction, LatLng from, LatLng to) { // http://en.wikipedia.org/wiki/Slerp double fromLat = toRadians(from.latitude); double fromLng = toRadians(from.longitude); double toLat = toRadians(to.latitude); double toLng = toRadians(to.longitude); double cosFromLat = cos(fromLat); double cosToLat = cos(toLat); // Computes Spherical interpolation coefficients. double angle = computeAngleBetween(fromLat, fromLng, toLat, toLng); double sinAngle = sin(angle); if (sinAngle < 1E-6) { return from; } double a = sin((1 - fraction) * angle) / sinAngle; double b = sin(fraction * angle) / sinAngle; // Converts from polar to vector and interpolate. double x = a * cosFromLat * cos(fromLng) + b * cosToLat * cos(toLng); double y = a * cosFromLat * sin(fromLng) + b * cosToLat * sin(toLng); double z = a * sin(fromLat) + b * sin(toLat); // Converts interpolated vector back to polar. double lat = atan2(z, sqrt(x * x + y * y)); double lng = atan2(y, x); return new LatLng(toDegrees(lat), toDegrees(lng)); } private double computeAngleBetween(double fromLat, double fromLng, double toLat, double toLng) { // Haversine's formula double dLat = fromLat - toLat; double dLng = fromLng - toLng; return 2 * asin(sqrt(pow(sin(dLat / 2), 2) + cos(fromLat) * cos(toLat) * pow(sin(dLng / 2), 2))); } } }
[ "abdelstar.ahmed97@gmail.com" ]
abdelstar.ahmed97@gmail.com
b570006c9cd7e24b4dad37e522aab337bacc6c8e
a3157de18983cbd453fc27e3aee89a75a09480de
/iNaturalist/src/main/java/org/inaturalist/android/UTFGrid.java
886388fe024d6a0f626710fa950a5c9eac3d2b89
[ "CC-BY-NC-4.0", "MIT" ]
permissive
inaturalist/iNaturalistAndroid
ba93086144e67f71b33d22a9a6c5386b4de53412
914913bb569fd81f4a87c6f6376177ebcb374dda
refs/heads/main
2023-09-01T13:21:32.404770
2023-08-24T04:31:10
2023-08-24T04:31:10
3,569,082
148
55
MIT
2023-09-01T22:58:43
2012-02-28T07:42:07
Java
UTF-8
Java
false
false
3,394
java
package org.inaturalist.android; import android.util.Log; import com.google.android.gms.maps.model.LatLng; import com.google.maps.android.geometry.Point; import org.json.JSONArray; import org.json.JSONObject; /** Represents a UTFGrid initialized from a JSON object - see https://github.com/mapbox/mbtiles-spec/blob/master/1.1/utfgrid.md */ public class UTFGrid { private static final int EXPANSION_PIXELS = 8; private JSONArray mGrid; private JSONArray mKeys; private JSONObject mData; private static final int TILE_SIZE = 256; private static final String EMPTY_KEY = ""; public UTFGrid(JSONObject json) { mGrid = json.optJSONArray("grid"); mKeys = json.optJSONArray("keys"); mData = json.optJSONObject("data"); } private int decodeId(int id) { if (id >= 93) id--; if (id >= 35) id--; id -= 32; return id; } public String getKeyForPixel(int x, int y) { int id = 0; if ((x >= 0) && (y >= 0) && (x < TILE_SIZE) && (y < TILE_SIZE)) { int factor = TILE_SIZE / mGrid.length(); int row = y / factor; int col = x / factor; id = Character.codePointAt(mGrid.optString(row), col); id = decodeId(id); if ((id < 0) || (id >= mKeys.length())) id = 0; } String key = mKeys.optString(id); return key; } public String getKeyForPixelExpansive(int x, int y) { String key = getKeyForPixel(x, y); if (!key.equals(EMPTY_KEY)) return key; // Search nearby pixels int factor = TILE_SIZE / mGrid.length(); int expansionFactor = EXPANSION_PIXELS * factor; // Search up to EXPANSION_PIXELS pixels away from all directions // Slowly expand the search grid around the current pixel for (int expansion = factor; expansion <= expansionFactor; expansion += factor) { key = getKeyForPixel(x - expansion, y - expansion); if (!key.equals(EMPTY_KEY)) return key; key = getKeyForPixel(x, y - expansion); if (!key.equals(EMPTY_KEY)) return key; key = getKeyForPixel(x + expansion, y - expansion); if (!key.equals(EMPTY_KEY)) return key; key = getKeyForPixel(x + expansion, y); if (!key.equals(EMPTY_KEY)) return key; key = getKeyForPixel(x + expansion, y + expansion); if (!key.equals(EMPTY_KEY)) return key; key = getKeyForPixel(x, y + expansion); if (!key.equals(EMPTY_KEY)) return key; key = getKeyForPixel(x - expansion, y + expansion); if (!key.equals(EMPTY_KEY)) return key; key = getKeyForPixel(x - expansion, y); if (!key.equals(EMPTY_KEY)) return key; } return EMPTY_KEY; } /** Returns the data object corresponding to the given tile position * @return data object corresponding to the tile position (null if no data for that position) */ public JSONObject getDataForPixel(int x, int y) { String key = getKeyForPixelExpansive(x, y); // This tile position has no key attached to it - no data if (key.equals(EMPTY_KEY)) return null; // Non existent key if (!mData.has(key)) return null; return mData.optJSONObject(key); } }
[ "budowski@gmail.com" ]
budowski@gmail.com
9663f36dac6a90d1fe89b7e36cbaefc883b9ea74
aaba5757aac5d1122e295d837cd3846748907c06
/usg-server/src/main/java/com/accure/budget/dto/FundCategory.java
4c817b56efb03320b9dc4c5f32a0d6b7d7b284a5
[]
no_license
usgInfo/UsgServerProject
3845ef95595d9cd24285ac25c9164fc435494ad5
a81df8ec3ef2b298acd0627e414825ddc71fc43b
refs/heads/master
2021-05-15T00:35:02.159785
2018-03-21T13:17:26
2018-03-21T13:17:26
103,244,787
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.accure.budget.dto; import com.accure.usg.common.dto.Common; /** * * @author user */ public class FundCategory extends Common{ private String fundCategory; private String remarks; public String getFundCategory() { return fundCategory; } public void setFundCategory(String fundCategory) { this.fundCategory = fundCategory; } public String getRemarks() { return remarks; } public void setRemarks(String remarks) { this.remarks = remarks; } }
[ "31878742+usgInfo@users.noreply.github.com" ]
31878742+usgInfo@users.noreply.github.com
4eaf1ec49b00e03c249ff3d38de4191d8600b2db
de7b67d4f8aa124f09fc133be5295a0c18d80171
/workspace_java-src/java-src-test/src/sun/io/ByteToCharCp862.java
3820e74266374bb63525505b7b40f858047992bd
[]
no_license
lin-lee/eclipse_workspace_test
adce936e4ae8df97f7f28965a6728540d63224c7
37507f78bc942afb11490c49942cdfc6ef3dfef8
refs/heads/master
2021-05-09T10:02:55.854906
2018-01-31T07:19:02
2018-01-31T07:19:02
119,460,523
0
1
null
null
null
null
UTF-8
Java
false
false
629
java
/* * %W% %E% * * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package sun.io; import sun.nio.cs.IBM862; /** * A table to convert to Cp862 to Unicode * * @author ConverterGenerator tool * @version >= JDK1.1.6 */ public class ByteToCharCp862 extends ByteToCharSingleByte { private final static IBM862 nioCoder = new IBM862(); public String getCharacterEncoding() { return "Cp862"; } public ByteToCharCp862() { super.byteToCharTable = nioCoder.getDecoderSingleByteMappings(); } }
[ "lilin@lvmama.com" ]
lilin@lvmama.com
3979fce1e4586a0448c4d7b4c6e3feacb8a6cdc5
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas_ReducedClassCount/applicationModule/src/test/java/applicationModulepackageJava5/Foo160Test.java
8b423d38de8ee4001170899775d5aef12c4363e8
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package applicationModulepackageJava5; import org.junit.Test; public class Foo160Test { @Test public void testFoo0() { new Foo160().foo0(); } @Test public void testFoo1() { new Foo160().foo1(); } @Test public void testFoo2() { new Foo160().foo2(); } @Test public void testFoo3() { new Foo160().foo3(); } @Test public void testFoo4() { new Foo160().foo4(); } @Test public void testFoo5() { new Foo160().foo5(); } @Test public void testFoo6() { new Foo160().foo6(); } @Test public void testFoo7() { new Foo160().foo7(); } @Test public void testFoo8() { new Foo160().foo8(); } @Test public void testFoo9() { new Foo160().foo9(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
c538cec93b1dc4c180b1e3ff2dbd78a5dab3c2fd
93583f3ede1ad2c37fd4b424b638674030eb4645
/event-manager/src/main/java/com/josedab/eventmanager/config/apidoc/SwaggerConfiguration.java
ae97addf6e143c3bce2059d257adce94cf3c5abf
[ "MIT" ]
permissive
josedab/yeoman-jhipster-examples
f5432c4b4abc60ff1c84b89fe1f5468d91bce95a
2bcb56b16d40f3a00cf1b633f7b2e52ae682e82e
refs/heads/master
2021-01-10T09:20:48.212746
2016-04-29T06:37:41
2016-04-29T06:37:41
49,115,964
0
0
null
2016-01-11T08:04:50
2016-01-06T05:58:54
Java
UTF-8
Java
false
false
2,799
java
package com.josedab.eventmanager.config.apidoc; import com.josedab.eventmanager.config.Constants; import com.josedab.eventmanager.config.JHipsterProperties; import java.util.Date; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.*; import org.springframework.data.domain.Pageable; import org.springframework.http.ResponseEntity; import org.springframework.util.StopWatch; import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; import static springfox.documentation.builders.PathSelectors.regex; /** * Springfox Swagger configuration. * * Warning! When having a lot of REST endpoints, Springfox can become a performance issue. In that * case, you can use a specific Spring profile for this class, so that only front-end developers * have access to the Swagger view. */ @Configuration @EnableSwagger2 @Profile("!" + Constants.SPRING_PROFILE_PRODUCTION) public class SwaggerConfiguration { private final Logger log = LoggerFactory.getLogger(SwaggerConfiguration.class); public static final String DEFAULT_INCLUDE_PATTERN = "/api/.*"; /** * Swagger Springfox configuration. */ @Bean @Profile("!" + Constants.SPRING_PROFILE_FAST) public Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) { log.debug("Starting Swagger"); StopWatch watch = new StopWatch(); watch.start(); ApiInfo apiInfo = new ApiInfo( jHipsterProperties.getSwagger().getTitle(), jHipsterProperties.getSwagger().getDescription(), jHipsterProperties.getSwagger().getVersion(), jHipsterProperties.getSwagger().getTermsOfServiceUrl(), jHipsterProperties.getSwagger().getContact(), jHipsterProperties.getSwagger().getLicense(), jHipsterProperties.getSwagger().getLicenseUrl()); Docket docket = new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo) .genericModelSubstitutes(ResponseEntity.class) .forCodeGeneration(true) .genericModelSubstitutes(ResponseEntity.class) .ignoredParameterTypes(Pageable.class) .directModelSubstitute(java.time.LocalDate.class, String.class) .directModelSubstitute(java.time.ZonedDateTime.class, Date.class) .directModelSubstitute(java.time.LocalDateTime.class, Date.class) .select() .paths(regex(DEFAULT_INCLUDE_PATTERN)) .build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis()); return docket; } }
[ "jose@brandwatch.com" ]
jose@brandwatch.com
1cb90df21bd10294f94428b59a364ae7bbb4d319
ebdcaff90c72bf9bb7871574b25602ec22e45c35
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201809/cm/DateErrorReason.java
8fd2ecc595ce5b97d481f66ed54b755f9d78f0d6
[ "Apache-2.0" ]
permissive
ColleenKeegan/googleads-java-lib
3c25ea93740b3abceb52bb0534aff66388d8abd1
3d38daadf66e5d9c3db220559f099fd5c5b19e70
refs/heads/master
2023-04-06T16:16:51.690975
2018-11-15T20:50:26
2018-11-15T20:50:26
158,986,306
1
0
Apache-2.0
2023-04-04T01:42:56
2018-11-25T00:56:39
Java
UTF-8
Java
false
false
3,296
java
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.adwords.jaxws.v201809.cm; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for DateError.Reason. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="DateError.Reason"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="INVALID_FIELD_VALUES_IN_DATE"/> * &lt;enumeration value="INVALID_FIELD_VALUES_IN_DATE_TIME"/> * &lt;enumeration value="INVALID_STRING_DATE"/> * &lt;enumeration value="INVALID_STRING_DATE_RANGE"/> * &lt;enumeration value="INVALID_STRING_DATE_TIME"/> * &lt;enumeration value="EARLIER_THAN_MINIMUM_DATE"/> * &lt;enumeration value="LATER_THAN_MAXIMUM_DATE"/> * &lt;enumeration value="DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE"/> * &lt;enumeration value="DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "DateError.Reason") @XmlEnum public enum DateErrorReason { /** * * Given field values do not correspond to a valid date. * * */ INVALID_FIELD_VALUES_IN_DATE, /** * * Given field values do not correspond to a valid date time. * * */ INVALID_FIELD_VALUES_IN_DATE_TIME, /** * * The string date's format should be yyyymmdd. * * */ INVALID_STRING_DATE, /** * * The string date range's format should be yyyymmdd yyyymmdd. * * */ INVALID_STRING_DATE_RANGE, /** * * The string date time's format should be yyyymmdd hhmmss [tz]. * * */ INVALID_STRING_DATE_TIME, /** * * Date is before allowed minimum. * * */ EARLIER_THAN_MINIMUM_DATE, /** * * Date is after allowed maximum. * * */ LATER_THAN_MAXIMUM_DATE, /** * * Date range bounds are not in order. * * */ DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE, /** * * Both dates in range are null. * * */ DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL; public String value() { return name(); } public static DateErrorReason fromValue(String v) { return valueOf(v); } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
bcb7d8ea0e8d851dd4aa28ac03c626888530f39c
350db570521d3fc43f07df645addb9d6e648c17e
/0859_Buddy_Strings/solution.java
c0a113f12985974d0e28515ae72d6e28a253723c
[]
no_license
benjaminhuanghuang/ben-leetcode
2efcc9185459a1dd881c6e2ded96c42c5715560a
a2cd0dc5e098080df87c4fb57d16877d21ca47a3
refs/heads/master
2022-12-10T02:30:06.744566
2022-11-27T04:06:52
2022-11-27T04:06:52
236,252,145
1
1
null
null
null
null
UTF-8
Java
false
false
1,131
java
package cn.huang.leetcode; import java.util.ArrayList; import java.util.HashMap; /* 859 Buddy Strings */ public class LC_0859_BuddyStrings { public boolean buddyStrings(String A, String B) { if (A.length() != B.length()) return false; int diff = 0; ArrayList<Integer> diffIndex = new ArrayList<>(); for (int i = 0; i < A.length(); i++) { char a = A.charAt(i); char b = B.charAt(i); if (a != b) { diff++; diffIndex.add(i); } } if (diff == 0) { // A ==B, any same chars in A HashMap<Character, Boolean> map = new HashMap<>(); for (char a : A.toCharArray()) { if (map.containsKey(a)) { return true; } else { map.put(a, true); } } } if (diff != 2) return false; return A.charAt(diffIndex.get(0)) == B.charAt(diffIndex.get(1)) && A.charAt(diffIndex.get(1)) == B.charAt(diffIndex.get(0)); } }
[ "bhuang@rms.com" ]
bhuang@rms.com
35fc241b02c4fa46b94892acd6569e9605d0c908
7802e86c18679418838d53846b714b86c6510c3a
/ocs/src/main/java/com/it/ocs/mongo/model/AmazonOrderItemModel.java
63310486b7a79e0ad1a9cddc026a9dc8184c9fa8
[]
no_license
397946820/project
5d15886dd25b3ee9b6d8c2c7cb3273fa39b0de3d
c2c42103484c7c73c7f45069acdd8211c161cacf
refs/heads/master
2022-01-27T03:38:25.781786
2019-07-22T07:31:17
2019-07-22T07:31:17
198,165,241
0
0
null
null
null
null
UTF-8
Java
false
false
3,362
java
package com.it.ocs.mongo.model; import java.util.Date; import com.it.ocs.mongo.annotation.MongoTableName; @MongoTableName(name = "AMAZON_ORDER_ITEM") public class AmazonOrderItemModel { private Long dataId; private Long parentId; private String amazonItemId; private String title; private String asin; private String sku; private double price; private int qty; private double shippingAmount; private double shippingDiscount; private double tax; private double giftPrice; private String promotionId; private double promotionDiscount; private double shippingTax; private String conditionId; private Date createdAt; private Date updatedAt; private int pushStatus; private Long sourceId; public Long getDataId() { return dataId; } public void setDataId(Long dataId) { this.dataId = dataId; } public Long getParentId() { return parentId; } public void setParentId(Long parentId) { this.parentId = parentId; } public String getAmazonItemId() { return amazonItemId; } public void setAmazonItemId(String amazonItemId) { this.amazonItemId = amazonItemId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAsin() { return asin; } public void setAsin(String asin) { this.asin = asin; } public String getSku() { return sku; } public void setSku(String sku) { this.sku = sku; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public int getQty() { return qty; } public void setQty(int qty) { this.qty = qty; } public double getShippingAmount() { return shippingAmount; } public void setShippingAmount(double shippingAmount) { this.shippingAmount = shippingAmount; } public double getShippingDiscount() { return shippingDiscount; } public void setShippingDiscount(double shippingDiscount) { this.shippingDiscount = shippingDiscount; } public double getTax() { return tax; } public void setTax(double tax) { this.tax = tax; } public double getGiftPrice() { return giftPrice; } public void setGiftPrice(double giftPrice) { this.giftPrice = giftPrice; } public String getPromotionId() { return promotionId; } public void setPromotionId(String promotionId) { this.promotionId = promotionId; } public double getPromotionDiscount() { return promotionDiscount; } public void setPromotionDiscount(double promotionDiscount) { this.promotionDiscount = promotionDiscount; } public double getShippingTax() { return shippingTax; } public void setShippingTax(double shippingTax) { this.shippingTax = shippingTax; } public String getConditionId() { return conditionId; } public void setConditionId(String conditionId) { this.conditionId = conditionId; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public Date getUpdatedAt() { return updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } public int getPushStatus() { return pushStatus; } public void setPushStatus(int pushStatus) { this.pushStatus = pushStatus; } public Long getSourceId() { return sourceId; } public void setSourceId(Long sourceId) { this.sourceId = sourceId; } }
[ "linxianxiong@cnest.net" ]
linxianxiong@cnest.net
c56ad54bda47dfc95a58c0cdb74e0b3b4fa6e0a6
f1feed19cbca7ebebfbc7d784f6ee0af6f6c9cdf
/src/main/java/me/gavincook/jstorm/bolt/FirstBolt.java
143cf74cfc07dc0b307a5fd1eb16d3b46683d1d2
[]
no_license
gavincook/jstorm-demo
eb9d9234720bcb7a59736227de558bd5fcf448b3
3a9c2a47c93f08e723cc81334029dd043805d2d0
refs/heads/master
2021-01-20T10:54:56.719609
2017-08-28T15:31:50
2017-08-28T15:31:50
101,657,788
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
package me.gavincook.jstorm.bolt; import java.util.Map; import backtype.storm.task.OutputCollector; import backtype.storm.task.TopologyContext; import backtype.storm.topology.OutputFieldsDeclarer; import backtype.storm.topology.base.BaseRichBolt; import backtype.storm.tuple.Tuple; /** * @author GavinCook * @date 2017-08-20 * @since 1.0.0 */ public class FirstBolt extends BaseRichBolt { private OutputCollector collector; public void prepare(Map map, TopologyContext topologyContext, OutputCollector outputCollector) { this.collector = outputCollector; } public void execute(Tuple tuple) { System.out.println("值==" + tuple.getValue(0)); collector.ack(tuple); } public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) { } }
[ "swbyzx@gmail.com" ]
swbyzx@gmail.com
9a8ad367a591e83ce8a41751b5e8c842ef08cc86
40f6fee9651790cfc909f51349c7bd96011f7c77
/day20/src/com/hb/pm/Ex01.java
17f705b8f7819b17dd717c4aa6085acb29bd1e18
[]
no_license
nowdoitgo/2016java
849eb38f66f6679459bcf43fa07a43ae73f2e3fc
3f5669696921931bb714cd7c504de249c27d5ad0
refs/heads/master
2021-06-10T04:46:00.293578
2017-01-02T05:48:36
2017-01-02T05:48:36
null
0
0
null
null
null
null
UHC
Java
false
false
1,267
java
package com.hb.pm; import java.util.Scanner; interface Pm{ void func01(); } class Pm01 implements Pm{ //extends Object{ // public Pm01() { // super(); // } public void func01(){ System.out.println("전원켜기"); } } class Pm11 implements Pm{ public void func01(){ System.out.println("전원끄기"); } } public class Ex01 { public static void main(String[] args) throws Exception { // Object Object obj = new Object(); Pm01 pm01 = new Pm01(); Pm11 pm11 = new Pm11(); System.out.println(pm01.toString()); System.out.println(pm01); System.out.println(pm01.hashCode()); System.out.println(pm11.getClass()); pm01.func01(); pm11.func01(); System.out.println("--------------------------"); // 리플렉션 Scanner sc = new Scanner(System.in); System.out.print("\n\n 1.전원켜기\t2.전원끄기\n>>"); String className ="com.hb.pm."; switch (sc.nextLine()) { case "1": className+="Pm01"; break; case "2": className+="Pm11"; break; default: break; } Class info=Class.forName(className); Object obj2 = info.newInstance(); Pm pm02 = (Pm)obj2; System.out.println(pm02.getClass()); pm02.func01(); } }
[ "hb.6class@gmail.com" ]
hb.6class@gmail.com
6c843ab5f17a206b3cd18429f979af484a272c57
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.updater-OSUpdater/sources/com/facebook/mobileconfig/FBMobileConfigEPInfo.java
03beab1b20c55c005e481f1475277d2df68e8984
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
767
java
package com.facebook.mobileconfig; import com.facebook.infer.annotation.Nullsafe; import com.google.flatbuffers.Table; import java.nio.ByteBuffer; @Nullsafe(Nullsafe.Mode.LOCAL) public final class FBMobileConfigEPInfo extends Table { public FBMobileConfigEPInfo __init(int i, ByteBuffer byteBuffer) { this.bb_pos = i; this.bb = byteBuffer; return this; } public int configIndex() { int __offset = __offset(4); if (__offset != 0) { return this.bb.getInt(__offset + this.bb_pos); } return 0; } public int version() { int __offset = __offset(6); if (__offset != 0) { return this.bb.getInt(__offset + this.bb_pos); } return 0; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
9e49857c39e13d3f54096156289229ef44ae022b
5019fe77a57e28ac988f2e3c61efa4ba6a00c959
/sdk/src/main/java/org/zstack/sdk/QueryLoadBalancerListenerAction.java
812f05667d49e511ff3fb005fdf8c368efdc8bdb
[ "Apache-2.0" ]
permissive
liuyong240/zstack
45b69b2faaf893ea4bbc0941effef773c780c8e2
c57c001f1ce377c64bf00ec765bcc7144e6ca273
refs/heads/master
2020-05-22T22:37:57.602737
2017-03-12T17:22:30
2017-03-12T17:22:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,177
java
package org.zstack.sdk; import java.util.HashMap; import java.util.Map; public class QueryLoadBalancerListenerAction extends QueryAction { private static final HashMap<String, Parameter> parameterMap = new HashMap<>(); public static class Result { public ErrorCode error; public QueryLoadBalancerListenerResult value; public Result throwExceptionIfError() { if (error != null) { throw new ApiException( String.format("error[code: %s, description: %s, details: %s]", error.code, error.description, error.details) ); } return this; } } public Result call() { ApiResult res = ZSClient.call(this); Result ret = new Result(); if (res.error != null) { ret.error = res.error; return ret; } QueryLoadBalancerListenerResult value = res.getResult(QueryLoadBalancerListenerResult.class); ret.value = value == null ? new QueryLoadBalancerListenerResult() : value; return ret; } public void call(final Completion<Result> completion) { ZSClient.call(this, new InternalCompletion() { @Override public void complete(ApiResult res) { Result ret = new Result(); if (res.error != null) { ret.error = res.error; completion.complete(ret); return; } QueryLoadBalancerListenerResult value = res.getResult(QueryLoadBalancerListenerResult.class); ret.value = value == null ? new QueryLoadBalancerListenerResult() : value; completion.complete(ret); } }); } Map<String, Parameter> getParameterMap() { return parameterMap; } RestInfo getRestInfo() { RestInfo info = new RestInfo(); info.httpMethod = "GET"; info.path = "/load-balancers/listeners"; info.needSession = true; info.needPoll = false; info.parameterName = ""; return info; } }
[ "xin.zhang@mevoco.com" ]
xin.zhang@mevoco.com
041c9dd0359e1e42e001a7889703addf494e9130
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a266/A266303Test.java
607ebc44188c3d83d779c658caf234dc2e0d71ac
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a266; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A266303Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
9930fa0927c2fb467e3ba18dbd8eaea024a2a8e8
0c39b468aab694abbc228a025c921418041926d7
/JLC CORE JAVA/src/com/classcore/jlc07/Lab689.java
0bafceaf1ca97b45a9b0b100308705e83f5d9cf1
[]
no_license
jitendrakr93/JLC_ALL_PROGRAMS
17cfc903c8e5befe2fe50ae89d874b53cf6e748f
eb9748a94e4a70e2504a3007624b83ca2fcd7078
refs/heads/master
2023-07-02T17:38:27.603260
2021-08-05T05:34:22
2021-08-05T05:34:22
392,905,494
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
package com.classcore.jlc07; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; public class Lab689 { public static void main(String[] args) { try (FileInputStream fis = new FileInputStream("D:\\D1\\abc.txt"); InputStreamReader isr = new InputStreamReader(fis); BufferedReader br = new BufferedReader(isr);) { while (true) { String id = br.readLine(); if (id == null) break; System.out.println(id); } } catch (Exception e) { e.printStackTrace(); } } }
[ "jk93.161@gmail.com" ]
jk93.161@gmail.com
ba2db6d1b4f56893b3abf55b1b8c64f8935b6358
a3e9de23131f569c1632c40e215c78e55a78289a
/alipay/alipay_sdk/src/main/java/com/alipay/api/domain/AlipayAccountExrateAdviceAcceptModel.java
490b9b3efd9fa268367f1da279f551aa231a3987
[]
no_license
P79N6A/java_practice
80886700ffd7c33c2e9f4b202af7bb29931bf03d
4c7abb4cde75262a60e7b6d270206ee42bb57888
refs/heads/master
2020-04-14T19:55:52.365544
2019-01-04T07:39:40
2019-01-04T07:39:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
582
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 标准的兑换交易受理接口 * * @author auto create * @since 1.0, 2016-05-13 15:15:53 */ public class AlipayAccountExrateAdviceAcceptModel extends AlipayObject { private static final long serialVersionUID = 6748477477692718722L; /** * 交易请求对象内容 */ @ApiField("advice") private AdviceVO advice; public AdviceVO getAdvice() { return this.advice; } public void setAdvice(AdviceVO advice) { this.advice = advice; } }
[ "jiaojianjun1991@gmail.com" ]
jiaojianjun1991@gmail.com
fd40d2dce1e30cc7288a2d2f3886d917f126a7a0
7d466b2a73721b5cb7dc9992a6527d4c96047781
/test/8007-dv-InvokeVirtual-ShortTryCatch/src/Main.java
8913e503e579150981a2a0f7b741863424b4d52a
[ "Apache-2.0", "NCSA" ]
permissive
projectceladon/vendor_intel_art-extension
ce09807c5e11e459cde151be1aa42a3d6958752e
4f505f9b7ff1b93add4d97de1d8096816b333b4b
refs/heads/master
2023-01-22T08:52:43.463644
2023-01-10T07:27:40
2023-01-10T07:27:40
137,192,912
3
20
NOASSERTION
2020-06-05T09:57:16
2018-06-13T09:23:37
C++
UTF-8
Java
false
false
396
java
import java.util.*; public class Main { public int div(int d) { return 1 / d; } public void runTestNewInstance() { try { div(0); } catch (Exception e) { ArrayList<Short> list = new ArrayList<Short>(); list.add((short)33); } } static public void main(String[] args) { Main n = new Main(); } }
[ "jaishankar.rajendran@intel.com" ]
jaishankar.rajendran@intel.com
9c47ebafae548f7e1e110fc63009b6f59f6c3ae0
a17dd1e9f5db1c06e960099c13a5b70474d90683
/core/src/main/java/jp/co/sint/webshop/service/data/csv/CCommodityHeaderImportCondition.java
442bb628790b7a6b82e2a90cd8e3dcf86851057d
[]
no_license
giagiigi/ec_ps
4e404afc0fc149c9614d0abf63ec2ed31d10bebb
6eb19f4d14b6f3a08bfc2c68c33392015f344cdd
refs/heads/master
2020-12-14T07:20:24.784195
2015-02-09T10:00:44
2015-02-09T10:00:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
277
java
package jp.co.sint.webshop.service.data.csv; import jp.co.sint.webshop.service.data.CsvConditionImpl; public class CCommodityHeaderImportCondition extends CsvConditionImpl<CCommodityHeaderCsvSchema> { /** * */ private static final long serialVersionUID = 1L; }
[ "fengperfect@126.com" ]
fengperfect@126.com
a0f96d20650e49ad5614b25745975fcfe62d06dc
891c3ee0fb2580697b3a90859ae923ff42a23922
/instrumentation/mongodb-3.7/src/test/java/com/nr/agent/instrumentation/mongodb/MongoDb370Test.java
29903a183b5beff20fb2425b133b929590812b14
[ "Apache-2.0" ]
permissive
bradleycamacho/newrelic-java-agent
7aa9dd45472a81d4d270ffa2843bc0176beb0e33
b535fd61df368154acf4ec9360f6802ac570b1f1
refs/heads/main
2022-12-28T23:40:27.684984
2020-10-15T22:34:51
2020-10-15T22:34:51
304,462,620
0
0
Apache-2.0
2020-10-15T22:33:43
2020-10-15T22:33:42
null
UTF-8
Java
false
false
6,133
java
/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * */ package com.nr.agent.instrumentation.mongodb; import com.mongodb.ConnectionString; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClients; import com.newrelic.agent.bridge.datastore.DatastoreVendor; import com.newrelic.agent.introspec.DatastoreHelper; import com.newrelic.agent.introspec.InstrumentationTestConfig; import com.newrelic.agent.introspec.InstrumentationTestRunner; import com.newrelic.agent.introspec.Introspector; import com.newrelic.agent.introspec.MetricsHelper; import com.newrelic.api.agent.Trace; import com.newrelic.test.marker.Java7IncompatibleTest; import de.flapdoodle.embed.mongo.MongodExecutable; import de.flapdoodle.embed.mongo.MongodProcess; import de.flapdoodle.embed.mongo.MongodStarter; import de.flapdoodle.embed.mongo.config.IMongodConfig; import de.flapdoodle.embed.mongo.config.MongodConfigBuilder; import de.flapdoodle.embed.mongo.config.Net; import de.flapdoodle.embed.mongo.distribution.Version; import de.flapdoodle.embed.process.runtime.Network; import org.bson.Document; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import java.util.Collection; import static org.junit.Assert.assertEquals; @Category({ Java7IncompatibleTest.class }) @RunWith(InstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "com.mongodb") public class MongoDb370Test { private static final String MONGODB_PRODUCT = DatastoreVendor.MongoDB.toString(); private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); private MongodExecutable mongodExecutable; private MongodProcess mongodProcess; private MongoClient mongoClient; private int port; @Before public void startMongo() throws Exception { port = InstrumentationTestRunner.getIntrospector().getRandomPort(); IMongodConfig mongodConfig = new MongodConfigBuilder().version(Version.V3_6_5).net(new Net(port, Network.localhostIsIPv6())).build(); mongodExecutable = mongodStarter.prepare(mongodConfig); mongodProcess = mongodExecutable.start(); mongoClient = MongoClients.create(new ConnectionString("mongodb://localhost:" + port)); } @After public void stopMongo() throws Exception { if (mongoClient != null) { mongoClient.close(); } if (mongodProcess != null) { mongodProcess.stop(); } if (mongodExecutable != null) { mongodExecutable.stop(); } } @Test public void testCRUD() throws Exception { demoCRUD(new PokemonMaster(mongoClient)); Introspector introspector = InstrumentationTestRunner.getIntrospector(); assertEquals(1, introspector.getFinishedTransactionCount(1000)); DatastoreHelper helper = new DatastoreHelper(MONGODB_PRODUCT); helper.assertAggregateMetrics(); Collection<String> transactionNames = InstrumentationTestRunner.getIntrospector().getTransactionNames(); assertEquals(1, transactionNames.size()); String txName = transactionNames.iterator().next(); helper.assertUnifiedMetricCounts(txName, "insert", "pokemon", 1); helper.assertUnifiedMetricCounts(txName, "find", "pokemon", 2); helper.assertUnifiedMetricCounts(txName, "update", "pokemon", 1); helper.assertUnifiedMetricCounts(txName, "delete", "pokemon", 1); assertEquals(5, MetricsHelper.getUnscopedMetricCount("Datastore/all")); assertEquals(5, (int)introspector.getTransactionEvents(txName).iterator().next().getDatabaseCallCount()); } @Trace(dispatcher = true) public static void demoCRUD(PokemonMaster master) throws InterruptedException { System.out.println("===Basic CRUD==="); Document newPokemon = new Document("name", "Togepi").append("number", 175).append("type", "fire"); master.demoInsert(newPokemon); System.out.print("(R) Find one fire type: " + master.demoFindOne("fire")); System.out.print(". Find: Original 150: "); master.demoFind(); for (Document pokemon : master.demoFind()) { System.out.print(pokemon.get("name") + " "); } System.out.println(); System.out.println("(U) Update results: " + master.demoUpdate(newPokemon, (new Document("$set", new Document("type", "fairy"))))); System.out.println("(D) Delete results: " + master.demoRemove(newPokemon)); } @Test public void testCollectionApi() throws Exception { runQuickTour(); Introspector introspector = InstrumentationTestRunner.getIntrospector(); assertEquals(1, introspector.getFinishedTransactionCount(1000)); DatastoreHelper helper = new DatastoreHelper(MONGODB_PRODUCT); helper.assertAggregateMetrics(); helper.assertUnscopedOperationMetricCount("dropDatabase", 1); Collection<String> transactionNames = InstrumentationTestRunner.getIntrospector().getTransactionNames(); assertEquals(1, transactionNames.size()); String txName = transactionNames.iterator().next(); helper.assertUnifiedMetricCounts(txName, "insert", "test", 4); helper.assertUnifiedMetricCounts(txName, "update", "test", 6); helper.assertUnifiedMetricCounts(txName, "delete", "test", 4); helper.assertUnifiedMetricCounts(txName, "find", "test", 13); helper.assertUnifiedMetricCounts(txName, "drop", "test", 3); helper.assertUnifiedMetricCounts(txName, "count", "test", 1); helper.assertUnifiedMetricCounts(txName, "getMore", "test", 12); assertEquals(44, MetricsHelper.getUnscopedMetricCount("Datastore/all")); assertEquals(44, (int)introspector.getTransactionEvents(txName).iterator().next().getDatabaseCallCount()); } @Trace(dispatcher = true) public void runQuickTour() throws Exception { QuickTour.run(mongoClient); } }
[ "49817386+jeffalder@users.noreply.github.com" ]
49817386+jeffalder@users.noreply.github.com
44d69b550938b73b6746a6950bd84f69b5145289
be0e8ce2c66c20ced2e3add077231ba7f5ddd039
/src/test/java/org/duckapter/annotation/InterfaceTest.java
536e8f91b0ab24a4bd91110c635b734dfef4b28c
[]
no_license
musketyr/duckapter
c80e2e0ba1c0bbc30531f884ed3557a4a2f0f741
0d0a431b391f2d3eade29d2d847beb298ecddbe4
refs/heads/master
2023-06-27T12:57:33.385466
2015-11-21T05:15:34
2015-11-21T05:15:34
2,249,522
5
2
null
2023-06-18T00:08:30
2011-08-22T15:42:52
Java
UTF-8
Java
false
false
536
java
package org.duckapter.annotation; import org.duckapter.Duck; import org.junit.Assert; import org.junit.Test; public class InterfaceTest { public static interface TheInterface { } public static interface OtherInterface { } public static class TheClass { } @Test public void testAdaptClass() { Assert.assertFalse(Duck.test(TheInterface.class, TheClass.class)); } @Test public void testAdaptInterface() { Assert.assertFalse(Duck.test(TheInterface.class, TheClass.class)); } }
[ "vladimir@orany.cz" ]
vladimir@orany.cz
59e226bc413840a9d3e6afcc147a529862fb8ca3
f2d2f8ceded9051c61bbdb9dcb89292a6d90530b
/kwok-app/src/main/com/kwoksys/action/contacts/CompanyContactAddAction.java
fecfdc89a947f7ededae442ba0701800b0744608
[]
no_license
roliannetropia/kwok
7becc6ee54f33fc84bf68a57d8ce340cf1809a66
8074b853b1b4c8d74dee71771b24fb56d5abbbb1
refs/heads/master
2016-09-06T15:36:58.750644
2015-03-15T23:51:28
2015-03-15T23:51:28
30,286,995
0
0
null
null
null
null
UTF-8
Java
false
false
3,210
java
/* * ==================================================================== * Copyright 2005-2011 Wai-Lun Kwok * * http://www.kwoksys.com/LICENSE * * 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.kwoksys.action.contacts; import com.kwoksys.action.common.template.ActionErrorsTemplate; import com.kwoksys.action.common.template.HeaderTemplate; import com.kwoksys.action.common.template.StandardTemplate; import com.kwoksys.biz.ServiceProvider; import com.kwoksys.biz.contacts.ContactService; import com.kwoksys.biz.contacts.dto.Company; import com.kwoksys.biz.contacts.dto.Contact; import com.kwoksys.biz.system.core.AppPaths; import com.kwoksys.biz.system.core.Links; import com.kwoksys.framework.properties.Localizer; import com.kwoksys.framework.struts2.Action2; /** * Action class for adding company contact. */ public class CompanyContactAddAction extends Action2 { public String execute() throws Exception { CompanyContactForm actionForm = (CompanyContactForm) getBaseForm(CompanyContactForm.class); ContactService contactService = ServiceProvider.getContactService(requestContext); Company company = contactService.getCompany(actionForm.getCompanyId()); // If the form has error, we would like to get the values entered by the user. Contact contact = new Contact(); actionForm.setCompanyId(company.getId()); // If not a resubmit, set some defaults if (!actionForm.isResubmit()) { actionForm.setContact(contact); } // // Template: StandardTemplate // StandardTemplate standardTemplate = new StandardTemplate(requestContext); request.setAttribute("companyName", company.getName()); standardTemplate.setPathAttribute("formAction", AppPaths.CONTACTS_COMPANY_CONTACT_ADD_2); standardTemplate.setAttribute("formCancelLink", Links.getCancelLink(requestContext, AppPaths.CONTACTS_COMPANY_DETAIL + "?companyId=" + company.getId())); // // Template: HeaderTemplate // HeaderTemplate header = standardTemplate.getHeaderTemplate(); header.setTitleKey("contactMgmt.cmd.companyContactAdd"); // // Template: ActionErrorsTemplate // ActionErrorsTemplate errorsTemplate = new ActionErrorsTemplate(); standardTemplate.addTemplate(errorsTemplate); errorsTemplate.setShowRequiredFieldMsg(true); errorsTemplate.setMessage(Localizer.getText(requestContext, "contactMgmt.companyContactEdit.sectionHeader")); return standardTemplate.findTemplate(STANDARD_TEMPLATE); } }
[ "tropia.rolianne@notes.bdo" ]
tropia.rolianne@notes.bdo
f8cc59129c7c16ec23edbd0296f641e7dbcde8ff
4a5b8d37d70aff90d9c3e4d6d53239c12726f88e
/butterknife-annotations/src/main/java/cn/ollyice/library/butterknife/BindView.java
d161993654266c05d96bfa347444f7266871cfb3
[]
no_license
paqxyz/AndGameDemo
29dfad61e371cf6db833107d903acffb8502e647
53271818ffff94564ec4e3337ebf4af13956d5de
refs/heads/master
2020-03-21T04:29:11.037764
2018-06-20T06:06:50
2018-06-20T06:06:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
package cn.ollyice.library.butterknife; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.RetentionPolicy.CLASS; /** * Bind a field to the view for the specified ID. The view will automatically be cast to the field * type. * <pre><code> * {@literal @}BindView(R.id.title) TextView title; * </code></pre> */ @Retention(CLASS) @Target(FIELD) public @interface BindView { /** View ID to which the field will be bound. */ String value() default ""; }
[ "289776839@qq.com" ]
289776839@qq.com
b3fd6ba9e6050b32429bf58d29b1a6be3b649b55
96ac5476757385500dd7e306062d38e8a0d12c9e
/src/main/java/mine/component/OptionalComponent.java
b98db526db856a4132551703a57f0c4e9c5d2722
[]
no_license
ipipip1735/dagger
b907d7b900ca2bbd036bfde6b9ecca496f28cb75
652620af97716dffe1ff692361705b4ab8bc8d8c
refs/heads/master
2023-04-25T03:43:32.990533
2021-05-11T13:11:59
2021-05-11T13:11:59
365,472,779
0
0
null
null
null
null
UTF-8
Java
false
false
378
java
package mine.component; import dagger.Component; import mine.OptionalTrial; import mine.ScopeTrial; import mine.module.CModule; import mine.module.OptionalModule; import mine.scope.TheScope; /** * Created by LFM on 2021/5/11. */ @Component(modules = {CModule.class, OptionalModule.class}) public interface OptionalComponent { void inject(OptionalTrial optionalTrial); }
[ "ipipip1735@163.com" ]
ipipip1735@163.com
1b32d419c7a02a0234a99202b230d2a2cccb2038
ff6bcd13f4d1c8715353ebb0460e851fdac0e30f
/app/src/main/java/com/mob/mobapi/sample/flight/FlightAPIActivity.java
e67fc02f03f0fe38a617105eda5e60d8d3e27015
[ "Apache-2.0" ]
permissive
xiao00kang/styT
1a00b8a5feffcb6abb5d43552b8e256fc0373824
aa35b6f2731b79bc883eba6c521358c77ed9925a
refs/heads/master
2021-05-14T12:23:28.009646
2018-01-05T08:44:22
2018-01-05T08:44:22
116,406,864
1
0
null
2018-01-05T16:51:40
2018-01-05T16:51:39
null
UTF-8
Java
false
false
6,001
java
/* * 官网地站:http://www.mob.com * 技术支持QQ: 4006852216 * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系, * 我们将会在24小时内给予回复) * * Copyright (c) 2013年 mob.com. All rights reserved. */ package com.mob.mobapi.sample.flight; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.AdapterView; import android.widget.EditText; import android.widget.ListView; import android.widget.SimpleAdapter; import android.widget.TextView; import android.widget.Toast; import com.mob.mobapi.API; import com.mob.mobapi.APICallback; import com.mob.mobapi.MobAPI; import com.mob.mobapi.apis.Flight; import nico.styTool.R; import com.mob.tools.utils.ResHelper; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class FlightAPIActivity extends dump.z.BaseActivity_ implements APICallback, AdapterView.OnItemClickListener, View.OnClickListener { private boolean isQuerying = false; private boolean currentIsQueryByNo = false; private EditText etStart; private EditText etEnd; private TextView etNo; private ListView lvResult; private SimpleAdapter adapter; private List<Map<String, Object>> listResult; private InputMethodManager inputMethodManager; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_flight); etStart = ResHelper.forceCast(findViewById(R.id.etStart)); etEnd = ResHelper.forceCast(findViewById(R.id.etEnd)); etNo = ResHelper.forceCast(findViewById(R.id.etNo)); lvResult = ResHelper.forceCast(findViewById(R.id.lvResult)); findViewById(R.id.btnThreeCode).setOnClickListener(this); findViewById(R.id.btnLine).setOnClickListener(this); findViewById(R.id.btnNo).setOnClickListener(this); lvResult.setOnItemClickListener(this); } public void onClick(View v) { if (v.getId() == R.id.btnThreeCode) { //查询所有城市机场三字码信息 startActivity(new Intent(this, FlightCityThreeCodesAPIActivity.class)); return; } if (isQuerying) { return; } isQuerying = true; hideIme(v); if (v.getId() == R.id.btnLine) { //根据航线查询 etNo.setText(""); ((Flight) MobAPI.getAPI(Flight.NAME)).queryByLine(etStart.getText().toString(), etEnd.getText().toString(), FlightAPIActivity.this); } else if (v.getId() == R.id.btnNo) { //根据航班号查询 etEnd.setText(""); etStart.setText(""); ((Flight) MobAPI.getAPI(Flight.NAME)).queryByNo(etNo.getText().toString(), FlightAPIActivity.this); } } public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) { if (isQuerying) { return; } isQuerying = true; HashMap<String, Object> item = ResHelper.forceCast(adapterView.getAdapter().getItem(position)); if (currentIsQueryByNo) { String start, end; if (Math.random() < 0.5) { //使用机场三字码 start = ResHelper.forceCast(item.get("fromAirportCode")); end = ResHelper.forceCast(item.get("toAirportCode")); } else { //使用城市名称 start = ResHelper.forceCast(item.get("fromCityName")); end = ResHelper.forceCast(item.get("toCityName")); } if (TextUtils.isEmpty(start) || TextUtils.isEmpty(end)) { isQuerying = false; return; } etNo.setText(""); etStart.setText(start); etEnd.setText(end); //根据航线查询 ((Flight) MobAPI.getAPI(Flight.NAME)).queryByLine(start, end, FlightAPIActivity.this); return; } //根据航班号查询 etStart.setText(""); etEnd.setText(""); String flightNo = ResHelper.forceCast(item.get("flightNo")); etNo.setText(flightNo); ((Flight) MobAPI.getAPI(Flight.NAME)).queryByNo(flightNo, FlightAPIActivity.this); } public void onSuccess(API api, int action, Map<String, Object> result) { ArrayList<Map<String, Object>> res = ResHelper.forceCast(result.get("result")); if (res != null && res.size() > 0) { switch (action) { case Flight.ACTION_QUERY_BY_NO: { currentIsQueryByNo = true; showResult(res); } break; case Flight.ACTION_QUERY_BY_LINE: { currentIsQueryByNo = false; showResult(res); } break; } } isQuerying = false; } public void onError(API api, int action, Throwable details) { details.printStackTrace(); Toast.makeText(this, R.string.error_raise, Toast.LENGTH_SHORT).show(); isQuerying = false; } private void showResult(ArrayList<Map<String, Object>> result) { if (listResult == null) { listResult = new ArrayList<Map<String, Object>>(); } listResult.clear(); if (result != null) { listResult.addAll(result); } if (adapter == null) { adapter = new SimpleAdapter(this, listResult, R.layout.view_flight_info_list_item, new String[]{"airLines", "flightNo", "flightRate", "flightTime", "from", "fromAirportCode", "fromCityCode", "fromCityName", "fromTerminal", "planTime", "planArriveTime", "to", "toAirportCode", "toCityCode", "toCityName", "toTerminal", "week"}, new int[]{R.id.tvAirLines, R.id.tvFlightNo, R.id.tvFlightRate, R.id.tvFlightTime, R.id.tvFrom, R.id.tvFromAirportCode, R.id.tvFromCityCode, R.id.tvFromCityName, R.id.tvFromTerminal, R.id.tvPlanTime, R.id.tvPlanArriveTime, R.id.tvTo, R.id.tvToAirportCode, R.id.tvToCityCode, R.id.tvToCityName, R.id.tvToTerminal, R.id.tvWeek}); lvResult.setAdapter(adapter); } adapter.notifyDataSetChanged(); } private void hideIme(View view) { if (inputMethodManager == null) { inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); } inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } }
[ "root@localhost" ]
root@localhost
cbf17bf6a3650a596a9e423fbbe3578f4b828a0b
a1af674e3db6959f14a57469c02932f891902758
/src/com/tumri/af/utils/Utils.java
64130c7684526879b86c1f928264a3abdaa04fa0
[]
no_license
anandp504/cbo
4262901d3c95f07878b4244689e64e8d373ce310
d25b74f548b1566dbc46205feacb92ecaa6a0e1f
refs/heads/master
2020-05-17T10:15:53.830212
2013-09-26T10:20:08
2013-09-26T10:20:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,314
java
package com.tumri.af.utils; import java.io.PrintWriter; import java.io.StringWriter; public class Utils { public static final String EMPTY_STRING = ""; public static final String FILE_FORMAT_XLS = ".xls"; public static final String FILE_FORMAT_ZIP = ".zip"; public static final String HYPHEN_SYMBOl = "-"; public static final String FORWARD_SLASH = "/"; public static final String SPACE = " "; /** * Is the given string non-empty? * @param str * @return True if the string is not empty. */ public static boolean isNonEmpty( String str ) { return !isEmpty(str); } /** Determines if the string is null or blank. * Trims spaces. * @param str The string. * @return True if the string is blank or false if not. */ public static boolean isEmpty(String str) { return (str == null) || str.trim().equals(EMPTY_STRING); } /** Returns the string unless it is null in which case a blank is returned. * @param s The string. * @return The string passed in or "" if the string is null. */ public static String nullToBlank(String s) { if(s == null) { return EMPTY_STRING; } return s; } /** Gets the portion of the string that starts with the last dot. * @param s The string. * @return The suffix of the string or a blank string if s is null or if the suffix is not found. */ public static String getSuffix(String s) { return getSuffix(s, "."); } /** Gets the portion of the string that starts with the last occurrence of the specified string. * @param s The string. * @param suffixStart The string that starts the suffix. * @return The suffix of the string or a blank string if s is null or if the suffix start is not found. */ public static String getSuffix(String s, String suffixStart) { String result = EMPTY_STRING; if((s != null) && (suffixStart != null)) { int lastIndex = s.lastIndexOf(suffixStart); if(lastIndex >= 0) { result = s.substring(lastIndex); } } return result; } /** * This method takes the exception thrown and returns the stack trace as a String * @param e The exception thrown * @return exception as String */ public static String getStackTrace(Throwable e) { StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); e.printStackTrace(writer); String expTrace = sw.toString(); return expTrace; } /** Removes the last instance of the separator string and everything after it. * Does nothing if the separator string is not in the string or if the string is null. * @param str The string from which to remove the end. * @param seperator The separator. * @return The string minus everything after the last occurrance of the separator string. */ public static String removeTrailingSeperator(String str, String seperator) { if(isEmpty(str)) return str; int idx = str.lastIndexOf(seperator); if(idx != -1) { String tmpStr = str.substring(0, idx); return tmpStr; } return str; } /** Determines if two objects are equal. * Considers null objects to be equal. * @param o1 The first object. * @param o2 The second object. * @return True if the objects are equal or false if not. */ public static boolean equals(Object o1, Object o2) { return (o1 == o2) || ((o1 != null) && (o1.equals(o2))); } /** Hashes the hash code of an object with the hash code passed in. * @param h The hash code passed in. * @param obj The object whose hash code is to be added. * @return The hash of the two hash codes or the original hash code if the object is null. */ public static int addToHash(int h, Object obj) { if(obj != null) { h = addHashCodes(h, obj.hashCode()); } return h; } /** "Adds" two hash codes in a non-symmetric manner to * produce a new hash code. * @param h1 The first hash code. * @param h2 The second hash code. * @return The new hash code */ public static int addHashCodes(int h1, int h2) { return ((h1 >> 13) | (h1 << 18)) ^ (h2 + 37); } }
[ "a@b" ]
a@b
cc4ddbd111e267cfe0be93050d554f7dba986597
baa2b30b7003eec034f4d1ada005b40c2e8b61a5
/wx-pubno/src/main/java/com.feagle/menu/ViewButton.java
9013666c2248bf55b9f62c77134db11cf66da25d
[]
no_license
adanac/ssm-project
d96270d560bc179ddf0a1ef536bcddc7facff837
b99788f6c4c6925776436a932abfa286edcc90eb
refs/heads/master
2021-05-12T01:13:35.662614
2018-01-15T15:25:08
2018-01-15T15:25:08
117,554,698
0
0
null
null
null
null
UTF-8
Java
false
false
217
java
package com.feagle.menu; public class ViewButton extends Button { private String url; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
[ "adanac@sina.com" ]
adanac@sina.com