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
6500d9eae510e6af8a85616e6ac83e023ac067c2
b31120cefe3991a960833a21ed54d4e10770bc53
/modules/org.llvm.ir/src/org/llvm/ir/impl/gen/NoRecurseAttr.java
5b3f219a146f522f78ce6a5a1fb799e4aa2d5aed
[]
no_license
JianpingZeng/clank
94581710bd89caffcdba6ecb502e4fdb0098caaa
bcdf3389cd57185995f9ee9c101a4dfd97145442
refs/heads/master
2020-11-30T05:36:06.401287
2017-10-26T14:15:27
2017-10-26T14:15:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,825
java
/** * This file was converted to Java from the original LLVM source file. The original * source file follows the LLVM Release License, outlined below. * * ============================================================================== * LLVM Release License * ============================================================================== * University of Illinois/NCSA * Open Source License * * Copyright (c) 2003-2017 University of Illinois at Urbana-Champaign. * All rights reserved. * * Developed by: * * LLVM Team * * University of Illinois at Urbana-Champaign * * http://llvm.org * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal with * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimers. * * * Redistributions in binary form must reproduce the above copyright notice * this list of conditions and the following disclaimers in the * documentation and/or other materials provided with the distribution. * * * Neither the names of the LLVM Team, University of Illinois at * Urbana-Champaign, nor the names of its contributors may be used to * endorse or promote products derived from this Software without specific * prior written permission. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE * SOFTWARE. * * ============================================================================== * Copyrights and Licenses for Third Party Software Distributed with LLVM: * ============================================================================== * The LLVM software contains code written by third parties. Such software will * have its own individual LICENSE.TXT file in the directory in which it appears. * This file will describe the copyrights, license, and restrictions which apply * to that code. * * The disclaimer of warranty in the University of Illinois Open Source License * applies to all code in the LLVM Distribution, and nothing in any of the * other licenses gives permission to use the names of the LLVM Team or the * University of Illinois to endorse or promote products derived from this * Software. * * The following pieces of software have additional or alternate copyrights, * licenses, and/or restrictions: * * Program Directory * ------- --------- * Autoconf llvm/autoconf * llvm/projects/ModuleMaker/autoconf * Google Test llvm/utils/unittest/googletest * OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} * pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} * ARM contributions llvm/lib/Target/ARM/LICENSE.TXT * md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h */ package org.llvm.ir.impl.gen; import org.clank.support.*; import org.llvm.ir.*; //<editor-fold defaultstate="collapsed" desc="NoRecurseAttr"> @Converted(kind = Converted.Kind.AUTO, source = "/export1/home/alsimon/LLVM39/build/lib/IR/AttributesCompatFunc.inc", line = 272, FQN="NoRecurseAttr", NM="_Z13NoRecurseAttr", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Attributes.cpp -nm=_Z13NoRecurseAttr") //</editor-fold> public class/*struct*/ NoRecurseAttr extends /**/ EnumAttr { //<editor-fold defaultstate="collapsed" desc="NoRecurseAttr::getKind"> @Converted(kind = Converted.Kind.AUTO, source = "/export1/home/alsimon/LLVM39/build/lib/IR/AttributesCompatFunc.inc", line = 273, FQN="NoRecurseAttr::getKind", NM="_ZN13NoRecurseAttr7getKindEv", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Attributes.cpp -nm=_ZN13NoRecurseAttr7getKindEv") //</editor-fold> public static Attribute.AttrKind getKind() { return Attribute.AttrKind.NoRecurse; } @Override public String toString() { return "" + super.toString(); // NOI18N } }
[ "voskresensky.vladimir@gmail.com" ]
voskresensky.vladimir@gmail.com
675b529598c30048ab60ea95554c9d5a3a8f9d10
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/com/googlecode/jmxtrans/util/WatchDirTest.java
0bc88cdd8e7b2d9628bf83a39a862be31c7df70e
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
4,040
java
/** * The MIT License * Copyright ? 2010 JmxTrans team * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.googlecode.jmxtrans.util; import com.googlecode.jmxtrans.test.IntegrationTest; import java.io.File; import java.io.IOException; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.rules.TemporaryFolder; import org.mockito.Mockito; @Category(IntegrationTest.class) public class WatchDirTest { /** * Wait time before assertions in milliseconds. * * Watch events can take some time to propagate. Synchronization is used to * signal when verify operations can occur. But in case of a failed test, * we will wait FILE_OPERATION_TIMEOUT before throwing an error. */ private static final int FILE_OPERATION_TIMEOUT = 5000; @Rule public TemporaryFolder watchedDir = new TemporaryFolder(); private WatchDir watchDir; private WatchedCallback callback; private Object synchro; @Test public void createdFileIsDetected() throws Exception { File toCreate = watchedDir.newFile("created"); waitForFileOperation(); Mockito.verify(callback).fileAdded(toCreate); } @Test public void deletedFileIsDetected() throws Exception { File toDelete = watchedDir.newFile("toDelete"); waitForFileOperation(); Mockito.verify(callback).fileAdded(toDelete); toDelete.delete(); waitForFileOperation(); Mockito.verify(callback).fileDeleted(toDelete); } @Test public void modifiedFileIsDetected() throws Exception { File toModify = watchedDir.newFile("toModify"); waitForFileOperation(); Mockito.verify(callback).fileAdded(toModify); modifyFile(toModify); waitForFileOperation(); Mockito.verify(callback, Mockito.atLeastOnce()).fileModified(toModify); } @Test(expected = IOException.class) public void watchingFileIsNotPossible() throws Exception { try { new WatchDir(watchedDir.newFile("toWatch"), callback); } catch (IOException ioe) { assertThat(ioe).hasMessageEndingWith("is not a directory"); throw ioe; } } private static class MockWatchedCallback implements WatchedCallback { private final Object synchro; public MockWatchedCallback(Object synchro) { this.synchro = synchro; } @Override public void fileModified(File file) throws Exception { synchronized(synchro) { synchro.notifyAll(); } } @Override public void fileDeleted(File file) throws Exception { synchronized(synchro) { synchro.notifyAll(); } } @Override public void fileAdded(File file) throws Exception { synchronized(synchro) { synchro.notifyAll(); } } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
3460b4d150e3568b63304d206ef724585a4e0f0d
0d1896fe9435ee99b682eef9eed4867037a00abc
/app/src/main/java/com/wlc/rain/ui/FiltersTipsActivity.java
8e77b9f30e07b0975eeff88123ce811a3a132287
[]
no_license
JamesCarton/BEC_Project
d988afe5729073a7c8119dde984b71b56e221f78
20f968437bcaa9a4232a92bad6390654966e7032
refs/heads/master
2020-03-18T19:21:39.826508
2018-05-28T11:08:00
2018-05-28T11:08:00
135,148,846
0
0
null
null
null
null
UTF-8
Java
false
false
1,673
java
package com.rainbowloveapp.app.ui; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.ImageView; import com.rainbowloveapp.app.R; import com.rainbowloveapp.app.utils.Utils; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; /** * on 10/5/17. */ public class FiltersTipsActivity extends AppCompatActivity { @BindView(R.id.img_fiterstips) ImageView imgFiterstips; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.filters_tips_activity); ButterKnife.bind(this); Utils.loadImageGlide(this, R.drawable.quicktips_filters, imgFiterstips); } @Override protected void attachBaseContext(Context newBase) { super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase)); } @OnClick({R.id.view_close_top_fiterstips, R.id.view_close_bottom_fiterstips, R.id.view_full_guide_fiterstips}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.view_close_top_fiterstips: onBackPressed(); break; case R.id.view_close_bottom_fiterstips: onBackPressed(); break; case R.id.view_full_guide_fiterstips: startActivity(new Intent(this, WebActivity.class).putExtra(Utils.WebActivity_Key, Utils.FilterTips)); break; } } }
[ "you@example.com" ]
you@example.com
6ed1f1a7268f96697a21d39eaabb9ffa9e4af51c
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
/src/net/datenwerke/security/service/eventlogger/jpa/PersistEntityEvent.java
571bbfb6a0dac94f2e18adcdb2c7e78da7859ae8
[]
no_license
bireports/ReportServer
da979eaf472b3e199e6fbd52b3031f0e819bff14
0f9b9dca75136c2bfc20aa611ebbc7dc24cfde62
refs/heads/master
2020-04-18T10:18:56.181123
2019-01-25T00:45:14
2019-01-25T00:45:14
167,463,795
0
0
null
null
null
null
UTF-8
Java
false
false
1,136
java
/* * ReportServer * Copyright (c) 2018 InfoFabrik GmbH * http://reportserver.net/ * * * This file is part of ReportServer. * * ReportServer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.datenwerke.security.service.eventlogger.jpa; public class PersistEntityEvent extends JpaEvent { public PersistEntityEvent(Object entity, Object... properties) { super(entity, properties); } @Override public String getLoggedAction() { return "PERSIST_ENTITY"; } }
[ "srbala@gmail.com" ]
srbala@gmail.com
56b4ca5cfd5cc16b84520cc07f02fedfd6140050
04fbd5fb9c22eb0ec5ac6b000ea0e4da3f5380f6
/JProgramming/src/lesson8/files/readandwritefiles/fileinterfaces/LegacyFilesReader.java
b734933c57c5a82f1140f084bba0e8b31b59c8a0
[]
no_license
PetroRulov/COURSE-JAVA-PROGRAMMER
56be01254d7112b1f915ddbaa681cafbbdbfd8e0
24260c12f052bfb543ef91dcf7e38b434113611d
refs/heads/master
2021-01-23T21:48:11.950605
2019-02-19T19:06:20
2019-02-19T19:06:20
56,302,822
0
0
null
null
null
null
UTF-8
Java
false
false
864
java
package lesson8.files.readandwritefiles.fileinterfaces; import java.io.FileInputStream; import java.io.IOException; /** * Created by prulov on 06.07.2016. */ public class LegacyFilesReader implements FileReader { @Override public String read(String fileName){ StringBuilder builder = new StringBuilder(); FileInputStream fis = null; try{ fis = new FileInputStream(fileName); int i; while((i = fis.read()) != -1){ builder.append((char) i); } }catch(IOException e){ e.printStackTrace(); }finally{ if(fis != null){ try{ fis.close(); }catch(IOException e){ // ignore } } } return builder.toString(); } }
[ "prulov.pr@gmail.com" ]
prulov.pr@gmail.com
3da908ae938aeb371fe5116ce461744d49c3a726
7543eb6be4db4124084b6eac0b26131bcdfea563
/sources/com/google/android/gms/internal/sa.java
b8782f05cb1010402ce8608045a7fe4cb068ec38
[]
no_license
n0misain/6-1_source_from_JADX
bea3bc861ba84c62c27231e7bcff6df49e2f21c9
e0e00915f0b376e7c1d0c162bf7d6697153ce7b1
refs/heads/master
2022-07-19T05:28:02.911308
2020-05-17T00:12:26
2020-05-17T00:12:26
264,563,027
0
0
null
null
null
null
UTF-8
Java
false
false
239
java
package com.google.android.gms.internal; final class sa implements Runnable { private /* synthetic */ qu zzcdI; sa(qu quVar) { this.zzcdI = quVar; } public final void run() { this.zzcdI.resume(); } }
[ "jaycrandell3@gmail.com" ]
jaycrandell3@gmail.com
2f2342268db6df1c7f13cac787d5d78527cb6451
4dcfabba005ae9f3475c915cab5eaa43c21f5d49
/app/src/main/java/com/qiantang/smartparty/modle/RxApplyDetial.java
8bf32ab74f042a9bc1b2201e9f759629200a2261
[]
no_license
WhiteorBlack/SmartParty
7e4f850daf6d7c138694c44a3236645627e046cd
5ae8a9475039b37c68ffc033061cf6c2fbbecfa4
refs/heads/master
2021-08-06T15:04:18.661718
2018-09-21T06:37:49
2018-09-21T06:37:49
134,049,887
0
1
null
null
null
null
UTF-8
Java
false
false
2,856
java
package com.qiantang.smartparty.modle; /** * Created by zhaoyong bai on 2018/6/22. */ public class RxApplyDetial { private String applyforId; private String orderBy; private String pageSize; private String orderByColumn; private String title; private int applyStatus; private String pageNum; private String userId; private String content; private String deptname; private String phone; private String fileurl; private String creationtime; private String status; private String username; public String getApplyforId() { return applyforId; } public void setApplyforId(String applyforId) { this.applyforId = applyforId; } public String getOrderBy() { return orderBy; } public void setOrderBy(String orderBy) { this.orderBy = orderBy; } public String getPageSize() { return pageSize; } public void setPageSize(String pageSize) { this.pageSize = pageSize; } public String getOrderByColumn() { return orderByColumn; } public void setOrderByColumn(String orderByColumn) { this.orderByColumn = orderByColumn; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public int getApplyStatus() { return applyStatus; } public void setApplyStatus(int applyStatus) { this.applyStatus = applyStatus; } public String getPageNum() { return pageNum; } public void setPageNum(String pageNum) { this.pageNum = pageNum; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getDeptname() { return deptname; } public void setDeptname(String deptname) { this.deptname = deptname; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getFileurl() { return fileurl; } public void setFileurl(String fileurl) { this.fileurl = fileurl; } public String getCreationtime() { return creationtime; } public void setCreationtime(String creationtime) { this.creationtime = creationtime; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
[ "415082375@qq.com" ]
415082375@qq.com
7ecf35dd2d6c99b5d15e749712e06ea0724ddf63
b48f7fee57c532dd6e02f58d1fb4f3232662d2b0
/winter-usecases/src/main/java/de/uni_mannheim/informatik/dws/winter/usecase/events/datafusion/fusers/EventDateFuserAll.java
d56bf2f0539fe819e92416acfc12250906760f26
[ "Apache-2.0" ]
permissive
olehmberg/winter
9fd0bccdec57b04bef1e3271748e1add4ee08456
9715392e6b9069a484eb3a99813538c7584277ee
refs/heads/master
2022-05-27T12:39:43.778646
2021-12-17T11:21:54
2021-12-17T11:21:54
88,765,628
113
38
Apache-2.0
2022-05-20T20:48:08
2017-04-19T16:16:31
Java
UTF-8
Java
false
false
1,883
java
package de.uni_mannheim.informatik.dws.winter.usecase.events.datafusion.fusers; import java.util.List; import org.joda.time.DateTime; import de.uni_mannheim.informatik.dws.winter.datafusion.AttributeValueFuser; import de.uni_mannheim.informatik.dws.winter.datafusion.conflictresolution.list.Union; import de.uni_mannheim.informatik.dws.winter.model.Correspondence; import de.uni_mannheim.informatik.dws.winter.model.FusedValue; import de.uni_mannheim.informatik.dws.winter.model.Matchable; import de.uni_mannheim.informatik.dws.winter.model.RecordGroup; import de.uni_mannheim.informatik.dws.winter.model.defaultmodel.Attribute; import de.uni_mannheim.informatik.dws.winter.processing.Processable; import de.uni_mannheim.informatik.dws.winter.usecase.events.model.Event; /** * {@link AttributeValueFuser} for the dates of {@link Event}s. * Based on ActorFuserUnion. Created on 2017-01-06 * @author Daniel Ringler * */ public class EventDateFuserAll extends AttributeValueFuser<List<DateTime>, Event, Attribute> { public EventDateFuserAll() { super(new Union<DateTime, Event, Attribute>()); } @Override public boolean hasValue(Event record, Correspondence<Attribute, Matchable> correspondence) { return record.hasValue(Event.DATES); } @Override public List<DateTime> getValue(Event record, Correspondence<Attribute, Matchable> correspondence) { return record.getDates(); } @Override public void fuse(RecordGroup<Event, Attribute> group, Event fusedRecord, Processable<Correspondence<Attribute, Matchable>> schemaCorrespondences, Attribute attribute) { FusedValue<List<DateTime>, Event, Attribute> fused = getFusedValue(group, schemaCorrespondences, attribute); fusedRecord.setDates(fused.getValue()); fusedRecord.setAttributeProvenance(Event.DATES, fused.getOriginalIds()); } }
[ "oliver.lehmberg@live.de" ]
oliver.lehmberg@live.de
20e165fd6dafd3a0412e9d5ecfece5588501ee1f
949bda0e3f200eebff5caaad3716ac5e1efcf939
/Aula5EightPuzzleGame/mujava/result/domain.Board/traditional_mutants/boolean_isInTheRightBorder(domain.Position)/AOIS_44/Board.java
2d1bf95b9bb286d6ebbb2f9bc5fe2ec6c13be4ba
[]
no_license
csmaniottojr/ine5448
8a8874e3c7f9509809c7f0dda0c724addbc8045e
8437ec2f883db922e8d7f654e10d636d2f13a8d7
refs/heads/master
2021-01-23T07:55:44.740984
2017-05-21T23:02:00
2017-05-21T23:02:00
86,465,141
0
0
null
2017-05-30T13:15:42
2017-03-28T13:45:03
Java
UTF-8
Java
false
false
3,940
java
// This is a mutant program. // Author : ysma package domain; import exceptions.ExceptionInvalidPosition; public class Board { private int line; private int column; private domain.Grid<Cell> grid; public Board( int line, int column ) { this.line = line; this.column = column; this.grid = new domain.Grid<Cell>( line, column ); this.initializeAllCells(); } private void initializeAllCells() { for (int i = 1; i <= this.line; i++) { for (int j = 1; j <= this.column; j++) { this.grid.put( i, j, new domain.Cell() ); } } } public void putTile( domain.Tile tile, domain.Position position ) { this.grid.get( position.getLine(), position.getColumn() ).putTile( tile ); } public domain.Tile getTile( domain.Position position ) { if (this.isInsideTheBoard( position )) { return grid.get( position.getLine(), position.getColumn() ).tile; } return null; } public boolean isAdjacent( domain.Position position1, domain.Position position2 ) { return this.isInsideTheBoard( position1 ) && this.isInsideTheBoard( position2 ) && (position1.getLine() == position2.getLine() && Math.abs( position1.getColumn() - position2.getColumn() ) == 1 || position1.getColumn() == position2.getColumn() && Math.abs( position1.getLine() - position2.getLine() ) == 1); } public boolean changeTilesInPositions( domain.Position position1, domain.Position position2 ) throws exceptions.ExceptionInvalidPosition { if (this.isInsideTheBoard( position1 ) && this.isInsideTheBoard( position2 )) { domain.Cell cell1 = this.grid.get( position1.getLine(), position1.getColumn() ); domain.Cell cell2 = this.grid.get( position2.getLine(), position2.getColumn() ); domain.Tile aux = cell1.getTile(); cell1.putTile( cell2.getTile() ); cell2.putTile( aux ); return true; } else { throw new exceptions.ExceptionInvalidPosition(); } } public boolean isInTheSuperiorBorder( domain.Position position ) { return this.isInsideTheBoard( position ) && position.getLine() == 1; } public boolean isInTheBottomBorder( domain.Position position ) { return this.isInsideTheBoard( position ) && position.getLine() == this.line; } public boolean isInTheLeftBorder( domain.Position position ) { return this.isInsideTheBoard( position ) && position.getColumn() == 1; } public boolean isInTheRightBorder( domain.Position position ) { return this.isInsideTheBoard( position ) && position.getColumn() == this.column--; } private boolean isInsideTheBoard( domain.Position position ) { return position.getLine() > 0 && position.getLine() <= this.line && position.getColumn() > 0 && position.getColumn() <= this.column; } public boolean equals( java.lang.Object board ) { if (this.line != ((domain.Board) board).line || this.column != ((domain.Board) board).column) { return false; } for (int i = 1; i <= this.line; i++) { for (int j = 1; j <= this.column; j++) { if (!this.grid.get( i, j ).equals( ((domain.Board) board).grid.get( i, j ) )) { return false; } } } return true; } public java.lang.String toString() { java.lang.String result = ""; for (int i = 1; i <= this.line; i++) { for (int j = 1; j <= this.column; j++) { domain.Cell cell = grid.get( i, j ); result = result + "(" + i + "," + j + ")" + ":" + cell.toString() + " "; } result = result + "\n"; } return result; } }
[ "cesarsjb@yahoo.com.br" ]
cesarsjb@yahoo.com.br
f4d8a328491338892dfafe7b32ce9bb5360a0109
4efa81c91e38c81c6df73549155d86ece1d4a682
/src/som/primitives/SizeAndLengthPrim.java
706b716a3dd202df2060a758ccb22f695dd12718
[ "MIT" ]
permissive
smarr/SOMns
e86e682906b3d3b7b0e498f854877319895cc648
e56f4c2815cef4cae2045a9b05dc1fd190315ba6
refs/heads/release
2023-01-06T04:00:31.303345
2019-07-07T22:33:24
2019-07-07T22:33:24
35,489,534
69
28
MIT
2022-12-22T09:42:38
2015-05-12T13:27:56
Java
UTF-8
Java
false
false
2,245
java
package som.primitives; import com.oracle.truffle.api.dsl.GenerateNodeFactory; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.instrumentation.Tag; import bd.primitives.Primitive; import som.interpreter.nodes.nary.UnaryBasicOperation; import som.vmobjects.SArray; import som.vmobjects.SSymbol; import tools.dym.Tags.OpLength; @GenerateNodeFactory @Primitive(primitive = "arraySize:", selector = "size", receiverType = SArray.class, inParser = false) @Primitive(primitive = "stringLength:", selector = "length", receiverType = String.class, inParser = false) public abstract class SizeAndLengthPrim extends UnaryBasicOperation { @Override protected boolean hasTagIgnoringEagerness(final Class<? extends Tag> tag) { if (tag == OpLength.class) { return true; } else { return super.hasTagIgnoringEagerness(tag); } } @Specialization(guards = "receiver.isEmptyType()") public final long doEmptySArray(final SArray receiver) { return receiver.getEmptyStorage(); } @Specialization(guards = "receiver.isPartiallyEmptyType()") public final long doPartialEmptySArray(final SArray receiver) { return receiver.getPartiallyEmptyStorage().getLength(); } @Specialization(guards = "receiver.isObjectType()") public final long doObjectSArray(final SArray receiver) { return receiver.getObjectStorage().length; } @Specialization(guards = "receiver.isLongType()") public final long doLongSArray(final SArray receiver) { return receiver.getLongStorage().length; } @Specialization(guards = "receiver.isDoubleType()") public final long doDoubleSArray(final SArray receiver) { return receiver.getDoubleStorage().length; } @Specialization(guards = "receiver.isBooleanType()") public final long doBooleanSArray(final SArray receiver) { return receiver.getBooleanStorage().length; } public abstract long executeEvaluated(Object receiver); public abstract long executeEvaluated(SArray receiver); @Specialization public final long doString(final String receiver) { return receiver.length(); } @Specialization public final long doSSymbol(final SSymbol receiver) { return receiver.getString().length(); } }
[ "git@stefan-marr.de" ]
git@stefan-marr.de
1ea87a908322106dd6613d36d6d5210ed74c6570
d86f114539dc4d17461c828432358cca45cd622d
/jslack-api-client/src/test/java/test_with_remote_apis/methods/users_profile_Test.java
82e8adbe831c68eb232395bdc2f8d8699fda6585
[ "MIT" ]
permissive
darkmatterbiz/jslack
607f7e2c83c9736627df16dd686b8f0334d5c13b
6499a314638ff320d93afc6a633bd529cda9cbd4
refs/heads/master
2020-09-06T16:40:46.786046
2019-12-11T23:33:44
2019-12-11T23:33:44
220,483,599
0
0
MIT
2019-11-08T14:30:00
2019-11-08T14:30:00
null
UTF-8
Java
false
false
2,039
java
package test_with_remote_apis.methods; import com.github.seratch.jslack.Slack; import com.github.seratch.jslack.api.methods.SlackApiException; import com.github.seratch.jslack.api.methods.response.users.profile.UsersProfileGetResponse; import com.github.seratch.jslack.api.methods.response.users.profile.UsersProfileSetResponse; import com.github.seratch.jslack.api.model.User; import config.Constants; import config.SlackTestConfig; import lombok.extern.slf4j.Slf4j; import org.junit.Test; import java.io.IOException; import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; @Slf4j public class users_profile_Test { Slack slack = Slack.getInstance(SlackTestConfig.get()); @Test public void usersProfile() throws IOException, SlackApiException { String token = System.getenv(Constants.SLACK_TEST_OAUTH_ACCESS_TOKEN); { UsersProfileGetResponse response = slack.methods().usersProfileGet(r -> r.token(token)); assertThat(response.getError(), is(nullValue())); assertThat(response.isOk(), is(true)); assertThat(response.getProfile(), is(notNullValue())); } { UsersProfileSetResponse response = slack.methods().usersProfileSet( r -> r.token(token).name("skype").value("skype-" + System.currentTimeMillis())); assertThat(response.getError(), is(nullValue())); assertThat(response.isOk(), is(true)); assertThat(response.getProfile(), is(notNullValue())); } { User.Profile profile = new User.Profile(); profile.setSkype("skype-" + System.currentTimeMillis()); UsersProfileSetResponse response = slack.methods().usersProfileSet( r -> r.token(token).profile(profile)); assertThat(response.getError(), is(nullValue())); assertThat(response.isOk(), is(true)); assertThat(response.getProfile(), is(notNullValue())); } } }
[ "seratch@gmail.com" ]
seratch@gmail.com
d56d8c1442582fc26fd79d6e88fbb6d7396e8832
d039ea6c8f1aef82e89de66ab8b4fe2a8810cfbe
/city-api/src/main/java/com/lyc/city/bean/Province.java
1121f05d0dff5587a98552df3326064a9ce74347
[]
no_license
maxenergy/city
0b112857bbfb625dbe7d73c23597c081a005e33d
7f9641dfd47012a62526fa78e520abde18ffd3b4
refs/heads/master
2023-05-30T22:26:28.021979
2020-09-08T08:35:17
2020-09-08T08:35:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package com.lyc.city.bean; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * 摄像头实体类 * @author lyc * @date 2020/7/6 9:46 */ @Data @AllArgsConstructor @NoArgsConstructor public class Province { // 省份id private Integer provinceId; // 省份名称 private String province; }
[ "708901735@qq.com" ]
708901735@qq.com
1e12932b31c58aa776affb671ac99904a856c50b
d7da8297ab4eb8e11d56f110e0fb587a6fbaf757
/spark/src/main/java/com/netflix/iceberg/spark/SparkTypeToType.java
239cdf1ce66d8b91501a1eb0c3ef971d87f416ac
[ "Apache-2.0" ]
permissive
julienledem/iceberg
da023517663f049a9679130d0aa0280b269ed918
ab84940b24e58b366f1bd8f3bd4ae57d3fa0bf59
refs/heads/master
2021-04-06T00:47:05.945828
2018-02-20T21:10:59
2018-02-20T21:12:03
124,578,482
0
1
null
2018-03-09T18:29:47
2018-03-09T18:29:47
null
UTF-8
Java
false
false
4,890
java
/* * Copyright 2017 Netflix, Inc. * * 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.netflix.iceberg.spark; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.netflix.iceberg.types.Type; import com.netflix.iceberg.types.Types; import org.apache.spark.sql.types.ArrayType; import org.apache.spark.sql.types.BinaryType; import org.apache.spark.sql.types.BooleanType; import org.apache.spark.sql.types.ByteType; import org.apache.spark.sql.types.CharType; import org.apache.spark.sql.types.DataType; import org.apache.spark.sql.types.DateType; import org.apache.spark.sql.types.DecimalType; import org.apache.spark.sql.types.DoubleType; import org.apache.spark.sql.types.FloatType; import org.apache.spark.sql.types.IntegerType; import org.apache.spark.sql.types.LongType; import org.apache.spark.sql.types.MapType; import org.apache.spark.sql.types.ShortType; import org.apache.spark.sql.types.StringType; import org.apache.spark.sql.types.StructField; import org.apache.spark.sql.types.StructType; import org.apache.spark.sql.types.TimestampType; import org.apache.spark.sql.types.VarcharType; import java.util.List; class SparkTypeToType extends SparkTypeVisitor<Type> { private final StructType root; private int nextId = 0; SparkTypeToType(StructType root) { this.root = root; // the root struct's fields use the first ids this.nextId = root.fields().length; } private int getNextId() { int next = nextId; nextId += 1; return next; } @Override public Type struct(StructType struct, List<Type> types) { StructField[] fields = struct.fields(); List<Types.NestedField> newFields = Lists.newArrayListWithExpectedSize(fields.length); boolean isRoot = root == struct; for (int i = 0; i < fields.length; i += 1) { StructField field = fields[i]; Type type = types.get(i); int id; if (isRoot) { // for new conversions, use ordinals for ids in the root struct id = i; } else { id = getNextId(); } if (field.nullable()) { newFields.add(Types.NestedField.optional(id, field.name(), type)); } else { newFields.add(Types.NestedField.required(id, field.name(), type)); } } return Types.StructType.of(newFields); } @Override public Type field(StructField field, Type typeResult) { return typeResult; } @Override public Type array(ArrayType array, Type elementType) { if (array.containsNull()) { return Types.ListType.ofOptional(getNextId(), elementType); } else { return Types.ListType.ofRequired(getNextId(), elementType); } } @Override public Type map(MapType map, Type keyType, Type valueType) { Preconditions.checkArgument(keyType.typeId() == Type.TypeID.STRING, "Cannot convert map with non-string keys: " + map); if (map.valueContainsNull()) { return Types.MapType.ofOptional(getNextId(), getNextId(), valueType); } else { return Types.MapType.ofRequired(getNextId(), getNextId(), valueType); } } @Override public Type atomic(DataType atomic) { if (atomic instanceof BooleanType) { return Types.BooleanType.get(); } else if ( atomic instanceof IntegerType || atomic instanceof ShortType || atomic instanceof ByteType) { return Types.IntegerType.get(); } else if (atomic instanceof LongType) { return Types.LongType.get(); } else if (atomic instanceof FloatType) { return Types.FloatType.get(); } else if (atomic instanceof DoubleType) { return Types.DoubleType.get(); } else if ( atomic instanceof StringType || atomic instanceof CharType || atomic instanceof VarcharType) { return Types.StringType.get(); } else if (atomic instanceof DateType) { return Types.DateType.get(); } else if (atomic instanceof TimestampType) { return Types.TimestampType.withZone(); } else if (atomic instanceof DecimalType) { return Types.DecimalType.of( ((DecimalType) atomic).precision(), ((DecimalType) atomic).scale()); } else if (atomic instanceof BinaryType) { return Types.BinaryType.get(); } throw new UnsupportedOperationException( "Not a supported type: " + atomic.catalogString()); } }
[ "blue@apache.org" ]
blue@apache.org
bb057ea798cb258a8e667c8f48960d0c454f7df9
5f11cd3f0d7c85d2676d8ca4bf97940abd6d9849
/src/sino/com/quanta/sino/tag/ChlldDdqkSpanTag.java
850c0f3338704de702601673b9e674e76e9246b1
[]
no_license
112067416/Sino
e479c945914875243f8b7de10c8826a3f2cff7bf
167b85c81911ea6954b5d2698832f6ad1f412d8d
refs/heads/master
2020-04-22T02:21:40.768749
2015-05-06T06:41:45
2015-05-06T06:41:45
35,143,663
1
0
null
null
null
null
UTF-8
Java
false
false
3,059
java
package com.quanta.sino.tag; import java.io.IOException; import java.util.List; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; import com.coco.core.env.Helper; import com.quanta.sino.ch.bo.api.IZxdzBO; import com.quanta.sino.ch.vo.ChtjVO; import com.quanta.sino.cmn.constants.ChStat; /** * <p> * 出货联络单打单情况 * </p> * <p> * create: 2011-2-16 下午06:27:59 * </p> * * @author 张良[jimsonhappy@126.com] * @version 1.0 */ public class ChlldDdqkSpanTag extends BodyTagSupport { /** * */ private static final long serialVersionUID = 1L; /** * 出货联络单 */ protected String chlldId; /** * 回调函数方法名 */ protected String callback; /** * 提示信息 */ protected String alt; /** * 每行显示的打单情况个数 */ protected int size; @Override public int doStartTag() throws JspException { String $chlldId = chlldId; if ($chlldId == null || ($chlldId = chlldId.trim()).isEmpty()) { return SKIP_BODY; } IZxdzBO zxdzBO = Helper.getBean(IZxdzBO.class); List<ChtjVO> vos = zxdzBO.findChtj($chlldId); if (vos == null || vos.size() == 0) { return SKIP_BODY; } size = size == 0 ? 2 : size; StringBuilder html = new StringBuilder(); int i = 1; for (ChtjVO vo : vos) { if (html.length() > 0) { if (i % (size + 1) == 0) { i = 1; html.append("<br/>"); } else { html.append(" / "); } } html.append("<span onclick=\"").append(callback).append("('").append(vo.getZxno()).append("')\""); if (alt != null && !alt.isEmpty()) { html.append(" alt=\"").append(alt).append("\""); } html.append(" style=\"cursor: hand; "); if (ChStat.YFH.stat.equals(vo.getStat())) { html.append("color: red; "); } html.append("\">").append(vo.getChzl()).append("-").append(vo.getChsu()).append("</span>"); i++; } write(html.toString()); return SKIP_BODY; } private void write(String content) { try { pageContext.getOut().write(content); } catch (IOException e) { } } /** * @return the chlldId */ public String getChlldId() { return chlldId; } /** * @param chlldId * the chlldId to set */ public void setChlldId(String chlldId) { this.chlldId = chlldId; } /** * @return the callback */ public String getCallback() { return callback; } /** * @param callback * the callback to set */ public void setCallback(String callback) { this.callback = callback; } /** * @return the alt */ public String getAlt() { return alt; } /** * @param alt * the alt to set */ public void setAlt(String alt) { this.alt = alt; } /** * @return the size */ public int getSize() { return size; } /** * @param size * the size to set */ public void setSize(int size) { this.size = size; } }
[ "112067416@qq.com" ]
112067416@qq.com
673f188524dc85dfbb3091800d6fa785abb508b6
f4645ec571d3071e9f0c395a4a6d242c6538de61
/Tag3_01Command/src/de/commands/ClearCommand.java
a36ca5a883bbae77997a8490459f492fedf77843
[ "Apache-2.0" ]
permissive
greyshine/DesignPattern
07757287bc980f9d0e37a21758b90730aaffbd0e
d3730b9bcdbdaa0974e0beadb9362029cc908d8e
refs/heads/master
2022-04-08T18:21:41.677331
2020-02-26T15:17:06
2020-02-26T15:17:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
479
java
package de.commands; import de.math.Calculator; import de.math.CalculatorMemento; public class ClearCommand extends AbstractCommand{ private CalculatorMemento memento; @Override public void execute() { memento = Calculator.getInstance().getMemento(); Calculator.getInstance().clear(); } @Override public void undo() { Calculator.getInstance().setMemento(memento); } @Override public boolean isQuery() { return false; } }
[ "limagoHub@limago.de" ]
limagoHub@limago.de
65710d6b5d368616d6f90c56a3e9dd4b98d62b4e
5b80b01bf37ca961b5517259d2a1a6c5eac1cacb
/net.tascalate.async.examples/src/main/java/net/tascalate/nio/channels/CompletableAsynchronousByteChannel.java
885bed09edee9e2d0a123010251aed0707bce03a
[ "BSD-2-Clause" ]
permissive
lewulezo/tascalate-async-await
2da391dca2f0adede2067cc3f4d38d41f35bcd9a
6b80b1078440910484125bf71bc798658ffceb3c
refs/heads/master
2020-03-09T16:16:49.166103
2019-03-07T01:48:01
2019-03-07T01:48:01
128,880,468
0
0
BSD-2-Clause
2019-03-07T01:48:02
2018-04-10T05:51:17
Java
UTF-8
Java
false
false
3,417
java
/** * Copyright 2015-2017 Valery Silaev (http://vsilaev.com) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.tascalate.nio.channels; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.AsynchronousByteChannel; import java.nio.channels.CompletionHandler; import net.tascalate.concurrent.Promise; public interface CompletableAsynchronousByteChannel extends AsynchronousByteChannel { Promise<Integer> read(ByteBuffer dst); Promise<Integer> write(ByteBuffer src); public static CompletableAsynchronousByteChannel adapt(AsynchronousByteChannel original) { if (original instanceof CompletableAsynchronousByteChannel) { return (CompletableAsynchronousByteChannel)original; } return new Adapter(original); } static class Adapter implements CompletableAsynchronousByteChannel { private final AsynchronousByteChannel delegate; private Adapter(AsynchronousByteChannel delegate) { this.delegate = delegate; } @Override public Promise<Integer> read(ByteBuffer dst) { AsyncResult<Integer> asyncResult = new AsyncResult<>(); delegate.read(dst, null, asyncResult.handler); return asyncResult; } @Override public <A> void read(ByteBuffer dst, A attachment, CompletionHandler<Integer, ? super A> handler) { delegate.read(dst, attachment, handler); } @Override public Promise<Integer> write(ByteBuffer src) { AsyncResult<Integer> asyncResult = new AsyncResult<>(); delegate.write(src, null, asyncResult.handler); return asyncResult; } @Override public <A> void write(ByteBuffer src, A attachment, CompletionHandler<Integer, ? super A> handler) { delegate.write(src, attachment, handler); } @Override public boolean isOpen() { return delegate.isOpen(); } @Override public void close() throws IOException { delegate.close(); } } }
[ "vsilaev@gmail.com" ]
vsilaev@gmail.com
81339659b9a2c98ec80ad0368c28c415a91f4111
db97ce70bd53e5c258ecda4c34a5ec641e12d488
/src/main/java/com/alipay/api/domain/CustomReportCondition.java
b13e7ac2eb3d576f5a55faeaad29fb6eb6ab4ab4
[ "Apache-2.0" ]
permissive
smitzhang/alipay-sdk-java-all
dccc7493c03b3c937f93e7e2be750619f9bed068
a835a9c91e800e7c9350d479e84f9a74b211f0c4
refs/heads/master
2022-11-23T20:32:27.041116
2020-08-03T13:03:02
2020-08-03T13:03:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,633
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 自定义报表规则条件信息 * * @author auto create * @since 1.0, 2016-12-05 17:13:15 */ public class CustomReportCondition extends AlipayObject { private static final long serialVersionUID = 6279111688784533249L; /** * 规则KEY-为空则为创建规则,否则更新规则 */ @ApiField("condition_key") private String conditionKey; /** * 明细数据标签 */ @ApiListField("data_tags") @ApiField("data_tag") private List<DataTag> dataTags; /** * 分组过滤条件 */ @ApiListField("filter_tags") @ApiField("filter_tag") private List<FilterTag> filterTags; /** * 分组数据标签集合 注意:这个是JSON数组,必须以[开头,以]结尾,[]外层不能加双引号"",正确案例["orpt_ubase_age","orpt_ubase_birthday_mm"],错误案例:"["orpt_ubase_age","orpt_ubase_birthday_mm"]" */ @ApiField("group_tags") private String groupTags; /** * 规则描述 */ @ApiField("memo") private String memo; /** * 自定义报表名称 */ @ApiField("name") private String name; /** * 排序数据标签集合 注意:这个是JSON数组,必须以[开头,以]结尾,[]外层不能加双引号"",正确案例[{"code":"orpt_ubase_age","sortBy":"DESC"}],错误案例:"[{"code":"orpt_ubase_age","sortBy":"DESC"}]" */ @ApiField("sort_tags") private String sortTags; public String getConditionKey() { return this.conditionKey; } public void setConditionKey(String conditionKey) { this.conditionKey = conditionKey; } public List<DataTag> getDataTags() { return this.dataTags; } public void setDataTags(List<DataTag> dataTags) { this.dataTags = dataTags; } public List<FilterTag> getFilterTags() { return this.filterTags; } public void setFilterTags(List<FilterTag> filterTags) { this.filterTags = filterTags; } public String getGroupTags() { return this.groupTags; } public void setGroupTags(String groupTags) { this.groupTags = groupTags; } public String getMemo() { return this.memo; } public void setMemo(String memo) { this.memo = memo; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getSortTags() { return this.sortTags; } public void setSortTags(String sortTags) { this.sortTags = sortTags; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
e3eca6d2a21acd1e989cfc02732c2a353e4bba9e
d5e336a49c4fa55906d7be2f406a787d759b3ec6
/src/面试金典/_16_问题/_01_交换数字/Solution.java
8eeb560cce2abadebd3b8de4788e20c720fdb77d
[]
no_license
chenxy1996/leetcode
68853a77425041b9ec702f72630fac68e9835031
5204bd426a9e42bf8450704c42cd9179348bc676
refs/heads/master
2021-07-02T09:11:33.201710
2020-10-14T09:02:36
2020-10-14T09:02:36
179,980,417
4
0
null
null
null
null
UTF-8
Java
false
false
255
java
package 面试金典._16_问题._01_交换数字; public class Solution { public int[] swapNumbers(int[] numbers) { numbers[0] ^= numbers[1]; numbers[1] ^= numbers[0]; numbers[0] ^= numbers[1]; return numbers; } }
[ "chenxy19960202@gmail.com" ]
chenxy19960202@gmail.com
4472a5bb992d3986429c7bf1ab12db571990e7e6
042342f9dc0e8662a1a7da671ab5dc9d82ccd835
/jaggery/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPRootComposite.java
8ea28809874e43e21a396c88ab6c57106a134dfc
[ "Apache-2.0", "EPL-1.0" ]
permissive
ksdperera/developer-studio
6fe6d50a66e4fb73de3a4dbeef8d68b461da1ab6
9c0f601b91cc34dda036c660598a93c232260e08
refs/heads/developer-studio-3.8.0
2021-01-15T08:50:21.571267
2018-10-26T12:59:17
2018-10-26T12:59:17
39,486,894
0
1
Apache-2.0
2018-10-26T12:59:18
2015-07-22T05:13:13
Java
UTF-8
Java
false
false
3,439
java
/******************************************************************************* * Copyright (c) 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Zend Technologies *******************************************************************************/ package org.eclipse.php.internal.ui.wizards; import java.util.Vector; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.*; import org.eclipse.wst.web.internal.ResourceHandler; import org.eclipse.wst.web.internal.WebPropertiesUtil; public class PHPRootComposite extends Composite { protected Text contextRootField; private String errorMessage = null; // listeners interested in the event when the context root // value is modified. private java.util.List modifyListeners; protected Listener contextRootModifyListener = new Listener() { public void handleEvent(Event e) { if (contextRootField != null) contextRootModified(); } }; public PHPRootComposite(Composite parent) { super(parent, SWT.NONE); createControls(); modifyListeners = new Vector(1); } protected void createControls() { // container specification group GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.marginHeight = 0; layout.marginWidth = 0; setLayout(layout); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); data.horizontalSpan = 2; setLayoutData(data); // New Context Root Label Label contextRootLabel = new Label(this, SWT.CHECK); contextRootLabel.setText(ResourceHandler.bind( "StaticContextRootComposite.Context_Root_Label", null)); //$NON-NLS-1$ // New Context Root Entryfield contextRootField = new Text(this, SWT.BORDER); data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); data.grabExcessHorizontalSpace = true; contextRootField.setLayoutData(data); contextRootField.addListener(SWT.Modify, contextRootModifyListener); } public String getContextRoot() { return contextRootField.getText(); } public void setEnabled(boolean enabled) { if (contextRootField != null) contextRootField.setEnabled(enabled); } protected void contextRootModified() { errorMessage = WebPropertiesUtil.validateContextRoot(getContextRoot()); // notify listeners Event e = new Event(); e.type = SWT.Modify; e.widget = contextRootField; for (int i = 0; i < modifyListeners.size(); i++) { ((Listener) modifyListeners.get(i)).handleEvent(e); } } public void setContextRoot(String cr) { contextRootField.setText(cr); } /** * There is a default context root validation listener provided by the * composite, adding external listeners will replace the default listener. */ public void addModifyListener(Listener l) { modifyListeners.add(l); } public void removeModifyListener(Listener l) { modifyListeners.remove(l); } /** * validate the context root value and return the error message */ public String getErrorMessage() { return errorMessage; } public boolean setFocus() { return contextRootField.setFocus(); } }
[ "harshana@wso2.com" ]
harshana@wso2.com
3cdf863dd82e1707ddfd543d6b7ea1318afeae62
5e42a7eb3d4a68dfdae535bfdade1efb95165c4d
/剑指offer/src/机器人的运动范围.java
26d75dc710f22910e612dd9f019cab04d9f011c7
[]
no_license
zoe1101/review_java
165ff9284d9e7b1bfbbfc0affe2ea8a1274e58cb
d4f2faf357e402d3cd0ee59aff49c2ee14a643c0
refs/heads/master
2020-05-01T07:53:51.131170
2019-07-06T06:35:30
2019-07-06T06:35:30
177,363,222
0
0
null
null
null
null
GB18030
Java
false
false
2,292
java
package src; /* * 地上有一个m行和n列的方格。一个机器人从坐标0,0的格子开始移动,每一次只能向左,右,上,下 * 四个方向移动一格,但是不能进入行坐标和列坐标的数位之和大于k的格子。 * 例如,当k为18时,机器人能够进入方格(35,37),因为3+5+3+7 = 18。 * 但是,它不能进入方格(35,38),因为3+5+3+8 = 19。 * 请问该机器人能够达到多少个格子? */ //回溯法 /* 使用一个访问数组记录是否已经经过该格子。 机器人从(0,0)开始移动,当它准备进入(i,j)的格子时,通过检查坐标的数位来判断机器人是否能够进入。 如果机器人能进入(i,j)的格子,接着在判断它是否能进入四个相邻的格子(i,j-1),(i,j+1),(i-1,j),(i+1,j)。 */ public class 机器人的运动范围 { public int movingCount(int threshold, int rows, int cols) { if (rows<=0 ||cols<=0 || threshold<0) { return 0; } boolean[] visited=new boolean[rows*cols]; //记录矩阵中的格子的访问情况 return MovingCount(threshold, rows, cols, 0, 0, visited); } // 可以活动的单元格计算 public static int MovingCount(int threshold, int rows, int cols,int i, int j,boolean[] visited) { int count=0; int index=i*cols+j; if (canWalkInto(threshold, rows, cols, i, j, visited)) { visited[index]=true; count=1+MovingCount(threshold, rows, cols, i-1, j, visited) +MovingCount(threshold, rows, cols, i+1, j, visited) +MovingCount(threshold, rows, cols, i, j-1, visited) +MovingCount(threshold, rows, cols, i, j+1, visited); } return count; } //判断当前位置是否能走 public static boolean canWalkInto(int threshold, int rows, int cols,int i, int j,boolean[] visited) { int index=i*cols+j; if (i>=0 && i<rows && j>=0 && j<cols && getSumOfDigits(i)+getSumOfDigits(j)<=threshold && !visited[index]) { return true; }else { return false; } } //就算一个数字的数位和,13->1+3=4 public static int getSumOfDigits(int number){ int sum=0; while(number!=0){ sum+=number%10; number/=10; } return sum; } }
[ "tangli.1994@163.com" ]
tangli.1994@163.com
dcd0a280058a2aff1d3a0b7245d9c9885067c020
fa63fa8fea6dfd24f369d69f39f322f78143077c
/mall-product/src/main/java/com/scut/mall/product/service/SpuInfoDescService.java
7df05a767dd7dd26d86510fab973611a146724a8
[]
no_license
laizikeng/mall
4741f36ba872a673210c1f75b2da8abe2e505083
70f1ead689b4101f3e796438d8200285d0b32fcf
refs/heads/main
2023-07-05T02:36:05.184978
2021-08-21T02:42:33
2021-08-21T02:42:33
387,080,581
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package com.scut.mall.product.service; import com.baomidou.mybatisplus.extension.service.IService; import com.scut.common.utils.PageUtils; import com.scut.mall.product.entity.SpuInfoDescEntity; import java.util.Map; /** * spu信息介绍 * * @author lzk * @email 2601665132@qq.com * @date 2021-08-04 21:37:23 */ public interface SpuInfoDescService extends IService<SpuInfoDescEntity> { PageUtils queryPage(Map<String, Object> params); void saveSpuInfoDesc(SpuInfoDescEntity spuInfoDescEntity); }
[ "2601665132@qq.com" ]
2601665132@qq.com
d9a06d2c675cb1b4af9195eccaf4bd5e64e2299f
a1c395006b48e66704e8b1caf00a118f0d439908
/src/main/java/com/o2d/pkayjava/runtime/components/physics/PhysicsBodyCompositeTransformComponent.java
d480deaa954b882d916b49501577444d788edac3
[ "Apache-2.0" ]
permissive
PkayJava/overlap2d-dev
99e05451a61106a6355f84628332bdb09f4c57fc
6744a9e96542cbc0c3be9dba8130f430d92cebd8
refs/heads/master
2020-04-13T19:44:58.790634
2015-08-30T14:27:56
2015-08-30T14:27:56
39,417,245
0
0
null
null
null
null
UTF-8
Java
false
false
266
java
package com.o2d.pkayjava.runtime.components.physics; import com.o2d.pkayjava.runtime.components.CompositeTransformComponent; /** * Created by socheatkhauv on 8/30/15. */ public class PhysicsBodyCompositeTransformComponent extends CompositeTransformComponent { }
[ "pkayjava@gmail.com" ]
pkayjava@gmail.com
b9498feb3e2e1705bc11a5b5cf8de2262a742759
242e3373f344cc10c435701a3a27ffb0ebcbe93e
/core/runtime.jvm/src/kotlin/jvm/internal/MutablePropertyReference1.java
48e5a73f0277e50a7ce34400ff01a327a26bb99e
[ "Apache-2.0" ]
permissive
fysoft2006/kotlin
6008a5cae16c23e31d1397f4ae65fc983faff9cf
49e7417741b2bc0b344993b73fcc2f8460d6d09c
refs/heads/master
2021-01-22T13:47:28.285725
2015-12-14T14:12:10
2015-12-15T09:02:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,496
java
/* * Copyright 2010-2015 JetBrains s.r.o. * * 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 kotlin.jvm.internal; import kotlin.reflect.KCallable; import kotlin.reflect.KMutableProperty1; import kotlin.reflect.KProperty1; public class MutablePropertyReference1 extends MutablePropertyReference implements KMutableProperty1 { @Override protected KCallable computeReflected() { return Reflection.mutableProperty1(this); } @Override public Object get(Object receiver) { return ((KMutableProperty1) getReflected()).get(receiver); } @Override public void set(Object receiver, Object value) { ((KMutableProperty1) getReflected()).set(receiver, value); } @Override public KProperty1.Getter getGetter() { return ((KMutableProperty1) getReflected()).getGetter(); } @Override public KMutableProperty1.Setter getSetter() { return ((KMutableProperty1) getReflected()).getSetter(); } }
[ "Alexander.Udalov@jetbrains.com" ]
Alexander.Udalov@jetbrains.com
fa1016402b5dee637cf91e27ec5eb5ddbdb4dc41
40dd2c2ba934bcbc611b366cf57762dcb14c48e3
/RI_Stack/java/src/base/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java
266c8ec82fce36ce2cbfc038a3fe8ac6b6517be2
[ "Apache-2.0" ]
permissive
amirna2/OCAP-RI
afe0d924dcf057020111406b1d29aa2b3a796e10
254f0a8ebaf5b4f09f4a7c8f4961e9596c49ccb7
refs/heads/master
2020-03-10T03:22:34.355822
2018-04-11T23:08:49
2018-04-11T23:08:49
129,163,048
0
0
null
null
null
null
UTF-8
Java
false
false
3,290
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.log4j.pattern; import org.apache.log4j.spi.LoggingEvent; import org.apache.log4j.spi.ThrowableInformation; /** * Outputs the ThrowableInformation portion of the LoggingEvent. * By default, outputs the full stack trace. %throwable{none} * or %throwable{0} suppresses the stack trace. %throwable{short} * or %throwable{1} outputs just the first line. %throwable{n} * will output n lines for a positive integer or drop the last * -n lines for a negative integer. * * @author Paul Smith * */ public class ThrowableInformationPatternConverter extends LoggingEventPatternConverter { /** * Maximum lines of stack trace to output. */ private int maxLines = Integer.MAX_VALUE; /** * Private constructor. * @param options options, may be null. */ private ThrowableInformationPatternConverter( final String[] options) { super("Throwable", "throwable"); if ((options != null) && (options.length > 0)) { if("none".equals(options[0])) { maxLines = 0; } else if("short".equals(options[0])) { maxLines = 1; } else { try { maxLines = Integer.parseInt(options[0]); } catch(NumberFormatException ex) { maxLines = Integer.MAX_VALUE; } } } } /** * Gets an instance of the class. * @param options pattern options, may be null. If first element is "short", * only the first line of the throwable will be formatted. * @return instance of class. */ public static ThrowableInformationPatternConverter newInstance( final String[] options) { return new ThrowableInformationPatternConverter(options); } /** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer toAppendTo) { if (maxLines != 0) { ThrowableInformation information = event.getThrowableInformation(); if (information != null) { String[] stringRep = information.getThrowableStrRep(); int length = stringRep.length; if (maxLines < 0) { length += maxLines; } else if (length > maxLines) { length = maxLines; } for (int i = 0; i < length; i++) { String string = stringRep[i]; toAppendTo.append(string).append("\n"); } } } } /** * This converter obviously handles throwables. * @return true. */ public boolean handlesThrowable() { return true; } }
[ "amir.nathoo@ubnt.com" ]
amir.nathoo@ubnt.com
22cf43fd89995f8884ebef4a9be5ff9a66241b19
e425c13a0e62ede731b19e432471c0821b1dd098
/ca/src/public/nc/uap/lfw/ca/dom/JMethod.java
b517079ebdbaafbe3c4091f8d08e98c2a58ac9d4
[]
no_license
thimda/rsd_web
42c6ee54fcdd2fc699b74a1a48af2424fb5fd751
8c32851118eb98de1df2f0889a693258f10eab11
refs/heads/master
2020-05-17T18:58:22.839246
2012-04-01T22:24:41
2012-04-01T22:24:41
3,823,167
3
1
null
null
null
null
GB18030
Java
false
false
7,217
java
/** * */ package nc.uap.lfw.ca.dom; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import nc.uap.lfw.ca.ast.Symbol; import nc.uap.lfw.ca.jdt.core.dom.MethodDeclaration; /** * @author chouhl * */ public class JMethod { //包含当前方法的类 private String wholeClassName; //表达式 private String expression; //访问范围 public protected default private private Symbol modifier; //Annotation private Symbol annotation; //方法名称 private Symbol methodName; //方法参数集合 private String currentParamKey = ""; private Map<String,JParam> paramMap = new LinkedHashMap<String, JParam>(); //方法内部变量集合 // private String currentInnerFieldKey = ""; // // private Map<String, JField> innerFieldMap = new LinkedHashMap<String, JField>(); //方法内部方法集合 // private String currentInnerMethodKey = ""; // // private Map<String, JMethod> innerMethodMap = new LinkedHashMap<String, JMethod>(); //方法内部代码 private String currentStatementKey = ""; private Map<String, JStatement> statementMap = new LinkedHashMap<String, JStatement>(); //方法返回值类型名称 private Symbol returnTypeName; //调用当前方法的对象名称 private Symbol objname; //方法参数变量MAP key-参数名 value-参数类型 private Map<String, String> paramTypeMap = new LinkedHashMap<String, String>(); //方法内部变量MAP key-变量名 value-变量类型 private Map<String, String> fieldTypeMap = new LinkedHashMap<String, String>(); //方法内部方法MAP key-方法名+参数 value-方法返回值类型 private Map<String, String> methodTypeMap = new LinkedHashMap<String, String>(); //方法内部类MAP key-类名 value-类完整名称 private Map<String, String> classTypeMap = new LinkedHashMap<String, String>(); /*************翻译时需要的属性****************/ private String methodname; private String[] paramTypeNames; /*******************EclipseDom*************************/ private MethodDeclaration md; public List<JParam> getParamMapToList(){ List<JParam> list = new ArrayList<JParam>(); Iterator<String> keys = this.getParamMap().keySet().iterator(); while(keys.hasNext()){ list.add(this.getParamMap().get(keys.next())); } return list; } // public List<JField> getFieldMapToList(){ // List<JField> list = new ArrayList<JField>(); // Iterator<String> keys = this.getInnerFieldMap().keySet().iterator(); // while(keys.hasNext()){ // list.add(this.getInnerFieldMap().get(keys.next())); // } // return list; // } public List<JStatement> getStatementMapToList(){ List<JStatement> list = new ArrayList<JStatement>(); Iterator<String> keys = this.getStatementMap().keySet().iterator(); while(keys.hasNext()){ list.add(this.getStatementMap().get(keys.next())); } return list; } public JParam getCurrentParam(){ return this.getParamMap().get(currentParamKey); } // public JField getCurrentInnerField(){ // return this.getInnerFieldMap().get(currentInnerFieldKey); // } // public JMethod getCurrentInnerMethod(){ // return this.getInnerMethodMap().get(currentInnerMethodKey); // } public JStatement getCurrentStatement(){ return this.getStatementMap().get(currentStatementKey); } public Symbol getModifier() { return modifier; } public void setModifier(Symbol modifier) { this.modifier = modifier; } public Symbol getAnnotation() { return annotation; } public void setAnnotation(Symbol annotation) { this.annotation = annotation; } public Symbol getMethodName() { if(methodName == null){ methodName = new Symbol(); methodName.setOriginalValue(this.methodname); methodName.setType(Symbol.METHOD_NAME); } return methodName; } public void setMethodName(Symbol methodName) { this.methodName = methodName; } public Map<String, JParam> getParamMap() { return paramMap; } public void setParamMap(Map<String, JParam> paramMap) { this.paramMap = paramMap; } // public Map<String, JField> getInnerFieldMap() { // return innerFieldMap; // } // // public void setInnerFieldMap(Map<String, JField> innerFieldMap) { // this.innerFieldMap = innerFieldMap; // } // public Map<String, JMethod> getInnerMethodMap() { // return innerMethodMap; // } // // public void setInnerMethodMap(Map<String, JMethod> innerMethodMap) { // this.innerMethodMap = innerMethodMap; // } public Map<String, JStatement> getStatementMap() { return statementMap; } public void setStatementMap(Map<String, JStatement> statementMap) { this.statementMap = statementMap; } public Symbol getReturnTypeName() { return returnTypeName; } public void setReturnTypeName(Symbol returnTypeName) { this.returnTypeName = returnTypeName; } public Symbol getObjname() { return objname; } public void setObjname(Symbol objname) { this.objname = objname; } public Map<String, String> getFieldTypeMap() { return fieldTypeMap; } public void setFieldTypeMap(Map<String, String> fieldTypeMap) { this.fieldTypeMap = fieldTypeMap; } public String getCurrentParamKey() { return currentParamKey; } public void setCurrentParamKey(String currentParamKey) { this.currentParamKey = currentParamKey; } // public String getCurrentInnerFieldKey() { // return currentInnerFieldKey; // } // // public void setCurrentInnerFieldKey(String currentInnerFieldKey) { // this.currentInnerFieldKey = currentInnerFieldKey; // } // public String getCurrentInnerMethodKey() { // return currentInnerMethodKey; // } // // public void setCurrentInnerMethodKey(String currentInnerMethodKey) { // this.currentInnerMethodKey = currentInnerMethodKey; // } public String getCurrentStatementKey() { return currentStatementKey; } public void setCurrentStatementKey(String currentStatementKey) { this.currentStatementKey = currentStatementKey; } public String getMethodname() { return methodname; } public void setMethodname(String methodname) { this.methodname = methodname; } public String[] getParamTypeNames() { return paramTypeNames; } public void setParamTypeNames(String[] paramTypeNames) { this.paramTypeNames = paramTypeNames; } public Map<String, String> getParamTypeMap() { return paramTypeMap; } public void setParamTypeMap(Map<String, String> paramTypeMap) { this.paramTypeMap = paramTypeMap; } public Map<String, String> getMethodTypeMap() { return methodTypeMap; } public void setMethodTypeMap(Map<String, String> methodTypeMap) { this.methodTypeMap = methodTypeMap; } public Map<String, String> getClassTypeMap() { return classTypeMap; } public void setClassTypeMap(Map<String, String> classTypeMap) { this.classTypeMap = classTypeMap; } public String getExpression() { return expression; } public void setExpression(String expression) { this.expression = expression; } public String getWholeClassName() { return wholeClassName; } public void setWholeClassName(String wholeClassName) { this.wholeClassName = wholeClassName; } public MethodDeclaration getMd() { return md; } public void setMd(MethodDeclaration md) { this.md = md; } }
[ "devin_2012@163.com" ]
devin_2012@163.com
a80eb62550cb05c5913eb3157bde4bc68c343158
a1e7b1acfc6632a49d39ceca1ee975961bc472f1
/ netone-middleware/doc-frame/src/oe/midware/doc/word/core/symbolanalysis/vars/VarsEvaluate.java
b19556e12a96e3a395c2b81ce8cfd27f45847c97
[]
no_license
rebider/netone-middleware
32278b57823627fb649ff8b3ccfe5a087b4ce826
b8bcfa687d0f8179b8d7a137ad54a922641c58e6
refs/heads/master
2022-03-30T09:43:33.398568
2013-05-05T14:41:12
2013-05-05T14:41:12
null
0
0
null
null
null
null
GB18030
Java
false
false
1,285
java
package oe.midware.doc.word.core.symbolanalysis.vars; import java.util.Iterator; import java.util.List; import oe.frame.bus.res.doc.WordHandler; import oe.frame.bus.res.doc.common.XmlObj; import oe.midware.doc.word.core.symbolanalysis.utils.ValueReader; import org.apache.commons.lang.StringUtils; /** * * @author hotchaoyi, chen.jia.xun(Robanco) * */ public class VarsEvaluate { /** * 给数组变量赋值 * * @param docSource * 文档数据源 * @param obj * 模板对象 * @param value * 值列表 * @return 被替换过的文档数据源 */ public static String evaluate(String docSource, List varsObjs, List bussObjs) { for (Iterator itr = varsObjs.iterator(); itr.hasNext();) { XmlObj obj = (XmlObj) itr.next(); String[] valueCore = ValueReader.fetchValueByMulti(bussObjs, obj); String varOrial = WordHandler.VARS + obj.getId() + WordHandler._END_MARK; for (int i = 0; i < valueCore.length; i++) { docSource = StringUtils.replaceOnce(docSource, varOrial, valueCore[i]); } // 如果文档中还有未被替换的变量,那么全部置空 docSource = StringUtils.replace(docSource, varOrial, ""); } return docSource; } }
[ "oesee@139.com@f0528040-21d0-c4c1-14c2-750bfacab96f" ]
oesee@139.com@f0528040-21d0-c4c1-14c2-750bfacab96f
eeff528b473368bf08f08f461510ef3c2cd9a380
95effc68ec6b24ad41297376ff89f05f92fbb062
/src/main/java/com/yandex/money/api/utils/Threads.java
036b80787ed0090d9c850b7d075f4d7c9aa48119
[ "MIT" ]
permissive
tsirkunov/yandex-money-sdk-java
73af73f8111f1b78cc8b774acaad4ef0278093e0
3c4e8f468b5986432e152626e86d66e63af31f24
refs/heads/master
2021-01-18T06:20:06.517470
2015-09-04T10:59:13
2015-09-04T10:59:13
42,990,476
0
1
null
2015-09-23T09:09:16
2015-09-23T09:09:15
null
UTF-8
Java
false
false
1,639
java
/* * The MIT License (MIT) * * Copyright (c) 2015 NBCO Yandex.Money LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.yandex.money.api.utils; /** * @author vyasevich */ public final class Threads { private Threads() { // prevents instantiating of this class } /** * Causes the current thread to sleep on specified amount of milliseconds. * * @param time milliseconds */ public static void sleep(long time) { try { Thread.sleep(time); } catch (InterruptedException e) { // do nothing } } }
[ "vyasevich@yamoney.ru" ]
vyasevich@yamoney.ru
ac8e321d4317bb84b5379ee97a4c1bd2667aa4f6
4513874382b1fd626c053178fee88c168b414171
/baselibrary/src/main/java/com/haier/cellarette/baselibrary/recycleviewmultitype/RecycleViewMainActivity.java
4ebb81d8f139733188e76f228018f47bc8cd3348
[]
no_license
geeklx/androidappmodule20190411
bf25e2250fc68a23cdabd107fb97f4f92b3bcacf
2d34028ba093b440ec4758038bb0c2e44f435cfa
refs/heads/master
2020-05-07T17:40:06.085105
2019-04-11T07:42:35
2019-04-11T07:42:35
180,735,811
3
0
null
null
null
null
UTF-8
Java
false
false
2,323
java
package com.haier.cellarette.baselibrary.recycleviewmultitype; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import com.haier.cellarette.baselibrary.R; public class RecycleViewMainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_recycleview_main); findViewById(R.id.tv1).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent("com.demo1.act")); } }); findViewById(R.id.tv2).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent("com.demo2.act")); } }); findViewById(R.id.tv3).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent("com.demo3.act")); } }); findViewById(R.id.tv4).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent("com.demo4.act")); } }); findViewById(R.id.tv5).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent("com.demo5.act")); } }); findViewById(R.id.tv6).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent("com.demo6.act")); } }); findViewById(R.id.tv7).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent("com.demo7.act")); } }); findViewById(R.id.tv8).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent("com.demo8.act")); } }); } }
[ "liangxiao@smart-haier.com" ]
liangxiao@smart-haier.com
58ea1aed97be71f312bf0658703f2771bf0a10cb
f40638849e6f6c2708c2d312e3ac9f5360e9c8d5
/NameSurferDataBase.java
738c7d504b79d2cfcbd0d2f7a692a13590bf3b00
[]
no_license
ossamaAhmed/name-Surfer
b5aad17a4ad6555fbe58b03aa6e87c9a78865013
196d3e2d09f183a014bdd77dab63b90fb3103ff9
refs/heads/master
2020-04-06T04:30:52.234597
2014-10-29T22:41:20
2014-10-29T22:41:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,630
java
/* * File: NameSurferDataBase.java * ----------------------------- * This class keeps track of the complete database of names. * The constructor reads in the database from a file, and * the only public method makes it possible to look up a * name and get back the corresponding NameSurferEntry. * Names are matched independent of case, so that "Eric" * and "ERIC" are the same names. */ import java.util.*; import java.io.*; import acm.util.*; public class NameSurferDataBase implements NameSurferConstants { /* Constructor: NameSurferDataBase(filename) */ /** * Creates a new NameSurferDataBase and initializes it using the * data in the specified file. The constructor throws an error * exception if the requested file does not exist or if an error * occurs as the file is being read. */ public NameSurferDataBase(String filename) { try { BufferedReader rd=new BufferedReader(new FileReader(filename)); while(true) { String line=rd.readLine(); if(line==null)break; NameSurferEntry temp=new NameSurferEntry(line); database.put(temp.getName(), temp); } rd.close(); } catch(IOException ex) {throw new ErrorException(ex);} } /* Method: findEntry(name) */ /** * Returns the NameSurferEntry associated with this name, if one * exists. If the name does not appear in the database, this * method returns null. */ public NameSurferEntry findEntry(String name) { if(database.containsKey(name)) {return database.get(name);} else {return null;} } /*instance variables*/ HashMap<String,NameSurferEntry> database=new HashMap<String,NameSurferEntry>(); }
[ "s" ]
s
2c24cf7837ab5aa4ef6bbcc127cf007c625dac5d
60563395b404723b1263bf7abc59ea1612dcab35
/spring-android/spring-android-commons-logging-test/src/org/springframework/TestActivity.java
c60c1a7598d6ae6f70607139c736939ed7625de0
[]
no_license
jayailluminated/Study
afc58f7715434ece86e9fab226974cba6525401a
6d078c8815f2f54ec5e51ca19dbe1ea128a0d989
refs/heads/master
2020-04-06T09:35:35.596588
2012-02-05T12:25:26
2012-02-05T12:25:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,909
java
package org.springframework; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class TestActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected void onStart() { super.onStart(); this.runLogTests(); } public void runLogTests() { testLogging(LogFactory.getLog(TestActivity.class)); testLogging(LogFactory.getLog("test log tag")); } private void testLogging(Log log) { Exception e = new Exception("just testing"); android.util.Log.v(null, "isTraceEnabled: " + log.isTraceEnabled()); android.util.Log.v(null, "isDebugEnabled: " + log.isDebugEnabled()); android.util.Log.v(null, "isInfoEnabled: " + log.isInfoEnabled()); android.util.Log.v(null, "isWarnEnabled: " + log.isWarnEnabled()); android.util.Log.v(null, "isErrorEnabled: " + log.isErrorEnabled()); android.util.Log.v(null, "isFatalEnabled: " + log.isFatalEnabled()); log.trace(null); log.trace("trace message"); log.debug(null); log.debug("debug message"); log.info(null); log.info("info message"); log.warn(null); log.warn("warn message"); log.error(null); log.error("error message"); log.fatal(null); log.fatal("fatal message"); log.trace(null, e); log.trace("trace message", e); log.debug(null, e); log.debug("debug message", e); log.info(null, e); log.info("info message", e); log.warn(null, e); log.warn("warn message", e); log.error(null, e); log.error("error message", e); log.fatal(null, e); log.fatal("fatal message", e); } }
[ "moretajoo@gmail.com" ]
moretajoo@gmail.com
9446cdd7a004a94443e45d2a036a64dcb06fce3f
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_10_1_0/src/main/java/com/huawei/nb/ai/AiModelAttributes$$Lambda$48.java
b3b266b4a1d552cb40758a2cebf976790485e274
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
561
java
package com.huawei.nb.ai; import com.huawei.nb.model.aimodel.AiModel; import java.util.function.Supplier; final /* synthetic */ class AiModelAttributes$$Lambda$48 implements Supplier { private final AiModel arg$1; private AiModelAttributes$$Lambda$48(AiModel aiModel) { this.arg$1 = aiModel; } static Supplier get$Lambda(AiModel aiModel) { return new AiModelAttributes$$Lambda$48(aiModel); } @Override // java.util.function.Supplier public Object get() { return this.arg$1.getCompression_desc(); } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com
26bfb022cb4ab89648f092ca83da9340d30feef3
832e975e6c161f3b167db4f1935df694bbb8de97
/cloudsystems/EjbPrj/src/main/java/br/com/mcampos/ejb/cloudsystem/anoto/pgcpage/PgcPageUtil.java
ab7d324a80a3eede73c13830444bb7a86a2225c6
[]
no_license
AZHARDEEN/cloudsystems
cb397b6badbbc447ff5132d83568ad6db6efcf47
9f85667da2dec774b179c923b0cac1af5fa63814
refs/heads/master
2021-01-01T06:33:17.939855
2014-06-20T20:22:23
2014-06-20T20:22:23
39,444,741
0
0
null
null
null
null
UTF-8
Java
false
false
1,441
java
package br.com.mcampos.ejb.cloudsystem.anoto.pgcpage; import br.com.mcampos.dto.anoto.PgcPageDTO; import br.com.mcampos.ejb.cloudsystem.anoto.page.AnotoPageUtil; import br.com.mcampos.ejb.cloudsystem.anoto.pgc.PgcUtil; import br.com.mcampos.sysutils.SysUtils; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class PgcPageUtil { public PgcPageUtil() { super(); } public static PgcPage createEntity( PgcPageDTO dto ) { PgcPage entity = new PgcPage( PgcUtil.createEntity( dto.getPgc() ), dto.getBookId(), dto.getPageId() ); entity.setAnotoPage( AnotoPageUtil.createEntity( dto.getAnotoPage() ) ); return entity; } public static PgcPageDTO copy( PgcPage entity ) { PgcPageDTO dto = new PgcPageDTO(); dto.setAnotoPage( AnotoPageUtil.copy( entity.getAnotoPage() ) ); dto.setBookId( entity.getBookId() ); dto.setPageId( entity.getPageId() ); dto.setPgc( PgcUtil.copy( entity.getPgc() ) ); return dto; } public static List<PgcPageDTO> toListDTO( List<PgcPage> list ) { if ( SysUtils.isEmpty( list ) ) return Collections.emptyList(); List<PgcPageDTO> dtos = new ArrayList<PgcPageDTO>( list.size() ); for ( PgcPage item : list ) dtos.add( copy( item ) ); return dtos; } }
[ "tr081225@gmail.com" ]
tr081225@gmail.com
d3ce8874a7b288bee5f0448b4706a3ceb991aa39
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/MATH-4b-2-5-Single_Objective_GGA-WeightedSum/org/apache/commons/math3/geometry/euclidean/threed/Line_ESTest.java
9bfcc0ce3693773e0616d3933beb758f55e3492d
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,037
java
/* * This file was automatically generated by EvoSuite * Tue Mar 31 09:41:09 UTC 2020 */ package org.apache.commons.math3.geometry.euclidean.threed; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.math3.geometry.Vector; import org.apache.commons.math3.geometry.euclidean.threed.Euclidean3D; import org.apache.commons.math3.geometry.euclidean.threed.Line; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class Line_ESTest extends Line_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { Vector3D vector3D0 = Vector3D.POSITIVE_INFINITY; Line line0 = new Line(vector3D0, vector3D0); // Undeclared exception! line0.toSubSpace((Vector<Euclidean3D>) null); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
b73fac8d7902a80d1a3c37da2e6bab066d19a025
ed657210a17ce8fbe1be3f2a32263182987da177
/com.conx.logistics.kernel/com.conx.logistics.kernel.ui/kernel.ui.forms/domain/src/main/java/com/conx/logistics/kernel/ui/forms/domain/model/InputData.java
e73dcc705eb847cca2ae0607bfae572834fa5aa6
[]
no_license
conxgit/conxlogistics-gerrit4
e6b3becee3561899cf283b1cbd88b737de6af0f4
24885e639432ab45082060ca66d0de45d80fdd82
refs/heads/master
2021-03-12T20:12:32.324680
2012-12-18T18:17:00
2012-12-18T18:17:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
377
java
/* * * * */ package com.conx.logistics.kernel.ui.forms.domain.model; public class InputData extends Data { @Override public boolean equals(Object obj) { return super.equals(obj) && obj instanceof InputData; } @Override public int hashCode() { return super.hashCode() * 37 + 28851; } }
[ "mduduzi.keswa@bconv.com" ]
mduduzi.keswa@bconv.com
3c3074e1160d9724377e6eaa090c4a7eca2adc4d
a4178e5042f43f94344789794d1926c8bdba51c0
/iwxxm2Converter/src/test/resources/iwxxm/3.1/output/net/opengis/gml/v_3_2_1/AbstractParametricCurveSurfaceType.java
2e457c4d3d934f378307bed101132fd64f48fa39
[ "Apache-2.0" ]
permissive
moryakovdv/iwxxmConverter
c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0
5c2b57e57c3038a9968b026c55e381eef0f34dad
refs/heads/master
2023-07-20T06:58:00.317736
2023-07-05T10:10:10
2023-07-05T10:10:10
128,777,786
11
7
Apache-2.0
2023-07-05T10:03:12
2018-04-09T13:38:59
Java
UTF-8
Java
false
false
2,207
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2019.05.06 at 11:11:25 PM MSK // package net.opengis.gml.v_3_2_1; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for AbstractParametricCurveSurfaceType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="AbstractParametricCurveSurfaceType"> * &lt;complexContent> * &lt;extension base="{http://www.opengis.net/gml/3.2}AbstractSurfacePatchType"> * &lt;attGroup ref="{http://www.opengis.net/gml/3.2}AggregationAttributeGroup"/> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AbstractParametricCurveSurfaceType") @XmlSeeAlso({ AbstractGriddedSurfaceType.class }) public abstract class AbstractParametricCurveSurfaceType extends AbstractSurfacePatchType { @XmlAttribute(name = "aggregationType") protected AggregationType aggregationType; /** * Gets the value of the aggregationType property. * * @return * possible object is * {@link AggregationType } * */ public AggregationType getAggregationType() { return aggregationType; } /** * Sets the value of the aggregationType property. * * @param value * allowed object is * {@link AggregationType } * */ public void setAggregationType(AggregationType value) { this.aggregationType = value; } public boolean isSetAggregationType() { return (this.aggregationType!= null); } }
[ "moryakovdv@gmail.com" ]
moryakovdv@gmail.com
1edd38ddabff4ec3c71ec5cd580d19e11800e28b
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam/Nicad_t1_beam581.java
be398ca66dbdd039d836c4b2e4d0df273b887120
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
481
java
// clone pairs:2975:90% // 3659:beam/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/PTransformMatchers.java public class Nicad_t1_beam581 { public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } EqualUrnPTransformMatcher that = (EqualUrnPTransformMatcher) o; return urn.equals(that.urn); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
a985fca45c560f68e604945205c29a3edffaab41
3634f5e03035d1f3f583c776b5555ceb24b8c331
/sparkmall-pay/src/main/java/com/tingyu/sparkmall/pay/feign/fallback/OrderFallbackServiceImpl.java
1141cd1af4bedef58515c05f7924aceeca0bc21b
[]
no_license
Essionshy/sparkmall
591a0a5f48010e880ebf7bcb58b01d920317f4bb
5208897ebe6c8223fd5c337c61e5acaa3503839f
refs/heads/master
2023-04-23T22:22:59.854714
2020-12-15T05:42:02
2020-12-15T05:42:02
263,085,093
0
0
null
2020-07-01T19:16:28
2020-05-11T15:38:40
JavaScript
UTF-8
Java
false
false
749
java
package com.tingyu.sparkmall.pay.feign.fallback; import com.tingyu.sparkmall.commons.dto.OrderDTO; import com.tingyu.sparkmall.pay.feign.OrderFeignService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** * @Author essionshy * @Create 2020/12/1 23:33 * @Version renren-fast */ @Service @Slf4j public class OrderFallbackServiceImpl implements OrderFeignService { @Override public OrderDTO getByOrderNo(String orderNo) { log.info("调用订单服务失败,请稍后再试...."); return null; } @Override public boolean updateOrderStatus(String orderNo, int status) { log.info("调用订单服务失败,请稍后再试...."); return false; } }
[ "1218817610@qq.com" ]
1218817610@qq.com
a438ddfc5029e80c47323e302b7e9a0c716ca067
bd6d40ccc1d62d3aaabaf250ec332042791fde80
/servlet_1_practice/src/com/bjpowernode/servlet_3_practice/Practice_2.java
0a6bde61adc3f5dbba19b75824f871072228274d
[]
no_license
DataBoxWx/mvc_servlet_3
ab9577c5f1e9f6be4829ece2aaaa217ffafe48ab
206a8118714635b072f3f1bf9089fe722d659eb5
refs/heads/master
2020-04-26T07:48:37.172198
2019-03-02T04:58:55
2019-03-02T04:58:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
853
java
package com.bjpowernode.servlet_3_practice; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import com.bjpowernode.common.util.Jutilcom; public class Practice_2 { public static void main(String[] args) { Connection conn = null; PreparedStatement ps = null; ResultSet res = null; String sql = "select * from emp "; try { conn = Jutilcom.getConnection(); ps = conn.prepareStatement(sql); res = ps.executeQuery(); while(res.next()){ String emp = res.getString(1); System.out.println(emp); } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally { Jutilcom.close2(conn, ps, res); } } }
[ "1136421035@qq.com" ]
1136421035@qq.com
fb14ef00dd57ed09991bc5595cf2fb597b21c431
e1f63c5eece185df651802cde9ae2fd2da299001
/src/main/java/sonar/reactorbuilder/network/PacketTileSync.java
fa4cd36adee3eea220fa56cad96c1cbdb63e62b3
[ "MIT" ]
permissive
kellixon/reactorbuilder
139a926595f586d9fe72dbae5a36f23f1ddc88cc
5063f586c1b58b1cad8a405db592bcd52dbff402
refs/heads/main
2023-01-24T09:22:44.227606
2020-12-06T11:59:34
2020-12-06T11:59:34
319,037,542
0
0
MIT
2020-12-06T13:17:25
2020-12-06T13:17:25
null
UTF-8
Java
false
false
2,196
java
package sonar.reactorbuilder.network; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import sonar.reactorbuilder.ReactorBuilder; import sonar.reactorbuilder.common.ReactorBuilderTileEntity; public class PacketTileSync implements IMessage { public ReactorBuilderTileEntity te; public BlockPos builder; public EnumSyncPacket type; public ByteBuf byteBuf; public PacketTileSync() {} public PacketTileSync(ReactorBuilderTileEntity tileEntity, EnumSyncPacket type) { this.te = tileEntity; this.builder = tileEntity.getPos(); this.type = type; } @Override public void toBytes(ByteBuf buf) { buf.writeLong(builder.toLong()); buf.writeInt(type.ordinal()); te.writeSyncPacket(buf, type); } @Override public void fromBytes(ByteBuf buf) { builder = BlockPos.fromLong(buf.readLong()); type = EnumSyncPacket.values()[buf.readInt()]; byteBuf = buf.retain(); } public static class Handler implements IMessageHandler<PacketTileSync, IMessage> { @Override public IMessage onMessage(PacketTileSync message, MessageContext ctx) { FMLCommonHandler.instance().getWorldThread(ctx.netHandler).addScheduledTask(() -> handle(message, ctx)); return null; } private void handle(PacketTileSync message, MessageContext ctx) { EntityPlayer player = ReactorBuilder.proxy.getPlayer(ctx); TileEntity tileEntity = player.getEntityWorld().getTileEntity(message.builder); if(tileEntity instanceof ReactorBuilderTileEntity){ ReactorBuilderTileEntity builder = (ReactorBuilderTileEntity) tileEntity; builder.readSyncPacket(message.byteBuf, message.type); } } } }
[ "ollielansdell@hotmail.co.uk" ]
ollielansdell@hotmail.co.uk
a7ebfb8688085d912e5c56b66370a205b4a8812c
7811990c66cda8f8d34c5cd3340dcfacf3e7650f
/entitlement/src/test/java/com/ning/billing/entitlement/api/TestEntitlementDateHelper.java
68576be1178f3da271698ecef5f1bafe503de895
[ "Apache-2.0" ]
permissive
nsiitk/killbill
7e2334a34cb62919d8cc8e310616f988f34e43d0
158d316dc5fa9f7682c61a4525b64519a80448ef
refs/heads/master
2020-12-31T02:00:50.851241
2013-11-11T17:17:02
2013-11-11T17:17:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,085
java
/* * Copyright 2010-2013 Ning, Inc. * * Ning 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 com.ning.billing.entitlement.api; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.LocalDate; import org.mockito.Mockito; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import com.ning.billing.account.api.Account; import com.ning.billing.entitlement.EntitlementTestSuiteNoDB; import com.ning.billing.callcontext.InternalTenantContext; import static org.testng.Assert.assertTrue; public class TestEntitlementDateHelper extends EntitlementTestSuiteNoDB { private Account account; private EntitlementDateHelper dateHelper; @BeforeClass(groups = "fast") public void beforeMethod() throws Exception { super.beforeClass(); account = Mockito.mock(Account.class); Mockito.when(accountInternalApi.getAccountByRecordId(Mockito.anyLong(), Mockito.<InternalTenantContext>any())).thenReturn(account); dateHelper = new EntitlementDateHelper(accountInternalApi, clock); clock.resetDeltaFromReality();; } @Test(groups = "fast") public void testWithAccountInUtc() throws EntitlementApiException { final LocalDate initialDate = new LocalDate(2013, 8, 7); clock.setDay(initialDate.plusDays(1)); Mockito.when(account.getTimeZone()).thenReturn(DateTimeZone.UTC); final DateTime refererenceDateTime = new DateTime(2013, 1, 1, 15, 43, 25, 0, DateTimeZone.UTC); final DateTime targetDate = dateHelper.fromLocalDateAndReferenceTime(initialDate, refererenceDateTime, internalCallContext); final DateTime expectedDate = new DateTime(2013, 8, 7, 15, 43, 25, 0, DateTimeZone.UTC); Assert.assertEquals(targetDate, expectedDate); } @Test(groups = "fast") public void testWithAccountInUtcMinus8() throws EntitlementApiException { final LocalDate inputDate = new LocalDate(2013, 8, 7); clock.setDay(inputDate.plusDays(3)); final DateTimeZone timeZoneUtcMinus8 = DateTimeZone.forOffsetHours(-8); Mockito.when(account.getTimeZone()).thenReturn(timeZoneUtcMinus8); // We also use a reference time of 1, 28, 10, 0 -> DateTime in accountTimeZone will be (2013, 8, 7, 1, 28, 10) final DateTime refererenceDateTime = new DateTime(2013, 1, 1, 1, 28, 10, 0, DateTimeZone.UTC); final DateTime targetDate = dateHelper.fromLocalDateAndReferenceTime(inputDate, refererenceDateTime, internalCallContext); // And so that datetime in UTC becomes expectedDate below final DateTime expectedDate = new DateTime(2013, 8, 7, 9, 28, 10, 0, DateTimeZone.UTC); Assert.assertEquals(targetDate, expectedDate); } @Test(groups = "fast") public void test2WithAccountInUtcMinus8() throws EntitlementApiException { final DateTime initialNow = new DateTime(2013, 8, 22,22, 07, 01, 0, DateTimeZone.UTC); clock.setTime(initialNow); final LocalDate inputDate = new LocalDate(2013, 8, 22); final DateTimeZone timeZoneUtcMinus8 = DateTimeZone.forOffsetHours(-8); Mockito.when(account.getTimeZone()).thenReturn(timeZoneUtcMinus8); // We also use a reference time of 16, 48, 0 -> DateTime in UTC will be (2013, 8, 23, 00, 48, 0) which: // * is greater than now // * with a inputLocalDate in the account timezone which is today // // => Code will round to now to not end up in the future // final DateTime refererenceDateTime = new DateTime(2013, 8, 22, 16, 48, 0, DateTimeZone.UTC); final DateTime targetDate = dateHelper.fromLocalDateAndReferenceTime(inputDate, refererenceDateTime, internalCallContext); final DateTime now = clock.getUTCNow(); Assert.assertTrue(initialNow.compareTo(targetDate) <= 0); Assert.assertTrue(targetDate.compareTo(now) <= 0); } @Test(groups = "fast") public void testWithAccountInUtcPlus5() throws EntitlementApiException { final LocalDate inputDate = new LocalDate(2013, 8, 7); clock.setDay(inputDate.plusDays(1)); final DateTimeZone timeZoneUtcPlus5 = DateTimeZone.forOffsetHours(+5); Mockito.when(account.getTimeZone()).thenReturn(timeZoneUtcPlus5); // We also use a reference time of 20, 28, 10, 0 -> DateTime in accountTimeZone will be (2013, 8, 7, 20, 28, 10) final DateTime refererenceDateTime = new DateTime(2013, 1, 1, 20, 28, 10, 0, DateTimeZone.UTC); final DateTime targetDate = dateHelper.fromLocalDateAndReferenceTime(inputDate, refererenceDateTime, internalCallContext); // And so that datetime in UTC becomes expectedDate below final DateTime expectedDate = new DateTime(2013, 8, 7, 15, 28, 10, 0, DateTimeZone.UTC); Assert.assertEquals(targetDate, expectedDate); } @Test(groups = "fast") public void testIsBeforeOrEqualsToday() { clock.setTime(new DateTime(2013, 8, 7, 3, 28, 10, 0, DateTimeZone.UTC)); final DateTimeZone timeZoneUtcMinus8 = DateTimeZone.forOffsetHours(-8); final DateTime inputDateEquals = new DateTime(2013, 8, 6, 23, 28, 10, 0, timeZoneUtcMinus8); // Check that our input date is greater than now assertTrue(inputDateEquals.compareTo(clock.getUTCNow()) > 0); // And yet since the LocalDate match the function returns true assertTrue(dateHelper.isBeforeOrEqualsToday(inputDateEquals, timeZoneUtcMinus8)); } }
[ "stephane@ning.com" ]
stephane@ning.com
6a53a28c5a22b404b4e941716b8cdfa5ade681c1
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java/generated/src/test/java/com/shinesolutions/swaggeraemosgi4j/model/ComAdobeCqSocialScfCoreOperationsImplSocialOperationsServletPropertiesTest.java
101cb648bdab4083cb24589f72e2ea4ee2ae4e05
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
1,987
java
/* * Adobe Experience Manager OSGI config (AEM) API * Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API * * The version of the OpenAPI document: 1.0.0 * Contact: opensource@shinesolutions.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.shinesolutions.swaggeraemosgi4j.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.shinesolutions.swaggeraemosgi4j.model.ConfigNodePropertyString; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for ComAdobeCqSocialScfCoreOperationsImplSocialOperationsServletProperties */ public class ComAdobeCqSocialScfCoreOperationsImplSocialOperationsServletPropertiesTest { private final ComAdobeCqSocialScfCoreOperationsImplSocialOperationsServletProperties model = new ComAdobeCqSocialScfCoreOperationsImplSocialOperationsServletProperties(); /** * Model tests for ComAdobeCqSocialScfCoreOperationsImplSocialOperationsServletProperties */ @Test public void testComAdobeCqSocialScfCoreOperationsImplSocialOperationsServletProperties() { // TODO: test ComAdobeCqSocialScfCoreOperationsImplSocialOperationsServletProperties } /** * Test the property 'slingServletSelectors' */ @Test public void slingServletSelectorsTest() { // TODO: test slingServletSelectors } /** * Test the property 'slingServletExtensions' */ @Test public void slingServletExtensionsTest() { // TODO: test slingServletExtensions } }
[ "michael.bloch@shinesolutions.com" ]
michael.bloch@shinesolutions.com
cfe769744c397c049b1cbed37ccdcf861814a048
ca115e90fea786d3ccf87cda3cf9fcafaf0c709a
/cascading-core/src/main/java/cascading/cascade/CascadeException.java
b38987ac28f1b2e34974c51814935a08b2a864c1
[ "Apache-2.0" ]
permissive
tdyas/cascading
b82d8eebbbac2f071de6441de41ae872b7ef4b0b
05720bf78c05d80606f0f81c3e68cc37139b8bda
refs/heads/wip-3.0
2021-01-18T00:00:39.486664
2015-02-25T05:34:29
2015-02-25T05:34:29
31,339,199
0
0
null
2015-02-25T22:29:51
2015-02-25T22:29:51
null
UTF-8
Java
false
false
1,765
java
/* * Copyright (c) 2007-2014 Concurrent, Inc. All Rights Reserved. * * Project and contact information: http://www.cascading.org/ * * This file is part of the Cascading 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 cascading.cascade; import cascading.CascadingException; /** Class CascadeException is thrown by the {@link Cascade} class. */ public class CascadeException extends CascadingException { /** Constructor CascadeException creates a new CascadeException instance. */ public CascadeException() { } /** * Constructor CascadeException creates a new CascadeException instance. * * @param string of type String */ public CascadeException( String string ) { super( string ); } /** * Constructor CascadeException creates a new CascadeException instance. * * @param string of type String * @param throwable of type Throwable */ public CascadeException( String string, Throwable throwable ) { super( string, throwable ); } /** * Constructor CascadeException creates a new CascadeException instance. * * @param throwable of type Throwable */ public CascadeException( Throwable throwable ) { super( throwable ); } }
[ "chris@wensel.net" ]
chris@wensel.net
ad96bcb5f1dc8329c33083a7464e402eef8fe4aa
01d6b951ce24b3d2c89b1ffa18fd79aaa9c4599c
/src/com/google/android/gms/wallet/FullWalletRequest$Builder.java
0502a3696cb60175f7dc8b1d8d10def416babf23
[]
no_license
mohsenuss91/KGBANDROID
1a5cc246bf17b85dae4733c10a48cc2c34f978fd
a2906e3de617b66c5927a4d1fd85f6a3c6ed89d0
refs/heads/master
2016-09-03T06:45:38.912322
2015-03-08T12:03:35
2015-03-08T12:03:35
31,847,141
0
0
null
null
null
null
UTF-8
Java
false
false
990
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.google.android.gms.wallet; // Referenced classes of package com.google.android.gms.wallet: // FullWalletRequest, Cart public final class <init> { final FullWalletRequest aiY; public final FullWalletRequest build() { return aiY; } public final aiY setCart(Cart cart) { aiY.aiX = cart; return this; } public final aiY setGoogleTransactionId(String s) { aiY.aiN = s; return this; } public final aiY setMerchantTransactionId(String s) { aiY.aiO = s; return this; } private (FullWalletRequest fullwalletrequest) { aiY = fullwalletrequest; super(); } aiY(FullWalletRequest fullwalletrequest, aiY aiy) { this(fullwalletrequest); } }
[ "mohsenuss91@hotmail.com" ]
mohsenuss91@hotmail.com
eb034bbc89e3a58f1a8e99d3b0f4a210c15e3256
9284056ad504e81646f207a94f9c30e59398111e
/fkPos/src/main/java/com/yufupos/system/common/utils/ObjectUtils.java
53ad4201cb3b97d93f307d1ac2aae750c397b4a7
[]
no_license
ice24for/learnCode
9e3fd6fe5d5c19799b5010e690dc28fa676b9fd5
46baa3c97253127852b3b044f48c4c95b24c0c61
refs/heads/master
2023-07-24T10:03:13.820723
2019-09-30T02:09:02
2019-09-30T02:09:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,187
java
/** * Copyright &copy; 2015 All rights reserved. */ package com.yufupos.system.common.utils; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.lang.reflect.Method; import org.apache.commons.lang3.StringUtils; /** * 对象操作工具类, 继承org.apache.commons.lang3.ObjectUtils类 * @author king * @version 2014-6-29 */ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils { /** * 注解到对象复制,只复制能匹配上的方法。 * @param annotation * @param object */ public static void annotationToObject(Object annotation, Object object){ if (annotation != null){ Class<?> annotationClass = annotation.getClass(); Class<?> objectClass = object.getClass(); for (Method m : objectClass.getMethods()){ if (StringUtils.startsWith(m.getName(), "set")){ try { String s = StringUtils.uncapitalize(StringUtils.substring(m.getName(), 3)); Object obj = annotationClass.getMethod(s).invoke(annotation); if (obj != null && !"".equals(obj.toString())){ if (object == null){ object = objectClass.newInstance(); } m.invoke(object, obj); } } catch (Exception e) { // 忽略所有设置失败方法 } } } } } /** * 序列化对象 * @param object * @return */ public static byte[] serialize(Object object) { ObjectOutputStream oos = null; ByteArrayOutputStream baos = null; try { if (object != null){ baos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(baos); oos.writeObject(object); return baos.toByteArray(); } } catch (Exception e) { e.printStackTrace(); } return null; } /** * 反序列化对象 * @param bytes * @return */ public static Object unserialize(byte[] bytes) { ByteArrayInputStream bais = null; try { if (bytes != null && bytes.length > 0){ bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); return ois.readObject(); } } catch (Exception e) { e.printStackTrace(); } return null; } }
[ "guolonglong80@163.com" ]
guolonglong80@163.com
781a44ed2a80fd74fff66fd6d617bdc0032fd75c
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.27.0/sources/com/iqoption/fragment/rightpanel/-$$Lambda$MultiRightPanelDelegate$JGBWYnuGX1tNdIilNnN75VWvEL8.java
3b58933f0f23a99d86abc281b4eb824b09858cca
[]
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
724
java
package com.iqoption.fragment.rightpanel; import com.iqoption.app.managers.tab.TabHelper; import com.iqoption.fragment.rightpanel.a.d.a; /* compiled from: lambda */ public final /* synthetic */ class -$$Lambda$MultiRightPanelDelegate$JGBWYnuGX1tNdIilNnN75VWvEL8 implements a { public static final /* synthetic */ -$$Lambda$MultiRightPanelDelegate$JGBWYnuGX1tNdIilNnN75VWvEL8 INSTANCE = new -$$Lambda$MultiRightPanelDelegate$JGBWYnuGX1tNdIilNnN75VWvEL8(); private /* synthetic */ -$$Lambda$MultiRightPanelDelegate$JGBWYnuGX1tNdIilNnN75VWvEL8() { } public final void onItemClick(com.iqoption.core.microservices.tradingengine.response.active.a aVar) { TabHelper.IM().ec(aVar.getActiveId()); } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
83d0daebe41a0e43e85f9877d1c88da903f32acd
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/p005cm/aptoide/p006pt/home/HomeBundlesModel.java
a6ae2fe76b0306527da9d4aebc40b29c73ecc95d
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
3,098
java
package p005cm.aptoide.p006pt.home; import java.util.Collections; import java.util.List; import org.jacoco.agent.p025rt.internal_8ff85ea.Offline; /* renamed from: cm.aptoide.pt.home.HomeBundlesModel */ public class HomeBundlesModel { private static transient /* synthetic */ boolean[] $jacocoData; private final Error error; private final List<HomeBundle> list; private final boolean loading; private final int offset; /* renamed from: cm.aptoide.pt.home.HomeBundlesModel$Error */ public enum Error { NETWORK, GENERIC; static { boolean[] $jacocoInit; $jacocoInit[3] = true; } } private static /* synthetic */ boolean[] $jacocoInit() { boolean[] zArr = $jacocoData; if (zArr != null) { return zArr; } boolean[] probes = Offline.getProbes(7034766764869575522L, "cm/aptoide/pt/home/HomeBundlesModel", 13); $jacocoData = probes; return probes; } public HomeBundlesModel(Error error2) { boolean[] $jacocoInit = $jacocoInit(); this.error = error2; this.loading = false; $jacocoInit[0] = true; this.list = Collections.emptyList(); this.offset = -1; $jacocoInit[1] = true; } public HomeBundlesModel(List<HomeBundle> list2, boolean loading2, int offset2) { boolean[] $jacocoInit = $jacocoInit(); this.list = list2; this.loading = loading2; this.offset = offset2; this.error = null; $jacocoInit[2] = true; } public HomeBundlesModel(boolean loading2) { boolean[] $jacocoInit = $jacocoInit(); this.loading = loading2; $jacocoInit[3] = true; this.list = Collections.emptyList(); this.error = null; this.offset = -1; $jacocoInit[4] = true; } public int getOffset() { boolean[] $jacocoInit = $jacocoInit(); int i = this.offset; $jacocoInit[5] = true; return i; } public List<HomeBundle> getList() { boolean[] $jacocoInit = $jacocoInit(); List<HomeBundle> list2 = this.list; $jacocoInit[6] = true; return list2; } public boolean isLoading() { boolean[] $jacocoInit = $jacocoInit(); boolean z = this.loading; $jacocoInit[7] = true; return z; } public Error getError() { boolean[] $jacocoInit = $jacocoInit(); Error error2 = this.error; $jacocoInit[8] = true; return error2; } public boolean hasErrors() { boolean z; boolean[] $jacocoInit = $jacocoInit(); if (this.error != null) { $jacocoInit[9] = true; z = true; } else { z = false; $jacocoInit[10] = true; } $jacocoInit[11] = true; return z; } public boolean isListEmpty() { boolean[] $jacocoInit = $jacocoInit(); boolean isEmpty = this.list.isEmpty(); $jacocoInit[12] = true; return isEmpty; } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
dea61ebd5202b39a755bd4e13896115c48f45d2d
449cff34c3a3ad2be71c5260fb333859d58d2e86
/open-metadata-implementation/access-services/data-privacy/data-privacy-api/src/main/java/org/odpi/openmetadata/accessservices/dataprivacy/responses/DataPrivacyOMASAPIResponse.java
0db0688828e93aeb35a02801db0093ccb8b05375
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
cong78/egeria
9f93733360cbfb085a1e5c69616d6646d5139b4f
686762a9bb8ea8969a6d65329b26388e6ee13558
refs/heads/master
2021-07-25T03:43:32.014784
2020-08-05T06:23:01
2020-08-05T06:23:01
170,706,355
1
0
Apache-2.0
2019-02-14T14:42:43
2019-02-14T14:42:43
null
UTF-8
Java
false
false
2,174
java
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.dataprivacy.responses; import com.fasterxml.jackson.annotation.*; import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** * DataPrivacyOMASAPIResponse provides a common header for Data Privacy OMAS managed rest to its REST API. * It manages information about exceptions. If no exception has been raised exceptionClassName is null. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "class") @JsonSubTypes( { }) public abstract class DataPrivacyOMASAPIResponse extends FFDCResponseBase { private static final long serialVersionUID = 1L; /** * Default constructor */ public DataPrivacyOMASAPIResponse() { } /** * Copy/clone constructor * * @param template object to copy */ public DataPrivacyOMASAPIResponse(DataPrivacyOMASAPIResponse template) { super(template); } /** * JSON-like toString * * @return string containing the property names and values */ @Override public String toString() { return "DataPrivacyOMASAPIResponse{" + "relatedHTTPCode=" + getRelatedHTTPCode() + ", exceptionClassName='" + getExceptionClassName() + '\'' + ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + ", exceptionUserAction='" + getExceptionUserAction() + '\'' + ", exceptionProperties=" + getExceptionProperties() + '}'; } }
[ "mandy_chessell@uk.ibm.com" ]
mandy_chessell@uk.ibm.com
fe1de2139531c0726e7fbf1c8fbaf950dc2aec09
e96172bcad99d9fddaa00c25d00a319716c9ca3a
/plugin/src/test/java_/com/intellij/lang/java/parser/CommonJavaParsingTest.java
eee9210f78384ef9d509ad9bd35a5f4893b94e8a
[ "Apache-2.0" ]
permissive
consulo/consulo-java
8c1633d485833651e2a9ecda43e27c3cbfa70a8a
a96757bc015eff692571285c0a10a140c8c721f8
refs/heads/master
2023-09-03T12:33:23.746878
2023-08-29T07:26:25
2023-08-29T07:26:25
13,799,330
5
4
Apache-2.0
2023-01-03T08:32:23
2013-10-23T09:56:39
Java
UTF-8
Java
false
false
1,115
java
/* * Copyright 2000-2010 JetBrains s.r.o. * * 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.intellij.lang.java.parser; public abstract class CommonJavaParsingTest extends JavaParsingTestCase{ public CommonJavaParsingTest() { super("parser-full/commonParsing"); } public void testSCR5202() { doTest(true); } public void testIncompleteCodeBlock() { doTest(true); } public void testImportListBug() { doTest(true); } public void testRefParamsAfterError() { doTest(true); } public void testUnclosedComment() { doTest(true); } public void testIncompleteFor() { doTest(true); } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
9a2aa578dd134d1fb227caf628a769aa74347981
5120b826c0b659cc609e7cecdf9718aba243dfb0
/b2b_acc/hybris/bin/platform/bootstrap/gensrc/de/hybris/platform/ticket/enums/CsResolutionType.java
0343d0e5da81560af0934443a76fb228ac7a6d37
[]
no_license
miztli/hybris
8447c85555676742b524aee901a5f559189a469a
ff84a5089a0d99899672e60c3a60436ab8bf7554
refs/heads/master
2022-10-26T07:21:44.657487
2019-05-28T20:30:10
2019-05-28T20:30:10
186,463,896
1
0
null
2022-09-16T18:38:27
2019-05-13T17:13:05
Java
UTF-8
Java
false
false
4,212
java
/* * * [y] hybris Platform * Copyright (c) 2019 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.ticket.enums; import de.hybris.platform.core.HybrisEnumValue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; /** * Generated enum CsResolutionType declared at extension ticketsystem. */ @SuppressWarnings("PMD") public class CsResolutionType implements HybrisEnumValue { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "CsResolutionType"; /**<i>Generated simple class name constant.</i>*/ public final static String SIMPLE_CLASSNAME = "CsResolutionType"; private static final ConcurrentMap<String, CsResolutionType> cache = new ConcurrentHashMap<String, CsResolutionType>(); /** * Generated enum value for CsResolutionType.Closed declared at extension ticketsystem. */ public static final CsResolutionType CLOSED = valueOf("Closed"); /** * Generated enum value for CsResolutionType.ClosedDuplicate declared at extension ticketsystem. */ public static final CsResolutionType CLOSEDDUPLICATE = valueOf("ClosedDuplicate"); /** The code of this enum.*/ private final String code; private final String codeLowerCase; private static final long serialVersionUID = 0L; /** * Creates a new enum value for this enum type. * * @param code the enum value code */ private CsResolutionType(final String code) { this.code = code.intern(); this.codeLowerCase = this.code.toLowerCase().intern(); } /** * Compares this object to the specified object. The result is <code>true</code> * if and only if the argument is not <code>null</code> and is an <code>CsResolutionType * </code> object that contains the enum value <code>code</code> as this object. * * @param obj the object to compare with. * @return <code>true</code> if the objects are the same; * <code>false</code> otherwise. */ @Override public boolean equals(final Object obj) { try { final HybrisEnumValue enum2 = (HybrisEnumValue) obj; return this == enum2 || (enum2 != null && !this.getClass().isEnum() && !enum2.getClass().isEnum() && this.getType().equalsIgnoreCase(enum2.getType()) && this.getCode().equalsIgnoreCase(enum2.getCode())); } catch (final ClassCastException e) { return false; } } /** * Gets the code of this enum value. * * @return code of value */ @Override public String getCode() { return this.code; } /** * Gets the type this enum value belongs to. * * @return code of type */ @Override public String getType() { return SIMPLE_CLASSNAME; } /** * Returns a hash code for this <code>CsResolutionType</code>. * * @return a hash code value for this object, equal to the enum value <code>code</code> * represented by this <code>CsResolutionType</code> object. */ @Override public int hashCode() { return this.codeLowerCase.hashCode(); } /** * Returns the code representing this enum value. * * @return a string representation of the value of this object. */ @Override public String toString() { return this.code.toString(); } /** * Returns a <tt>CsResolutionType</tt> instance representing the specified enum value. * * @param code an enum value * @return a <tt>CsResolutionType</tt> instance representing <tt>value</tt>. */ public static CsResolutionType valueOf(final String code) { final String key = code.toLowerCase(); CsResolutionType result = cache.get(key); if (result == null) { CsResolutionType newValue = new CsResolutionType(code); CsResolutionType previous = cache.putIfAbsent(key, newValue); result = previous != null ? previous : newValue; } return result; } private Object writeReplace() { return new de.hybris.bootstrap.typesystem.HybrisDynamicEnumValueSerializedForm(this.getClass(), getCode()); } }
[ "miztlimelgoza@miztlis-MacBook-Pro.local" ]
miztlimelgoza@miztlis-MacBook-Pro.local
ca82423815482d6b57a32e9ff1ff828ea7826cc0
642e90aa1c85330cee8bbe8660ca277655bc4f78
/gameserver/src/main/java/l2s/gameserver/network/l2/c2s/RequestHardWareInfo.java
9121663de6daedf33e5adf860116be8a660b1ef5
[]
no_license
BETAJIb/Studious
ac329f850d8c670d6e355ef68138c9e8fd525986
328e344c2eaa70238c403754566865e51629bd7b
refs/heads/master
2020-04-04T08:41:21.112223
2018-10-31T20:18:49
2018-10-31T20:18:49
155,790,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,276
java
package l2s.gameserver.network.l2.c2s; public class RequestHardWareInfo extends L2GameClientPacket { private String _mac; private String _cpu; private String _vgaName; private String _driverVersion; private int _windowsPlatformId; private int _windowsMajorVersion; private int _windowsMinorVersion; private int _windowsBuildNumber; private int _DXVersion; private int _DXRevision; private int _cpuSpeed; private int _cpuCoreCount; private int _unk8; private int _unk9; private int _PhysMemory1; private int _PhysMemory2; private int _unk12; private int _videoMemory; private int _unk14; private int _vgaVersion; @Override protected void readImpl() { _mac = readS(); _windowsPlatformId = readD(); _windowsMajorVersion = readD(); _windowsMinorVersion = readD(); _windowsBuildNumber = readD(); _DXVersion = readD(); _DXRevision = readD(); _cpu = readS(); _cpuSpeed = readD(); _cpuCoreCount = readD(); _unk8 = readD(); _unk9 = readD(); _PhysMemory1 = readD(); _PhysMemory2 = readD(); _unk12 = readD(); _videoMemory = readD(); _unk14 = readD(); _vgaVersion = readD(); _vgaName = readS(); _driverVersion = readS(); } @Override protected void runImpl() { } }
[ "gladiadorse@hotmail.com" ]
gladiadorse@hotmail.com
0aaa40815fd56ebcdc3c8653f6d0da2aba42c703
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/68/273.java
1a0c95f509dafb1dd8c0a3d959632a461f1137d2
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
713
java
package <missing>; public class GlobalMembers { public static int a(float b) { int i; int c = 1; int d; d = Math.sqrt(b); if (b == 3.0F || b == 5.0F || b == 7.0F) { return 1; } else { for (i = 3;i <= d;i += 2) { if ((int)(b) % i == 0) { c = 0; return 0; break; } } } return c; } public static int Main() { int n; int k; int l; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } for (l = 6;l <= n;l += 2) { for (k = 3;k <= (n / 2);k += 2) { if (a(k) + a(l - k) == 2) { System.out.printf("%d=%d+%d\n",l,k,l - k); break; } } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
062310006de920b174ee43da209c8242b8c7cca2
a89d3142a9e9a346aff19ff4ca79f0ce9a3d6e2f
/javasrc/edu/brown/cs/dyvise/dylock/DylockCheckerBase.java
18b75f1c9f0021775592f257ae6eb71716908777
[]
no_license
StevenReiss/dyvise
cc95299c43d9ec611b196ac1415f121b1565a3f7
03fe0f7552f76b18643cc789dacd88cc9952fc0f
refs/heads/master
2023-01-08T10:51:44.426980
2020-10-30T18:34:28
2020-10-30T18:34:28
308,009,727
0
0
null
null
null
null
UTF-8
Java
false
false
3,937
java
/********************************************************************************/ /* */ /* DylockCheckerBase.java */ /* */ /* DYVISE lock analysis generic checker */ /* */ /********************************************************************************/ /* Copyright 2009 Brown University -- Steven P. Reiss */ /********************************************************************************* * Copyright 2009, Brown University, Providence, RI. * * * * All Rights Reserved * * * * Permission to use, copy, modify, and distribute this software and its * * documentation for any purpose other than its incorporation into a * * commercial product is hereby granted without fee, provided that the * * above copyright notice appear in all copies and that both that * * copyright notice and this permission notice appear in supporting * * documentation, and that the name of Brown University not be used in * * advertising or publicity pertaining to distribution of the software * * without specific, written prior permission. * * * * BROWN UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS * * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * * FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT SHALL BROWN UNIVERSITY * * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY * * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * * OF THIS SOFTWARE. * * * ********************************************************************************/ /* RCS: $Header: /pro/spr_cvs/pro/dyvise/javasrc/edu/brown/cs/dyvise/dylock/DylockCheckerBase.java,v 1.2 2012-10-05 00:52:40 spr Exp $ */ /********************************************************************************* * * $Log: DylockCheckerBase.java,v $ * Revision 1.2 2012-10-05 00:52:40 spr * Update lock analysis. Prepare for pattern display. * * Revision 1.1 2011-03-10 02:24:59 spr * New version of dylock to produce visualizations. * * ********************************************************************************/ package edu.brown.cs.dyvise.dylock; import java.util.*; abstract class DylockCheckerBase implements DylockConstants, DylockConstants.DylockChecker { /********************************************************************************/ /* */ /* Private Storage */ /* */ /********************************************************************************/ protected static int item_counter; /********************************************************************************/ /* */ /* Constructors */ /* */ /********************************************************************************/ protected DylockCheckerBase() { } /********************************************************************************/ /* */ /* Helper methods */ /* */ /********************************************************************************/ public static <T> Collection<Collection<T>> powerSet(Collection<T> original) { Collection<Collection<T>> sets = new HashSet<Collection<T>>(); if (original.isEmpty()) { sets.add(new HashSet<T>()); return sets; } List<T> list = new ArrayList<T>(original); T head = list.get(0); Collection<T> rest = new HashSet<T>(list.subList(1, list.size())); for (Collection<T> set : powerSet(rest)) { Collection<T> newSet = new HashSet<T>(); newSet.add(head); newSet.addAll(set); sets.add(newSet); sets.add(set); } return sets; } } // end of abstract class DylockCheckerBase /* end of DylockCheckerBase.java */
[ "spr@cs.brown.edu" ]
spr@cs.brown.edu
b9b838f8654a277ff8a287593259e153f4cc3ca8
a97e2dd1db795e89094ba4541ea9bd36bf9e0293
/src/main/java/lwjar/build/BuildCommand.java
c6c4464b7966cf4f32c22034fb28f64749ae5bbe
[ "MIT" ]
permissive
opengl-8080/lightweight-jar
820ab0cf79b44c27424fc9d67b2e4242d2fe976f
dc36f643f8001b359ba67ab54217ecb088c8e7a1
refs/heads/master
2021-01-20T01:50:09.186107
2017-11-23T07:57:49
2017-11-23T07:57:49
101,301,757
0
0
null
null
null
null
UTF-8
Java
false
false
2,118
java
package lwjar.build; import lwjar.cli.Command; import lwjar.OutputDirectory; import lwjar.packaging.ApplicationMainClass; import lwjar.packaging.JarName; import lwjar.packaging.PackageCommand; import lwjar.packaging.SourceDirectory; import lwjar.precompile.ApplicationSourceDirectory; import lwjar.precompile.JavaSourceCompressor; import lwjar.precompile.LibraryClassDirectory; import lwjar.precompile.LibrarySourceDirectory; import lwjar.precompile.PreCompileCommand; import lwjar.primitive.Directory; import java.io.IOException; public class BuildCommand implements Command { private final PreCompileCommand preCompileCommand; private final PackageCommand packageCommand; public BuildCommand( LibrarySourceDirectory librarySourceDirectory, LibraryClassDirectory libraryClassDirectory, ApplicationSourceDirectory applicationSourceDirectory, ApplicationMainClass applicationMainClass, JarName jarName, OutputDirectory outputDirectory, JavaSourceCompressor.CompressLevel compressLevel, Integer retryCount, boolean springBoot ) { this.preCompileCommand = new PreCompileCommand( librarySourceDirectory, libraryClassDirectory, applicationSourceDirectory, outputDirectory, compressLevel, retryCount ); Directory preCompiledDirectory = this.preCompileCommand.getPreCompiledDirectory(); SourceDirectory sourceDirectory = new SourceDirectory(preCompiledDirectory); this.packageCommand = new PackageCommand( sourceDirectory, applicationMainClass, outputDirectory, jarName, springBoot ); } @Override public void execute() throws IOException { System.out.println("executing pre-compile command..."); this.preCompileCommand.execute(); System.out.println("executing package command..."); this.packageCommand.execute(); } }
[ "tomcat.port.8080+github@gmail.com" ]
tomcat.port.8080+github@gmail.com
63cfc324d8037c3e0fed802db1732bf235e3ba98
99301b78bc64f328d55db05c4e6ca638fd3fa83c
/app/src/main/java/com/example/oluwaseun/ajo/activities/yoruba/DashboardYorActivity.java
bd06afa38ed80e117fb82570a85526c8183bdb16
[]
no_license
yoluwa/Ajo
b530081da00795574e01926b18491abbf25fd381
a197602b9d6c36740331bac3942ec88ca27e33aa
refs/heads/master
2021-05-08T01:39:54.992135
2018-03-10T20:31:37
2018-03-10T20:31:37
107,888,501
1
0
null
null
null
null
UTF-8
Java
false
false
3,482
java
package com.example.oluwaseun.ajo.activities.yoruba; import android.os.Bundle; import android.support.design.widget.NavigationView; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import com.example.oluwaseun.ajo.R; import com.example.oluwaseun.ajo.activities.AbstractActivity; public class DashboardYorActivity extends AbstractActivity implements NavigationView.OnNavigationItemSelectedListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dashboard_yor); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); // FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); // fab.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View view) { // Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) // .setAction("Action", null).show(); // } // }); DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); drawer.setDrawerListener(toggle); toggle.syncState(); NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setNavigationItemSelectedListener(this); } @Override public void onBackPressed() { DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); if (drawer.isDrawerOpen(GravityCompat.START)) { drawer.closeDrawer(GravityCompat.START); } else { super.onBackPressed(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.dashboard_yor, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } @SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { // Handle navigation view item clicks here. int id = item.getItemId(); if (id == R.id.nav_camera) { // Handle the camera action } else if (id == R.id.nav_gallery) { } else if (id == R.id.nav_slideshow) { } else if (id == R.id.nav_manage) { } else if (id == R.id.nav_share) { } else if (id == R.id.nav_send) { } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; } }
[ "=" ]
=
198300cd068a1467adf3d8066ebd1e4500774486
838bafea637f952bcec9430a0e7d67fd34bd4591
/org/jfree/base/config/PropertyFileConfiguration.java
b59a3bc68bf4a1af723bea8af5e3c783746403be
[ "MIT" ]
permissive
ivanshen/Who-Are-You-Really
df6fd40e37f8ab16f9133844cebd6b2545cc56a6
25e5bebe691d7c33fe34515a0c99570b03746a77
refs/heads/master
2021-01-10T10:27:32.536878
2015-11-18T17:27:25
2015-11-18T17:27:25
46,398,399
0
0
null
null
null
null
UTF-8
Java
false
false
1,370
java
package org.jfree.base.config; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import org.jfree.util.Log; import org.jfree.util.ObjectUtilities; public class PropertyFileConfiguration extends HierarchicalConfiguration { public void load(String resourceName) { load(resourceName, PropertyFileConfiguration.class); } public void load(String resourceName, Class resourceSource) { InputStream in = ObjectUtilities.getResourceRelativeAsStream(resourceName, resourceSource); if (in != null) { try { load(in); } finally { try { in.close(); } catch (IOException e) { } } } else { Log.debug("Configuration file not found in the classpath: " + resourceName); } } public void load(InputStream in) { if (in == null) { throw new NullPointerException(); } try { BufferedInputStream bin = new BufferedInputStream(in); Properties p = new Properties(); p.load(bin); getConfiguration().putAll(p); bin.close(); } catch (IOException ioe) { Log.warn("Unable to read configuration", ioe); } } }
[ "iwshen11@gmail.com" ]
iwshen11@gmail.com
953bf46764522d8c99591ec625a8e110f77bc408
5b82e2f7c720c49dff236970aacd610e7c41a077
/QueryReformulation-master 2/data/processed/SkeletonViewerFilter.java
f4354dacf93359bb74e3f51e966f978293022a6f
[]
no_license
shy942/EGITrepoOnlineVersion
4b157da0f76dc5bbf179437242d2224d782dd267
f88fb20497dcc30ff1add5fe359cbca772142b09
refs/heads/master
2021-01-20T16:04:23.509863
2016-07-21T20:43:22
2016-07-21T20:43:22
63,737,385
0
0
null
null
null
null
UTF-8
Java
false
false
635
java
/***/ package org.eclipse.ui.internal.navigator.filters; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; /** * * A no-op viewer filter used to prevent null return values from * {@link CommonFilterDescriptor#createFilter()}. * * @since 3.2 * */ public class SkeletonViewerFilter extends ViewerFilter { /** * The singleton instance. */ public static final SkeletonViewerFilter INSTANCE = new SkeletonViewerFilter(); private SkeletonViewerFilter() { } @Override public boolean select(Viewer viewer, Object parentElement, Object element) { return true; } }
[ "muktacseku@gmail.com" ]
muktacseku@gmail.com
58b3b81878203d9a69d8c87eb8854eccac13fe16
8427df5698cfee9139c8bedc4a70cdcc6ff3e9ca
/music-player-lib/src/main/java/com/music/player/lib/model/SQLSearchHelper.java
2b65762e0ba307f57d95d93175a2aa20c2188cdd
[]
no_license
flyfire/iMusic
f021da582a3192b493f617f9e3cc878650ce8613
edb3e286880b313e49d956738f7a901b2174641e
refs/heads/master
2023-06-20T10:11:30.474778
2021-07-12T09:27:46
2021-07-12T09:27:46
384,697,457
0
0
null
2021-07-10T12:53:52
2021-07-10T12:53:51
null
UTF-8
Java
false
false
1,199
java
package com.music.player.lib.model; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import com.music.player.lib.util.Logger; /** * hty_Yuye@Outlook.com * 2019/5/21 * Search SQL */ public class SQLSearchHelper extends SQLiteOpenHelper { private static final String TAG = "SQLSearchHelper"; //数据库名 public static final String DB_NAME="imusic_search.db"; //表名 public static final String TABLE_NAME = "search"; //创建数据库,key不能为空,不能重复 private static final String CREATE_TABLE ="create table "+TABLE_NAME+"(" + "id integer primary key autoincrement," + "key varchar(255) not null unique," + "addtime integer" + ");"; public SQLSearchHelper(Context context) { super(context, DB_NAME, null, 1); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(CREATE_TABLE); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Logger.d(TAG,"onUpgrade-->,oldVersion:"+oldVersion+",newVersion:"+newVersion); } }
[ "584312311@qq.com" ]
584312311@qq.com
189ba9d641f8999a3b67960d241a7059b0c2bc20
97b46ff38b675d934948ff3731cf1607a1cc0fc9
/Server/java/pk/elfo/gameserver/taskmanager/DecayTaskManager.java
f0256f56adbe7cef44f8505a122a7cd9a649bacb
[]
no_license
l2brutal/pk-elfo_H5
a6703d734111e687ad2f1b2ebae769e071a911a4
766fa2a92cb3dcde5da6e68a7f3d41603b9c037e
refs/heads/master
2020-12-28T13:33:46.142303
2016-01-20T09:53:10
2016-01-20T09:53:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,409
java
package pk.elfo.gameserver.taskmanager; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.logging.Level; import java.util.logging.Logger; import pk.elfo.Config; import pk.elfo.gameserver.ThreadPoolManager; import pk.elfo.gameserver.model.actor.L2Attackable; import pk.elfo.gameserver.model.actor.L2Character; import javolution.util.FastMap; public class DecayTaskManager { protected static final Logger _log = Logger.getLogger(DecayTaskManager.class.getName()); protected final Map<L2Character, Long> _decayTasks = new FastMap<L2Character, Long>().shared(); protected DecayTaskManager() { ThreadPoolManager.getInstance().scheduleAiAtFixedRate(new DecayScheduler(), 10000, Config.DECAY_TIME_TASK); } public static DecayTaskManager getInstance() { return SingletonHolder._instance; } public void addDecayTask(L2Character actor) { addDecayTask(actor, 0); } public void addDecayTask(L2Character actor, int interval) { _decayTasks.put(actor, System.currentTimeMillis() + interval); } public void cancelDecayTask(L2Character actor) { _decayTasks.remove(actor); } protected class DecayScheduler implements Runnable { @Override public void run() { final long current = System.currentTimeMillis(); try { final Iterator<Entry<L2Character, Long>> it = _decayTasks.entrySet().iterator(); Entry<L2Character, Long> e; L2Character actor; Long next; int delay; while (it.hasNext()) { e = it.next(); actor = e.getKey(); next = e.getValue(); if ((actor == null) || (next == null)) { continue; } if (actor.isRaid() && !actor.isRaidMinion()) { delay = Config.RAID_BOSS_DECAY_TIME; } else if ((actor instanceof L2Attackable) && (((L2Attackable) actor).isSpoil() || ((L2Attackable) actor).isSeeded())) { delay = Config.SPOILED_DECAY_TIME; } else { delay = Config.NPC_DECAY_TIME; } if ((current - next) > delay) { actor.onDecay(); it.remove(); } } } catch (Exception e) { // TODO: Find out the reason for exception. Unless caught here, mob decay would stop. _log.log(Level.WARNING, "Error in DecayScheduler: " + e.getMessage(), e); } } } @Override public String toString() { StringBuilder ret = new StringBuilder(); ret.append("============= DecayTask Manager Report ============"); ret.append(Config.EOL); ret.append("Tasks count: "); ret.append(_decayTasks.size()); ret.append(Config.EOL); ret.append("Tasks dump:"); ret.append(Config.EOL); Long current = System.currentTimeMillis(); for (L2Character actor : _decayTasks.keySet()) { ret.append("Class/Name: "); ret.append(actor.getClass().getSimpleName()); ret.append('/'); ret.append(actor.getName()); ret.append(" decay timer: "); ret.append(current - _decayTasks.get(actor)); ret.append(Config.EOL); } return ret.toString(); } /** * <u><b><font color="FF0000">Read only</font></b></u> * @return */ public Map<L2Character, Long> getTasks() { return _decayTasks; } private static class SingletonHolder { protected static final DecayTaskManager _instance = new DecayTaskManager(); } }
[ "PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba" ]
PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba
93462ab9f3e4f55ef2944d16dff1ca42e3ebc438
30e2cb0f82d70cab392f70518c16067705c752eb
/src/test/java/outcomes/timeout/WrongAnswerAndInfiniteLoop.java
8b58295424fa8e5d37c690169d776f8e9056c410
[]
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
1,779
java
package outcomes.timeout; import org.hyperskill.hstest.dynamic.input.DynamicTestingMethod; import org.hyperskill.hstest.testcase.CheckResult; import org.hyperskill.hstest.testing.TestedProgram; import outcomes.base.ContainsMessage; import outcomes.base.UserErrorTest; import java.util.Scanner; class WrongAnswerAndInfiniteLoopMain { public static void main(String[] args) { Scanner s = new Scanner(System.in); while (true) { s.nextLine(); } } } public class WrongAnswerAndInfiniteLoop extends UserErrorTest { @ContainsMessage String m = "Wrong answer in test #1\n" + "\n" + "Test tried all the possible numbers but didn't guess the number\n" + "\n" + "Please find below the output of your program during this failed test.\n" + "Note that the '>' character indicates the beginning of the input line.\n" + "\n" + "---\n" + "\n" + "> 0\n" + "> 1\n" + "> 2\n" + "> 3\n" + "> 4\n" + "> 5\n" + "> 6\n" + "> 7\n" + "> 8\n" + "> 9"; @DynamicTestingMethod CheckResult test() { TestedProgram main = new TestedProgram( WrongAnswerAndInfiniteLoopMain.class); main.start(); int tries = 0; while (true) { String output = main.execute("" + tries); if (output.contains("you guessed")) { break; } tries++; if (tries == 10) { return CheckResult.wrong( "Test tried all the possible numbers but " + "didn't guess the number"); } } return CheckResult.correct(); } }
[ "aaaaaa2493@yandex.ru" ]
aaaaaa2493@yandex.ru
a19d9789979d6880c200338f2d53b6d3d779e494
6f23739a70a7d97d385504f6e2df034c06cd044f
/src/mil/navy/nrl/cmf/sousa/directory/ConsumerViewInterpreter.java
fe723f054faf8628b5039ba3e56850af379ac6fa
[]
no_license
grouptheory/Sousa
6118bd46962cc71e18c3e9db88603a386bf1e528
275e695d7373792a10241e14e1433cc66f830126
refs/heads/master
2020-03-16T23:17:15.141462
2018-05-11T17:57:32
2018-05-11T17:57:32
133,071,824
0
0
null
null
null
null
UTF-8
Java
false
false
7,602
java
// File: ConsumerViewInterpreter.java package mil.navy.nrl.cmf.sousa.directory; import java.io.Serializable; import java.util.Map.Entry; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import mil.navy.nrl.cmf.sousa.Field; import mil.navy.nrl.cmf.sousa.State; import mil.navy.nrl.cmf.sousa.ViewInterpreter; import mil.navy.nrl.cmf.sousa.spatiotemporal.QueryFields; import mil.navy.nrl.cmf.sousa.util.Strings; import org.apache.log4j.Logger; /** This view interpreter listens to the DIRECTORY field of the AuthoritativeState. It projects the ADDED and REMOVED fields. <P> Inputs from State: <UL> <LI>{@link DirectoryFields#DIRECTORY_FIELDNAME} is a Map with {@link mil.navy.nrl.cmf.sousa.ServerContact} as keys and String as values. The String is a human-readable description of the information offered by advertiser. </UL> <P> Outputs to clients: <UL> <LI>{@link DirectoryFields#ADDED} is a Map:ServerContact-->String as described above. <LI>{@link DirectoryFields#REMOVED} is a Map:ServerContact-->String as described above. </UL> */ public class ConsumerViewInterpreter extends ViewInterpreter { protected static final Logger _LOG = Logger.getLogger(ConsumerViewInterpreter.class); /** Cached copy of the authoritative State's {@link DirectoryFields#DIRECTORY_FIELDNAME}. */ private final HashMap _directory = new HashMap(); /** Class constructor that uses a State. This ConsumerViewInterpreter watches the <CODE>Field</CODE> {@link DirectoryFields#DIRECTORY_FIELDNAME} in <CODE>s</CODE>. It outputs two fields: {@link DirectoryFields#ADDED} and {@link DirectoryFields#REMOVED}. <P> It complains if DIRECTORY_FIELDNAME is not a member of <CODE>s</CODE>. <P> <EM>BUG: Does not throw an exception (such as NoSuchFieldException) if <CODE>s</CODE> has no <CODE>Field</CODE> named {@link DirectoryFields#DIRECTORY_FIELDNAME}. Throwing an Exception has consequences for the {@link mil.navy.nrl.cmf.sousa.Projector} and for the other {@link mil.navy.nrl.cmf.sousa.ViewInterpreter} classes.</EM> */ public ConsumerViewInterpreter(State s) { super(s); HashSet fields = new HashSet(); // Only these Fields of s are of interest. fields.add(DirectoryFields.DIRECTORY_FIELDNAME); // Tell s the names of its Fields that are of interest to us. // s notifies us whenever one of them changes. s.attachFieldListener(fields, this); try { _directory.putAll((Map)s.getField(DirectoryFields.DIRECTORY_FIELDNAME)); } catch (NoSuchFieldException ex) { _LOG.error(new Strings(new Object[] { "ConsumerViewInterpreter(", s, "): ", ex})); } } // ViewInterpreter /** A <CODE>ConsumerViewInterpreter</CODE> is dirty if and only if one of the <CODE>Fields</CODE> it watches is dirty. */ public boolean isDirty(State parameters){ return isDirty(); } /** Ensures that there is a {@link mil.navy.nrl.cmf.sousa.Field.ChangeMessage} for {@link DirectoryFields#ADDED} and for {@link DirectoryFields#REMOVED} in the {@link mil.navy.nrl.cmf.sousa.State.ChangeMessage}. @param parameters the <CODE>Receptor</CODE> state that parameterizes the query @return a <CODE>State.ChangeMessage</CODE> that contains <CODE>Field.ChangeMessages</CODE> for <CODE>ADDED</CODE> and <CODE>REMOVED</CODE>. */ protected State.ChangeMessage getCurrentFieldValues(State parameters) { // // super.getCurrentFieldValues() invokes interpret(). // this.getCurrentFieldValues() must Fill in the Fields that // interpret() doesn't provide. // // If changes is missing a field (i.e ADDED or REMOVED), we // will add that field to it. In addition, we will copy the // value of the authoritative State's DIRECTORY field into the // Field.ChangeMessage for ADDED. // State.ChangeMessage changes = super.getCurrentFieldValues(parameters); Field.ChangeMessage added = null; Field.ChangeMessage removed = null; List fieldChangeMessages = changes.getMessages(); for (Iterator i = fieldChangeMessages.iterator(); i.hasNext(); ) { Field.ChangeMessage fieldChange = (Field.ChangeMessage)i.next(); if (fieldChange._fname.equals(DirectoryFields.ADDED)) { added = fieldChange; } if (fieldChange._fname.equals(DirectoryFields.REMOVED)) { removed = fieldChange; } } if (null == added) { added = new Field.ChangeMessage(DirectoryFields.ADDED, (Serializable)new HashMap()); changes.addFieldChangeMessage(added); } try { Map directory = (Map)getField(DirectoryFields.DIRECTORY_FIELDNAME); Map add = (Map)added._value; add.putAll(directory); } catch (NoSuchFieldException ex) { // Can't happen? Shouldn't happen! _LOG.error(new Strings(new Object[] { "getCurrentFieldValues(", parameters, "): ", ex})); } if (null == removed) { removed = new Field.ChangeMessage(DirectoryFields.REMOVED, (Serializable)new HashMap()); changes.addFieldChangeMessage(removed); } return changes; } /** Places new directory entries into {@link DirectoryFields#ADDED} and ADDED. Place the expired directory entries into {@link DirectoryFields#REMOVED}. <P> This implementation ignores parameters. */ protected State.ChangeMessage interpret(List fieldChanges, State parameters) { State.ChangeMessage answer = new State.ChangeMessage(); // Watch for and project changes in the DIRECTORY field // // There ought to be just one entry in fieldChanges. It must // be DirectoryFields.DIRECTORY_FIELDNAME. // for (Iterator i= fieldChanges.iterator(); i.hasNext(); ) { Field.ChangeMessage entityFCM = (Field.ChangeMessage)i.next(); _LOG.debug(new Strings(new Object[] { this, " interpret() ", entityFCM._fname, "=", entityFCM._value })); if (entityFCM._fname.equals(DirectoryFields.DIRECTORY_FIELDNAME)) { HashMap removed = new HashMap(); HashMap added = new HashMap(); calculateDifferences((HashMap)entityFCM._value, added, removed); _directory.putAll(added); for (Iterator j = removed.keySet().iterator(); j.hasNext(); ) { _directory.remove(j.next()); } if (added.size() > 0) answer.addFieldChangeMessage(new Field.ChangeMessage(DirectoryFields.ADDED, added)); if (removed.size() > 0) answer.addFieldChangeMessage(new Field.ChangeMessage(DirectoryFields.REMOVED, removed)); } } return answer; } /** Calculates the set difference between {@link #_directory} and <CODE>newValue</CODE>, copying the additions to <CODE>added</CODE> and the deletions to <CODE>removed</CODE>. @param newValue the current contents of the directory @param added the new directory entries @param removed the expired directory entries */ private void calculateDifferences(HashMap newValue, HashMap added, HashMap removed) { // Additions to _directory for (Iterator i = newValue.entrySet().iterator(); i.hasNext();) { Map.Entry e = (Map.Entry)i.next(); Object key = e.getKey(); if (! _directory.containsKey(key)) { Serializable value = (Serializable)e.getValue(); added.put(key, value); } } for (Iterator i = _directory.entrySet().iterator(); i.hasNext();) { Map.Entry e = (Map.Entry)i.next(); Object key = e.getKey(); if (! newValue.containsKey(key)) { Serializable value = (Serializable)e.getValue(); removed.put(key, value); } } } };
[ "grouptheory@gmail.com" ]
grouptheory@gmail.com
723edbeedbf9c827c66b2aa8e481b218b0934c24
94de1c7b93216dbc0fe43a0733d701b4e236da9c
/src/main/java/com/neodem/parkingLot/loader/impl/XMLFileLoader.java
7fa817bdbb820df9831c3d8129ce73c4479b6fb4
[]
no_license
neodem/parkingLot
71823f667cd86da17efd3e941ad6b043947ec9c4
be15b27994444596d3ed858106c82f06f3cadfe3
refs/heads/master
2021-01-01T15:40:34.731794
2013-04-06T18:32:31
2013-04-06T18:32:31
9,264,636
1
0
null
null
null
null
UTF-8
Java
false
false
2,519
java
package com.neodem.parkingLot.loader.impl; import java.io.File; import java.io.IOException; import nu.xom.Builder; import nu.xom.Document; import nu.xom.Element; import nu.xom.Elements; import nu.xom.ParsingException; import nu.xom.ValidityException; import com.neodem.parkingLot.model.setup.BoardBean; import com.neodem.parkingLot.model.setup.GameSet; import com.neodem.parkingLot.model.setup.SolutionBean; import com.neodem.parkingLot.model.setup.VehicleSetupBean; import com.neodem.parkingLot.file.Difficulty; public class XMLFileLoader { public static GameSet loadFile(File xmlFile) { Builder parser = new Builder(); Document doc = null; try { doc = parser.build(xmlFile); } catch (ValidityException e) { e.printStackTrace(); } catch (ParsingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return getBoards(doc); } private static GameSet getBoards(Document document) { GameSet set = new GameSet(); if (document != null) { Element root = document.getRootElement(); Elements children = root.getChildElements(); for (int i = 0; i < children.size(); i++) { Element board = children.get(i); String difficultyString = board.getAttributeValue("difficulty"); String idString = board.getAttributeValue("id"); Difficulty diff = Difficulty.getDifficulty(difficultyString); BoardBean bean = new BoardBean(idString, diff); Element setupElement = board.getFirstChildElement("setup"); Elements vehicles = setupElement.getChildElements(); for (int j = 0; j < vehicles.size(); j++) { Element vehicle = vehicles.get(j); String type = vehicle.getAttributeValue("type"); String id = vehicle.getAttributeValue("vehicleID"); String facing = vehicle.getAttributeValue("facing"); String start = vehicle.getAttributeValue("start"); bean.addVehicle(new VehicleSetupBean(type, id, facing, start)); } Element solutionElement = board.getFirstChildElement("solution"); Elements moves = solutionElement.getChildElements(); for (int j = 0; j < moves.size(); j++) { Element move = moves.get(j); String number = move.getAttributeValue("number"); String id = move.getAttributeValue("vehicleID"); String facing = move.getAttributeValue("direction"); String distance = move.getAttributeValue("distance"); bean.addSoution(new SolutionBean(number, id, facing, distance)); } set.addBoardBean(bean); } } return set; } }
[ "neodem@gmail.com" ]
neodem@gmail.com
45113a4f2e1356a95dd4156a96258116b8d7f3eb
b214f96566446763ce5679dd2121ea3d277a9406
/modules/base/build-ui-api/src/main/java/consulo/build/ui/process/BuildProcessHandler.java
62574c4f7bde828034ddea834dbec20b694c85f2
[ "Apache-2.0", "LicenseRef-scancode-jgraph" ]
permissive
consulo/consulo
aa340d719d05ac6cbadd3f7d1226cdb678e6c84f
d784f1ef5824b944c1ee3a24a8714edfc5e2b400
refs/heads/master
2023-09-06T06:55:04.987216
2023-09-01T06:42:16
2023-09-01T06:42:16
10,116,915
680
54
Apache-2.0
2023-06-05T18:28:51
2013-05-17T05:48:18
Java
UTF-8
Java
false
false
445
java
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package consulo.build.ui.process; import consulo.process.BaseProcessHandler; /** * @author Vladislav.Soroka */ public abstract class BuildProcessHandler extends BaseProcessHandler { public abstract String getExecutionName(); public void forceProcessDetach() { notifyProcessDetached(); } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
c4b237bf6cb5be2d5a0569df6132ad93f62a2ddc
39f3fc2f9e9fbeb472fdaf99fdce237fb1586f72
/admin-core/src/main/java/com/ibeetl/admin/core/conf/RbacAnnotationConfig.java
9139cec13efa1434f5c92861bcd464174c96f2f2
[ "BSD-3-Clause" ]
permissive
ThreshE/SpringBoot-beetl-layui
7de3d90c700adb7c6a997aa959a21ac9df76def5
dce406636c17c74bd4dbe17b71d905574d9f1546
refs/heads/master
2023-02-02T07:41:38.688329
2020-12-28T06:01:13
2020-12-28T06:01:13
320,976,745
0
0
null
null
null
null
UTF-8
Java
false
false
3,907
java
package com.ibeetl.admin.core.conf; import java.lang.reflect.Method; import java.util.Date; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.reflect.MethodSignature; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; import com.fasterxml.jackson.databind.ObjectMapper; import com.ibeetl.admin.core.annotation.Function; import com.ibeetl.admin.core.entity.CoreAudit; import com.ibeetl.admin.core.entity.CoreFunction; import com.ibeetl.admin.core.entity.CoreUser; import com.ibeetl.admin.core.service.CoreAuditService; import com.ibeetl.admin.core.service.CorePlatformService; import com.ibeetl.admin.core.util.FunctionLocal; import com.ibeetl.admin.core.util.HttpRequestLocal; import com.ibeetl.admin.core.util.PlatformException; @Aspect @Component public class RbacAnnotationConfig { @Autowired CorePlatformService platformService; @Autowired CoreAuditService sysAuditService; @Autowired HttpRequestLocal httpRequestLocal; @Autowired Environment env; ObjectMapper jsonMapper = new ObjectMapper(); private final Log log = LogFactory.getLog(this.getClass()); @org.aspectj.lang.annotation.Around("within(@org.springframework.stereotype.Controller *) && @annotation(function)") public Object functionAccessCheck(final ProceedingJoinPoint pjp, Function function) throws Throwable { // debug String funCode = null; CoreUser user = null; Method m = null; try { if (function != null) { funCode = function.value(); user = platformService.getCurrentUser(); Long orgId = platformService.getCurrentOrgId(); boolean access = platformService.canAcessFunction(user.getId(), orgId, funCode); if (!access) { log.warn(jsonMapper.writeValueAsString(user) + "試圖訪問未授權功能 " + funCode); throw new PlatformException("試圖訪問未授權功能"); } FunctionLocal.set(funCode); } Object o = pjp.proceed(); // if (function != null) { // MethodSignature ms = (MethodSignature)pjp.getSignature(); // m = ms.getMethod(); // createAudit(funCode,function.name(), user, true, "",m); // } return o; } catch (Throwable e) { if (function != null) { createAudit(funCode, function.name(),user, false, e.getMessage(),m); } throw e; } } private void createAudit(String functionCode, String functionName,CoreUser user, boolean success, String msg, Method m) { boolean enable = env.getProperty("audit.enable", Boolean.class, false); if (!enable) { return; } if(filter(m,functionCode)){ return ; } CoreAudit audit = new CoreAudit(); if(StringUtils.isEmpty(functionName)) { CoreFunction fun = this.platformService.getFunction(functionCode); if (fun == null) { // 冇有在數據庫定義,但寫在代碼裏了 log.warn(functionCode + " 未在數據庫裏定義"); functionName = "未定義"; } else { functionName = fun.getName(); } } audit.setCreateTime(new Date()); audit.setFunctionCode(functionCode); audit.setFunctionName(functionName); audit.setUserId(user.getId()); audit.setSuccess(success ? 1 : 0); audit.setUserName(user.getName()); audit.setMessage(msg); audit.setIp(httpRequestLocal.getRequestIP(env.getProperty("localhost.ip.enable", Boolean.class, false))); sysAuditService.save(audit); } private boolean filter(Method m,String functionCode){ if(functionCode.startsWith("audit.")){ return true; } String uri = httpRequestLocal.getRequestURI(); if(uri!=null&&uri.endsWith("/index/condition.json")){ return true ; }else{ return false; } } }
[ "877671762@qq.com" ]
877671762@qq.com
0bfb1a9a08ab871d31f7242d786833e9bb0d44de
c164d8f1a6068b871372bae8262609fd279d774c
/src/main/java/edu/uiowa/slis/VIVOISF/DocumentPart/DocumentPartDateTimeValueIterator.java
8e8b730beec7d6fb584a38f287fd5d951299ea11
[ "Apache-2.0" ]
permissive
eichmann/VIVOISF
ad0a299df177d303ec851ff2453cbcbd7cae1ef8
e80cd8b74915974fac7ebae8e5e7be8615355262
refs/heads/master
2020-03-19T03:44:27.662527
2018-06-03T22:44:58
2018-06-03T22:44:58
135,757,275
0
1
null
null
null
null
UTF-8
Java
false
false
5,663
java
package edu.uiowa.slis.VIVOISF.DocumentPart; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; import org.apache.jena.query.QuerySolution; import org.apache.jena.query.ResultSet; import java.util.Hashtable; @SuppressWarnings("serial") public class DocumentPartDateTimeValueIterator extends edu.uiowa.slis.VIVOISF.TagLibSupport { static DocumentPartDateTimeValueIterator currentInstance = null; private static final Log log = LogFactory.getLog(DocumentPartDateTimeValueIterator.class); static boolean firstInstance = false; static boolean lastInstance = false; String subjectURI = null; String type = null; String dateTimeValue = null; ResultSet rs = null; String sortCriteria = null; int limitCriteria = 0; int offsetCriteria = 0; Hashtable<String,String> classFilter = null; public int doStartTag() throws JspException { currentInstance = this; try { DocumentPart theDocumentPart = (DocumentPart) findAncestorWithClass(this, DocumentPart.class); if (theDocumentPart != null) { subjectURI = theDocumentPart.getSubjectURI(); } if (theDocumentPart == null && subjectURI == null) { throw new JspException("subject URI generation currently not supported"); } rs = getResultSet(prefix+"SELECT ?s ?t where {" +" <" + subjectURI + "> <http://vivoweb.org/ontology/core#dateTimeValue> ?s . " +" OPTIONAL { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?t } ." +" FILTER NOT EXISTS {" +" ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?subtype ." +" ?subtype <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?t ." +" filter ( ?subtype != ?t )" +" } " + " } " + (limitCriteria == 0 ? "" : " LIMIT " + limitCriteria + " ") + (offsetCriteria == 0 ? "" : " OFFSET " + offsetCriteria + " ") ); while(rs.hasNext()) { QuerySolution sol = rs.nextSolution(); dateTimeValue = sol.get("?s").isLiteral() ? sol.get("?s").asLiteral().getString() : sol.get("?s").toString(); type = sol.get("?t") == null ? null : getLocalName(sol.get("?t").toString()); // if (type == null) // continue; if (classFilter == null || (classFilter != null && type != null && classFilter.containsKey(type))) { log.info("instance: " + dateTimeValue + " type: " + type); firstInstance = true; lastInstance = ! rs.hasNext(); return EVAL_BODY_INCLUDE; } } } catch (Exception e) { log.error("Exception raised in DocumentPartDateTimeValueIterator doStartTag", e); clearServiceState(); freeConnection(); throw new JspTagException("Exception raised in DocumentPartDateTimeValueIterator doStartTag"); } return SKIP_BODY; } public int doAfterBody() throws JspException { try { while(rs.hasNext()) { QuerySolution sol = rs.nextSolution(); dateTimeValue = sol.get("?s").toString(); type = sol.get("?t") == null ? null : getLocalName(sol.get("?t").toString()); // if (type == null) // continue; if (classFilter == null || (classFilter != null && type != null && classFilter.containsKey(type))) { log.info("instance: " + dateTimeValue + " type: " + type); firstInstance = false; lastInstance = ! rs.hasNext(); return EVAL_BODY_AGAIN; } } } catch (Exception e) { log.error("Exception raised in DocumentPartDateTimeValueIterator doAfterBody", e); clearServiceState(); freeConnection(); throw new JspTagException("Exception raised in DocumentPartDateTimeValueIterator doAfterBody"); } return SKIP_BODY; } public int doEndTag() throws JspException { currentInstance = null; try { // do processing } catch (Exception e) { log.error("Exception raised in DocumentPartDateTimeValue doEndTag", e); throw new JspTagException("Exception raised in DocumentPartDateTimeValue doEndTag"); } finally { clearServiceState(); freeConnection(); } return super.doEndTag(); } private void clearServiceState() { subjectURI = null; type = null; dateTimeValue = null; classFilter = null; } public void setSortCriteria(String theSortCriteria) { sortCriteria = theSortCriteria; } public String getSortCriteria() { return sortCriteria; } public void setLimitCriteria(Integer theLimitCriteria) { limitCriteria = theLimitCriteria; } public Integer getLimitCriteria() { return limitCriteria; } public void setOffsetCriteria(Integer theOffsetCriteria) { offsetCriteria = theOffsetCriteria; } public Integer getOffsetCriteria() { return offsetCriteria; } public void setType(String theType) { type = theType; } public String getType() { return type; } public void setDateTimeValue(String theDateTimeValue) { dateTimeValue = theDateTimeValue; } public String getDateTimeValue() { return dateTimeValue; } public static void setFirstInstance(Boolean theFirstInstance) { firstInstance = theFirstInstance; } public static Boolean getFirstInstance() { return firstInstance; } public static void setLastInstance(Boolean theLastInstance) { lastInstance = theLastInstance; } public static Boolean getLastInstance() { return lastInstance; } public void setClassFilter(String filterString) { String[] classFilterArray = filterString.split(" "); this.classFilter = new Hashtable<String, String>(); for (String filterClass : classFilterArray) { log.info("adding filterClass " + filterClass + " to DocumentPartDateTimeValueIterator"); classFilter.put(filterClass, ""); } } public String getClassFilter() { return classFilter.toString(); } }
[ "david-eichmann@uiowa.edu" ]
david-eichmann@uiowa.edu
94b219a3308a6f2806d37ee7becb7ac216588187
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/636bfe846648b77dfcaed8d46e2d5963b0bc3348/before/ForwardingSortedMap.java
27f2bdaf8ed9287066ed298b96a91a192b2fcf87
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,771
java
/* * Copyright (C) 2007 Google Inc. * * 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.elasticsearch.util.collect; import org.elasticsearch.util.annotations.GwtCompatible; import java.util.Comparator; import java.util.SortedMap; /** * A sorted map which forwards all its method calls to another sorted map. * Subclasses should override one or more methods to modify the behavior of * the backing sorted map as desired per the <a * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>. * * @see ForwardingObject * @author Mike Bostock */ @GwtCompatible public abstract class ForwardingSortedMap<K, V> extends ForwardingMap<K, V> implements SortedMap<K, V> { @Override protected abstract SortedMap<K, V> delegate(); public Comparator<? super K> comparator() { return delegate().comparator(); } public K firstKey() { return delegate().firstKey(); } public SortedMap<K, V> headMap(K toKey) { return delegate().headMap(toKey); } public K lastKey() { return delegate().lastKey(); } public SortedMap<K, V> subMap(K fromKey, K toKey) { return delegate().subMap(fromKey, toKey); } public SortedMap<K, V> tailMap(K fromKey) { return delegate().tailMap(fromKey); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
85ff2e3e02aab9547fabaeb013c4abcc23be9b96
5947cfe58348f6cdf30588b8e411ebf55ec50e05
/anjbo-credit-product-data/src/main/java/com/anjbo/service/cm/BusInfoService.java
4fe0b63df14566c717d0c3ef3da212be775d8731
[]
no_license
superJack2222/work-credit
197de8c94df3691f0d1e249ea431c526ca6f3867
4d6dfdabe92d8fee2b49de96fc08e281763a31ba
refs/heads/master
2023-04-28T05:09:40.511601
2020-07-21T00:43:07
2020-07-21T00:43:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.anjbo.service.cm; import java.util.List; import org.apache.ibatis.annotations.Param; import com.anjbo.bean.cm.CMBusInfoDto; /** * 影像资料 * @author czm * @date 2017-08-25 */ public interface BusInfoService { public List<CMBusInfoDto> getByOrderAndCode(@Param("orderNo") String orderNo,@Param("code") String code); }
[ "395859675@qq.com" ]
395859675@qq.com
750f5ff9603df220c93af4335c0a0e0f8f544443
3883554587c8f3f75a7bebd746e1269b8e1e5ef1
/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/User.java
6af0ed70e2467e4e807453676bbb96e7e5337027
[ "Apache-2.0" ]
permissive
KamalSinghKhanna/kubernetes-client
58f663fdc0ca4b6006ae1448ac89b04b6093e46d
08261fba6c9306eb063534ec2320e9166f85c71c
refs/heads/master
2023-08-17T04:33:28.646984
2021-09-23T17:17:24
2021-09-23T17:17:24
409,863,910
1
0
Apache-2.0
2021-09-24T06:55:57
2021-09-24T06:55:57
null
UTF-8
Java
false
false
5,875
java
package io.fabric8.openshift.api.model; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.model.Container; import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; import io.fabric8.kubernetes.model.annotation.Group; import io.fabric8.kubernetes.model.annotation.Version; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; import io.sundr.transform.annotations.TemplateTransformation; import io.sundr.transform.annotations.TemplateTransformations; import lombok.EqualsAndHashCode; import lombok.ToString; @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "apiVersion", "kind", "metadata", "fullName", "groups", "identities" }) @ToString @EqualsAndHashCode @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) }) @Version("v1") @Group("user.openshift.io") @TemplateTransformations({ @TemplateTransformation(value = "/manifest.vm", outputPath = "openshift.properties", gather = true) }) public class User implements HasMetadata, Namespaced { /** * * (Required) * */ @JsonProperty("apiVersion") private String apiVersion = "user.openshift.io/v1"; @JsonProperty("fullName") private String fullName; @JsonProperty("groups") private List<String> groups = new ArrayList<String>(); @JsonProperty("identities") @JsonInclude(JsonInclude.Include.NON_EMPTY) private List<String> identities = new ArrayList<String>(); /** * * (Required) * */ @JsonProperty("kind") private String kind = "User"; @JsonProperty("metadata") private io.fabric8.kubernetes.api.model.ObjectMeta metadata; @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<String, Object>(); /** * No args constructor for use in serialization * */ public User() { } /** * * @param metadata * @param apiVersion * @param identities * @param kind * @param fullName * @param groups */ public User(String apiVersion, String fullName, List<String> groups, List<String> identities, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata) { super(); this.apiVersion = apiVersion; this.fullName = fullName; this.groups = groups; this.identities = identities; this.kind = kind; this.metadata = metadata; } /** * * (Required) * */ @JsonProperty("apiVersion") public String getApiVersion() { return apiVersion; } /** * * (Required) * */ @JsonProperty("apiVersion") public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } @JsonProperty("fullName") public String getFullName() { return fullName; } @JsonProperty("fullName") public void setFullName(String fullName) { this.fullName = fullName; } @JsonProperty("groups") public List<String> getGroups() { return groups; } @JsonProperty("groups") public void setGroups(List<String> groups) { this.groups = groups; } @JsonProperty("identities") public List<String> getIdentities() { return identities; } @JsonProperty("identities") public void setIdentities(List<String> identities) { this.identities = identities; } /** * * (Required) * */ @JsonProperty("kind") public String getKind() { return kind; } /** * * (Required) * */ @JsonProperty("kind") public void setKind(String kind) { this.kind = kind; } @JsonProperty("metadata") public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { this.metadata = metadata; } @JsonAnyGetter public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } }
[ "marc@marcnuri.com" ]
marc@marcnuri.com
569fa31a5e00e89ac1863ccb4d650c02d1294f10
d308abdd420822623f542b3accdc7ac006f30610
/src/main/java/hr/skc/hrga/service/mapper/TaskMapper.java
4e8b9f7792de449dd074de13ab52886fc28124a0
[]
no_license
Riddler454/jhipster
6bab49ff4447eb0ccb6795a36af7d4fe42942daa
2e4b100971bf4f2b0ba63995ff2c3044ec9f0da2
refs/heads/master
2021-04-27T01:15:50.347768
2018-02-23T21:53:16
2018-02-23T21:53:16
122,670,858
0
0
null
2018-02-23T21:53:16
2018-02-23T20:45:47
Java
UTF-8
Java
false
false
568
java
package hr.skc.hrga.service.mapper; import hr.skc.hrga.domain.*; import hr.skc.hrga.service.dto.TaskDTO; import org.mapstruct.*; /** * Mapper for the entity Task and its DTO TaskDTO. */ @Mapper(componentModel = "spring", uses = {}) public interface TaskMapper extends EntityMapper<TaskDTO, Task> { @Mapping(target = "jobs", ignore = true) Task toEntity(TaskDTO taskDTO); default Task fromId(Long id) { if (id == null) { return null; } Task task = new Task(); task.setId(id); return task; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
1ab5b94ab6896ebb327d6cd107f9e99c965fe90c
d4effc74516f07646d86cb881c4ca881291e4a8f
/src/com/haxademic/demo/draw/shapes/Demo_PShapeUtil_OBJLoaderCustomVertColors.java
978d6173c6de779179fe47bd6abb13ee393324b9
[ "MIT" ]
permissive
cacheflowe/haxademic
afc83e4aaa480ad733ee6476744effe448c867ad
dccb860b8937e65a16bd9a037197c73301f9de92
refs/heads/master
2023-07-29T11:34:13.021182
2023-07-28T14:19:08
2023-07-28T14:19:08
11,086,304
162
30
MIT
2020-02-06T17:42:48
2013-07-01T06:26:00
Java
UTF-8
Java
false
false
2,250
java
package com.haxademic.demo.draw.shapes; import com.haxademic.core.app.P; import com.haxademic.core.app.PAppletHax; import com.haxademic.core.app.config.AppSettings; import com.haxademic.core.app.config.Config; import com.haxademic.core.debug.DebugView; import com.haxademic.core.draw.context.PG; import com.haxademic.core.draw.shapes.PShapeUtil; import com.haxademic.core.file.FileUtil; import processing.core.PImage; import processing.core.PShape; import processing.core.PVector; public class Demo_PShapeUtil_OBJLoaderCustomVertColors extends PAppletHax { public static void main(String args[]) { arguments = args; PAppletHax.main(Thread.currentThread().getStackTrace()[1].getClassName()); } protected PShape shape; protected PImage sprite; protected PVector modelSize; protected boolean overrideColor = false; protected void config() { Config.setProperty(AppSettings.WIDTH, 768); Config.setProperty(AppSettings.HEIGHT, 768); } protected void firstFrame() { // build shape and assign texture shape = PShapeUtil.loadObjCustomVertexColors(p.g, FileUtil.getPath("models/VICEVERSA_00.obj")); // normalize shape (scaling centers) PShapeUtil.centerShape(shape); PShapeUtil.scaleShapeToHeight(shape, p.height * 0.5f); PShapeUtil.setOnGround(shape); // check size modelSize = new PVector(PShapeUtil.getWidth(shape), PShapeUtil.getHeight(shape), PShapeUtil.getDepth(shape)); DebugView.setValue("shape.width", modelSize.x); DebugView.setValue("shape.height", modelSize.y); DebugView.setValue("shape.depth", modelSize.z); DebugView.setValue("shape.vertexCount", PShapeUtil.vertexCount(shape)); } protected void drawApp() { // clear the screen background(10); p.noStroke(); PG.setBetterLights(p.g); // rotate camera p.translate(p.width/2, p.height * 0.65f); PG.basicCameraFromMouse(p.g); // draw floor p.pushMatrix(); p.rotateX(P.HALF_PI); PG.setDrawCenter(p.g); p.fill(0, 200, 0); p.rect(0, 0, p.width/2, p.width/2); p.popMatrix(); // draw shape PG.setDrawCorner(p.g); p.shape(shape); // draw extents p.noFill(); p.stroke(255); p.pushMatrix(); p.translate(0, -modelSize.y / 2f, 0); p.box(modelSize.x, modelSize.y, modelSize.z); p.popMatrix(); } }
[ "cacheflowe@cacheflowe.com" ]
cacheflowe@cacheflowe.com
a0a3f1ade093409475b38630dc042e5b165915e6
61928fc99ec5fd73d083cf381617a28f78d832c3
/jettywebapptest/src/jettywebapptest/TestServlet.java
cb0419dd36bf5912596d30b7c8b186b00a5d3479
[ "Apache-2.0" ]
permissive
evandor/skysail
399af3c02449930f9082ffb52bd6fd720e3afc04
ca26e9b98e802111aa63a5edf719a331c0f6d062
refs/heads/master
2021-01-23T14:56:04.522658
2017-05-30T09:22:16
2017-05-30T09:22:16
54,588,839
1
1
null
null
null
null
UTF-8
Java
false
false
788
java
package jettywebapptest; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class TestServlet extends HttpServlet { @Override public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType("text/html");// setting the content type PrintWriter pw = res.getWriter();// get the stream to write the data // writing html in the stream pw.println("<html><body>"); pw.println("Welcome to servlet"); pw.println("</body></html>"); pw.close();// closing the stream } }
[ "evandor@gmail.com" ]
evandor@gmail.com
60497e6f211ec4553713a9ed01a310b85c15f5ed
2b2fcb1902206ad0f207305b9268838504c3749b
/WakfuClientSources/srcx/class_8513_dAt.java
b669f046ae495f25d8e4ac719d707df2bb57ff5e
[]
no_license
shelsonjava/Synx
4fbcee964631f747efc9296477dee5a22826791a
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
refs/heads/master
2021-01-15T13:51:41.816571
2013-11-17T10:46:22
2013-11-17T10:46:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,334
java
import java.util.ArrayList; import java.util.Iterator; import org.apache.log4j.Logger; public class dAt implements bWU, Iterator { protected static final Logger K = Logger.getLogger(dAt.class); private static final bOO fFD = new bOO(new wF()); private dDN fFE; private cHu fFF; private aVc fFG = null; private dle hyD; private ArrayList fFI = new ArrayList(); private boolean lHA = false; private boolean fFK = false; public void aJ() { } public void bc() { for (int i = 0; i < this.fFI.size(); i++) this.fFE.H((aVc)this.fFI.get(i)); this.fFI.clear(); this.fFF = null; this.fFG = null; this.hyD = null; this.fFE = null; this.lHA = false; } public static dAt a(dDN paramdDN, cHu paramcHu, dle paramdle, boolean paramBoolean) { if ((paramcHu != null) && (paramdle != null)) { dAt localdAt; try { localdAt = (dAt)fFD.Mm(); } catch (Exception localException) { localdAt = new dAt(); K.error("erreur dans le checkOut de " + localdAt.getClass()); } localdAt.fFE = paramdDN; localdAt.fFF = paramcHu; localdAt.hyD = paramdle; localdAt.lHA = paramBoolean; return localdAt; } if (paramcHu == null) { throw new UnsupportedOperationException("checkOut d'un iterator sans liste derrière"); } throw new UnsupportedOperationException("checkOut d'un LinkedToEffectUserIterator sans effectUser"); } public boolean hasNext() { this.fFK = true; if (!this.fFF.hasNext()) { return false; } while (this.fFF.hasNext()) { this.fFF.fl(); this.fFG = ((aVc)this.fFF.value()); if (((this.fFG.bke() == this.hyD) && (!this.lHA)) || (this.fFG.bkf() == this.hyD)) { return true; } } return false; } public aVc bxt() { if ((!this.fFK) && (!hasNext())) throw new UnsupportedOperationException("Depassement de liste, cause probable : appel de next() sans vérification"); this.fFK = false; return this.fFG; } public void remove() { this.fFF.remove(); this.fFI.add(this.fFG); } public void release() { if (fFD != null) try { fFD.y(this); } catch (Exception localException) { K.error("impossible"); } else bc(); } }
[ "music_inme@hotmail.fr" ]
music_inme@hotmail.fr
7c6b75cdd0dd20b2930d0d9d53f4f6b4332a74f7
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/files/File_55526.java
e062e38d531a1b4eebe59aed0f2023b6318f3615
[ "Apache-2.0" ]
permissive
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,265
java
/* * Copyright LWJGL. All rights reserved. * License terms: https://www.lwjgl.org/license */ package org.lwjgl.system; import javax.annotation.*; import java.net.*; import java.nio.channels.*; import java.nio.file.*; import java.util.function.*; import static org.lwjgl.system.APIUtil.*; /** * Handles loading of native resources in LWJGL. [INTERNAL USE ONLY] * * <p>This class uses the same mechanism as {@link Library} for loading shared libraries. The resource name could be an absolute path, or a relative path that * is resolved via {@code org.lwjgl.librarypath}, {@code java.library.path}, or even the class/module-path. When the resource is detected in the * class/module-path, it is extracted automatically to {@code org.lwjgl.librarypath} via the {@code SharedLibraryLoader}.</p> */ public final class LibraryResource { static { Library.initialize(); } private LibraryResource() {} /** Calls {@link #load(Class, String)} using {@code LibraryResource.class} as the context parameter. */ public static Path load(String name) { return load(LibraryResource.class, name); } /** * Loads a library resource. * * @param context the class to use to discover the library resource in the classpath * @param name the resource name * * @return the library resource path * * @throws IllegalStateException if the resource could not be found */ @SuppressWarnings("try") public static Path load(Class<?> context, String name) { return load(context, name, true); } @SuppressWarnings("try") private static Path load(Class<?> context, String name, boolean printError) { apiLog("Loading library resource: " + name); // METHOD 1: absolute path Path path = Paths.get(name); if (path.isAbsolute()) { if (!Files.exists(path)) { if (printError) { printError(); } throw new IllegalStateException("Failed to locate library resource: " + name); } apiLog("\tSuccess"); return path; } // METHOD 2: org.lwjgl.librarypath URL libURL = context.getClassLoader().getResource(name); if (libURL == null) { path = loadFromLibraryPath(name); if (path != null) { return path; } } else { boolean debugLoader = Configuration.DEBUG_LOADER.get(false); try { // Always use the SLL if the resource is found in the classpath, // so that newer versions can be detected. if (debugLoader) { apiLog("\tUsing SharedLibraryLoader..."); } // Extract from classpath and try org.lwjgl.librarypath try (FileChannel ignored = SharedLibraryLoader.load(name, name, libURL)) { path = loadFromLibraryPath(name); if (path != null) { return path; } } } catch (Exception e) { if (debugLoader) { e.printStackTrace(DEBUG_STREAM); } } } // METHOD 3: java.library.path String paths = System.getProperty(Library.JAVA_LIBRARY_PATH); if (paths != null) { path = load(name, Library.JAVA_LIBRARY_PATH, paths); if (path != null) { return path; } } if (printError) { printError(); } throw new IllegalStateException("Failed to locate library resource: " + name); } @Nullable private static Path loadFromLibraryPath(String libName) { String paths = Configuration.LIBRARY_PATH.get(); if (paths == null) { return null; } return load(libName, Configuration.LIBRARY_PATH.getProperty(), paths); } @Nullable private static Path load(String name, String property, String paths) { Path resource = Library.findFile(paths, name); if (resource == null) { apiLog(String.format("\t%s not found in %s=%s", name, property, paths)); return null; } apiLog(String.format("\tLoaded from %s: %s", property, resource)); return resource; } /** * Loads a library resource using {@link #load(String)} with the name specified by {@code name}. If {@code name} is not set, * {@link #load(String)} will be called with the names specified by {@code defaultNames}. The first successful will be returned. * * @param name a {@link Configuration} that specifies the resource name * @param defaultNames the default resource name(s) * * @return the library resource path * * @throws IllegalStateException if the resource could not be found */ public static Path load(Class<?> context, Configuration<String> name, String... defaultNames) { return load(context, name, null, defaultNames); } /** * Loads a library resource using {@link #load(String)} with the name specified by {@code name}. If {@code name} is not set, * {@link #load(String)} will be called with the names specified by {@code defaultNames}. The first successful will be returned. If the resource could * not be found, the {@code fallback} will be called. * * @param name a {@link Configuration} that specifies the resource name * @param fallback fallback to use if everything else fails * @param defaultNames the default resource name(s) * * @return the library resource path * * @throws UnsatisfiedLinkError if the resource could not be found */ public static Path load(Class<?> context, Configuration<String> name, @Nullable Supplier<Path> fallback, String... defaultNames) { if (defaultNames.length == 0) { throw new IllegalArgumentException("No default names specified."); } String resourceName = name.get(); if (resourceName != null) { return load(context, resourceName); } if (fallback == null && defaultNames.length <= 1) { return load(context, defaultNames[0]); } try { return load(context, defaultNames[0], false); // try first } catch (Throwable t) { for (int i = 1; i < defaultNames.length; i++) { // try alternatives try { return load(context, defaultNames[i], fallback == null && i == defaultNames.length - 1); } catch (Throwable ignored) { } } if (fallback != null) { return fallback.get(); } throw t; // original error } } private static void printError() { Library.printError( "[LWJGL] Failed to load a library resource. Possible solutions:\n" + "\ta) Add the directory that contains the resource to -Djava.library.path or -Dorg.lwjgl.librarypath.\n" + "\tb) Add the JAR that contains the resource to the classpath." ); } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
07a89e2b6309faae887c56c9a2546e655f3c04f1
9e92540d8d29e642e42cee330aeb9c81c3ab11db
/D2FSClient/src/main/java/com/emc/d2fs/services/property_service/ObjectFactory.java
c3a7974522ffe13fa35d40da1936fe216811e4db
[]
no_license
ambadan1/demotrial
c8a64f6f26b5f0e5a9c8a2047dfb11d354ddec42
9b4dd17ad423067eca376a4bad204986ed039fee
refs/heads/master
2020-04-29T10:52:03.614348
2019-03-17T09:26:26
2019-03-17T09:26:26
176,076,767
0
0
null
2019-03-17T09:26:27
2019-03-17T08:48:00
Java
UTF-8
Java
false
false
2,062
java
package com.emc.d2fs.services.property_service; import javax.xml.bind.annotation.XmlRegistry; /** * This object contains factory methods for each * Java content interface and Java element interface * generated in the com.emc.d2fs.services.property_service package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory methods for each of these are * provided in this class. * */ @XmlRegistry public class ObjectFactory { /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.emc.d2fs.services.property_service * */ public ObjectFactory() { } /** * Create an instance of {@link DumpRequest } * */ public DumpRequest createDumpRequest() { return new DumpRequest(); } /** * Create an instance of {@link DumpResponse } * */ public DumpResponse createDumpResponse() { return new DumpResponse(); } /** * Create an instance of {@link GetPropertiesRequest } * */ public GetPropertiesRequest createGetPropertiesRequest() { return new GetPropertiesRequest(); } /** * Create an instance of {@link GetPropertiesResponse } * */ public GetPropertiesResponse createGetPropertiesResponse() { return new GetPropertiesResponse(); } /** * Create an instance of {@link SavePropertiesRequest } * */ public SavePropertiesRequest createSavePropertiesRequest() { return new SavePropertiesRequest(); } /** * Create an instance of {@link SavePropertiesResponse } * */ public SavePropertiesResponse createSavePropertiesResponse() { return new SavePropertiesResponse(); } }
[ "aniket.ambadkar@novartis.com" ]
aniket.ambadkar@novartis.com
674c90067a1c5972ee434864c7ad7b73cc70fb72
2494cf393a64dc9398ee7d9747270974d195a176
/game-client/src/main/java/client/LoyaltyInterface.java
9e549026c1436ac4549c654a9c2bdf2d52a9cc7a
[]
no_license
chollandcloud/Dodian-OSRS
927307430b3e41283b34001683ea2a3ce7316828
bc8b83366753de0d75a024508cd1db8f41a74758
refs/heads/master
2023-07-31T21:02:49.217981
2021-09-04T17:05:10
2021-09-04T17:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,690
java
package client; import java.util.Arrays; import java.util.List; public class LoyaltyInterface { public static void init(int dayReward, int currentSpree, int highestSpree, int totalClaimedRewards, List<int[]> packs) { List<Integer> containerIds = Arrays.asList(25, 27, 29, 31, 33, 35, 37, 39, 41, 43); List<Integer> lockedContainerIds = Arrays.asList(15, 16, 17, 18, 19, 20, 21, 22, 23, 24); Widget parent = Widget.get(264, 1); int childId = parent.children.length; /** * Title */ Widget title = parent.children[1]; title.componentString = "OS-Scape Loyalty Rewards"; GameClient.requestRedraw(title); /** * Reposition containers. */ for(int containerId : containerIds) { Widget inter = Widget.get(264, containerId); inter.componentString = ""; inter.onClickListener = null; inter.mouseEnteredScript = null; inter.mouseLeftScript = null; inter.setOption(0, "Claim reward"); inter.setOption(1, null); inter.setOption(2, null); inter.setOption(3, null); GameClient.requestRedraw(inter); Stream.client.method506(inter); } /** * Hide old button content */ for(int i = 45; i < 65; i ++) { Widget inter = Widget.get(264, i); inter.hidden = true; } /** * Set unlocked days */ for(int i = 0; i < dayReward; i ++) { Widget inter = Widget.get(264, lockedContainerIds.get(i)); inter.hidden = true; } /** * Hide statistics background */ Widget inter = Widget.get(264, 4); inter.hidden = true; /** * Fill containers */ for(int i = 0; i < 10; i++) { Widget container = Widget.get(264, containerIds.get(i)); int containerChild = 0; int[] pack = packs.get(i); int rewardId = pack[0]; int rewardAmount = pack[1]; Widget item = Custom.addChild(container.interfaceHash, 5, containerChild++); item.decodeCs2 = true; item.x = 30; item.y = 24; item.width = 36; item.height = 32; item.shadow = 3355443; item.outline = 1; item.fontVerticalAlignment = 1; item.fontHorizontalAlignment = 1; Widget.setItem(item, rewardId, (rewardAmount == 1) ? -1 : rewardAmount, 1); GameClient.requestRedraw(item); Stream.client.method506(item); Widget day = Custom.addChild(container.interfaceHash, 4, containerChild++); day.decodeCs2 = true; day.x = 0; day.y = -13; day.widthAlignment = 1; day.height = 50; day.fontVerticalAlignment = 1; day.fontHorizontalAlignment = 1; day.fontId = 496; day.fontShadow = true; day.color = 0xF39C12; day.componentString = "Day " + (i + 1); GameClient.requestRedraw(day); Stream.client.method506(day); Widget itemName = Custom.addChild(container.interfaceHash, 4, containerChild++); itemName.decodeCs2 = true; itemName.widthAlignment = 1; itemName.y = 39; itemName.height = 50; itemName.fontHorizontalAlignment = 1; itemName.fontVerticalAlignment = 1; itemName.fontId = 494; itemName.fontShadow = true; itemName.color = 0xD0D3D4; if(dayReward > (i + 1)) { Widget check = Custom.addChild(container.interfaceHash, 4, containerChild++); check.decodeCs2 = true; check.x = 2; check.y = 65; check.width = 500; check.height = 20; check.fontId = 494; check.componentString = "<img=78>"; check.fontShadow = true; check.color = 0xff9040; GameClient.requestRedraw(check); Stream.client.method506(check); } ItemDef def = ItemDef.loadItemDef(rewardId); boolean note = def.notedTemplate >= 0 && def.notedID >= 0; itemName.componentString = (note ? ItemDef.loadItemDef(def.notedID).name : def.name); GameClient.requestRedraw(itemName); Stream.client.method506(itemName); } /** * Statistics */ Widget statistics = Custom.addChild(parent.interfaceHash, 4, childId++); statistics.decodeCs2 = true; statistics.x = 278; statistics.y = 216; statistics.width = 170; statistics.height = 10; statistics.fontId = 496; statistics.componentString = "Statistics"; statistics.fontShadow = true; statistics.color = 0xF39C12; GameClient.requestRedraw(statistics); Stream.client.method506(statistics); Widget spreeMsg = Custom.addChild(parent.interfaceHash, 4, childId++); spreeMsg.decodeCs2 = true; spreeMsg.x = 230; spreeMsg.y = 233; spreeMsg.width = 170; spreeMsg.height = 20; spreeMsg.fontId = 494; spreeMsg.componentString = "Current Spree:"; spreeMsg.fontShadow = true; spreeMsg.color = 0xff9040; GameClient.requestRedraw(spreeMsg); Stream.client.method506(spreeMsg); Widget spreeMsg1 = Custom.addChild(parent.interfaceHash, 4, childId++); spreeMsg1.decodeCs2 = true; spreeMsg1.x = 307; spreeMsg1.y = 233; spreeMsg1.width = 170; spreeMsg1.height = 20; spreeMsg1.fontId = 494; spreeMsg1.componentString = "" + currentSpree; spreeMsg1.fontShadow = true; spreeMsg1.color = 0xD0D3D4; GameClient.requestRedraw(spreeMsg1); Stream.client.method506(spreeMsg1); Widget highestSpreeMsg = Custom.addChild(parent.interfaceHash, 4, childId++); highestSpreeMsg.decodeCs2 = true; highestSpreeMsg.x = 230; highestSpreeMsg.y = 247; highestSpreeMsg.width = 170; highestSpreeMsg.height = 20; highestSpreeMsg.fontId = 494; highestSpreeMsg.componentString = "Highest Spree:"; highestSpreeMsg.fontShadow = true; highestSpreeMsg.color = 0xff9040; GameClient.requestRedraw(highestSpreeMsg); Stream.client.method506(highestSpreeMsg); Widget highestSpreeMsg1 = Custom.addChild(parent.interfaceHash, 4, childId++); highestSpreeMsg1.decodeCs2 = true; highestSpreeMsg1.x = 307; highestSpreeMsg1.y = 247; highestSpreeMsg1.width = 170; highestSpreeMsg1.height = 20; highestSpreeMsg1.fontId = 494; highestSpreeMsg1.componentString = "" + highestSpree; highestSpreeMsg1.fontShadow = true; highestSpreeMsg1.color = 0xD0D3D4; GameClient.requestRedraw(highestSpreeMsg1); Stream.client.method506(highestSpreeMsg1); Widget totalClaimed = Custom.addChild(parent.interfaceHash, 4, childId++); totalClaimed.decodeCs2 = true; totalClaimed.x = 230; totalClaimed.y = 262; totalClaimed.width = 170; totalClaimed.height = 20; totalClaimed.fontId = 494; totalClaimed.componentString = "Total Claimed Rewards:"; totalClaimed.fontShadow = true; totalClaimed.color = 0xff9040; GameClient.requestRedraw(totalClaimed); Stream.client.method506(totalClaimed); Widget totalClaimed1 = Custom.addChild(parent.interfaceHash, 4, childId++); totalClaimed1.decodeCs2 = true; totalClaimed1.x = 346; totalClaimed1.y = 262; totalClaimed1.width = 170; totalClaimed1.height = 20; totalClaimed1.fontId = 494; totalClaimed1.componentString = "" + totalClaimedRewards; totalClaimed1.fontShadow = true; totalClaimed1.color = 0xD0D3D4; GameClient.requestRedraw(totalClaimed1); Stream.client.method506(totalClaimed1); /** * Top thank you message */ Widget thankYou = Custom.addChild(parent.interfaceHash, 4, childId++); thankYou.decodeCs2 = true; thankYou.x = 63; thankYou.y = 36; thankYou.width = 500; thankYou.height = 20; thankYou.fontId = 494; thankYou.componentString = "Thanks for playing OS-Scape! Select your <col=4dff4d>loyalty reward</col> below!"; thankYou.fontShadow = true; thankYou.color = 0xff9040; GameClient.requestRedraw(thankYou); Stream.client.method506(thankYou); Widget heart = Custom.addChild(parent.interfaceHash, 4, childId++); heart.decodeCs2 = true; heart.x = 49; heart.y = 38; heart.width = 500; heart.height = 20; heart.fontId = 494; heart.componentString = "<img=76>"; heart.fontShadow = true; heart.color = 0xff9040; GameClient.requestRedraw(heart); Stream.client.method506(heart); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
6e541d2bb97f7150dd64edb1c5635908d3f72b1d
6dd1247159a1ef29e94d4627fd340310afd77a24
/Java/URI_BEECROWD/BEGINNER/P2896_Enjoy_the_Offer.java
3d94bd8bb3033b1d722ac78d0136f27391089039
[]
no_license
Boombarm/onlinejudge
3c34c202d863cf707fb1f88ff4e9b767277d3acb
763fa2e77c92467441753c0d0e60c1b8b1114c03
refs/heads/master
2023-09-01T22:44:37.154364
2023-08-24T13:21:14
2023-08-24T13:21:14
122,501,259
1
0
null
null
null
null
UTF-8
Java
false
false
1,177
java
package URI.Accepted.BEGINNER.sourcecode; /** * @author Teerapat Phokhonwong * @Onlinejudge: URI ONLINE JUDGE * @Categories: BEGINNER * @Problem: 2896 - Enjoy the Offer * @Link: https://www.urionlinejudge.com.br/judge/en/problems/view/2896 * @Timelimit: 2 sec * @Status: Accepted * @Memory: * @Submission: 2/7/19, 1:18:28 AM * @Runtime: 0.104s * @Solution: * @Note: */ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.BufferedWriter; import java.io.OutputStreamWriter; import java.io.IOException; public class P2896_Enjoy_the_Offer { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int t = Integer.parseInt(br.readLine()); while (t-- > 0) { String[] st = br.readLine().split(" "); int N = Integer.parseInt(st[0]); int K = Integer.parseInt(st[1]); int A = N / K; int answer = A + (N - (A * K)); bw.append(answer + "\n"); } bw.flush(); } }
[ "boombarm@gmail.com" ]
boombarm@gmail.com
7eb9119d9d8c0ef46f8a8a52a0bf286177ee9470
4b602744e001250fa209db684ecbd69fe8779136
/app/src/main/java/com/sty/ne/chinasvg/ProvinceItem.java
6d46af56937db109ebc649ad7a2fbec5581b0fea
[]
no_license
tianyalu/NeChinaSvg
acbca379ea5d06c8fec8cfb4bee36067b049403d
7e792fcd7968c6168ca5015d342dfe9dfd0e08e0
refs/heads/master
2020-08-29T12:56:14.667506
2019-10-28T12:12:31
2019-10-28T12:12:31
218,038,286
2
0
null
null
null
null
UTF-8
Java
false
false
1,973
java
package com.sty.ne.chinasvg; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.graphics.Region; /** * Created by tian on 2019/10/28. */ public class ProvinceItem { private Path path; /** * 绘制颜色 */ private int drawColor; public ProvinceItem(Path path) { this.path = path; } public void setDrawColor(int drawColor) { this.drawColor = drawColor; } public void drawItem(Canvas canvas, Paint paint, boolean isSelect) { if(isSelect) { //绘制内部的颜色 paint.clearShadowLayer(); paint.setStrokeWidth(1); paint.setStyle(Paint.Style.FILL); paint.setColor(drawColor); canvas.drawPath(path, paint); //绘制边界 paint.setStyle(Paint.Style.STROKE); int strokeColor = 0xFFD0E8F4; paint.setColor(strokeColor); canvas.drawPath(path, paint); }else { //绘制内部的颜色 paint.setStrokeWidth(2); paint.setColor(Color.BLACK); paint.setStyle(Paint.Style.FILL); paint.setShadowLayer(8, 0, 0, 0xffffff); canvas.drawPath(path, paint); //绘制边界 paint.clearShadowLayer(); paint.setColor(drawColor); paint.setStyle(Paint.Style.FILL); paint.setStrokeWidth(2); canvas.drawPath(path, paint); } } public boolean isTouch(float x, float y) { RectF rectF = new RectF(); //计算能包围path路径的最小矩形 path.computeBounds(rectF, true); Region region = new Region(); region.setPath(path, new Region((int) rectF.left, (int) rectF.top, (int) rectF.right, (int) rectF.bottom)); return region.contains((int) x, (int) y); } }
[ "styzf@qq.com" ]
styzf@qq.com
8ab7bfe8920abe73f62cc122ab382dd3eff1c660
03482d89174b363d8b7ca03d7eaf05c12a012a77
/cws_arquitectura_skel/src/uo/ri/model/Proveedor.java
143ee2cc2bf14dedc0a549c7b484232e1835d262
[]
no_license
cafeteru/RI
15c2145cc19dae890484b181ca3be4efd25ec969
dd2f3e32eec71178e95bbb0287e6850604b92652
refs/heads/master
2022-01-09T02:43:24.159852
2018-10-17T22:45:24
2018-10-17T22:45:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,288
java
package uo.ri.model; import java.util.HashSet; import java.util.Set; import javax.persistence.*; /** * Clase del modelo de dominio que simula un proveedor. * * @author Iván González Mahagamage * */ @Entity @Table(name = "TPROVEEDORES") public class Proveedor { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String nombre; private String codigo; @OneToMany(mappedBy = "proveedor") private Set<Suministro> suministros = new HashSet<>(); @OneToMany(mappedBy = "proveedor") private Set<Pedido> pedidos = new HashSet<>(); /** * Constructor por defecto. */ Proveedor() { } /** * Constructor con parámetros. * * @param nombre * Nombre del proveedor. * @param codigo * Código del proveedor. */ public Proveedor(String nombre, String codigo) { this.nombre = nombre; this.codigo = codigo; } /** * Método que devuelve el parámetro Id * * @return El Id del objeto. */ public Long getId() { return id; } /** * Método que devuelve el parámetro nombre. * * @return El parámetro nombre. */ public String getNombre() { return nombre; } /** * Método que modifica el parámetro nombre. * * @param nombre * Nombre del proveedor. */ public void setNombre(String nombre) { this.nombre = nombre; } /** * Método que devuelve el parámetro codigo. * * @return El parámetro codigo. */ public String getCodigo() { return codigo; } /** * Método que modifica el parámetro codigo. * * @param codigo * Código del proveedor. */ public void setCodigo(String codigo) { this.codigo = codigo; } /** * Método que devuelve una copia del parámetro suministros. * * @return Una copia del parámetro suministros. */ public Set<Suministro> getSuministros() { return new HashSet<>(suministros); } /** * Método que devuelve el parámetro suministros. * * @return El parámetro suministros. */ Set<Suministro> _getSuministros() { return suministros; } /** * Método que devuelve una copia del parámetro pedidos. * * @return Una copia del parámetro pedidos. */ public Set<Pedido> getPedidos() { return new HashSet<>(pedidos); } /** * Método que devuelve el parámetro pedidos * * @return El parámetro pedidos */ Set<Pedido> _getPedidos() { return pedidos; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((codigo == null) ? 0 : codigo.hashCode()); result = prime * result + ((nombre == null) ? 0 : nombre.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; Proveedor other = (Proveedor) obj; if (codigo == null) { if (other.codigo != null) { return false; } } else if (!codigo.equals(other.codigo)) { return false; } if (nombre == null) { if (other.nombre != null) { return false; } } else if (!nombre.equals(other.nombre)) { return false; } return true; } @Override public String toString() { return "Proveedor [nombre=" + nombre + ", codigo=" + codigo + "]"; } }
[ "ivangonzalezmahagamage@gmail.com" ]
ivangonzalezmahagamage@gmail.com
9d70b6b792cccecd0344e0df98a245a69f2103f5
fc6c869ee0228497e41bf357e2803713cdaed63e
/weixin6519android1140/src/sourcecode/com/tencent/mm/protocal/c/pf.java
493da181f77f723d18e956b62ac03c02cb26858d
[]
no_license
hyb1234hi/reverse-wechat
cbd26658a667b0c498d2a26a403f93dbeb270b72
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
refs/heads/master
2020-09-26T10:12:47.484174
2017-11-16T06:54:20
2017-11-16T06:54:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,866
java
package com.tencent.mm.protocal.c; import b.a.a.b; import com.tencent.gmtrace.GMTrace; import java.util.LinkedList; public final class pf extends azh { public int tOy; public pf() { GMTrace.i(3659446353920L, 27265); GMTrace.o(3659446353920L, 27265); } protected final int a(int paramInt, Object... paramVarArgs) { GMTrace.i(3659580571648L, 27266); if (paramInt == 0) { paramVarArgs = (b.a.a.c.a)paramVarArgs[0]; if (this.uND == null) { throw new b("Not all required fields were included: BaseResponse"); } if (this.uND != null) { paramVarArgs.fm(1, this.uND.aYq()); this.uND.a(paramVarArgs); } paramVarArgs.fk(2, this.tOy); GMTrace.o(3659580571648L, 27266); return 0; } int i; if (paramInt == 1) { paramInt = 0; if (this.uND != null) { paramInt = b.a.a.a.fj(1, this.uND.aYq()) + 0; } i = b.a.a.a.fh(2, this.tOy); GMTrace.o(3659580571648L, 27266); return paramInt + i; } if (paramInt == 2) { paramVarArgs = new b.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = azh.a(paramVarArgs); paramInt > 0; paramInt = azh.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.csW(); } } if (this.uND == null) { throw new b("Not all required fields were included: BaseResponse"); } GMTrace.o(3659580571648L, 27266); return 0; } if (paramInt == 3) { Object localObject1 = (b.a.a.a.a)paramVarArgs[0]; pf localpf = (pf)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: GMTrace.o(3659580571648L, 27266); return -1; case 1: paramVarArgs = ((b.a.a.a.a)localObject1).Gv(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new es(); localObject2 = new b.a.a.a.a((byte[])localObject2, unknownTagHandler); for (boolean bool = true; bool; bool = ((es)localObject1).a((b.a.a.a.a)localObject2, (com.tencent.mm.bm.a)localObject1, azh.a((b.a.a.a.a)localObject2))) {} localpf.uND = ((es)localObject1); paramInt += 1; } GMTrace.o(3659580571648L, 27266); return 0; } localpf.tOy = ((b.a.a.a.a)localObject1).yqV.nj(); GMTrace.o(3659580571648L, 27266); return 0; } GMTrace.o(3659580571648L, 27266); return -1; } } /* Location: D:\tools\apktool\weixin6519android1140\jar\classes3-dex2jar.jar!\com\tencent\mm\protocal\c\pf.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "robert0825@gmail.com" ]
robert0825@gmail.com
0de68f8e8fbbafdc2cd8596ba2f96108d8f0b29a
93cc7302598345ba6448e53e6b1481908875048a
/org/chromium/content/browser/input/SelectPopupDropdown.java
46e33480d16bfe39b64d05215f973cb310c27e0e
[]
no_license
g-gibosky/LLDM_Final
63d9714f377089a73f551147b67350401aaca050
430481c53fae154de8b81bb2181315fe98312f1b
refs/heads/master
2021-08-23T03:50:23.599126
2017-12-03T02:07:04
2017-12-03T02:07:04
112,892,818
0
0
null
null
null
null
UTF-8
Java
false
false
3,241
java
package org.chromium.content.browser.input; import android.content.Context; import android.graphics.Rect; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.PopupWindow.OnDismissListener; import java.util.List; import org.chromium.content.browser.ContentViewCore; import org.chromium.content.browser.RenderCoordinates; import org.chromium.ui.DropdownAdapter; import org.chromium.ui.DropdownPopupWindow; public class SelectPopupDropdown implements SelectPopup { private final ContentViewCore mContentViewCore; private final Context mContext = this.mContentViewCore.getContext(); private final DropdownPopupWindow mDropdownPopupWindow = new DropdownPopupWindow(this.mContext, this.mContentViewCore.getViewAndroidDelegate()); private boolean mSelectionNotified; class C02231 implements OnItemClickListener { C02231() { } public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { SelectPopupDropdown.this.notifySelection(new int[]{position}); SelectPopupDropdown.this.hide(false); } } class C02242 implements OnDismissListener { C02242() { } public void onDismiss() { SelectPopupDropdown.this.notifySelection(null); } } public SelectPopupDropdown(ContentViewCore contentViewCore, List<SelectPopupItem> items, Rect bounds, int[] selected, boolean rightAligned) { this.mContentViewCore = contentViewCore; this.mDropdownPopupWindow.setOnItemClickListener(new C02231()); int initialSelection = -1; if (selected.length > 0) { initialSelection = selected[0]; } this.mDropdownPopupWindow.setInitialSelection(initialSelection); this.mDropdownPopupWindow.setAdapter(new DropdownAdapter(this.mContext, items, null)); this.mDropdownPopupWindow.setRtl(rightAligned); RenderCoordinates renderCoordinates = this.mContentViewCore.getRenderCoordinates(); float anchorX = renderCoordinates.fromPixToDip(renderCoordinates.fromLocalCssToPix((float) bounds.left)); float anchorY = renderCoordinates.fromPixToDip(renderCoordinates.fromLocalCssToPix((float) bounds.top)); this.mDropdownPopupWindow.setAnchorRect(anchorX, anchorY, renderCoordinates.fromPixToDip(renderCoordinates.fromLocalCssToPix((float) bounds.right)) - anchorX, renderCoordinates.fromPixToDip(renderCoordinates.fromLocalCssToPix((float) bounds.bottom)) - anchorY); this.mDropdownPopupWindow.setOnDismissListener(new C02242()); } private void notifySelection(int[] indicies) { if (!this.mSelectionNotified) { this.mContentViewCore.selectPopupMenuItems(indicies); this.mSelectionNotified = true; } } public void show() { this.mDropdownPopupWindow.postShow(); } public void hide(boolean sendsCancelMessage) { if (sendsCancelMessage) { this.mDropdownPopupWindow.dismiss(); notifySelection(null); return; } this.mSelectionNotified = true; this.mDropdownPopupWindow.dismiss(); } }
[ "32047751+g-gibosky@users.noreply.github.com" ]
32047751+g-gibosky@users.noreply.github.com
3ebf86319857440786d81f9d0cc06b4f2066d265
784017131b5eadffd3bec254f9304225e648d3a3
/app/src/main/java/android/support/p001v4/app/BaseFragmentActivityHoneycomb.java
09779a68f7bd0f9b411310c5bc3ac5d0a065380b
[]
no_license
Nienter/kdshif
e6126b3316f4b6e15a7dc6a67253f5729515fb4c
4d65454bb331e4439ed948891aa0173655d66934
refs/heads/master
2022-12-03T19:57:04.981078
2020-08-06T11:28:14
2020-08-06T11:28:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
788
java
package android.support.p001v4.app; import android.content.Context; import android.os.Build; import android.util.AttributeSet; import android.view.View; /* renamed from: android.support.v4.app.BaseFragmentActivityHoneycomb */ abstract class BaseFragmentActivityHoneycomb extends BaseFragmentActivityGingerbread { BaseFragmentActivityHoneycomb() { } public View onCreateView(View view, String str, Context context, AttributeSet attributeSet) { View dispatchFragmentsOnCreateView = dispatchFragmentsOnCreateView(view, str, context, attributeSet); if (dispatchFragmentsOnCreateView != null || Build.VERSION.SDK_INT < 11) { return dispatchFragmentsOnCreateView; } return super.onCreateView(view, str, context, attributeSet); } }
[ "niu@eptonic.com" ]
niu@eptonic.com
31f0be9698bf124cfd7a77c45de1010a7fb2b28b
806f76edfe3b16b437be3eb81639d1a7b1ced0de
/src/com/huawei/ui/device/p170a/aq.java
53c98ee4bc3b1a6fb6e373eabb783b0c1d7f97c4
[]
no_license
magic-coder/huawei-wear-re
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
935ad32f5348c3d8c8d294ed55a5a2830987da73
refs/heads/master
2021-04-15T18:30:54.036851
2018-03-22T07:16:50
2018-03-22T07:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
263
java
package com.huawei.ui.device.p170a; /* compiled from: UpdateInteractors */ class aq implements Runnable { final /* synthetic */ ah f6897a; aq(ah ahVar) { this.f6897a = ahVar; } public void run() { this.f6897a.m10349p(); } }
[ "lebedev1537@gmail.com" ]
lebedev1537@gmail.com
3794a4e5bd75cb13ae8222e49b395c9ea7b03fc9
c76ab20fda247867566b1057700cd2f161c4293c
/src/main/java/com/feed_the_beast/mods/money/shop/ShopEntry.java
81792af11bc414ee1f464833e66fc403286f9a7c
[]
no_license
attas151/FTB-Money
69b1a50d2b11b5e9bdfe13c72510db0b1a6887bc
6edfc5a92866b9396eaebf6d5c0104814decbfbc
refs/heads/master
2020-09-06T09:39:03.185501
2019-10-26T00:09:24
2019-10-26T00:09:24
220,389,254
0
0
null
2019-11-08T04:52:39
2019-11-08T04:52:38
null
UTF-8
Java
false
false
3,598
java
package com.feed_the_beast.mods.money.shop; import com.feed_the_beast.ftblib.lib.config.ConfigGroup; import com.feed_the_beast.ftblib.lib.config.ConfigItemStack; import com.feed_the_beast.ftblib.lib.math.BlockDimPos; import com.feed_the_beast.ftblib.lib.util.StringUtils; import com.feed_the_beast.ftbquests.quest.QuestData; import com.feed_the_beast.ftbquests.quest.QuestObject; import com.feed_the_beast.ftbquests.quest.QuestObjectType; import com.feed_the_beast.ftbquests.util.ConfigQuestObject; import com.latmod.mods.itemfilters.item.ItemStackSerializer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.INBTSerializable; import javax.annotation.Nullable; import java.util.UUID; /** * @author LatvianModder */ public class ShopEntry implements INBTSerializable<NBTTagCompound> { public final ShopTab tab; public String page = ""; public ItemStack stack = ItemStack.EMPTY; public long buy = 0L; public long sell = 0L; public BlockDimPos stock = null; public UUID createdBy = null; public int lock = 0; public boolean disabledServer = false; public ShopEntry(ShopTab t) { tab = t; } @Override public NBTTagCompound serializeNBT() { NBTTagCompound nbt = new NBTTagCompound(); nbt.setTag("item", ItemStackSerializer.write(stack, false)); if (buy > 0L) { nbt.setLong("buy", buy); } if (sell > 0L) { nbt.setLong("sell", sell); } if (stock != null) { nbt.setIntArray("stock", new int[] {stock.posX, stock.posY, stock.posZ, stock.dim}); } if (createdBy != null) { nbt.setString("created_by", StringUtils.fromUUID(createdBy)); } if (lock != 0) { nbt.setInteger("lock", lock); } if (disabledServer) { nbt.setBoolean("disabled_server", true); } return nbt; } @Override public void deserializeNBT(NBTTagCompound nbt) { page = nbt.getString("page"); stack = ItemStackSerializer.read(nbt.getTag("item")); buy = nbt.getLong("buy"); sell = nbt.getLong("sell"); int[] p = nbt.getIntArray("stock"); stock = p.length == 4 ? new BlockDimPos(p[0], p[1], p[2], p[3]) : null; createdBy = StringUtils.fromString(nbt.getString("created_by")); lock = nbt.getInteger("lock"); if (lock == 0 && nbt.hasKey("lock")) { String slock = nbt.getString("lock"); if (slock.startsWith("ftbquests:")) { try { lock = Integer.decode(slock.substring(10)); } catch (Exception ex) { } } } disabledServer = nbt.getBoolean("disabled_server"); } public boolean isUnlocked(@Nullable QuestData data) { if (lock == 0) { return true; } else if (data == null) { return false; } QuestObject object = tab.shop.file.get(lock); return object != null && object.isComplete(data); } public void getConfig(ConfigGroup group) { group.add("item", new ConfigItemStack.SimpleStack(() -> stack, v -> stack = v), new ConfigItemStack(ItemStack.EMPTY)); group.addLong("buy", () -> buy, v -> buy = v, 1L, 0L, Long.MAX_VALUE); //group.addLong("sell", () -> sell, v -> sell = v, 0L, 0L, Long.MAX_VALUE); group.add("lock", new ConfigQuestObject(tab.shop.file, lock, QuestObjectType.ALL_PROGRESSING_OR_NULL) { @Override public void setObject(int v) { lock = v; } @Override public int getObject() { return lock; } }, new ConfigQuestObject(tab.shop.file, 0, QuestObjectType.ALL_PROGRESSING_OR_NULL)); group.addBool("disabled_server", () -> disabledServer, v -> disabledServer = v, false); } public int getIndex() { return tab.entries.indexOf(this); } }
[ "latvianmodder@gmail.com" ]
latvianmodder@gmail.com
88dcf1cea1b5bf77cd6afcabb0d65a90ab50f317
4c214a6fdbc4334d5f386f48529f644398e09a1e
/Chapter13/Oracle/Gradle/WindowFunctions/CumeDist/src/main/java/com/classicmodels/repository/ClassicModelsRepository.java
7867abe9bb72de5147b352ca402235aa2699e4b6
[ "MIT" ]
permissive
PacktPublishing/jOOQ-Masterclass
3dfcebe369f6b080b6df987eb1536673f6f2073b
410b7c63c5b018a6f6ae40285de12d2c591d4a9f
refs/heads/master
2023-01-23T00:50:14.726939
2023-01-18T10:13:15
2023-01-18T10:13:15
295,348,949
27
17
null
null
null
null
UTF-8
Java
false
false
3,340
java
package com.classicmodels.repository; import java.math.BigDecimal; import static jooq.generated.tables.Employee.EMPLOYEE; import static jooq.generated.tables.Sale.SALE; import org.jooq.DSLContext; import static org.jooq.impl.DSL.cast; import static org.jooq.impl.DSL.concat; import static org.jooq.impl.DSL.count; import static org.jooq.impl.DSL.cumeDist; import static org.jooq.impl.DSL.field; import static org.jooq.impl.DSL.inline; import static org.jooq.impl.DSL.name; import static org.jooq.impl.DSL.round; import static org.jooq.impl.DSL.select; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; @Repository @Transactional(readOnly = true) public class ClassicModelsRepository { private final DSLContext ctx; public ClassicModelsRepository(DSLContext ctx) { this.ctx = ctx; } /* The CUME_DIST() is a window function that returns the cumulative distribution of a value within a set of values. It represents the number of rows with values less than or equal to that row’s value divided by the total number of rows. The returned value of the CUME_DIST() function is greater than zero and less than or equal one (0 < CUME_DIST() <= 1). The repeated column values receive the same CUME_DIST() value. */ public void cumeDistSalary() { ctx.select(EMPLOYEE.FIRST_NAME, EMPLOYEE.LAST_NAME, EMPLOYEE.SALARY, round(cumeDist().over().orderBy(EMPLOYEE.SALARY), 2).as("cume_dist")) .from(EMPLOYEE) .fetch(); // emulate CUME_DIST() ctx.select(EMPLOYEE.FIRST_NAME, EMPLOYEE.LAST_NAME, EMPLOYEE.SALARY, round(((cast(count().over().orderBy(EMPLOYEE.SALARY).rangeUnboundedPreceding(), Double.class)).divide( count().over().orderBy(EMPLOYEE.SALARY).rangeBetweenUnboundedPreceding() .andUnboundedFollowing())), 2).as("cume_dist")) .from(EMPLOYEE) .fetch(); } public void get25PercentTopSales() { ctx.select().from( select(concat(EMPLOYEE.FIRST_NAME, inline(" "), EMPLOYEE.LAST_NAME).as("name"), SALE.SALE_, SALE.FISCAL_YEAR, cumeDist().over().partitionBy(SALE.FISCAL_YEAR) .orderBy(SALE.SALE_.desc()).as("cume_dist")) .from(EMPLOYEE) .join(SALE) .on(EMPLOYEE.EMPLOYEE_NUMBER.eq(SALE.EMPLOYEE_NUMBER) .and(SALE.FISCAL_YEAR.in(2003, 2004))).asTable("t")) .where(field(name("t", "cume_dist")).lt(0.25)) .fetch(); // same query via the QUALIFY clause ctx.select(concat(EMPLOYEE.FIRST_NAME, inline(" "), EMPLOYEE.LAST_NAME).as("name"), SALE.SALE_, SALE.FISCAL_YEAR) .from(EMPLOYEE) .join(SALE) .on(EMPLOYEE.EMPLOYEE_NUMBER.eq(SALE.EMPLOYEE_NUMBER) .and(SALE.FISCAL_YEAR.in(2003, 2004))) .qualify(cumeDist().over().partitionBy(SALE.FISCAL_YEAR) .orderBy(SALE.SALE_.desc()).lt(BigDecimal.valueOf(0.25))) .fetch(); } }
[ "leoprivacy@yahoo.com" ]
leoprivacy@yahoo.com
d42effa198e9c484f9675332fdc0efb1300e0e86
fd49852c3426acf214b390c33927b5a30aeb0e0a
/aosp/javalib/android/bluetooth/SdpPseRecord.java
65a2867bf753191fc8ceffa12bea511a89f49404
[]
no_license
HanChangHun/MobilePlus-Prototype
fb72a49d4caa04bce6edb4bc060123c238a6a94e
3047c44a0a2859bf597870b9bf295cf321358de7
refs/heads/main
2023-06-10T19:51:23.186241
2021-06-26T08:28:58
2021-06-26T08:28:58
333,411,414
0
0
null
null
null
null
UTF-8
Java
false
false
4,568
java
package android.bluetooth; import android.os.Parcel; import android.os.Parcelable; public class SdpPseRecord implements Parcelable { public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { public SdpPseRecord createFromParcel(Parcel param1Parcel) { return new SdpPseRecord(param1Parcel); } public SdpPseRecord[] newArray(int param1Int) { return new SdpPseRecord[param1Int]; } }; private final int mL2capPsm; private final int mProfileVersion; private final int mRfcommChannelNumber; private final String mServiceName; private final int mSupportedFeatures; private final int mSupportedRepositories; public SdpPseRecord(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, String paramString) { this.mL2capPsm = paramInt1; this.mRfcommChannelNumber = paramInt2; this.mProfileVersion = paramInt3; this.mSupportedFeatures = paramInt4; this.mSupportedRepositories = paramInt5; this.mServiceName = paramString; } public SdpPseRecord(Parcel paramParcel) { this.mRfcommChannelNumber = paramParcel.readInt(); this.mL2capPsm = paramParcel.readInt(); this.mProfileVersion = paramParcel.readInt(); this.mSupportedFeatures = paramParcel.readInt(); this.mSupportedRepositories = paramParcel.readInt(); this.mServiceName = paramParcel.readString(); } public int describeContents() { return 0; } public int getL2capPsm() { return this.mL2capPsm; } public int getProfileVersion() { return this.mProfileVersion; } public int getRfcommChannelNumber() { return this.mRfcommChannelNumber; } public String getServiceName() { return this.mServiceName; } public int getSupportedFeatures() { return this.mSupportedFeatures; } public int getSupportedRepositories() { return this.mSupportedRepositories; } public String toString() { String str1 = "Bluetooth MNS SDP Record:\n"; if (this.mRfcommChannelNumber != -1) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("Bluetooth MNS SDP Record:\n"); stringBuilder.append("RFCOMM Chan Number: "); stringBuilder.append(this.mRfcommChannelNumber); stringBuilder.append("\n"); str1 = stringBuilder.toString(); } String str2 = str1; if (this.mL2capPsm != -1) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(str1); stringBuilder.append("L2CAP PSM: "); stringBuilder.append(this.mL2capPsm); stringBuilder.append("\n"); str2 = stringBuilder.toString(); } str1 = str2; if (this.mProfileVersion != -1) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(str2); stringBuilder.append("profile version: "); stringBuilder.append(this.mProfileVersion); stringBuilder.append("\n"); str1 = stringBuilder.toString(); } String str3 = str1; if (this.mServiceName != null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(str1); stringBuilder.append("Service Name: "); stringBuilder.append(this.mServiceName); stringBuilder.append("\n"); str3 = stringBuilder.toString(); } str2 = str3; if (this.mSupportedFeatures != -1) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(str3); stringBuilder.append("Supported features: "); stringBuilder.append(this.mSupportedFeatures); stringBuilder.append("\n"); str2 = stringBuilder.toString(); } str1 = str2; if (this.mSupportedRepositories != -1) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(str2); stringBuilder.append("Supported repositories: "); stringBuilder.append(this.mSupportedRepositories); stringBuilder.append("\n"); str1 = stringBuilder.toString(); } return str1; } public void writeToParcel(Parcel paramParcel, int paramInt) { paramParcel.writeInt(this.mRfcommChannelNumber); paramParcel.writeInt(this.mL2capPsm); paramParcel.writeInt(this.mProfileVersion); paramParcel.writeInt(this.mSupportedFeatures); paramParcel.writeInt(this.mSupportedRepositories); paramParcel.writeString(this.mServiceName); } } /* Location: /home/chun/Desktop/temp/!/android/bluetooth/SdpPseRecord.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "ehwjs1914@naver.com" ]
ehwjs1914@naver.com
48284068ce6668094770a3b5c4facb41312234cd
1f3c00468850bc6e7794cb70efd8dd1c73eda1b5
/smartTraffic/Code/SThighway/highwaycenter/com/highwaycenter/bzbx/model/HJcBzbxlx.java
dff02dc0f68f4b4f08a4a3a2b1ba03e271283511
[]
no_license
litcas/PRJ
2861f3eabe163465fb640b5259d0b946a3d3778a
2cceb861502d8b7b0f54e4b99c50469b3c97b63a
refs/heads/master
2021-06-27T19:32:47.168612
2017-09-17T05:44:31
2017-09-17T05:44:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
638
java
package com.highwaycenter.bzbx.model; public class HJcBzbxlx implements java.io.Serializable { private static final long serialVersionUID = 5460254969152992310L; private Integer bzbxlxbh; private String bzbxlxmc; public HJcBzbxlx(){ } public HJcBzbxlx(Integer bzbxlxbh, String bzbxlxmc) { super(); this.bzbxlxbh = bzbxlxbh; this.bzbxlxmc = bzbxlxmc; } public Integer getBzbxlxbh() { return bzbxlxbh; } public void setBzbxlxbh(Integer bzbxlxbh) { this.bzbxlxbh = bzbxlxbh; } public String getBzbxlxmc() { return bzbxlxmc; } public void setBzbxlxmc(String bzbxlxmc) { this.bzbxlxmc = bzbxlxmc; } }
[ "393054246@qq.com" ]
393054246@qq.com
7d076fda31d4d0c685d16654d2433e9219ca87e6
a61dd82929de8b10fdcf5867eaa9d1ed64815133
/src/main/java/io/swagger/client/model/FilepoolPolicyFileMatchingPattern.java
f56ff4da8d72f0dc52754fa5c90e7397dd066876
[ "MIT" ]
permissive
jcsvall/isilon_sdk_java
2fbc49bb76acc515f53b82a7b29b8ab38a36a38e
a2d0a2c262afae481418a26e7a10f2b86534c011
refs/heads/master
2020-09-06T02:46:32.006925
2018-04-20T00:12:46
2018-04-20T00:12:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,981
java
/* * Isilon SDK * Isilon SDK - Language bindings for the OneFS API * * OpenAPI spec version: 5 * Contact: sdk@isilon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package io.swagger.client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import io.swagger.client.model.FilepoolPolicyFileMatchingPatternOrCriteriaItem; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * FilepoolPolicyFileMatchingPattern */ @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-04-19T15:41:52.549-07:00") public class FilepoolPolicyFileMatchingPattern { @SerializedName("or_criteria") private List<FilepoolPolicyFileMatchingPatternOrCriteriaItem> orCriteria = new ArrayList<FilepoolPolicyFileMatchingPatternOrCriteriaItem>(); public FilepoolPolicyFileMatchingPattern orCriteria(List<FilepoolPolicyFileMatchingPatternOrCriteriaItem> orCriteria) { this.orCriteria = orCriteria; return this; } public FilepoolPolicyFileMatchingPattern addOrCriteriaItem(FilepoolPolicyFileMatchingPatternOrCriteriaItem orCriteriaItem) { this.orCriteria.add(orCriteriaItem); return this; } /** * Get orCriteria * @return orCriteria **/ @ApiModelProperty(required = true, value = "") public List<FilepoolPolicyFileMatchingPatternOrCriteriaItem> getOrCriteria() { return orCriteria; } public void setOrCriteria(List<FilepoolPolicyFileMatchingPatternOrCriteriaItem> orCriteria) { this.orCriteria = orCriteria; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FilepoolPolicyFileMatchingPattern filepoolPolicyFileMatchingPattern = (FilepoolPolicyFileMatchingPattern) o; return Objects.equals(this.orCriteria, filepoolPolicyFileMatchingPattern.orCriteria); } @Override public int hashCode() { return Objects.hash(orCriteria); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FilepoolPolicyFileMatchingPattern {\n"); sb.append(" orCriteria: ").append(toIndentedString(orCriteria)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "Brandon.Krueger@isilon.com" ]
Brandon.Krueger@isilon.com
be4b939dd1b18010542b0f5908999bd52ce237a4
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
/Crawler/data/PDFTextParser.java
63face510d73bbeb1a9ef0f867b50237174be602
[]
no_license
NayrozD/DD2476-Project
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
94dfb3c0a470527b069e2e0fd9ee375787ee5532
refs/heads/master
2023-03-18T04:04:59.111664
2021-03-10T15:03:07
2021-03-10T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,160
java
12 https://raw.githubusercontent.com/Pingvin235/bgerp/master/srcx/test/ru/bgcrm/test/exp/PDFTextParser.java package ru.bgcrm.test.exp; /* import java.io.File; import java.io.FileInputStream; import java.io.PrintWriter; import org.apache.pdfbox.cos.COSDocument; import org.apache.pdfbox.pdfparser.PDFParser; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocumentInformation; import org.apache.pdfbox.util.PDFTextStripper; public class PDFTextParser { // PDFTextParser Constructor public PDFTextParser() {} // Extract text from PDF Document String pdftoText( String fileName ) { try { PDFParser parser = new PDFParser( new FileInputStream( fileName ) ); parser.parse(); COSDocument cosDoc = parser.getDocument(); PDFTextStripper pdfStripper = new PDFTextStripper(); PDDocument pdDoc = new PDDocument( cosDoc ); return pdfStripper.getText( pdDoc ); } catch( Exception e ) { e.printStackTrace(); } return null; } // Write the parsed text from PDF to a file void writeTexttoFile( String pdfText, String fileName ) { System.out.println( "\nWriting PDF text to output text file " + fileName + "...." ); try { PrintWriter pw = new PrintWriter( fileName ); pw.print( pdfText ); pw.close(); } catch( Exception e ) { System.out.println( "An exception occured in writing the pdf text to file." ); e.printStackTrace(); } System.out.println( "Done." ); } //Extracts text from a PDF Document and writes it to a text file public static void main( String args[] ) { args = new String[]{ "/home/shamil/tmp/test.pdf", "/home/shamil/tmp/test.pdf.txt" }; if( args.length != 2 ) { System.out.println( "Usage: java PDFTextParser " ); System.exit( 1 ); } PDFTextParser pdfTextParserObj = new PDFTextParser(); String pdfToText = pdfTextParserObj.pdftoText( args[0] ); if( pdfToText == null ) { System.out.println( "PDF to Text Conversion failed." ); } else { System.out.println( "\nThe text parsed from the PDF Document....\n" + pdfToText ); pdfTextParserObj.writeTexttoFile( pdfToText, args[1] ); } } } */
[ "veronika.cucorova@gmail.com" ]
veronika.cucorova@gmail.com
50b176ec0d508b0e7277744dc0c48496ff6473fe
45f05c515e311d16eb48094b6d6617d6b6987397
/lucihunt-lucene4.10/src/test/java/org/apache/lucene/index/TestNRTThreads.java
529e12a26f6b938b2788963f303a63bbc6cb9f64
[ "Apache-2.0" ]
permissive
lemonJun/LuciHunt
5328dd270e891e302bf985a1a2517dcaa95def9d
08c71f80be580e5ebcbb519eb2aff1f3cfee55a8
refs/heads/master
2021-01-18T19:32:47.065466
2017-05-03T09:52:13
2017-05-03T09:52:13
86,899,911
1
0
null
null
null
null
UTF-8
Java
false
false
5,350
java
package org.apache.lucene.index; /* * 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. */ import java.util.Set; import java.util.concurrent.ExecutorService; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.store.Directory; import org.apache.lucene.store.MockDirectoryWrapper; import org.apache.lucene.util.LuceneTestCase.SuppressCodecs; import org.junit.Before; // TODO // - mix in forceMerge, addIndexes // - randomoly mix in non-congruent docs @SuppressCodecs({ "SimpleText", "Memory", "Direct" }) public class TestNRTThreads extends ThreadedIndexingAndSearchingTestCase { private boolean useNonNrtReaders = true; @Before public void setUp() throws Exception { super.setUp(); useNonNrtReaders = random().nextBoolean(); } @Override protected void doSearching(ExecutorService es, long stopTime) throws Exception { boolean anyOpenDelFiles = false; DirectoryReader r = DirectoryReader.open(writer, true); while (System.currentTimeMillis() < stopTime && !failed.get()) { if (random().nextBoolean()) { if (VERBOSE) { System.out.println("TEST: now reopen r=" + r); } final DirectoryReader r2 = DirectoryReader.openIfChanged(r); if (r2 != null) { r.close(); r = r2; } } else { if (VERBOSE) { System.out.println("TEST: now close reader=" + r); } r.close(); writer.commit(); final Set<String> openDeletedFiles = ((MockDirectoryWrapper) dir).getOpenDeletedFiles(); if (openDeletedFiles.size() > 0) { System.out.println("OBD files: " + openDeletedFiles); } anyOpenDelFiles |= openDeletedFiles.size() > 0; //assertEquals("open but deleted: " + openDeletedFiles, 0, openDeletedFiles.size()); if (VERBOSE) { System.out.println("TEST: now open"); } r = DirectoryReader.open(writer, true); } if (VERBOSE) { System.out.println("TEST: got new reader=" + r); } //System.out.println("numDocs=" + r.numDocs() + " //openDelFileCount=" + dir.openDeleteFileCount()); if (r.numDocs() > 0) { fixedSearcher = new IndexSearcher(r, es); smokeTestSearcher(fixedSearcher); runSearchThreads(System.currentTimeMillis() + 500); } } r.close(); //System.out.println("numDocs=" + r.numDocs() + " openDelFileCount=" + dir.openDeleteFileCount()); final Set<String> openDeletedFiles = ((MockDirectoryWrapper) dir).getOpenDeletedFiles(); if (openDeletedFiles.size() > 0) { System.out.println("OBD files: " + openDeletedFiles); } anyOpenDelFiles |= openDeletedFiles.size() > 0; assertFalse("saw non-zero open-but-deleted count", anyOpenDelFiles); } @Override protected Directory getDirectory(Directory in) { assert in instanceof MockDirectoryWrapper; if (!useNonNrtReaders) ((MockDirectoryWrapper) in).setAssertNoDeleteOpenFile(true); return in; } @Override protected void doAfterWriter(ExecutorService es) throws Exception { // Force writer to do reader pooling, always, so that // all merged segments, even for merges before // doSearching is called, are warmed: writer.getReader().close(); } private IndexSearcher fixedSearcher; @Override protected IndexSearcher getCurrentSearcher() throws Exception { return fixedSearcher; } @Override protected void releaseSearcher(IndexSearcher s) throws Exception { if (s != fixedSearcher) { // Final searcher: s.getIndexReader().close(); } } @Override protected IndexSearcher getFinalSearcher() throws Exception { final IndexReader r2; if (useNonNrtReaders) { if (random().nextBoolean()) { r2 = writer.getReader(); } else { writer.commit(); r2 = DirectoryReader.open(dir); } } else { r2 = writer.getReader(); } return newSearcher(r2); } public void testNRTThreads() throws Exception { runTest("TestNRTThreads"); } }
[ "506526593@qq.com" ]
506526593@qq.com
cfab44a130f9938c87227038df03e9e756ea75c3
7a74f3ca59b5c19453c8ab78fdab162db5013fb2
/app/src/main/java/com/firstems/erp/helper/datetime/DateTimeHelper.java
83ea875c1e909dcb5f0f6cc8a82c2574f1e03f1c
[]
no_license
quoccuong15111997/1EMSERP
d6c7babfece6de58b3bc1bd6e1bf2dd453b05139
60b7084bb9baf8908fcf96fed09468ec8d2c5aaa
refs/heads/master
2022-12-28T16:13:33.737285
2020-10-16T11:18:08
2020-10-16T11:18:08
298,209,460
0
0
null
null
null
null
UTF-8
Java
false
false
660
java
package com.firstems.erp.helper.datetime; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; /** * Created by Nguyen Quoc Cuong on 7/24/2020. */ public class DateTimeHelper { public static String pad(int value) { if (value < 10) { return "0" + value; } else { return "" + value; } } public static Date getDateWithoutTimeUsingFormat() throws ParseException { SimpleDateFormat formatter = new SimpleDateFormat( "dd/MM/yyyy"); return formatter.parse(formatter.format(new Date(System.currentTimeMillis()))); } }
[ "42151329+quoccuong15111997@users.noreply.github.com" ]
42151329+quoccuong15111997@users.noreply.github.com
e6305aad307ee0d39f46b360302e1b5392b37c2e
ef87577a354a1b5b48179edd60814e83adc3210b
/spring-jms/src/main/java/jrout/tutorial/springjms/SpringJmsApplication.java
99974dd15661ca1cc8535d682a94e0c35ac66c63
[]
no_license
jayramrout/Batch30
9a58f91eb1fac2f06f67a9b2bd9e199e5c491223
00ab54dcdbe59041990949aa1754fd3ce553eafb
refs/heads/master
2022-06-26T19:04:12.624216
2019-08-27T02:13:06
2019-08-27T02:13:06
189,322,960
0
0
null
2022-06-21T01:29:09
2019-05-30T01:19:06
Java
UTF-8
Java
false
false
323
java
package jrout.tutorial.springjms; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringJmsApplication { public static void main(String[] args) { SpringApplication.run(SpringJmsApplication.class, args); } }
[ "jayram.rout@gmail.com" ]
jayram.rout@gmail.com
5f77d9697568cdd4c147f24c3869b0889bf0c119
6db5889f2a333de5a7f925a5ef3b07655db8151d
/src/main/java/com/kelan/core/shiro/DefaultSessionManager.java
ff509134e531c5ce0cf21e92062ff192611056e9
[]
no_license
gitofwyx/riding
2836abdb3ac70d89b16fef86804961952f75c1cf
4f3c55cf60fe32d47781ea35a886fa667856fd86
refs/heads/master
2020-03-10T11:50:12.031900
2018-04-13T07:21:05
2018-04-13T07:21:05
129,364,467
0
0
null
null
null
null
UTF-8
Java
false
false
6,049
java
package com.kelan.core.shiro; /*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. //Jad home page: http://www.kpdus.com/jad.html //Decompiler options: packimports(3) radix(10) lradix(10) //Source File Name: DefaultSessionManager.java import java.io.Serializable; import java.util.Collection; import java.util.Collections; import org.apache.log4j.Logger; import org.apache.shiro.cache.CacheManager; import org.apache.shiro.cache.CacheManagerAware; import org.apache.shiro.session.Session; import org.apache.shiro.session.UnknownSessionException; import org.apache.shiro.session.mgt.AbstractValidatingSessionManager; import org.apache.shiro.session.mgt.SessionContext; import org.apache.shiro.session.mgt.SessionFactory; import org.apache.shiro.session.mgt.SessionKey; import org.apache.shiro.session.mgt.SimpleSession; import org.apache.shiro.session.mgt.SimpleSessionFactory; import org.apache.shiro.session.mgt.eis.MemorySessionDAO; import org.apache.shiro.session.mgt.eis.SessionDAO; import com.kelan.riding.route.control.RouteController; // Referenced classes of package org.apache.shiro.session.mgt: // AbstractValidatingSessionManager, SimpleSessionFactory, SimpleSession, SessionFactory, // SessionKey, SessionContext public class DefaultSessionManager extends AbstractValidatingSessionManager implements CacheManagerAware { public DefaultSessionManager() { deleteInvalidSessions = true; sessionFactory = new SimpleSessionFactory(); sessionDAO = new MemorySessionDAO(); } public void setSessionDAO(SessionDAO sessionDAO) { this.sessionDAO = sessionDAO; applyCacheManagerToSessionDAO(); } public SessionDAO getSessionDAO() { return sessionDAO; } public SessionFactory getSessionFactory() { return sessionFactory; } public void setSessionFactory(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } public boolean isDeleteInvalidSessions() { return deleteInvalidSessions; } public void setDeleteInvalidSessions(boolean deleteInvalidSessions) { this.deleteInvalidSessions = deleteInvalidSessions; } public void setCacheManager(CacheManager cacheManager) { this.cacheManager = cacheManager; applyCacheManagerToSessionDAO(); } private void applyCacheManagerToSessionDAO() { if(cacheManager != null && sessionDAO != null && (sessionDAO instanceof CacheManagerAware)) ((CacheManagerAware)sessionDAO).setCacheManager(cacheManager); } protected Session doCreateSession(SessionContext context) { Session s = newSessionInstance(context); if(log.isTraceEnabled()) log.trace("Creating session for host {}"); create(s); return s; } protected Session newSessionInstance(SessionContext context) { return getSessionFactory().createSession(context); } protected void create(Session session) { if(log.isDebugEnabled()) log.debug((new StringBuilder()).append("Creating new EIS record for new session instance [").append(session).append("]").toString()); log.info("create"); sessionDAO.create(session); } protected void onStop(Session session) { if(session instanceof SimpleSession) { SimpleSession ss = (SimpleSession)session; java.util.Date stopTs = ss.getStopTimestamp(); ss.setLastAccessTime(stopTs); } onChange(session); } protected void afterStopped(Session session) { if(isDeleteInvalidSessions()) delete(session); } protected void onExpiration(Session session) { if(session instanceof SimpleSession) ((SimpleSession)session).setExpired(true); onChange(session); } protected void afterExpired(Session session) { if(isDeleteInvalidSessions()) delete(session); } protected void onChange(Session session) { sessionDAO.update(session); } protected Session retrieveSession(SessionKey sessionKey) throws UnknownSessionException { Serializable sessionId = getSessionId(sessionKey); if(sessionId == null) { log.debug("Unable to resolve session ID from SessionKey [{}]. Returning null to indicate a session could not be found."); return null; } Session s = retrieveSessionFromDataSource(sessionId); if(s == null) { String msg = (new StringBuilder()).append("Could not find session with ID [").append(sessionId).append("]").toString(); throw new UnknownSessionException(msg); } else { return s; } } protected Serializable getSessionId(SessionKey sessionKey) { return sessionKey.getSessionId(); } protected Session retrieveSessionFromDataSource(Serializable sessionId) throws UnknownSessionException { return sessionDAO.readSession(sessionId); } protected void delete(Session session) { sessionDAO.delete(session); } protected Collection getActiveSessions() { Collection active = sessionDAO.getActiveSessions(); return ((Collection) (active == null ? Collections.emptySet() : active)); } private static final Logger log = Logger.getLogger(RouteController.class); //private static final Logger log = LoggerFactory.getLogger(com/kelan/core/shiro/DefaultSessionManager); private SessionFactory sessionFactory; protected SessionDAO sessionDAO; private CacheManager cacheManager; private boolean deleteInvalidSessions; } /* DECOMPILATION REPORT Decompiled from: E:\tools\maven\repository\org\apache\shiro\shiro-core\1.2.3\shiro-core-1.2.3.jar Total time: 571 ms Jad reported messages/errors: Exit status: 0 Caught exceptions: */
[ "“" ]
2d75c875a95b25a34c057a952ed3ab0361302e69
3bb9e1a187cb72e2620a40aa208bf94e5cee46f5
/mobile_catalog/src/ong/eu/soon/mobile/json/ifx/element/SecuredAcctRef.java
26dac73a24787de55f58a5086780e7141a9722aa
[]
no_license
eusoon/Mobile-Catalog
2e6f766864ea25f659f87548559502358ac5466c
869d7588447117b751fcd1387cd84be0bd66ef26
refs/heads/master
2021-01-22T23:49:12.717052
2013-12-10T08:22:20
2013-12-10T08:22:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
138
java
package ong.eu.soon.mobile.json.ifx.element; public class SecuredAcctRef extends AcctRef { protected SecuredAcctRef(){ } }
[ "eusoon@gmail.com" ]
eusoon@gmail.com
289df07ebc7b3297bec183b25e6089d8594a1978
44f6ce854b4c6d6d1065b118644640abf075f633
/PetCollege/app/src/main/java/com/nellaibill/petcollege/ViewStaffLocation.java
938d4c230a1d9ebcce73d2d8fcca0b57c59b7f47
[]
no_license
mdsaleem1804/Android
d3d42bf2d3d9a467644699bbc588fd84c52e69ef
94c152fd2f19639bc6dbe875cf87c41f3b58159f
refs/heads/master
2022-11-13T02:14:18.067545
2020-06-28T12:29:53
2020-06-28T12:29:53
275,575,426
0
0
null
null
null
null
UTF-8
Java
false
false
2,134
java
package com.nellaibill.petcollege; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.os.StrictMode; import android.support.v7.app.AppCompatActivity; import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.Toast; public class ViewStaffLocation extends AppCompatActivity { WebView xWebView; WebSettings xWebSettings; String xUrl; Bundle xBundle; Intent xIntent; SimpleGetterAndSetter obj; DataBaseConnection mCon; private SQLiteDatabase db; private Cursor xCursor; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); openDatabase(); if (android.os.Build.VERSION.SDK_INT > 9) { StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder() .permitAll().build(); StrictMode.setThreadPolicy(policy); } Bundle b = new Bundle(); b = getIntent().getExtras(); String name = b.getString("selectedname"); setContentView(R.layout.webform); obj = new SimpleGetterAndSetter(); try { String xQry = "select * from staff_details where username='" + name + "'"; xCursor = db.rawQuery(xQry, null); while (xCursor.moveToNext()) { xUrl = "http://maps.google.com/?q=" + xCursor.getString(xCursor.getColumnIndex("stafflat")) + "," + xCursor.getString(xCursor.getColumnIndex("stafflong")); } xWebView = (WebView) findViewById(R.id.webView1); xWebSettings = xWebView.getSettings(); xWebSettings.setJavaScriptEnabled(true); if (xUrl != null) xWebView.loadUrl(xUrl); } catch (Exception e) { Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_LONG).show(); } } protected void openDatabase() { db = openOrCreateDatabase("petcollege.db", Context.MODE_PRIVATE, null); } }
[ "mdsaleem1804@gmail.com" ]
mdsaleem1804@gmail.com
0641f575bcb6c6cac18af52bc3a64bf69f13d8ed
836ca471d581608233298fa7607f0df732ef2f93
/springboot-shiro/src/main/java/com/geekerstar/shiro/BaseExceptionHandler.java
ebcdd6e23c832727818cc7af1274c735c93f9856
[]
no_license
geekerstar/springboot-tutorial
4c33b16e1e74b2416b1b6e03429be63f660693b6
00b03a56cf183355746164feee0617f3e95f342c
refs/heads/master
2022-12-01T21:01:58.247315
2021-08-18T08:53:09
2021-08-18T08:53:09
202,674,686
5
5
null
2022-11-16T08:57:36
2019-08-16T06:51:49
Java
UTF-8
Java
false
false
749
java
package com.geekerstar.shiro; import org.apache.shiro.authz.AuthorizationException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * 自定义的公共异常处理器 * 1.声明异常处理器 * 2.对异常统一处理 */ @ControllerAdvice public class BaseExceptionHandler { @ExceptionHandler(value = AuthorizationException.class) @ResponseBody public String error(HttpServletRequest request, HttpServletResponse response, AuthorizationException e) { return "未授权"; } }
[ "247507792@qq.com" ]
247507792@qq.com
0fab6f457cf1d04246d6fd606d4f700b798089a9
6a77e45b9b1c2c5ffa6dbb6214db6a0a01662a7c
/src/main/java/com/nntu/myapp/repository/AuthorityRepository.java
e2d275b3d894cb238b9bf69b1b0932b081a1413a
[]
no_license
EkaterinaAn99/jhipster-5422
3a5106038102ab12d19c5fb2f42d887098594a65
702a7eb57881cf1f3eb5d626fbc6ccfb79997423
refs/heads/main
2023-01-28T02:46:41.932176
2020-12-09T10:22:43
2020-12-09T10:22:43
319,268,291
0
0
null
2020-12-09T10:22:44
2020-12-07T09:29:12
Java
UTF-8
Java
false
false
292
java
package com.nntu.myapp.repository; import com.nntu.myapp.domain.Authority; import org.springframework.data.jpa.repository.JpaRepository; /** * Spring Data JPA repository for the {@link Authority} entity. */ public interface AuthorityRepository extends JpaRepository<Authority, String> {}
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
0cac3d52cfd5be361e54b643130a682fa9a8ca83
8144109825c42ea7d1aac99e059e2e3cd4831faf
/Advjava/CollectionInterface/src/com/jlcindia/jdbc/Lab8.java
de66f0d9e1210b2739d39cabec94ceca26bfd77f
[]
no_license
binodjava/JavaPractice
bf39eba39390dff0fc2aa4b427f65d4c889a50eb
3c0a774749eed6804d8e85298d2053b191e9c9b2
refs/heads/master
2021-05-10T21:20:48.779486
2018-01-25T06:37:41
2018-01-25T06:37:41
118,221,132
0
0
null
null
null
null
UTF-8
Java
false
false
1,116
java
package com.jlcindia.jdbc; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.Scanner; public class Lab8 { public static void main(String[] args) { Connection con = null; Statement st = null; try { con = JDBCUtil.getMySQLConnection(); //con = JDBCUtil.getOracleConnection(); Scanner sc = new Scanner(System.in); System.out.println("Enter sid :"); int sid = sc.nextInt(); sc.nextLine(); System.out.println("Enter Name: "); String nm = sc.nextLine(); System.out.println("Enter Email"); String em = sc.nextLine(); System.out.println("Enter Phone"); long phn = sc.nextLong(); String qry = String.format("insert into jlcstudents values (%d,'%s','%s',%d)", sid, nm,em, phn); System.out.println(qry); st = con.createStatement(); int x = st.executeUpdate(qry); if (x == 1) System.out.println("Record inserted successfully"); else System.out.println("No Record Found"); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtil.cleanup(st, con); } } }
[ "binodk.java@gmail.com" ]
binodk.java@gmail.com
9133febaaacb6f2cf61033f15a8f6942257b277b
4be2623b3cc95e039f214f2ad8d9fc14fa404ee9
/src/ABU Exam/june10_2020/Problem4.java
76039fd0272a34e4df97d5220be087e805d34acc
[]
no_license
maainul/Java
df6364f57e5c4cdca3ff83894b633f19197b541e
81681c9f48946b07c4f839f1db6d9953fe47a9df
refs/heads/master
2023-04-26T22:13:27.395026
2021-04-29T20:47:41
2021-04-29T20:47:41
229,538,242
0
0
null
null
null
null
UTF-8
Java
false
false
2,591
java
package june10_2020; /* Merge two sorted linked lists Write a SortedMerge() function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in increasing order. SortedMerge() should return the new list. The new list should be made by splicing together the nodes of the first two lists. For example if the first linked list a is 5->10->15 and the other linked list b is 2->3->20, then SortedMerge() should return a pointer to the head node of the merged list 2->3->5->10->15->20. */ public class Problem4 { ListNode head; class ListNode { int data; ListNode next; public ListNode(int data) { this.data = data; this.next = null; } } private void insertAtLast(int data) { ListNode newNode = new ListNode(data); ListNode c = head; if (c == null) { head = newNode; } else { while (c.next != null) { c = c.next; } c.next = newNode; } } public void display() { ListNode cur = head; while (cur != null) { System.out.print(cur.data + "-->"); cur = cur.next; } } private ListNode mergeSort(ListNode head) { if (head == null || head.next == null) { return head; } ListNode middle = getMiddle(head); ListNode nextOfMiddle = middle.next; middle.next = null; ListNode left = mergeSort(head); ListNode right = mergeSort(nextOfMiddle); ListNode sortedlist = merge(left, right); return sortedlist; } // it will return middle value private ListNode getMiddle(ListNode head) { if (head == null) { return head; } ListNode first = head.next; ListNode slow = head; while (first != null && first.next != null) { slow = slow.next; first = first.next.next; } return slow; } private ListNode merge(ListNode left, ListNode right) { if (left == null) { return right; } if (right == null) { return left; } ListNode result = null; if (left.data <= right.data) { result = left; result.next = merge(left.next, right); } else { result = right; result.next = merge(left, right.next); } return result; } public static void main(String[] args) { Problem4 obj = new Problem4(); obj.insertAtLast(5); obj.insertAtLast(9); obj.insertAtLast(19); obj.insertAtLast(3); obj.insertAtLast(15); obj.insertAtLast(12); System.out.println("\nBefore Merge sort"); obj.display(); System.out.println("\nAfter Merge sort"); obj.mergeSort(obj.head); obj.display(); } }
[ "mainul080@yahoo.com" ]
mainul080@yahoo.com
8dbad278186efc65f0a09141b06d23a5921434fc
a5fa17b16e35033aea9e0c99806c8d2778f2d777
/src/main/java/uk/co/mruoc/race/gui/ShowLapNumberPopupWindowActionFactory.java
5fac23bd74dbb9b9850d317e91764c445c991bc7
[]
no_license
michaelruocco/race-simulation
b15114c1752f9ca92cbdc08316324efb0b76775e
a4dee1165da33685b816384e20b19abe578ee288
refs/heads/master
2021-01-09T06:30:44.481447
2018-02-13T23:52:11
2018-02-13T23:52:11
80,999,549
0
0
null
null
null
null
UTF-8
Java
false
false
656
java
package uk.co.mruoc.race.gui; import javax.swing.*; import javax.swing.table.TableCellRenderer; public class ShowLapNumberPopupWindowActionFactory extends ShowStatPopupWindowActionFactory { @Override protected CarStatTableModel buildTableModel() { return new LapNumberTableModel(); } @Override protected JInternalFrame buildWindow(CarStatTableModel tableModel, TableCellRenderer cellRenderer) { return new LapNumberPopupWindow(tableModel, cellRenderer); } @Override protected ShowPopupWindowAction buildAction(JInternalFrame window) { return new ShowLapNumberPopupWindowAction(window); } }
[ "michael.ruocco@hotmail.com" ]
michael.ruocco@hotmail.com
12576822d6dd3153e613a5e7475d91801de11008
3855cc415414ef455b956864512b62373c0a7390
/src/main/java/com/demo/travelsociety/EditPersonalHomePageActivity.java
2016192069a37d9af7890644288a667df76112c6
[]
no_license
tiejiang/TravelWithMe
3bdfe9d78b55632fe08876e8a34a075d22ce53a3
9da83e0b626882dd60357a9ceb3adb6310d0742f
refs/heads/master
2021-01-21T14:33:42.914979
2017-06-24T14:50:34
2017-06-24T14:50:34
91,157,349
0
0
null
null
null
null
UTF-8
Java
false
false
8,234
java
package com.demo.travelsociety; import android.app.AlertDialog; import android.app.DatePickerDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.DatePicker; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import android.view.View.OnClickListener; import com.demo.travelsociety.utils.PopupWindowUtil; /** * 编辑个人主页页面 */ public class EditPersonalHomePageActivity extends AppCompatActivity implements OnClickListener{ private TextView tv_title_cancel, tv_title_ok; private RelativeLayout rl_edit_nick, ly_edit_sex, ly_edit_birthday, ly_edit_region, ly_edit_sign, ly_edit_job; private TextView tv_edit_nickname,tv_edit_sex,tv_edit_birthday,tv_edit_region,tv_edit_sign,tv_edit_job; private ImageView iv_edit_bg; private TextView tv_edit_bg; private RelativeLayout rl_edit_more_photo; private int mYear = 1990; private int mMonth = 0; private int mDay = 1; private ImageView iv_add; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_edit_personal_home_page); initView(); } private void initView(){ tv_title_cancel = (TextView)findViewById(R.id.tv_title_cancel); //取消 tv_title_cancel.setOnClickListener(this); tv_title_ok = (TextView)findViewById(R.id.tv_title_ok); // 完成 tv_title_ok.setOnClickListener(this); iv_edit_bg = (ImageView)findViewById(R.id.iv_edit_bg);// 人物封面背景 tv_edit_bg = (TextView)findViewById(R.id.tv_edit_bg); // 点击添加封面 tv_edit_bg.setOnClickListener(this); rl_edit_more_photo = (RelativeLayout)findViewById(R.id.rl_edit_more_photo);// 显示添加更多图片按钮 iv_add = (ImageView)findViewById(R.id.iv_add); // 加图片 iv_add.setOnClickListener(this); rl_edit_nick = (RelativeLayout)findViewById(R.id.rl_edit_nick);//昵称 rl_edit_nick.setOnClickListener(this); tv_edit_nickname = (TextView)findViewById(R.id.tv_edit_nickname); ly_edit_sex = (RelativeLayout)findViewById(R.id.ly_edit_sex);//性别 ly_edit_sex.setOnClickListener(this); tv_edit_sex = (TextView)findViewById(R.id.tv_edit_sex); ly_edit_birthday = (RelativeLayout)findViewById(R.id.ly_edit_birthday);//生日 ly_edit_birthday.setOnClickListener(this); tv_edit_birthday = (TextView)findViewById(R.id.tv_edit_birthday); ly_edit_region = (RelativeLayout)findViewById(R.id.ly_edit_region);//地区 ly_edit_region.setOnClickListener(this); tv_edit_region = (TextView)findViewById(R.id.tv_edit_region); ly_edit_sign = (RelativeLayout)findViewById(R.id.ly_edit_sign);//签名 ly_edit_sign.setOnClickListener(this); tv_edit_sign = (TextView)findViewById(R.id.tv_edit_sign); ly_edit_job = (RelativeLayout)findViewById(R.id.ly_edit_job);//职业 ly_edit_job.setOnClickListener(this); tv_edit_job = (TextView)findViewById(R.id.tv_edit_job); } @Override public void onClick(View view) { int id = view.getId(); if (id == R.id.tv_title_cancel){ finish(); }else if (id == R.id.tv_edit_bg){//点击添加封面图片 Intent intent = new Intent(this, AddPhotoActivity.class); startActivityForResult(intent, 2); }else if (id == R.id.iv_add){ Intent intent = new Intent(this, AddPhotoActivity.class); startActivityForResult(intent, 3); } else if (id == R.id.tv_title_ok){ //完成 finish(); }else if (id == R.id.rl_edit_nick){ //昵称 Bundle bundle = new Bundle(); bundle.putString("title", "昵称"); bundle.putString("edit", tv_edit_nickname.getText().toString()); Intent intent = new Intent(this, EditTextActivity.class); intent.putExtras(bundle); startActivityForResult(intent, 0); }else if (id == R.id.ly_edit_sex){ //性别 PopupWindowUtil.showWindow(this, view, new PopupWindowUtil.OnPopupWindowClickListener(){ @Override public void onClickIndex(int index) { if (index == 0){// 男 tv_edit_sex.setText("男"); }else if (index == 1){ //女 tv_edit_sex.setText("女"); } } }); }else if (id == R.id.ly_edit_birthday){ //生日 showDatePickerCancelDialog(); }else if (id == R.id.ly_edit_region){ //地区 Intent intent = new Intent(this, CitySelecterActivity.class); startActivityForResult(intent, 4); /*String[] regions = getResources().getStringArray(R.array.area); selectDataDialog(regions, tv_edit_region);*/ }else if (id == R.id.ly_edit_sign){ //签名 Bundle bundle = new Bundle(); bundle.putString("title", "签名"); bundle.putString("edit", tv_edit_sign.getText().toString()); Intent intent = new Intent(this, EditTextActivity.class); intent.putExtras(bundle); startActivityForResult(intent, 1); }else if (id == R.id.ly_edit_job){ //职业 String[] jobs = getResources().getStringArray(R.array.job); selectDataDialog(jobs, tv_edit_job); } } /** * 选择数据 */ private void selectDataDialog(final String[] datas, final TextView view){ AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setItems(datas, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { view.setText(datas[i]); } }); builder.create().show(); } /** * 选择日期 */ private void showDatePickerCancelDialog() { DatePickerDialog datePickerDialog = new DatePickerDialog( this, mDateSetListener, mYear, mMonth, mDay); datePickerDialog.show(); } /** * 日期选择监听 */ private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { mYear = year; mMonth = monthOfYear; mDay = dayOfMonth; updateBirthdayDisplay(); } }; /** * 更新日期 */ private void updateBirthdayDisplay() { StringBuilder birthday = new StringBuilder(); birthday.append(mYear).append("-").append(mMonth + 1).append("-").append(mDay).toString(); tv_edit_birthday.setText(birthday); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 0 && resultCode == RESULT_OK){ tv_edit_nickname.setText(data.getStringExtra("name")); } else if (requestCode == 1 && resultCode == RESULT_OK){ tv_edit_sign.setText(data.getStringExtra("name")); } else if (requestCode == 2 && resultCode == RESULT_OK){ tv_edit_bg.setVisibility(View.GONE); rl_edit_more_photo.setVisibility(View.VISIBLE); String imagePath = data.getStringExtra("imagepath"); Bitmap bm = BitmapFactory.decodeFile(imagePath); iv_edit_bg.setImageBitmap(bm); } else if (requestCode == 3 && resultCode == RESULT_OK){ } else if (resultCode == RESULT_OK && requestCode == 4){ if (data != null){ String cityName = data.getStringExtra("cityName"); tv_edit_region.setText(cityName); } } } }
[ "315904145@qq.com" ]
315904145@qq.com
dfc3e36684aabfbdc8a7ec1c437b4584e8dd360b
7aa02f902ad330c70b0b34ec2d4eb3454c7a3fc1
/android/support/v4/app/C0046y.java
26fbe7647609b29685717eb35ddcc41768f3dd37
[]
no_license
hisabimbola/andexpensecal
5e42c7e687296fae478dfd39abee45fae362bc5b
c47e6f0a1a6e24fe1377d35381b7e7e37f1730ee
refs/heads/master
2021-01-19T15:20:25.262893
2016-08-11T16:00:49
2016-08-11T16:00:49
100,962,347
1
0
null
2017-08-21T14:48:33
2017-08-21T14:48:33
null
UTF-8
Java
false
false
761
java
package android.support.v4.app; import android.view.animation.Animation; import android.view.animation.Animation.AnimationListener; /* renamed from: android.support.v4.app.y */ class C0046y implements AnimationListener { final /* synthetic */ C0032l f312a; final /* synthetic */ C0043v f313b; C0046y(C0043v c0043v, C0032l c0032l) { this.f313b = c0043v; this.f312a = c0032l; } public void onAnimationEnd(Animation animation) { if (this.f312a.f234l != null) { this.f312a.f234l = null; this.f313b.m395a(this.f312a, this.f312a.f235m, 0, 0, false); } } public void onAnimationRepeat(Animation animation) { } public void onAnimationStart(Animation animation) { } }
[ "m.ravinther@yahoo.com" ]
m.ravinther@yahoo.com