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
ad5b650c848e73175d0ef56ae15b18fe016eb579
3b9cf2936abe0bb4d5507853a79d98f2d91af870
/vividus-plugin-visual/src/main/java/org/vividus/visual/engine/FileSystemBaselineRepository.java
dc682dd4daccc8e42bc92a1578d581f0f43de0c8
[ "Apache-2.0" ]
permissive
ALegchilov/vividus
ef8a4906efb0c2ff68fd624fde4d2e6d743bae9b
55bce7d2a7bcf5c43f17d34eb2c190dd6142f552
refs/heads/master
2020-09-08T16:50:21.014816
2019-11-12T10:40:45
2019-11-15T10:10:52
221,188,634
0
0
Apache-2.0
2019-11-12T10:15:40
2019-11-12T10:15:39
null
UTF-8
Java
false
false
2,907
java
/* * Copyright 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://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.vividus.visual.engine; import java.io.File; import java.io.IOException; import java.util.Optional; import javax.imageio.IIOException; import javax.imageio.ImageIO; import org.apache.tools.ant.util.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.vividus.bdd.resource.ResourceLoadException; import org.vividus.ui.web.util.ImageUtils; import org.vividus.util.ResourceUtils; import ru.yandex.qatools.ashot.Screenshot; public class FileSystemBaselineRepository implements IBaselineRepository { private static final Logger LOGGER = LoggerFactory.getLogger(FileSystemBaselineRepository.class); private File baselinesFolder; public void init() { if (!baselinesFolder.isAbsolute()) { String replacement = "/"; baselinesFolder = ResourceUtils.loadFile(FileSystemBaselineRepository.class, StringUtils.removePrefix(baselinesFolder.toString(), ".").replace("\\", replacement)); } } @Override public Optional<Screenshot> getBaseline(String baselineName) throws IOException { try { File baselineFile = new File(baselinesFolder, appendExtension(baselineName)); Optional<Screenshot> loadedScreenshot = Optional .ofNullable(ImageIO.read(baselineFile)) .map(Screenshot::new); if (loadedScreenshot.isEmpty()) { throw new ResourceLoadException("Unable to load baseline with path: " + baselineFile); } return loadedScreenshot; } catch (IIOException e) { return Optional.empty(); } } private String appendExtension(String baselineName) { return baselineName + ".png"; } @Override public void saveBaseline(Screenshot toSave, String baselineName) throws IOException { File baselineToSave = new File(baselinesFolder, baselineName); ImageUtils.writeAsPng(toSave.getImage(), baselineToSave); LOGGER.info("Baseline saved to: {}", appendExtension(baselineToSave.getAbsolutePath())); } public void setBaselinesFolder(File baselinesFolder) { this.baselinesFolder = baselinesFolder; } }
[ "valfirst@yandex.ru" ]
valfirst@yandex.ru
f3831be5ac5b3a6b6da7cb94c05f077daebfc261
35799bc446dcb271918e2b45aa83faf0f0826e74
/Mage.Sets/src/mage/cards/a/AgadeemTheUndercrypt.java
7b29c4fee10ff8cbee4c9d736b0fa0f3cfdd8a7b
[ "MIT" ]
permissive
adesst/mage
435a6c7723e628bfb69bc3bdd64b28c83d39f210
bfccd65ea3177fbcdf3dcda4b8d41059a15f3e77
refs/heads/master
2022-12-22T09:20:02.746613
2020-09-27T06:57:21
2020-09-27T06:57:21
291,254,823
0
0
MIT
2020-08-29T11:06:48
2020-08-29T11:06:47
null
UTF-8
Java
false
false
1,280
java
package mage.cards.a; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.costs.common.PayLifeCost; import mage.abilities.effects.common.TapSourceUnlessPaysEffect; import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import java.util.UUID; /** * @author TheElk801 */ public final class AgadeemTheUndercrypt extends CardImpl { public AgadeemTheUndercrypt(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); this.modalDFC = true; this.nightCard = true; // As Agadeem, the Undercrypt enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped. this.addAbility(new AsEntersBattlefieldAbility( new TapSourceUnlessPaysEffect(new PayLifeCost(3)), "you may pay 3 life. If you don't, it enters the battlefield tapped" )); // {T}: Add {B}. this.addAbility(new BlackManaAbility()); } private AgadeemTheUndercrypt(final AgadeemTheUndercrypt card) { super(card); } @Override public AgadeemTheUndercrypt copy() { return new AgadeemTheUndercrypt(this); } }
[ "theelk801@gmail.com" ]
theelk801@gmail.com
80733f625f97e4ed30b9fe43ed06d88a5dbf3cfd
40cd4da5514eb920e6a6889e82590e48720c3d38
/desktop/applis/apps/apps_util/expressionlanguageutil/src/main/java/code/expressionlanguage/guicompos/stds/FctSplitPaneIsOneTouchExpandable.java
35caacdc5dcdcd45cfc68e932a45e8d30eeca5ca
[]
no_license
Cardman/projects
02704237e81868f8cb614abb37468cebb4ef4b31
23a9477dd736795c3af10bccccb3cdfa10c8123c
refs/heads/master
2023-08-17T11:27:41.999350
2023-08-15T07:09:28
2023-08-15T07:09:28
34,724,613
4
0
null
2020-10-13T08:08:38
2015-04-28T10:39:03
Java
UTF-8
Java
false
false
822
java
package code.expressionlanguage.guicompos.stds; import code.expressionlanguage.AbstractExiting; import code.expressionlanguage.ContextEl; import code.expressionlanguage.exec.ArgumentWrapper; import code.expressionlanguage.exec.StackCall; import code.expressionlanguage.exec.util.ArgumentListCall; import code.expressionlanguage.guicompos.SplitPaneStruct; import code.expressionlanguage.stds.StdCaller; import code.expressionlanguage.structs.Struct; public final class FctSplitPaneIsOneTouchExpandable implements StdCaller { @Override public ArgumentWrapper call(AbstractExiting _exit, ContextEl _cont, Struct _instance, ArgumentListCall _firstArgs, StackCall _stackCall) { SplitPaneStruct strPan_ = (SplitPaneStruct) _instance; return new ArgumentWrapper(strPan_.isOneTouchExpandable()); } }
[ "f.desrochettes@gmail.com" ]
f.desrochettes@gmail.com
47385c5607e131d090d2aafb01b25b29aa347e4f
02085928a6ff6ce7a83f2d47ee0f3f79635cb632
/hello-concurrency/src/main/java/com/chen/concurrency/atomic/AtomicIntegerTest.java
4e3c10482d9bf0e92f97a897bb8403cef5b7a3a5
[]
no_license
leifchen/hello-java-maven
9eb63f17a799ca600442bd623bcf104a946a51cb
a8e298e9f506b213c962076158f47943b6b1fa65
refs/heads/master
2021-07-25T23:43:05.569419
2021-06-25T09:32:10
2021-06-25T09:32:10
186,780,295
0
0
null
2020-10-14T00:40:04
2019-05-15T08:11:55
Java
UTF-8
Java
false
false
1,634
java
package com.chen.concurrency.atomic; import com.chen.concurrency.annotation.ThreadSafe; import lombok.extern.slf4j.Slf4j; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Semaphore; import java.util.concurrent.atomic.AtomicInteger; /** * AtomicInteger的并发测试 * <p> * @Author LeifChen * @Date 2019-06-13 */ @Slf4j @ThreadSafe public class AtomicIntegerTest { /** * 请求总数 */ private static int CLIENT_TOTAL = 5000; /** * 并发执行线程数 */ private static int THREAD_TOTAL = 200; /** * 计数器 */ private static AtomicInteger count = new AtomicInteger(0); public static void main(String[] args) throws InterruptedException { ExecutorService executorService = Executors.newCachedThreadPool(); final Semaphore semaphore = new Semaphore(THREAD_TOTAL); final CountDownLatch countDownLatch = new CountDownLatch(CLIENT_TOTAL); for (int i = 0; i < CLIENT_TOTAL; i++) { executorService.execute(() -> { try { semaphore.acquire(); add(); semaphore.release(); } catch (InterruptedException e) { log.error("exception", e); } countDownLatch.countDown(); }); } countDownLatch.await(); executorService.shutdown(); log.info("test:{}", count); } private static void add() { count.incrementAndGet(); } }
[ "leifchen90@gmail.com" ]
leifchen90@gmail.com
0a1d1180c278f3c10e3a1d7776dabb0eddb63fe5
9310225eb939f9e4ac1e3112190e6564b890ac63
/kernel/kernel-impl/src/main/java/org/sakaiproject/authz/impl/SeriesIterator.java
eedb2e4d99953d0603ae7b9b0d05cd2febf2c114
[ "ECL-2.0" ]
permissive
deemsys/version-1.0
89754a8acafd62d37e0cdadf680ddc9970e6d707
cd45d9b7c5633915a18bd75723c615037a4eb7a5
refs/heads/master
2020-06-04T10:47:01.608886
2013-06-15T11:01:28
2013-06-15T11:01:28
10,705,153
1
0
null
null
null
null
UTF-8
Java
false
false
2,323
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/kernel/branches/kernel-1.3.x/kernel-impl/src/main/java/org/sakaiproject/authz/impl/SeriesIterator.java $ * $Id: SeriesIterator.java 51317 2008-08-24 04:38:02Z csev@umich.edu $ *********************************************************************************** * * Copyright (c) 2003, 2004, 2005, 2006, 2008 Sakai Foundation * * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.authz.impl; import java.util.Iterator; import java.util.NoSuchElementException; /** * <p> * SeriesIterator is an iterator over a series of other iterators. * </p> */ public class SeriesIterator implements Iterator { /** The enumeration over which this iterates. */ protected Iterator[] m_iterators = null; /** The m_iterators index that is current. */ protected int m_index = 0; /** * Construct to handle a series of two iterators. * * @param one * The first iterator. * @param two * The second iterator. */ public SeriesIterator(Iterator one, Iterator two) { m_iterators = new Iterator[2]; m_iterators[0] = one; m_iterators[1] = two; } // SeriesIterator public Object next() throws NoSuchElementException { while (!m_iterators[m_index].hasNext()) { m_index++; if (m_index >= m_iterators.length) throw new NoSuchElementException(); } return m_iterators[m_index].next(); } public boolean hasNext() { while (!m_iterators[m_index].hasNext()) { m_index++; if (m_index >= m_iterators.length) return false; } return true; } public void remove() { throw new UnsupportedOperationException(); } }
[ "sangee1229@gmail.com" ]
sangee1229@gmail.com
a6f1eaed3a78c9a29969d51ac3392417d65f397f
8350af19ec48687f4669475fa0403a2f340bf748
/legacy/Empire/src/com/tyrfing/games/id17/world/OceanMaterial.java
d8c6e904fe747e8e3bb1262a23251b924fbb7c6d
[ "MIT" ]
permissive
TyrfingX/TyrLib
cba252f507be5f0670e4b9bac79cf0f7e8d4ddae
f08e34f8cd9cc5514ba5297b5f69c692f8832099
refs/heads/master
2021-06-05T10:36:23.620234
2017-08-27T22:24:48
2017-08-27T22:24:48
5,216,810
0
0
null
null
null
null
UTF-8
Java
false
false
3,772
java
package com.tyrfing.games.id17.world; import com.tyrlib2.game.IUpdateable; import com.tyrlib2.graphics.lighting.Light; import com.tyrlib2.graphics.materials.DefaultMaterial3; import com.tyrlib2.graphics.renderer.Camera; import com.tyrlib2.graphics.renderer.Mesh; import com.tyrlib2.graphics.renderer.ProgramManager; import com.tyrlib2.graphics.renderer.Texture; import com.tyrlib2.graphics.renderer.TextureManager; import com.tyrlib2.graphics.renderer.TyrGL; import com.tyrlib2.graphics.scene.SceneManager; import com.tyrlib2.util.Color; public class OceanMaterial extends DefaultMaterial3 implements IUpdateable { private int waveTimeHandle; private float waveTime; private int bumpMapTextureHandle; private int viewDirectionHandle; private int fogMapHandle; private int sizeHandle; public OceanMaterial(String textureName, float repeatX, float repeatY, Color[] colors) { super(ProgramManager.getInstance().getProgram("OCEAN_PROGRAM"), textureName, repeatX, repeatY, colors); lighted = false; World.getInstance().getUpdater().addItem(this); } @Override public void updateHandles() { super.updateHandles(); //modelMatrixHandle = TyrGL.glGetUniformLocation(program.handle, "u_M"); waveTimeHandle = TyrGL.glGetUniformLocation(program.handle, "u_Time"); bumpMapTextureHandle = TyrGL.glGetUniformLocation(program.handle, "u_BumpMap"); viewDirectionHandle = TyrGL.glGetUniformLocation(program.handle, "u_CamPos"); lightPosHandle = TyrGL.glGetUniformLocation(program.handle, "u_LightPos"); fogMapHandle = TyrGL.glGetUniformLocation(program.handle, "u_FogMap"); sizeHandle = TyrGL.glGetUniformLocation(program.handle, "u_Size"); } @Override public void render(Mesh mesh, float[] modelMatrix) { super.render(mesh, modelMatrix); TyrGL.glUniform1f(waveTimeHandle, waveTime); Light light = SceneManager.getInstance().getLight(0); TyrGL.glUniform3f(lightPosHandle, light.getLightVector()[0], light.getLightVector()[1], light.getLightVector()[2]); Camera camera = SceneManager.getInstance().getActiveCamera(); TyrGL.glUniform3f(viewDirectionHandle, camera.getLookDirection().x, camera.getLookDirection().y, camera.getLookDirection().z); TyrGL.glUniform2f(sizeHandle, 1/repeatX, 1/repeatY); /* Matrix.setLookAtM( mvpMatrix, 0, 0,0,1, 0,0,0, 1,0,0); // Apply the projection and view transformation Matrix.multiplyMM(mvpMatrix, 0, mvpMatrix, 0, modelMatrix, 0); // Combine the rotation matrix with the projection and camera view TyrGL.glUniformMatrix4fv(modelMatrixHandle, 1, false, mvpMatrix, 0); */ } @Override protected void passTexture(int textureHandle) { super.passTexture(textureHandle); // Set the active texture unit to texture unit 1. TyrGL.glActiveTexture(TyrGL.GL_TEXTURE3); // Bind the texture to this unit. TyrGL.glBindTexture(TyrGL.GL_TEXTURE_2D, TextureManager.getInstance().getTexture("BUMP_MAP_TEST").getHandle()); // Tell the texture uniform sampler to use this texture in the shader by binding to texture unit 1. TyrGL.glUniform1i(bumpMapTextureHandle, 3); Texture fogMap = TextureManager.getInstance().getTexture("FOG_MAP"); if (fogMap == null) { fogMap = TextureManager.getInstance().getTexture("WHITE"); } // Set the active texture unit to texture unit 1. TyrGL.glActiveTexture(TyrGL.GL_TEXTURE2); // Bind the texture to this unit. TyrGL.glBindTexture(TyrGL.GL_TEXTURE_2D, fogMap.getHandle()); // Tell the texture uniform sampler to use this texture in the shader by binding to texture unit 1. TyrGL.glUniform1i(fogMapHandle, 2); } @Override public void onUpdate(float time) { waveTime += time; } @Override public boolean isFinished() { return false; } }
[ "saschamueller@gmx.net" ]
saschamueller@gmx.net
93135ed6b4da08cb78d78dc321ba850667267b1f
b3e9a645e28ca54339d55a8ccf90ceaec40a4f6d
/src/main/java/com/consulthys/jhiptest/application/service/dto/OrganisationDTO.java
f28be42e3872ecf8b9aa01963fdbb4389e5ce25c
[]
no_license
BulkSecurityGeneratorProject/jhiptest
db5e322242f3246e8ddebd76dc9c2570358ed95b
10067ca4192ce1fb765c1549302aa3687af0ed35
refs/heads/master
2022-12-17T02:24:46.649221
2017-12-26T12:12:01
2017-12-26T12:12:01
296,508,097
0
0
null
2020-09-18T03:54:27
2020-09-18T03:54:26
null
UTF-8
Java
false
false
2,113
java
package com.consulthys.jhiptest.application.service.dto; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import java.util.Objects; /** * A DTO for the Organisation entity. */ public class OrganisationDTO implements Serializable { private Long id; private String type; private String name; private String shortName; private Long sortKey; private Long parentId; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getShortName() { return shortName; } public void setShortName(String shortName) { this.shortName = shortName; } public Long getSortKey() { return sortKey; } public void setSortKey(Long sortKey) { this.sortKey = sortKey; } public Long getParentId() { return parentId; } public void setParentId(Long organisationId) { this.parentId = organisationId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrganisationDTO organisationDTO = (OrganisationDTO) o; if(organisationDTO.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), organisationDTO.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "OrganisationDTO{" + "id=" + getId() + ", type='" + getType() + "'" + ", name='" + getName() + "'" + ", shortName='" + getShortName() + "'" + ", sortKey=" + getSortKey() + "}"; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
bc465a4b32407b9e262f6b52c6c4643899ffa5ba
3f1957d6b8672711e58bff07cb3e24f342831c92
/mymenu/src/main/java/vn/com/elcom/mymenu/interfaces/OnMenuItemLongClickListener.java
fdaffacb09e9f9b27554c2c95a14559f391ef997
[]
no_license
vihahb/xMec
782391a959d07b4a5a7747fe9173e9aad932d218
9da3333246aa1d0881b516777cedbb47aecf31b8
refs/heads/master
2021-03-27T12:42:23.427401
2017-08-11T12:19:14
2017-08-11T12:19:14
79,198,020
0
0
null
null
null
null
UTF-8
Java
false
false
228
java
package vn.com.elcom.mymenu.interfaces; import android.view.View; /** * Menu item long click listener */ public interface OnMenuItemLongClickListener { public void onMenuItemLongClick(View clickedView, int position); }
[ "vihahb@gmail.com" ]
vihahb@gmail.com
70ebc7dd18b96969666512f5996f357b5b891bb0
967502523508f5bb48fdaac93b33e4c4aca20a4b
/aws-java-sdk-cloudhsm/src/main/java/com/amazonaws/services/cloudhsm/model/CreateHapgRequest.java
b2fbc7be4d38fe1bf2c678f0ec5aa43f6c90c520
[ "Apache-2.0", "JSON" ]
permissive
hanjk1234/aws-sdk-java
3ac0d8a9bf6f7d9bf1bc5db8e73a441375df10c0
07da997c6b05ae068230401921860f5e81086c58
refs/heads/master
2021-01-17T18:25:34.913778
2015-10-23T03:20:07
2015-10-23T03:20:07
44,951,249
1
0
null
2015-10-26T06:53:25
2015-10-26T06:53:24
null
UTF-8
Java
false
false
3,348
java
/* * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.cloudhsm.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** * <p> * Contains the inputs for the <a>CreateHapgRequest</a> action. * </p> */ public class CreateHapgRequest extends AmazonWebServiceRequest implements Serializable, Cloneable { /** * <p> * The label of the new high-availability partition group. * </p> */ private String label; /** * <p> * The label of the new high-availability partition group. * </p> * * @param label * The label of the new high-availability partition group. */ public void setLabel(String label) { this.label = label; } /** * <p> * The label of the new high-availability partition group. * </p> * * @return The label of the new high-availability partition group. */ public String getLabel() { return this.label; } /** * <p> * The label of the new high-availability partition group. * </p> * * @param label * The label of the new high-availability partition group. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateHapgRequest withLabel(String label) { setLabel(label); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLabel() != null) sb.append("Label: " + getLabel()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateHapgRequest == false) return false; CreateHapgRequest other = (CreateHapgRequest) obj; if (other.getLabel() == null ^ this.getLabel() == null) return false; if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); return hashCode; } @Override public CreateHapgRequest clone() { return (CreateHapgRequest) super.clone(); } }
[ "aws@amazon.com" ]
aws@amazon.com
4ea573d29c52f5246e735db6c6a817d236e11354
514631b4f3dc5b25f2eb66133d1ac2fefacc2cc1
/app/src/main/java/com/malin/gson/VolleyUtil.java
fd8e07005e4453a36bc2ece7e63d3e0e53544f4b
[ "MIT" ]
permissive
androidmalin/GsonSample
dc017ddb237f9b80a73bf8b40a1eb3ba472ad2fa
c9fc3e7f4e5498d5b1964d409d8d097ccc2f802a
refs/heads/master
2021-01-09T20:31:54.702399
2016-07-21T14:33:34
2016-07-21T14:33:34
63,876,233
1
0
null
null
null
null
UTF-8
Java
false
false
628
java
package com.malin.gson; import android.content.Context; import com.android.volley.RequestQueue; import com.android.volley.toolbox.Volley; public class VolleyUtil { private VolleyUtil() { } private static volatile RequestQueue requestQueue = null; public static RequestQueue getRequestQueue(Context context) { if (requestQueue == null) { synchronized (VolleyUtil.class) { if (requestQueue == null) { requestQueue = Volley.newRequestQueue(context.getApplicationContext()); } } } return requestQueue; } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
4ff49688124970bae5f0d9d0bb6dc3557a92ce2d
9856541e29e2597f2d0a7ef4729208190d9bbebe
/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistry.java
b2bb929b308608fff82475e0dbbe736e0ca3e659
[ "Apache-2.0" ]
permissive
lakeslove/springSourceCodeTest
74bffc0756fa5ea844278827d86a085b9fe4c14e
25caac203de57c4b77268be60df2dcb2431a03e1
refs/heads/master
2020-12-02T18:10:14.048955
2017-07-07T00:41:55
2017-07-07T00:41:55
96,483,747
1
0
null
null
null
null
UTF-8
Java
false
false
4,629
java
/* * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.servlet.config.annotation; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.springframework.context.ApplicationContext; import org.springframework.http.HttpStatus; import org.springframework.web.servlet.handler.AbstractHandlerMapping; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; /** * Assists with the registration of simple automated controllers pre-configured * with status code and/or a view. * * @author Rossen Stoyanchev * @author Keith Donald * @since 3.1 */ public class ViewControllerRegistry { private final List<ViewControllerRegistration> registrations = new ArrayList<ViewControllerRegistration>(4); private final List<RedirectViewControllerRegistration> redirectRegistrations = new ArrayList<RedirectViewControllerRegistration>(10); private int order = 1; private ApplicationContext applicationContext; /** * Map a view controller to the given URL path (or pattern) in order to render * a response with a pre-configured status code and view. */ public ViewControllerRegistration addViewController(String urlPath) { ViewControllerRegistration registration = new ViewControllerRegistration(urlPath); registration.setApplicationContext(this.applicationContext); this.registrations.add(registration); return registration; } /** * Map a view controller to the given URL path (or pattern) in order to redirect * to another URL. By default the redirect URL is expected to be relative to * the current ServletContext, i.e. as relative to the web application root. * @since 4.1 */ public RedirectViewControllerRegistration addRedirectViewController(String urlPath, String redirectUrl) { RedirectViewControllerRegistration registration = new RedirectViewControllerRegistration(urlPath, redirectUrl); registration.setApplicationContext(this.applicationContext); this.redirectRegistrations.add(registration); return registration; } /** * Map a simple controller to the given URL path (or pattern) in order to * set the response status to the given code without rendering a body. * @since 4.1 */ public void addStatusController(String urlPath, HttpStatus statusCode) { ViewControllerRegistration registration = new ViewControllerRegistration(urlPath); registration.setApplicationContext(this.applicationContext); registration.setStatusCode(statusCode); registration.getViewController().setStatusOnly(true); this.registrations.add(registration); } /** * Specify the order to use for the {@code HandlerMapping} used to map view * controllers relative to other handler mappings configured in Spring MVC. * <p>By default this is set to 1, i.e. right after annotated controllers, * which are ordered at 0. */ public void setOrder(int order) { this.order = order; } protected void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } /** * Return the {@code HandlerMapping} that contains the registered view * controller mappings, or {@code null} for no registrations. */ protected AbstractHandlerMapping getHandlerMapping() { if (this.registrations.isEmpty() && this.redirectRegistrations.isEmpty()) { return null; } Map<String, Object> urlMap = new LinkedHashMap<String, Object>(); for (ViewControllerRegistration registration : this.registrations) { urlMap.put(registration.getUrlPath(), registration.getViewController()); } for (RedirectViewControllerRegistration registration : this.redirectRegistrations) { urlMap.put(registration.getUrlPath(), registration.getViewController()); } SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping(); handlerMapping.setOrder(this.order); handlerMapping.setUrlMap(urlMap); return handlerMapping; } }
[ "lakeslove@126.com" ]
lakeslove@126.com
310e2d9dd0004f696b975dfc773f59b815bfc671
b8e76bfc981176fd83ef415963a714c298537ed4
/DMP/plugin/world/fermat-dmp-plugin-world-crypto-index-bitdubai/src/main/java/com/bitdubai/fermat_dmp_plugin/layer/world/crypto_index/developer/bitdubai/version_1/providers/BtceProvider.java
2a44c8db25069eabf93aff113fa132883d4bdac5
[ "MIT" ]
permissive
jadzalla/fermat-unused
827b9c8ccb805be934acb14479b28fbddf56306c
d5e9633109caac3e88e9e3109862ae40d962cd96
refs/heads/master
2020-03-17T00:49:29.989918
2015-10-06T04:51:46
2015-10-06T04:51:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,993
java
package com.bitdubai.fermat_dmp_plugin.layer.world.crypto_index.developer.bitdubai.version_1.providers; import com.bitdubai.fermat_api.layer.all_definition.enums.CryptoCurrency; import com.bitdubai.fermat_api.layer.all_definition.enums.FiatCurrency; import com.bitdubai.fermat_api.layer.dmp_world.crypto_index.exceptions.CryptoCurrencyNotSupportedException; import com.bitdubai.fermat_api.layer.dmp_world.crypto_index.exceptions.FiatCurrencyNotSupportedException; import com.bitdubai.fermat_dmp_plugin.layer.world.crypto_index.developer.bitdubai.version_1.exceptions.CantGetMarketPriceException; import com.bitdubai.fermat_dmp_plugin.layer.world.crypto_index.developer.bitdubai.version_1.interfaces.CryptoIndexProvider; import com.bitdubai.fermat_dmp_plugin.layer.world.crypto_index.developer.bitdubai.version_1.structure.HTTPJson; /** * The class <code>com.bitdubai.fermat_dmp_plugin.layer.world.crypto_index.developer.bitdubai.version_1.providers.BtceProvider</code> * haves all the logic to bring the market price for the provider Btce.<p/> * <p> * Created by Leon Acosta - (laion.cj91@gmail.com) on 16/09/2015. * * @version 1.0 * @since Java JDK 1.7 */ public class BtceProvider implements CryptoIndexProvider { private String getUrlAPI(String pair) { return "https://btc-e.com/api/3/ticker/"+ pair; } @Override public double getMarketPrice(CryptoCurrency cryptoCurrency, FiatCurrency fiatCurrency, long time) throws FiatCurrencyNotSupportedException, CryptoCurrencyNotSupportedException, CantGetMarketPriceException { HTTPJson jsonService = new HTTPJson(); String pair = cryptoCurrency.getCode().toLowerCase() + "_" + fiatCurrency.getCode().toLowerCase(); String urlApi = getUrlAPI(pair); String stringMarketPrice = jsonService.getJSONFromUrl(urlApi).getJSONObject(pair).get("last").toString(); return Double.valueOf(stringMarketPrice); } }
[ "laion.cj91@gmail.com" ]
laion.cj91@gmail.com
3b7d376e606bdaa887135dd2cb9ac689bd3ea2f3
1167da7da5bcde75b5cccbdf16269d4ecbb246d0
/source/adalid-alfa/src/main/java/adalid/core/interfaces/Expression.java
967e17acc936e7f6e449333d90f334d78d859683
[]
no_license
proyecto-adalid/adalid
7f64a94397b31bef558547dbdbfb108b7e39693c
e85b71614c9593639f5528b9d6be41efa1bff31a
refs/heads/main
2023-08-07T14:14:06.808810
2023-07-30T14:10:36
2023-07-30T14:10:36
32,926,877
3
0
null
null
null
null
UTF-8
Java
false
false
2,700
java
/* * Copyright 2017 Jorge Campins y David Uzcategui * * Este archivo forma parte de Adalid. * * Adalid es software libre; usted puede redistribuirlo y/o modificarlo bajo los terminos de la * licencia "GNU General Public License" publicada por la Fundacion "Free Software Foundation". * Adalid se distribuye con la esperanza de que pueda ser util, pero SIN NINGUNA GARANTIA; sin * siquiera las garantias implicitas de COMERCIALIZACION e IDONEIDAD PARA UN PROPOSITO PARTICULAR. * * Para mas detalles vea la licencia "GNU General Public License" en http://www.gnu.org/licenses */ package adalid.core.interfaces; import adalid.core.enums.*; import adalid.core.sql.*; import java.util.List; import java.util.Map; import java.util.Set; /** * @author Jorge Campins */ public interface Expression extends TypedArtifact { /** * @return the operator */ Operator getOperator(); /** * @return the operands */ Object[] getOperands(); /** * @return the pseudo-expression */ String getExpressionString(); /** * @return the parent expression */ Expression getParentExpression(); /** * @return the verified usages */ List<ExpressionUsage> getVerifiedUsages(); /** * @return the strings set */ Set<String> getStringsSet(); /** * @return the referenced columns list */ List<Property> getReferencedColumnsList(); /** * @return the referenced columns map */ Map<String, Property> getReferencedColumnsMap(); /** * @return the referenced joins list */ List<QueryJoin> getReferencedJoinsList(); /** * @param queryTable query table * @return the referenced joins list */ List<QueryJoin> getReferencedJoinsList(QueryTable queryTable); /** * @return the referenced joins map */ Map<String, QueryJoin> getReferencedJoinsMap(); /** * @param queryTable query table * @return the referenced joins map */ Map<String, QueryJoin> getReferencedJoinsMap(QueryTable queryTable); /** * @return the referenced expressions map */ Set<String> getCrossReferencedExpressionsSet(); /** * @param declaringEntity declaring entity * @return the referenced expressions map */ Set<String> getCrossReferencedExpressionsSet(Entity declaringEntity); String getCrossReferencedExpressionsKey(); boolean isCrossReferencedExpression(); boolean isSingleEntityExpression(); boolean isSingleEntityExpression(Entity declaringEntity); }
[ "jrcampins@gmail.com" ]
jrcampins@gmail.com
46e802140c7705f2a91939e81c1e4d407035c777
aa126db53163bfb27d0161e6a5424eb56acbc1c7
/java/org/l2jserver/gameserver/handler/IVoicedCommandHandler.java
0f5fe125352f2a9da8c3b9fa7a06e3595327a582
[ "MIT" ]
permissive
marlonprudente/L2JServer_C6_Interlude
6ce3ed34a8120223183921f41e6d517b2dcc89eb
f3d3b329657c0f031dab107e6d4ceb5ddad0bea6
refs/heads/master
2022-06-20T01:11:36.557960
2020-05-13T17:39:48
2020-05-13T17:39:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,278
java
/* * This file is part of the L2JServer project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.l2jserver.gameserver.handler; import org.l2jserver.gameserver.model.actor.instance.PlayerInstance; public interface IVoicedCommandHandler { /** * this is the worker method that is called when someone uses an admin command. * @param player * @param command * @param target * @return command success */ boolean useVoicedCommand(String command, PlayerInstance player, String target); /** * this method is called at initialization to register all the item ids automatically * @return all known itemIds */ String[] getVoicedCommandList(); }
[ "libera.libera@gmail.com" ]
libera.libera@gmail.com
38714cc7ab384d3ec25f16177392f4b52ed7101e
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_7325.java
2c9846ae1093bb5dd14e96587d39ee195bc47ad9
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_7325 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
37764425fa341160901a9b386319f682b29846af
da205bce53df38da79e43aeb15ca7710ae0795c3
/src/main/java/com/medwin/landison/kms/availabilityservice/DailyItem.java
ece962ac488e6e2aef88aea02f4579dfab09fc66
[]
no_license
medwinwang/landison
7c86624d6d2c61a24cfbcacec18260057e8430e4
c1aadc26547c2a1e05adc7f2d01366a80a87fe9a
refs/heads/master
2020-04-01T20:03:40.263160
2019-03-04T13:40:01
2019-03-04T13:40:01
153,586,357
0
0
null
null
null
null
UTF-8
Java
false
false
7,171
java
package com.medwin.landison.kms.availabilityservice; import java.util.Date; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>DailyItem complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType name="DailyItem"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="HotelCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="ItemCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="ItemName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="BeginDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/&gt; * &lt;element name="EndDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/&gt; * &lt;element name="RateCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="PackageCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="PackageName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="Quantity" type="{http://www.w3.org/2001/XMLSchema}int"/&gt; * &lt;element name="SubTotalQuantity" type="{http://www.w3.org/2001/XMLSchema}int"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DailyItem", propOrder = { "hotelCode", "itemCode", "itemName", "beginDate", "endDate", "rateCode", "packageCode", "packageName", "quantity", "subTotalQuantity" }) public class DailyItem { @XmlElement(name = "HotelCode") protected String hotelCode; @XmlElement(name = "ItemCode") protected String itemCode; @XmlElement(name = "ItemName") protected String itemName; @XmlElement(name = "BeginDate", required = true, type = String.class) @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") protected Date beginDate; @XmlElement(name = "EndDate", required = true, type = String.class) @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") protected Date endDate; @XmlElement(name = "RateCode") protected String rateCode; @XmlElement(name = "PackageCode") protected String packageCode; @XmlElement(name = "PackageName") protected String packageName; @XmlElement(name = "Quantity") protected int quantity; @XmlElement(name = "SubTotalQuantity") protected int subTotalQuantity; /** * 获取hotelCode属性的值。 * * @return * possible object is * {@link String } * */ public String getHotelCode() { return hotelCode; } /** * 设置hotelCode属性的值。 * * @param value * allowed object is * {@link String } * */ public void setHotelCode(String value) { this.hotelCode = value; } /** * 获取itemCode属性的值。 * * @return * possible object is * {@link String } * */ public String getItemCode() { return itemCode; } /** * 设置itemCode属性的值。 * * @param value * allowed object is * {@link String } * */ public void setItemCode(String value) { this.itemCode = value; } /** * 获取itemName属性的值。 * * @return * possible object is * {@link String } * */ public String getItemName() { return itemName; } /** * 设置itemName属性的值。 * * @param value * allowed object is * {@link String } * */ public void setItemName(String value) { this.itemName = value; } /** * 获取beginDate属性的值。 * * @return * possible object is * {@link String } * */ public Date getBeginDate() { return beginDate; } /** * 设置beginDate属性的值。 * * @param value * allowed object is * {@link String } * */ public void setBeginDate(Date value) { this.beginDate = value; } /** * 获取endDate属性的值。 * * @return * possible object is * {@link String } * */ public Date getEndDate() { return endDate; } /** * 设置endDate属性的值。 * * @param value * allowed object is * {@link String } * */ public void setEndDate(Date value) { this.endDate = value; } /** * 获取rateCode属性的值。 * * @return * possible object is * {@link String } * */ public String getRateCode() { return rateCode; } /** * 设置rateCode属性的值。 * * @param value * allowed object is * {@link String } * */ public void setRateCode(String value) { this.rateCode = value; } /** * 获取packageCode属性的值。 * * @return * possible object is * {@link String } * */ public String getPackageCode() { return packageCode; } /** * 设置packageCode属性的值。 * * @param value * allowed object is * {@link String } * */ public void setPackageCode(String value) { this.packageCode = value; } /** * 获取packageName属性的值。 * * @return * possible object is * {@link String } * */ public String getPackageName() { return packageName; } /** * 设置packageName属性的值。 * * @param value * allowed object is * {@link String } * */ public void setPackageName(String value) { this.packageName = value; } /** * 获取quantity属性的值。 * */ public int getQuantity() { return quantity; } /** * 设置quantity属性的值。 * */ public void setQuantity(int value) { this.quantity = value; } /** * 获取subTotalQuantity属性的值。 * */ public int getSubTotalQuantity() { return subTotalQuantity; } /** * 设置subTotalQuantity属性的值。 * */ public void setSubTotalQuantity(int value) { this.subTotalQuantity = value; } }
[ "wm1990315@gmail.com" ]
wm1990315@gmail.com
471c83aa87e7c5bc14e3071ff5133bbe8a82797b
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/p005cm/aptoide/p006pt/analytics/C1692h.java
cf71bb5f961c0f6ffff7da0e33bcd4f6e58110b3
[ "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
510
java
package p005cm.aptoide.p006pt.analytics; import p026rx.p027b.C0129b; /* renamed from: cm.aptoide.pt.analytics.h */ /* compiled from: lambda */ public final /* synthetic */ class C1692h implements C0129b { /* renamed from: a */ private final /* synthetic */ FirstLaunchAnalytics f4647a; public /* synthetic */ C1692h(FirstLaunchAnalytics firstLaunchAnalytics) { this.f4647a = firstLaunchAnalytics; } public final void call(Object obj) { this.f4647a.mo804b(obj); } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
2ac5444b834836cc6d4eac0d2eed84b14ef35d5a
8652ec77f7b630ae029931ab468593b3bc95c5be
/src/main/java/com/bitmovin/api/sdk/notifications/emails/usageReports/EmailNotificationListQueryParams.java
523e12a8a8c5bfabcba74853776cf8586f59fc96
[ "MIT" ]
permissive
jmaiaMG/bitmovin-api-sdk-java
3522831de8b8f4db75eb0945ea0674236a90367d
bfcd11d2a2b0666008476597db309bd695a3a9bf
refs/heads/master
2022-04-20T19:48:04.666960
2020-04-21T12:22:29
2020-04-21T12:22:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
768
java
package com.bitmovin.api.sdk.notifications.emails.usageReports; import java.util.HashMap; import com.bitmovin.api.sdk.model.*; public class EmailNotificationListQueryParams extends HashMap<String, Object> { public Integer getOffset() { return (Integer) this.get("offset"); } /** * @param offset Index of the first item to return, starting at 0. Default is 0 (optional) */ public void setOffset(Integer offset) { this.put("offset", offset); } public Integer getLimit() { return (Integer) this.get("limit"); } /** * @param limit Maximum number of items to return. Default is 25, maximum is 100 (optional) */ public void setLimit(Integer limit) { this.put("limit", limit); } }
[ "openapi@bitmovin.com" ]
openapi@bitmovin.com
ffffd5ce3e8321731c00b8074f78ce4cfd151569
919b958ae542d7f468e7c1967f9b9f1e34c6400b
/src/main/java/com/alpha/hibernate/service/PersonService.java
cb5da468aeab98151c3241896616a7467e9ed2be
[]
no_license
ruleless-guy/hibernate-one-to-many
f485998b2d56861a582526afc73f981765c1c6d2
7deef7f799633b92a5e9c0d2df956be05b3d9576
refs/heads/master
2023-02-03T02:28:00.275373
2020-12-23T12:08:27
2020-12-23T12:08:27
323,891,647
0
0
null
null
null
null
UTF-8
Java
false
false
183
java
package com.alpha.hibernate.service; import com.alpha.hibernate.dao.IDao; import com.alpha.hibernate.dto.PersonDto; public interface PersonService extends IDao<PersonDto, Long> { }
[ "=" ]
=
cb9b3267e3cd0548aed1a6baa52116a3f945a41c
44ce4246c1340c3aef8ba5c29fab33598fcf9fa2
/Java/Object_oriented_Programming_2/src/CastingTest1.java
6cc565a0d3ef328141846489b468a2f2771b68ca
[]
no_license
dhkim1993/TIL
97a1a45ca0a0af15d074dff3552a16988d1a793e
7f2ebe7e1848a15794d3f76af98ff89ee6b60fcb
refs/heads/master
2020-04-18T01:22:12.155140
2019-11-20T07:09:41
2019-11-20T07:09:41
167,116,195
0
0
null
null
null
null
UTF-8
Java
false
false
733
java
public class CastingTest1 { public static void main(String[] args) { Car_ car = null; FireEngine fe = new FireEngine(); FireEngine fe2 = null; fe.water(); car = fe; //car.water(); car 참조변수로는 FireEngine 메소드 사용 불가 fe2 = (FireEngine) car; fe2.water(); } } class Car_ { String color; int door; void drive() { System.out.println("drive, brrrrr~"); } void stop() { System.out.println("stop!!!!"); } } class FireEngine extends Car_ { void water() { System.out.println("water!!"); } } /* water!! water!! 참소변수의 형변환의 관한 예제이다. up-Casting, down-Casting */
[ "dhyc9395@gmail.com" ]
dhyc9395@gmail.com
b7bfd9426c8b0780a0ebecd72cfcbb5333458989
a47074692bd700190cd988c2a5df4fa22e5b5fc0
/modules/lwjgl/llvm/src/generated/java/org/lwjgl/llvm/CXToken.java
7a2a318cb22668c66ea5317c6f843d7abecb1d68
[ "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "NCSA" ]
permissive
johalun/lwjgl3
823087f6da986818c8ab2fb0903d3a3cd9323d3b
fcaab301aa489c6310c149c788999f35333fbc7c
refs/heads/master-linux64
2023-02-08T03:35:15.451240
2019-05-11T01:00:01
2019-05-11T01:00:01
151,859,836
1
8
BSD-3-Clause
2023-01-25T12:25:36
2018-10-06T16:36:25
Java
UTF-8
Java
false
false
5,758
java
/* * Copyright LWJGL. All rights reserved. * License terms: https://www.lwjgl.org/license * MACHINE GENERATED FILE, DO NOT EDIT */ package org.lwjgl.llvm; import javax.annotation.*; import java.nio.*; import org.lwjgl.system.*; import static org.lwjgl.system.Checks.*; import static org.lwjgl.system.MemoryUtil.*; /** * Describes a single preprocessing token. * * <h3>Layout</h3> * * <pre><code> * struct CXToken { * unsigned int_data[4]; * void * ptr_data; * }</code></pre> */ public class CXToken extends Struct { /** The struct size in bytes. */ public static final int SIZEOF; /** The struct alignment in bytes. */ public static final int ALIGNOF; /** The struct member offsets. */ public static final int INT_DATA, PTR_DATA; static { Layout layout = __struct( __array(4, 4), __member(POINTER_SIZE) ); SIZEOF = layout.getSize(); ALIGNOF = layout.getAlignment(); INT_DATA = layout.offsetof(0); PTR_DATA = layout.offsetof(1); } /** * Creates a {@code CXToken} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be * visible to the struct instance and vice versa. * * <p>The created instance holds a strong reference to the container object.</p> */ public CXToken(ByteBuffer container) { super(memAddress(container), __checkContainer(container, SIZEOF)); } @Override public int sizeof() { return SIZEOF; } /** Returns a {@link IntBuffer} view of the {@code int_data} field. */ @NativeType("unsigned[4]") public IntBuffer int_data() { return nint_data(address()); } /** Returns the value at the specified index of the {@code int_data} field. */ @NativeType("unsigned") public int int_data(int index) { return nint_data(address(), index); } /** Returns the value of the {@code ptr_data} field. */ @NativeType("void *") public long ptr_data() { return nptr_data(address()); } // ----------------------------------- /** Returns a new {@code CXToken} instance for the specified memory address. */ public static CXToken create(long address) { return wrap(CXToken.class, address); } /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static CXToken createSafe(long address) { return address == NULL ? null : wrap(CXToken.class, address); } /** * Create a {@link CXToken.Buffer} instance at the specified memory. * * @param address the memory address * @param capacity the buffer capacity */ public static CXToken.Buffer create(long address, int capacity) { return wrap(Buffer.class, address, capacity); } /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static CXToken.Buffer createSafe(long address, int capacity) { return address == NULL ? null : wrap(Buffer.class, address, capacity); } // ----------------------------------- /** Unsafe version of {@link #int_data}. */ public static IntBuffer nint_data(long struct) { return memIntBuffer(struct + CXToken.INT_DATA, 4); } /** Unsafe version of {@link #int_data(int) int_data}. */ public static int nint_data(long struct, int index) { return UNSAFE.getInt(null, struct + CXToken.INT_DATA + check(index, 4) * 4); } /** Unsafe version of {@link #ptr_data}. */ public static long nptr_data(long struct) { return memGetAddress(struct + CXToken.PTR_DATA); } // ----------------------------------- /** An array of {@link CXToken} structs. */ public static class Buffer extends StructBuffer<CXToken, Buffer> { private static final CXToken ELEMENT_FACTORY = CXToken.create(-1L); /** * Creates a new {@code CXToken.Buffer} instance backed by the specified container. * * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided * by {@link CXToken#SIZEOF}, and its mark will be undefined. * * <p>The created buffer instance holds a strong reference to the container object.</p> */ public Buffer(ByteBuffer container) { super(container, container.remaining() / SIZEOF); } public Buffer(long address, int cap) { super(address, null, -1, 0, cap, cap); } Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { super(address, container, mark, pos, lim, cap); } @Override protected Buffer self() { return this; } @Override protected CXToken getElementFactory() { return ELEMENT_FACTORY; } /** Returns a {@link IntBuffer} view of the {@code int_data} field. */ @NativeType("unsigned[4]") public IntBuffer int_data() { return CXToken.nint_data(address()); } /** Returns the value at the specified index of the {@code int_data} field. */ @NativeType("unsigned") public int int_data(int index) { return CXToken.nint_data(address(), index); } /** Returns the value of the {@code ptr_data} field. */ @NativeType("void *") public long ptr_data() { return CXToken.nptr_data(address()); } } }
[ "iotsakp@gmail.com" ]
iotsakp@gmail.com
5b31b4497f62645f7ed65560d05a1c8357a6097b
eda791e3bb8e9bcab9c47b7f576bbbf04b34ade9
/standardHospitalOS/src/com/hospital_os/utility/PIDPanelGui.java
a6d70d75b8dec57aae9f26eb56e3fd3723ebccfc
[]
no_license
k2003/HospitalOSV3
af2a04a89dc128b53afd70d174b256cc61767ff4
445701525706c4649aa4633b9aaf16d22173e824
refs/heads/master
2020-03-25T17:16:08.484394
2017-10-30T00:58:51
2017-10-30T00:58:51
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
6,707
java
/* * PanelTest.java * * Created on 28 ¡ØÁÀҾѹ¸ì 2550, 14:22 ¹. */ package com.hospital_os.utility; import java.awt.*; /** * * @author henbe */ public class PIDPanelGui extends javax.swing.JPanel { public static int COLUMNS = 13; /** Creates new form PanelTest */ public PIDPanelGui() { initComponents(); integerTextField1.setDigits(1); integerTextField2.setDigits(4); integerTextField3.setDigits(5); integerTextField4.setDigits(2); integerTextField5.setDigits(1); } public void setFont(Font f){ if(integerTextField1!=null) { integerTextField1.setFont(f); integerTextField2.setFont(f); integerTextField3.setFont(f); integerTextField4.setFont(f); integerTextField5.setFont(f); } } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; integerTextField1 = new com.hospital_os.utility.IntegerTextField(); integerTextField2 = new com.hospital_os.utility.IntegerTextField(); integerTextField3 = new com.hospital_os.utility.IntegerTextField(); integerTextField4 = new com.hospital_os.utility.IntegerTextField(); integerTextField5 = new com.hospital_os.utility.IntegerTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); integerTextField1.setMinimumSize(new java.awt.Dimension(15, 19)); integerTextField1.setPreferredSize(new java.awt.Dimension(15, 19)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; add(integerTextField1, gridBagConstraints); integerTextField2.setPreferredSize(new java.awt.Dimension(39, 19)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 1; add(integerTextField2, gridBagConstraints); integerTextField3.setPreferredSize(new java.awt.Dimension(49, 19)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 1; add(integerTextField3, gridBagConstraints); integerTextField4.setPreferredSize(new java.awt.Dimension(26, 19)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 1; add(integerTextField4, gridBagConstraints); integerTextField5.setMinimumSize(new java.awt.Dimension(15, 19)); integerTextField5.setPreferredSize(new java.awt.Dimension(15, 19)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 10; gridBagConstraints.gridy = 1; add(integerTextField5, gridBagConstraints); jLabel1.setText("-"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; add(jLabel1, gridBagConstraints); jLabel2.setText("-"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 1; add(jLabel2, gridBagConstraints); jLabel3.setText("-"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 9; gridBagConstraints.gridy = 1; add(jLabel3, gridBagConstraints); jLabel4.setText("-"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 7; gridBagConstraints.gridy = 1; add(jLabel4, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private com.hospital_os.utility.IntegerTextField integerTextField1; private com.hospital_os.utility.IntegerTextField integerTextField2; private com.hospital_os.utility.IntegerTextField integerTextField3; private com.hospital_os.utility.IntegerTextField integerTextField4; private com.hospital_os.utility.IntegerTextField integerTextField5; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; // End of variables declaration//GEN-END:variables public void requestFocus() { integerTextField5.requestFocus(); } public void setText(String txt) { if(txt!=null && txt.length()==13) { integerTextField1.setText(txt.substring(0, 1)); integerTextField2.setText(txt.substring(1, 5)); integerTextField3.setText(txt.substring(5, 10)); integerTextField4.setText(txt.substring(10, 12)); integerTextField5.setText(txt.substring(12)); } else { integerTextField1.setText(""); integerTextField2.setText(""); integerTextField3.setText(""); integerTextField4.setText(""); integerTextField5.setText(""); } } public String getText() { StringBuffer buff = new StringBuffer(integerTextField1.getText()); buff.append(integerTextField2.getText()); buff.append(integerTextField3.getText()); buff.append(integerTextField4.getText()); buff.append(integerTextField5.getText()); if(buff.length()!=COLUMNS) return ""; return buff.toString(); } public void setEditable(boolean editable) { integerTextField1.setEditable(editable); integerTextField2.setEditable(editable); integerTextField3.setEditable(editable); integerTextField4.setEditable(editable); integerTextField5.setEditable(editable); } public void setBackground(Color color) { try{ integerTextField1.setBackground(color); integerTextField2.setBackground(color); integerTextField3.setBackground(color); integerTextField4.setBackground(color); integerTextField5.setBackground(color); }catch(Exception e){ } } }
[ "eploentham@gmail.com" ]
eploentham@gmail.com
f1e65160770c6fa914fc81f1db5cfc5c3814850d
43747f7ae159c60c2d7400e4f5b7e1c814c894b0
/checkflix-webscraper/src/main/java/com/maciej/checkflix/webscraper/domain/ImdbReview.java
29fbcc68a4b857171ec35cdbe9b8f01daf4b175a
[]
no_license
Greem666/CheckFlix-BackEnd
c72e402ed96956ffe8a0f90c25abea51088b164d
2caad1444fdc6ac765c2a721266b4830f0126880
refs/heads/main
2023-01-31T17:04:03.867045
2020-12-08T11:48:19
2020-12-08T12:14:22
314,444,509
0
0
null
null
null
null
UTF-8
Java
false
false
1,307
java
package com.maciej.checkflix.webscraper.domain; import lombok.*; import javax.persistence.*; import javax.validation.constraints.Size; import java.time.LocalDate; import java.time.LocalDateTime; @Getter @Setter @AllArgsConstructor @NoArgsConstructor @EqualsAndHashCode @Entity @Table(name = "IMDB_REVIEWS") public class ImdbReview { @Id @GeneratedValue @Column(name = "ID") private Long id; @Column(name = "SCRAPED_ON") private LocalDateTime scrapedOn; @Column(name = "IMDB_ID") private String imdbId; @EqualsAndHashCode.Include @Column(name = "RATING") private int rating; @EqualsAndHashCode.Include @Column(name = "TITLE") private String title; @EqualsAndHashCode.Include @Column(name = "USERNAME") private String username; @Column(name = "DATE") private LocalDate date; @Lob @Column(name = "REVIEW") private String review; public ImdbReview(LocalDateTime scrapedOn, String imdbId, int rating, String title, String username, LocalDate date, String review) { this.scrapedOn = scrapedOn; this.imdbId = imdbId; this.rating = rating; this.title = title; this.username = username; this.date = date; this.review = review; } }
[ "29668023+Greem666@users.noreply.github.com" ]
29668023+Greem666@users.noreply.github.com
2ffe04a2de7ea616895363c35851ac6f4389e441
a1118f3dbca77fb7a3d492bb6a61ed17fea5e216
/src/test/java/org/assertj/core/test/AlwaysDifferentComparator.java
42e46ced0ce5f08b50e9bfa37174c9635fe1aa29
[ "Apache-2.0" ]
permissive
ars-java/assertj-core
745394ba0a02fb373dc92c2995cea67408c68006
9bf0d577a30e2bd7f1abe6ba1259b9f7404443a8
refs/heads/main
2023-01-19T11:03:01.531977
2020-11-20T19:26:41
2020-11-20T19:26:41
315,467,565
1
0
Apache-2.0
2020-11-23T23:38:58
2020-11-23T23:38:57
null
UTF-8
Java
false
false
1,477
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * Copyright 2012-2020 the original author or authors. */ package org.assertj.core.test; import java.sql.Timestamp; import java.util.Comparator; import org.assertj.core.groups.Tuple; public class AlwaysDifferentComparator<T> implements Comparator<T> { public static final AlwaysDifferentComparator<Object> ALWAY_DIFFERENT = alwaysDifferent(); public static final AlwaysDifferentComparator<String> ALWAY_DIFFERENT_STRING = alwaysDifferent(); public static final AlwaysDifferentComparator<Timestamp> ALWAY_DIFFERENT_TIMESTAMP = alwaysDifferent(); public static final AlwaysDifferentComparator<Tuple> ALWAY_DIFFERENT_TUPLE = alwaysDifferent(); @Override public int compare(T o1, T o2) { return -1; } @Override public String toString() { return "AlwaysDifferentComparator"; } public static <T> AlwaysDifferentComparator<T> alwaysDifferent() { return new AlwaysDifferentComparator<>(); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
a50c17aaf16361f7681cdcb407e79eee198f3c2d
a46f309d68a9e2d9026ca90357f1c947cbf043ff
/java_01/src/day17/Test04.java
5e6b7fd92ad78cb22eaf967e6379af9988ac40fc
[]
no_license
aaaaaandohee/bit_java
e84322927340f48647f372b17616a0ac62b86717
9a2a85f071890ec14cf7766656dabc850ea29fe1
refs/heads/master
2022-01-20T16:30:55.622591
2019-08-27T05:10:14
2019-08-27T05:10:14
201,861,788
0
0
null
null
null
null
UTF-8
Java
false
false
420
java
package day17; import java.util.ArrayList; import java.util.Date; import java.util.List; public class Test04 { public static void main(String[] args) { List<String> list = new ArrayList<String>(); list.add("hello"); list.add("java"); // list.add(new Date()); //String type만 들어갈 수 있음. for(String data: list) { System.out.println(data.toUpperCase()); } } }
[ "user@DESKTOP-V882PTR" ]
user@DESKTOP-V882PTR
cb504ffcaf872ff89dabaa90ec76c2e134a28dbf
e7eb4595206cc9718e2ed4b54272fccdc6a6c3c9
/Util/src/com/redrocketcomputing/util/ListSet.java
1479037bf4d14c97f91540a441396a1ea63179fd
[]
no_license
sgstreet/StreetFireSound
8147ea7391fe639e1912fae0a75069c6c3b9bb1f
dd6ac7341fd660c08232c12f60a2f59e1036eaaa
refs/heads/master
2021-01-13T01:50:05.625953
2013-07-08T21:10:16
2013-07-08T21:10:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,261
java
package com.redrocketcomputing.util; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Set; /** * @author stephen * * TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates */ public class ListSet implements Set, Cloneable { private transient List list; public ListSet() { // Create underlaying list using an ArrayList list = new ArrayList(); } public ListSet(int initialCapacity) { // Create underlaying list using an ArrayList list = new ArrayList(initialCapacity); } public ListSet(Class listClass) { try { //create a new instance which has the same type as listClass list = (List)listClass.newInstance(); } catch (IllegalAccessException e) { throw new IllegalArgumentException(e.toString()); } catch (InstantiationException e) { throw new IllegalArgumentException(e.toString()); } } public ListSet(Set set) { list = new ArrayList((Collection)set); } public ListSet(Collection collection) { // Use default list type this(collection.size()); // Add all enties in the collection for (Iterator iter = collection.iterator(); iter.hasNext();) { add(iter.next()); } } public ListSet(Collection collection, Class listClass) { // Use the specified list class type this(listClass); // Add all entries in the collection for (Iterator iter = collection.iterator(); iter.hasNext();) { add(iter.next()); } } public ListSet(Set set, Class listClass) { // Forward to the collection constructor this((Collection)set, listClass); } /* * (non-Javadoc) * * @see java.util.Collection#iterator() */ public Iterator iterator() { // Return the lists iterator return list.iterator(); } /* * (non-Javadoc) * * @see java.util.Collection#size() */ public int size() { // Return the lists size return list.size(); } /* * (non-Javadoc) * * @see java.util.Collection#add(java.lang.Object) */ public boolean add(Object o) { // Loop through exist elements for (Iterator iterator = list.iterator(); iterator.hasNext();) { // Extract the element Object element = iterator.next(); // Check for equals if (eq(o, element)) { // Duplicate return false; } } // Add the element list.add(o); // We added return true; } private final boolean eq(Object x, Object y) { return (x == null ? y == null : x.equals(y)); } public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof Set)) return false; Collection c = (Collection)o; if (c.size() != size()) return false; try { return containsAll(c); } catch (ClassCastException unused) { return false; } catch (NullPointerException unused) { return false; } } public int hashCode() { int h = 0; Iterator i = iterator(); while (i.hasNext()) { Object obj = i.next(); if (obj != null) h += obj.hashCode(); } return h; } public boolean removeAll(Collection c) { boolean modified = false; if (size() > c.size()) { for (Iterator i = c.iterator(); i.hasNext();) modified |= remove(i.next()); } else { for (Iterator i = iterator(); i.hasNext();) { if (c.contains(i.next())) { i.remove(); modified = true; } } } return modified; } public boolean isEmpty() { return size() == 0; } public boolean contains(Object o) { Iterator e = iterator(); if (o == null) { while (e.hasNext()) if (e.next() == null) return true; } else { while (e.hasNext()) if (o.equals(e.next())) return true; } return false; } public Object[] toArray() { Object[] result = new Object[size()]; Iterator e = iterator(); for (int i = 0; e.hasNext(); i++) result[i] = e.next(); return result; } public Object[] toArray(Object a[]) { int size = size(); if (a.length < size) a = (Object[])java.lang.reflect.Array.newInstance(a.getClass().getComponentType(), size); Iterator it = iterator(); for (int i = 0; i < size; i++) a[i] = it.next(); if (a.length > size) a[size] = null; return a; } public boolean remove(Object o) { Iterator e = iterator(); if (o == null) { while (e.hasNext()) { if (e.next() == null) { e.remove(); return true; } } } else { while (e.hasNext()) { if (o.equals(e.next())) { e.remove(); return true; } } } return false; } public boolean containsAll(Collection c) { Iterator e = c.iterator(); while (e.hasNext()) if (!contains(e.next())) return false; return true; } public boolean addAll(Collection c) { boolean modified = false; Iterator e = c.iterator(); while (e.hasNext()) { if (add(e.next())) modified = true; } return modified; } public boolean retainAll(Collection c) { boolean modified = false; Iterator e = iterator(); while (e.hasNext()) { if (!c.contains(e.next())) { e.remove(); modified = true; } } return modified; } public void clear() { Iterator e = iterator(); while (e.hasNext()) { e.next(); e.remove(); } } public String toString() { StringBuffer buf = new StringBuffer(); buf.append("["); Iterator i = iterator(); boolean hasNext = i.hasNext(); while (hasNext) { Object o = i.next(); buf.append(o == this ? "(this Collection)" : String.valueOf(o)); hasNext = i.hasNext(); if (hasNext) buf.append(", "); } buf.append("]"); return buf.toString(); } }
[ "stephen@redrocketcomputing.com" ]
stephen@redrocketcomputing.com
629710f921c82b33ad0c13b6eb29cd4409bc49a1
edeb76ba44692dff2f180119703c239f4585d066
/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureAttributeDescriptor.java
2098aa3a8147cc901b4b3506839c547c15259c65
[]
no_license
CafeGIS/gvSIG2_0
f3e52bdbb98090fd44549bd8d6c75b645d36f624
81376f304645d040ee34e98d57b4f745e0293d05
refs/heads/master
2020-04-04T19:33:47.082008
2012-09-13T03:55:33
2012-09-13T03:55:33
5,685,448
2
1
null
null
null
null
ISO-8859-10
Java
false
false
4,853
java
package org.gvsig.fmap.dal.feature.impl; import java.util.HashMap; import org.cresques.cts.IProjection; import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; import org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeIntegrityException; import org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeSizeException; import org.gvsig.tools.evaluator.Evaluator; public class DefaultEditableFeatureAttributeDescriptor extends DefaultFeatureAttributeDescriptor implements EditableFeatureAttributeDescriptor { private DefaultFeatureAttributeDescriptor source; private boolean hasStrongChanges; protected DefaultEditableFeatureAttributeDescriptor( DefaultFeatureAttributeDescriptor other) { super(other); this.source = other; hasStrongChanges=false; } protected DefaultEditableFeatureAttributeDescriptor( DefaultEditableFeatureAttributeDescriptor other) { super(other); this.source = other.getSource(); hasStrongChanges = false; } public DefaultEditableFeatureAttributeDescriptor() { super(); this.source = null; hasStrongChanges = false; } public DefaultFeatureAttributeDescriptor getSource() { return this.source; } public void fixAll() { } public void checkIntegrity() throws AttributeFeatureTypeIntegrityException { AttributeFeatureTypeIntegrityException ex = new AttributeFeatureTypeIntegrityException( getName()); if (this.size < 0) { ex.add(new AttributeFeatureTypeSizeException(this.size)); } // TODO: aņadir resto de comprobaciones de integridad. if (ex.size() > 0) { throw ex; } } public EditableFeatureAttributeDescriptor setAllowNull(boolean allowNull) { this.allowNull = allowNull; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setDataType(int type) { this.dataType = type; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setDefaultValue( Object defaultValue) { this.defaultValue = defaultValue; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setEvaluator(Evaluator evaluator) { this.evaluator = evaluator; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setGeometryType(int geometryType) { this.geometryType= geometryType; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setIsPrimaryKey( boolean isPrimaryKey) { this.primaryKey = isPrimaryKey; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setIsReadOnly(boolean isReadOnly) { this.readOnly = isReadOnly; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setMaximumOccurrences( int maximumOccurrences) { this.maximumOccurrences = maximumOccurrences; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setMinimumOccurrences( int minimumOccurrences) { this.minimumOccurrences = minimumOccurrences; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setName(String name) { this.name = name; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setObjectClass(Class theClass) { this.objectClass = theClass; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setPrecision(int precision) { this.precision = precision; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setSRS(IProjection SRS) { this.SRS = SRS; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public EditableFeatureAttributeDescriptor setSize(int size) { this.size = size; if( this.evaluator != null ) { hasStrongChanges=true; } return this; } public boolean hasStrongChanges() { return hasStrongChanges; } public EditableFeatureAttributeDescriptor setAdditionalInfo(String infoName, Object value) { if (this.additionalInfo == null) { this.additionalInfo = new HashMap(); } this.additionalInfo.put(infoName, value); return this; } public EditableFeatureAttributeDescriptor setIsAutomatic(boolean isAutomatic) { this.isAutomatic = isAutomatic; return this; } public EditableFeatureAttributeDescriptor setGeometrySubType( int geometrySubType) { this.geometrySubType = geometrySubType; return this; } }
[ "tranquangtruonghinh@gmail.com" ]
tranquangtruonghinh@gmail.com
45ec6345eaf4233e098790665717ea879e969a8d
5efc61cf2e85660d4c809662e34acefe27e57338
/jasperreports-5.6.0/demo/samples/virtualizer/src/VirtualizerApp.java
e45b9e6d1d7b10ecd9c7d8b56001ca72587a9a80
[ "Apache-2.0", "LGPL-3.0-only" ]
permissive
ferrinsp/kbellfireapp
b2924c0a18fcf93dd6dc33168bddf8840f811326
751cc81026f27913e31f5b1f14673ac33cbf2df1
refs/heads/master
2022-12-22T10:01:39.525208
2019-06-22T15:33:58
2019-06-22T15:33:58
135,739,120
0
1
Apache-2.0
2022-12-15T23:23:53
2018-06-01T16:14:53
Java
UTF-8
Java
false
false
5,909
java
/* * JasperReports - Free Java Reporting Library. * Copyright (C) 2001 - 2013 Jaspersoft Corporation. All rights reserved. * http://www.jaspersoft.com * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program is part of JasperReports. * * JasperReports is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * JasperReports is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with JasperReports. If not, see <http://www.gnu.org/licenses/>. */ import java.util.HashMap; import java.util.Map; import net.sf.jasperreports.engine.JRDataSource; import net.sf.jasperreports.engine.JREmptyDataSource; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRParameter; import net.sf.jasperreports.engine.JasperExportManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperPrintManager; import net.sf.jasperreports.engine.export.JRCsvExporter; import net.sf.jasperreports.engine.fill.JRFileVirtualizer; import net.sf.jasperreports.engine.util.AbstractSampleApp; import net.sf.jasperreports.export.SimpleExporterInput; import net.sf.jasperreports.export.SimpleWriterExporterOutput; import net.sf.jasperreports.view.JasperViewer; /** * @author Teodor Danciu (teodord@users.sourceforge.net) * @version $Id: VirtualizerApp.java 6731 2013-11-12 12:20:12Z teodord $ */ public class VirtualizerApp extends AbstractSampleApp { /** * */ public static void main(String[] args) { main(new VirtualizerApp(), args); } /** * */ public void test() throws JRException { export(); } /** * */ public void view() throws JRException { JasperPrint jasperPrint = fillReport(); JasperViewer.viewReport(jasperPrint, true); } /** * */ public void print() throws JRException { JasperPrint jasperPrint = fillReport(); JasperPrintManager.printReport(jasperPrint, true); } /** * */ public void pdf() throws JRException { JasperPrint jasperPrint = fillReport(); exportPdf(jasperPrint); } /** * */ public void xml() throws JRException { JasperPrint jasperPrint = fillReport(); exportXml(jasperPrint, false); } /** * */ public void xmlEmbed() throws JRException { JasperPrint jasperPrint = fillReport(); exportXml(jasperPrint, true); } /** * */ public void csv() throws JRException { JasperPrint jasperPrint = fillReport(); exportCsv(jasperPrint); } /** * */ public void export() throws JRException { // creating the virtualizer JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "tmp"); JasperPrint jasperPrint = fillReport(virtualizer); exportPdf(jasperPrint); exportXml(jasperPrint, false); exportHtml(jasperPrint); exportCsv(jasperPrint); // manually cleaning up virtualizer.cleanup(); } private static JasperPrint fillReport() throws JRException { // creating the virtualizer JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "tmp"); return fillReport(virtualizer); } private static JasperPrint fillReport(JRFileVirtualizer virtualizer) throws JRException { long start = System.currentTimeMillis(); // Virtualization works only with in memory JasperPrint objects. // All the operations will first fill the report and then export // the filled object. // creating the data source JRDataSource dataSource = new JREmptyDataSource(1000); // Preparing parameters Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); // filling the report JasperPrint jasperPrint = JasperFillManager.fillReport("build/reports/VirtualizerReport.jasper", parameters, dataSource); virtualizer.setReadOnly(true); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); return jasperPrint; } private static void exportCsv(JasperPrint jasperPrint) throws JRException { long start = System.currentTimeMillis(); JRCsvExporter exporter = new JRCsvExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleWriterExporterOutput("build/reports/" + jasperPrint.getName() + ".csv")); exporter.exportReport(); System.err.println("CSV creation time : " + (System.currentTimeMillis() - start)); } private static void exportHtml(JasperPrint jasperPrint) throws JRException { long start = System.currentTimeMillis(); JasperExportManager.exportReportToHtmlFile(jasperPrint, "build/reports/" + jasperPrint.getName() + ".html"); System.err.println("HTML creation time : " + (System.currentTimeMillis() - start)); } private static void exportXml(JasperPrint jasperPrint, boolean embedded) throws JRException { long start = System.currentTimeMillis(); JasperExportManager.exportReportToXmlFile(jasperPrint, "build/reports/" + jasperPrint.getName() + ".jrpxml", embedded); System.err.println("XML creation time : " + (System.currentTimeMillis() - start)); } private static void exportPdf(JasperPrint jasperPrint) throws JRException { long start = System.currentTimeMillis(); JasperExportManager.exportReportToPdfFile(jasperPrint, "build/reports/" + jasperPrint.getName() + ".pdf"); System.err.println("PDF creation time : " + (System.currentTimeMillis() - start)); } }
[ "ferrinsp@gmail.com" ]
ferrinsp@gmail.com
eceda668e230c1248380642b88ca502da08991aa
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_e9cc851225495032b711e438275fe9b9dba79e49/DisplayStringMetadata/4_e9cc851225495032b711e438275fe9b9dba79e49_DisplayStringMetadata_s.java
e18aaef91c6338e3f6ee0f68d5c91ffb3a13a5bb
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,331
java
package org.springframework.roo.addon.displaystring; import static org.springframework.roo.model.JavaType.STRING; import static org.springframework.roo.model.JdkJavaType.CALENDAR; import static org.springframework.roo.model.JdkJavaType.DATE; import static org.springframework.roo.model.JdkJavaType.DATE_FORMAT; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; import org.springframework.roo.classpath.PhysicalTypeIdentifierNamingUtils; import org.springframework.roo.classpath.PhysicalTypeMetadata; import org.springframework.roo.classpath.details.BeanInfoUtils; import org.springframework.roo.classpath.details.MethodMetadata; import org.springframework.roo.classpath.details.MethodMetadataBuilder; import org.springframework.roo.classpath.itd.AbstractItdTypeDetailsProvidingMetadataItem; import org.springframework.roo.classpath.itd.InvocableMemberBodyBuilder; import org.springframework.roo.metadata.MetadataIdentificationUtils; import org.springframework.roo.model.ImportRegistrationResolver; import org.springframework.roo.model.JavaSymbolName; import org.springframework.roo.model.JavaType; import org.springframework.roo.project.Path; import org.springframework.roo.support.style.ToStringCreator; import org.springframework.roo.support.util.Assert; import org.springframework.roo.support.util.CollectionUtils; import org.springframework.roo.support.util.StringUtils; /** * Metadata for {@link RooDisplayString}. * * @author Alan Stewart * @since 1.2.0 */ public class DisplayStringMetadata extends AbstractItdTypeDetailsProvidingMetadataItem { // Constants private static final String PROVIDES_TYPE_STRING = DisplayStringMetadata.class.getName(); private static final String PROVIDES_TYPE = MetadataIdentificationUtils.create(PROVIDES_TYPE_STRING); private static final int MAX_LIST_VIEW_FIELDS = 4; // Fields private final DisplayStringAnnotationValues annotationValues; private final List<MethodMetadata> locatedAccessors; private final MethodMetadata identifierAccessor; /** * Constructor * * @param identifier * @param aspectName * @param governorPhysicalTypeMetadata * @param annotationValues * @param locatedAccessors * @param identifierAccessor */ public DisplayStringMetadata(final String identifier, final JavaType aspectName, final PhysicalTypeMetadata governorPhysicalTypeMetadata, final DisplayStringAnnotationValues annotationValues, final List<MethodMetadata> locatedAccessors, final MethodMetadata identifierAccessor) { super(identifier, aspectName, governorPhysicalTypeMetadata); Assert.isTrue(isValid(identifier), "Metadata identification string '" + identifier + "' does not appear to be a valid"); Assert.notNull(annotationValues, "Annotation values required"); Assert.notNull(locatedAccessors, "Located accessors required"); this.annotationValues = annotationValues; this.locatedAccessors = locatedAccessors; this.identifierAccessor = identifierAccessor; // Generate the getDisplayString method builder.addMethod(getDisplayStringMethod()); // Create a representation of the desired output ITD itdTypeDetails = builder.build(); } /** * Obtains the display string method for this type, if available. * <p> * If the user provided a non-default name for "getDisplayString", that method will be returned. * * @return the display name method declared on this type or that will be introduced (or null if undeclared and not introduced) */ private MethodMetadata getDisplayStringMethod() { JavaSymbolName methodName = new JavaSymbolName("getDisplayString"); if (getGovernorMethod(methodName) != null) { return null; } final ImportRegistrationResolver imports = builder.getImportRegistrationResolver(); final List<?> fieldsList = CollectionUtils.arrayToList(annotationValues.getFields()); int methodCount = 0; final List<String> displayMethods = new ArrayList<String>(); for (MethodMetadata accessor : locatedAccessors) { String accessorName = accessor.getMethodName().getSymbolName(); String accessorText; if (accessor.getReturnType().isCommonCollectionType() || accessor.getReturnType().isArray()) { continue; } else if (CALENDAR.equals(accessor.getReturnType())) { imports.addImport(DATE_FORMAT); accessorText = accessorName + "() == null ? \"\" : DateFormat.getDateInstance(DateFormat.LONG).format(" + accessorName + "().getTime())"; } else if (DATE.equals(accessor.getReturnType())) { imports.addImport(DATE_FORMAT); accessorText = accessorName + "() == null ? \"\" : DateFormat.getDateInstance(DateFormat.LONG).format(" + accessorName + "())"; } else { accessorText = accessorName + "()"; } if (!fieldsList.isEmpty()) { String fieldName = BeanInfoUtils.getPropertyNameForJavaBeanMethod(accessor).getSymbolName(); if (fieldsList.contains(StringUtils.uncapitalize(fieldName))) { displayMethods.add(accessorText); } continue; } if (methodCount <= MAX_LIST_VIEW_FIELDS) { if (identifierAccessor != null && accessor.hasSameName(identifierAccessor)) { continue; } methodCount++; displayMethods.add(accessorText); } } if (displayMethods.isEmpty()) { return null; } String separator = StringUtils.defaultIfEmpty(annotationValues.getSeparator(), " "); final StringBuilder builder = new StringBuilder("return new StringBuilder()"); for (int i = 0; i < displayMethods.size(); i++) { if (i > 0) { builder.append(".append(\"").append(separator).append("\")"); } builder.append(".append(").append(displayMethods.get(i)).append(")"); } builder.append(".toString();"); final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder(); bodyBuilder.appendFormalLine(builder.toString()); MethodMetadataBuilder methodBuilder = new MethodMetadataBuilder(getId(), Modifier.PUBLIC, methodName, STRING, bodyBuilder); return methodBuilder.build(); } @Override public String toString() { ToStringCreator tsc = new ToStringCreator(this); tsc.append("identifier", getId()); tsc.append("valid", valid); tsc.append("aspectName", aspectName); tsc.append("destinationType", destination); tsc.append("governor", governorPhysicalTypeMetadata.getId()); tsc.append("itdTypeDetails", itdTypeDetails); return tsc.toString(); } public static String getMetadataIdentiferType() { return PROVIDES_TYPE; } public static String createIdentifier(final JavaType javaType, final Path path) { return PhysicalTypeIdentifierNamingUtils.createIdentifier(PROVIDES_TYPE_STRING, javaType, path); } public static JavaType getJavaType(final String metadataIdentificationString) { return PhysicalTypeIdentifierNamingUtils.getJavaType(PROVIDES_TYPE_STRING, metadataIdentificationString); } public static Path getPath(final String metadataIdentificationString) { return PhysicalTypeIdentifierNamingUtils.getPath(PROVIDES_TYPE_STRING, metadataIdentificationString); } public static boolean isValid(final String metadataIdentificationString) { return PhysicalTypeIdentifierNamingUtils.isValid(PROVIDES_TYPE_STRING, metadataIdentificationString); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
cd8ef3d70699f32bc37b342dddde49ec42e88116
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1006978.java
44830ad7d1291eda2220dcb135362321c3ee5acd
[]
no_license
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
217
java
public void update(ExecutionContext executionContext) throws ItemStreamException { executionContext.putInt(EXPECTED,localState.expected.intValue()); executionContext.putInt(ACTUAL,localState.actual.intValue()); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
5a416612ee87c3426dfa2715f1322e142efd32af
f65df16ef266aa17e3fec6e6b172f7f32ec4ddc6
/2.JavaCore/src/com/javarush/task/task20/task2019/Solution.java
9360656194f025dd1095a310bd5331f3389a6c23
[]
no_license
Andrei-Rom/JavaRushTasks
56f5e4ad920f689667453ba9a0fb8f94a5c84bb7
e631d5dd824051809d3b142b2711a0651a2a837b
refs/heads/master
2020-06-11T11:18:31.500589
2019-08-10T19:38:33
2019-08-10T19:38:33
193,941,708
0
0
null
null
null
null
UTF-8
Java
false
false
1,553
java
package com.javarush.task.task20.task2019; import java.io.*; import java.util.HashMap; import java.util.Map; /* Исправить ошибку. Сериализация */ public class Solution implements Serializable { public static void main(String args[]) throws Exception { FileOutputStream fileOutput = new FileOutputStream("C:\\Users\\Андрей\\Downloads\\JavaRushTasks\\JavaRushTasks\\2.JavaCore\\src\\com\\javarush\\task\\task20\\task2019\\mapTest"); ObjectOutputStream outputStream = new ObjectOutputStream(fileOutput); Solution solution = new Solution(); outputStream.writeObject(solution); //System.out.println(solution.size()); проверка исходного fileOutput.close(); outputStream.close(); //load FileInputStream fiStream = new FileInputStream("C:\\Users\\Андрей\\Downloads\\JavaRushTasks\\JavaRushTasks\\2.JavaCore\\src\\com\\javarush\\task\\task20\\task2019\\mapTest"); ObjectInputStream objectStream = new ObjectInputStream(fiStream); Solution loadedObject = (Solution) objectStream.readObject(); fiStream.close(); objectStream.close(); //Attention!! System.out.println(loadedObject.size()); } private Map<String, String> m = new HashMap<>(); public Map<String, String> getMap() { return m; } public Solution() { m.put("Mickey", "Mouse"); m.put("Mickey", "Mantle"); } public int size() { return m.size(); } }
[ "andrisrom@gmail.com" ]
andrisrom@gmail.com
08d1d3e4871ea123eb230eb4a0535f04a399f405
b2a3210ea197e86967e9d57d1390fd0f804b2a36
/on-java8/src/main/java/com/ericaShy/java8/typeinfo/DynamicSupplier.java
4f9100c43b8135f24df9c3b5979fb9d6f9b49205
[]
no_license
547358880/javatutorials
5b97781755c7b00064e078228120cf8e8775aa67
c4f698805e437a30ffd9d4804284c84327d8693b
refs/heads/master
2021-06-26T19:28:17.101859
2020-01-02T00:49:07
2020-01-02T00:49:07
220,178,290
0
0
null
2021-03-31T21:38:17
2019-11-07T07:37:28
Java
UTF-8
Java
false
false
893
java
package com.ericaShy.java8.typeinfo; import java.util.function.Supplier; import java.util.stream.Stream; class CountedInteger { private static long counter; private final long id = counter++; @Override public String toString() { return Long.toString(id); } } public class DynamicSupplier<T> implements Supplier<T> { private Class<T> type; public DynamicSupplier(Class<T> type) { this.type = type; } @Override public T get() { try { return type.newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw new RuntimeException(e); } } public static void main(String[] args) { Stream.generate(new DynamicSupplier<>(CountedInteger.class)) .skip(10) .limit(5) .forEach(System.out::println); } }
[ "547358880@qq.com" ]
547358880@qq.com
bf6b920f4a9b1639f4d411bd4266ca01a716fd77
d6dfdc83446a0c8f4539227d0f674cf9289bdb08
/bundle/jsky.app.ot/src/main/java/jsky/image/gui/ImagePropertiesInternalFrame.java
f243d1901c6df4932bec6224e7dcb1af438cc515
[ "MIT" ]
permissive
gitter-badger/ocs
6c3c795ce288f101eff6a800d320b4735ed95571
9329213adcb1ff60cea76e4feb426ed79985361f
refs/heads/develop
2020-12-11T04:12:28.014282
2015-06-16T01:17:13
2015-06-16T01:17:13
37,540,475
0
0
null
2015-06-16T15:57:10
2015-06-16T15:57:09
null
UTF-8
Java
false
false
1,537
java
/* * ESO Archive * * $Id: ImagePropertiesInternalFrame.java 4414 2004-02-03 16:21:36Z brighton $ * * who when what * -------------- ---------- ---------------------------------------- * Allan Brighton 1999/05/03 Created */ package jsky.image.gui; import java.awt.*; import javax.swing.*; import jsky.util.Preferences; /** * Provides a top level window for an ImageProperties panel. * * @version $Revision: 4414 $ * @author Allan Brighton */ public class ImagePropertiesInternalFrame extends JInternalFrame { private ImageProperties imageProperties; /** * Create a top level window containing an ImageProperties panel. */ public ImagePropertiesInternalFrame(MainImageDisplay imageDisplay) { super("Image Properties", true, false, true, true); imageProperties = new ImageProperties(this, imageDisplay); getContentPane().add(imageProperties, BorderLayout.CENTER); pack(); setClosable(true); setIconifiable(false); setMaximizable(false); setDefaultCloseOperation(HIDE_ON_CLOSE); Preferences.manageSize(imageProperties, new Dimension(400, 400)); Preferences.manageLocation(this); setVisible(true); } /** * Update the display from the current image */ public void updateDisplay() { imageProperties.updateDisplay(); } /** Return the internal panel object */ public ImageProperties getImageProperties() { return imageProperties; } }
[ "swalker2m@gmail.com" ]
swalker2m@gmail.com
394691220fa1e69a4ced5ab28a88fdb23b08e17f
8edd2131c9d8b6968be70f2dec46ed058845fb67
/src/com/casic/core/hibernate/SpringSessionContext.java
5142b8a715609d69558294ac5db1e867fc714f3b
[]
no_license
casic203/alarm
f19f7a91c6c7c5ba28e9f1be18ad8f3eabf39f66
13a85f70a132461da568c76b9efd8b96bcf8af81
refs/heads/master
2021-01-10T20:33:20.422547
2014-10-14T13:44:18
2014-10-14T13:44:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,775
java
package com.casic.core.hibernate; import org.hibernate.FlushMode; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.context.spi.CurrentSessionContext; import org.springframework.orm.hibernate4.SessionHolder; import org.springframework.transaction.support.TransactionSynchronizationManager; public class SpringSessionContext implements CurrentSessionContext { private final SessionFactory sessionFactory; public SpringSessionContext(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } public Session currentSession() throws HibernateException { Object value = TransactionSynchronizationManager.getResource(this.sessionFactory); if ((value instanceof Session)) return (Session)value; if ((value instanceof SessionHolder)) { SessionHolder sessionHolder = (SessionHolder)value; Session session = sessionHolder.getSession(); if ((TransactionSynchronizationManager.isSynchronizationActive()) && (!sessionHolder.isSynchronizedWithTransaction())) { TransactionSynchronizationManager.registerSynchronization(new SpringSessionSynchronization(sessionHolder, this.sessionFactory)); sessionHolder.setSynchronizedWithTransaction(true); FlushMode flushMode = session.getFlushMode(); if ((FlushMode.isManualFlushMode(flushMode)) && (!TransactionSynchronizationManager.isCurrentTransactionReadOnly())) { session.setFlushMode(FlushMode.AUTO); sessionHolder.setPreviousFlushMode(flushMode); } } return session; } throw new HibernateException("No Session found for current thread"); } }
[ "zhangfan1212@126.com" ]
zhangfan1212@126.com
7b96abd463a336265d30acded23486400592d5aa
a9843bd3a8c4a0d2eb720746d83ce6a609802f35
/java/bypstest-ser-json/src/byps/test/api/remote/JSerializer_1727949326.java
f1728257501b34a48e26292ed4f801613e7c7a80
[ "MIT" ]
permissive
digideskio/byps
0d99da7cc488d5cbbe9d46b77ce1ac5e808be8da
5f3933faacad255ae8f1fb11585ee681ad4444a9
refs/heads/master
2021-01-18T01:31:09.543537
2016-05-16T09:13:31
2016-05-16T09:21:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,334
java
package byps.test.api.remote; /* * Serializer for byps.test.api.remote.BRequest_RemotePrimitiveTypes_setDouble * * THIS FILE HAS BEEN GENERATED BY class byps.gen.j.GenSerStructJson DO NOT MODIFY. */ import byps.*; // DEBUG // isEnum=false // isFinal=true // isInline=false // #members=1 // checkpoint byps.gen.j.GenSerStruct:274 @SuppressWarnings("all") public class JSerializer_1727949326 extends JSerializer_Object { public final static BSerializer instance = new JSerializer_1727949326(); public JSerializer_1727949326() { super(1727949326); } public JSerializer_1727949326(int typeId) { super(typeId); } @Override public void internalWrite(final Object obj1, final BOutputJson bout, final BBufferJson bbuf) throws BException { final BRequest_RemotePrimitiveTypes_setDouble obj = (BRequest_RemotePrimitiveTypes_setDouble)obj1; bbuf.putDouble("v", obj.v); } @Override public Object internalRead(final Object obj1, final BInputJson bin) throws BException { final BRequest_RemotePrimitiveTypes_setDouble obj = (BRequest_RemotePrimitiveTypes_setDouble)(obj1 != null ? obj1 : bin.onObjectCreated(new BRequest_RemotePrimitiveTypes_setDouble())); final BJsonObject js = bin.currentObject; obj.v = js.getDouble("v"); return obj; } }
[ "wolfgang.imig@googlemail.com" ]
wolfgang.imig@googlemail.com
4ba010545f562bcd03ce3643bc5ae30d939708ba
3573c688a716436559a3fae0159c64c2546e2e81
/shiro-integration4/src/main/java/com/zhaolearn/shirointegration4/service/impl/ShiroServiceImpl.java
03915097d234a593046510ac1265e37da5f6b7b2
[]
no_license
Ryze-Zhao/ShiroDemo
25c803fb59df8a8bac0dc9a2690e7a93955cea55
0fecfd04eab0a7e6fa112cc259d879a4315b52b7
refs/heads/master
2020-04-11T01:59:42.066821
2019-02-28T04:27:25
2019-02-28T04:27:25
161,432,380
1
0
null
null
null
null
UTF-8
Java
false
false
3,053
java
package com.zhaolearn.shirointegration4.service.impl; import com.zhaolearn.shirointegration4.common.JWTToken; import com.zhaolearn.shirointegration4.common.JWTUtil; import com.zhaolearn.shirointegration4.domain.Role; import com.zhaolearn.shirointegration4.domain.User; import com.zhaolearn.shirointegration4.repository.PermissionRepository; import com.zhaolearn.shirointegration4.repository.RoleRepository; import com.zhaolearn.shirointegration4.repository.UserRepository; import com.zhaolearn.shirointegration4.service.ShiroService; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.*; import org.apache.shiro.subject.Subject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Set; @Service public class ShiroServiceImpl implements ShiroService { private final static Logger logger = LoggerFactory.getLogger(ShiroServiceImpl.class); @Autowired private UserRepository userRepository; @Autowired private RoleRepository roleRepository; @Autowired private PermissionRepository permissionRepository; @Override public User findByUserName(String username) { return userRepository.findByUserName(username); } @Override public String findPermByUserName(String userName) { return permissionRepository.findPermByUserName(userName); } @Override public Role findRoleByUserName(String userName) { return roleRepository.findByUserName(userName); } @Override public Set<String> findRolesByUserName(String userName) { return roleRepository.findRolesByUserName(userName); } @Override public Set<String> findPermsByUserName(String userName) { return permissionRepository.findPermsByUserName(userName); } @Override public String loginCheck(User user) throws Exception { //获取当前操作系统的用户 Subject subject = SecurityUtils.getSubject(); String tokenStrinf=JWTUtil.sign(user.getUserName(), user.getPassWord()); //封装用户参数 JWTToken token = new JWTToken(tokenStrinf); try { //执行登录方法,如果没异常就是登录成功 subject.login(token); return tokenStrinf; }catch (UnknownAccountException uae) { //账户不存在 throw new UnknownAccountException("账户不存在"); } catch (IncorrectCredentialsException ice) { //密码不正确 throw new IncorrectCredentialsException("密码不正确"); } catch (LockedAccountException lae) { //用户被锁定了 throw new LockedAccountException("用户被锁定了 "); } catch (AuthenticationException ae) { //无法判断是什么错 throw new AuthenticationException("未知错误"); } catch (Exception e) { throw new Exception(e.getMessage()); } } }
[ "643080112@qq.com" ]
643080112@qq.com
d9966d3ef9aab90df5845cc95d8aa8c879a19c0a
a5e03ae6c2c9bd310bd41eeeb45402460e94a9f2
/src/java.desktop/share/classes/java/awt/EventQueue.java
5bde57f24c91e8232462cbe15efac9c2b150618d
[]
no_license
zhangjiangqige/mini-jdk11
ad05f5a2f862b3fe22bf45220124bdcbe899be6e
5c660a9a8e6b24e7084248d453611be05c1c1671
refs/heads/master
2020-09-10T18:19:33.494523
2019-11-27T22:23:30
2019-11-27T22:23:30
221,790,773
0
0
null
null
null
null
UTF-8
Java
false
false
3,007
java
/* * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.awt; import org.checkerframework.checker.guieffect.qual.SafeEffect; import org.checkerframework.checker.guieffect.qual.UI; import org.checkerframework.checker.guieffect.qual.UIType; import org.checkerframework.checker.interning.qual.UsesObjectEquals; import org.checkerframework.framework.qual.AnnotatedFor; import java.awt.event.*; import java.awt.peer.ComponentPeer; import java.lang.ref.WeakReference; import java.lang.reflect.InvocationTargetException; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.EmptyStackException; import sun.awt.*; import sun.awt.dnd.SunDropTargetEvent; import sun.util.logging.PlatformLogger; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.atomic.AtomicInteger; import java.security.AccessControlContext; import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.JavaSecurityAccess; @UIType @AnnotatedFor({ "interning" }) @UsesObjectEquals public class EventQueue { public EventQueue() { } public void postEvent(AWTEvent theEvent); public AWTEvent getNextEvent() throws InterruptedException; public AWTEvent peekEvent(); public AWTEvent peekEvent(int id); protected void dispatchEvent(final AWTEvent event); public static long getMostRecentEventTime(); public static AWTEvent getCurrentEvent(); public void push(EventQueue newEventQueue); protected void pop() throws EmptyStackException; public SecondaryLoop createSecondaryLoop(); public static boolean isDispatchThread(); @SafeEffect public static void invokeLater(@UI Runnable runnable); public static void invokeAndWait(Runnable runnable) throws InterruptedException, InvocationTargetException; }
[ "zhangjiangqige@gmail.com" ]
zhangjiangqige@gmail.com
94fe561796385197045156df03ca74ad670e04ee
b4a2a49b9744329e5e894cef1222be309bfe58b2
/src/main/java/org/tugraz/sysds/lops/WeightedDivMMR.java
1c8e9a1bd6e1703430a0ac8a3b86f873e8f2a2f9
[ "Apache-2.0" ]
permissive
tugraz-isds/systemds
b1942d8f905ccf8a5da233a376c8bab045688cbf
c771440e9d41507a1420a58d316ac82b53923d55
refs/heads/master
2021-06-26T02:49:55.256823
2020-09-01T15:39:21
2020-09-01T15:39:21
147,829,568
42
28
Apache-2.0
2020-10-13T10:59:15
2018-09-07T13:48:30
Java
UTF-8
Java
false
false
2,413
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.tugraz.sysds.lops; import org.tugraz.sysds.lops.LopProperties.ExecType; import org.tugraz.sysds.lops.WeightedDivMM.WDivMMType; import org.tugraz.sysds.runtime.instructions.InstructionUtils; import org.tugraz.sysds.common.Types.DataType; import org.tugraz.sysds.common.Types.ValueType; public class WeightedDivMMR extends Lop { public static final String OPCODE = "redwdivmm"; private WDivMMType _weightsType = null; private boolean _cacheU = false; private boolean _cacheV = false; public WeightedDivMMR(Lop input1, Lop input2, Lop input3, Lop input4, DataType dt, ValueType vt, WDivMMType wt, boolean cacheU, boolean cacheV, ExecType et) { super(Lop.Type.WeightedDivMM, dt, vt); addInput(input1); //W addInput(input2); //U addInput(input3); //V addInput(input4); //X input1.addOutput(this); input2.addOutput(this); input3.addOutput(this); input4.addOutput(this); _weightsType = wt; _cacheU = cacheU; _cacheV = cacheV; setupLopProperties(et); } @Override public String toString() { return "Operation = WeightedDivMMR"; } @Override public String getInstructions(String input1, String input2, String input3, String input4, String output) { return InstructionUtils.concatOperands( getExecType().name(), OPCODE, getInputs().get(0).prepInputOperand(input1), getInputs().get(1).prepInputOperand(input2), getInputs().get(2).prepInputOperand(input3), getInputs().get(3).prepInputOperand(input4), prepOutputOperand(output), String.valueOf(_weightsType), String.valueOf(_cacheU), String.valueOf(_cacheV)); } }
[ "mboehm7@gmail.com" ]
mboehm7@gmail.com
3a6ae967144c1349a728c36631a054b35394d55b
f0daa8b59ca5accb6920aa61007c6bd10d6e2961
/src/test/java/mr/MR7TestIndex1Loop3NumOfThreads2.java
cd55e07ef1d4f5660b3b198187b04c6689584af2
[]
no_license
phantomDai/cptiscas
09b211ff984c228471d9ab28f8c5c05f946c753c
83e3ef777b7677c913a0839f8dd8e4df1bc20e0e
refs/heads/master
2021-07-05T10:54:16.856267
2019-06-06T06:18:12
2019-06-06T06:18:12
143,225,040
0
0
null
null
null
null
UTF-8
Java
false
false
370
java
package mr; import junit.framework.TestCase; import org.junit.After; import org.junit.Before; import org.junit.Test; public class MR7TestIndex1Loop3NumOfThreads2 extends TestCase{ MR7 mr; @Before public void setUp(){ mr = new MR7(); } @After public void tearDown(){ mr = null; } @Test public void testMR(){ mr.executeService(1,3,2,"FineGrainedHeap"); } }
[ "daihepeng@sina.cn" ]
daihepeng@sina.cn
fe5767abc036a92f961c9069bf2410f009b18462
305fe6dc70184b3b3397485e77dee46c39336416
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201306/billing/CustomerOrderLineErrorReason.java
0bf3f925f60356b920cbeb7743bdbcfb6e6cfa3d
[ "Apache-2.0" ]
permissive
wangshuo870606/googleads-java-lib
a6b51f93bed1d56c9ca277218189a0f196a0dbed
dfb2bc36124297833805f08f322b2db8b97fc11f
refs/heads/master
2021-01-12T19:44:15.291058
2014-03-06T05:41:09
2014-03-06T05:41:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,394
java
package com.google.api.ads.adwords.jaxws.v201306.billing; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for CustomerOrderLineError.Reason. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="CustomerOrderLineError.Reason"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="INVALID_ORDER_LINE_ID"/> * &lt;enumeration value="END_DATE_BEFORE_START_DATE"/> * &lt;enumeration value="NEGATIVE_SPEND"/> * &lt;enumeration value="CREATE_IN_PAST"/> * &lt;enumeration value="ALREADY_STARTED"/> * &lt;enumeration value="ALREADY_SPENT"/> * &lt;enumeration value="FINISHED_IN_THE_PAST"/> * &lt;enumeration value="CANCEL_ACTIVE"/> * &lt;enumeration value="OVERLAP_DATE_RANGE"/> * &lt;enumeration value="COS_CHANGE"/> * &lt;enumeration value="NON_ADWORDS"/> * &lt;enumeration value="START_DATE_AFTER_ACTUAL"/> * &lt;enumeration value="END_DATE_PAST_MAX"/> * &lt;enumeration value="PARENT_IS_SELF"/> * &lt;enumeration value="CANNOT_CANCEL_NEW"/> * &lt;enumeration value="CANNOT_CANCEL_STARTED"/> * &lt;enumeration value="CANNOT_PROMOTE_NON_PENDING_ORDERLINE"/> * &lt;enumeration value="UPDATE_ORDERLINE_WILL_SHIFT_CURRENT"/> * &lt;enumeration value="ORDERLINE_BEING_MODIFIED_IS_NOT_NORMAL_OR_PENDING"/> * &lt;enumeration value="INVALID_STATUS_CHANGE"/> * &lt;enumeration value="MORE_THAN_ONE_OPERATION_NOT_PERMITTED"/> * &lt;enumeration value="INVALID_TIMEZONE_IN_DATE_RANGES"/> * &lt;enumeration value="UNKNOWN"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "CustomerOrderLineError.Reason") @XmlEnum public enum CustomerOrderLineErrorReason { /** * * Order Line Id does not exist. * * */ INVALID_ORDER_LINE_ID, /** * * End date must be later than start date * * */ END_DATE_BEFORE_START_DATE, /** * * Spending limit must be positive * * */ NEGATIVE_SPEND, /** * * Cannot create order line with start date in the past * * */ CREATE_IN_PAST, /** * * Cannot change start date after the order line has started * * */ ALREADY_STARTED, /** * * Cannot set spending limit below what has already been spent * * */ ALREADY_SPENT, /** * * Cannot move end date into the past * * */ FINISHED_IN_THE_PAST, /** * * Cannot cancel active order line * * */ CANCEL_ACTIVE, /** * * Cannot make overlapping order lines. * * */ OVERLAP_DATE_RANGE, /** * * Cannot make a COS order line non-COS. * * */ COS_CHANGE, /** * * Cannot create an order line on a non-adwords account * * */ NON_ADWORDS, /** * * Cannot set contract start date to be after actual start date * * */ START_DATE_AFTER_ACTUAL, /** * * Cannot set contract start date to be after actual start date * * */ END_DATE_PAST_MAX, /** * * only cancelled order lines may have themselves as parent * * */ PARENT_IS_SELF, /** * * Cannot cancel new order line * * */ CANNOT_CANCEL_NEW, /** * * Cannot cancel started order line * * */ CANNOT_CANCEL_STARTED, /** * * Cannot promote an order line that is not pending. * * */ CANNOT_PROMOTE_NON_PENDING_ORDERLINE, /** * * Updating order line will shift current order line. * * */ UPDATE_ORDERLINE_WILL_SHIFT_CURRENT, /** * * Only Order lines in normal or pending state can be modified. * * */ ORDERLINE_BEING_MODIFIED_IS_NOT_NORMAL_OR_PENDING, /** * * Invalid Status Change by client. * * */ INVALID_STATUS_CHANGE, /** * * More than one operation not permitted per call. * * */ MORE_THAN_ONE_OPERATION_NOT_PERMITTED, /** * * StartDate and EndDate should pass in the customer's account timeZone. * * */ INVALID_TIMEZONE_IN_DATE_RANGES, UNKNOWN; public String value() { return name(); } public static CustomerOrderLineErrorReason fromValue(String v) { return valueOf(v); } }
[ "jradcliff@google.com" ]
jradcliff@google.com
59e974a3e0bb910647fbb17f7a649613a769ff73
ef23d9b833a84ad79a9df816bd3fd1321b09851e
/L2J_SunriseProject_Data/dist/game/data/scripts/ai/individual/extra/ToiRaids/Hallate.java
3236fd401e389610edc6e3b96f041209708a011d
[]
no_license
nascimentolh/JBlueHeart-Source
c05c07137a7a4baf5fe8a793375f1700618ef12c
4179e6a6dbd0f74d614d7cc1ab7eb90ff41af218
refs/heads/master
2022-05-28T22:05:06.858469
2020-04-26T15:22:17
2020-04-26T15:22:17
259,045,356
1
0
null
null
null
null
UTF-8
Java
false
false
1,476
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package ai.individual.extra.ToiRaids; import l2r.gameserver.model.actor.instance.L2NpcInstance; import l2r.gameserver.model.actor.instance.L2PcInstance; import ai.npc.AbstractNpcAI; public class Hallate extends AbstractNpcAI { private static final int HALLATE = 25220; private static final int z1 = -2150; private static final int z2 = -1650; public Hallate() { super(Hallate.class.getSimpleName(), "ai"); addAttackId(HALLATE); } public String onAttack(L2NpcInstance npc, L2PcInstance attacker, int damage, boolean isPet) { int npcId = npc.getId(); if (npcId == HALLATE) { int z = npc.getZ(); if ((z > z2) || (z < z1)) { npc.teleToLocation(113548, 17061, -2125); npc.getStatus().setCurrentHp(npc.getMaxHp()); } } return super.onAttack(npc, attacker, damage, isPet); } }
[ "luizh.nnh@gmail.com" ]
luizh.nnh@gmail.com
2d89c204789fb22bf2952ff7e29b80dcf098fb5c
7f298c2bf9ff5a61eeb87e3929e072c9a04c8832
/spring-web/src/main/java/org/springframework/web/util/pattern/SeparatorPathElement.java
d5d52a5ab32a8dd51b3bce50c623c2b3f6b9b9bf
[ "Apache-2.0" ]
permissive
stwen/my-spring5
1ca1e85786ba1b5fdb90a583444a9c030fe429dd
d44be68874b8152d32403fe87c39ae2a8bebac18
refs/heads/master
2023-02-17T19:51:32.686701
2021-01-15T05:39:14
2021-01-15T05:39:14
322,756,105
0
0
null
null
null
null
UTF-8
Java
false
false
1,974
java
/* * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.util.pattern; import org.springframework.web.util.pattern.PathPattern.MatchingContext; /** * A separator path element. In the pattern '/foo/bar' the two occurrences * of '/' will be represented by a SeparatorPathElement (if the default * separator of '/' is being used). * * @author Andy Clement * @since 5.0 */ class SeparatorPathElement extends PathElement { SeparatorPathElement(int pos, char separator) { super(pos, separator); } /** * Matching a separator is easy, basically the character at candidateIndex * must be the separator. */ @Override public boolean matches(int pathIndex, MatchingContext matchingContext) { if (pathIndex < matchingContext.pathLength && matchingContext.isSeparator(pathIndex)) { if (isNoMorePattern()) { if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = pathIndex + 1; return true; } else { return (pathIndex + 1 == matchingContext.pathLength); } } else { pathIndex++; return (this.next != null && this.next.matches(pathIndex, matchingContext)); } } return false; } @Override public int getNormalizedLength() { return 1; } public String toString() { return "Separator(" + this.separator + ")"; } public char[] getChars() { return new char[]{this.separator}; } }
[ "xianhao_gan@qq.com" ]
xianhao_gan@qq.com
d5bae239e4b77a3cde8aa7a38f5fe017d02d0446
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_1e984167b75327f828e5c138f6dd5531d0cb7e7e/ProjectSelectionDialog/1_1e984167b75327f828e5c138f6dd5531d0cb7e7e_ProjectSelectionDialog_s.java
f2b2a033c3914ea76921ce8775d433f9a55ba633
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,480
java
/******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.debug.ui.actions; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.dialogs.ListSelectionDialog; /** * A dialog for selecting projects to add to a classpath or source * lookup path. Optionally specifies whether * exported entries and required projects should also be added. */ public class ProjectSelectionDialog extends ListSelectionDialog { private boolean fAddExportedEntries = true; private boolean fAddRequiredProjects = true; /** * @see ListSelectionDialog */ public ProjectSelectionDialog( Shell parentShell, Object input, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, String message) { super(parentShell, input, contentProvider, labelProvider, message); } /** * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) */ protected Control createDialogArea(Composite parent) { Font font = parent.getFont(); Composite composite = (Composite)super.createDialogArea(parent); final Button addExported = new Button(composite, SWT.CHECK); addExported.setText(ActionMessages.getString("ProjectSelectionDialog.Add_exported_entries_of_selected_projects._1")); //$NON-NLS-1$ addExported.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fAddExportedEntries = addExported.getSelection(); } }); addExported.setSelection(fAddExportedEntries); addExported.setFont(font); final Button addRequired = new Button(composite, SWT.CHECK); addRequired.setText(ActionMessages.getString("ProjectSelectionDialog.Add_required_projects_of_selected_projects._2")); //$NON-NLS-1$ addRequired.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fAddRequiredProjects = addRequired.getSelection(); } }); addRequired.setSelection(fAddRequiredProjects); addRequired.setFont(font); applyDialogFont(composite); return composite; } /** * Returns whether the user has selected to add exported entries. * * @return whether the user has selected to add exported entries */ public boolean isAddExportedEntries() { return fAddExportedEntries; } /** * Returns whether the user has selected to add required projects. * * @return whether the user has selected to add required projects */ public boolean isAddRequiredProjects() { return fAddRequiredProjects; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
04cacabbaac9c640ee38a3411ccaf87d2538ddaa
05ccd9e81de508963e3f777b7e99dd62985e4619
/src/main/java/eu/epitech/andyet/domain/util/JSR310LocalDateDeserializer.java
69faee15feaae4fdaae27a2cb0638b90fe3d4e81
[]
no_license
Draym/JWeb
e464005391a824b8494915a47109929b64e7e280
b502aefdfc85696a5045e00040cd1e20ced4b412
refs/heads/master
2021-05-04T10:01:27.845095
2020-12-07T04:01:41
2020-12-07T04:01:41
49,084,716
1
1
null
2020-12-07T04:01:42
2016-01-05T18:32:17
Java
UTF-8
Java
false
false
2,281
java
package eu.epitech.andyet.domain.util; import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; /** * Custom Jackson deserializer for transforming a JSON object (using the ISO 8601 date formatwith optional time) * to a JSR310 LocalDate object. */ public class JSR310LocalDateDeserializer extends JsonDeserializer<LocalDate> { public static final JSR310LocalDateDeserializer INSTANCE = new JSR310LocalDateDeserializer(); private JSR310LocalDateDeserializer() {} private static final DateTimeFormatter ISO_DATE_OPTIONAL_TIME; static { ISO_DATE_OPTIONAL_TIME = new DateTimeFormatterBuilder() .append(DateTimeFormatter.ISO_LOCAL_DATE) .optionalStart() .appendLiteral('T') .append(DateTimeFormatter.ISO_OFFSET_TIME) .toFormatter(); } @Override public LocalDate deserialize(JsonParser parser, DeserializationContext context) throws IOException { switch(parser.getCurrentToken()) { case START_ARRAY: if(parser.nextToken() == JsonToken.END_ARRAY) { return null; } int year = parser.getIntValue(); parser.nextToken(); int month = parser.getIntValue(); parser.nextToken(); int day = parser.getIntValue(); if(parser.nextToken() != JsonToken.END_ARRAY) { throw context.wrongTokenException(parser, JsonToken.END_ARRAY, "Expected array to end."); } return LocalDate.of(year, month, day); case VALUE_STRING: String string = parser.getText().trim(); if(string.length() == 0) { return null; } return LocalDate.parse(string, ISO_DATE_OPTIONAL_TIME); } throw context.wrongTokenException(parser, JsonToken.START_ARRAY, "Expected array or string."); } }
[ "kevin.andres@epitech.eu" ]
kevin.andres@epitech.eu
4ea42f3fa762c037eb849ebc9ebe90df9fa2d356
5b1827a3744f87e77d0580f4667f1649c4e668b4
/bai13_JDBC querying_&_Transaction/bai_tap/bai_tap/src/controller/UserServlet.java
e2be4fd0a2f5fff50c220c460f922ba119dcac4b
[]
no_license
khoa110298/NguyenKhoa_C0920G1_module3
fb64c5fdbcbda87878b998de75ab39640a45df6b
75de9db033ee28c2bc607ca8500e8f654e384203
refs/heads/master
2023-02-07T17:30:18.285160
2020-12-28T01:31:40
2020-12-28T01:31:40
317,393,514
0
0
null
null
null
null
UTF-8
Java
false
false
8,061
java
package controller; import model.User; import repository.UserRepository; import service.UserService; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; @WebServlet(name = "UserServlet", urlPatterns = "/users") public class UserServlet extends HttpServlet { UserRepository userService = new UserService(); protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); if (action == null) { action = ""; } switch (action) { case "create": createNewUser(request, response); break; case "update": updateUser(request, response); break; case "delete": deleteUser(request, response); break; default: break; } } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); if (action == null) { action = ""; } switch (action) { case "create": createJSP(request, response); break; case "update": updateJSP(request, response); break; case "delete": deleteJSP(request, response); break; case "see": seeJSP(request, response); break; case "Find": findJSP(request, response); break; case "sort": sortJSP(request, response); break; case "permision": addUserPermision(request, response); break; case "test-without-tran": testWithoutTran(request, response); break; case "test-use-tran": testUseTran(request, response); break; default: printListUser(request, response); } } private void testUseTran(HttpServletRequest request, HttpServletResponse response) { userService.insertUpdateUseTransaction(); } private void testWithoutTran(HttpServletRequest request, HttpServletResponse response) { userService.insertUpdateWithoutTransaction(); } private void addUserPermision(HttpServletRequest request, HttpServletResponse response) { User user = new User("kien", "kienhoang@gmail.com", "vn"); int[] permision = {1, 2, 4}; userService.addUserTransaction(user, permision); } private void deleteUser(HttpServletRequest request, HttpServletResponse response) { int id = Integer.parseInt(request.getParameter("id")); userService.deleteUserStore(id); printListUser(request, response); } private void updateUser(HttpServletRequest request, HttpServletResponse response) { int id = Integer.parseInt(request.getParameter("id")); String name = request.getParameter("name"); String email = request.getParameter("email"); String country = request.getParameter("country"); User user = new User(id, name, email, country); userService.updateUserStore(user); printListUser(request, response); } private void sortJSP(HttpServletRequest request, HttpServletResponse response) { List<User> userList = userService.sortListUserByName(); request.setAttribute("userList", userList); RequestDispatcher requestDispatcher = request.getRequestDispatcher("user/find.jsp"); try { requestDispatcher.forward(request, response); } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private void findJSP(HttpServletRequest request, HttpServletResponse response) { String country = request.getParameter("country"); List<User> userList = userService.findUserByCountry(country); request.setAttribute("userList", userList); RequestDispatcher requestDispatcher = request.getRequestDispatcher("user/find.jsp"); try { requestDispatcher.forward(request, response); } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private void seeJSP(HttpServletRequest request, HttpServletResponse response) { int id = Integer.parseInt(request.getParameter("id")); User user = userService.findUserById(id); System.out.println(user); request.setAttribute("user", user); RequestDispatcher requestDispatcher = request.getRequestDispatcher("user/see.jsp"); try { requestDispatcher.forward(request, response); } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private void deleteJSP(HttpServletRequest request, HttpServletResponse response) { int id = Integer.parseInt(request.getParameter("id")); User user = userService.findUserById(id); request.setAttribute("user", user); RequestDispatcher requestDispatcher = request.getRequestDispatcher("user/delete.jsp"); try { requestDispatcher.forward(request, response); } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private void updateJSP(HttpServletRequest request, HttpServletResponse response) { int id = Integer.parseInt(request.getParameter("id")); User user = userService.findUserById(id); request.setAttribute("user", user); RequestDispatcher requestDispatcher = request.getRequestDispatcher("user/update.jsp"); try { requestDispatcher.forward(request, response); } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private void createNewUser(HttpServletRequest request, HttpServletResponse response) { // int id; // List<User> userList = userService.printListUser(); // id = (userList.size() == 0 ? 1 : userList.size() +1 ); String name = request.getParameter("name"); String email = request.getParameter("email"); String country = request.getParameter("country"); User user = new User(name, email, country); userService.createNewUser(user); printListUser(request, response); } private void createJSP(HttpServletRequest request, HttpServletResponse response) { RequestDispatcher requestDispatcher = request.getRequestDispatcher("user/create.jsp"); try { requestDispatcher.forward(request, response); } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private void printListUser(HttpServletRequest request, HttpServletResponse response) { List<User> userList = userService.selectAllUserStore(); request.setAttribute("userList", userList); RequestDispatcher requestDispatcher = request.getRequestDispatcher("user/list.jsp"); try { requestDispatcher.forward(request, response); } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }
[ "nguyenkhoa15011998@gmail.com" ]
nguyenkhoa15011998@gmail.com
a2406290f5aa9328b6ff303fb8da473fe1c7f455
7dc220d05d421a57ef412c410384cfcc5af2b371
/src/Javonet/ValueTypesSample/ByteEnum.java
cc03636fec7750d2295a29a187fe145297425651
[]
no_license
Javonet-io-user/97c41bba-85dc-42fe-89a2-ef8b4bd39eaf
ac593e671523c8c21ddd895222f9aa5d522c7a69
8a35eba5b91059d84925381490e46fa03f9597bb
refs/heads/master
2020-04-26T18:23:02.907775
2019-03-04T12:45:42
2019-03-04T12:45:42
173,743,346
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package Javonet.ValueTypesSample; public enum ByteEnum { ONE(1L), TWO(2L), ; private long numVal; ByteEnum(long numVal) { this.numVal = numVal; } public long getNumVal() { return numVal; } }
[ "support@javonet.com" ]
support@javonet.com
f9724cf0f9cdecc09bb394202765d24090c54dd6
a596bb5fbb3b3ec0865aeb65532a9624b94cbb59
/src/main/java/com/whb/dubbo/model/CaseModel.java
2ee92c77a2d13dd1f343964adb33553790bf39d2
[]
no_license
testAutoResearch/dubbo-interface-test-tool
d27c3c1a25b95bc4660b1d81f9fcba88129d5040
b4d321c0469785765daaf34436759444d44c8020
refs/heads/master
2022-02-24T17:31:29.405726
2019-10-12T08:38:40
2019-10-12T08:38:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package com.whb.dubbo.model; import lombok.Data; import java.util.Date; import java.util.Map; /** * 用例实体对象 */ @Data public class CaseModel { /** * case Id. */ private long caseId; /** * case group. */ private String caseGroup; private String caseName; private String caseDesc; private String insertTime; /** * provider address. */ private String address; private String interfaceName; /** * the method name with parameters. */ private String methodText; private String providerKey; private String methodKey; /** * parameters. */ private String json; /** * assert condition. */ private String condition; /** * expected result. */ private String expect; }
[ "270028806@qq.com" ]
270028806@qq.com
03b69a914bf2aa0439126599bf0a96684968164b
97489fc504068096c366880e1370aacd90939603
/httpcore/src/main/java/org/apache/httpcore/HttpResponseInterceptor.java
c865578739cc8d726218c234f5aae56fa9bcb14d
[]
no_license
zhongshuiyuan/apache-components
ecab3811c3ddb39c14d03c72416491eaef47bec3
bbc4ee2dfb557718ba593204dd7ba7825261c729
refs/heads/master
2020-04-18T17:32:10.010941
2019-01-21T11:32:34
2019-01-21T11:32:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,685
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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.httpcore; import org.apache.httpcore.protocol.HttpContext; import java.io.IOException; /** * HTTP protocol interceptor is a routine that implements a specific aspect of the HTTP protocol. Usually * protocol interceptors are expected to act upon one specific header or a group of related headers of the * incoming message or populate the outgoing message with one specific header or a group of related headers. * Protocol <p> Interceptors can also manipulate content entities enclosed with messages. Usually this is * accomplished by using the 'Decorator' pattern where a wrapper entity class is used to decorate the original * entity. <p> Protocol interceptors must be implemented as thread-safe. Similarly to servlets, protocol * interceptors should not use instance variables unless access to those variables is synchronized. * * @since 4.0 */ public interface HttpResponseInterceptor { /** * Processes a response. On the server side, this step is performed before the response is sent to the * client. On the client side, this step is performed on incoming messages before the message body is * evaluated. * * @param response the response to postprocess * @param context the context for the request * * @throws HttpException in case of an HTTP protocol violation * @throws IOException in case of an I/O error */ void process(HttpResponse response, HttpContext context) throws HttpException, IOException; }
[ "smallajax@foxmail.com" ]
smallajax@foxmail.com
c976d974672fdd265bcaa3a354d8662689db294e
29159bc4c137fe9104d831a5efe346935eeb2db5
/mmj-cloud-order/src/main/java/com/mmj/order/common/feign/ESearchFallbackFactory.java
85c455b1d56a5fab9ecd921a6068aa44eb594e8a
[]
no_license
xddpool/mmj-cloud
bfb06d2ef08c9e7b967c63f223fc50b1a56aac1c
de4bcb35db509ce929d516d83de765fdc2afdac5
refs/heads/master
2023-06-27T11:16:38.059125
2020-07-24T03:23:48
2020-07-24T03:23:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,144
java
package com.mmj.order.common.feign; import com.baomidou.mybatisplus.plugins.Page; import com.mmj.common.exception.BusinessException; import com.mmj.common.model.ReturnData; import com.mmj.common.model.order.OrderSearchConditionDto; import com.mmj.common.model.order.OrderSearchResultDto; import feign.hystrix.FallbackFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; @Component public class ESearchFallbackFactory implements FallbackFactory<ESearchFeignClient> { private final Logger logger = LoggerFactory.getLogger(ESearchFallbackFactory.class); @Override public ESearchFeignClient create(Throwable cause) { logger.info("FallbackFactory error message is {},case:{}", cause.getMessage(), cause); return new ESearchFeignClient() { @Override public ReturnData<Page<OrderSearchResultDto>> getOrderList(OrderSearchConditionDto orderSearchConditionDto) { throw new BusinessException("BOSS后台查询订单列表失败!," + cause.getMessage(), 500); } }; } }
[ "shenfuding@shenfudingdeMacBook-Pro.local" ]
shenfuding@shenfudingdeMacBook-Pro.local
0932fc76e826fb6abc2bb5295584d7d5bd37d76a
18e70aac3ba9151dbe331e863ea45310fd28748a
/Ex75_Sound/app/src/main/java/com/ict/ex75_sound/MainActivity.java
c306af23853a5ed07d64d0939ab95304a105d533
[]
no_license
woocharle/ict.edu.android
40ce4bc81dc2cf4cf0356cbb59e7bae6ebad0e9f
e0bab546feb8897c47c75d0829df4427797952de
refs/heads/master
2022-12-30T13:00:54.615897
2020-10-16T08:43:59
2020-10-16T08:43:59
285,203,261
0
0
null
null
null
null
UTF-8
Java
false
false
2,825
java
package com.ict.ex75_sound; import androidx.appcompat.app.AppCompatActivity; import android.media.MediaPlayer; import android.os.Bundle; import android.os.Environment; import android.view.View; import android.widget.Button; import android.widget.Toast; import java.io.IOException; public class MainActivity extends AppCompatActivity { // 음악파일은 data/data/패키지이름/파일이름 // 퍼미션 : <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> static final String MP3_URL = Environment.getDataDirectory()+"/data/com.ict.ex75_sound/back.mp3"; Button button1, button2, button3; private MediaPlayer player; private int playbackPosition = 0 ; // 재 실행시 시작위치를 기억하는 변수 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button1 = findViewById(R.id.button1); button2 = findViewById(R.id.button2); button3 = findViewById(R.id.button3); button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { try { if(player != null){ player.release(); } player = new MediaPlayer(); player.setDataSource(MP3_URL); player.prepare(); // start() 전에 반드시 먼저 할 것 player.start(); } catch (IOException e) { e.printStackTrace(); } } }); button2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(player != null){ playbackPosition = player.getCurrentPosition(); player.pause(); Toast.makeText(MainActivity.this, "일시 정지", Toast.LENGTH_SHORT).show(); } } }); button3.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { try { if(player != null && !player.isPlaying()){ player.start(); player.seekTo(playbackPosition); Toast.makeText(MainActivity.this, "재 실행 중", Toast.LENGTH_SHORT).show(); } }catch (Exception e){ } } }); } // 액티비티가 종료되는 순간 처리 @Override protected void onDestroy() { super.onDestroy(); if(player != null) player.release(); } }
[ "silvershots@naver.com" ]
silvershots@naver.com
7f20c9a438b8d6390cf035ee0c28ed238f65d1c6
8289c4de3fe498ef9cb71774b85872c9835a842e
/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/flatMap/stream/FlatMapTckPublisherTest.java
03ccac900288ead8f0db9ea58c7898e32afa0058
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
americanstone/cyclops
9940b9eedb2b8308ac98886fd52d08f3712575bd
11cedae18b8623de6d710289e5c088d7b7b16361
refs/heads/master
2022-06-02T13:06:49.705353
2022-05-15T23:31:55
2022-05-15T23:31:55
160,734,422
0
0
Apache-2.0
2022-05-16T05:35:21
2018-12-06T21:28:21
Java
UTF-8
Java
false
false
729
java
package com.oath.cyclops.internal.stream.spliterators.push.flatMap.stream; import cyclops.reactive.Spouts; import org.reactivestreams.Publisher; import org.reactivestreams.tck.PublisherVerification; import org.reactivestreams.tck.TestEnvironment; import org.testng.annotations.Test; @Test public class FlatMapTckPublisherTest extends PublisherVerification<Long>{ public FlatMapTckPublisherTest(){ super(new TestEnvironment(300L)); } @Override public Publisher<Long> createPublisher(long elements) { return Spouts.iterate(0l, i->i+1l).flatMap(i->Spouts.of(i)).limit(elements); } @Override public Publisher<Long> createFailedPublisher() { return null; //not possible to forEachAsync to failed Stream } }
[ "john.mcclean@teamaol.com" ]
john.mcclean@teamaol.com
df69d6d22a0ff7cb9a3c0476b628ed58c0083546
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-medium-project/src/main/java/org/gradle/test/performancenull_25/Productionnull_2480.java
ca38f8b9f51c7a3d842f8a4eebfef85d065ca83f
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
585
java
package org.gradle.test.performancenull_25; public class Productionnull_2480 { private final String property; public Productionnull_2480(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
e155f866a4acbfdc12a0699d220ca5b9a08f6aad
68871cfeaf37c12fd2e3608180d6ebd1689e9fec
/src/com/numhero/client/mvp/users/UserPanel.java
0754041eab0adbeefd94c33d13ccf44e69b5540b
[]
no_license
uberto/netnumero
5e0170ed14d3f343f5eba651b73a6c82f8ec5d0e
18c462fed7a046281f88edcf3b47fcc61dedcbf6
refs/heads/master
2021-04-06T19:29:13.461683
2017-03-10T10:03:07
2017-03-10T10:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,532
java
package com.numhero.client.mvp.users; import com.google.gwt.core.client.GWT; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.DisclosurePanel; import com.google.gwt.user.client.ui.TextBox; import com.google.gwt.user.client.ui.Widget; import com.numhero.client.model.pojoc.User; import com.numhero.client.mvp.AbstractEditEntityPanel; import com.numhero.client.widget.CustomFormatDateBox; import com.numhero.client.widget.NetNumeroButton; import com.numhero.client.widget.combobox.UserProfileComboBox; import com.numhero.client.widget.combobox.UserStatusComboBox; import com.numhero.shared.pojoc.EntityPojo; public class UserPanel extends AbstractEditEntityPanel { interface UserPanelUiBinder extends UiBinder<Widget, UserPanel> { } private static UserPanelUiBinder uiBinder = GWT.create(UserPanelUiBinder.class); @UiField DisclosurePanel errorsPanel; @UiField TextBox name; @UiField TextBox firstName; @UiField TextBox lastName; @UiField TextBox password; @UiField UserProfileComboBox userProfile; @UiField UserStatusComboBox userStatus; @UiField CustomFormatDateBox lastLogin; @UiField NetNumeroButton btSave; @UiField NetNumeroButton btCancel; public UserPanel() { initWidget(uiBinder.createAndBindUi(this)); createValidator(errorsPanel); } public NetNumeroButton getBtSave() { return btSave; } public NetNumeroButton getBtCancel() { return btCancel; } public User getUser() { return (User) pojo; } public boolean saveValuesFromUi() { boolean ret = validator.validate(); if (ret) { User user = (User) pojo; user.setFirstName(firstName.getValue()); user.setLastName(lastName.getValue()); user.setLastLogin(lastLogin.getValue()); } else { errorsPanel.setVisible(true); } return ret; } @Override public void setPojo(EntityPojo pojo) { super.setPojo(pojo); User user = (User) pojo; userProfile.setValue(user.getUserProfile()); userStatus.setValue(user.fUserStatus.getValue()); firstName.setValue(user.getFirstName()); lastLogin.setValue(user.getLastLogin()); lastName.setValue(user.getLastName()); } @Override protected void addValidators() { // TODO add validators } }
[ "antonio.signore@gmail.com" ]
antonio.signore@gmail.com
b83fcefffe42ab5aa8c647e1f99af361157eb68b
a4360286c54186934b619dad3863a7775e6e61dc
/openbravo/src-test/src/org/openbravo/test/role/inheritance/DeletedAccessPropagation.java
a63f5a0a8b2f75b9f79eb42868f24902f0b64515
[]
no_license
Abdielja/Openbravo
1f31a284e2d8cff5b50769237732d7236f5d9ab2
51dd54967f88b7f647f69b8dd5981991b5843df2
refs/heads/master
2020-04-06T04:28:50.112404
2016-10-25T14:24:34
2016-10-25T14:24:34
71,905,018
0
3
null
null
null
null
UTF-8
Java
false
false
8,167
java
/* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ package org.openbravo.test.role.inheritance; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; import java.util.Arrays; import java.util.List; import org.junit.Rule; import org.junit.Test; import org.openbravo.base.weld.test.ParameterCdiTest; import org.openbravo.base.weld.test.ParameterCdiTestRule; import org.openbravo.base.weld.test.WeldBaseTest; import org.openbravo.dal.core.DalUtil; import org.openbravo.dal.core.OBContext; import org.openbravo.dal.service.OBDal; import org.openbravo.model.ad.access.Role; /** * Test case for deleted access propagation * * We have a role which inherits from three different templates. All these templates have permission * to the same particular access. * * We are removing the access for each template starting from the one with highest priority. Thus * the inherited access for the role will be updated with every deletion. * * */ public class DeletedAccessPropagation extends WeldBaseTest { private final List<String> ORGANIZATIONS = Arrays.asList("F&B España - Región Norte", "F&B España - Región Sur"); private final List<String> WINDOWS = Arrays.asList("Sales Invoice", "Sales Order"); private final List<String> TABS = Arrays.asList("Bank Account", "Basic Discount"); private final List<String> FIELDS = Arrays.asList("Business Partner Category", "Commercial Name"); private final List<String> REPORTS = Arrays.asList("Alert Process", "Create Variants"); private final List<String> FORMS = Arrays.asList("About", "Heartbeat"); private final List<String> WIDGETS = Arrays.asList("Best Sellers", "Invoices to collect"); private final List<String> VIEWS = Arrays.asList("OBUIAPP_AlertManagement", "OBUIAPP_RegistrationView"); private final List<String> PROCESSES = Arrays.asList("Create Purchase Order Lines", "Grant Portal Access"); private final List<String> TABLES = Arrays.asList("AD_User", "C_Order"); private final List<String> ALERTS = Arrays.asList("Alert Taxes: Inversión del Sujeto Pasivo", "CUSTOMER WITHOUT ACCOUNTING"); private final List<String> PREFERENCES = Arrays.asList("AllowAttachment", "AllowDelete"); @SuppressWarnings("unchecked") private final List<List<String>> ACCESSES = Arrays.asList(ORGANIZATIONS, WINDOWS, TABS, FIELDS, REPORTS, FORMS, WIDGETS, VIEWS, PROCESSES, TABLES, ALERTS, PREFERENCES); private static int testCounter = 0; /** defines the values the parameter will take. */ @Rule public ParameterCdiTestRule<String> parameterValuesRule = new ParameterCdiTestRule<String>( RoleInheritanceTestUtils.ACCESS_NAMES); /** this field will take the values defined by parameterValuesRule field. */ private @ParameterCdiTest String parameter; /** * Test case for deleted access propagation */ @Test public void checkPropagationOfDeletedAccess() { Role role = null; Role template1 = null; Role template2 = null; Role template3 = null; try { OBContext.setAdminMode(true); // Create roles role = RoleInheritanceTestUtils.createRole("role", RoleInheritanceTestUtils.CLIENT_ID, RoleInheritanceTestUtils.ASTERISK_ORG_ID, " C", true, false); String roleId = (String) DalUtil.getId(role); template1 = RoleInheritanceTestUtils.createRole("template1", RoleInheritanceTestUtils.CLIENT_ID, RoleInheritanceTestUtils.ASTERISK_ORG_ID, " C", true, true); String template1Id = (String) DalUtil.getId(template1); template2 = RoleInheritanceTestUtils.createRole("template2", RoleInheritanceTestUtils.CLIENT_ID, RoleInheritanceTestUtils.ASTERISK_ORG_ID, " C", true, true); String template2Id = (String) DalUtil.getId(template2); template3 = RoleInheritanceTestUtils.createRole("template3", RoleInheritanceTestUtils.CLIENT_ID, RoleInheritanceTestUtils.ASTERISK_ORG_ID, " C", true, true); String template3Id = (String) DalUtil.getId(template3); List<String> accesses = ACCESSES.get(testCounter); // Add accesses RoleInheritanceTestUtils.addAccess(parameter, template1, accesses.get(0)); RoleInheritanceTestUtils.addAccess(parameter, template1, accesses.get(1)); RoleInheritanceTestUtils.addAccess(parameter, template2, accesses.get(0)); RoleInheritanceTestUtils.addAccess(parameter, template3, accesses.get(0)); // Add inheritances RoleInheritanceTestUtils.addInheritance(role, template1, new Long(10)); RoleInheritanceTestUtils.addInheritance(role, template2, new Long(20)); RoleInheritanceTestUtils.addInheritance(role, template3, new Long(30)); OBDal.getInstance().commitAndClose(); String[] expected = { accesses.get(0), template3Id, accesses.get(1), template1Id }; String[] result = RoleInheritanceTestUtils.getOrderedAccessNames(parameter, role); assertThat("Inherited access created properly", result, equalTo(expected)); // Remove window access for template 3 template3 = OBDal.getInstance().get(Role.class, template3Id); RoleInheritanceTestUtils.removeAccesses(parameter, template3); OBDal.getInstance().commitAndClose(); String[] expected2 = { accesses.get(0), template2Id, accesses.get(1), template1Id }; String[] result2 = RoleInheritanceTestUtils.getOrderedAccessNames(parameter, role); assertThat("Inherited access updated properly after first removal", result2, equalTo(expected2)); // Remove window access for template 2 template2 = OBDal.getInstance().get(Role.class, template2Id); RoleInheritanceTestUtils.removeAccesses(parameter, template2); OBDal.getInstance().commitAndClose(); String[] expected3 = { accesses.get(0), template1Id, accesses.get(1), template1Id }; String[] result3 = RoleInheritanceTestUtils.getOrderedAccessNames(parameter, role); assertThat("Inherited access updated properly after second removal", result3, equalTo(expected3)); OBDal.getInstance().commitAndClose(); // Remove window access for template 1 template1 = OBDal.getInstance().get(Role.class, template1Id); RoleInheritanceTestUtils.removeAccesses(parameter, template1); OBDal.getInstance().commitAndClose(); role = OBDal.getInstance().get(Role.class, roleId); template1 = OBDal.getInstance().get(Role.class, template1Id); template2 = OBDal.getInstance().get(Role.class, template2Id); template3 = OBDal.getInstance().get(Role.class, template3Id); String[] expected4 = {}; String[] result4 = RoleInheritanceTestUtils.getOrderedAccessNames(parameter, role); assertThat("Inherited access updated properly after third removal", result4, equalTo(expected4)); testCounter++; } finally { // Delete roles RoleInheritanceTestUtils.deleteRole(role); RoleInheritanceTestUtils.deleteRole(template1); RoleInheritanceTestUtils.deleteRole(template2); RoleInheritanceTestUtils.deleteRole(template3); OBDal.getInstance().commitAndClose(); OBContext.restorePreviousMode(); } } }
[ "abdielja@hotmail.com" ]
abdielja@hotmail.com
a1a4e9821ec26d0246b84d72c7d3e7304833821c
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/1465224/buggy-version/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/BadIndexSchemaTest.java
bd3cb01db33e4f4878e19c1ddee68da8b3c84f7b
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,678
java
Merged /lucene/dev/trunk/solr/test-framework:r1463191 /* * 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.solr.schema; import org.apache.solr.core.AbstractBadConfigTestBase; public class BadIndexSchemaTest extends AbstractBadConfigTestBase { private void doTest(final String schema, final String errString) throws Exception { assertConfigs("solrconfig-basic.xml", schema, errString); } public void testSevereErrorsForInvalidFieldOptions() throws Exception { doTest("bad-schema-not-indexed-but-norms.xml", "bad_field"); doTest("bad-schema-not-indexed-but-tf.xml", "bad_field"); doTest("bad-schema-not-indexed-but-pos.xml", "bad_field"); doTest("bad-schema-omit-tf-but-not-pos.xml", "bad_field"); } public void testSevereErrorsForDuplicateFields() throws Exception { doTest("bad-schema-dup-field.xml", "fAgain"); } public void testSevereErrorsForDuplicateDynamicField() throws Exception { doTest("bad-schema-dup-dynamicField.xml", "_twice"); } public void testSevereErrorsForDuplicateFieldType() throws Exception { doTest("bad-schema-dup-fieldType.xml", "ftAgain"); } public void testSevereErrorsForUnexpectedAnalyzer() throws Exception { doTest("bad-schema-nontext-analyzer.xml", "StrField (bad_type)"); doTest("bad-schema-analyzer-class-and-nested.xml", "bad_type"); } public void testBadExternalFileField() throws Exception { doTest("bad-schema-external-filefield.xml", "Only float and pfloat"); } public void testUniqueKeyRules() throws Exception { doTest("bad-schema-uniquekey-is-copyfield-dest.xml", "can not be the dest of a copyField"); doTest("bad-schema-uniquekey-uses-default.xml", "can not be configured with a default value"); doTest("bad-schema-uniquekey-multivalued.xml", "can not be configured to be multivalued"); } public void testMultivaluedCurrency() throws Exception { doTest("bad-schema-currency-ft-multivalued.xml", "types can not be multiValued: currency"); doTest("bad-schema-currency-multivalued.xml", "Fields can not be multiValued: money"); doTest("bad-schema-currency-dynamic-multivalued.xml", "Fields can not be multiValued: *_c"); } public void testCurrencyOERNoRates() throws Exception { doTest("bad-schema-currency-ft-oer-norates.xml", "ratesFileLocation"); } public void testCurrencyBogusCode() throws Exception { doTest("bad-schema-currency-ft-bogus-default-code.xml", "HOSS"); doTest("bad-schema-currency-ft-bogus-code-in-xml.xml", "HOSS"); } public void testPerFieldtypeSimButNoSchemaSimFactory() throws Exception { doTest("bad-schema-sim-global-vs-ft-mismatch.xml", "global similarity does not support it"); } public void testPerFieldtypePostingsFormatButNoSchemaCodecFactory() throws Exception { doTest("bad-schema-codec-global-vs-ft-mismatch.xml", "codec does not support"); } public void testDocValuesNotRequiredNoDefault() throws Exception { doTest("bad-schema-docValues-not-required-no-default.xml", "has no default value and is not required"); } public void testDocValuesUnsupported() throws Exception { doTest("bad-schema-unsupported-docValues.xml", "does not support doc values"); } public void testSweetSpotSimBadConfig() throws Exception { doTest("bad-schema-sweetspot-both-tf.xml", "Can not mix"); doTest("bad-schema-sweetspot-partial-baseline.xml", "Overriding default baselineTf"); doTest("bad-schema-sweetspot-partial-hyperbolic.xml", "Overriding default hyperbolicTf"); doTest("bad-schema-sweetspot-partial-norms.xml", "Overriding default lengthNorm"); } public void testBogusParameters() throws Exception { doTest("bad-schema-bogus-field-parameters.xml", "Invalid field property"); } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
ad71e941e09ec882239762aea0608d855cfd7f42
78c990f287df4886edc0db7094a8c2f77eb16461
/icetone-core/src/main/java/icetone/core/layout/loader/MigLayoutLayoutPart.java
76c850c97eb8c92e4d668c981386805c38ae7fae
[ "BSD-2-Clause", "LicenseRef-scancode-other-permissive" ]
permissive
Scrappers-glitch/icetone
a91a104571fba25cacc421ef1c3e774de6769a53
1684c2a6da1b1228ddcabafbbbee56286ccc4adb
refs/heads/master
2022-01-08T10:53:47.263080
2019-06-27T11:10:54
2019-06-27T11:10:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
883
java
package icetone.core.layout.loader; import icetone.core.BaseScreen; import icetone.core.Layout; import icetone.core.layout.mig.MigLayout; public class MigLayoutLayoutPart extends LayoutLayoutPart { private String constraints; private String column; private String row; public MigLayoutLayoutPart() { } public MigLayoutLayoutPart(String o) { // TODO why? } @Override public Layout createPart(BaseScreen screen, LayoutContext context) { return new MigLayout(screen, constraints, column, row); } public String getConstraints() { return constraints; } public void setConstraints(String constraints) { this.constraints = constraints; } public String getColumn() { return column; } public void setColumn(String column) { this.column = column; } public String getRow() { return row; } public void setRow(String row) { this.row = row; } }
[ "rockfire.redmoon@gmail.com" ]
rockfire.redmoon@gmail.com
d7b473f1ecd6378e7cc96b35996b04e59518ed77
22facd037e1138b85b9f40b0781af6745cbb48d6
/src/main/java/com/insightfullogic/honest_profiler/core/filters/TimeShareFilter.java
6f62580bc8025a540b6a1b0986416a07be9c97ad
[ "Apache-2.0", "MIT" ]
permissive
slaveuser/honest-profiler20160430
2868ca218620afe3677ba4ef5774d4f0a1213ef3
df8f4565d4c695a3909f9bc33a13b166ef47b0cc
refs/heads/master
2020-05-17T00:14:03.551988
2019-04-25T08:32:31
2019-04-25T08:32:31
183,391,374
0
0
null
null
null
null
UTF-8
Java
false
false
3,838
java
/** * Copyright (c) 2014 Richard Warburton (richard.warburton@gmail.com) * <p> * 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: * <p> * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * <p> * 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.insightfullogic.honest_profiler.core.filters; import com.insightfullogic.honest_profiler.core.collector.FlatProfileEntry; import com.insightfullogic.honest_profiler.core.profiles.Profile; import com.insightfullogic.honest_profiler.core.profiles.ProfileNode; abstract class TimeShareFilter implements Filter { private final double minShare; TimeShareFilter(final double minShare) { if (minShare > 1.0) { throw new FilterParseException("Time share must be between 0.0 and 1.0, but is " + minShare); } this.minShare = minShare; } @Override public void filter(Profile profile) { filterFlatProfile(profile); filterTreeProfile(profile); } private void filterTreeProfile(Profile profile) { profile.getTrees() .removeIf(tree -> filterNode(tree.getRootNode())); } private boolean filterNode(ProfileNode node) { boolean dead = minShare > treeField(node); if (!dead) { node.getChildren() .removeIf(this::filterNode); } return dead; } private void filterFlatProfile(Profile profile) { profile.getFlatByMethodProfile() .removeIf(entry -> minShare > flatField(entry)); } protected abstract double flatField(FlatProfileEntry entry); protected abstract double treeField(ProfileNode node); @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TimeShareFilter that = (TimeShareFilter) o; if (Double.compare(that.minShare, minShare) != 0) return false; return true; } @Override public int hashCode() { long temp = Double.doubleToLongBits(minShare); return (int) (temp ^ (temp >>> 32)); } } final class TotalTimeShareFilter extends TimeShareFilter { TotalTimeShareFilter(double minShare) { super(minShare); } @Override protected double flatField(FlatProfileEntry entry) { return entry.getTotalTimeShare(); } @Override protected double treeField(ProfileNode node) { return node.getTotalTimeShare(); } } final class SelfTimeShareFilter extends TimeShareFilter { SelfTimeShareFilter(double minShare) { super(minShare); } @Override protected double flatField(FlatProfileEntry entry) { return entry.getSelfTimeShare(); } @Override protected double treeField(ProfileNode node) { return node.getSelfTimeShare(); } }
[ "gmcpo@LAPTOP-2AD376QK" ]
gmcpo@LAPTOP-2AD376QK
609f12bb5a695b943e67f6d2dde48d2c2eb4a1c5
a57a63100d60ff094518568e1d0fc445ab279553
/4.JavaCollections/src/com/javarush/task/task32/task3213/Solution.java
7aba1611c33b9c8d25b5d88c87935582abe79523
[]
no_license
dananita/TasksfromJavaRush
cc4c5a5c37a131948becd12dc3a8ea4d3b9234b2
456c714b7dfb8212ac7ea1200044a1d1e118c5fa
refs/heads/master
2021-09-11T19:37:26.166085
2018-04-11T15:03:22
2018-04-11T15:03:22
111,551,640
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package com.javarush.task.task32.task3213; import java.io.IOException; import java.io.StringReader; /* Шифр Цезаря */ public class Solution { public static void main(String[] args) throws IOException { StringReader reader = new StringReader("Khoor#Dpljr#&C,₷B'3"); System.out.println(decode(reader, -3)); //Hello Amigo #@)₴?$0 } public static String decode(StringReader reader, int key) throws IOException { String result = ""; if (reader != null){ int oneByte; while((oneByte = reader.read()) != -1){ result += (char) (oneByte+key); } } return result; } }
[ "zlakdanata@yandex.ru" ]
zlakdanata@yandex.ru
8abab180618a121a37302a597eae42d668053a4f
151ccc7097ab042116f4e6bea37b77925e893781
/src/main/java/ox3f2100/EMEXAndIncrements.java
234938831c125a95883f74b522f6fadc3b4fd094
[ "MIT" ]
permissive
humwawe/online-judge
9ff944041288da836857a9e3ce59067b7af63705
e6091b82031ad1ffa2abe6ceea09b7bdc435d73f
refs/heads/master
2023-08-31T05:17:30.968516
2023-08-27T09:01:16
2023-08-27T09:01:16
207,341,970
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
package ox3f2100; import fast.io.InputReader; import fast.io.OutputWriter; import java.util.Arrays; import java.util.PriorityQueue; public class EMEXAndIncrements { public void solve(int testNumber, InputReader in, OutputWriter out) { int n = in.nextInt(); int[] a = new int[n]; int[] cnt = new int[n + 1]; for (int i = 0; i < n; i++) { a[i] = in.nextInt(); cnt[a[i]]++; } Arrays.sort(a); int j = -1; boolean f = false; PriorityQueue<Integer> priorityQueue = new PriorityQueue<>((x, y) -> y - x); long p = 0; long[] res = new long[n + 1]; Arrays.fill(res, -1); for (int i = 0; i <= n; i++) { int last = i - 1; if (last >= 0 && cnt[last] == 0) { Integer poll = priorityQueue.poll(); if (poll == null) { break; } else { p += last - poll; } } res[i] = p + cnt[i]; if (cnt[i] > 0) { for (int k = 0; k < cnt[i] - 1; k++) { priorityQueue.add(i); } cnt[i] = 1; } } out.println(res); } }
[ "wawe8963098@163.com" ]
wawe8963098@163.com
bcfe7816656a464f1cf28d3992a4abbb56dca7a6
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/actorapp--actor-platform/e652ba157f613903394cc1dd6eec9c48e892fef8/after/BcRsaCipher.java
9f0c8052d54937fb91d5970d47a8a0d09713963c
[]
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,662
java
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ package im.actor.runtime.crypto.bouncycastle; import org.bouncycastle.crypto.AsymmetricBlockCipher; import org.bouncycastle.crypto.digests.SHA1Digest; import org.bouncycastle.crypto.encodings.OAEPEncoding; import org.bouncycastle.crypto.engines.RSAEngine; import org.bouncycastle.crypto.params.AsymmetricKeyParameter; import org.bouncycastle.crypto.params.ParametersWithRandom; import org.bouncycastle.crypto.params.RSAKeyParameters; import im.actor.runtime.crypto.RsaCipher; import im.actor.runtime.crypto.encoding.PKS8RsaPrivateKey; public class BcRsaCipher extends BcRsaEncryptCipher implements RsaCipher { private AsymmetricBlockCipher cipher; public BcRsaCipher(byte[] publicKey, byte[] privateKey) { super(publicKey); try { PKS8RsaPrivateKey pks8RsaPrivateKey = new PKS8RsaPrivateKey(privateKey); AsymmetricKeyParameter keyParameter = new RSAKeyParameters(true, pks8RsaPrivateKey.getModulus(), pks8RsaPrivateKey.getExponent()); cipher = new OAEPEncoding(new RSAEngine(), new SHA1Digest()); cipher.init(false, new ParametersWithRandom(keyParameter, RuntimeRandomProvider.INSTANCE)); } catch (Exception e) { e.printStackTrace(); } } @Override public synchronized byte[] decrypt(byte[] sourceData) { if (cipher == null) { return null; } try { return cipher.processBlock(sourceData, 0, sourceData.length); } catch (Exception e) { e.printStackTrace(); return null; } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
507752aee641aef07cca9b65de899edc9b599c95
2177e133956e4c83f1fd2bdec73cd6882ba00f83
/exercises/java/第八章/HelloWorldSwing.java
39a85fce996cc28dc88471aa31fd9277fd29fd44
[]
no_license
HFCherish/algorithm-practice
2eb253ee5eb21d31fcef5e3398359cad243aac5a
272761ec26cb12e02c4a12cd52357fd378f2c5d9
refs/heads/master
2021-01-17T17:17:15.013390
2016-09-24T13:03:39
2016-09-24T13:03:39
69,102,914
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
import javax.swing.*; import java.awt.event.*; import java.awt.*; public class HelloWorldSwing { public static void main(String args[]) { JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("HelloWorld"); final JLabel label = new JLabel("Hello World!"); frame.getContentPane().add(label,BorderLayout.EAST); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(200,70); frame.setVisible(true); } }
[ "hf_cherish@163.com" ]
hf_cherish@163.com
7add0bfc3884e20afcbfb2a79feb548abe945062
72c1996868dcfa01f7aa7c06bdc6ec2f59bebb7f
/19-configurando-spring-security-jwt/src/main/java/com/projeto/models/service/exception/EntidadeNaoCadastradaException.java
f0bc56b29555400f082815bf22f57d160994ab66
[]
no_license
fsergio-santos/projetos_ppwi4
165cb2228de521ca02200cc79ab8eb2707d5805f
28a1fc0cd5211894ba9885c626fe611597f265fb
refs/heads/master
2023-06-05T20:54:05.013864
2021-06-22T00:49:19
2021-06-22T00:49:19
311,988,174
0
0
null
null
null
null
UTF-8
Java
false
false
273
java
package com.projeto.models.service.exception; public class EntidadeNaoCadastradaException extends NegocioException { private static final long serialVersionUID = -8505945449296729975L; public EntidadeNaoCadastradaException(String mensagem) { super(mensagem); } }
[ "fsergio.santos@hotmail.com" ]
fsergio.santos@hotmail.com
e428930070e5e4b28d5d80a53a972b63a1dbfcf8
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/12/InputRelationshipCacher.java
60032e2da8b0d55ebec52e314009d1268019d19f
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
2,822
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.unsafe.impl.batchimport.input; import java.io.IOException; import org.neo4j.io.fs.StoreChannel; import org.neo4j.kernel.impl.store.format.RecordFormats; import static org.neo4j.unsafe.impl.batchimport.input.InputCache.HAS_TYPE_ID; import static org.neo4j.unsafe.impl.batchimport.input.InputCache.NEW_TYPE; import static org.neo4j.unsafe.impl.batchimport.input.InputCache.RELATIONSHIP_TYPE_TOKEN; import static org.neo4j.unsafe.impl.batchimport.input.InputCache.SAME_TYPE; /** * Caches {@link InputRelationship} to disk using a binary format. */ public class InputRelationshipCacher extends InputEntityCacher<InputRelationship> { private String previousType; public InputRelationshipCacher( StoreChannel channel, StoreChannel header, RecordFormats recordFormats, int bufferSize, int batchSize ) throws IOException { super( channel, header, recordFormats, bufferSize, batchSize, 2 ); } @Override protected void writeEntity( InputRelationship relationship ) throws IOException { // properties super.writeEntity( relationship ); // groups writeGroup( relationship.startNodeGroup(), 0 ); writeGroup( relationship.endNodeGroup(), 1 ); // ids writeValue( relationship.startNode() ); writeValue( relationship.endNode() ); // type if ( relationship.hasTypeId() ) { channel.put( HAS_TYPE_ID ); channel.putInt( relationship.typeId() ); } else { if ( previousType != null && relationship.type().equals( previousType ) ) { channel.put( SAME_TYPE ); } else { channel.put( NEW_TYPE ); writeToken( RELATIONSHIP_TYPE_TOKEN, previousType = relationship.type() ); } } } @Override protected void clearState() { previousType = null; super.clearState(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
386120959a701a94653c42a15a9ea4912537e9f3
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14122-29-22-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/xar/internal/handler/packager/Packager_ESTest_scaffolding.java
8bfdd0590ada890ad2015b6ddc2b57405e1b2544
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
462
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Apr 03 07:26:28 UTC 2020 */ package org.xwiki.extension.xar.internal.handler.packager; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class Packager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
09faf7fccb43c2bc9af60d88937a0d61cfab6182
020ab20ac6d8d9727f1dfccf002fa3c55cf528fc
/serve/src/main/java/com/platform/serve/inner/templatemail/service/impl/VerifyTemplateServiceImpl.java
786a2b7b820885dc454412100b003d2add1e5d92
[]
no_license
Faichuis/email-houduan
e4ee51e3b9bb9fea011f149d6168965b44e5d9f1
e0d4b8c9a9ffcc9348a03fcd9c8691f8d68a4615
refs/heads/master
2023-05-11T04:54:21.782177
2021-06-02T16:34:38
2021-06-02T16:34:38
364,625,300
0
0
null
2021-06-02T16:34:39
2021-05-05T15:35:49
Java
UTF-8
Java
false
false
2,744
java
package com.platform.serve.inner.templatemail.service.impl; import com.platform.serve.common.constant.Constants; import com.platform.serve.common.util.CommonUtils; import com.platform.serve.common.util.EMailSimpleUtils; import com.platform.serve.config.exception.CheckException; import com.platform.serve.inner.dto.EmailInfoDto; import com.platform.serve.inner.dto.SendEmailResultDto; import com.platform.serve.inner.share.dto.UserMailBoxInfoDto; import com.platform.serve.inner.templatemail.service.VerifyTemplateService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; /** * 验证邮件信息简单模板 * * @Author lds * @Date 2021/4/15 10:43 */ @Slf4j @Service public class VerifyTemplateServiceImpl implements VerifyTemplateService { //邮箱的SMTP服务器地址,不同邮件服务器地址不同,一般格式为:smtp.xxx.com @Value("${simple.mail.server}") private String mailServer; //发件人 @Value("${simple.mail.sender}") private String sender; //端口 @Value("${simple.mail.smtpPort}") private String smtpPort; //smtp服务器的认证资料 @Value("${simple.mail.username}") private String account; //发件人邮箱密码 @Value("${simple.mail.password}") private String password; private final static String LONGIN_SUBJECT = "【邮件管理系统】验证绑定邮箱"; @Override public String sendVerifyLoginEmail(String receiver) { UserMailBoxInfoDto userMailBoxInfoDto = new UserMailBoxInfoDto(); userMailBoxInfoDto.setHostCode(mailServer); userMailBoxInfoDto.setPortCode(smtpPort); userMailBoxInfoDto.setAccount(account); userMailBoxInfoDto.setPassword(password); EmailInfoDto emailInfoDto = new EmailInfoDto(); emailInfoDto.setFromAddress(sender); emailInfoDto.setReceivers(receiver); emailInfoDto.setSubject(LONGIN_SUBJECT); //随机验证码 String code = CommonUtils.random6Code(); String content = new StringBuilder("【邮件管理系统】绑定邮箱验证,您的验证码为【").append(code).append("】有效时间为").append(Constants.VERIFY_LONGIN_MIN).append("分钟,请不要把验证码泄露给其他人。如非本人操作,请勿理会!").toString(); emailInfoDto.setContent(content); SendEmailResultDto sendEmailResultDto = EMailSimpleUtils.sendSimpleMail(emailInfoDto, userMailBoxInfoDto); if (Constants.SEND_STATUE_NO.equals(sendEmailResultDto.getSendStatus())) { throw new CheckException("发送验证码失败,请重试!"); } return code; } }
[ "465766401@qq.com" ]
465766401@qq.com
6261dd41d41255d96873129ee391e5cc933b81e3
1039ca513becf8da2f1ca2aa275ca3900450213a
/it.ltc.utility.zpl/src/main/java/it/ltc/utility/zpl/etichette/tnt/EtichettaTNT_10x7.java
69d2e2fb905214be60ac421b693ae2e062824d8e
[]
no_license
Dufler/utility
8c09e0a3432596c74bc2569d21dce9580c979ec7
99afcb147376066ef67451a47d23295b05e99a11
refs/heads/master
2022-12-15T04:46:40.431325
2019-06-04T13:31:00
2019-06-04T13:31:00
130,071,630
0
0
null
2022-12-06T00:41:33
2018-04-18T14:04:26
Java
UTF-8
Java
false
false
5,175
java
package it.ltc.utility.zpl.etichette.tnt; import it.ltc.utility.zpl.parameters.Orientation; /** * Classe che estende l'etichetta TNT, mappa l'etichetta 10x7 * @author Antonio 24 ago 2017 * */ public class EtichettaTNT_10x7 extends EtichettaTNT { public final static Orientation orientation = Orientation.ROTATED270; public EtichettaTNT_10x7(int h, int w) { super(h, w, orientation); } // private Barcode getBarcode(int barWidth, Double barWide, int barHeight, // int positionX, int positionY, JUSTIFY justify, // ORIENTATION barcodeOrientation, Integer barcodeHeight, YESNO printLineBefore, YESNO printLineAbove, String dataValue) { // // Barcode barcode = new Barcode(positionX,positionY,barHeight,0); // // barcode.setBarWidth(barWidth); // barcode.setBarWide(barWide); // barcode.setBarHeight(barcode.getH()); // barcode.setPositionX(barcode.getX()); // barcode.setPositionY(barcode.getY()); // barcode.setJustify(justify); // barcode.setBarcodeOrientation(barcodeOrientation); // barcode.setBarcodeHeight(barcodeHeight); // barcode.setPrintLineBefore(printLineBefore); // barcode.setPrintLineAbove(printLineAbove); // barcode.setDataValue(dataValue); // barcode.BarcodeInit(); // // return barcode; // } public void EtichettaTNT_10x7Init() { // Orientation orientation = Orientation.ROTATED270; // // Elemento barcode = new Barcode(3,3.0,160, // 695,569, Justify.LEFT, // orientation, // null, YesNo.YES, YesNo.NO, this.barcode, true); // addElemento(barcode); // // Elemento logo = new LogoTNT(32, 57, 46, 0, orientation); // addElemento(logo); // // TitoloScalable codFilPartenza = new TitoloScalable(39, 87, 569, Justify.LEFT, codFilialePartenza, orientation, false); // addElemento(codFilPartenza); // // TitoloBitmapped titoloNrColli = new TitoloBitmapped(1, 569-249, 127, 569, Justify.LEFT, "COLLI: " + nrColli, orientation, false); // addElemento(titoloNrColli); // if (peso != null) { // TitoloBitmapped titoloPeso = new TitoloBitmapped(1, 569-249, 127, 569, Justify.LEFT, "PESO: " + peso, orientation, false); // addElemento(titoloPeso); // } // // TitoloBitmapped titoloMittente = new TitoloBitmapped(1, 569-249, 215, 569, Justify.LEFT, "MITTENTE: " + mittente, orientation, false); // addElemento(titoloMittente); // TitoloBitmapped titoloDestinatario = new TitoloBitmapped(1, 569-249, 247, 569, Justify.LEFT, destinatario, orientation, false); // addElemento(titoloDestinatario); // TitoloBitmapped titoloIndDestinatario = new TitoloBitmapped(1, 569-249, 279, 569, Justify.LEFT, indirizzoDest, orientation, false); // addElemento(titoloIndDestinatario); // TitoloBitmapped titoloLocDestinatario = new TitoloBitmapped(1, 569-249, 311, 569, Justify.LEFT, localitaDest, orientation, false); // addElemento(titoloLocDestinatario); // // TitoloScalable segnaCollo = new TitoloScalable(45, 381, 569, Justify.LEFT, numSegnaCollo, orientation, false); // addElemento(segnaCollo); // TitoloScalable riferimentoMitt = new TitoloScalable(23, 487, 569, Justify.LEFT, "R.C.: " + rifMittente, orientation, false); // addElemento(riferimentoMitt); // TitoloFontName codFilArrivo = new TitoloFontName(68, 391, 453, Justify.LEFT, codFilialeArrivo, orientation, Charset.UCS2_BIGENDIAN, false); // addElemento(codFilArrivo); // TitoloFontName filArrivo = new TitoloFontName(34, 435, 569, Justify.LEFT, filialeArrivo, orientation, Charset.UCS2_BIGENDIAN, false); // addElemento(filArrivo); // TitoloFontName lettVettura = new TitoloFontName(23, 207, 249, Justify.LEFT, "LDV: " + letteraVettura, orientation, Charset.UCS2_BIGENDIAN, false); // addElemento(lettVettura); // TitoloFontName dataPar = new TitoloFontName(23, 172, 249, Justify.LEFT, "Data: " + dataPartenza, orientation, Charset.UCS2_BIGENDIAN, false); // addElemento(dataPar); // // BoxGrafico gBox1 = new BoxGrafico(369, 71, 178, 51, 51); // addElemento(gBox1); // BoxGrafico gBox2 = new BoxGrafico(313, 131, 118, 53, 53); // addElemento(gBox2); // BoxGrafico gBox3 = new BoxGrafico(257, 121, 128, 53, 53); // addElemento(gBox3); // // TitoloScalable titoloHUB = new TitoloScalable(41, 409, 249, Justify.LEFT, hub, orientation, true); // addElemento(titoloHUB); // TitoloScalable titoloSPE = new TitoloScalable(43, 299, 249, Justify.LEFT, speciale, orientation, true); // addElemento(titoloSPE); // TitoloScalable titoloPremium = new TitoloScalable(43, 355, 249, Justify.LEFT, servizioPremium, orientation, true); // addElemento(titoloPremium); // // // TitoloFontName titoloMicorzona = new TitoloFontName(68, 495, 249, Justify.LEFT, micorZona, orientation, Charset.UCS2_BIGENDIAN, false); // addElemento(titoloMicorzona); // // TitoloBitmapped titoloDestinatario2 = new TitoloBitmapped(1, 800-272, 272, 61, Justify.LEFT, destinatario2, Orientation.NORMAL, false); // addElemento(titoloDestinatario2); // // TitoloBitmapped titoloCommento = new TitoloBitmapped(1, 569, 766, 569, Justify.LEFT, commento, orientation, false); // addElemento(titoloCommento); } }
[ "Damiano@Damiano-PC" ]
Damiano@Damiano-PC
25bf546beae14316cbcb4a49ae518a75ae49123a
b74a029e11febb26cb9721f644356dda3781de8e
/yibot-service/src/main/java/com/zhuiyi/service/DialogService.java
766ccf3266c12eb79c1d3c1b8390edaf81830811
[]
no_license
radtek/ara-bot
77fca295b0208bf027592a052703f8966ac9add8
adeb3ba658a6bf08906c507d5f2023710e8a4820
refs/heads/master
2020-05-24T06:33:08.476795
2018-11-13T16:21:59
2018-11-13T16:21:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,275
java
package com.zhuiyi.service; import java.util.Date; import java.util.List; import org.springframework.data.domain.PageRequest; import com.zhuiyi.model.Dialog; /** * @author code-magic * @version 1.0 * date: 2018/07/24 * description: * own: zhuiyi */ public interface DialogService extends CommonService<Dialog,String>{ /** * 此方法描述的是: * @author: klauszhou@wezhuiyi.com * @version: 2018年8月22日 下午2:33:26 */ public List<Dialog> getDialogLogs(String appid, String dateMongth, String id,PageRequest pageRequest); /** * 此方法描述的是: * @author: klauszhou@wezhuiyi.com * @version: 2018年8月22日 下午2:33:28 */ public Dialog getDialogLogs(String appid, String dateMongth, String id); /** * 此方法描述的是: * @author: klauszhou@wezhuiyi.com * @version: 2018年8月22日 下午2:33:30 */ public Dialog getDialogLogs( Long bid, Long pid, int pageno, int pagesize, Date stadate, Date enddate, String faqid, String faqin, String faqtype, String usereval, String answertype, String haszrg, String hashanxuan, String hassenword, String hasreject, String address, String query, String userid) ; }
[ "yuanlinchengyx@163.com" ]
yuanlinchengyx@163.com
8660da1af96b9117ad0ca7c1afb35486400e5270
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/protocal/c/ayh.java
e73c78c7499e50059e1bff7ec1a4d888d7b67c6a
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
2,734
java
package com.tencent.mm.protocal.c; import e.a.a.c.a; import java.util.LinkedList; public final class ayh extends bcv { public long wFp; public long wFs; public int wbh; public long wbi; protected final int a(int i, Object... objArr) { if (i == 0) { a aVar = (a) objArr[0]; if (this.wIV != null) { aVar.fW(1, this.wIV.bke()); this.wIV.a(aVar); } aVar.fU(2, this.wbh); aVar.S(3, this.wbi); aVar.S(4, this.wFp); aVar.S(5, this.wFs); return 0; } else if (i == 1) { if (this.wIV != null) { r0 = e.a.a.a.fT(1, this.wIV.bke()) + 0; } else { r0 = 0; } return (((r0 + e.a.a.a.fR(2, this.wbh)) + e.a.a.a.R(3, this.wbi)) + e.a.a.a.R(4, this.wFp)) + e.a.a.a.R(5, this.wFs); } else if (i == 2) { e.a.a.a.a aVar2 = new e.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (r0 = bcv.a(aVar2); r0 > 0; r0 = bcv.a(aVar2)) { if (!super.a(aVar2, this, r0)) { aVar2.cJE(); } } return 0; } else if (i != 3) { return -1; } else { e.a.a.a.a aVar3 = (e.a.a.a.a) objArr[0]; ayh com_tencent_mm_protocal_c_ayh = (ayh) objArr[1]; int intValue = ((Integer) objArr[2]).intValue(); switch (intValue) { case 1: LinkedList Jl = aVar3.Jl(intValue); int size = Jl.size(); for (intValue = 0; intValue < size; intValue++) { byte[] bArr = (byte[]) Jl.get(intValue); com.tencent.mm.bq.a fdVar = new fd(); e.a.a.a.a aVar4 = new e.a.a.a.a(bArr, unknownTagHandler); for (boolean z = true; z; z = fdVar.a(aVar4, fdVar, bcv.a(aVar4))) { } com_tencent_mm_protocal_c_ayh.wIV = fdVar; } return 0; case 2: com_tencent_mm_protocal_c_ayh.wbh = aVar3.Avy.ry(); return 0; case 3: com_tencent_mm_protocal_c_ayh.wbi = aVar3.Avy.rz(); return 0; case 4: com_tencent_mm_protocal_c_ayh.wFp = aVar3.Avy.rz(); return 0; case 5: com_tencent_mm_protocal_c_ayh.wFs = aVar3.Avy.rz(); return 0; default: return -1; } } } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
b5b0c18dd9e10a1a1405878446c9c0be094d1d03
5d12d02b2269d05add662d55e79b8f21ca630e01
/string-study/src/main/java/com/yicj/str/regex/ScannerDelimiter.java
c81c07906d140aefb008023122d9398abfb8c956
[]
no_license
yichengjie/BestPractices
ff271d2a391e95ca2b36bdae8ccd2e3d46e48375
0975dc50579b46a3c047e65eed9d8fee1da0cc1f
refs/heads/master
2022-07-29T00:14:03.268902
2020-03-23T05:37:34
2020-03-23T05:37:34
164,856,003
2
0
null
2022-07-07T22:15:12
2019-01-09T12:08:48
Java
UTF-8
Java
false
false
405
java
package com.yicj.str.regex; import java.util.Scanner; public class ScannerDelimiter { public static void main(String[] args) { Scanner scanner = new Scanner("12, 42, 78, 99, 42") ; //使用逗号(包括逗号前后任意的空白字符)作为定界符 scanner.useDelimiter("\\s*,\\s*") ; while(scanner.hasNextInt()) { System.out.println(scanner.nextInt()); } } }
[ "626659321@qq.com" ]
626659321@qq.com
5dc6319c021eb8cd6332457e50c62d3fd3b36a7c
5d77abfba31d2f0a5cb2f92f937904859785e7ff
/Java/java_examples Hyd/Corba/Part12/INetSolv/BSequenceBasicHelper.java
f9378b4e830bdce2fe49a62a3564487cb514dd15
[]
no_license
thinkpavan/artefacts
d93a1c0be0b6158cb0976aae9af9c6a016ebfdae
04bcf95450243dfe2f4fa8f09d96274034428e4d
refs/heads/master
2020-04-01T20:24:34.142409
2016-07-07T16:27:47
2016-07-07T16:27:47
62,716,135
0
0
null
null
null
null
UTF-8
Java
false
false
3,245
java
package INetSolv; /** <p> <ul> <li> <b>Java Class</b> INetSolv.BSequenceBasicHelper <li> <b>Source File</b> INetSolv/BSequenceBasicHelper.java <li> <b>IDL Source File</b> BSequenceBasic.idl <li> <b>IDL Absolute Name</b> ::INetSolv::BSequenceBasic <li> <b>Repository Identifier</b> IDL:INetSolv/BSequenceBasic:1.0 </ul> <b>IDL definition:</b> <pre> #pragma prefix "INetSolv" interface BSequenceBasic { void modifySequence( inout ::INetSolv::seq1 inoutSeq, in ::INetSolv::seq2 inSeq ); }; </pre> </p> */ abstract public class BSequenceBasicHelper { public static INetSolv.BSequenceBasic narrow(org.omg.CORBA.Object object) { return narrow(object, false); } private static INetSolv.BSequenceBasic narrow(org.omg.CORBA.Object object, boolean is_a) { if(object == null) { return null; } if(object instanceof INetSolv.BSequenceBasic) { return (INetSolv.BSequenceBasic) object; } if(is_a || object._is_a(id())) { INetSolv._st_BSequenceBasic result = (INetSolv._st_BSequenceBasic)new INetSolv._st_BSequenceBasic(); ((org.omg.CORBA.portable.ObjectImpl) result)._set_delegate (((org.omg.CORBA.portable.ObjectImpl) object)._get_delegate()); ((org.omg.CORBA.portable.ObjectImpl) result._this())._set_delegate (((org.omg.CORBA.portable.ObjectImpl) object)._get_delegate()); return (INetSolv.BSequenceBasic) result._this(); } return null; } public static INetSolv.BSequenceBasic bind(org.omg.CORBA.ORB orb) { return bind(orb, null, null, null); } public static INetSolv.BSequenceBasic bind(org.omg.CORBA.ORB orb, java.lang.String name) { return bind(orb, name, null, null); } public static INetSolv.BSequenceBasic bind(org.omg.CORBA.ORB orb, java.lang.String name, java.lang.String host, org.omg.CORBA.BindOptions options) { if (orb instanceof com.visigenic.vbroker.orb.ORB) { return narrow(((com.visigenic.vbroker.orb.ORB)orb).bind(id(), name, host, options), true); } else { throw new org.omg.CORBA.BAD_PARAM(); } } private static org.omg.CORBA.ORB _orb() { return org.omg.CORBA.ORB.init(); } public static INetSolv.BSequenceBasic read(org.omg.CORBA.portable.InputStream _input) { return INetSolv.BSequenceBasicHelper.narrow(_input.read_Object(), true); } public static void write(org.omg.CORBA.portable.OutputStream _output, INetSolv.BSequenceBasic value) { _output.write_Object(value); } public static void insert(org.omg.CORBA.Any any, INetSolv.BSequenceBasic value) { org.omg.CORBA.portable.OutputStream output = any.create_output_stream(); write(output, value); any.read_value(output.create_input_stream(), type()); } public static INetSolv.BSequenceBasic extract(org.omg.CORBA.Any any) { if(!any.type().equal(type())) { throw new org.omg.CORBA.BAD_TYPECODE(); } return read(any.create_input_stream()); } private static org.omg.CORBA.TypeCode _type; public static org.omg.CORBA.TypeCode type() { if(_type == null) { _type = _orb().create_interface_tc(id(), "BSequenceBasic"); } return _type; } public static java.lang.String id() { return "IDL:INetSolv/BSequenceBasic:1.0"; } }
[ "lazygeeks.in@gmail.com" ]
lazygeeks.in@gmail.com
e77390fb412f82fb873711cffe70666b09136570
9a7ea182f523eb37ac6126821f2eff6fccee5b3b
/com.liferay.blade.migration.test/src/com/liferay/blade/migration/test/OSGiHtmlReporterTest.java
9c78770bf48f2a83a151de64c363abf97895ff52
[ "Apache-2.0" ]
permissive
gitter-badger/liferay-blade-tools
c174d0b95f70f6319b54a5ec86e4dd299512559d
06a5d6c51fb1afaecadf6e78f2104b08ce0cf036
refs/heads/master
2020-12-30T21:46:09.110286
2015-11-06T18:39:21
2015-11-06T18:39:21
45,706,726
0
0
null
2015-11-06T20:50:58
2015-11-06T20:50:58
null
UTF-8
Java
false
false
5,058
java
package com.liferay.blade.migration.test; import static org.junit.Assert.assertEquals; import com.liferay.blade.migration.api.Migration; import com.liferay.blade.java.api.Problem; import com.liferay.blade.java.api.Reporter; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.PrintStream; import java.util.Collection; import org.junit.Test; import org.osgi.framework.BundleContext; import org.osgi.framework.FrameworkUtil; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; public class OSGiHtmlReporterTest { @Test public void reportLongFormatTest() throws Exception { String expectString = "<!doctype html>\n\n"+ "<html class=\"no-js\" lang=\"\">\n" + " <head>\n" + " <meta charset=\"utf-8\">\n" + " <meta http-equiv=\"x-ua-compatible\" content=\"ie=edge\">\n" + " <title></title>\n" + " <meta name=\"description\" content=\"\">\n" + " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n" + " </head>\n" + " <body>\n" + " <table>\n" + " <tr>\n" + " <th>Title</th>\n" + " <th>Summary</th>\n" + " <th>Type</th>\n" + " <th>Ticket</th>\n" + " <th>File</th>\n" + " <th>Line</th>\n" + " </tr>\n" + " <tr>\n" + " <td>foo</td>\n" + " <td>foo summary</td>\n" + " <td>java</td>\n" + " <td>LPS-5309</td>\n" + " <td>Foo.java</td>\n" + " <td>10</td>\n" + " </tr>\n" + " <tr>\n" + " <td>bar</td>\n" + " <td>bar summary</td>\n" + " <td>jsp</td>\n" + " <td>LPS-867</td>\n" + " <td>Bar.java</td>\n" + " <td>20</td>\n" + " </tr>\n" + " </table>\n" + " </body>\n" + "</html>\n"; ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream printStream = new PrintStream(baos); System.setOut(printStream); Reporter reporter = null; try { Collection<ServiceReference<Reporter>> references = this.context.getServiceReferences(Reporter.class, "(format=html)"); if( references.size() > 0 ) { ServiceReference<Reporter> sr = references.iterator().next(); reporter = this.context.getService(sr); } else { ServiceReference<Reporter> sr = this.context.getServiceReference(Reporter.class); reporter = this.context.getService(sr); } } catch (InvalidSyntaxException e) { e.printStackTrace(); } reporter.beginReporting(Migration.DETAIL_LONG, baos); reporter.report(new Problem( "foo", "foo summary", "java", "LPS-5309", new File("Foo.java"), 10, 100, 110, null, null)); reporter.report(new Problem( "bar", "bar summary", "jsp", "LPS-867", new File("Bar.java"), 20, 200, 220, null, null)); reporter.endReporting(); String realString = baos.toString().replace("\r", ""); assertEquals(expectString, realString); } @Test public void reportShortFormatTest() throws Exception { String expectString = "<!doctype html>\n\n"+ "<html class=\"no-js\" lang=\"\">\n" + " <head>\n" + " <meta charset=\"utf-8\">\n" + " <meta http-equiv=\"x-ua-compatible\" content=\"ie=edge\">\n" + " <title></title>\n" + " <meta name=\"description\" content=\"\">\n" + " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n" + " </head>\n" + " <body>\n" + " <table>\n" + " <tr>\n" + " <th>Title</th>\n" + " <th>Type</th>\n" + " <th>File</th>\n" + " <th>Line</th>\n" + " </tr>\n" + " <tr>\n" + " <td>foo</td>\n" + " <td>java</td>\n" + " <td>Foo.java</td>\n" + " <td>10</td>\n" + " </tr>\n" + " <tr>\n" + " <td>bar</td>\n" + " <td>jsp</td>\n" + " <td>Bar.java</td>\n" + " <td>20</td>\n" + " </tr>\n" + " </table>\n" + " </body>\n" + "</html>\n"; ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream printStream = new PrintStream(baos); System.setOut(printStream); Reporter reporter = null; try { Collection<ServiceReference<Reporter>> references = this.context.getServiceReferences(Reporter.class, "(format=html)"); if( references.size() > 0 ) { ServiceReference<Reporter> sr = references.iterator().next(); reporter = this.context.getService(sr); } else { ServiceReference<Reporter> sr = this.context.getServiceReference(Reporter.class); reporter = this.context.getService(sr); } } catch (InvalidSyntaxException e) { e.printStackTrace(); } reporter.beginReporting(Migration.DETAIL_SHORT, baos); reporter.report(new Problem( "foo", "foo summary", "java", "LPS-867", new File("Foo.java"), 10, 100, 110, null, null)); reporter.report(new Problem( "bar", "bar summary", "jsp", "LPS-5309", new File("Bar.java"), 20, 200, 220, null, null)); reporter.endReporting(); String realString = baos.toString().replace("\r", ""); assertEquals(expectString, realString); } private final BundleContext context = FrameworkUtil.getBundle( this.getClass()).getBundleContext(); }
[ "gregory.amerson@liferay.com" ]
gregory.amerson@liferay.com
6e247507c9a35b1747e8ff3ce3df22d8325043d3
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hadoop/341_1.java
905744efc241e08f1f6b112167026bb1266710e1
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
//,temp,TestDistCpViewFs.java,273,290,temp,TestDistCpViewFs.java,237,252 //,3 public class xxx { @Test public void testUpdateMultiDirTargetPresent() { try { addEntries(listFile, "Umultifile", "Usingledir"); createFiles("Umultifile/Ufile3", "Umultifile/Ufile4", "Umultifile/Ufile5"); mkdirs(target.toString(), root + "/Usingledir/Udir1"); runTest(listFile, target, true, true); checkResult(target, 4, "Ufile3", "Ufile4", "Ufile5", "Udir1"); } catch (IOException e) { LOG.error("Exception encountered while testing distcp", e); Assert.fail("distcp failure"); } finally { TestDistCpUtils.delete(fs, root); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
1894f4fccc0a381c72ea35063d7f1c685af5d6df
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE257_Storing_Password_Recoverable_Format/CWE257_Storing_Password_Recoverable_Format__Servlet_connect_tcp_54a.java
8f687a6dbdf4ef5c2aa99325564d19f956ce7847
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,170
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE257_Storing_Password_Recoverable_Format__Servlet_connect_tcp_54a.java Label Definition File: CWE257_Storing_Password_Recoverable_Format__Servlet.label.xml Template File: sources-sinks-54a.tmpl.java */ /* * @description * CWE: 257 Storing passwords in a recoverable format * BadSource: connect_tcp Read data using an outbound tcp connection * GoodSource: A hardcoded string * Sinks: * GoodSink: one-way hash instead of symmetric crypto * BadSink : symmetric encryption with an easy key * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ package testcases.CWE257_Storing_Password_Recoverable_Format; import testcasesupport.*; import java.sql.*; import java.io.*; import javax.servlet.http.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.Socket; import java.util.logging.Logger; public class CWE257_Storing_Password_Recoverable_Format__Servlet_connect_tcp_54a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; Logger log_bad = Logger.getLogger("local-logger"); data = ""; /* init data */ Socket sock = null; BufferedReader buffread = null; InputStreamReader instrread = null; try { /* Read data using an outbound tcp connection */ sock = new Socket("host.example.org", 39544); /* read input from socket */ instrread = new InputStreamReader(sock.getInputStream()); buffread = new BufferedReader(instrread); data = buffread.readLine(); } catch( IOException ioe ) { log_bad.warning("Error with stream reading"); } finally { /* clean up stream reading objects */ try { if( buffread != null ) { buffread.close(); } } catch( IOException ioe ) { log_bad.warning("Error closing buffread"); } finally { try { if( instrread != null ) { instrread.close(); } } catch( IOException ioe ) { log_bad.warning("Error closing instrread"); } } /* clean up socket objects */ try { if( sock != null ) { sock.close(); } } catch( IOException e ) { log_bad.warning("Error closing sock"); } } (new CWE257_Storing_Password_Recoverable_Format__Servlet_connect_tcp_54b()).bad_sink(data , request, response); } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); goodB2G(request, response); } /* goodG2B() - use goodsource and badsink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded string */ data = "foo"; (new CWE257_Storing_Password_Recoverable_Format__Servlet_connect_tcp_54b()).goodG2B_sink(data , request, response); } /* goodB2G() - use badsource and goodsink */ private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; Logger log_bad = Logger.getLogger("local-logger"); data = ""; /* init data */ Socket sock = null; BufferedReader buffread = null; InputStreamReader instrread = null; try { /* Read data using an outbound tcp connection */ sock = new Socket("host.example.org", 39544); /* read input from socket */ instrread = new InputStreamReader(sock.getInputStream()); buffread = new BufferedReader(instrread); data = buffread.readLine(); } catch( IOException ioe ) { log_bad.warning("Error with stream reading"); } finally { /* clean up stream reading objects */ try { if( buffread != null ) { buffread.close(); } } catch( IOException ioe ) { log_bad.warning("Error closing buffread"); } finally { try { if( instrread != null ) { instrread.close(); } } catch( IOException ioe ) { log_bad.warning("Error closing instrread"); } } /* clean up socket objects */ try { if( sock != null ) { sock.close(); } } catch( IOException e ) { log_bad.warning("Error closing sock"); } } (new CWE257_Storing_Password_Recoverable_Format__Servlet_connect_tcp_54b()).goodB2G_sink(data , request, response); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
9c85f1e4c8e56eb0bed60b9e3da25785ec4a15ac
a6fabee24cf8ed289ab0cda098bfd1398fafc853
/flyway-core/src/main/java/org/flywaydb/core/api/resolver/MigrationExecutor.java
4ed996febca95415f492c472f368f2fe10302367
[ "Apache-2.0" ]
permissive
rollbar/flyway
3299a4d16c0e150bff5e437e4ce1cd95be6408ab
a051293d4af67e6e95386e12a86bcdf48fa12766
refs/heads/master
2022-10-10T01:14:32.195985
2021-06-10T15:23:40
2021-06-10T15:23:40
41,171,194
0
2
Apache-2.0
2022-09-22T19:49:09
2015-08-21T18:30:52
Java
UTF-8
Java
false
false
1,582
java
/** * Copyright 2010-2015 Axel Fontaine * * 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.flywaydb.core.api.resolver; import java.sql.Connection; import java.sql.SQLException; /** * Executes a migration. */ public interface MigrationExecutor { /** * Executes the migration this executor is associated with. * * @param connection The connection to use to execute the migration against the DB. * @throws SQLException when the execution of a statement failed. */ void execute(Connection connection) throws SQLException; /** * Whether the execution should take place inside a transaction. Almost all implementation should return {@code true}. * This however makes it possible to execute certain migrations outside a transaction. This is useful for databases * like PostgreSQL where certain statement can only execute outside a transaction. * * @return {@code true} if a transaction should be used (highly recommended), or {@code false} if not. */ boolean executeInTransaction(); }
[ "business@axelfontaine.com" ]
business@axelfontaine.com
4a2d0ad829038e170f1082952b0db78d88d8a734
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_6f127688e67afa2216e6526a336baa77c9b41d16/SeriesGuideApplication/1_6f127688e67afa2216e6526a336baa77c9b41d16_SeriesGuideApplication_t.java
1d323ef006969dd42ee73c6d5a46b381e40d0f08
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,304
java
/* * Copyright 2011 Uwe Trottmann * * 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.battlelancer.seriesguide; import com.battlelancer.seriesguide.beta.R; import com.battlelancer.seriesguide.ui.SeriesGuidePreferences; import com.battlelancer.seriesguide.util.ImageProvider; import com.battlelancer.seriesguide.util.Utils; import com.google.analytics.tracking.android.EasyTracker; import com.uwetrottmann.androidutils.AndroidUtils; import android.app.Application; import android.preference.PreferenceManager; /** * Initializes settings and services and on pre-ICS implements actions for low * memory state. * * @author Uwe Trottmann */ public class SeriesGuideApplication extends Application { @Override public void onCreate() { super.onCreate(); // initialize settings on first run PreferenceManager.setDefaultValues(this, R.layout.preferences, false); // ensure the notifications service is started (we also restart it on // boot) Utils.runNotificationService(this); // load the current theme into a global variable final String theme = PreferenceManager.getDefaultSharedPreferences(this).getString( SeriesGuidePreferences.KEY_THEME, "0"); Utils.updateTheme(theme); // set a context for Google Analytics EasyTracker.getInstance().setContext(getApplicationContext()); } @Override public void onLowMemory() { if (!AndroidUtils.isICSOrHigher()) { // clear the whole cache as Honeycomb and below don't support // onTrimMemory (used directly in our ImageProvider) ImageProvider.getInstance(this).clearCache(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fbf55785c14ec33bf0699c1f4c1c658ecbed8bb7
ff5f00be10ef21710493902d0ad334c556ac1221
/ei.iih-impl/src/main/java/ei/his/service/impl/HisMdDiServiceImpl.java
4133cbdba34f1e212bea6b852e336ee3647216c1
[]
no_license
sun-wangbaiyu/emr-code
2ed323a682f42db1ce3c3c61c7680de2f80d6290
034f2a6a969b55ff97c8b8cdaff1e0c0615a0dc7
refs/heads/master
2020-05-16T09:14:30.758529
2017-11-19T03:31:40
2017-11-19T03:31:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package ei.his.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import ei.his.db.dao.HisMdDiDao; import ei.his.db.dao.auto.entity.HisMdDi; @Service public class HisMdDiServiceImpl implements HisMdDiService { @Autowired private HisMdDiDao dao; /** * 构造器 */ public HisMdDiServiceImpl() { // TODO Auto-generated constructor stub } @Override public List<HisMdDi> selectHisDiags() { List<HisMdDi> test = dao.selectHisMdDi(); // TODO Auto-generated method stub return test; } /** * FIXME * * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } }
[ "149516374@qq.com" ]
149516374@qq.com
23a9a46bba7989c468c26c2dba8d854a19efd62b
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
/CodeComment_Data/Code_Jam/train/Magic_Trick/S/A(46).java
80e6ae6bbddaf5907ff594b183dfeb36ededbdc2
[]
no_license
yxh-y/code_comment_generation
8367b355195a8828a27aac92b3c738564587d36f
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
refs/heads/master
2021-09-28T18:52:40.660282
2018-11-19T14:54:56
2018-11-19T14:54:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,763
java
package methodEmbedding.Magic_Trick.S.LYD475; import java.io.File; import java.io.FileNotFoundException; import java.io.PrintStream; import java.util.Scanner; public class A { /** * @param args */ public static Scanner in; public static PrintStream out; public static void main(String[] args) throws FileNotFoundException { in = new Scanner(new File("D:/Balaji/My Workspace/Practice/src/gc2014/A-small-attempt0.in")); out = new PrintStream(new File("D:/Balaji/My Workspace/Practice/src/out.txt")); int a, b; int [][]arr1 = //{ {1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16} }; new int[4][4]; int [][]arr2 = //{ {1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16} }; new int[4][4]; int cases = in.nextInt(); int count = 0, num=0; for(int loop = 1 ; loop<=cases;loop++) { count=0; num=0; a = in.nextInt(); for(int i=0;i<4;i++) for(int j=0;j<4;j++) arr1[i][j] = in.nextInt(); b = in.nextInt(); for(int i=0;i<4;i++) for(int j=0;j<4;j++) arr2[i][j] = in.nextInt(); a = a-1; b = b-1; for(int i=0;i<arr1[a].length;i++) { for(int j=0;j<arr2[b].length;j++) { if(arr1[a][i] == arr2[b][j]) { System.out.println( arr1[a][i] + " matches " + arr2[b][j]); count++; num = arr1[a][i]; } } } if(count > 1) { out.println("Case #" + loop + ": Bad magician!"); System.out.println("Case #" + loop + ": Bad magician!"); } else if (count == 0) { out.println("Case #" + loop + ": Volunteer cheated!"); System.out.println("Case #" + loop + ": Volunteer cheated!"); } else if (count == 1) { out.println("Case #" + loop + ": "+num); System.out.println("Case #" + loop + ": "+num); } } } }
[ "liangyuding@sjtu.edu.cn" ]
liangyuding@sjtu.edu.cn
f0f900927329855e0981b8306bc88ecee04f3aa8
3e9b776f7af3c20f1af7bfdf42218a98291c6014
/JavaEE精讲之MyBatis框架实战——学习笔记/mybatis-02/test/com/qfedu/mybatis/mapper/BlogMapperTest.java
c7d38e03f6689365aeb53dc4ba7156e45b6237af
[]
no_license
1628103949/1628103949
17c43c1d4271b56575358fdb44f51a5738bb9ef5
80e6f0bcbb052eeee6c50e9d779e95eb6fcd45f3
refs/heads/master
2022-12-22T09:00:12.577786
2019-07-26T07:10:44
2019-07-26T07:10:44
195,977,143
0
0
null
2022-12-16T03:31:48
2019-07-09T09:28:04
HTML
UTF-8
Java
false
false
1,910
java
package com.qfedu.mybatis.mapper; import java.util.List; import org.apache.ibatis.session.SqlSession; import org.junit.Test; import com.qfedu.mybatis.pojo.Blog; import com.qfedu.mybatis.util.MyBatisUtil; public class BlogMapperTest { @Test public void testSelectBlog() { SqlSession session = MyBatisUtil.getSqlSession(); BlogMapper blogMapper = session.getMapper(BlogMapper.class); Blog blog = blogMapper.selectBlogById(1); session.close(); System.out.println(blog); } @Test public void testSelectBlogList() { SqlSession session = MyBatisUtil.getSqlSession(); BlogMapper blogMapper = session.getMapper(BlogMapper.class); List<Blog> blogList = blogMapper.selectBlogList(); session.close(); System.out.println(blogList); } @Test public void testSelectBlogListNested() { SqlSession session = MyBatisUtil.getSqlSession(); BlogMapper blogMapper = session.getMapper(BlogMapper.class); List<Blog> blogList = blogMapper.selectBlogListNested(); session.close(); System.out.println(blogList); } @Test public void testSelectBlogByIdConstructor() { SqlSession session = MyBatisUtil.getSqlSession(); BlogMapper blogMapper = session.getMapper(BlogMapper.class); Blog blog = blogMapper.selectBlogByIdConstructor(1); session.close(); System.out.println(blog); } /** * 测试延迟加载 */ @Test public void testSelectBlogByIdLazyLoading() { SqlSession session = MyBatisUtil.getSqlSession(); BlogMapper blogMapper = session.getMapper(BlogMapper.class); System.out.println("查询blog"); Blog blog = blogMapper.selectBlogById(1); session.close(); System.out.println("查询blog的title属性"); System.out.println(blog.getTitle()); System.out.println("查询blog的author属性"); System.out.println(blog.getAuthor().getUsername()); System.out.println("查询结束"); } }
[ "1628103949@qq.com" ]
1628103949@qq.com
3001321c2ad893b695bc1177fadccde04d7b334f
0689f3b456ddce965659abcd4d2de68903de59a1
/src/main/java/com/example/jooq/demo_jooq/introduction/db/pg_catalog/routines/TsmHandlerIn.java
a41492aa1a9d0b455e8cf8383d0f5d2c04f69a48
[]
no_license
vic0692/demo_spring_jooq
c92d2d188bbbb4aa851adab5cc301d1051c2f209
a5c1fd1cb915f313f40e6f4404fdc894fffc8e70
refs/heads/master
2022-09-18T09:38:30.362573
2020-01-23T17:09:40
2020-01-23T17:09:40
220,638,715
0
0
null
2022-09-08T01:04:47
2019-11-09T12:25:46
Java
UTF-8
Java
false
true
2,558
java
/* * This file is generated by jOOQ. */ package com.example.jooq.demo_jooq.introduction.db.pg_catalog.routines; import com.example.jooq.demo_jooq.introduction.db.pg_catalog.PgCatalog; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.impl.AbstractRoutine; import org.jooq.impl.Internal; /** * @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration. */ @java.lang.Deprecated @Generated( value = { "http://www.jooq.org", "jOOQ version:3.12.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TsmHandlerIn extends AbstractRoutine<Object> { private static final long serialVersionUID = 1923872784; /** * @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration. */ @java.lang.Deprecated public static final Parameter<Object> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"tsm_handler\""), false, false); /** * @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration. */ @java.lang.Deprecated public static final Parameter<Object> _1 = Internal.createParameter("_1", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"cstring\""), false, true); /** * Create a new routine call instance */ public TsmHandlerIn() { super("tsm_handler_in", PgCatalog.PG_CATALOG, org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"tsm_handler\"")); setReturnParameter(RETURN_VALUE); addInParameter(_1); } /** * Set the <code>_1</code> parameter IN value to the routine */ public void set__1(Object value) { setValue(_1, value); } /** * Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void set__1(Field<Object> field) { setField(_1, field); } }
[ "vic0692@gmail.com" ]
vic0692@gmail.com
077f75693f8fef1ccd2843bd61947c79191df770
3a0844fdc438aedbd85e9ffe35fbd2cc57b81e8f
/es-cqrs-example/src/test/java/com/github/daggerok/es/example/EsExampleApplicationTests.java
c2e3214b9997d22d9101e6f023ea6d4ab947e1b8
[ "MIT" ]
permissive
daggerok/es-cqrs
1af8448552e55af4b718f9d0a201fe341155fc7a
2301a54981cd52771425cf18f62283104508987f
refs/heads/master
2020-04-22T13:05:14.705376
2019-02-25T23:38:09
2019-02-25T23:38:09
170,396,570
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package com.github.daggerok.es.example; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class EsExampleApplicationTests { @Test public void contextLoads() { } }
[ "daggerok@gmail.com" ]
daggerok@gmail.com
fab5e86817098f4e63e1442ed64b63b3bd6f6c22
70f534f87e23a344f902b05b60d7f1bf548c3397
/com.wudsn.ide.asm.compilers/src/com/wudsn/ide/asm/compiler/tass/TassCompilerProcessLogParser.java
c95a43f1a19aebf402480f5b0c5db084ab5803d4
[]
no_license
moneytech/wudsn-ide
ca65a1ad921d87d66595064838d966ea8ff2195f
9fedce00750533a9fa4f5ae0fa77392fdac6ceee
refs/heads/master
2022-03-31T13:52:45.634643
2019-12-07T14:28:41
2019-12-07T14:28:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,755
java
/** * Copyright (C) 2009 - 2019 <a href="https://www.wudsn.com" target="_top">Peter Dell</a> * * This file is part of WUDSN IDE. * * WUDSN IDE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * WUDSN IDE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>. */ package com.wudsn.ide.asm.compiler.tass; import java.util.List; import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.core.resources.IMarker; import com.wudsn.ide.asm.compiler.CompilerProcessLogParser; import com.wudsn.ide.asm.compiler.CompilerSymbol; /** * Process log parser for {@link TassCompiler}. * * * TODO Implement TASS Support * * @author Peter Dell */ final class TassCompilerProcessLogParser extends CompilerProcessLogParser { private Pattern pattern; private String sourceFilePattern; @Override protected void initialize() { pattern = Pattern.compile("In .* line "); sourceFilePattern = "In " + mainSourceFilePath + ", line "; } @Override protected void findNextMarker() { int index; String line; boolean include; String includeFile; Matcher matcher = pattern.matcher(errorLog); if (matcher.find()) { index = matcher.start(); line = errorLog.substring(index); if (line.startsWith(sourceFilePattern)) { include = false; includeFile = ""; } else { include = true; includeFile = line.substring(3, matcher.end() - matcher.start() - 7); } index = matcher.end(); String lineNumberLine = errorLog.substring(index); errorLog = lineNumberLine; int numberEndIndex = lineNumberLine.indexOf("--"); if (numberEndIndex > 0) { String lineNumberString; lineNumberString = lineNumberLine.substring(0, numberEndIndex); try { lineNumber = Integer.parseInt(lineNumberString); int nextIndex = lineNumberLine.indexOf("\n"); if (index > 0) { message = lineNumberLine.substring(nextIndex + 1); int nextIndex2 = message.indexOf("\n"); if (nextIndex > 0) { message = message.substring(0, nextIndex2 - 1); } message = message.trim(); } } catch (NumberFormatException ex) { lineNumber = -1; severity = IMarker.SEVERITY_ERROR; message = ex.getMessage(); } } if (message.startsWith("Error:")) { severity = IMarker.SEVERITY_ERROR; message = message.substring(6); } else if (message.startsWith("Warning:")) { severity = IMarker.SEVERITY_WARNING; message = message.substring(8); } if (include) { if (lineNumber >= 0) { message = includeFile + " line " + lineNumber + ": " + message; } else { message = includeFile + ": " + message; } lineNumber = -1; } message = message.trim(); // Message mapping. if (severity == IMarker.SEVERITY_WARNING && message.startsWith("Using bank")) { severity = IMarker.SEVERITY_INFO; } markerAvailable = true; } } @Override public void addCompilerSymbols(List<CompilerSymbol> compilerSymbols) { final String EQUATES = "Equates:"; final String SYMBOL = "Symbol"; final String TABLE = "table:"; String log; int index; log = outputLog; index = log.indexOf(EQUATES); if (index >= 0) { log = log.substring(index + EQUATES.length()); StringTokenizer st = new StringTokenizer(log); String token; String name; String hexValue; while (st.hasMoreTokens()) { token = st.nextToken(); if (token.equals(SYMBOL)) { break; } name = token.substring(0, token.length() - 1); hexValue = st.nextToken(); // Must be there compilerSymbols.add(CompilerSymbol.createNumberHexSymbol(name, hexValue)); } if (st.hasMoreTokens()) { token = st.nextToken(); if (token.equals(TABLE)) { while (st.hasMoreTokens()) { token = st.nextToken(); if (!token.endsWith(":")) { break; } name = token.substring(0, token.length() - 1); hexValue = st.nextToken(); // Must be there compilerSymbols.add(CompilerSymbol.createNumberHexSymbol(name, hexValue)); } } } } } }
[ "jac@wudsn.com" ]
jac@wudsn.com
d4128f24bf66a84954208436650c436f9bea36c6
a4e63d95eea0e6b309779a06a046d23db61a8296
/fpinjava-parent/fpinjava-laziness-solutions/src/main/java/com/fpinjava/laziness/exercise07_06/Stream.java
0d0080f1ee21868279e721efb28c2796c4cbc60e
[]
no_license
gnanasundar/fpinjava
f2a64e98cca3638bc9da4cb56812fcbe324a4555
241e4d9118f1b034328d717dcf6735d23c5b76f0
refs/heads/master
2021-01-17T21:25:18.899504
2015-05-10T15:10:57
2015-05-10T15:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,939
java
package com.fpinjava.laziness.exercise07_06; import com.fpinjava.common.Function; import com.fpinjava.common.List; import com.fpinjava.common.Option; import com.fpinjava.common.Supplier; import com.fpinjava.common.TailCall; import static com.fpinjava.common.TailCall.*; public abstract class Stream<T> { @SuppressWarnings("rawtypes") private static Stream EMPTY = new Empty(); public abstract T head(); public abstract Supplier<Stream<T>> tail(); public abstract boolean isEmpty(); public abstract Option<T> headOption(); protected abstract Head<T> headS(); public abstract Boolean exists(Function<T, Boolean> p); public abstract <U> U foldRight(Supplier<U> z, Function<T, Function<Supplier<U>, U>> f); private Stream() {} public String toString() { return toList().toString(); } public List<T> toList() { return toListIterative(); } @SuppressWarnings("unused") private TailCall<List<T>> toListRecursive(Stream<T> s, List<T> acc) { return s instanceof Empty ? ret(acc) : sus(() -> toListRecursive(s.tail().get(), List.cons(s.head(), acc))); } public List<T> toListIterative() { java.util.List<T> result = new java.util.ArrayList<>(); Stream<T> ws = this; while (!ws.isEmpty()) { result.add(ws.head()); ws = ws.tail().get(); } return List.fromCollection(result); } /* * Create a new Stream<T> from taking the n first elements from this. We can * achieve that by recursively calling take on the invoked tail of a cons * cell. We make sure that the tail is not invoked unless we need to, by * handling the special case where n == 1 separately. If n == 0, we can avoid * looking at the stream at all. */ public Stream<T> take(Integer n) { return this.isEmpty() ? Stream.empty() : n > 1 ? Stream.cons(headS(), () -> tail().get().take(n - 1)) : Stream.cons(headS(), Stream::empty); } public Stream<T> drop(int n) { return n <= 0 ? this : tail().get().drop(n - 1); } public Stream<T> takeWhile(Function<T, Boolean> p) { return isEmpty() ? this : p.apply(head()) ? cons(headS(), () -> tail().get().takeWhile(p)) : empty(); } public Boolean existsViaFoldRight(Function<T, Boolean> p) { return foldRight(() -> false, a -> b -> p.apply(a) || b.get()); } public Boolean forAll(Function<T, Boolean> p) { return foldRight(() -> true, a -> b -> p.apply(a) && b.get()); } public Stream<T> takeWhileViaFoldRight(Function<T, Boolean> p) { return foldRight(Stream::<T> empty, t -> st -> p.apply(t) ? cons(() -> t, () -> st.get()) : Stream.<T> empty()); } public Option<T> headOptionViaFoldRight() { return foldRight(Option::<T>none, t -> st -> Option.some(t)); } public static class Empty<T> extends Stream<T> { private Empty() { } @Override public boolean isEmpty() { return true; } @Override public T head() { throw new IllegalStateException("head called on Empty stream"); } @Override protected Head<T> headS() { throw new IllegalStateException("headS called on Empty stream"); } @Override public Supplier<Stream<T>> tail() { throw new IllegalStateException("tail called on Empty stream"); } @Override public Option<T> headOption() { return Option.none(); } @Override public Boolean exists(Function<T, Boolean> p) { return false; } @Override public <U> U foldRight(Supplier<U> z, Function<T, Function<Supplier<U>, U>> f) { return z.get(); } } public static class Cons<T> extends Stream<T> { private final Head<T> head; private final Supplier<Stream<T>> tail; private Cons(Head<T> head, Supplier<Stream<T>> tail) { this.head = head; this.tail = tail; } @Override public boolean isEmpty() { return false; } @Override public T head() { return this.head.getEvaluated(); } @Override protected Head<T> headS() { return this.head; } @Override public Supplier<Stream<T>> tail() { return this.tail; } @Override public Option<T> headOption() { return Option.some(this.head()); } @Override public Boolean exists(Function<T, Boolean> p) { return p.apply(head()) || tail().get().exists(p); } public <U> U foldRight(Supplier<U> z, Function<T, Function<Supplier<U>, U>> f) { return f.apply(head()).apply(() -> tail().get().foldRight(z, f)); } } private static <T> Stream<T> cons(Head<T> hd, Supplier<Stream<T>> tl) { return new Cons<>(hd, tl); } private static <T> Stream<T> cons(Supplier<T> hd, Supplier<Stream<T>> tl) { return new Cons<>(new Head<>(hd), tl); } public static <T> Stream<T> cons(Supplier<T> hd, Stream<T> tl) { return new Cons<>(new Head<>(hd), () -> tl); } @SuppressWarnings("unchecked") public static <T> Stream<T> empty() { return EMPTY; } public static <T> Stream<T> cons(List<T> list) { return list.isEmpty() ? empty() : new Cons<>(new Head<>(list::head, list.head()), () -> cons(list.tail())); } @SafeVarargs public static <T> Stream<T> cons(T... t) { return cons(List.list(t)); } public static class Head<T> { private Supplier<T> nonEvaluated; private T evaluated; public Head(Supplier<T> nonEvaluated) { super(); this.nonEvaluated = nonEvaluated; } public Head(Supplier<T> nonEvaluated, T evaluated) { super(); this.nonEvaluated = nonEvaluated; this.evaluated = evaluated; } public Supplier<T> getNonEvaluated() { return nonEvaluated; } public T getEvaluated() { if (evaluated == null) { evaluated = nonEvaluated.get(); } return evaluated; } } }
[ "pys@volga.fr" ]
pys@volga.fr
8918cf9b023041cd661c719ff10b7aeb7b396bd2
e08129cc09d5fa3d7d8bba3e23b3dfde316ddcf9
/projects/openquote/1.4/commercial/commercial.ear/lib/commercial.jar/com/ail/financial/PaymentSchedule.java
8aab3d41f2893ba1fc5e9d82b3545165e865a653
[]
no_license
zhangjh953166/open-quote
459dd7b58e7faa8cbb970af30b377c1c1e51c0a2
d0823cff3254293e0031d818bb1289fbbf3e6aa2
refs/heads/master
2020-03-29T05:13:19.380579
2014-10-08T08:52:38
2014-10-08T08:52:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,009
java
/* Copyright Applied Industrial Logic Limited 2002. All rights Reserved */ /* * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 51 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package com.ail.financial; import java.util.ArrayList; import java.util.List; import com.ail.annotation.TypeDefinition; import com.ail.core.Type; /** * A payment schedule simply groups together a collection of {@link com.ail.financial.MoneyProvision MoneyProvisions}.</p> * For example, a schedule might define:-<ol> * <li>A single payment of &pound;30 to be made by direct debit; or</li> * <li>A payment of &pound;30 to be made by Master Card, followed by 10 monthly payments of &pound;43 to be made by direct debit.</li> * </ol> */ @TypeDefinition public class PaymentSchedule extends Type { private static final long serialVersionUID = 1L; private List<MoneyProvision> moneyProvision; /** A textual description of the reason for the payment. */ private String description; /** * @param moneyProvision List of money provisions * @param description Textual description */ public PaymentSchedule(List<MoneyProvision> moneyProvision, String description) { super(); this.moneyProvision = moneyProvision; this.description = description; } /** * Constructor */ public PaymentSchedule() { moneyProvision=new ArrayList<MoneyProvision>(); } /** * Getter returning the value of the description property. A textual description of the reason for the payment. * @return Value of the description property */ public String getDescription() { return description; } /** * Setter to update the value of the description property. A textual description of the reason for the payment. * @param description New value for the description property */ public void setDescription(String description) { this.description = description; } /** * Fetch the list of money provisions associated with this schedule. This list will never * be null. * @return List of money provisions. */ public List<MoneyProvision> getMoneyProvision() { return moneyProvision; } /** * Set the list of money provisions associated with this schedule. * @param moneyProvision */ public void setMoneyProvision(ArrayList<MoneyProvision> moneyProvision) { if (moneyProvision==null) { moneyProvision=new ArrayList<MoneyProvision>(); } else { this.moneyProvision = moneyProvision; } } /** * Calculate the total amount represented by this schedule. * @return * @throws IllegalStateException if the schedule is empty. */ public CurrencyAmount calculateTotal() { if (getMoneyProvision()==null || getMoneyProvision().size()==0) { throw new IllegalStateException("getMoneyProvision()==null || getMoneyProvision().size()==0"); } CurrencyAmount total=null; for(MoneyProvision prov: getMoneyProvision()) { if (total==null) { total=new CurrencyAmount(prov.calculateTotal()); } else { total=total.add(prov.calculateTotal()); } } return total; } }
[ "dickanderson@22cb28ec-0345-0410-b6dc-f8d001edd02c" ]
dickanderson@22cb28ec-0345-0410-b6dc-f8d001edd02c
d904353ad8a8ca86706e6b590e6d712bdda8f063
a25c4e35ad54fb98b6dda61bf4b7b7b51ad431a9
/src/main/java/com/dongguo/adapter/interfaceadapter/Interface4.java
9686dbd9dccfb9b55771af55ad1ab8e4f6cd6798
[]
no_license
dongguo4812/DesignPattern
078906852278aafbc5a6cac52bea93ab77c613ed
6d4d6168eedf7847d36f8d2766ff6cf8a2fcd45e
refs/heads/master
2023-07-07T12:48:09.435073
2021-08-23T01:51:21
2021-08-23T01:51:21
398,534,526
0
0
null
null
null
null
UTF-8
Java
false
false
240
java
package com.dongguo.adapter.interfaceadapter; /** * @author Dongguo * @date 2021/8/22 0022-13:11 * @description: */ public interface Interface4 { public void m1(); public void m2(); public void m3(); public void m4(); }
[ "291320608@qq.com" ]
291320608@qq.com
5cc0f18b732a5decd35c0f9d654b6a902b569793
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/baike/sources/qsbk/app/live/ui/da.java
7450868a57501702fcb6a5163ab5cbded3a345ef
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
579
java
package qsbk.app.live.ui; import org.json.JSONObject; import qsbk.app.core.net.NetworkCallback; import qsbk.app.core.utils.AppUtils; class da extends NetworkCallback { final /* synthetic */ LiveBaseActivity a; da(LiveBaseActivity liveBaseActivity) { this.a = liveBaseActivity; } public void onSuccess(JSONObject jSONObject) { long optLong = jSONObject.optLong("coin"); AppUtils.getInstance().getUserInfoProvider().setBalance(optLong); this.a.updateBalance(optLong); } public void onFailed(int i, String str) { } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
0d0d8bb5c9f1ec2eaddc58e3f2e713515939db17
c8851674fcaa87f59b7823e297967a99a1ce3651
/src/main/java/com/bisket/engine/parser/ColdCallingSaleParser.java
4fbeb94b98eb34d68040fd4860c646f9aeb18890
[]
no_license
soohyeon317/bisket-engine
1c2244a49d37e2e6a1822bc9547e75a909b68eac
402c683112a4a15a13e3b8e6ad54e7d9b4d858dc
refs/heads/master
2023-01-04T10:22:41.762898
2020-11-04T15:35:54
2020-11-04T15:35:54
299,330,872
0
0
null
null
null
null
UTF-8
Java
false
false
7,000
java
package com.bisket.engine.parser; import com.bisket.engine.entity.ColdCallingSale; import lombok.extern.slf4j.Slf4j; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import java.util.ArrayList; import java.util.List; @Slf4j public class ColdCallingSaleParser { public static List<ColdCallingSale> getListFromXml(Document xml) { List<ColdCallingSale> objectList = new ArrayList<>(); // root element 구하기 Element element = xml.getDocumentElement(); NodeList rowList = element.getElementsByTagName("row"); for (int i = 0; i < rowList.getLength(); i++) { NodeList childList = rowList.item(i).getChildNodes(); ColdCallingSale object = new ColdCallingSale(); for (int j = 0; j < childList.getLength(); j++) { // 데이터가 있는 애들만 출력 if(!childList.item(j).getNodeName().equals("#text")) { String itemValue = childList.item(j).getTextContent(); switch (j) { case 3: // 개방서비스명 object.setOpenServiceName(itemValue); break; case 5: // 개방서비스ID object.setOpenServiceId(itemValue); break; case 7: // 개방자치단체코드 object.setOpenAutonomousBodyCode(itemValue); break; case 9: // 관리번호 object.setManagementCode(itemValue); break; case 11: // 인허가일자 object.setLicensingDate(itemValue); break; case 13: // 인허가취소일자 object.setLicensingCancelDate(itemValue); break; case 15: // 영업상태구분코드 object.setBusinessStatusCode(itemValue); break; case 17: // 영업상태명 object.setBusinessStatusName(itemValue); break; case 19: // 상세영업상태코드 object.setDetailedBusinessStatusCode(itemValue); break; case 21: // 상세영업상태명 object.setDetailedBusinessStatusName(itemValue); break; case 23: // 폐업일자 object.setCloseDate(itemValue); break; case 25: // 휴업시작일자 object.setIdleStartDate(itemValue); break; case 27: // 휴업종료일자 object.setIdleEndDate(itemValue); break; case 29: // 재개업일자 object.setReopenDate(itemValue); break; case 31: // 소재지전화 object.setSitePhoneNumber(itemValue); break; case 33: // 소재지면적 object.setSiteArea(itemValue); break; case 35: // 소재지우편번호 object.setSitePostCode(itemValue); break; case 37: // 소재지전체주소 object.setSiteFullAddress(itemValue); break; case 39: // 도로명전체주소 object.setRoadNameFullAddress(itemValue); break; case 41: // 도로명우편번호 object.setRoadNamePostCode(itemValue); break; case 43: // 사업장명 object.setBusinessPlaceName(itemValue); break; case 45: // 최종수정시점 object.setLastModificationTime(itemValue); break; case 47: // 데이터갱신구분 object.setDataUpdateClassification(itemValue); break; case 49: // 데이터갱신일자 object.setDataUpdateDate(itemValue); break; case 51: // 업태구분명 object.setBusinessTypeClassificationName(itemValue); break; case 53: // 좌표정보(X) object.setXCoordinate(itemValue); break; case 55: // 좌표정보(Y) object.setYCoordinate(itemValue); break; case 57: // 자산규모 object.setAssetsScale(itemValue); break; case 59: // 부채총액 object.setDebtAmount(itemValue); break; case 61: // 자본금 object.setCapital(itemValue); break; case 63: // 판매방식명 object.setSaleMethodName(itemValue); break; default: break; } } } // 리스트에 저장 objectList.add(object); } return objectList; } }
[ "tngus90!" ]
tngus90!
581ec3e673234610b2f947d2f83c29acc80bb3e7
e56c0c78a24d37e80d507fb915e66d889c58258d
/seeds-collect/src/main/java/net/tribe7/common/collect/Count.java
e2e3cf13341a85f3c59206664b9c30f12c86e18f
[]
no_license
jjzazuet/seeds-libraries
d4db7f61ff3700085a36eec77eec0f5f9a921bb5
87f74a006632ca7a11bff62c89b8ec4514dc65ab
refs/heads/master
2021-01-23T20:13:04.801382
2014-03-23T21:51:46
2014-03-23T21:51:46
8,710,960
30
2
null
null
null
null
UTF-8
Java
false
false
1,678
java
/* * Copyright (C) 2011 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing permissions and * limitations under the License. */ package net.tribe7.common.collect; import java.io.Serializable; import javax.annotation.Nullable; import net.tribe7.common.annotations.GwtCompatible; /** * A mutable value of type {@code int}, for multisets to use in tracking counts of values. * * @author Louis Wasserman */ @GwtCompatible final class Count implements Serializable { private int value; Count(int value) { this.value = value; } public int get() { return value; } public int getAndAdd(int delta) { int result = value; value = result + delta; return result; } public int addAndGet(int delta) { return value += delta; } public void set(int newValue) { value = newValue; } public int getAndSet(int newValue) { int result = value; value = newValue; return result; } @Override public int hashCode() { return value; } @Override public boolean equals(@Nullable Object obj) { return obj instanceof Count && ((Count) obj).value == value; } @Override public String toString() { return Integer.toString(value); } }
[ "jjzazuet@gmail.com" ]
jjzazuet@gmail.com
fd31f37274223675442e0e40597da253bc4eefad
0feb67e62e0b4835a7e8c989da0405784a81f72d
/src/main/java/com/github/mikesafonov/specification/builder/starter/predicates/EqualsPredicateBuilder.java
79b709156e11e30e305d517366057247eeb973df
[ "MIT" ]
permissive
MikeSafonov/spring-boot-starter-specification-builder
344f85b832a7b531252b58826473bbeae382d23f
e5ab01591694de0bcf2f9c8dc836f7e464f10f2d
refs/heads/master
2023-03-13T22:09:01.029199
2021-08-25T14:52:12
2021-08-25T14:52:12
211,505,267
11
4
MIT
2023-03-06T13:00:05
2019-09-28T13:32:39
Java
UTF-8
Java
false
false
770
java
package com.github.mikesafonov.specification.builder.starter.predicates; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.Expression; import javax.persistence.criteria.Predicate; /** * Builder for {@code equals} predicate * * @author MikeSafonov */ public class EqualsPredicateBuilder extends SimplePredicateBuilder { private final CriteriaBuilder cb; private final Expression<?> valueExpression; public EqualsPredicateBuilder(CriteriaBuilder cb, Expression<?> valueExpression, Expression expression) { super(expression); this.cb = cb; this.valueExpression = valueExpression; } @Override public Predicate build() { return cb.equal(expression, valueExpression); } }
[ "msafonovmail@gmail.com" ]
msafonovmail@gmail.com
96a4dd971549f9b8bdeb0d06045f8e87387af921
6d943c9f546854a99ae27784d582955830993cee
/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v201911/PauseLineItems.java
d8b922413e543c66a174afd6b33efec3d2c8c8c5
[ "Apache-2.0" ]
permissive
MinYoungKim1997/googleads-java-lib
02da3d3f1de3edf388a3f2d3669a86fe1087231c
16968056a0c2a9ea1676b378ab7cbfe1395de71b
refs/heads/master
2021-03-25T15:24:24.446692
2020-03-16T06:36:10
2020-03-16T06:36:10
247,628,741
0
0
Apache-2.0
2020-03-16T06:36:35
2020-03-16T06:36:34
null
UTF-8
Java
false
false
1,472
java
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.admanager.jaxws.v201911; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * The action used for pausing {@link LineItem} objects. * * * <p>Java class for PauseLineItems complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PauseLineItems"> * &lt;complexContent> * &lt;extension base="{https://www.google.com/apis/ads/publisher/v201911}LineItemAction"> * &lt;sequence> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PauseLineItems") public class PauseLineItems extends LineItemAction { }
[ "christopherseeley@users.noreply.github.com" ]
christopherseeley@users.noreply.github.com
2a6725422175da4aef3c842a3a66e169190e60f7
24fae99a278e8022b3944908a4db05b3d3148551
/sources/com/google/ar/core/Point.java
79e64c80d724c33f9ab1e049f635284b123204ff
[]
no_license
bigmanstan/FurniAR-college-Minor-project
53cad4bc90d65aadcb76613ba386306672cfd011
3ceba7e1fcaf5e847e3a72dd92712c308d484189
refs/heads/master
2020-05-26T03:04:18.538119
2019-05-26T12:33:47
2019-05-26T12:33:47
188,084,904
3
0
null
null
null
null
UTF-8
Java
false
false
2,149
java
package com.google.ar.core; import com.google.ar.core.exceptions.FatalException; import java.util.Collection; public class Point extends TrackableBase { static final int AR_POINT_ORIENTATION_ESTIMATED_SURFACE_NORMAL = 1; static final int AR_POINT_ORIENTATION_INITIALIZED_TO_IDENTITY = 0; public enum OrientationMode { INITIALIZED_TO_IDENTITY(0), ESTIMATED_SURFACE_NORMAL(1); private final int nativeCode; private OrientationMode(int i) { this.nativeCode = i; } static OrientationMode fromNumber(int i) { for (OrientationMode orientationMode : values()) { if (orientationMode.nativeCode == i) { return orientationMode; } } StringBuilder stringBuilder = new StringBuilder(69); stringBuilder.append("Unexpected value for native Point Orientation Mode, value="); stringBuilder.append(i); throw new FatalException(stringBuilder.toString()); } } protected Point() { super(0, null); } Point(long j, Session session) { super(j, session); } private native int nativeGetOrientationMode(long j, long j2); private native Pose nativeGetPose(long j, long j2); public /* bridge */ /* synthetic */ Anchor createAnchor(Pose pose) { return super.createAnchor(pose); } public /* bridge */ /* synthetic */ boolean equals(Object obj) { return super.equals(obj); } public /* bridge */ /* synthetic */ Collection getAnchors() { return super.getAnchors(); } public OrientationMode getOrientationMode() { return OrientationMode.fromNumber(nativeGetOrientationMode(this.session.nativeHandle, this.nativeHandle)); } Pose getPose() { return nativeGetPose(this.session.nativeHandle, this.nativeHandle); } public /* bridge */ /* synthetic */ TrackingState getTrackingState() { return super.getTrackingState(); } public /* bridge */ /* synthetic */ int hashCode() { return super.hashCode(); } }
[ "theonlyrealemailid@gmail.com" ]
theonlyrealemailid@gmail.com
a58fb5d5dc32911827e226ae1b3e3917adebb18a
c411b72c4acdd0111a7ba2a170b8f8bf0a69e99e
/Workspace/formationJpa/src/main/java/entity/Fournisseur.java
041cb0b17f426fd739ebc7c9cc96ef61dbc407be
[]
no_license
jabid021/Sopra-210413
5499330dbcbb939598ba0e906be5b499cdcb72b5
e21a268f0a7f50a5b4bd8b92d9a42259971065a3
refs/heads/main
2023-06-05T01:52:30.930737
2021-06-25T15:53:54
2021-06-25T15:53:54
366,043,448
0
0
null
null
null
null
UTF-8
Java
false
false
1,070
java
package entity; import java.util.List; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.OneToMany; import javax.persistence.Table; @Entity @Table(name = "provider") //@DiscriminatorValue("FR") public class Fournisseur extends Personne { @OneToMany(mappedBy="fournisseur",fetch=FetchType.LAZY) List<Produit> produits; // Set<Produit> @Column(name = "contact", length = 100) private String contact; public Fournisseur() { } public Fournisseur(String prenom, String nom, String contact) { super(prenom, nom); this.contact = contact; } public Fournisseur(String prenom, String nom) { super(prenom, nom); } public String getContact() { return contact; } public void setContact(String contact) { this.contact = contact; } public List<Produit> getProduits() { return produits; } public void setProduits(List<Produit> produits) { this.produits = produits; } }
[ "o.gozlan@ajc-ingenierie.fr" ]
o.gozlan@ajc-ingenierie.fr
06035a33732529d1083426195431ab134dea545e
3a3d51f069841893eabf7f58f81ebf411107efba
/src/main/java/org/akomantoso/schema/v3/release/A.java
b96363a4c3e1c2d41f3363ab5852f214104a2eec
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ymartin59/akomantoso-lib
7481f4cf3ead3d8b410f40f6b7b3106318692dfb
3215cb0d8596ea2c74595b59a0f81c6e91183fab
refs/heads/master
2022-03-27T20:27:39.719762
2017-06-29T17:21:41
2017-06-29T17:21:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,440
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: 2017.05.20 at 03:05:24 PM IST // package org.akomantoso.schema.v3.release; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;extension base="{http://docs.oasis-open.org/legaldocml/ns/akn/3.0}inline"> * &lt;attGroup ref="{http://docs.oasis-open.org/legaldocml/ns/akn/3.0}target"/> * &lt;attGroup ref="{http://docs.oasis-open.org/legaldocml/ns/akn/3.0}link"/> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "a") public class A extends ComplexTypeInline { @XmlAttribute(name = "target") protected String target; @XmlAttribute(name = "href", required = true) @XmlSchemaType(name = "anyURI") protected String href; /** * Gets the value of the target property. * * @return * possible object is * {@link String } * */ public String getTarget() { return target; } /** * Sets the value of the target property. * * @param value * allowed object is * {@link String } * */ public void setTarget(String value) { this.target = value; } /** * Gets the value of the href property. * * @return * possible object is * {@link String } * */ public String getHref() { return href; } /** * Sets the value of the href property. * * @param value * allowed object is * {@link String } * */ public void setHref(String value) { this.href = value; } }
[ "ashok@hariharan.org.in" ]
ashok@hariharan.org.in
9eb606882d837713b45071ba166910abeac99e98
bbe34278f3ed99948588984c431e38a27ad34608
/sources/kotlin/collections/IndexingIterator.java
246093c46fe4f8b9f4915f406e74ad13a9bc490b
[]
no_license
sapardo10/parcial-pruebas
7af500f80699697ab9b9291388541c794c281957
938a0ceddfc8e0e967a1c7264e08cd9d1fe192f0
refs/heads/master
2020-04-28T02:07:08.766181
2019-03-10T21:51:36
2019-03-10T21:51:36
174,885,553
0
0
null
null
null
null
UTF-8
Java
false
false
1,888
java
package kotlin.collections; import java.util.Iterator; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.markers.KMappedMarker; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 2}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010(\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\b\u0000\u0018\u0000*\u0006\b\u0000\u0010\u0001 \u00012\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00010\u00030\u0002B\u0013\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00028\u00000\u0002¢\u0006\u0002\u0010\u0005J\t\u0010\b\u001a\u00020\tH†\u0002J\u000f\u0010\n\u001a\b\u0012\u0004\u0012\u00028\u00000\u0003H†\u0002R\u000e\u0010\u0006\u001a\u00020\u0007X‚\u000e¢\u0006\u0002\n\u0000R\u0014\u0010\u0004\u001a\b\u0012\u0004\u0012\u00028\u00000\u0002X‚\u0004¢\u0006\u0002\n\u0000¨\u0006\u000b"}, d2 = {"Lkotlin/collections/IndexingIterator;", "T", "", "Lkotlin/collections/IndexedValue;", "iterator", "(Ljava/util/Iterator;)V", "index", "", "hasNext", "", "next", "kotlin-stdlib"}, k = 1, mv = {1, 1, 10}) /* compiled from: Iterators.kt */ public final class IndexingIterator<T> implements Iterator<IndexedValue<? extends T>>, KMappedMarker { private int index; private final Iterator<T> iterator; public void remove() { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } public IndexingIterator(@NotNull Iterator<? extends T> iterator) { Intrinsics.checkParameterIsNotNull(iterator, "iterator"); this.iterator = iterator; } public final boolean hasNext() { return this.iterator.hasNext(); } @NotNull public final IndexedValue<T> next() { int i = this.index; this.index = i + 1; return new IndexedValue(i, this.iterator.next()); } }
[ "sa.pardo10@uniandes.edu.co" ]
sa.pardo10@uniandes.edu.co
7f342033a4666151d50619e299a50ca5038741a5
b3f8139795f497aedaeca9819de4b406c5bed211
/spring-boot-cart-mysql/src/test/java/com/spring/cart/springbootcartmysql/SpringBootCartMysqlApplicationTests.java
2fbe7e69495a2558a1432e82ebda3ae5144b5c3f
[]
no_license
dickanirwansyah/spring-boot-angular
45f70c1aa34abf43b557c5ccf69b938be30f96ab
90d1485ff29db97acc2e9779e2c5e1be437ad859
refs/heads/master
2020-03-12T10:30:39.134135
2018-04-25T17:25:43
2018-04-25T17:25:43
130,574,644
0
0
null
null
null
null
UTF-8
Java
false
false
365
java
package com.spring.cart.springbootcartmysql; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class SpringBootCartMysqlApplicationTests { @Test public void contextLoads() { } }
[ "dickanirwansyah@gmail.com" ]
dickanirwansyah@gmail.com
796b3eec3c524ca10ea195b9dcfbd2d7be59ad2a
1de67e55d65589b76bb2fcdd6da92610911f5690
/SpringMVCApplication/src/java/section1/section5/Custom.java
ffcbf9da0f6e5b1e68ed78c73df86fd428040b9a
[]
no_license
Kamurai/NetbeansRepository
6305baf4640a68260d46c304a4559e6f66936b08
4a683a7ead302c44e0686d5a649b1a8617885ae0
refs/heads/master
2023-04-16T01:19:33.737268
2023-04-05T02:01:05
2023-04-05T02:01:05
101,127,780
0
0
null
null
null
null
UTF-8
Java
false
false
3,068
java
package section1.section5; import main.*; public class Custom extends master.Custom { public Custom() { super(); } public String Title(int input) { String Result = ""; Result += "<title>"; if(input == 0) { Result += "Web Programming"; } Result += "</title>"; return Result; } public String Header(int input) { String Result = ""; Result += "<h2>"; if(input == 0) { Result += "ASP.NET Programming"; } Result += "</h2>"; return Result; } public String Content(int input) { String Result = ""; Result += "<p id=\"idCenterContent\">"; if(input == 0) { Result += "This section is dedicated to ASP.NET programming."; } Result += "</p>"; return Result; } public String Versions(int input) { String Result = ""; if(input == 0) { Result += "<a href=\"http://htkb.dyndns.org/Section1/Section5/Index.html\">HTML</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org/Section1/Section5/Index.php\">PHP</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org/Javascript/Section1/Section5/Index.html\">HTML Javascript</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org/JQuery/Section1/Section5/Index.html\">JQuery</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:81/ASP/Section1/Section5/Index.asp\">ASP Javascript</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:81/ASPNET/Section1/Section5/Index.aspx\">ASP.NET Javascript</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:81/WebForm/Section1/Section5/Index.aspx\">ASP.NET Webform</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:84/Section1/Section5/Index\">Node JS</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org/Section1/Section5/Index.shtml\">Perl</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:8080/JSPApplication/Section1/Section5/Index.jsp\">JSP</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:8080/JSFApplication/Section1/Section5/Index.xhtml\">JSF</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:81/WebApplication/Section1/Section5/Index.cshtml\">ASP.NET Web App</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:81/WebForm/Section1/Section5/Index.aspx\">ASP.NET Webform</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:81/MVC/Section1/Section5/Index\">ASP.NET MVC App</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org/SSI/Section1/Section5/Index.html\">Apache SSI</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:82/Section1/Section5/Index\">Python Web.py</a><br/>"; Result += "<a href=\"http://htkb.dyndns.org:83/Section1/Section5/Index\">Ruby on Rails</a><br/>"; } return Result; } }
[ "KamuraiBlue25@gmail.com" ]
KamuraiBlue25@gmail.com
9b2a554670b2e13cc07917a07b268e01b8012b8e
26919f912992bd31d511de8f18016ed8a665575b
/src/main/java/com/jaenyeong/chapter_02_JPA/webCommon/domainClassConverter/controller/WebPostController.java
666874f411979c73f18cd816b9970d563c82cf48
[]
no_license
jaenyeong/Study_Spring-Data-JPA
784ca33ceaff8e648f17128d97c35e73a72e6929
f7a3342763e3b6e92d42348267fd086647df0e83
refs/heads/master
2022-11-17T22:57:55.228598
2020-07-16T07:49:43
2020-07-16T07:49:43
279,004,005
0
0
null
null
null
null
UTF-8
Java
false
false
1,591
java
package com.jaenyeong.chapter_02_JPA.webCommon.domainClassConverter.controller; import com.jaenyeong.chapter_02_JPA.webCommon.domainClassConverter.entity.WebPost; import com.jaenyeong.chapter_02_JPA.webCommon.domainClassConverter.repository.WebPostRepository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.web.PagedResourcesAssembler; import org.springframework.hateoas.PagedResources; import org.springframework.hateoas.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; @RestController public class WebPostController { private final WebPostRepository posts; public WebPostController(WebPostRepository posts) { this.posts = posts; } // @GetMapping("/posts/{id}") // public String getPost(@PathVariable Long id) { // Optional<WebPost> byId = webPostRepository.findById(id); // WebPost webPost = byId.get(); // return webPost.getTitle(); // } // DomainClassConverter @GetMapping("/posts/{id}") public String getPost(@PathVariable("id") WebPost webPost) { return webPost.getTitle(); } // pageable, sort @GetMapping("/posts/") public Page<WebPost> getPosts(Pageable pageable) { return posts.findAll(pageable); } // HATEOAS @GetMapping("/posts/hateoas") public PagedResources<Resource<WebPost>> getHateoasPosts( Pageable pageable, PagedResourcesAssembler<WebPost> assembler) { return assembler.toResource(posts.findAll(pageable)); } }
[ "jaenyeong.dev@gmail.com" ]
jaenyeong.dev@gmail.com
5139ff1bdc77f45db40038d6a16c0893363d8093
832e975e6c161f3b167db4f1935df694bbb8de97
/cloudsystems/ViewPrj/src/main/java/br/com/mcampos/controller/logged/SouthLoggedController.java
ba9ba8829681fd7fea0dae6c6c221304e1ec9676
[]
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,919
java
package br.com.mcampos.controller.logged; import java.util.List; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Combobox; import org.zkoss.zul.Comboitem; import org.zkoss.zul.Label; import br.com.mcampos.controller.core.LoggedBaseController; import br.com.mcampos.dto.security.AuthenticationDTO; import br.com.mcampos.dto.user.CompanyDTO; import br.com.mcampos.ejb.cloudsystem.user.collaborator.facade.CollaboratorFacade; public class SouthLoggedController extends LoggedBaseController { private Label labelCopyright; private Label labelVersion; private Combobox companies; private Combobox cmbThemes; private CollaboratorFacade session; public SouthLoggedController( ) { super( ); } @Override public void doAfterCompose( Component comp ) throws Exception { super.doAfterCompose( comp ); setLabels( ); List<CompanyDTO> list = getSession( ).getCompanies( getLoggedInUser( ) ); loadCombobox( companies, list ); if ( list.size( ) > 0 ) { companies.setSelectedIndex( 0 ); onSelect$companies( ); } labelVersion.setValue( Executions.getCurrent( ).getDesktop( ).getWebApp( ).getVersion( ) ); } private void setLabels( ) { setLabel( labelCopyright ); } public CollaboratorFacade getSession( ) { if ( session == null ) session = (CollaboratorFacade) getRemoteSession( CollaboratorFacade.class ); return session; } public void onSelect$companies( ) { Comboitem comboItem = companies.getSelectedItem( ); if ( comboItem != null ) { CompanyDTO dto = (CompanyDTO) comboItem.getValue( ); AuthenticationDTO auth = getLoggedInUser( ); auth.setCurrentCompany( dto.getId( ) ); setLoggedInUser( auth ); Events.postEvent( new Event( Events.ON_NOTIFY, null, dto ) ); } } }
[ "tr081225@gmail.com" ]
tr081225@gmail.com
1dc127c52e79c6a8711d14c40203864fd6b8747a
55bf3cf97644af0bcbec091532fe83c99ba592f6
/org/w3c/css/properties/css21/CssBorderLeftColor.java
c1fc293d3fc93b2d7ae6ce82432984812bc6df04
[ "W3C-20150513", "W3C" ]
permissive
w3c/css-validator
dda4f191ff839b392440d91f9012ba2d2d63d0c6
6874d1990af57d3260fdc2a9420b09077cf2ed06
refs/heads/main
2023-09-03T12:40:19.427371
2023-03-13T13:59:56
2023-03-13T13:59:56
40,552,697
223
124
NOASSERTION
2023-09-13T17:38:37
2015-08-11T16:28:14
Java
UTF-8
Java
false
false
1,243
java
// $Id$ // Author: Yves Lafon <ylafon@w3.org> // // (c) COPYRIGHT MIT, ERCIM and Keio University, 2012. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.css.properties.css21; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; /** * @spec http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-color * @see CssBorderColor */ public class CssBorderLeftColor extends org.w3c.css.properties.css.CssBorderLeftColor { /** * Create a new CssBorderLeftColor */ public CssBorderLeftColor() { } /** * Creates a new CssBorderLeftColor * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssBorderLeftColor(ApplContext ac, CssExpression expression, boolean check) throws InvalidParamException { value = CssBorderColor.checkBorderSideColor(ac, this, expression, check); } public CssBorderLeftColor(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } }
[ "ylafon@w3.org" ]
ylafon@w3.org
0d6b838b264ac23fbeb3360f900efaf6b1693c6e
c8e934b6f99222a10e067a3fab34f39f10f8ea7e
/androidx/appcompat/widget/AppCompatAutoCompleteTextView.java
a66648abe4f73783460fd1f640329469953a0493
[]
no_license
ZPERO/Secret-Dungeon-Finder-Tool
19efef8ebe044d48215cdaeaac6384cf44ee35b9
c3c97e320a81b9073dbb5b99f200e99d8f4b26cc
refs/heads/master
2020-12-19T08:54:26.313637
2020-01-22T23:00:08
2020-01-22T23:00:08
235,683,952
0
0
null
null
null
null
UTF-8
Java
false
false
5,154
java
package androidx.appcompat.widget; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.ActionMode.Callback; import android.view.View; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.widget.AutoCompleteTextView; import android.widget.TextView; import androidx.appcompat.R.attr; import androidx.appcompat.content.wiki.AppCompatResources; import androidx.core.view.TintableBackgroundView; import androidx.core.widget.TextViewCompat; public class AppCompatAutoCompleteTextView extends AutoCompleteTextView implements TintableBackgroundView { private static final int[] TINT_ATTRS = { 16843126 }; private final AppCompatBackgroundHelper mBackgroundTintHelper; private final AppCompatTextHelper mTextHelper; public AppCompatAutoCompleteTextView(Context paramContext) { this(paramContext, null); } public AppCompatAutoCompleteTextView(Context paramContext, AttributeSet paramAttributeSet) { this(paramContext, paramAttributeSet, R.attr.autoCompleteTextViewStyle); } public AppCompatAutoCompleteTextView(Context paramContext, AttributeSet paramAttributeSet, int paramInt) { super(TintContextWrapper.wrap(paramContext), paramAttributeSet, paramInt); paramContext = TintTypedArray.obtainStyledAttributes(getContext(), paramAttributeSet, TINT_ATTRS, paramInt, 0); if (paramContext.hasValue(0)) { setDropDownBackgroundDrawable(paramContext.getDrawable(0)); } paramContext.recycle(); mBackgroundTintHelper = new AppCompatBackgroundHelper(this); mBackgroundTintHelper.loadFromAttributes(paramAttributeSet, paramInt); mTextHelper = new AppCompatTextHelper(this); mTextHelper.loadFromAttributes(paramAttributeSet, paramInt); mTextHelper.applyCompoundDrawablesTints(); } protected void drawableStateChanged() { super.drawableStateChanged(); Object localObject = mBackgroundTintHelper; if (localObject != null) { ((AppCompatBackgroundHelper)localObject).applySupportBackgroundTint(); } localObject = mTextHelper; if (localObject != null) { ((AppCompatTextHelper)localObject).applyCompoundDrawablesTints(); } } public ColorStateList getSupportBackgroundTintList() { AppCompatBackgroundHelper localAppCompatBackgroundHelper = mBackgroundTintHelper; if (localAppCompatBackgroundHelper != null) { return localAppCompatBackgroundHelper.getSupportBackgroundTintList(); } return null; } public PorterDuff.Mode getSupportBackgroundTintMode() { AppCompatBackgroundHelper localAppCompatBackgroundHelper = mBackgroundTintHelper; if (localAppCompatBackgroundHelper != null) { return localAppCompatBackgroundHelper.getSupportBackgroundTintMode(); } return null; } public InputConnection onCreateInputConnection(EditorInfo paramEditorInfo) { return AppCompatHintHelper.onCreateInputConnection(super.onCreateInputConnection(paramEditorInfo), paramEditorInfo, this); } public void setBackgroundDrawable(Drawable paramDrawable) { super.setBackgroundDrawable(paramDrawable); AppCompatBackgroundHelper localAppCompatBackgroundHelper = mBackgroundTintHelper; if (localAppCompatBackgroundHelper != null) { localAppCompatBackgroundHelper.onSetBackgroundDrawable(paramDrawable); } } public void setBackgroundResource(int paramInt) { super.setBackgroundResource(paramInt); AppCompatBackgroundHelper localAppCompatBackgroundHelper = mBackgroundTintHelper; if (localAppCompatBackgroundHelper != null) { localAppCompatBackgroundHelper.onSetBackgroundResource(paramInt); } } public void setCustomSelectionActionModeCallback(ActionMode.Callback paramCallback) { super.setCustomSelectionActionModeCallback(TextViewCompat.wrapCustomSelectionActionModeCallback(this, paramCallback)); } public void setDropDownBackgroundResource(int paramInt) { setDropDownBackgroundDrawable(AppCompatResources.getDrawable(getContext(), paramInt)); } public void setSupportBackgroundTintList(ColorStateList paramColorStateList) { AppCompatBackgroundHelper localAppCompatBackgroundHelper = mBackgroundTintHelper; if (localAppCompatBackgroundHelper != null) { localAppCompatBackgroundHelper.setSupportBackgroundTintList(paramColorStateList); } } public void setSupportBackgroundTintMode(PorterDuff.Mode paramMode) { AppCompatBackgroundHelper localAppCompatBackgroundHelper = mBackgroundTintHelper; if (localAppCompatBackgroundHelper != null) { localAppCompatBackgroundHelper.setSupportBackgroundTintMode(paramMode); } } public void setTextAppearance(Context paramContext, int paramInt) { super.setTextAppearance(paramContext, paramInt); AppCompatTextHelper localAppCompatTextHelper = mTextHelper; if (localAppCompatTextHelper != null) { localAppCompatTextHelper.onSetTextAppearance(paramContext, paramInt); } } }
[ "el.luisito217@gmail.com" ]
el.luisito217@gmail.com
f97dbae686ad2167a77ecb5209b411033c5a65bf
f998a098dad23557d41d1c0f591571fbcdb14373
/app/src/main/java/com/wearetogether/v2/ui/listeners/PreviewListener.java
a1980fa3c38f70d53649d71d57b5bf7a5c603990
[]
no_license
dkzver/app
14046b85111dd51a6a960245811c64dbe6c004b3
4b87b7aecec75ed9d3f0d6ab96d6094c4bd9dd8c
refs/heads/master
2023-04-04T06:26:22.478241
2021-04-12T02:13:26
2021-04-12T02:13:26
357,030,012
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.wearetogether.v2.ui.listeners; import com.wearetogether.v2.database.model.MediaItem; import java.util.List; public interface PreviewListener { void showPhoto(long unic, int position, String original, String icon); List<MediaItem> getList(); void showProgressBar(boolean isShow); }
[ "dkrstudio@hotmail.com" ]
dkrstudio@hotmail.com