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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
882cf9abd8bed66fa3451e24abd5c4c3cfb71a41
|
8f9ade5cdd7798defee416bc46a0a04dea61d806
|
/src/main/java/running/sum/of/one/d/array/RunningSumOf1dArray.java
|
6844fbdeb8450de8909bb9bfbdfa2d791a0f9ce8
|
[] |
no_license
|
humwawe/leetcode
|
9859b8b14fd8f209b1f2e72550ae88b60a867b1d
|
5d9c3d338ca20641b8b3f90ba0cc0fe07fa9314e
|
refs/heads/master
| 2022-12-01T11:34:25.813852
| 2022-11-28T14:44:09
| 2022-11-28T14:44:09
| 181,721,913
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 364
|
java
|
package running.sum.of.one.d.array;
/**
* @author hum
*/
public class RunningSumOf1dArray {
public int[] runningSum(int[] nums) {
int len = nums.length;
int[] result = new int[len];
result[0] = nums[0];
for (int i = 1; i < len; i++) {
result[i] = result[i - 1] + nums[i];
}
return result;
}
}
|
[
"wawe8963098@163.com"
] |
wawe8963098@163.com
|
214f24969476d097fc11a0fa1dc06fc0f55e2a0f
|
be16632b9c4bf9a4f72239779ba9510511b309db
|
/Current/Product/Production/Packages/Ant/Ant/src/com/agilex/ant/GoodXmlLogger.java
|
c25f6b44036b2c35c32d6839e397f30ced7f6bd7
|
[] |
no_license
|
vardars/ci-factory
|
7430c2afb577937fb598b5af3709990e674e7d05
|
b83498949f48948d36dc488310cf280dbd98ecb7
|
refs/heads/master
| 2020-12-25T19:26:17.750522
| 2015-07-10T10:58:10
| 2015-07-10T10:58:10
| 38,868,165
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,339
|
java
|
package com.agilex.ant;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.StringReader;
import java.nio.charset.Charset;
import java.util.Stack;
import java.util.Enumeration;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Text;
import org.xml.sax.InputSource;
import org.apache.tools.ant.util.DOMElementWriter;
import org.apache.tools.ant.util.StringUtils;
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildLogger;
import org.apache.tools.ant.Project;
public class GoodXmlLogger implements BuildLogger {
private class StopWatchStack
{
private final Stack stack = new Stack();
public StopWatchStack()
{
}
public long PopStop()
{
return ((StopWatch) this.stack.pop()).Elapsed();
}
public void PushStart()
{
this.stack.push(new StopWatch());
}
private class StopWatch
{
private final long start;
public StopWatch()
{
this.start = System.currentTimeMillis();
}
public long Elapsed()
{
return System.currentTimeMillis() - this.start;
}
}
}
public GoodXmlLogger() {
}
OutputStreamWriter out;
PrintStream err;
int outputLevel = Project.MSG_INFO;
final StopWatchStack stopWatchStack = new StopWatchStack();
private void writeDuration()
{
this.writeOutput("<duration>" + this.stopWatchStack.PopStop() + "</duration>\n");
}
private void writeOutput(String s) {
try {
out.write(s);
out.flush();
}
catch (IOException ioe) {
err.println("Exception encountered: "+ioe);
ioe.printStackTrace(err);
}
}
private void writeThrowable(Throwable t) {
if (t!=null) {
writeOutput("<failure>\n");
writeOutput("<builderror>\n");
writeOutput("<type>"+t.getClass().getName()+"</type>\n");
writeOutput("<message><![CDATA["+t.getMessage()+"]]></message>\n");
writeOutput("<stacktrace><![CDATA["+StringUtils.getStackTrace(t)+"]]></stacktrace>\n");
writeOutput("</builderror>\n");
writeOutput("</failure>\n");
}
}
public void setMessageOutputLevel(int level) {
outputLevel = level;
}
public void setOutputPrintStream(PrintStream outStream) {
out = new OutputStreamWriter(outStream,Charset.forName("UTF-8"));
}
public void setErrorPrintStream(PrintStream errorStream) {
err = errorStream;
}
public void setEmacsMode(boolean value) {}
public void buildStarted(BuildEvent event) {
this.stopWatchStack.PushStart();
writeOutput("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
}
boolean initialized = false;
private void logBuildInfo(Project project){
writeOutput("<antbuildresults project=\"" + project.getName() + "\">\n");
writeOutput("<message level=\"Info\"><![CDATA[Buildfile: file:///" + project.getProperty("ant.file") + "]]></message>\n");
writeOutput("<message level=\"Info\"><![CDATA[Target jvm: " + project.getProperty("java.specification.vendor") + " " + project.getProperty("java.runtime.version") + "]]></message>\n");
//writeOutput("<message level=\"Info\"><![CDATA[Target(s) specified: " + I don't know how to get the target specified at the command line!!! Ant Sucks!!! + "]]></message>\n");
initialized = true;
}
public void buildFinished(BuildEvent event) {
if (event.getException() != null){
this.writeThrowable(event.getException());
}
this.writeDuration();
writeOutput("</antbuildresults>\n");
}
public void targetStarted(BuildEvent event) {
if (!initialized)
this.logBuildInfo(event.getProject());
this.stopWatchStack.PushStart();
writeOutput("<target name=\"" + event.getTarget().getName() + "\">");
}
public void targetFinished(BuildEvent event) {
this.writeDuration();
writeOutput("</target>\n");
}
public void taskStarted(BuildEvent event) {
if (!initialized)
this.logBuildInfo(event.getProject());
this.stopWatchStack.PushStart();
writeOutput("<task name=\"" + event.getTask().getTaskName() + "\">\n");
}
public void taskFinished(BuildEvent event) {
this.writeDuration();
writeOutput("</task>\n");
}
public void messageLogged(BuildEvent event) {
int priority = event.getPriority();
if (priority <= outputLevel) {
String logLevel = "Debug";
switch (priority) {
case Project.MSG_ERR:
logLevel = "Error";
break;
case Project.MSG_WARN:
logLevel = "Warning";
break;
case Project.MSG_INFO:
logLevel = "Info";
break;
default:
logLevel = "Debug";
break;
}
String rawMessage = this.stripFormatting(event.getMessage().trim());
if (!rawMessage.matches("^[\\s\\p{Cntrl}]*$"))
{
writeOutput("<message level=\"" + logLevel + "\">");
if (this.isValidXml(rawMessage))
{
writeOutput(rawMessage.replaceAll("<\\?.*\\?>", ""));
}
else
{
writeOutput("<![CDATA[" + this.stripCData(rawMessage) + "]]>");
}
writeOutput("</message>\n");
}
}
}
public String stripFormatting(String message)
{
return message.replaceAll("\\p{Cntrl}", "");
}
private boolean isValidXml(String message)
{
if (message.matches("^<.*>"))
{
StringReader reader = new StringReader(message);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(true);
DocumentBuilder builder;
try {
builder = factory.newDocumentBuilder();
} catch (Throwable ex) {
throw new RuntimeException(ex);
}
builder.setErrorHandler(null);
try
{
builder.parse(new InputSource(reader));
}
catch(Throwable t)
{
return false;
}
finally
{
reader.close();
}
return true;
}
return false;
}
private String stripCData(String message)
{
return message.replaceAll("<!\\[CDATA\\[", "").replaceAll("\\]\\]>", "");
}
}
|
[
"cifactory@571f4c53-cd24-0410-92e9-33dde47f2f63"
] |
cifactory@571f4c53-cd24-0410-92e9-33dde47f2f63
|
7dd6249a1556358a448eb884b8919c4528085af2
|
b9852e928c537ce2e93aa7e378689e5214696ca5
|
/hse-entity-service/src/main/java/com/hd/hse/entity/sys/RecordErrorInform.java
|
d5cdd185324c3f8edd470447705d11984b7d0fe9
|
[] |
no_license
|
zhanshen1373/Hseuse
|
bc701c6de7fd88753caced249032f22d2ca39f32
|
110f9d1a8db37d5b0ea348069facab8699e251f1
|
refs/heads/master
| 2023-04-04T08:27:10.675691
| 2021-03-29T07:44:02
| 2021-03-29T07:44:02
| 352,548,680
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,845
|
java
|
package com.hd.hse.entity.sys;
import com.hd.hse.common.entity.SuperEntity;
import com.hd.hse.common.field.DBField;
import com.hd.hse.common.table.DBTable;
/**
* ClassName: RecordErrorInform ()<br/>
* date: 2015年3月17日 <br/>
*
* @author wenlin
* @version
*/
@DBTable(tableName = "hse_sys_record_error")
public class RecordErrorInform extends SuperEntity {
/**
* serialVersionUID:TODO().
*/
private static final long serialVersionUID = 1L;
/**
* hsreid:TODO(主键).
*/
@DBField(id = true)
private Integer hsreid;
/**
* tableid:TODO(外键).
*/
@DBField
private String tableid;
/**
* tablename:TODO(表名).
*/
@DBField
private String tablename;
/**
* errortype:TODO(错误类别).
*/
@DBField
private String errortype;
/**
* clickdealclass:TODO(注册动作类).
*/
@DBField
private String clickdealclass;
/**
* tag:TODO(是否解决).
*/
@DBField
private int tag;
/**
* dr:TODO(是否删除).
*/
@DBField
private int dr;
public Integer getHsreid() {
return hsreid;
}
public void setHsreid(Integer hsreid) {
this.hsreid = hsreid;
}
public String getTableid() {
return tableid;
}
public void setTableid(String tableid) {
this.tableid = tableid;
}
public String getTablename() {
return tablename;
}
public void setTablename(String tablename) {
this.tablename = tablename;
}
public String getErrortype() {
return errortype;
}
public void setErrortype(String errortype) {
this.errortype = errortype;
}
public String getClickdealclass() {
return clickdealclass;
}
public void setClickdealclass(String clickdealclass) {
this.clickdealclass = clickdealclass;
}
public int getTag() {
return tag;
}
public void setTag(int tag) {
this.tag = tag;
}
public int getDr() {
return dr;
}
public void setDr(int dr) {
this.dr = dr;
}
}
|
[
"dubojian@ushayden.com"
] |
dubojian@ushayden.com
|
b28b71ae0553fbec57c297f692f41b89c762e814
|
4ab2794c9530f3a6884519c74b43df979b9c3f65
|
/controltheland/src/main/java/com/btxtech/game/jsre/client/cockpit/Group.java
|
a6f1f8ec2144641c04706ab1ee64fd03af9fd210
|
[] |
no_license
|
kurdoxxx/controltheland
|
759b825b9e19c95a27f8b3345f1f620a6f8f308d
|
22fb17ff19446a9ed7c91b5a8e6d091488bf475e
|
refs/heads/master
| 2021-01-19T06:58:47.541857
| 2014-07-25T22:05:37
| 2014-07-25T22:05:37
| 37,353,316
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,986
|
java
|
/*
* Copyright (c) 2010.
*
* 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; version 2 of the License.
*
* 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.
*/
package com.btxtech.game.jsre.client.cockpit;
import com.btxtech.game.jsre.client.ClientExceptionHandler;
import com.btxtech.game.jsre.client.common.Index;
import com.btxtech.game.jsre.common.gameengine.itemType.BaseItemType;
import com.btxtech.game.jsre.common.gameengine.services.items.NoSuchItemTypeException;
import com.btxtech.game.jsre.common.gameengine.services.terrain.SurfaceType;
import com.btxtech.game.jsre.common.gameengine.syncObjects.SyncBaseItem;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
/**
* User: beat
* Date: 09.11.2009
* Time: 23:05:45
*/
public class Group {
private Collection<SyncBaseItem> syncBaseItems = new ArrayList<SyncBaseItem>();
public Group() {
}
public Group(Collection<SyncBaseItem> selectedItems) {
syncBaseItems = new ArrayList<SyncBaseItem>(selectedItems);
}
public void addItem(SyncBaseItem syncBaseItem) {
syncBaseItems.add(syncBaseItem);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Collection<SyncBaseItem> otherSyncBaseItems = ((Group) o).syncBaseItems;
if (syncBaseItems == null) {
return otherSyncBaseItems == null;
} else if (otherSyncBaseItems == null) {
return false;
}
if (syncBaseItems.isEmpty() && otherSyncBaseItems.isEmpty()) {
return true;
}
if (syncBaseItems.size() != otherSyncBaseItems.size()) {
return false;
}
for (SyncBaseItem item1 : syncBaseItems) {
boolean found = false;
for (SyncBaseItem item2 : otherSyncBaseItems) {
if (item1.equals(item2)) {
found = true;
break;
}
}
if (!found) {
return false;
}
}
return true;
}
@Override
public int hashCode() {
return syncBaseItems != null ? syncBaseItems.hashCode() : 0;
}
public boolean canAttack() {
for (SyncBaseItem syncBaseItem : syncBaseItems) {
if (syncBaseItem.hasSyncWeapon()) {
return true;
}
}
return false;
}
public boolean canCollect() {
for (SyncBaseItem syncBaseItem : syncBaseItems) {
if (syncBaseItem.hasSyncHarvester()) {
return true;
}
}
return false;
}
public boolean canMove() {
for (SyncBaseItem syncBaseItem : syncBaseItems) {
if (syncBaseItem.hasSyncMovable()) {
return true;
}
}
return false;
}
public boolean canFinalizeBuild() {
for (SyncBaseItem syncBaseItem : syncBaseItems) {
if (syncBaseItem.hasSyncBuilder()) {
return true;
}
}
return false;
}
public boolean onlyFactories() {
for (SyncBaseItem syncBaseItem : syncBaseItems) {
if (!syncBaseItem.hasSyncFactory()) {
return false;
}
}
return true;
}
public boolean onlyConstructionVehicle() {
for (SyncBaseItem syncBaseItem : syncBaseItems) {
if (!syncBaseItem.hasSyncBuilder()) {
return false;
}
}
return true;
}
public boolean contains(SyncBaseItem syncBaseItem) {
return syncBaseItems.contains(syncBaseItem);
}
public void remove(SyncBaseItem syncBaseItem) {
syncBaseItems.remove(syncBaseItem);
}
public boolean isEmpty() {
return syncBaseItems.isEmpty();
}
public int getCount() {
return syncBaseItems.size();
}
public Collection<SyncBaseItem> getItems() {
return syncBaseItems;
}
public Collection<SyncBaseItem> getSyncBaseItems() {
return syncBaseItems;
}
public SyncBaseItem getFirst() {
return syncBaseItems.iterator().next();
}
public int count() {
return syncBaseItems.size();
}
public Map<BaseItemType, Collection<SyncBaseItem>> getGroupedItems() {
HashMap<BaseItemType, Collection<SyncBaseItem>> map = new HashMap<BaseItemType, Collection<SyncBaseItem>>();
for (SyncBaseItem syncBaseItem : syncBaseItems) {
Collection<SyncBaseItem> collection = map.get(syncBaseItem.getBaseItemType());
if (collection == null) {
collection = new ArrayList<SyncBaseItem>();
map.put(syncBaseItem.getBaseItemType(), collection);
}
collection.add(syncBaseItem);
}
return map;
}
public Collection<SurfaceType> getAllowedSurfaceTypes() {
HashSet<SurfaceType> result = new HashSet<SurfaceType>();
for (SyncBaseItem syncBaseItem : syncBaseItems) {
result.addAll(syncBaseItem.getTerrainType().getSurfaceTypes());
}
return result;
}
public boolean atLeastOneItemTypeAllowed2Attack(SyncBaseItem syncBaseItem) {
for (SyncBaseItem selectedSyncBaseItem : syncBaseItems) {
if (selectedSyncBaseItem.hasSyncWeapon() && !selectedSyncBaseItem.getSyncWeapon().isItemTypeDisallowed(syncBaseItem)) {
return true;
}
}
return false;
}
public boolean atLeastOneItemTypeAllowed2FinalizeBuild(SyncBaseItem tobeFinalized) {
for (SyncBaseItem syncBaseItem : syncBaseItems) {
if (syncBaseItem.hasSyncBuilder() && syncBaseItem.getSyncBuilder().getBuilderType().isAbleToBuild(tobeFinalized.getItemType().getId())) {
return true;
}
}
return false;
}
public void keepOnlyOwnOfType(BaseItemType baseItemType) {
for (Iterator<SyncBaseItem> iterator = syncBaseItems.iterator(); iterator.hasNext(); ) {
BaseItemType currentBaseItemType = iterator.next().getBaseItemType();
if (!(baseItemType.equals(currentBaseItemType))) {
iterator.remove();
}
}
}
}
|
[
"beat.keller@btxtech.com"
] |
beat.keller@btxtech.com
|
91d9ff7409c773d77d9fcb48f0932b260e2d3a98
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_962d8ebc447f6b229a667e9364951843eaf88bf9/GameActivity/2_962d8ebc447f6b229a667e9364951843eaf88bf9_GameActivity_s.java
|
332a1c20c386112d28105cd17195f983f2a6ad25
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,808
|
java
|
package com.android.icecave.gui;
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.graphics.Point;
import android.media.AudioManager;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TableLayout;
import android.widget.TableRow;
import com.android.icecave.R;
import com.android.icecave.general.Consts;
import com.android.icecave.general.EDifficulty;
import com.android.icecave.general.EDirection;
import com.android.icecave.guiLogic.GUIBoardManager;
import com.android.icecave.guiLogic.PlayerGUIManager;
import com.android.icecave.guiLogic.TileImageView;
import com.android.icecave.mapLogic.IIceCaveGameStatus;
public class GameActivity extends Activity implements ISwipeDetector
{
private static GUIBoardManager sGBM;
private PlayerGUIManager mPGM;
private Point mPlayerPosition;
private TileImageView mPlayer;
private final String POSITION_X = "posX";
private final String POSITION_Y = "posY";
private TableLayout mTilesTable;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
setVolumeControlStream(AudioManager.STREAM_MUSIC);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.tiles_layout);
// Hide the Status Bar
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
mTilesTable = (TableLayout) findViewById(R.id.tilesTable);
// Register swipe events to the layout
mTilesTable.setOnTouchListener(new ActivitySwipeDetector(this));
// Create the first row if none exist
if (mTilesTable.getChildCount() == 0)
{
createRows();
}
// Set up player position
if (savedInstanceState != null)
{
mPlayerPosition =
new Point(savedInstanceState.getInt(POSITION_X), savedInstanceState.getInt(POSITION_Y));
} else
{
mPlayerPosition = new Point(Consts.DEFAULT_START_POS);
}
// Create player
if (getIntent().getExtras() != null)
{
mPGM =
new PlayerGUIManager(getResources().getDrawable((Integer) getIntent().getExtras()
.get(Consts.PLAYER_SELECT_TAG)));
}
}
public int getHeight()
{
return mTilesTable.getBottom();
}
public int getWidth()
{
return mTilesTable.getWidth();
}
/***
* Add the next tile to the table layout
*
* @param tile
* Tile to add
*/
public void addNextTileToView(TileImageView tile)
{
// Add current tile to the row that matches its index
((TableRow) mTilesTable.findViewById(tile.getRow())).addView(tile);
}
private void createRows() {
// Create all rows by the value of board size rows
// TODO Change const value to an input
for (int i = 0; i < Consts.DEFAULT_BOARD_SIZE_Y; i++)
{
// Create new row and set its Id as the value of its index
TableRow newRow = new TableRow(this);
newRow.setId(i);
mTilesTable.addView(newRow);
}
}
@Override
protected void onSaveInstanceState(Bundle outState)
{
super.onSaveInstanceState(outState);
// Put position data
outState.putInt(POSITION_X, mPlayerPosition.x);
outState.putInt(POSITION_Y, mPlayerPosition.y);
}
@Override
public void bottom2top(View v)
{
commitSwipe(EDirection.UP);
}
@Override
public void left2right(View v)
{
commitSwipe(EDirection.RIGHT);
}
@Override
public void right2left(View v)
{
commitSwipe(EDirection.LEFT);
}
@Override
public void top2bottom(View v)
{
commitSwipe(EDirection.DOWN);
}
/**
*
*/
private void commitSwipe(EDirection direction)
{
mPlayer = mPGM.getPlayerImage(mPlayerPosition.x, mPlayerPosition.y, direction, true);
IIceCaveGameStatus iceCaveGameStatus = sGBM.movePlayer(direction);
// TODO: Sagie make the animation.
}
@Override
public void onWindowFocusChanged(boolean hasFocus)
{
// Create new stage here to make sure layout is made and active and visible
if (sGBM == null)
{
// Create once
sGBM = new GUIBoardManager();
// Initialize the game board & shit
// TODO Change const value to an input
sGBM.startNewGame(Consts.DEFAULT_BOULDER_NUM,
Consts.DEFAULT_BOARD_SIZE_X,
Consts.DEFAULT_BOARD_SIZE_Y,
EDifficulty.values()[(Integer) getIntent().getExtras().get(Consts.LEVEL_SELECT_TAG)]);
// Create first stage
sGBM.newStage(Consts.DEFAULT_START_POS, Consts.DEFAULT_WALL_WIDTH, this);
}
super.onWindowFocusChanged(hasFocus);
}
@Override
protected void onDestroy()
{
// Reset variable
sGBM = null;
super.onDestroy();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
b4585ee3fb70f666707100981735a41bf412902d
|
56ddb92175b35a2b28a9b15e65f4c009676ccb3b
|
/src/de/matthiasmann/twlthemeeditor/gui/NewProjectSettings.java
|
99346e455fbfbe427034994e32c3c461dbd6b095
|
[
"BSD-3-Clause"
] |
permissive
|
kd8lvt/TWLThemeEditor
|
e3071a0b0e4d93b583dd9df5bbc3a3202e4b90dc
|
446d8f6dce00eece079c13f4c0292cf14a425ca6
|
refs/heads/master
| 2021-02-26T12:32:57.841088
| 2016-09-24T20:43:08
| 2016-09-24T20:43:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,178
|
java
|
/*
* Copyright (c) 2008-2010, Matthias Mann
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Matthias Mann nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package de.matthiasmann.twlthemeeditor.gui;
import de.matthiasmann.twlthemeeditor.Main;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.ArrayList;
/**
*
* @author Matthias Mann
*/
public class NewProjectSettings {
private final File folder;
private final String projectName;
public NewProjectSettings(File folder, String projectName) {
this.folder = folder;
this.projectName = projectName;
}
public File getFolder() {
return folder;
}
public String getProjectName() {
return projectName;
}
@Override
public String toString() {
return getFile(projectName).getPath();
}
private static final String BLUEPRINT_FILENAME = "new_project_blueprint.xml";
private static final String[] FONT_FILENAMES = {"font.fnt", "font_00.png"};
public File[] getFileList() {
ArrayList<File> files = new ArrayList<File>();
files.add(getFile(projectName));
for(String fileName : FONT_FILENAMES) {
files.add(getFile(fileName));
}
return files.toArray(new File[files.size()]);
}
public File createProject() throws IOException {
File projectFile = getFile(projectName);
copy(BLUEPRINT_FILENAME, projectFile);
for(String fileName : FONT_FILENAMES) {
copy(fileName, getFile(fileName));
}
return projectFile;
}
private File getFile(String name) {
return new File(folder, name);
}
private URL getResource(String name) {
return Main.class.getResource(name);
}
private static void copy(InputStream in, OutputStream out) throws IOException {
byte[] buffer = new byte[4096];
int read;
while((read=in.read(buffer)) > 0) {
out.write(buffer, 0, read);
}
}
private static void copy(URL src, File dst) throws IOException {
InputStream in = src.openStream();
try {
FileOutputStream out = new FileOutputStream(dst);
try {
copy(in, out);
} finally {
out.close();
}
} finally {
in.close();
}
}
private void copy(String srcName, File dst) throws IOException {
URL src = getResource(srcName);
if(src == null) {
throw new IOException("Can't locate resource: " + srcName);
}
copy(src, dst);
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
83fa84dea214727318531bcf737384d7535dc386
|
c386c31e921bd177d34656bb3ee4399ccfbfce0f
|
/code/backend/admin/src/main/java/com/huawei/l00379880/admin/controller/SysConfigController.java
|
c5a77e462ccc2a2921bed2a6c95b0f0dcd377b26
|
[
"MIT"
] |
permissive
|
lhongjum/spring-cloud-vue-admin
|
a80b59cb3ffb24a95824e3ce58cb76a7c7061dce
|
e399bc238e486cef481ecbe789c57c433428715d
|
refs/heads/master
| 2022-12-11T03:52:16.899717
| 2019-11-29T16:26:14
| 2019-11-29T16:26:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,100
|
java
|
/***********************************************************
* @Description : 系统配置接口
* @author : 梁山广(Liang Shan Guang)
* @date : 2019/11/17 20:17
* @email : liangshanguang2@gmail.com
***********************************************************/
package com.huawei.l00379880.admin.controller;
import com.huawei.l00379880.admin.model.SysConfig;
import com.huawei.l00379880.admin.service.SysConfigService;
import com.huawei.l00379880.core.http.HttpResult;
import com.huawei.l00379880.core.page.PageRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/config")
@Api(tags = "系统配置接口")
public class SysConfigController {
@Autowired
private SysConfigService sysConfigService;
@PostMapping("/save")
@ApiOperation("保存配置")
@PreAuthorize("hasAuthority('sys:config:add') AND hasAuthority('sys:config:edit')")
public HttpResult save(@RequestBody SysConfig record) {
return HttpResult.ok(sysConfigService.save(record));
}
@PostMapping("/delete")
@ApiOperation("删除配置")
@PreAuthorize("hasAuthority('sys:config:delete')")
public HttpResult delete(@RequestBody List<SysConfig> records) {
return HttpResult.ok(sysConfigService.delete(records));
}
@PostMapping("/findPage")
@ApiOperation("获取配置的分页列表")
@PreAuthorize("hasAuthority('sys:config:view')")
public HttpResult findPage(@RequestBody PageRequest pageRequest) {
return HttpResult.ok(sysConfigService.findPage(pageRequest));
}
@GetMapping("/findByLabel")
@ApiOperation("根据配置名获取配置分页对象")
@PreAuthorize("hasAuthority('sys:config:view')")
public HttpResult findByLabel(@RequestParam String label) {
return HttpResult.ok(sysConfigService.findByLabel(label));
}
}
|
[
"1648266192@qq.com"
] |
1648266192@qq.com
|
e5335f89a03a1c0e0d69039e1596bb9f0fcbe992
|
1d676636493e907bc9885aeacc47f674059bdc76
|
/integration-test/src/test/java/com/android/build/gradle/integration/application/GenFolderApi2Test.java
|
20d850c6c30d226ec9ca9e2d4063113613be720e
|
[] |
no_license
|
huafresh/studio-3.0-build-system
|
f895d05426936f833b3eefe18599c3dc6717915d
|
42eb79bb520bf1fa428426ef31575b450eb1255d
|
refs/heads/master
| 2023-04-01T09:13:42.953418
| 2021-04-09T08:49:35
| 2021-04-09T08:49:35
| 356,198,659
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,017
|
java
|
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.build.gradle.integration.application;
import static com.android.build.gradle.integration.common.truth.TruthHelper.assertThat;
import static org.junit.Assert.assertNotNull;
import com.android.build.gradle.integration.common.fixture.GradleTestProject;
import com.android.build.gradle.integration.common.utils.TestFileUtils;
import com.android.builder.model.AndroidArtifact;
import com.android.builder.model.AndroidProject;
import com.android.builder.model.JavaArtifact;
import com.android.builder.model.Variant;
import java.io.File;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
/** Assemble tests for genFolderApi2. */
public class GenFolderApi2Test {
@Rule
public GradleTestProject project =
GradleTestProject.builder().fromTestProject("genFolderApi2").create();
@Test
public void checkJavaFolderInModel() throws Exception {
AndroidProject model = project.model().getSingle().getOnlyModel();
File projectDir = project.getTestDir();
File buildDir = new File(projectDir, "build");
for (Variant variant : model.getVariants()) {
AndroidArtifact mainInfo = variant.getMainArtifact();
assertNotNull(
"Null-check on mainArtifactInfo for " + variant.getDisplayName(), mainInfo);
// Get the generated source folders.
Collection<File> genSourceFolder = mainInfo.getGeneratedSourceFolders();
// We're looking for a custom folder.
String sourceFolderStart =
new File(buildDir, "customCode").getAbsolutePath() + File.separatorChar;
assertThat(
genSourceFolder
.stream()
.anyMatch(
it ->
it.getAbsolutePath()
.startsWith(sourceFolderStart)))
.isTrue();
// Unit testing artifact:
assertThat(variant.getExtraJavaArtifacts()).hasSize(1);
JavaArtifact unitTestArtifact = variant.getExtraJavaArtifacts().iterator().next();
List<File> sortedFolders =
unitTestArtifact
.getGeneratedSourceFolders()
.stream()
.sorted()
.collect(Collectors.toList());
assertThat(sortedFolders).hasSize(3);
assertThat(sortedFolders.get(0).getAbsolutePath()).startsWith(sourceFolderStart);
assertThat(sortedFolders.get(0).getAbsolutePath()).endsWith("-1");
assertThat(sortedFolders.get(1).getAbsolutePath()).startsWith(sourceFolderStart);
assertThat(sortedFolders.get(1).getAbsolutePath()).endsWith("-2");
}
}
@Test
public void backwardsCompatible() throws Exception {
// ATTENTION Author and Reviewers - please make sure required changes to the build file
// are backwards compatible before updating this test.
assertThat(TestFileUtils.sha1NormalizedLineEndings(project.file("build.gradle")))
.isEqualTo("df3a072e7efbe889b653793e67f47a154d88bd26");
}
}
|
[
"clydeazhang@tencent.com"
] |
clydeazhang@tencent.com
|
4a0eaa5f330b712b968390ad220e74a32d02e021
|
b517de22306cdb3a03bcc4bc1dd8060cc86ce826
|
/rapid-data/src/main/java/org/rapid/data/storage/mapper/DBMapper.java
|
538801ea2c6a2f96dd2fb67b79852e25da6c3217
|
[] |
no_license
|
723854867/rapid_old
|
6af6acc8382270ceb07bcd792ed5dbea6037f20f
|
31f8712bcaa7be4194de703bd2e9cebaaf19f8ec
|
refs/heads/master
| 2021-07-08T03:29:56.075987
| 2017-09-29T15:58:41
| 2017-09-29T15:58:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 434
|
java
|
package org.rapid.data.storage.mapper;
import java.util.Collection;
import org.rapid.util.common.model.UniqueModel;
/**
* database 和 java 之间的对象映射类
*
* @author ahab
*
* @param <KEY>
* @param <MODEL>
*/
public interface DBMapper<KEY, MODEL extends UniqueModel<KEY>> extends Mapper<KEY, MODEL> {
void deleteByKeys(Collection<KEY> keys);
void replace(Collection<MODEL> collection);
}
|
[
"723854867@qq.com"
] |
723854867@qq.com
|
1e1e054ae823354117eed11a03762461044abffe
|
95be54ffa9c4cc6fcf4bdde0b8cad902771f91b0
|
/连连看SE/src/ghost/picmatch/logic/GameHelp.java
|
5efe13badf9d3f344219f2a04335e0a980e09f1f
|
[] |
no_license
|
houtian80/Android
|
a314c8cee8144a1b12380386bdd3e6b2f12e0a47
|
05e6107d56b1051976dd6d103cc7fd61cf03be9d
|
refs/heads/master
| 2020-12-01T03:01:35.681042
| 2013-08-09T08:34:03
| 2013-08-09T08:34:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,005
|
java
|
package ghost.picmatch.logic;
import ghost.picmatch.data.GameData;
import ghost.picmatch.data.ImageData;
import ghost.picmatch.util.Tool;
import java.awt.Graphics2D;
public class GameHelp extends GameObject {
@Override
public void drawBackground(Graphics2D g2d) {
Tool.drawImage(ImageData.background[0], 0, 0, GameData.width,
GameData.height, g2d);
}
@Override
public void drawFunc(Graphics2D g2d) {
Tool.drawImage(ImageData.help_text, 40, 200, 400, 457, g2d);
}
@Override
public void drawLogo(Graphics2D g2d) {
Tool.drawImage(ImageData.logo, 65, 65, 350, 80, g2d);
}
@Override
public void drawButton(Graphics2D g2d) {
Tool.drawImage(ImageData.return_button[0], 270, 690, 180, 50, g2d);
}
@Override
public void clickAction(int x, int y) {
if (y >= 690 && y <= 740 && x >= 270 && x <= 450) {
GameData.status = MENU;
}
}
@Override
public void doLogic() {
// TODO Auto-generated method stub
}
}
|
[
"821580467@qq.com"
] |
821580467@qq.com
|
35ebb9da417ea7adefb58c3a04325eb905d620d4
|
b269f90704b62496ed1215e3e79273d26e489df1
|
/ChanBaapp/src/main/java/com/spring/chanba/contract/ServiceMenuContract.java
|
b30afe9ebab0d10dd91bb73aa24142f044dc4d6a
|
[] |
no_license
|
atMen/MicroEnterprise
|
d37b761a90cb14bfd20e027d909ff0340b5738d0
|
04e40123d1748bb2868147bf1f9bfe37a34bf839
|
refs/heads/master
| 2021-07-22T17:07:27.230028
| 2020-05-24T07:53:35
| 2020-05-24T07:53:35
| 178,770,054
| 1
| 0
| null | 2020-05-24T07:53:36
| 2019-04-01T02:19:28
|
Java
|
UTF-8
|
Java
| false
| false
| 721
|
java
|
package com.spring.chanba.contract;
import com.spring.chanba.bean.ServiceMenuEntity;
import com.spring.chanba.interfaces.BasePresenter;
import com.spring.chanba.interfaces.BaseView;
import java.util.HashMap;
/**
* 菜单
*/
public class ServiceMenuContract {
public interface Presenter extends BasePresenter {
void getMenuList(HashMap<String, String> map);
}
public interface View extends BaseView<Presenter> {
/**
* 返回服务器失败信息
*
* @param message
*/
void failedMessage(String message);
/**
* 菜单
*
* @param entity
*/
void initMenuList(ServiceMenuEntity entity);
}
}
|
[
"377044412@qq.com"
] |
377044412@qq.com
|
5f1b23598d184d7b6f56497340f96a50e869a850
|
0c64308919bcb8aa063d89ec87127d07dd2fa337
|
/mooc-java-programming-ii/DiagramsCode/src/main/java/example07/Part.java
|
2a96a52a3f4e402977e2bc12cc89ddca7acad143
|
[] |
no_license
|
emaphis/mooc_fi
|
a6d9a3a79883a624f49fa563059ba20287992b70
|
52233e55d304c665c0bc2f778710de6b71ca72be
|
refs/heads/master
| 2021-06-18T08:19:44.989075
| 2021-02-09T16:08:12
| 2021-02-09T16:08:12
| 172,287,666
| 1
| 7
| null | 2021-02-09T16:08:13
| 2019-02-24T02:36:17
|
Java
|
UTF-8
|
Java
| false
| false
| 520
|
java
|
package example07;
public class Part {
private String ID;
private String manufacturing;
private String description;
public Part(String ID, String manufacturing, String description) {
this.ID = ID;
this.manufacturing = manufacturing;
this.description = description;
}
public String getID() {
return ID;
}
public String getManufacturing() {
return manufacturing;
}
public String getDescription() {
return description;
}
}
|
[
"emaphis85@gmail.com"
] |
emaphis85@gmail.com
|
f1c1592cf2b4a54e0cfba967c02df84ec02660d1
|
ded2330f5d1589d50fb531a3466a277163a9c5f2
|
/meal/jxd-whotel/src/main/java/com/whotel/company/entity/MatchKeyword.java
|
c5f8b895f1000b60580dec358101e1c3ce97307c
|
[] |
no_license
|
hasone/whotel
|
d106cb85ca0fecfa7a0f631b096c8c396e806b76
|
92ab351d056021f02539262e74c019a6363e9be7
|
refs/heads/master
| 2021-06-18T01:22:50.462881
| 2017-06-14T12:10:47
| 2017-06-14T12:10:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,726
|
java
|
package com.whotel.company.entity;
import org.apache.commons.lang.StringUtils;
import com.whotel.company.enums.KeywordMatchType;
/**
* <pre>
* 根据匹配方式检测传入的内容是否匹配该关键词,两种匹配方式的区别:
* 全匹配 - 关键词和内容完全一样
* 模糊匹配 - 关键词出现在内容中
* @author 冯勇
*
*/
public class MatchKeyword {
private String keyword; // 关键词
private KeywordMatchType type; // 匹配方式
private long count;
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public KeywordMatchType getType() {
return type;
}
public void setType(KeywordMatchType type) {
this.type = type;
}
public long getCount() {
return count;
}
public void setCount(long count) {
this.count = count;
}
/**
* 根据匹配规则判断是否命中
* @param content
* @return
*/
public boolean isMatch(String content) {
content = StringUtils.trim(content);
if (StringUtils.isBlank(content)) {
return false;
} else if (KeywordMatchType.PART.equals(type)) {
return StringUtils.containsIgnoreCase(keyword.toLowerCase(),content.toLowerCase());
} else {
return StringUtils.equalsIgnoreCase(content, keyword);
}
}
/**
* 是否全匹配
* @param content
* @return
*/
public boolean isAbsMatch(String content) {
content = StringUtils.trim(content);
if (StringUtils.isBlank(content)) {
return false;
} else if (KeywordMatchType.PART.equals(type)) {
return false;
} else {
return StringUtils.equalsIgnoreCase(content, this.keyword);
}
}
}
|
[
"374255041@qq.com"
] |
374255041@qq.com
|
2718774964a968c1fa6c5f5bbd26736116cfade1
|
1be50c1c36592b4956a0d3d81b99a0fa3acdb63b
|
/src/edu/psu/compbio/seqcode/gse/viz/paintable/PaintablePanel.java
|
12dfe726d254cd8e138bcf99a719bbf302e6dfa3
|
[
"MIT"
] |
permissive
|
shaunmahony/multigps-archive
|
63aee145cc764b516d4d018c1bb7533a64269b17
|
08a3b0324025c629c8de5c2a5a2c0d56d5bf4574
|
refs/heads/master
| 2021-06-07T23:22:25.209614
| 2016-11-25T02:33:04
| 2016-11-25T02:33:04
| 16,091,126
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,118
|
java
|
package edu.psu.compbio.seqcode.gse.viz.paintable;
import java.awt.Graphics;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Collection;
import java.util.LinkedList;
import javax.swing.JPanel;
public class PaintablePanel
extends JPanel
implements PaintableChangedListener {
private Paintable fPaintable;
public PaintablePanel() {
super();
fPaintable = null;
addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
int w = getWidth();
int h = getHeight();
if(w > 0 && h > 0) {
double xf = (double)evt.getX() / (double)w;
double yf = (double)evt.getY() / (double)h;
if(fPaintable != null) {
fPaintable.registerClick(xf, yf);
}
}
}
});
}
public PaintablePanel(Paintable p) {
this();
fPaintable = p;
fPaintable.addPaintableChangedListener(this);
}
public Paintable getPaintable() { return fPaintable; }
public void setPaintable(Paintable p) {
if(fPaintable != null) {
fPaintable.removePaintableChangedListener(this);
}
fPaintable = p;
if(fPaintable != null) {
fPaintable.addPaintableChangedListener(this);
}
repaint();
}
public void paintableChanged(PaintableChangedEvent evt) {
//System.out.println("Repainting...");
repaint();
}
protected void paintItem(Graphics g, int x1, int y1, int x2, int y2) {
if(fPaintable != null) {
fPaintable.paintItem(g, x1, y1, x2, y2);
}
}
protected void paintComponent(Graphics g) {
super.paintComponent(g);
int w = getWidth();
int h = getHeight();
paintItem(g, 0, 0, w, h);
}
public Collection<Paintable> getPaintables() {
LinkedList<Paintable> lst = new LinkedList<Paintable>();
lst.addLast(fPaintable);
return lst;
}
}
|
[
"mahony@psu.edu"
] |
mahony@psu.edu
|
0b3f7dc1e906cf0772b7eef40216bcd861959a3a
|
e2bcc84f6c734affba77c1d5c94976cc9329f92e
|
/scm/src/main/java/com/best1/scm/modules/oa/dao/OaNotifyDao.java
|
13b5c7892fd1954c1ac39f0d5d948ca5c70acdd2
|
[] |
no_license
|
CaptainJ93/SpringStudy
|
422985fa6e6be3d1b7415efdeb7bad4d243d108d
|
40d0665f9e1917f7189e7d9554c951c13d7d5c5a
|
refs/heads/master
| 2020-03-17T05:50:07.857946
| 2018-06-22T09:06:47
| 2018-06-22T09:06:47
| 133,330,489
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 576
|
java
|
/**
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.best1.scm.modules.oa.dao;
import com.best1.scm.common.persistence.CrudDao;
import com.best1.scm.common.persistence.annotation.MyBatisDao;
import com.best1.scm.modules.oa.entity.OaNotify;
/**
* 通知通告DAO接口
* @author ThinkGem
* @version 2014-05-16
*/
@MyBatisDao
public interface OaNotifyDao extends CrudDao<OaNotify> {
/**
* 获取通知数目
* @param oaNotify
* @return
*/
public Long findCount(OaNotify oaNotify);
}
|
[
"jiashizhen@JSB-0019.best1.com"
] |
jiashizhen@JSB-0019.best1.com
|
a33327d1a07a3128c4da836ac430d56559b6e891
|
c5b931b9cbfa3dbbfe519ff46da8a00bf6710494
|
/src/main/java/com/github/alexthe666/iceandfire/compat/jei/icedragonforge/IceDragonForgeDrawable.java
|
34700a9c44931b1066d94e6f7e6c7a8a52874ac5
|
[] |
no_license
|
ETStareak/Ice_and_Fire
|
4df690c161036188f25a39711759fa03f9543958
|
31dcce21f06763fee7e33683a631f0a133f67130
|
refs/heads/1.8.4-1.12.2
| 2023-03-17T01:05:31.176702
| 2022-02-21T17:34:49
| 2022-02-21T17:34:49
| 260,837,962
| 1
| 0
| null | 2020-05-15T16:25:56
| 2020-05-03T05:54:48
|
Java
|
UTF-8
|
Java
| false
| false
| 2,297
|
java
|
package com.github.alexthe666.iceandfire.compat.jei.icedragonforge;
import mezz.jei.api.gui.IDrawable;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.ResourceLocation;
public class IceDragonForgeDrawable implements IDrawable {
private static final ResourceLocation TEXTURE = new ResourceLocation("iceandfire:textures/gui/dragonforge_ice.png");
@Override
public int getWidth() {
return 176;
}
@Override
public int getHeight() {
return 120;
}
@Override
public void draw(Minecraft minecraft, int xOffset, int yOffset) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
minecraft.getTextureManager().bindTexture(TEXTURE);
this.drawTexturedModalRect(xOffset, yOffset, 3, 4, 170, 79);
int scaledProgress = (minecraft.player.ticksExisted % 100) * 128 / 100;
this.drawTexturedModalRect(xOffset + 9, yOffset + 19, 0, 166, scaledProgress, 38);
}
public void drawTexturedModalRect(int x, int y, int textureX, int textureY, int width, int height) {
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder bufferbuilder = tessellator.getBuffer();
bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
bufferbuilder.pos((double) (x + 0), (double) (y + height), (double) 0).tex((double) ((float) (textureX + 0) * 0.00390625F), (double) ((float) (textureY + height) * 0.00390625F)).endVertex();
bufferbuilder.pos((double) (x + width), (double) (y + height), (double) 0).tex((double) ((float) (textureX + width) * 0.00390625F), (double) ((float) (textureY + height) * 0.00390625F)).endVertex();
bufferbuilder.pos((double) (x + width), (double) (y + 0), (double) 0).tex((double) ((float) (textureX + width) * 0.00390625F), (double) ((float) (textureY + 0) * 0.00390625F)).endVertex();
bufferbuilder.pos((double) (x + 0), (double) (y + 0), (double) 0).tex((double) ((float) (textureX + 0) * 0.00390625F), (double) ((float) (textureY + 0) * 0.00390625F)).endVertex();
tessellator.draw();
}
}
|
[
"alex.rowlands@cox.net"
] |
alex.rowlands@cox.net
|
e0fa865ac87b48c8c849bc89f19f80f20b1debce
|
f18b14a5968f36825d233f3b91377fcd08c9dc92
|
/varClasseInstancia/varClasseInstancia.java
|
da5734a476e267bbe6827394653a6f4bed6ab03f
|
[] |
no_license
|
lfbessegato/Estudos-Java-Boson
|
e35058a2b68b6755221532fcae1e562f4ffa0b6f
|
c37e21ce2a8ec10b4b812bd9cea6d5fd1f58dfa7
|
refs/heads/master
| 2020-08-07T02:03:18.544807
| 2019-12-22T17:30:04
| 2019-12-22T17:30:04
| 213,252,529
| 1
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 716
|
java
|
package varClasseInstancia;
import java.util.Scanner;
public class varClasseInstancia {
public static void main(String[] args) {
String time;
String selecao;
Futebol torcida = new Futebol();
Scanner texto = new Scanner(System.in);
System.out.println("Para qual time você torce?: ");
time = texto.nextLine();
System.out.println("Para qual seleção você torce?: ");
selecao = texto.nextLine();
torcida.setTime(time);
torcida.setSelecao(selecao);
torcida.mostraTime();
torcida.mostraSelecao();
Futebol torcida2 = new Futebol();
torcida2.mostraTime();
torcida2.mostraSelecao();
torcida2.setSelecao("Japonesa");
torcida.mostraSelecao();
texto.close();
}
}
|
[
"lfrbessegato@gmail.com"
] |
lfrbessegato@gmail.com
|
8f4b269a8812e78d852636405ee25e000cd85197
|
e48c359567278e88fba211ee68af5e80b4c7abd7
|
/app/src/main/java/com/example/awesomefat/tictactoe/MainActivity.java
|
bffa3f9596c47cd3a291c0ed0068a56dfc673f03
|
[] |
no_license
|
mlitman/TicTacToe
|
d565aa33de95ef8a8b36adf7e782d716f10a2a8b
|
d6be6357ab2bca153e16fc1b2f20d637701568c9
|
refs/heads/master
| 2020-04-03T07:03:43.775652
| 2018-11-18T17:34:15
| 2018-11-18T17:34:15
| 155,092,393
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,915
|
java
|
package com.example.awesomefat.tictactoe;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity
{
private String currentMove = "X";
private TextView isWinnerTV;
private Button r0c0,r0c1,r0c2,r1c0,r1c1,r1c2,r2c0,r2c1,r2c2;
private TTButtonCollection row0, row1, row2, col0, col1, col2, dia0, dia1;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.isWinnerTV = (TextView)this.findViewById(R.id.isWinnerTV);
this.isWinnerTV.setText("");
this.r0c0 = this.findViewById(R.id.r0c0);
this.r0c1 = this.findViewById(R.id.r0c1);
this.r0c2 = this.findViewById(R.id.r0c2);
this.r1c0 = this.findViewById(R.id.r1c0);
this.r1c1 = this.findViewById(R.id.r1c1);
this.r1c2 = this.findViewById(R.id.r1c2);
this.r2c0 = this.findViewById(R.id.r2c0);
this.r2c1 = this.findViewById(R.id.r2c1);
this.r2c2 = this.findViewById(R.id.r2c2);
this.row0 = new TTButtonCollection(this.r0c0, this.r0c1, this.r0c2);
this.row1 = new TTButtonCollection(this.r1c0, this.r1c1, this.r1c2);
this.row2 = new TTButtonCollection(this.r2c0, this.r2c1, this.r2c2);
this.col0 = new TTButtonCollection(this.r0c0, this.r1c0, this.r2c0);
this.col1 = new TTButtonCollection(this.r0c1, this.r1c1, this.r2c1);
this.col2 = new TTButtonCollection(this.r0c2, this.r1c2, this.r2c2);
this.dia0 = new TTButtonCollection(this.r0c0, this.r1c1, this.r2c2);
this.dia1 = new TTButtonCollection(this.r0c2, this.r1c1, this.r2c0);
}
private boolean isWinner()
{
return row0.isWinner() || row1.isWinner() || row2.isWinner() || col0.isWinner() || col1.isWinner() ||
col2.isWinner() || dia0.isWinner() || dia1.isWinner();
}
public void onButtonClicked(View v)
{
Button b = (Button)v;
if(b.getText().toString().equals("___"))
{
b.setText(currentMove);
if(this.isWinner())
{
this.isWinnerTV.setText(this.currentMove + " is the Winner!");
}
if(currentMove.equals("X"))
{
currentMove = "O";
}
else
{
currentMove = "X";
}
}
}
public void onScrollViewExampleButtonClicked(View v)
{
Intent i = new Intent(this, ScrollViewExample.class);
this.startActivity(i);
}
public void onTowersOfHanoiButtonClicked(View v)
{
Intent i = new Intent(this, TowersOfHanoi.class);
this.startActivity(i);
}
}
|
[
"awesomefat@gmail.com"
] |
awesomefat@gmail.com
|
566e4dae1484b6419c6498886ed42fc399079b87
|
07c7e608b2f57f973eff5ce0e0497a549092bb33
|
/app/src/main/java/org/nem/nac/datamodel/mappers/AccountMapper.java
|
a32323a9771180b93f3698ffd32996d0b4e8bf1f
|
[] |
no_license
|
ammogcoder/NEMAndroidApp
|
c25c7f8228ff4542f9af87db5cceaa9975875d9b
|
9044851fb5b9e96e976d7fabd804b3c4cfeab756
|
refs/heads/master
| 2020-03-26T05:25:31.479429
| 2019-04-24T07:41:28
| 2019-04-24T07:41:28
| 144,556,492
| 0
| 0
| null | 2018-08-13T09:17:10
| 2018-08-13T09:17:10
| null |
UTF-8
|
Java
| false
| false
| 1,534
|
java
|
package org.nem.nac.datamodel.mappers;
import android.support.annotation.Nullable;
import org.nem.nac.common.enums.AccountType;
import org.nem.nac.datamodel.entities.AccountEntity;
import org.nem.nac.models.EncryptedNacPrivateKey;
import org.nem.nac.models.NacPublicKey;
import org.nem.nac.models.account.Account;
import org.nem.nac.models.account.PublicAccountData;
import org.nem.nac.models.primitives.AddressValue;
public final class AccountMapper {
@Nullable
public static Account toModel(AccountEntity src) {
if (null == src) {
return null;
}
final NacPublicKey publicKey = new NacPublicKey(src.publicKey);
final AddressValue address = new AddressValue(src.address);
final PublicAccountData pubData = new PublicAccountData(publicKey, address);
final Account dst = new Account(pubData);
dst.id = (src._id != null) ? src._id : 0L;
dst.name = src.name;
dst.privateKey = new EncryptedNacPrivateKey(src.privateKey);
dst.type = AccountType.fromTypeId(src.type);
dst.sortIndex = src.sortIndex;
return dst;
}
@Nullable
public static AccountEntity toEntity(Account src) {
if (null == src) {
return null;
}
final AccountEntity dst = new AccountEntity();
dst._id = (src.id != 0) ? src.id : null;
dst.name = src.name;
dst.privateKey = src.privateKey.getRaw();
dst.publicKey = src.publicData.publicKey.toHexStr();
dst.address = src.publicData.address.getRaw();
dst.type = src.type.id;
dst.sortIndex = src.sortIndex;
return dst;
}
}
|
[
"gimre@127.0.0.1"
] |
gimre@127.0.0.1
|
97c54fbebdb0ec43c1fd8d421865cd9db0375706
|
c8c949b3710fbb4b983d03697ec9173a0ad3f79f
|
/src/DP/MaximumProductSubarray.java
|
17d6093b5812adb51917239c67052ec079da9423
|
[] |
no_license
|
mxx626/myleet
|
ae4409dec30d81eaaef26518cdf52a75fd3810bc
|
5da424b2f09342947ba6a9fffb1cca31b7101cf0
|
refs/heads/master
| 2020-03-22T15:11:07.145406
| 2018-07-09T05:12:28
| 2018-07-09T05:12:28
| 140,234,151
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,023
|
java
|
package DP;
// DP
public class MaximumProductSubarray {
/**
* Given an integer array nums, find the contiguous subarray within an array
* (containing at least one number) which has the largest product.
Example 1:
Input: [2,3,-2,4]
Output: 6
Explanation: [2,3] has the largest product 6.
Example 2:
Input: [-2,0,-1]
Output: 0
Explanation: The result cannot be 2, because [-2,-1] is not a subarray.
* @param nums
* @return
*/
public int maxProduct(int[] nums) {
if (nums==null || nums.length==0) return 0;
if (nums.length==1) return nums[0];
int max = nums[0], min = nums[0];
int res = max;
for (int i=1; i<nums.length; ++i){
int tmp = max;
max = Math.max(max*nums[i], Math.max(min*nums[i], nums[i]));
min = Math.min(min*nums[i], Math.min(tmp*nums[i], nums[i]));
res = Math.max(res, max);
}
return res;
}
}
|
[
"mxx626@outlook.com"
] |
mxx626@outlook.com
|
f18573400e2b17eaaa9a97d1fc1f8c0f887e4c33
|
bbfd3058f560ee3d440a78bfc73763f34371be33
|
/src/main/java/com/kunyao/assistant/core/entity/PageInfo.java
|
ef1f398fbbd8b5e9d0b532db5513db0d6002a209
|
[] |
no_license
|
xiaoniao/temp
|
34ff1a3670699aca679dc3ab1d9f1979c26eb15b
|
1bb437c2a2b2b03cbd6b74190bff9b05de57ea29
|
refs/heads/master
| 2021-04-26T22:27:52.144518
| 2018-03-06T15:15:52
| 2018-03-06T15:15:52
| 124,095,885
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,930
|
java
|
package com.kunyao.assistant.core.entity;
import java.io.Serializable;
/**
* 页码实体,只包含分页信息
*
* @author GeNing
* @since 2016.07.29
*
*/
public class PageInfo implements Serializable {
/**
*
*/
private static final long serialVersionUID = 5741003088887718458L;
private Integer allRow; // 总记录数
private Integer totalPage; // 总页数
private Integer currentPage; // 当前页
private Integer pageSize; // 每页记录数
public PageInfo() {}
public PageInfo(Integer allRow, Integer pageSize) {
this.allRow = allRow;
this.totalPage = countTotalPage(pageSize, allRow);
this.pageSize = pageSize;
}
/**
* 计算总页数,静态方法,供外部直接通过类名调用 pageSize 每页记录数 allRow 总记录数
* @return 总页数
*/
public static int countTotalPage(final int pageSize, final int allRow) {
int totalPage = allRow % pageSize == 0 ? allRow / pageSize : allRow
/ pageSize + 1;
return totalPage;
}
/**
* 计算当前页第一条元素的下标
* pageSize 每页记录数 currentPage 当前第几页
* @return 当前页开始记录号
*/
public static int countOffset(final int pageSize, final int currentPage) {
final int offset = pageSize * (currentPage - 1);
return offset;
}
public Integer getAllRow() {
return allRow;
}
public void setAllRow(Integer allRow) {
this.allRow = allRow;
}
public Integer getTotalPage() {
return totalPage;
}
public void setTotalPage(Integer totalPage) {
this.totalPage = totalPage;
}
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
}
|
[
"401111207@qq.com"
] |
401111207@qq.com
|
e380b9a12a9d812da6b3f5824b87a2d8fe3ae2e6
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project63/src/test/java/org/gradle/test/performance63_2/Test63_139.java
|
77da84db2f3f9fa00941e3b9946f6b0506daef6d
|
[] |
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
| 292
|
java
|
package org.gradle.test.performance63_2;
import static org.junit.Assert.*;
public class Test63_139 {
private final Production63_139 production = new Production63_139("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
7ad8bc17abffc3c81892160794388c1ba6f09d20
|
732182a102a07211f7c1106a1b8f409323e607e0
|
/gsd/src/lx/gs/event/ReceiveFlowerEvent.java
|
cbc1b3f086fe8f4785633cace22af22f8ff60b86
|
[] |
no_license
|
BanyLee/QYZ_Server
|
a67df7e7b4ec021d0aaa41cfc7f3bd8c7f1af3da
|
0eeb0eb70e9e9a1a06306ba4f08267af142957de
|
refs/heads/master
| 2021-09-13T22:32:27.563172
| 2018-05-05T09:20:55
| 2018-05-05T09:20:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 284
|
java
|
package lx.gs.event;
/**
* @author Jin Shuai
*/
public class ReceiveFlowerEvent extends AbstractEvent{
public final int currVal;
public ReceiveFlowerEvent(long roleId, int currVal) {
super(roleId, EventType.RECEIVE_FLOWER);
this.currVal = currVal;
}
}
|
[
"hadowhadow@gmail.com"
] |
hadowhadow@gmail.com
|
10ac84a101a8fc5b0cc0639d1cc1a6e7b90ea983
|
f6f43bd4462876c790ed5f0062a8881791a0ba92
|
/src/main/java/cw09/enum_example/Main.java
|
decf30d5b9a79815d030d05dce569b9e0b97fb2d
|
[] |
no_license
|
Eugene1992/java-essential-10
|
d48c8be24648044f6fec999c97dc6a4df853ab00
|
2e6168800d6e08b2803c0adbc7d20f342008413c
|
refs/heads/master
| 2021-05-03T23:49:52.107901
| 2016-11-13T10:36:15
| 2016-11-13T10:36:15
| 71,812,878
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,116
|
java
|
package cw09.enum_example;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
final int count = 10_000;
ListTest arrayListTest = new ListTest(new ArrayList<>());
long addToStartAL = arrayListTest.add(InsertType.START, "Hello", count);
System.out.println("add to AL start - " + addToStartAL);
long addToMiddleAL = arrayListTest.add(InsertType.MIDDLE, "Hello", count);
System.out.println("add to AL start - " + addToMiddleAL);
long addToEndAL = arrayListTest.add(InsertType.END, "Hello", count);
System.out.println("add to AL start - " + addToEndAL);
InsertType[] values = InsertType.values();
for (InsertType value : values) {
System.out.println(value);
}
InsertType type = InsertType.END;
String typeName = type.name();
System.out.println(typeName);
int typeOrdinal = type.ordinal();
System.out.println(typeOrdinal);
switch (type) {
case END:
System.out.println("End");
}
}
}
|
[
"deyneko55@gmail.com"
] |
deyneko55@gmail.com
|
7ab31a69f86b0dc6c8c6afb25ebc6afcc3a2ee3c
|
404a189c16767191ffb172572d36eca7db5571fb
|
/service/build/classes/gov/georgia/dhr/dfcs/sacwis/service/resource/.svn/text-base/DeleteResourceHistory.java.svn-base
|
636d3a9877a991027dee5869e290eeae07b72b89
|
[] |
no_license
|
tayduivn/training
|
648a8e9e91194156fb4ffb631749e6d4bf2d0590
|
95078fb2c7e21bf2bba31e2bbd5e404ac428da2f
|
refs/heads/master
| 2021-06-13T16:20:41.293097
| 2017-05-08T21:37:59
| 2017-05-08T21:37:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 338
|
package gov.georgia.dhr.dfcs.sacwis.service.resource;
import gov.georgia.dhr.dfcs.sacwis.structs.input.CFAD14SI;
import gov.georgia.dhr.dfcs.sacwis.structs.output.CFAD14SO;
public interface DeleteResourceHistory {
/**
*
* @param cfad14si
* @return
*/
CFAD14SO deleteResourceHistory(CFAD14SI cfad14si);
}
|
[
"lgeddam@gmail.com"
] |
lgeddam@gmail.com
|
|
94c38dfe43945abc068f1d269d956f974bc34a76
|
aad27df856f5de5f0cdd4e03e7aee96f4653589a
|
/ManejoClasesPaquetesEjemplos/EjerciciosClaseTres02/src/paqueteuno/Pelicula.java
|
57b36d1bcc2c832448070155e00e3de0ef6e8b61
|
[] |
no_license
|
ProgOrientadaObjetos-P-AA2021/clase03-FabianMontoya9975
|
faacfcb73162f301caf6473b0328576eb8c703ee
|
aa1a2c374c9015d7cf81bca8ac85120dea4493ae
|
refs/heads/main
| 2023-04-15T16:17:12.969407
| 2021-04-22T03:45:25
| 2021-04-22T03:45:25
| 360,302,654
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 288
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package paqueteuno;
/**
*
* @author reroes
*/
public class Pelicula {
protected int version;
}
|
[
"66690702+github-classroom[bot]@users.noreply.github.com"
] |
66690702+github-classroom[bot]@users.noreply.github.com
|
66425fa3c3749a4f980e19dc368e3fdfe41223f0
|
808b985690efbca4cd4db5b135bb377fe9c65b88
|
/tbs_core_45016_20191122114850_nolog_fs_obfs/assets/webkit/unZipCode/miniqb_dex.src/org/chromium/components/web_contents_delegate_android/ColorPickerAdvanced.java
|
5974e090dcd84ded815463c9249c4a7304d280d8
|
[] |
no_license
|
polarrwl/WebviewCoreAnalysis
|
183e12b76df3920c5afc65255fd30128bb96246b
|
e21a294bf640578e973b3fac604b56e017a94060
|
refs/heads/master
| 2022-03-16T17:34:15.625623
| 2019-12-17T03:16:51
| 2019-12-17T03:16:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,506
|
java
|
package org.chromium.components.web_contents_delegate_android;
import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
public class ColorPickerAdvanced
extends LinearLayout
implements SeekBar.OnSeekBarChangeListener
{
private int jdField_a_of_type_Int;
ColorPickerAdvancedComponent jdField_a_of_type_OrgChromiumComponentsWeb_contents_delegate_androidColorPickerAdvancedComponent;
private OnColorChangedListener jdField_a_of_type_OrgChromiumComponentsWeb_contents_delegate_androidOnColorChangedListener;
private final float[] jdField_a_of_type_ArrayOfFloat = new float[3];
ColorPickerAdvancedComponent b;
ColorPickerAdvancedComponent c;
public ColorPickerAdvanced(Context paramContext)
{
super(paramContext);
a();
}
public ColorPickerAdvanced(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
a();
}
public ColorPickerAdvanced(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
a();
}
private void a()
{
setOrientation(1);
this.jdField_a_of_type_OrgChromiumComponentsWeb_contents_delegate_androidColorPickerAdvancedComponent = a(R.string.color_picker_hue, 360, this);
this.b = a(R.string.color_picker_saturation, 100, this);
this.c = a(R.string.color_picker_value, 100, this);
f();
}
private void b()
{
OnColorChangedListener localOnColorChangedListener = this.jdField_a_of_type_OrgChromiumComponentsWeb_contents_delegate_androidOnColorChangedListener;
if (localOnColorChangedListener != null) {
localOnColorChangedListener.onColorChanged(a());
}
}
private void c()
{
float[] arrayOfFloat = new float[3];
Object localObject = this.jdField_a_of_type_ArrayOfFloat;
arrayOfFloat[1] = localObject[1];
arrayOfFloat[2] = localObject[2];
localObject = new int[7];
int i = 0;
while (i < 7)
{
arrayOfFloat[0] = (i * 60.0F);
localObject[i] = Color.HSVToColor(arrayOfFloat);
i += 1;
}
this.jdField_a_of_type_OrgChromiumComponentsWeb_contents_delegate_androidColorPickerAdvancedComponent.a((int[])localObject);
}
private void d()
{
float[] arrayOfFloat1 = new float[3];
float[] arrayOfFloat2 = this.jdField_a_of_type_ArrayOfFloat;
arrayOfFloat1[0] = arrayOfFloat2[0];
arrayOfFloat1[1] = 0.0F;
arrayOfFloat1[2] = arrayOfFloat2[2];
int i = Color.HSVToColor(arrayOfFloat1);
arrayOfFloat1[1] = 1.0F;
int j = Color.HSVToColor(arrayOfFloat1);
this.b.a(new int[] { i, j });
}
private void e()
{
float[] arrayOfFloat1 = new float[3];
float[] arrayOfFloat2 = this.jdField_a_of_type_ArrayOfFloat;
arrayOfFloat1[0] = arrayOfFloat2[0];
arrayOfFloat1[1] = arrayOfFloat2[1];
arrayOfFloat1[2] = 0.0F;
int i = Color.HSVToColor(arrayOfFloat1);
arrayOfFloat1[2] = 1.0F;
int j = Color.HSVToColor(arrayOfFloat1);
this.c.a(new int[] { i, j });
}
private void f()
{
int i = Math.max(Math.min(Math.round(this.jdField_a_of_type_ArrayOfFloat[1] * 100.0F), 100), 0);
int j = Math.max(Math.min(Math.round(this.jdField_a_of_type_ArrayOfFloat[2] * 100.0F), 100), 0);
this.jdField_a_of_type_OrgChromiumComponentsWeb_contents_delegate_androidColorPickerAdvancedComponent.a(this.jdField_a_of_type_ArrayOfFloat[0]);
this.b.a(i);
this.c.a(j);
c();
d();
e();
}
public int a()
{
return this.jdField_a_of_type_Int;
}
public ColorPickerAdvancedComponent a(int paramInt1, int paramInt2, SeekBar.OnSeekBarChangeListener paramOnSeekBarChangeListener)
{
View localView = ((LayoutInflater)getContext().getSystemService("layout_inflater")).inflate(R.layout.color_picker_advanced_component, null);
addView(localView);
return new ColorPickerAdvancedComponent(localView, paramInt1, paramInt2, paramOnSeekBarChangeListener);
}
public void a(int paramInt)
{
this.jdField_a_of_type_Int = paramInt;
Color.colorToHSV(this.jdField_a_of_type_Int, this.jdField_a_of_type_ArrayOfFloat);
f();
}
public void a(OnColorChangedListener paramOnColorChangedListener)
{
this.jdField_a_of_type_OrgChromiumComponentsWeb_contents_delegate_androidOnColorChangedListener = paramOnColorChangedListener;
}
public void onProgressChanged(SeekBar paramSeekBar, int paramInt, boolean paramBoolean)
{
if (paramBoolean)
{
this.jdField_a_of_type_ArrayOfFloat[0] = this.jdField_a_of_type_OrgChromiumComponentsWeb_contents_delegate_androidColorPickerAdvancedComponent.a();
this.jdField_a_of_type_ArrayOfFloat[1] = (this.b.a() / 100.0F);
this.jdField_a_of_type_ArrayOfFloat[2] = (this.c.a() / 100.0F);
this.jdField_a_of_type_Int = Color.HSVToColor(this.jdField_a_of_type_ArrayOfFloat);
c();
d();
e();
b();
}
}
public void onStartTrackingTouch(SeekBar paramSeekBar) {}
public void onStopTrackingTouch(SeekBar paramSeekBar) {}
}
/* Location: C:\Users\Administrator\Desktop\学习资料\dex2jar\dex2jar-2.0\classes-dex2jar.jar!\org\chromium\components\web_contents_delegate_android\ColorPickerAdvanced.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1542951820@qq.com"
] |
1542951820@qq.com
|
dc44b9d2a7a7e189a8536834922f64961260fe96
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/median/2c1556672751734adf9a561fbf88767c32224fca14a81e9d9c719f18d0b21765038acc16ecd8377f74d4f43e8c844538161d869605e3516cf797d0a6a59f1f8e/000/mutations/253/median_2c155667_000.java
|
a162939e931c85548a20a7364bbd6fc7f4673edf
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,486
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class median_2c155667_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
median_2c155667_000 mainClass = new median_2c155667_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj i1 = new IntObj (), i2 = new IntObj (), i3 = new IntObj ();
output +=
(String.format ("Please enter 3 numbers separated by spaces > "));
i1.value = scanner.nextInt ();
i2.value = scanner.nextInt ();
i3.value = scanner.nextInt ();
if ((i1.value >= i2.value && i1.value <= i3.value)
|| (i1.value == i2.value && i1.value == i3.value)
|| (i1.value > i2.value && i1.value < i3.value)) {
output += (String.format ("%d is the median\n", i1.value));
} else if (((((i1.value) >= (i2.value)) && ((i1.value) <= (i3.value))) || (((i1.value) == (i2.value)) && ((i1.value) == (i3.value))) && i2.value <= i3.value)
|| (i2.value == i1.value && i2.value == i3.value)
|| (i2.value > i1.value && i2.value < i3.value)) {
output += (String.format ("%d is the median\n", i2.value));
} else if ((i3.value >= i2.value && i3.value <= i1.value)
|| (i3.value == i2.value && i3.value == i1.value)
|| (i3.value > i2.value && i3.value < i1.value)) {
output += (String.format ("%d is the median\n", i3.value));
}
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
ae04f4225c4bfbf5982889722f431b34004a8952
|
2b0135ebf35db86564723fb03b96e242537a2530
|
/src/test/java/se/lexicon/erik/staff_manager/data/ClientDaoTest.java
|
d1b6b44cd8cc98cc12e7eaadfe7535cbe3c61b18
|
[] |
no_license
|
ErikSvensson76/staff-manager
|
e890586e1b4c66ad21b386e0291cfc72a75aab33
|
7f6855a15bb70f3b1dd9a02611b9d5254b7c1bae
|
refs/heads/master
| 2020-04-16T18:24:22.004068
| 2019-01-15T09:02:28
| 2019-01-15T09:02:28
| 165,818,335
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,437
|
java
|
package se.lexicon.erik.staff_manager.data;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import se.lexicon.erik.staff_manager.data_access.ClientDao;
import se.lexicon.erik.staff_manager.data_access.ClientDaoListImpl;
import se.lexicon.erik.staff_manager.models.Client;
import static org.junit.Assert.*;
public class ClientDaoTest {
private static final List<Client> allClients;
private static final Client testClient;
private ClientDao underTest;
private int clientId;
static {
allClients = new ArrayList<>();
testClient = new Client("Test Testsson", "test@test.com", "Test company");
allClients.add(testClient);
allClients.add(new Client("Test1","test1@test.com", "Test company"));
allClients.add(new Client("Test2","test2@test.com", "Test company"));
}
@Before
public void init() {
underTest = ClientDaoListImpl.get();
clientId = testClient.getId();
allClients.forEach(underTest::save);
}
@After
public void tearDown() {
allClients.forEach(underTest::remove);
}
@Test
public void test_save_with_duplicate_email_return_false() {
Client client = new Client("Test", "test@test.com", "Test company");
assertFalse(underTest.save(client));
}
@Test
public void test_findById_return_optional_of_testClient() {
Optional<Client> expected = Optional.of(testClient);
assertEquals(expected, underTest.findById(clientId));
}
@Test
public void test_findByName_return_list_of_objects_containing_name() {
String searchName = "Test Testsson";
List<Client> result = underTest.findByName(searchName);
assertTrue(result.stream().allMatch(c->c.getName().contains(searchName)));
}
@Test
public void test_findByCompany_return_list_of_objects_containing_searchName() {
String searchName = "Test company";
List<Client> result = underTest.findByCompany(searchName);
assertTrue(result.stream().allMatch(c->c.getCompany().contains(searchName)));
}
@Test
public void test_findAllClientsByAssigned() {
testClient.assign(); //Making assign true
assertTrue(underTest.findAllClientsByAssign(true).stream()
.allMatch(Client::isAssigned));
assertFalse(underTest.findAllClientsByAssign(false).stream()
.allMatch(Client::isAssigned));
}
}
|
[
"eosvensson@gmail.com"
] |
eosvensson@gmail.com
|
a049946be8f6fcb4dda3513d4e05438869769064
|
853b0bec5bc9b5499925336c1f6959ae9ea4dccc
|
/wxzj2/src/com/yaltec/wxzj2/comon/data/service/AssignmentDataService.java
|
ade4843a66cb7d08dc199d40842d1a1315552f6f
|
[] |
no_license
|
QuietClickCode/wxzj2
|
598e69af218da5218e2befcc948f353027b34447
|
c08061f7bbfaf616b32846e7ac1a171efcd0b33b
|
refs/heads/master
| 2020-06-28T20:59:48.715250
| 2019-08-03T06:11:38
| 2019-08-03T06:11:38
| 200,339,358
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,433
|
java
|
package com.yaltec.wxzj2.comon.data.service;
import java.util.LinkedHashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.yaltec.wxzj2.biz.system.dao.AssignmentDao;
import com.yaltec.wxzj2.biz.system.entity.Assignment;
import com.yaltec.wxzj2.comon.data.DataServie;
/**
* <p>ClassName: AssignmentDataService</p>
* <p>Description: 归集中心数据服务类(这里用一句话描述这个类的作用)</p>
* <p>Company: YALTEC</p>
* @author jiangyong
* @date 2016-7-29 下午03:39:14
*/
public class AssignmentDataService extends DataServie {
/**
* 缓存唯一标识
*/
public static final String KEY = "assignment";
/**
* 备注信息
*/
public static final String REMARK = "归集中心数据缓存";
@Autowired
private AssignmentDao assignmentDao;
public AssignmentDataService() {
// 调用父类构造方法
super(KEY, REMARK);
}
@Override
public LinkedHashMap<String, String> init() {
// 定义有序MAP集合
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
map.put("", "请选择");
// 查询数据
List<Assignment> list = assignmentDao.findAll(new Assignment());
// 设置缓存数据条数
super.setSize(list.size());
for (Assignment assignment : list) {
map.put(assignment.getBm(), assignment.getMc());
}
return map;
}
}
|
[
"2572417548@qq.com"
] |
2572417548@qq.com
|
17702f914eeb4a7def23843f272110292090ee86
|
6ef4869c6bc2ce2e77b422242e347819f6a5f665
|
/devices/google/Pixel 2/29/QPP6.190730.005/src/core-oj/java/sql/SQLNonTransientConnectionException.java
|
b3d42488550f531c9ed04be51d7ecb4532ea0ce2
|
[] |
no_license
|
hacking-android/frameworks
|
40e40396bb2edacccabf8a920fa5722b021fb060
|
943f0b4d46f72532a419fb6171e40d1c93984c8e
|
refs/heads/master
| 2020-07-03T19:32:28.876703
| 2019-08-13T03:31:06
| 2019-08-13T03:31:06
| 202,017,534
| 2
| 0
| null | 2019-08-13T03:33:19
| 2019-08-12T22:19:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,190
|
java
|
/*
* Decompiled with CFR 0.145.
*/
package java.sql;
import java.sql.SQLNonTransientException;
public class SQLNonTransientConnectionException
extends SQLNonTransientException {
private static final long serialVersionUID = -5852318857474782892L;
public SQLNonTransientConnectionException() {
}
public SQLNonTransientConnectionException(String string) {
super(string);
}
public SQLNonTransientConnectionException(String string, String string2) {
super(string, string2);
}
public SQLNonTransientConnectionException(String string, String string2, int n) {
super(string, string2, n);
}
public SQLNonTransientConnectionException(String string, String string2, int n, Throwable throwable) {
super(string, string2, n, throwable);
}
public SQLNonTransientConnectionException(String string, String string2, Throwable throwable) {
super(string, string2, throwable);
}
public SQLNonTransientConnectionException(String string, Throwable throwable) {
super(string, throwable);
}
public SQLNonTransientConnectionException(Throwable throwable) {
super(throwable);
}
}
|
[
"me@paulo.costa.nom.br"
] |
me@paulo.costa.nom.br
|
bf9fa77c3d164fb4935f0ebce10d1a72453292c8
|
ea583eb41905259d1d979a23c6ede50b4eaa4a2b
|
/src/main/java/bieebox/resource/importer/service/mapper/PurchaseOrderLinesMapper.java
|
96863ae8c088f626dd8a2f1a3e634c93f4758e59
|
[] |
no_license
|
thetlwinoo/resource-importer
|
cbc459f5da8330afb103b6d1787ac1e59f65deb0
|
95641ee0f976c17e4c49d24493b5905199806c11
|
refs/heads/master
| 2020-05-02T11:44:20.587886
| 2019-03-27T07:10:53
| 2019-03-27T07:10:53
| 177,937,899
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,486
|
java
|
package bieebox.resource.importer.service.mapper;
import bieebox.resource.importer.domain.*;
import bieebox.resource.importer.service.dto.PurchaseOrderLinesDTO;
import org.mapstruct.*;
/**
* Mapper for the entity PurchaseOrderLines and its DTO PurchaseOrderLinesDTO.
*/
@Mapper(componentModel = "spring", uses = {StockItemsMapper.class, PackageTypesMapper.class, PurchaseOrdersMapper.class})
public interface PurchaseOrderLinesMapper extends EntityMapper<PurchaseOrderLinesDTO, PurchaseOrderLines> {
@Mapping(source = "stockItem.id", target = "stockItemId")
@Mapping(source = "stockItem.stockItemName", target = "stockItemStockItemName")
@Mapping(source = "packageType.id", target = "packageTypeId")
@Mapping(source = "packageType.packageTypeName", target = "packageTypePackageTypeName")
@Mapping(source = "purchaseOrder.id", target = "purchaseOrderId")
PurchaseOrderLinesDTO toDto(PurchaseOrderLines purchaseOrderLines);
@Mapping(source = "stockItemId", target = "stockItem")
@Mapping(source = "packageTypeId", target = "packageType")
@Mapping(source = "purchaseOrderId", target = "purchaseOrder")
PurchaseOrderLines toEntity(PurchaseOrderLinesDTO purchaseOrderLinesDTO);
default PurchaseOrderLines fromId(Long id) {
if (id == null) {
return null;
}
PurchaseOrderLines purchaseOrderLines = new PurchaseOrderLines();
purchaseOrderLines.setId(id);
return purchaseOrderLines;
}
}
|
[
"thetlwinoo85@yahoo.com"
] |
thetlwinoo85@yahoo.com
|
952f5226d7f01ac45a036d0eb019a21f102cfaa7
|
4807315480333baf316e48eaa4080ee9938672be
|
/game-base/src/main/java/evanq/game/module/item/IMetaReader.java
|
a8916b37de5d9470a5da2f53e65939eb4e8f3570
|
[
"MIT"
] |
permissive
|
lanen/mint4j
|
fb4491ea51b739687df75d05e2797cf25f26b476
|
da73df5fcc30b636e49f29c6ff911a5851908738
|
refs/heads/master
| 2021-01-10T19:17:21.852151
| 2014-04-10T09:17:23
| 2014-04-10T09:17:23
| 14,675,613
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 162
|
java
|
package evanq.game.module.item;
/**
*
* 元数据流
*
* @author Evan cppmain@gmail.com
*
*/
public interface IMetaReader {
public IMeta readMeta();
}
|
[
"cppmain@gmail.com"
] |
cppmain@gmail.com
|
2e31a1f14f88cfda52ce1750d5aecad40260d364
|
07bdea58c5423674e201dc45f877c9ec8de8d969
|
/freeveggie-service/freeveggie-service-impl/src/test/java/org/mdubois/freeveggie/service/matcher/GardenCommentBOMatcher.java
|
e2f5b695e9d37a403bb430e6852704d4026ee51d
|
[] |
no_license
|
baloo2401/freeveggie
|
29e82dad4613e29d2d95014869b022fd44172f8d
|
da06a86a44919b170d22c60a2b5f854b43bfdbb2
|
refs/heads/master
| 2020-04-06T04:41:43.807054
| 2014-11-04T04:28:05
| 2014-11-04T04:28:05
| 82,561,766
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,436
|
java
|
package org.mdubois.freeveggie.service.matcher;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import org.mdubois.freeveggie.bo.GardenCommentBO;
/**
*
* @author Mickael Dubois
*/
public class GardenCommentBOMatcher extends BusinessObjectMatcher<GardenCommentBO> {
private static final String NOTES_ARE_NOTE_MATHING = "Note's are note mathing";
private static final String COMMENTS_ARE_NOTE_MATHING = "Comment's are note mathing";
private static final String CREATIONS_ARE_NOTE_MATHING = "Creation date's are note mathing";
private static final String GARDENS_ARE_NOTE_MATHING = "Garden's are note mathing";
private static final String STATUS_ARE_NOTE_MATHING = "Status's are note mathing";
private static final String WRITERS_ARE_NOTE_MATHING = "Writer's are note mathing";
private GardenCommentBO gardenCommentBO;
public GardenCommentBOMatcher(GardenCommentBO pGardenCommentBO) {
super(pGardenCommentBO);
this.gardenCommentBO = pGardenCommentBO;
}
@Override
public boolean matches(Object item) {
if (super.matches(item)) {
if (item instanceof GardenCommentBO) {
GardenCommentBO obj = (GardenCommentBO) item;
if (testComment(obj)) {
if (testGarden(obj)) {
if (testWriter(obj)) {
if (testCreationDate(obj)) {
if (testStatus(obj)) {
if (testNote(obj)) {
return true;
}
errorDescription = NOTES_ARE_NOTE_MATHING;
return false;
}
errorDescription = STATUS_ARE_NOTE_MATHING;
return false;
}
errorDescription = CREATIONS_ARE_NOTE_MATHING;
return false;
}
errorDescription = WRITERS_ARE_NOTE_MATHING;
return false;
}
errorDescription = GARDENS_ARE_NOTE_MATHING;
return false;
}
errorDescription = COMMENTS_ARE_NOTE_MATHING;
return false;
}
return false;
}
return false;
}
private boolean testComment(GardenCommentBO obj) {
if (!StringUtils.isEmpty(gardenCommentBO.getComment()) && !StringUtils.isEmpty(obj.getComment())) {
if (gardenCommentBO.getComment().trim().equals(obj.getComment().trim())) {
return true;
}
} else if (StringUtils.isEmpty(gardenCommentBO.getComment()) && StringUtils.isEmpty(obj.getComment())) {
return true;
}
return false;
}
private boolean testCreationDate(GardenCommentBO pGardenCommentBO) {
if (this.gardenCommentBO.getCreationDate() != null && pGardenCommentBO.getCreationDate() != null) {
return DateUtils.isSameDay(this.gardenCommentBO.getCreationDate(), pGardenCommentBO.getCreationDate());
} else if (this.gardenCommentBO.getCreationDate() == null && pGardenCommentBO.getCreationDate() == null) {
return true;
}
return false;
}
private boolean testStatus(GardenCommentBO pGardenCommentBO) {
if (this.gardenCommentBO.getStatus() != null && pGardenCommentBO.getStatus() != null) {
return this.gardenCommentBO.getStatus().equals(pGardenCommentBO.getStatus());
} else if (this.gardenCommentBO.getStatus() == null && pGardenCommentBO.getStatus() == null) {
return true;
}
return false;
}
private boolean testNote(GardenCommentBO pGardenCommentBO) {
if (this.gardenCommentBO.getNote() != null && pGardenCommentBO.getNote() != null) {
return this.gardenCommentBO.getNote().equals(pGardenCommentBO.getNote());
} else if (this.gardenCommentBO.getNote() == null && pGardenCommentBO.getNote() == null) {
return true;
}
return false;
}
private boolean testGarden(GardenCommentBO pGardenCommentBO) {
if (this.gardenCommentBO.getGarden() != null && pGardenCommentBO.getGarden() != null) {
if (this.gardenCommentBO.getGarden().getId() != null && pGardenCommentBO.getGarden().getId() != null) {
return this.gardenCommentBO.getGarden().getId().equals(pGardenCommentBO.getGarden().getId());
}
} else if (this.gardenCommentBO.getGarden() == null && pGardenCommentBO.getGarden() == null) {
return true;
}
return false;
}
private boolean testWriter(GardenCommentBO pGardenCommentBO) {
if (this.gardenCommentBO.getWriter() != null && pGardenCommentBO.getWriter() != null) {
if (this.gardenCommentBO.getWriter().getId() != null && pGardenCommentBO.getWriter().getId() != null) {
return this.gardenCommentBO.getWriter().getId().equals(pGardenCommentBO.getWriter().getId());
}
} else if (this.gardenCommentBO.getWriter() == null && pGardenCommentBO.getWriter() == null) {
return true;
}
return false;
}
}
|
[
"baloo2401@users.noreply.github.com"
] |
baloo2401@users.noreply.github.com
|
a9b92a828001ab907ee0e315a54cefe4f4243a57
|
7f7021c536b26987256cf329ed2ea0a6fcbfa493
|
/transport/src/main/java/io/netty/channel/Main.java
|
52d658baeb6053513ba9a73abf41e8bd646b7495
|
[
"BSD-3-Clause",
"Apache-2.0",
"CC-PDDC",
"LicenseRef-scancode-public-domain",
"MIT"
] |
permissive
|
lishuai2016/netty-jike-learn
|
845833cef61cc765e02a5359511da0974db88965
|
f815814a2f54994022572ea50d8d93bd19cc3684
|
refs/heads/master
| 2022-10-25T21:56:04.794998
| 2020-01-12T04:07:01
| 2020-01-12T04:07:01
| 231,862,842
| 2
| 6
|
Apache-2.0
| 2022-10-04T23:55:48
| 2020-01-05T03:37:32
|
Java
|
UTF-8
|
Java
| false
| false
| 596
|
java
|
package io.netty.channel;
/**
* @program: netty-parent
* @author: lishuai
* @create: 2020-01-07 17:25
head:131071
tail:511
*/
public class Main {
public static void main(String[] args){
System.out.println("hello netty");
int head = ChannelHandlerMask.mask(DefaultChannelPipeline.HeadContext.class);
int tail = ChannelHandlerMask.mask(DefaultChannelPipeline.TailContext.class);
System.out.println("head:"+head);
System.out.println("tail:"+tail);
System.out.println(head & (1 << 9));
System.out.println(head & (1 << 10));
}
}
|
[
"1830473670@qq.com"
] |
1830473670@qq.com
|
f602ce92f743484253aea3b90e7465b41edf95d2
|
ee1df4f152a55dfd256b490a146a24ea41345745
|
/1.4/BinaryNotesMQ/java/src/org/bn/mq/IPersistenceQueueStorage.java
|
79cc984fb415b903bb851c4bfd0f5049f3648624
|
[] |
no_license
|
ishisystems/BinaryNotes
|
a50d58f42facca077f9edb045bd5f2265c2e4710
|
1b3dfaa274fbb919ce74da332bf4ad0226bd68d1
|
refs/heads/master
| 2020-04-05T23:59:39.166498
| 2011-09-19T22:21:55
| 2011-09-19T22:21:55
| 60,371,143
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,122
|
java
|
/*
* Copyright 2006 Abdulla G. Abdurakhmanov (abdulla.abdurakhmanov@gmail.com).
*
* Licensed under the LGPL, Version 2 (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.gnu.org/copyleft/lgpl.html
*
* 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.
*
* With any your questions welcome to my e-mail
* or blog at http://abdulla-a.blogspot.com.
*/
package org.bn.mq;
import java.io.Serializable;
import java.util.List;
import org.bn.mq.impl.InMemoryQueueStorage;
/**
* Interface specification of persistence storage implementations for queue
*/
public interface IPersistenceQueueStorage<T> {
/**
* Get messages to send for consumer (awaiting list)
* @param consumer consumer instance
* @return awaiting list
*/
List< IMessage <T> > getMessagesToSend(IConsumer<T> consumer);
/**
* Persistence subscribe consumer
* @param consumer consumer instance
*/
void persistenceSubscribe(IConsumer<T> consumer) throws Exception;
/**
* Remove persistence subscription
* @param consumer consumer instance
*/
void persistenceUnsubscribe(IConsumer<T> consumer) throws Exception;
/**
* Register persistence message for all consumers subscriptions
* @param message message instance
*/
void registerPersistenceMessage(IMessage<T> message) throws Exception;
/**
* Remove registered message for specified consumer
* @param consumer consumer instance
* @param message message instance
*/
void removeDeliveredMessage(String consumerId, String messageId) throws Exception ;
/**
* Close & finalize storage
*/
void close();
}
|
[
"akira_ag@6e58b0a2-a920-0410-943a-aae568831f16"
] |
akira_ag@6e58b0a2-a920-0410-943a-aae568831f16
|
4fc4beeb4016058368526aec903090210a688f0e
|
beac80529f07a459ddd897ecd21f90bfe95b5f99
|
/app/src/main/java/cn/xsjky/android/ui/StatBarDemoActivity.java
|
32650f37eae244d04e57cf1c42eaae2d458bc736
|
[] |
no_license
|
lida812699070/Xsjky-android2
|
c570273868f467f116c025d6b4621cd2e567f677
|
b241667ca7daf3a72539f860df96ee3054d535f0
|
refs/heads/master
| 2020-04-06T04:44:04.961402
| 2017-03-11T07:27:11
| 2017-03-11T07:27:11
| 82,892,880
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 586
|
java
|
package cn.xsjky.android.ui;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import cn.xsjky.android.R;
public class StatBarDemoActivity extends AppCompatActivity {
private View mDecorView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stat_bar_demo);
mDecorView = getWindow().getDecorView();
mDecorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
getActionBar().hide();
}
}
|
[
"tony@gmail.com"
] |
tony@gmail.com
|
9c51efaf8d41a55802c3d339731ac986b1880f67
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_380/Testnull_37982.java
|
2ce520f5eba1d266508fe1db2120e37bd63d69f1
|
[] |
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
| 308
|
java
|
package org.gradle.test.performancenull_380;
import static org.junit.Assert.*;
public class Testnull_37982 {
private final Productionnull_37982 production = new Productionnull_37982("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
1d8c7e569c1c413659801b1a01d8ff6eb8155dcd
|
3568c9772fad54ffe71683de31525464642f3cf9
|
/excel1/src/main/java/eu/doppel_helix/jna/tlb/excel1/ITableStyleElements.java
|
4cb30fbee54a796bfd03245ef0cf5536f03218ed
|
[
"MIT"
] |
permissive
|
NoonRightsWarriorBehindHovering/COMTypelibraries
|
c853c41bb495031702d0ad7a4d215ab894c12bbd
|
c17acfca689305c0e23d4ff9d8ee437e0ee3d437
|
refs/heads/master
| 2023-06-21T20:52:51.519721
| 2020-03-13T22:33:48
| 2020-03-13T22:33:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,366
|
java
|
package eu.doppel_helix.jna.tlb.excel1;
import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
import com.sun.jna.platform.win32.COM.util.IDispatch;
import com.sun.jna.platform.win32.COM.util.IUnknown;
import com.sun.jna.platform.win32.COM.util.IRawDispatchHandle;
import com.sun.jna.platform.win32.Variant.VARIANT;
/**
* <p>uuid({000244A6-0001-0000-C000-000000000046})</p>
*/
@ComInterface(iid="{000244A6-0001-0000-C000-000000000046}")
public interface ITableStyleElements extends IUnknown, IRawDispatchHandle, IDispatch {
/**
* <p>id(0x94)</p>
* <p>vtableId(7)</p>
* @param RHS [out] {@code Application}
*/
@ComProperty(name = "Application", dispId = 0x94)
com.sun.jna.platform.win32.WinNT.HRESULT getApplication(VARIANT RHS);
/**
* <p>id(0x95)</p>
* <p>vtableId(8)</p>
* @param RHS [out] {@code XlCreator}
*/
@ComProperty(name = "Creator", dispId = 0x95)
com.sun.jna.platform.win32.WinNT.HRESULT getCreator(VARIANT RHS);
/**
* <p>id(0x96)</p>
* <p>vtableId(9)</p>
* @param RHS [out] {@code com.sun.jna.platform.win32.COM.util.IDispatch}
*/
@ComProperty(name = "Parent", dispId = 0x96)
com.sun.jna.platform.win32.WinNT.HRESULT getParent(VARIANT RHS);
/**
* <p>id(0x76)</p>
* <p>vtableId(10)</p>
* @param RHS [out] {@code Integer}
*/
@ComProperty(name = "Count", dispId = 0x76)
com.sun.jna.platform.win32.WinNT.HRESULT getCount(VARIANT RHS);
/**
* <p>id(0xaa)</p>
* <p>vtableId(11)</p>
* @param Index [in] {@code XlTableStyleElementType}
* @param RHS [out] {@code TableStyleElement}
*/
@ComMethod(name = "Item", dispId = 0xaa)
com.sun.jna.platform.win32.WinNT.HRESULT Item(XlTableStyleElementType Index,
VARIANT RHS);
/**
* <p>id(0x0)</p>
* <p>vtableId(12)</p>
* @param Index [in] {@code XlTableStyleElementType}
* @param RHS [out] {@code TableStyleElement}
*/
@ComProperty(name = "_Default", dispId = 0x0)
com.sun.jna.platform.win32.WinNT.HRESULT get_Default(XlTableStyleElementType Index,
VARIANT RHS);
}
|
[
"mblaesing@doppel-helix.eu"
] |
mblaesing@doppel-helix.eu
|
ed28ebc8dcd7b3388530aeed6497a65b82c2b07d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_6ee5880df002fb0b87f06ce3d55dbfea79ff3b96/TabbedBar/7_6ee5880df002fb0b87f06ce3d55dbfea79ff3b96_TabbedBar_s.java
|
f620c63cd994613de79dc305844861e8ed94a914
|
[] |
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,141
|
java
|
/*
* Copyright 2011 Uri Shaked
*
* 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.
*/
/* Automatically generated code, don't edit ! */
package org.urish.gwtit.titanium.ui;
import com.google.gwt.core.client.JavaScriptObject;
/**
* A tabbed bar is created by the method
* {@link org.urish.gwtit.titanium.ui.createtabbedbar}. the difference between
* the tabbed bar and the button bar is that the tabbed bar visually maintains a
* state (visually distinguished as a pressed or selected look).
* <p>
* Notes: For iPhone, the style constants are available in the constants defined
* in
* [Titanium.UI.iPhone.SystemButtonStyle](Titanium.UI.iPhone.SystemButtonStyle).
*
* @platforms iphone, ipad
* @since 0.8
*/
public class TabbedBar extends org.urish.gwtit.titanium.ui.View {
protected TabbedBar() {
}
/**
* @return The selected index
*/
public final native int getIndex()
/*-{
return this.index;
}-*/;
public final native void setIndex(int value)
/*-{
this.index = value;
}-*/;
/**
* @return The array of labels for the tabbed bar. each object should have
* the properties `title`, `image`, `width` and `enabled`.
*/
public final native JavaScriptObject[] getLabels()
/*-{
return this.labels;
}-*/;
public final native void setLabels(JavaScriptObject[] value)
/*-{
this.labels = value;
}-*/;
/**
* @return The style of the tabbed bar
*/
public final native int getStyle()
/*-{
return this.style;
}-*/;
public final native void setStyle(int value)
/*-{
this.style = value;
}-*/;
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d1bd915380a33daff6c6a18253af2e42965b59b0
|
b4e0e50e467ee914b514a4f612fde6acc9a82ba7
|
/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java
|
c861f37ff8dbc4eb9c3bf6a16330e174bd68d3eb
|
[
"Apache-2.0",
"CPL-1.0",
"MPL-1.0"
] |
permissive
|
tenggyut/HIndex
|
5054b13118c3540d280d654cfa45ed6e3edcd4c6
|
e0706e1fe48352e65f9f22d1f80038f4362516bb
|
refs/heads/master
| 2021-01-10T02:58:08.439962
| 2016-03-10T01:15:18
| 2016-03-10T01:15:18
| 44,219,351
| 3
| 4
|
Apache-2.0
| 2023-03-20T11:47:22
| 2015-10-14T02:34:53
|
Java
|
UTF-8
|
Java
| false
| false
| 4,073
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.errorhandling;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.classification.InterfaceAudience;
/**
* The dispatcher acts as the state holding entity for foreign error handling. The first
* exception received by the dispatcher get passed directly to the listeners. Subsequent
* exceptions are dropped.
* <p>
* If there are multiple dispatchers that are all in the same foreign exception monitoring group,
* ideally all these monitors are "peers" -- any error on one dispatcher should get propagated to
* all others (via rpc, or some other mechanism). Due to racing error conditions the exact reason
* for failure may be different on different peers, but the fact that they are in error state
* should eventually hold on all.
* <p>
* This is thread-safe and must be because this is expected to be used to propagate exceptions
* from foreign threads.
*/
@InterfaceAudience.Private
public class ForeignExceptionDispatcher implements ForeignExceptionListener, ForeignExceptionSnare {
public static final Log LOG = LogFactory.getLog(ForeignExceptionDispatcher.class);
protected final String name;
protected final List<ForeignExceptionListener> listeners =
new ArrayList<ForeignExceptionListener>();
private ForeignException exception;
public ForeignExceptionDispatcher(String name) {
this.name = name;
}
public ForeignExceptionDispatcher() {
this("");
}
public String getName() {
return name;
}
@Override
public synchronized void receive(ForeignException e) {
// if we already have an exception, then ignore it
if (exception != null) return;
LOG.debug(name + " accepting received exception" , e);
// mark that we got the error
if (e != null) {
exception = e;
} else {
exception = new ForeignException(name, "");
}
// notify all the listeners
dispatch(e);
}
@Override
public synchronized void rethrowException() throws ForeignException {
if (exception != null) {
// This gets the stack where this is caused, (instead of where it was deserialized).
// This is much more useful for debugging
throw new ForeignException(exception.getSource(), exception.getCause());
}
}
@Override
public synchronized boolean hasException() {
return exception != null;
}
@Override
synchronized public ForeignException getException() {
return exception;
}
/**
* Sends an exception to all listeners.
* @param message human readable message passed to the listener
* @param e {@link ForeignException} containing the cause. Can be null.
*/
private void dispatch(ForeignException e) {
// update all the listeners with the passed error
for (ForeignExceptionListener l: listeners) {
l.receive(e);
}
}
/**
* Listen for failures to a given process. This method should only be used during
* initialization and not added to after exceptions are accepted.
* @param errorable listener for the errors. may be null.
*/
public synchronized void addListener(ForeignExceptionListener errorable) {
this.listeners.add(errorable);
}
}
|
[
"tengyutong0213@gmail.com"
] |
tengyutong0213@gmail.com
|
72a7dad013a4437fe9853ffb8585f4be16b1539d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_3469bbbd651ca14a46a9ae9e72d44fb6ab183ae3/CommentActivity/2_3469bbbd651ca14a46a9ae9e72d44fb6ab183ae3_CommentActivity_s.java
|
2f654c2a92f48e6879e3d98be7290e34602ac1f6
|
[] |
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,737
|
java
|
package ca.ualberta.cs.completemytask;
import java.io.File;
import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.TextView;
public class CommentActivity extends Activity {
private static final String TAG = "CommentActivity";
private EditText commentEditText;
private TextView commentsTextView;
private Task task;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_comment);
int position = TaskManager.getInstance().getCurrentTaskPosition();
task = TaskManager.getInstance().getTaskAt(position);
commentsTextView = (TextView) findViewById(R.id.commentsView);
int numberOfComments = task.getNumberOfComments();
for (int i = 0; i < numberOfComments; i++) {
Comment comment = task.getCommentAt(i);
User user = comment.getUser();
String commentsString = commentsTextView.getText().toString();
commentsString += user.getUserName() + "\n\n\t" + comment.getContent() + "\n\n\n";
commentsTextView.setText(commentsString);
}
commentEditText = (EditText) findViewById(R.id.Comment);
commentEditText.setOnEditorActionListener(new EditText.OnEditorActionListener() {
public boolean onEditorAction(TextView v, int actionId,
KeyEvent event) {
boolean handled = false;
if (actionId == EditorInfo.IME_ACTION_SEND) {
// Send the user message
send(null);
handled = true;
}
return handled;
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_comment, menu);
return true;
}
/**
* Send a text to the current task.
* @param A view
*/
public void send(View view) {
Log.v(TAG, "Sent Comment");
String commentString = commentEditText.getText().toString();
commentEditText.setText("");
if (task == null)
return;
if (commentString.length() > 0) {
Comment comment = new Comment(commentString);
User user = null;
if (Settings.getInstance().hasUser()) {
user = Settings.getInstance().getUser();
} else {
user = new User("Unknown");
}
comment.setUser(user);
comment.setParentId(task.getId());
sync(comment);
String commentsString = commentsTextView.getText().toString();
commentsString += user.getUserName() + "\n\n\t" + comment.getContent() + "\n\n\n";
commentsTextView.setText(commentsString);
}
}
public void sync(final Comment comment) {
class SyncTaskAsyncTask extends AsyncTask<String, Void, Long>{
@Override
protected void onPreExecute() {
}
@Override
protected Long doInBackground(String... params) {
DatabaseManager.getInstance().syncData(comment);
task.addComment(comment);
if (task.isLocal()) {
TaskManager.getInstance().saveLocalData();
}
return (long) 1;
}
@Override
protected void onProgressUpdate(Void... voids) {
}
@Override
protected void onPostExecute(Long result) {
super.onPostExecute(null);
}
}
SyncTaskAsyncTask syncTask = new SyncTaskAsyncTask();
syncTask.execute();
}
/**
* Close activity.
*
* @param A view
*/
public void close(View view) {
this.finish();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8d718629d528676d46d204a60fd544b57fe4b3d9
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/plugin/ipcall/ui/IPCallRechargeUI$11.java
|
a07c66fae1fc8a92fb6c22585f50a3913b668e78
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 755
|
java
|
package com.tencent.mm.plugin.ipcall.ui;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
final class IPCallRechargeUI$11
implements DialogInterface.OnClickListener
{
IPCallRechargeUI$11(IPCallRechargeUI paramIPCallRechargeUI)
{
}
public final void onClick(DialogInterface paramDialogInterface, int paramInt)
{
AppMethodBeat.i(22262);
this.nEu.finish();
AppMethodBeat.o(22262);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.ipcall.ui.IPCallRechargeUI.11
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
348d547b568264570f547a0145a4dbd03012c2e7
|
28b3a4074c919eb5fa0bc53665a977079d2d8f89
|
/ectaxi/src/main/java/com/spring/jersy/hibernate/model/service/impl/OperatStatisServiceImpl.java
|
f0cc78c400094d9f4baa037c7185156f6b5eff93
|
[] |
no_license
|
vrqin/taxi
|
43e7b65c420ace1280d3621662db6db02aa268d9
|
c3c1bd4739425393b2de888b716d7343af8097a4
|
refs/heads/master
| 2020-05-31T15:30:49.540392
| 2018-12-07T12:23:34
| 2018-12-07T12:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,023
|
java
|
package com.spring.jersy.hibernate.model.service.impl;
import com.spring.jersy.hibernate.model.dao.OperatStatisDao;
import com.spring.jersy.hibernate.model.entity.OperatStatis;
import com.spring.jersy.hibernate.model.service.OperatStatisService;
import com.spring.jersy.hibernate.publics.util.PageList;
import com.spring.jersy.hibernate.publics.util.S;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class OperatStatisServiceImpl implements OperatStatisService {
@Autowired
private OperatStatisDao operatStatisDao;
@Override
public PageList findList(int page, int rows, String sort, String order, String key, String begintime, String endtime, int type, int clientid) throws Exception {
DetachedCriteria dc = DetachedCriteria.forClass(OperatStatis.class);
if (!S.isNull(key)) {
dc.add(Restrictions.sqlRestriction("(kabnum like '%" + key + "%' or name like '%" + key + "%'or enterprise like '%" + key + "%')"));
}
if (clientid > 0) {
dc.add(Restrictions.eq("enterprise", clientid));
}
if ("desc".equals(order)) {
dc.addOrder(Order.desc(sort));
} else {
dc.addOrder(Order.asc(sort));
}
PageList pageList = new PageList(page, rows);
pageList = operatStatisDao.findPageList(pageList, dc);
return pageList;
}
@Override
public OperatStatis findByid(Integer id) {
return operatStatisDao.get(id);
}
@Override
public void delete(Integer id) {
operatStatisDao.delete(id);
}
@Override
public void save(OperatStatis operatStatis) {
operatStatisDao.save(operatStatis);
}
@Override
public void saveOrUpd(OperatStatis operatStatis) {
operatStatisDao.saveOrUpdate(operatStatis);
}
}
|
[
"heavenlystate@163.com"
] |
heavenlystate@163.com
|
74100faee14f52fd62ce8408ac54e03e7e6a1bb6
|
f3c9530b94b0c8829454b7ff5699a978ab04393d
|
/jnetpcap/releases/jnetpcap-1.2-deprecated/release-1.2.rc5/src/java1.5/org/jnetpcap/nio/JReference.java
|
022520c1ea1f65f8d5fa45432dfdb8da27e299b6
|
[] |
no_license
|
hongpingwei/jnetpcap-code
|
70083699858b720ebec4f1e373f4683d6bd86b9a
|
f271c3e3e004c7e7d7d808aa8adc25bbfe15bd2c
|
refs/heads/master
| 2021-01-11T19:57:10.823207
| 2015-03-19T14:33:54
| 2015-03-19T14:33:54
| 79,429,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,625
|
java
|
/**
* Copyright (C) 2009 Sly Technologies, Inc. This library is free software; you
* can redistribute it and/or modify it under the terms of the GNU Lesser
* General Public License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. This
* library is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details. You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.jnetpcap.nio;
/**
* A specialized class that is used for managing JNI global object references.
* Global JNI references once allocated need to be explicitely deallocated or
* they will always hold on to the the java object reference preventing the
* objects of ever going out of scope. This class allows a native structure to
* create and use global JNI references while JReference class keeps track of
* the created references for deallocation purposes when the time comes.
* <p>
* This class is internally maintained by JMemory and the user usually does not
* have to ever deal with it directly. References are maintained automatically.
* References objects are transfered during the peering and copy process just
* like JMemory keeper objects. This makes sure that JNI global references are
* not released too soon but are when the last object using them is GCed. The
* references array is a native structure, peered with JReference from JNI
* space.
* </p>
*
* @author Mark Bednarczyk
* @author Sly Technologies, Inc.
*/
public class JReference
extends JStruct {
private static final String STRUCT_NAME = "jni_global_ref_t";
/**
* Default number of space to allocate to hold references. Accessed from JNI.
*/
@SuppressWarnings("unused")
private final static int DEFAULT_REFERENCE_COUNT = 3;
/**
* This type of structure is always allocated natively and peered with a java
* counter part.
*/
public JReference() {
super(STRUCT_NAME, Type.POINTER);
}
@Override
protected void cleanup() {
cleanupReferences();
super.cleanup();
}
/**
* Releases any held JNI global references
*/
private native void cleanupReferences();
public native String toDebugString();
public native int getCapacity();
}
|
[
"voytechs@905ad56a-9210-0410-a722-a9c141187570"
] |
voytechs@905ad56a-9210-0410-a722-a9c141187570
|
654ceb30e273b401e06e82ec844c83a24394c2cf
|
c16ea32a4cddb6b63ad3bacce3c6db0259d2bacd
|
/google/cloud/datacatalog/v1/google-cloud-datacatalog-v1-java/proto-google-cloud-datacatalog-v1-java/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java
|
a2efa01bcc056accba0def67decc685709b1f1ed
|
[
"Apache-2.0"
] |
permissive
|
dizcology/googleapis-gen
|
74a72b655fba2565233e5a289cfaea6dc7b91e1a
|
478f36572d7bcf1dc66038d0e76b9b3fa2abae63
|
refs/heads/master
| 2023-06-04T15:51:18.380826
| 2021-06-16T20:42:38
| 2021-06-16T20:42:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 4,091
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/datacatalog/v1/datacatalog.proto
package com.google.cloud.datacatalog.v1;
public interface SearchCatalogResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.SearchCatalogResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Search results.
* </pre>
*
* <code>repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1;</code>
*/
java.util.List<com.google.cloud.datacatalog.v1.SearchCatalogResult>
getResultsList();
/**
* <pre>
* Search results.
* </pre>
*
* <code>repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1;</code>
*/
com.google.cloud.datacatalog.v1.SearchCatalogResult getResults(int index);
/**
* <pre>
* Search results.
* </pre>
*
* <code>repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1;</code>
*/
int getResultsCount();
/**
* <pre>
* Search results.
* </pre>
*
* <code>repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1;</code>
*/
java.util.List<? extends com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder>
getResultsOrBuilderList();
/**
* <pre>
* Search results.
* </pre>
*
* <code>repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1;</code>
*/
com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder getResultsOrBuilder(
int index);
/**
* <pre>
* The token that can be used to retrieve the next page of results.
* </pre>
*
* <code>string next_page_token = 3;</code>
* @return The nextPageToken.
*/
java.lang.String getNextPageToken();
/**
* <pre>
* The token that can be used to retrieve the next page of results.
* </pre>
*
* <code>string next_page_token = 3;</code>
* @return The bytes for nextPageToken.
*/
com.google.protobuf.ByteString
getNextPageTokenBytes();
/**
* <pre>
* Unreachable locations. Search result does not include data from those
* locations. Users can get additional information on the error by repeating
* the search request with a more restrictive parameter -- setting the value
* for `SearchDataCatalogRequest.scope.restricted_locations`.
* </pre>
*
* <code>repeated string unreachable = 6;</code>
* @return A list containing the unreachable.
*/
java.util.List<java.lang.String>
getUnreachableList();
/**
* <pre>
* Unreachable locations. Search result does not include data from those
* locations. Users can get additional information on the error by repeating
* the search request with a more restrictive parameter -- setting the value
* for `SearchDataCatalogRequest.scope.restricted_locations`.
* </pre>
*
* <code>repeated string unreachable = 6;</code>
* @return The count of unreachable.
*/
int getUnreachableCount();
/**
* <pre>
* Unreachable locations. Search result does not include data from those
* locations. Users can get additional information on the error by repeating
* the search request with a more restrictive parameter -- setting the value
* for `SearchDataCatalogRequest.scope.restricted_locations`.
* </pre>
*
* <code>repeated string unreachable = 6;</code>
* @param index The index of the element to return.
* @return The unreachable at the given index.
*/
java.lang.String getUnreachable(int index);
/**
* <pre>
* Unreachable locations. Search result does not include data from those
* locations. Users can get additional information on the error by repeating
* the search request with a more restrictive parameter -- setting the value
* for `SearchDataCatalogRequest.scope.restricted_locations`.
* </pre>
*
* <code>repeated string unreachable = 6;</code>
* @param index The index of the value to return.
* @return The bytes of the unreachable at the given index.
*/
com.google.protobuf.ByteString
getUnreachableBytes(int index);
}
|
[
"bazel-bot-development[bot]@users.noreply.github.com"
] |
bazel-bot-development[bot]@users.noreply.github.com
|
1d60ad70e60bc8cf471f3213b60a03d3a07c054a
|
1b5987a7e72a58e12ac36a36a60aa6add2661095
|
/code/org/processmining/framework/models/petrinet/StateSpace.java
|
93b863bc4e2c4b75101f70317cfb671c882ca313
|
[] |
no_license
|
qianc62/BePT
|
f4b1da467ee52e714c9a9cc2fb33cd2c75bdb5db
|
38fb5cc5521223ba07402c7bb5909b17967cfad8
|
refs/heads/master
| 2021-07-11T16:25:25.879525
| 2020-09-22T10:50:51
| 2020-09-22T10:50:51
| 201,562,390
| 36
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,579
|
java
|
/***********************************************************
* This software is part of the ProM package *
* http://www.processmining.org/ *
* *
* Copyright (c) 2003-2006 TU/e Eindhoven *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by Eindhoven University of Technology *
* Department of Information Systems *
* http://is.tm.tue.nl *
* *
**********************************************************/
package org.processmining.framework.models.petrinet;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.processmining.framework.models.ModelGraphEdge;
import org.processmining.framework.models.ModelGraphVertex;
import org.processmining.framework.models.fsm.AcceptFSM;
/**
* A Petri-net based state space, wheras states correspond to markings of the
* net, and edges represent transitions in the Petri net. <br>
* The actual construction of the state space (e.g., as a reachability graph, or
* a coverability graph) is not done here but in dedicated classes. They,
* however, use this data structure and add the states that were determined in
* the course of the corresponding algorithm.
*
* @see org.processmining.framework.models.petrinet.algorithms.ReachabilityGraphBuilder
* @see org.processmining.framework.models.petrinet.algorithms.CoverabilityGraphBuilder
*/
public class StateSpace extends AcceptFSM {
private PetriNet pnet;
private HashMap placeValues = new HashMap();
private boolean useIdentifier = false;
/**
* Initializes a Petri-net based state space, wheras states correspond to
* markings of the net, and edges represent transitions in the Petri net.
*
* @param pnet
* the given Petri net
*/
public StateSpace(PetriNet pnet) {
super("StateSpace :" + pnet.getIdentifier());
this.pnet = pnet;
}
public PetriNet getPetriNet() {
return pnet;
}
public void destroyStateSpace() {
placeValues = null;
pnet = null;
this.clearAcceptFSM();
this.clearFSM();
this.clearModelGraph();
this.clearGGraph();
this.clearSubgraph();
this.clearElement();
}
/**
* @todo: provide documentation
* @param s
* State
* @return State
*/
public State addState(State s) {
super.addVertex(s);
Iterator it = s.iterator();
while (it.hasNext()) {
Place p = (Place) it.next();
if (placeValues.get(p) == null) {
placeValues.put(p, new ArrayList());
}
ArrayList pVals = (ArrayList) placeValues.get(p);
if (pVals.indexOf(new Integer(s.getOccurances(p))) < 0) {
pVals.add(new Integer(s.getOccurances(p)));
}
}
s.setLabel(s.getMarking().toString());
return s;
}
public boolean setUseIdentifier(boolean newUseIdentifier) {
boolean oldUseIdentifier = useIdentifier;
useIdentifier = newUseIdentifier;
return oldUseIdentifier;
}
/**
* @todo: provide documentation
* @param bw
* BufferedWriter
* @throws IOException
*/
public void writeToFSM(BufferedWriter bw) throws IOException {
Iterator it = placeValues.keySet().iterator();
int i = 0;
while (it.hasNext()) {
Place p = (Place) it.next();
p.setNumber(i++);
ArrayList pVals = (ArrayList) placeValues.get(p);
bw.write((useIdentifier ? p.getIdentifier() : "p" + p.getNumber())
+ "(" + (pVals.size() + 2) + ") ");
bw.write("\"0\" ");
Iterator it2 = pVals.iterator();
while (it2.hasNext()) {
Integer i2 = (Integer) it2.next();
bw.write("\""
+ (i2.intValue() == State.OMEGA ? "OMEGA" : i2
.toString()) + "\" ");
}
bw.write("\"" + p.getIdentifier() + "\"");
bw.newLine();
}
bw.write("---");
bw.newLine();
// Now, start writing the states
it = getVerticeList().iterator();
i = 1;
while (it.hasNext()) {
State s = (State) it.next();
s.index = i++;
int[] string = new int[placeValues.keySet().size()];
for (int j = 0; j < placeValues.keySet().size(); j++) {
string[j] = 0;
}
Iterator it2 = s.iterator();
while (it2.hasNext()) {
Place p = (Place) it2.next();
int o = s.getOccurances(p);
string[p.getNumber()] = ((ArrayList) placeValues.get(p))
.indexOf(new Integer(o)) + 1;
}
for (int j = 0; j < placeValues.keySet().size(); j++) {
bw.write(string[j] + " ");
}
bw.newLine();
}
bw.write("---");
bw.newLine();
// Now, write the edges
it = getEdges().iterator();
while (it.hasNext()) {
ModelGraphEdge e = (ModelGraphEdge) it.next();
State source = (State) e.getSource();
State dest = (State) e.getDest();
bw.write("" + source.index);
bw.write(" ");
bw.write("" + dest.index);
bw.write(" ");
bw.write("\"" + e.object.toString() + "\"");
bw.newLine();
}
}
public List<List<ModelGraphVertex>> getStronglyConnectedComponents() {
List<ModelGraphVertex> order = new ArrayList<ModelGraphVertex>();
order.add(getStartState());
List<List<ModelGraphVertex>> nodes = computeFinishingTimes(order, true);
Collections.reverse(nodes.get(0));
List<List<ModelGraphVertex>> result = computeFinishingTimes(nodes
.get(0), false);
return result;
}
private List<List<ModelGraphVertex>> computeFinishingTimes(
List<ModelGraphVertex> nodes, boolean forward) {
List<List<ModelGraphVertex>> forest = new ArrayList<List<ModelGraphVertex>>();
Set<ModelGraphVertex> visited = new LinkedHashSet<ModelGraphVertex>();
for (ModelGraphVertex node : nodes) {
List<ModelGraphVertex> tree = new ArrayList<ModelGraphVertex>();
computeFinishingTimesDFS(node, tree, visited, forward);
if (!tree.isEmpty())
forest.add(tree);
}
return forest;
}
private void computeFinishingTimesDFS(ModelGraphVertex node,
List<ModelGraphVertex> tree, Set<ModelGraphVertex> visited,
boolean forward) {
if (visited.add(node)) {
Collection<ModelGraphVertex> nextNodes;
if (forward)
nextNodes = node.getSuccessors();
else
nextNodes = node.getPredecessors();
for (ModelGraphVertex nextNode : nextNodes) {
computeFinishingTimesDFS(nextNode, tree, visited, forward);
}
tree.add(node);
}
}
}
|
[
"qianc62@gmail.com"
] |
qianc62@gmail.com
|
f697978c5753ae86cdcc5ae13413f3f8be4d2839
|
5b53982ebf5b7f5c52afd78de65893c74ec603a8
|
/Proyectos/SIGIL/Avance 03- sigil/Proyecto_Condominio/src/pe/spring/condominio/prueba/Prueba01.java
|
b6e07d3d838a6be5217f576f997e4ab3dc3651f9
|
[] |
no_license
|
gcoronelc/USIL_TPW_2017_2_TM
|
a40b18b9e0ce8d6a45c4ca45f53dccbd8ad0d130
|
ec08b3450155daf43e5e9f26c5d90239dc483fa0
|
refs/heads/master
| 2021-08-22T17:20:23.388166
| 2017-11-30T18:13:38
| 2017-11-30T18:13:38
| 100,329,571
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 993
|
java
|
package pe.spring.condominio.prueba;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import pe.spring.condominio.model.Persona;
import pe.spring.condominio.service.LogonService;
/**
*
*
*/
public class Prueba01 {
public static void main(String[] args) {
// Instanciando el contexto
String contexto = "/pe/spring/condominio/prueba/contexto.xml";
BeanFactory beanFactory;
BeanFactory beanFactory3 = beanFactory = new ClassPathXmlApplicationContext(contexto);
BeanFactory beanFactory2 = beanFactory3;
LogonService service;
try {
service = beanFactory.getBean(LogonService.class);
Persona bean = service.validarUsuario("gustavo", "gustavo");
System.out.println("Apellido: " + bean.getApellido()+" "+bean.getNombre());
System.out.println("IdRol: " + bean.getIdrol());
} catch (Exception e) {
System.err.println(e.getMessage());
}
}
}
|
[
"gcoronelc@gmail.com"
] |
gcoronelc@gmail.com
|
8bbec530332844386bd914d1d41040c1f464719a
|
f8959e30eb7058a1ce2658349a12ee1d91632bb6
|
/src/main/java/com/king/nowedge/query/CustomerTagQuery.java
|
5283d86741e8ee986113a734712050a833fa0fca
|
[] |
no_license
|
hq20211124/com.ryx.noeedge
|
190456e908b851cabbe3301eee1802641169ea87
|
f191be4c119a6f1a2f478e79fd06013c744ca140
|
refs/heads/master
| 2023-01-01T19:29:36.834273
| 2020-10-25T05:03:19
| 2020-10-25T05:03:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,206
|
java
|
package com.king.nowedge.query;import com.king.nowedge.query.base.LoreBaseQuery;
import java.util.Date;
public class CustomerTagQuery extends LoreBaseQuery {
private Date gmtCreate;
private Date gmtModified;
private String code;
private String qq;
private String wangwang;
private String email ;
private String mobile;
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getQq() {
return qq;
}
public void setQq(String qq) {
this.qq = qq;
}
public String getWangwang() {
return wangwang;
}
public void setWangwang(String wangwang) {
this.wangwang = wangwang;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
}
|
[
"47876863+Fuchsia-king@users.noreply.github.com"
] |
47876863+Fuchsia-king@users.noreply.github.com
|
8649332f616dcfea44e9f4196adf2b54b2e236c3
|
c4747da1ebc380b1f5917eb41b21e24ee1b16834
|
/jPDDL/src/main/java/cz/cuni/mff/jpddl/utils/IEventSelector.java
|
08341eedc70352f163ca1f7a3c3e015d148388bf
|
[
"MIT"
] |
permissive
|
kefik/jPDDL
|
86d48cdda259c62966c97c200294580fefe5bd5f
|
b70db4c26bb40d96cb5fdfbd3e141effab952ac4
|
refs/heads/master
| 2020-04-03T15:58:22.536808
| 2019-04-04T22:13:15
| 2019-04-04T22:13:15
| 155,385,496
| 0
| 1
|
MIT
| 2019-04-04T18:54:25
| 2018-10-30T12:56:33
|
Java
|
UTF-8
|
Java
| false
| false
| 260
|
java
|
package cz.cuni.mff.jpddl.utils;
import cz.cuni.mff.jpddl.PDDLEffector;
import cz.cuni.mff.jpddl.PDDLProblem;
import java.util.List;
public interface IEventSelector {
public List<PDDLEffector> select(PDDLProblem problem, List<PDDLEffector> events);
}
|
[
"martin.pilat@gmail.com"
] |
martin.pilat@gmail.com
|
0fe43982206b7301ed8f486389d6c72b991be928
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14462-1-21-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/internal/AbstractInstallPlanJob_ESTest_scaffolding.java
|
6ab1dced752caca574bd4c58315dc0901f7d630a
|
[] |
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
| 459
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 06:27:34 UTC 2020
*/
package org.xwiki.extension.job.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractInstallPlanJob_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d245d87e684e4cbe107f066eb1c287c4c70d6d4d
|
df7966fdc0684a8d675efb555afeb055afa7a259
|
/do-exercise/leet-code_51-100/src/main/java/exe77/combinations/Solution.java
|
9a5beb28fe0e63c55522940e75e0a81707ad0895
|
[
"Apache-2.0"
] |
permissive
|
manfredma/exercises
|
90760db34c33d6d38d92edf1377e54e8029bef72
|
f487ece7b0cd761e8afb14ae8be0b1b668f97d8c
|
refs/heads/master
| 2023-09-06T04:15:15.960344
| 2023-08-25T06:15:46
| 2023-08-25T06:15:46
| 176,470,365
| 3
| 0
| null | 2021-04-08T07:11:50
| 2019-03-19T09:07:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,589
|
java
|
package exe77.combinations;
import java.util.ArrayList;
import java.util.List;
class Solution {
public List<List<Integer>> combine(int n, int k) {
List<List<Integer>> result = new ArrayList<>();
if (k > n) {
return result;
}
int[] digits = new int[n];
for (int i = 0; i < digits.length; i++) {
digits[i] = i + 1;
}
return doCombine(digits, k, 0, digits.length - 1);
}
private List<List<Integer>> doCombine(int[] digits, int k, int begin, int end) {
List<List<Integer>> result = new ArrayList<>();
if (end - begin + 1 < k) {
return result;
} else if (end - begin + 1 == k) {
List<Integer> integers = new ArrayList<>();
for (int i = 0; i < k; i++) {
integers.add(digits[begin + i]);
}
result.add(integers);
return result;
} else if (k == 1) {
for (int i = 0; i < end - begin + 1; i++) {
List<Integer> re = new ArrayList<>();
re.add(digits[begin + i]);
result.add(re);
}
return result;
}
List<List<Integer>> x = doCombine(digits, k - 1, begin + 1, end);
for (List<Integer> integers : x) {
List<Integer> integers1 = new ArrayList<>();
integers1.add(digits[begin]);
integers1.addAll(integers);
result.add(integers1);
}
result.addAll(doCombine(digits, k, begin + 1, end));
return result;
}
}
|
[
"maxingfang@meituan.com"
] |
maxingfang@meituan.com
|
42af6092d44f4ce48e4b5513e8d7967db8e3c85f
|
f4b129fcff66613eac153a6f87b7d827fd7baf20
|
/JavaLabProject/src/main/java/server/controllers/HomeController.java
|
81ef7e1e511282b1f8f7c4877677289fb3a5e578
|
[] |
no_license
|
Nail-Salimov/JavaLabClone
|
56c38ee61e968e9406bc7fa6ba293d02ad46ab2e
|
ee63cc24b72acdeb8c3e0994c5c1fc167be290a3
|
refs/heads/master
| 2022-12-22T14:50:29.393858
| 2020-03-17T16:46:59
| 2020-03-17T16:46:59
| 248,022,472
| 0
| 0
| null | 2022-12-16T15:28:30
| 2020-03-17T16:43:39
|
Java
|
UTF-8
|
Java
| false
| false
| 536
|
java
|
package server.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class HomeController {
@RequestMapping(value = "/home", method = RequestMethod.GET)
public ModelAndView getPage(){
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("home");
return modelAndView;
}
}
|
[
"nail0205@mail.ru"
] |
nail0205@mail.ru
|
d90c0e731212ec2d55663210ddd242bb0426dea3
|
3c2685bddc415130476750465bc737a53defaddc
|
/microsercice-core/core-commons/src/main/java/com/wuqianqian/core/commons/constants/MessageConstant.java
|
4c49cf3b17ca0d0b2ad283ad81f7981fc3bba50e
|
[] |
no_license
|
peiqingliu/managementplatform
|
65653397078d6c5adee27299da9e39615a388f71
|
1c5c8ff7f44f16c1e3d80ec82d63ce8249fdcfb2
|
refs/heads/master
| 2020-03-30T07:07:28.713968
| 2018-10-09T02:21:19
| 2018-10-09T02:21:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 460
|
java
|
package com.wuqianqian.core.commons.constants;
/**
* @author liupeqing
* @date 2018/9/26 16:57
*
* 自定义消息常量 SYSTEM_AUTH 开头对应 system-auth-xxx BUSINESS_ADMIN 开头对应 business-admin-xxx
*/
public interface MessageConstant {
String SYSTEM_AUTH_NOTSUPPORT = "授权模块不可用";
String BUSINESS_ADMIN_NOTSUPPORT = "权限管理模块不可用";
String COMMONS_AUTH_NOTSUPPORT = "授权失败,禁止访问";
}
|
[
"1226880979@qq.com"
] |
1226880979@qq.com
|
b76c8a80899382d4c17d1fbe01ca7c8af25fd833
|
72cbd420d57f970a6bfbf9cf4dc62f662e6a0ebb
|
/tt2/src/com/perl5/lang/tt2/idea/highlighting/TemplateToolkitColorSettingsPage.java
|
2aa9dc83b477060cd94be2e67771e9bdf9bb7187
|
[
"Apache-2.0"
] |
permissive
|
xcodejoy/Perl5-IDEA
|
e36061de84cc1780ed76711190bb5ce4b05fa3f0
|
2179a9ab2e9006d4c5501a878f484293220046ac
|
refs/heads/master
| 2020-09-19T09:15:35.960543
| 2019-11-23T08:46:28
| 2019-11-23T08:46:28
| 224,215,081
| 1
| 0
|
NOASSERTION
| 2019-11-26T14:44:56
| 2019-11-26T14:44:55
| null |
UTF-8
|
Java
| false
| false
| 3,862
|
java
|
/*
* Copyright 2015-2019 Alexandr Evstigneev
*
* 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.perl5.lang.tt2.idea.highlighting;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.fileTypes.SyntaxHighlighter;
import com.intellij.openapi.options.colors.AttributesDescriptor;
import com.intellij.openapi.options.colors.ColorDescriptor;
import com.intellij.openapi.options.colors.ColorSettingsPage;
import com.intellij.openapi.util.Pair;
import com.intellij.util.containers.ContainerUtil;
import com.perl5.lang.tt2.TemplateToolkitIcons;
import com.perl5.lang.tt2.TemplateToolkitLanguage;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.util.Map;
public class TemplateToolkitColorSettingsPage implements ColorSettingsPage {
private static final AttributesDescriptor[] DESCRIPTORS = new AttributesDescriptor[]{
new AttributesDescriptor("Markers", TemplateToolkitSyntaxHighlighter.TT2_MARKER_KEY),
new AttributesDescriptor("Numbers", TemplateToolkitSyntaxHighlighter.TT2_NUMBER_KEY),
new AttributesDescriptor("Comments", TemplateToolkitSyntaxHighlighter.TT2_COMMENT_KEY),
new AttributesDescriptor("Identifiers", TemplateToolkitSyntaxHighlighter.TT2_IDENTIFIER_KEY),
new AttributesDescriptor("Keywords", TemplateToolkitSyntaxHighlighter.TT2_KEYWORD_KEY),
new AttributesDescriptor("Operators", TemplateToolkitSyntaxHighlighter.TT2_OPERATOR_KEY),
new AttributesDescriptor("Strings, single quoted", TemplateToolkitSyntaxHighlighter.TT2_SQ_STRING_KEY),
new AttributesDescriptor("Strings, double quoted", TemplateToolkitSyntaxHighlighter.TT2_DQ_STRING_KEY),
};
@Nullable
@Override
public Icon getIcon() {
return TemplateToolkitIcons.TTK2_ICON;
}
@NotNull
@Override
public SyntaxHighlighter getHighlighter() {
return new TemplateToolkitSyntaxHighlighter(null);
}
@NotNull
@Override
public String getDemoText() {
return "%% <kw>SET</kw> <id>somekey</id> <op>=</op> <sqs>'single quoted string'</sqs>\n" +
"[% <kw>SET</kw> <id>somekey</id> <op>=</op> <dqs>\"double quoted string\"</dqs> %]\n" +
"[% <kw>SET</kw> <id>somekey</id> <op>=</op> 42 %]\n" +
"[% <id>somekey</id> <op>and</op> <id>someotherkey</id> <op>or</op> <id>somethingelse</id> %]\n" +
"%%# line comment\n" +
"[%# block comment %]\n";
}
@Nullable
@Override
public Map<String, TextAttributesKey> getAdditionalHighlightingTagToDescriptorMap() {
//noinspection unchecked
return ContainerUtil.newHashMap(
Pair.create("kw", TemplateToolkitSyntaxHighlighter.TT2_KEYWORD_KEY),
Pair.create("id", TemplateToolkitSyntaxHighlighter.TT2_IDENTIFIER_KEY),
Pair.create("op", TemplateToolkitSyntaxHighlighter.TT2_OPERATOR_KEY),
Pair.create("sqs", TemplateToolkitSyntaxHighlighter.TT2_SQ_STRING_KEY),
Pair.create("dqs", TemplateToolkitSyntaxHighlighter.TT2_DQ_STRING_KEY)
);
}
@NotNull
@Override
public AttributesDescriptor[] getAttributeDescriptors() {
return DESCRIPTORS;
}
@NotNull
@Override
public ColorDescriptor[] getColorDescriptors() {
return ColorDescriptor.EMPTY_ARRAY;
}
@NotNull
@Override
public String getDisplayName() {
return TemplateToolkitLanguage.NAME;
}
}
|
[
"hurricup@gmail.com"
] |
hurricup@gmail.com
|
33d697351195c07ba5d36691613d29490b6f9137
|
0675ec5f207b9406ef2dacfeee0cf78a9a5aa6ba
|
/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/core/layout/CorePanelAccordionTemplate.java
|
4ae90623b1c0e7a7ae6d2839b0723c21f2331ae6
|
[
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
lu4242/trinidad-demos-with-codi-owb-jpa
|
39031459525a014381f5165bfbd203a7ba14109e
|
972e22354576e686a53b85a5d0c42e5982c90db0
|
refs/heads/master
| 2021-01-01T15:55:17.112348
| 2013-04-07T15:34:59
| 2013-04-07T15:34:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,011
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.trinidad.component.core.layout;
import java.util.List;
import javax.faces.component.UIComponent;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
import org.apache.myfaces.trinidad.component.FlattenedComponent;
import org.apache.myfaces.trinidad.component.UIXPanel;
import org.apache.myfaces.trinidad.component.UIXShowDetail;
import org.apache.myfaces.trinidad.component.visit.VisitCallback;
import org.apache.myfaces.trinidad.component.visit.VisitContext;
import org.apache.myfaces.trinidad.component.visit.VisitContextWrapper;
import org.apache.myfaces.trinidad.component.visit.VisitHint;
import org.apache.myfaces.trinidad.component.visit.VisitResult;
import org.apache.myfaces.trinidad.event.DisclosureEvent;
abstract public class CorePanelAccordionTemplate
extends UIXPanel
{
/**/ public abstract boolean isDiscloseMany();
/**
* Queues an event recursively to the root component.
* @param event
* @throws javax.faces.event.AbortProcessingException
*/
@Override
public void queueEvent(FacesEvent event)
throws AbortProcessingException
{
// For a "show-one" panel accordion, handle an "expanding"
// DisclosureEvent specifically, only if the source
// is one of its immediate children
if ((event instanceof DisclosureEvent) &&
!isDiscloseMany() &&
(this == event.getComponent().getParent()) &&
((DisclosureEvent) event).isExpanded())
{
for (UIComponent comp : ((List<UIComponent>) getChildren()))
{
// Skip over the show detail that is the source of this event
if (comp == event.getComponent())
continue;
if (comp instanceof UIXShowDetail)
{
UIXShowDetail showDetail = (UIXShowDetail) comp;
// Queue an event to hide the currently expanded showDetail
if (showDetail.isDisclosed())
(new DisclosureEvent(showDetail, false)).queue();
}
}
}
super.queueEvent(event);
}
protected boolean isChildSelected(
UIXShowDetail component)
{
return component.isDisclosed();
}
@Override
public boolean visitTree(
VisitContext visitContext,
VisitCallback callback)
{
if (visitContext.getHints().contains(VisitHint.SKIP_UNRENDERED) &&
!isDiscloseMany())
{
// Filter which children to be visited so that only one show detail
// is visited for this accordion
visitContext = new PartialVisitContext(visitContext);
}
return super.visitTree(visitContext, callback);
}
private class PartialVisitContext
extends VisitContextWrapper
{
PartialVisitContext(
VisitContext wrapped)
{
_wrapped = wrapped;
}
public VisitContext getWrapped()
{
return _wrapped;
}
@Override
public VisitResult invokeVisitCallback(
UIComponent component,
VisitCallback visitCallback)
{
if (component instanceof UIXShowDetail)
{
UIXShowDetail showDetail = (UIXShowDetail)component;
if (_isShowDetailForCurrentComponent(showDetail))
{
if (_foundItemToRender || !isChildSelected(showDetail))
{
// We already visited the one to be shown
return VisitResult.REJECT;
}
else
{
_foundItemToRender = true;
}
}
}
return super.invokeVisitCallback(component, visitCallback);
}
private boolean _isShowDetailForCurrentComponent(
UIXShowDetail showDetail)
{
for (UIComponent parent = showDetail.getParent(); parent != null;
parent = parent.getParent())
{
if (parent == CorePanelAccordion.this)
{
return true;
}
if (parent instanceof FlattenedComponent &&
((FlattenedComponent)parent).isFlatteningChildren(getFacesContext()))
{
continue;
}
// The first-non flattened component is not the show one, do not filter it
return false;
}
return false;
}
private boolean _foundItemToRender;
private VisitContext _wrapped;
}
}
|
[
"lu4242@gmail.com"
] |
lu4242@gmail.com
|
89a55fb59eecefcc3fc9ba5d911545d52ec1b724
|
66ab8a0e4b7f97b63c4355f32677961d9dda3ecf
|
/src/SeleniumSessions/HtmlUnitDriverConcept.java
|
817764c2225093a2891c1dc4f208d123bdad21c4
|
[] |
no_license
|
ankautomates17/SeleniumJava
|
4a222c044a8ccfeade50dfb75f1c92d866f0d795
|
1070455034456032da3d95369bb3b74b0ca23409
|
refs/heads/master
| 2022-08-13T06:20:40.350723
| 2020-05-24T15:48:15
| 2020-05-24T15:48:15
| 259,720,612
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,825
|
java
|
package SeleniumSessions;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
public class HtmlUnitDriverConcept {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\Ankit\\Downloads\\chromedriver_win32\\chromedriver.exe");
//WebDriver driver = new ChromeDriver(); //launch chrome
//htmlunitdriver is not available in Selenium 3.x version.
//htmlunitdriver -- to use this concept, we have to download htmlunitdriver JAR file.
//advantages:
//1. testing is happening behind the scene -- no browser is launched
//2. Very fast -- execution of test cases -- very fast -- performance of the script
//3. not suitable for Actions class -- user actions -- mousemovement, doubleClick, drag and drop
//4. Ghost Driver -- HeadLess Browser:
//--HtmlUnit Driver -- JAva
//--PhantomJS -- JavaScript
WebDriver driver = new HtmlUnitDriver();
driver.manage().window().maximize(); //maximize window
driver.manage().deleteAllCookies(); //delete all the cookies
//dynamic wait
driver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.get("http://www.freecrm.com");
System.out.println("Before login, title is:==="+ driver.getTitle());
driver.findElement(By.name("username")).sendKeys("naveenk");
driver.findElement(By.name("password")).sendKeys("test@123");
driver.findElement(By.xpath("//input[@type='submit']")).click();
Thread.sleep(2000);
System.out.println("after login, title is:==="+ driver.getTitle());
}
}
|
[
"you@example.com"
] |
you@example.com
|
39db250d3eb00a3967ddc858f4d8e5d46e0aa2c1
|
90e736b5a0e56249121658ea462a4dbd2facfa1b
|
/Softserve/homework/src/hw5/bird/FlyingBird.java
|
b0804a47bc01053f8c0d44d0c4821055916d628a
|
[] |
no_license
|
sashapavlenko10/softserve
|
94cf5e052dc54365c18ab494c855d215781c63c6
|
af6f4a59c34961de83f8aa3f10e8be4547251809
|
refs/heads/master
| 2021-04-11T02:05:52.570465
| 2020-04-13T12:36:25
| 2020-04-13T12:36:25
| 248,983,646
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 219
|
java
|
package test;
public class FlyingBird extends Bird {
public FlyingBird(String st) {
}
@Override
public String fly() {
return "fly";
}
@Override
public String toString() {
return "FlyingBird: ";
}
}
|
[
"s"
] |
s
|
cf07bcf018de6068b7abc7d2bbc3e29b67bcf807
|
56cf34c40c5048b7b5f9a257288bba1c34b1d5e2
|
/src/org/xpup/hafmis/syscollection/tranmng/tranin/dto/TraninImportDTO.java
|
0eb9b9fb821b664482ede21e423d1329884fe763
|
[] |
no_license
|
witnesslq/zhengxin
|
0a62d951dc69d8d6b1b8bcdca883ee11531fbb83
|
0ea9ad67aa917bd1911c917334b6b5f9ebfd563a
|
refs/heads/master
| 2020-12-30T11:16:04.359466
| 2012-06-27T13:43:40
| 2012-06-27T13:43:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,277
|
java
|
package org.xpup.hafmis.syscollection.tranmng.tranin.dto;
import org.xpup.common.util.imp.domn.interfaces.impDto;
public class TraninImportDTO extends impDto {
/**
*
*/
private static final long serialVersionUID = -7458394355768841510L;
private String inOrgId;
private String inOrgName;
private String noteNum;
private String name = "";
private String cardKind = "";
private String cardNum = "";
private String birthday = "";
private String sex = "";
private String salaryBase = "";
private String preBalance = "";
private String curBalance = "";
private String monthIncome = "";
private String curInterest = "";
private String tel = "";
private String mobileTel = "";
private String orgPay = "";
private String empPay = "";
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getCardKind() {
return cardKind;
}
public void setCardKind(String cardKind) {
this.cardKind = cardKind;
}
public String getCardNum() {
return cardNum;
}
public void setCardNum(String cardNum) {
this.cardNum = cardNum;
}
public String getCurBalance() {
return curBalance;
}
public void setCurBalance(String curBalance) {
this.curBalance = curBalance;
}
public String getCurInterest() {
return curInterest;
}
public void setCurInterest(String curInterest) {
this.curInterest = curInterest;
}
public String getEmpPay() {
return empPay;
}
public void setEmpPay(String empPay) {
this.empPay = empPay;
}
public String getInOrgId() {
return inOrgId;
}
public void setInOrgId(String inOrgId) {
this.inOrgId = inOrgId;
}
public String getInOrgName() {
return inOrgName;
}
public void setInOrgName(String inOrgName) {
this.inOrgName = inOrgName;
}
public String getMobileTel() {
return mobileTel;
}
public void setMobileTel(String mobileTel) {
this.mobileTel = mobileTel;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNoteNum() {
return noteNum;
}
public void setNoteNum(String noteNum) {
this.noteNum = noteNum;
}
public String getOrgPay() {
return orgPay;
}
public void setOrgPay(String orgPay) {
this.orgPay = orgPay;
}
public String getPreBalance() {
return preBalance;
}
public void setPreBalance(String preBalance) {
this.preBalance = preBalance;
}
public String getMonthIncome() {
return monthIncome;
}
public void setMonthIncome(String monthIncome) {
this.monthIncome = monthIncome;
}
public String getSalaryBase() {
return salaryBase;
}
public void setSalaryBase(String salaryBase) {
this.salaryBase = salaryBase;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
}
|
[
"yuelaotou@gmail.com"
] |
yuelaotou@gmail.com
|
dffc998ee1dbb536a641b7d1204eb56059502148
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13372-17-24-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/internal/InstallJob_ESTest.java
|
b0f44547f9551043ab7dddf1f6f05ac6cd0c6525
|
[] |
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
| 559
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Apr 03 05:02:24 UTC 2020
*/
package org.xwiki.extension.job.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class InstallJob_ESTest extends InstallJob_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0860ff68c5b6e4aa3ea27a70f763e9c8954d48c0
|
80199ede0bed95733d57235151db7306f84f3497
|
/subsys/maven/src/main/java/org/commonjava/aprox/subsys/maven/MavenComponentManager.java
|
f4c149976ede5e909cd7de6d921e95ff5eabbae5
|
[] |
no_license
|
matejonnet/indy
|
4c58552b1e86faf0d5399f78b9881243b81858ca
|
8db4acfcbfe3d339181ee07e05ba39535d865642
|
refs/heads/master
| 2022-02-28T16:28:13.542303
| 2014-04-16T15:25:32
| 2014-04-16T15:35:21
| 17,662,304
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,500
|
java
|
/*******************************************************************************
* Copyright (C) 2014 John Casey.
*
* 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.commonjava.aprox.subsys.maven;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;
import org.apache.maven.mae.MAEException;
import org.apache.maven.mae.boot.embed.MAEEmbedderBuilder;
import org.apache.maven.mae.conf.CoreLibrary;
import org.apache.maven.mae.conf.MAEConfiguration;
import org.apache.maven.mae.internal.container.ComponentSelector;
import org.apache.maven.mae.internal.container.MAEContainer;
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import org.codehaus.plexus.logging.LogEnabled;
import org.commonjava.aprox.subsys.maven.plogger.Log4JLoggerManager;
@ApplicationScoped
public class MavenComponentManager
{
@Inject
private Instance<MavenComponentDefinitions> componentLists;
private MAEContainer container;
private Log4JLoggerManager loggerManager;
@PostConstruct
public void startMAE()
throws MAEException
{
final ComponentSelector selector = new ComponentSelector();
for ( final MavenComponentDefinitions list : componentLists )
{
for ( final MavenComponentDefinition<?, ?> comp : list )
{
final String oldHint = comp.getOverriddenHint();
if ( oldHint == null )
{
selector.setSelection( comp.getComponentClass(), comp.getHint() );
}
else
{
selector.setSelection( comp.getComponentClass(), oldHint, comp.getHint() );
}
}
}
final MAEConfiguration config = new MAEConfiguration().withComponentSelections( selector )
.withLibrary( new CoreLibrary() );
final MAEEmbedderBuilder builder = new MAEEmbedderBuilder().withConfiguration( config );
container = builder.container();
loggerManager = new Log4JLoggerManager();
container.setLoggerManager( loggerManager );
}
public <I> I getComponent( final Class<I> role, final String hint )
throws MavenComponentException
{
try
{
final I instance = container.lookup( role, hint );
if ( instance instanceof LogEnabled )
{
final org.codehaus.plexus.logging.Logger log =
loggerManager.getLoggerForComponent( role.getName(), hint );
( (LogEnabled) instance ).enableLogging( log );
}
return instance;
}
catch ( final ComponentLookupException e )
{
throw new MavenComponentException( "Failed to lookup maven component: {}:{}. Reason: {}", e,
role.getName(), hint, e.getMessage() );
}
}
public <I> I getComponent( final Class<I> role )
throws MavenComponentException
{
try
{
final I instance = container.lookup( role );
if ( instance instanceof LogEnabled )
{
final org.codehaus.plexus.logging.Logger log = loggerManager.getLoggerForComponent( role.getName() );
( (LogEnabled) instance ).enableLogging( log );
}
return instance;
}
catch ( final ComponentLookupException e )
{
throw new MavenComponentException( "Failed to lookup maven component: {}. Reason: {}", e, role.getName(),
e.getMessage() );
}
}
}
|
[
"jdcasey@commonjava.org"
] |
jdcasey@commonjava.org
|
1ac13d92fd4e39fcd6b823cf680d8919d389512e
|
43cbe60e96c7761a447529bad00b8b172fd15966
|
/apps/tools/filesync/src/main/java/net/community/apps/tools/filesync/FileCmpOptions.java
|
c94aef0fcdd0f2eb0c6d5df1fa8042016af84e7d
|
[
"Apache-2.0"
] |
permissive
|
MaskerPRC/communitychest
|
e913dcdc9c71a94d5c5f5ee540ae0d6fc64a6965
|
5d4f4b58324cd9dbd07223e2ea68ff738bd32459
|
refs/heads/master
| 2023-03-19T00:43:03.353389
| 2016-04-16T13:42:47
| 2016-04-16T13:42:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,474
|
java
|
/*
*
*/
package net.community.apps.tools.filesync;
import java.io.Serializable;
import net.community.chest.CoVariantReturn;
/**
* <P>Copyright GPLv2</P>
*
* @author Lyor G.
* @since Apr 28, 2009 8:43:38 AM
*/
public class FileCmpOptions implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = -8756796643673323560L;
public FileCmpOptions ()
{
super();
}
private boolean _testOnly;
public boolean isTestOnly ()
{
return _testOnly;
}
public void setTestOnly (boolean testOnly)
{
_testOnly = testOnly;
}
private boolean _compareFileContents;
public boolean isCompareFileContents ()
{
return _compareFileContents;
}
public void setCompareFileContents (boolean compareFileContents)
{
_compareFileContents = compareFileContents;
}
private boolean _ignoreCorruptedFiles;
public boolean isIgnoreCorruptedFiles ()
{
return _ignoreCorruptedFiles;
}
public void setIgnoreCorruptedFiles (boolean ignoreCorruptedFiles)
{
_ignoreCorruptedFiles = ignoreCorruptedFiles;
}
/*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals (Object obj)
{
if (obj == this)
return true;
if (!(obj instanceof FileCmpOptions))
return false;
final FileCmpOptions other=(FileCmpOptions) obj;
return (isTestOnly() == other.isCompareFileContents())
&& (isCompareFileContents() == other.isCompareFileContents())
&& (isIgnoreCorruptedFiles() == other.isIgnoreCorruptedFiles())
;
}
/*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode ()
{
return (isTestOnly() ? 1 : 0)
+ (isCompareFileContents() ? 1 : 0)
+ (isIgnoreCorruptedFiles() ? 1 : 0)
;
}
/*
* @see java.lang.Object#toString()
*/
@Override
public String toString ()
{
return "test=" + isTestOnly()
+ ";content=" + isCompareFileContents()
+ ";ignore=" + isIgnoreCorruptedFiles()
;
}
/*
* @see java.lang.Object#clone()
*/
@Override
@CoVariantReturn
public FileCmpOptions clone () throws CloneNotSupportedException
{
return getClass().cast(super.clone());
}
}
|
[
"lyor.goldstein@gmail.com"
] |
lyor.goldstein@gmail.com
|
4755d9946a7abef8273208eedd8d25c8ea9eceeb
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a141/A141583Test.java
|
7827eab8e810470dffb2481de23e67b07d535ae4
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a141;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A141583Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
3d9339c6cfd7745728d8be131ea0e6133cef9a95
|
2160d7150c58aba493af7c00ad2c1cbaf9983972
|
/app/src/main/java/com/jingye/coffeemac/util/InstallUtil.java
|
4353a9d78420376381b874302e9bf741d529befd
|
[] |
no_license
|
ailinghengshui/CoffeeMachine
|
5fb963d1dc02fd3667162822697de3bd17e3cd31
|
139a5c8b84255767d56038f2ea0c5a6130a5d40f
|
refs/heads/master
| 2021-07-23T15:47:29.555231
| 2017-11-03T09:41:44
| 2017-11-03T09:41:44
| 109,377,882
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,988
|
java
|
package com.jingye.coffeemac.util;
import java.io.File;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.text.TextUtils;
public class InstallUtil {
private static final String TAG = "InstallUtil";
private static int versionCode;
private static String versionName;
public static void openApp(Context context, String packageName) {
PackageManager packageManager = context.getPackageManager();
Intent intent = packageManager.getLaunchIntentForPackage(packageName);
if (intent != null)
context.startActivity(intent);
}
public static final String getVersionName(Context context, String packageName) {
try {
PackageInfo pi = context.getPackageManager().getPackageInfo(packageName, 0);
if (pi != null) {
return pi.versionName;
} else {
return null;
}
} catch (NameNotFoundException e) {
return null;
}
}
public static final int getVersionCode(Context context) {
if (versionCode == 0) {
loadVersionInfo(context);
}
return versionCode;
}
public static final String getVersionName(Context context) {
if (TextUtils.isEmpty(versionName)) {
loadVersionInfo(context);
}
return versionName;
}
private static final void loadVersionInfo(Context context) {
try {
PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
if (pi != null) {
versionCode = pi.versionCode;
versionName = pi.versionName;
}
} catch (NameNotFoundException e) {
e.printStackTrace();
}
}
public static Intent getInstallApkIntent(String filepath) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
File file = new File(filepath);
intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive");
return intent;
}
}
|
[
"hdwhhc@sina.cn"
] |
hdwhhc@sina.cn
|
2c6d9da7d112f2bf6458438dbb26bd20b1cb5160
|
746572ba552f7d52e8b5a0e752a1d6eb899842b9
|
/JDK8Source/src/main/java/com/sun/corba/se/spi/monitoring/StatisticMonitoredAttribute.java
|
1452c026db0f12f42012ddec5fd891359c43cfa8
|
[] |
no_license
|
lobinary/Lobinary
|
fde035d3ce6780a20a5a808b5d4357604ed70054
|
8de466228bf893b72c7771e153607674b6024709
|
refs/heads/master
| 2022-02-27T05:02:04.208763
| 2022-01-20T07:01:28
| 2022-01-20T07:01:28
| 26,812,634
| 7
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,131
|
java
|
/***** Lobxxx Translate Finished ******/
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.corba.se.spi.monitoring;
import java.util.*;
/**
* <p>
*
* <p>
* <p>
*
*
* @author Hemanth Puttaswamy
* </p>
* <p>
* StatisticsMonitoredAttribute is provided as a convenience to collect the
* Statistics of any entity. The getValue() call will be delegated to the
* StatisticsAccumulator set by the user.
* </p>
*/
public class StatisticMonitoredAttribute extends MonitoredAttributeBase {
// Every StatisticMonitoredAttribute will have a StatisticAccumulator. User
// will use Statisticsaccumulator to accumulate the samples associated with
// this Monitored Attribute
private StatisticsAccumulator statisticsAccumulator;
// Mutex is passed from the user class which is providing the sample values.
// getValue() and clearState() is synchronized on this user provided mutex
private Object mutex;
///////////////////////////////////////
// operations
/**
* <p>
* Constructs the StaisticMonitoredAttribute, builds the required
* MonitoredAttributeInfo with Long as the class type and is always
* readonly attribute.
* </p>
* <p>
*
* <p>
* <p>
* 构造StaisticMonitoredAttribute,构建所需的MonitoredAttributeInfo,Long作为类类型并且始终为只读属性。
* </p>
* <p>
*
*
* @param name Of this attribute
* </p>
* <p>
* @return a StatisticMonitoredAttribute
* </p>
* <p>
* @param desc should provide a good description on the kind of statistics
* collected, a good example is "Connection Response Time Stats will Provide the
* detailed stats based on the samples provided from every request completion
* time"
* </p>
* <p>
* @param s is the StatisticsAcumulator that user will use to accumulate the
* samples and this Attribute Object will get the computed statistics values
* from.
* </p>
* <p>
* @param mutex using which clearState() and getValue() calls need to be locked.
* </p>
*/
public StatisticMonitoredAttribute(String name, String desc,
StatisticsAccumulator s, Object mutex)
{
super( name );
MonitoredAttributeInfoFactory f =
MonitoringFactories.getMonitoredAttributeInfoFactory();
MonitoredAttributeInfo maInfo = f.createMonitoredAttributeInfo(
desc, String.class, false, true );
this.setMonitoredAttributeInfo( maInfo );
this.statisticsAccumulator = s;
this.mutex = mutex;
} // end StatisticMonitoredAttribute
/**
* Gets the value from the StatisticsAccumulator, the value will be a formatted
* String with the computed statistics based on the samples accumulated in the
* Statistics Accumulator.
* <p>
* 从StatisticsAccumulator获取值,该值将是一个格式化的字符串,其计算的统计信息基于累加在统计累加器中的样本。
*
*/
public Object getValue( ) {
synchronized( mutex ) {
return statisticsAccumulator.getValue( );
}
}
/**
* Clears the state on Statistics Accumulator, After this call all samples are
* treated fresh and the old sample computations are disregarded.
* <p>
* 清除统计累加器上的状态。在此调用之后,所有样本被处理为新鲜,而旧样本计算被忽略。
*
*/
public void clearState( ) {
synchronized( mutex ) {
statisticsAccumulator.clearState( );
}
}
/**
* Gets the statistics accumulator associated with StatisticMonitoredAttribute.
* Usually, the user don't need to use this method as they can keep the handle
* to Accumulator to collect the samples.
* <p>
* 获取与StatisticMonitoredAttribute关联的统计累积器。通常,用户不需要使用此方法,因为他们可以保持句柄到累加器收集样本。
*/
public StatisticsAccumulator getStatisticsAccumulator( ) {
return statisticsAccumulator;
}
} // end StatisticMonitoredAttribute
|
[
"919515134@qq.com"
] |
919515134@qq.com
|
d5faa515dcf44a3aa41fdcc93ce1c60c27b0e205
|
e9d1b2db15b3ae752d61ea120185093d57381f73
|
/mytcuml-src/src/java/components/uml_tool_actions_-_class_elements_actions/trunk/mock/com/topcoder/uml/modelmanager/UMLModelManager.java
|
174a88dd94fa9acc1e0eb316b8650b06c21bde09
|
[] |
no_license
|
kinfkong/mytcuml
|
9c65804d511ad997e0c4ba3004e7b831bf590757
|
0786c55945510e0004ff886ff01f7d714d7853ab
|
refs/heads/master
| 2020-06-04T21:34:05.260363
| 2014-10-21T02:31:16
| 2014-10-21T02:31:16
| 25,495,964
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,156
|
java
|
/*
* Copyright (C) 2006 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.uml.modelmanager;
import com.topcoder.uml.model.modelmanagement.ModelImpl;
import com.topcoder.uml.projectconfiguration.ProjectConfigurationManager;
/**
* <p>
* Mock class.
* </p>
*
* @author tushak, TCSDEVELOPER
* @version 1.0
*/
public class UMLModelManager {
/**
* <p>
* Represents the instance name to be used for the singleton instance.
* </p>
*/
public static final String DEFAULT_INSTANCE_NAME = "Default";
/**
* <p>
* Represents the name of this instance. Initialized in one of the
* constructors and never changed afterwards. Can be retrieved by public
* getInstanceName() method.
* </p>
*/
private final String instanceName;
/**
* <p>
* Represents the project language. Initial it is set to null. Can be set in
* the appropriate constructor (UMLModelManager(String, String,
* ProjectConfigurationManager)) or by public setProjectLanguage(..) method
* and retrieved by public getProjectLanguage() method. It is mutable.
* </p>
*/
private String projectLanguage = null;
/**
* <p>
* Represents the static field used to keep an instance of this class:
* UMLModelManager. Used from public static getInstance() method.
* </p>
*/
private static final UMLModelManager umlModelManager = new UMLModelManager();
/**
* <p>
* Represents the model instance. Initialized in one of the constructors
* with default <em>new ModelImpl()</em> and never changed afterwards. Can
* be retrieved by public getModel() method.
* </p>
*/
private final com.topcoder.uml.model.modelmanagement.Model model;
/**
* <p>
* Represents the projectConfigurationManager instance. Initial is set to
* null. Initialized in one of the constructors UMLModelManager(String,
* ProjectConfigurationManager), UMLModelManager(String,
* ProjectConfigurationManager, String) and never changed afterwards; can be
* retrieved by public getProjectConfigurationManager() method.
* </p>
*/
private com.topcoder.uml.projectconfiguration.ProjectConfigurationManager projectConfigurationManager = null;
/**
* <p>
* Default constructor. Initialize the model field with default empty
* ModelImpl and instanceName field with default value
* DEFAULT_INSTANCE_NAME.
* </p>
*/
public UMLModelManager() {
this.model = new ModelImpl();
this.instanceName = DEFAULT_INSTANCE_NAME;
}
/**
* <p>
* Constructor. Initialize the model field with default empty ModelImpl and
* instanceName field with the given value (not null and not empty).
* </p>
*
* @param instanceName
* the new instance name to use
* @throws IllegalArgumentException
* if instanceName is null or empty
*/
public UMLModelManager(String instanceName) {
// your code here
this.model = new ModelImpl();
this.instanceName = instanceName;
}
/**
* <p>
* Simply returns the model field. Not null.
* </p>
*
* @return the Model instance
*/
public com.topcoder.uml.model.modelmanagement.Model getModel() {
return this.model;
}
/**
* <p>
* Simply return the projectConfigurationManager field. If it was not set
* (if it is null) throw a IllegalStateException.
* </p>
*
* @return the ProjectConfigurationManager instance
* @throws IllegalStateException
* if the projectConfigurationManager was not set yet
*/
public com.topcoder.uml.projectconfiguration.ProjectConfigurationManager getProjectConfigurationManager() {
return new ProjectConfigurationManager();
}
/**
* <p>
* Simply return the projectLanguage field. Possible null but can not be
* empty string.
* </p>
*
* @return the projectLanguage field
*/
public String getProjectLanguage() {
return this.projectLanguage;
}
}
|
[
"kinfkong@126.com"
] |
kinfkong@126.com
|
f8718bf4a2d64eb6424441dad0f793e6122d5583
|
327af0dbfeb288cb89ec9b4af33d779ea281ae85
|
/server/jvue-api/src/main/java/net/ccfish/jvue/service/AclResourceService.java
|
09cf8cae3cfaaccf1cf80917984784cfd2a8ed7b
|
[
"MIT"
] |
permissive
|
cyvaction/jvue-admin
|
c394ea6ef426ce9e11e3827f2146245e25d94d6f
|
ab295df2e32914fd71a24d3c2a71a65a7ed62c79
|
refs/heads/master
| 2020-03-23T06:58:18.395129
| 2018-07-06T11:10:40
| 2018-07-06T11:10:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 342
|
java
|
/*
* Copyright © 2013-2019 BaoLaiTong, Co., Ltd. All Rights Reserved.
*/
package net.ccfish.jvue.service;
import java.util.List;
import net.ccfish.jvue.vm.AclResource;
/**
*
* @author 袁贵
* @version 1.0
* @since 1.0
*/
public interface AclResourceService {
String getName(Integer id);
List<AclResource> getAll();
}
|
[
"ccfish@ccfish.net"
] |
ccfish@ccfish.net
|
1c33e16e062bebd2d0abeb4f3bf413731e5a289c
|
3361045f5eb84e3c9b97e6d70a23d89965f00758
|
/app/src/main/java/com/android/mvp/presenter/TestGridFragmentPresenter.java
|
63227e916c0b34a9ded69195c8a5968a2085d5c0
|
[] |
no_license
|
yehuijifeng/MvpFromWork
|
2c28b62477f7da4fd734009d3d12c197ab46552a
|
7efdc5b9dbbe8cbc13a7865f13ac423d64d626b7
|
refs/heads/master
| 2020-05-21T21:03:22.487372
| 2016-10-18T13:18:35
| 2016-10-18T13:18:35
| 63,772,475
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 724
|
java
|
package com.android.mvp.presenter;
import com.android.mvp.model.TestGridModel;
import com.android.mvp.presenter.base.BasePresenter;
import com.android.mvp.view.interfaces.ITestGridView;
import rx.Subscription;
/**
* Created by Luhao on 2016/8/23.
*/
public class TestGridFragmentPresenter extends BasePresenter<ITestGridView> {
private TestGridModel model;
/**
* 每个继承基类的presenter都要去实现构造方法,并传入view层
*
* @param mView
*/
public TestGridFragmentPresenter(ITestGridView mView) {
super(mView);
model = new TestGridModel();
}
public Subscription getGoodsList(int number) {
return model.getGoodsList(number);
}
}
|
[
"928186846@qq.com"
] |
928186846@qq.com
|
9af028f78b9afa2d5d9fa9d288febf44aded2d6d
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/ui/account/RegByFacebookSetPwdUI$2.java
|
8bc219544af40b83b792f2b08919732c91e58c28
|
[] |
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
| 605
|
java
|
package com.tencent.mm.ui.account;
import com.tencent.mm.ui.account.SetPwdUI.a;
/* synthetic */ class RegByFacebookSetPwdUI$2 {
static final /* synthetic */ int[] xQc = new int[a.cop().length];
static {
try {
xQc[a.xSy - 1] = 1;
} catch (NoSuchFieldError e) {
}
try {
xQc[a.xSz - 1] = 2;
} catch (NoSuchFieldError e2) {
}
try {
xQc[a.xSB - 1] = 3;
} catch (NoSuchFieldError e3) {
}
try {
xQc[a.xSA - 1] = 4;
} catch (NoSuchFieldError e4) {
}
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
7457e8c4e55388f57247beaca04a03bd9e2a400b
|
7df40f6ea2209b7d48979465fd8081ec2ad198cc
|
/TOOLS/server/org/apache/http/client/utils/HttpClientUtils.java
|
15051303a17e53a0cc03e9456a69210c124c7b90
|
[
"IJG"
] |
permissive
|
warchiefmarkus/WurmServerModLauncher-0.43
|
d513810045c7f9aebbf2ec3ee38fc94ccdadd6db
|
3e9d624577178cd4a5c159e8f61a1dd33d9463f6
|
refs/heads/master
| 2021-09-27T10:11:56.037815
| 2021-09-19T16:23:45
| 2021-09-19T16:23:45
| 252,689,028
| 0
| 0
| null | 2021-09-19T16:53:10
| 2020-04-03T09:33:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,985
|
java
|
/* */ package org.apache.http.client.utils;
/* */
/* */ import java.io.IOException;
/* */ import org.apache.http.HttpEntity;
/* */ import org.apache.http.HttpResponse;
/* */ import org.apache.http.client.HttpClient;
/* */ import org.apache.http.util.EntityUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class HttpClientUtils
/* */ {
/* */ public static void closeQuietly(HttpResponse response) {
/* 69 */ if (response != null) {
/* 70 */ HttpEntity entity = response.getEntity();
/* 71 */ if (entity != null) {
/* */ try {
/* 73 */ EntityUtils.consume(entity);
/* 74 */ } catch (IOException ex) {}
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void closeQuietly(HttpClient httpClient) {
/* 102 */ if (httpClient != null)
/* 103 */ httpClient.getConnectionManager().shutdown();
/* */ }
/* */ }
/* Location: C:\Users\leo\Desktop\server.jar!\org\apache\http\clien\\utils\HttpClientUtils.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 1.1.3
*/
|
[
"warchiefmarkus@gmail.com"
] |
warchiefmarkus@gmail.com
|
7e08225f9e46949752db228179913650b2cb0353
|
432ed306387288d9bd4055268b1261aa1789dd41
|
/junit5/src/test/java/org/jboss/weld/junit5/explicitInjection/ExplicitParameterInjectionViaClassAnnotationTest.java
|
883e6b7dd82eda57fcbf21e7274cb8d89e3971d9
|
[
"Apache-2.0"
] |
permissive
|
philippkunz/weld-junit
|
e2c1c1ff2a6a624c683befb0adbd3b77d09b9025
|
4160f466d7a5cba132b084800c574534009768de
|
refs/heads/master
| 2023-02-09T22:43:29.593846
| 2020-11-18T14:23:05
| 2020-11-19T10:47:31
| 270,218,631
| 0
| 0
|
Apache-2.0
| 2020-06-07T06:42:37
| 2020-06-07T06:42:37
| null |
UTF-8
|
Java
| false
| false
| 1,983
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2017, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.jboss.weld.junit5.explicitInjection;
import javax.enterprise.inject.Default;
import org.jboss.weld.junit5.ExplicitParamInjection;
import org.jboss.weld.junit5.WeldJunit5Extension;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
/**
*
* @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a>
*/
@ExtendWith(WeldJunit5Extension.class)
@ExplicitParamInjection
public class ExplicitParameterInjectionViaClassAnnotationTest {
@Test
@ExtendWith(CustomExtension.class)
public void testParametersNeedExtraAnnotation(@Default Foo foo, Bar bar, @MyQualifier BeanWithQualifier bean) {
// Bar should be resolved by another extension
Assertions.assertNotNull(bar);
Assertions.assertEquals(CustomExtension.class.getSimpleName(), bar.ping());
// Foo should be resolved as usual
Assertions.assertNotNull(foo);
Assertions.assertEquals(Foo.class.getSimpleName(), foo.ping());
// BeanWithQualifier should be resolved
Assertions.assertNotNull(bean);
Assertions.assertEquals(BeanWithQualifier.class.getSimpleName(), bean.ping());
}
}
|
[
"mkouba@redhat.com"
] |
mkouba@redhat.com
|
d3f4c0709b56d5b3e30a6bf6daf570234c064f60
|
ca5d77dab47156436448994275b8b1d04fb63749
|
/src/main/java/paleoftheancients/thevixen/intent/FlameWheelIntent.java
|
343112adbdf77d6b0c8b63deb30ad8e486f42509
|
[] |
no_license
|
Rita-Bernstein/PaleOfTheAncients
|
a2f7d4ff40cf1ec1e0f77ee7e738244dccd85731
|
7dbbc1f4aa215d044bec196aa9cf780e149ecff4
|
refs/heads/master
| 2020-07-24T15:38:37.097948
| 2019-09-12T05:41:51
| 2019-09-12T05:41:51
| 207,972,109
| 0
| 0
| null | 2019-09-12T05:41:52
| 2019-09-12T05:32:26
| null |
UTF-8
|
Java
| false
| false
| 1,678
|
java
|
package paleoftheancients.thevixen.intent;
import paleoftheancients.PaleMod;
import paleoftheancients.RazIntent.CustomIntent;
import paleoftheancients.thevixen.TheVixenMod;
import paleoftheancients.thevixen.enums.VixenIntentEnum;
import paleoftheancients.thevixen.powers.SunnyDayPower;
import paleoftheancients.thevixen.vfx.SunParticleEffect;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.UIStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.vfx.AbstractGameEffect;
import java.util.ArrayList;
public class FlameWheelIntent extends CustomIntent {
public static final String ID = PaleMod.makeID("flamewheel");
private static final UIStrings uiStrings;
private static final String[] TEXT;
public FlameWheelIntent() {
super(VixenIntentEnum.ATTACK_FLAMEWHEEL, TEXT[0],
TheVixenMod.getResourcePath("ui/intent/flamewheel_L.png"),
TheVixenMod.getResourcePath("ui/intent/flamewheel.png"));
}
@Override
public String description(AbstractMonster mo) {
String result = TEXT[1];
result += mo.getIntentDmg();
result += TEXT[2];
return result;
}
@Override
public float updateVFXInInterval(AbstractMonster mo, ArrayList<AbstractGameEffect> intentVfx) {
if(mo.hasPower(SunnyDayPower.POWER_ID)) {
AbstractGameEffect sb = new SunParticleEffect(mo.intentHb.cX, mo.intentHb.cY);
intentVfx.add(sb);
}
return 0.5F;
}
static {
uiStrings = CardCrawlGame.languagePack.getUIString(ID);
TEXT = uiStrings.TEXT;
}
}
|
[
"razash@gmail.com"
] |
razash@gmail.com
|
77e566a5a31639bf5facdd4fe2be96a1a63b1851
|
c36c9b9ba9df4e90745bcd9fb61dc9cb9f355648
|
/src/test/java/com/github/mauricioaniche/ck/GenericsTest.java
|
57fe9b6cfbf6b47cb1901bc7c776410fd45d99d5
|
[
"Apache-2.0"
] |
permissive
|
linknasubi/ck
|
dcb46ea5df7411e796619d7d4a2a80c1a6aa9ead
|
238f0bc3e614fb66f490b139a50d69fe18efc4eb
|
refs/heads/master
| 2021-01-04T13:54:30.644157
| 2020-02-14T20:21:05
| 2020-02-14T20:21:05
| 240,585,089
| 0
| 0
|
Apache-2.0
| 2020-02-14T19:37:02
| 2020-02-14T19:37:01
| null |
UTF-8
|
Java
| false
| false
| 899
|
java
|
package com.github.mauricioaniche.ck;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.Map;
public class GenericsTest extends BaseTest {
private static Map<String, CKClassResult> report;
@BeforeClass
public static void setUp() {
report = run(fixturesDir() + "/generics");
}
@Test
public void genericMethods() {
CKClassResult r = report.get("bg.Generics");
Assert.assertEquals(2, r.getMethods().size());
// method names are the same, but starting line is different
Assert.assertEquals(1, r.getMethods().stream()
.filter(x -> x.getMethodName().equals("notEmpty/3[T,java.lang.String,java.lang.Object[]]") && x.getStartLine() == 9).count());
Assert.assertEquals(1, r.getMethods().stream()
.filter(x -> x.getMethodName().equals("notEmpty/3[T,java.lang.String,java.lang.Object[]]") && x.getStartLine() == 13).count());
}
}
|
[
"mauricioaniche@gmail.com"
] |
mauricioaniche@gmail.com
|
a8ec4ba9ac828a495f958a3c9a1178ff19020192
|
affe223efe18ba4d5e676f685c1a5e73caac73eb
|
/clients/webservice/src/main/java/com/vmware/vim25/PhysicalNicSpec.java
|
51f684e879db8f45be84adbc41ee3f78b5d32d64
|
[] |
no_license
|
RohithEngu/VM27
|
486f6093e0af2f6df1196115950b0d978389a985
|
f0f4f177210fd25415c2e058ec10deb13b7c9247
|
refs/heads/master
| 2021-01-16T00:42:30.971054
| 2009-08-14T19:58:16
| 2009-08-14T19:58:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,357
|
java
|
/**
* PhysicalNicSpec.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.vmware.vim25;
public class PhysicalNicSpec extends com.vmware.vim25.DynamicData implements
java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private com.vmware.vim25.HostIpConfig ip;
private com.vmware.vim25.PhysicalNicLinkInfo linkSpeed;
public PhysicalNicSpec() {
}
public PhysicalNicSpec(java.lang.String dynamicType,
com.vmware.vim25.DynamicProperty[] dynamicProperty,
com.vmware.vim25.HostIpConfig ip,
com.vmware.vim25.PhysicalNicLinkInfo linkSpeed) {
super(dynamicType, dynamicProperty);
this.ip = ip;
this.linkSpeed = linkSpeed;
}
/**
* Gets the ip value for this PhysicalNicSpec.
*
* @return ip
*/
public com.vmware.vim25.HostIpConfig getIp() {
return ip;
}
/**
* Sets the ip value for this PhysicalNicSpec.
*
* @param ip
*/
public void setIp(com.vmware.vim25.HostIpConfig ip) {
this.ip = ip;
}
/**
* Gets the linkSpeed value for this PhysicalNicSpec.
*
* @return linkSpeed
*/
public com.vmware.vim25.PhysicalNicLinkInfo getLinkSpeed() {
return linkSpeed;
}
/**
* Sets the linkSpeed value for this PhysicalNicSpec.
*
* @param linkSpeed
*/
public void setLinkSpeed(com.vmware.vim25.PhysicalNicLinkInfo linkSpeed) {
this.linkSpeed = linkSpeed;
}
private java.lang.Object __equalsCalc = null;
@Override
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof PhysicalNicSpec)) {
return false;
}
PhysicalNicSpec other = (PhysicalNicSpec) obj;
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj)
&& ((this.ip == null && other.getIp() == null) || (this.ip != null && this.ip
.equals(other.getIp())))
&& ((this.linkSpeed == null && other.getLinkSpeed() == null) || (this.linkSpeed != null && this.linkSpeed
.equals(other.getLinkSpeed())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
@Override
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getIp() != null) {
_hashCode += getIp().hashCode();
}
if (getLinkSpeed() != null) {
_hashCode += getLinkSpeed().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
PhysicalNicSpec.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vim25",
"PhysicalNicSpec"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("ip");
elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "ip"));
elemField.setXmlType(new javax.xml.namespace.QName("urn:vim25",
"HostIpConfig"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("linkSpeed");
elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25",
"linkSpeed"));
elemField.setXmlType(new javax.xml.namespace.QName("urn:vim25",
"PhysicalNicLinkInfo"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return new org.apache.axis.encoding.ser.BeanSerializer(_javaType,
_xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType,
_xmlType, typeDesc);
}
}
|
[
"sankarachary@intalio.com"
] |
sankarachary@intalio.com
|
f61fc21d6d6f1f9579229a0cf0fd7c88f8ec0d9e
|
87f06e4815317aa3c8d4846072ddcbb1e7a2a4e7
|
/core/api/src/main/java/org/onosproject/net/behaviour/NetconfVpnInstAF.java
|
23aa7229eec931902d32fa7d8a36709ae3eb53f7
|
[
"Apache-2.0"
] |
permissive
|
CNlucius/onos
|
7ec5a4e7b6de03ad03afd8c66f6fbf956cee2ca4
|
8eef56cbb62e3a306b801368ceeffa7130776069
|
refs/heads/master
| 2021-01-21T01:20:39.875291
| 2016-07-22T09:11:51
| 2016-07-22T09:11:51
| 62,543,212
| 0
| 4
| null | 2016-07-22T09:11:51
| 2016-07-04T08:03:30
|
Java
|
UTF-8
|
Java
| false
| false
| 2,749
|
java
|
/*
* Copyright 2016-present Open Networking Laboratory
*
* 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.onosproject.net.behaviour;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Objects;
/**
* Represent the object for the xml element of vpnInstAF.
*/
public class NetconfVpnInstAF {
private final String afType;
private final String vrfRD;
private final NetconfVpnTargets vpnTargets;
/**
* NetconfVpnInstAF constructor.
*
* @param afType address family Type
* @param vrfRD vrfRD
* @param vpnTargets vpn targets
*/
public NetconfVpnInstAF(String afType, String vrfRD,
NetconfVpnTargets vpnTargets) {
checkNotNull(afType, "afType cannot be null");
checkNotNull(vrfRD, "vrfRD cannot be null");
checkNotNull(vpnTargets, "vpnTargets cannot be null");
this.afType = afType;
this.vrfRD = vrfRD;
this.vpnTargets = vpnTargets;
}
/**
* Returns afType.
*
* @return afType
*/
public String afType() {
return afType;
}
/**
* Returns vrfRD.
*
* @return vrfRD
*/
public String vrfRD() {
return vrfRD;
}
/**
* Returns vpnTargets.
*
* @return vpnTargets
*/
public NetconfVpnTargets vpnTargets() {
return vpnTargets;
}
@Override
public int hashCode() {
return Objects.hash(afType, vrfRD, vpnTargets);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof NetconfVpnInstAF) {
final NetconfVpnInstAF other = (NetconfVpnInstAF) obj;
return Objects.equals(this.afType, other.afType)
&& Objects.equals(this.vrfRD, other.vrfRD)
&& Objects.equals(this.vpnTargets, other.vpnTargets);
}
return false;
}
@Override
public String toString() {
return toStringHelper(this).add("afType", afType).add("vrfRD", vrfRD)
.add("vpnTargets", vpnTargets).toString();
}
}
|
[
"lishuai12@huawei.com"
] |
lishuai12@huawei.com
|
03a63fd88036800f658e88f54c7198c49f9dc0e0
|
ca43319bb0bfb0a0733bd9a8484dc3041b782188
|
/demo2/src/main/java/com/tomcat/domain/Mapping.java
|
40fb8bdeadec3996b5c6560cb05d21fc9c90c055
|
[] |
no_license
|
zhouwenbin00/tomcat-demo
|
9490c7d161174df73fd8fbfa3382a54e1e0b9521
|
bf1c38d15b2c9622a8c07ae1654e3ac43802ba51
|
refs/heads/master
| 2022-07-10T08:57:30.254351
| 2019-11-12T12:16:42
| 2019-11-12T12:16:42
| 221,209,834
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 888
|
java
|
package com.tomcat.domain;
import java.util.ArrayList;
import java.util.List;
/**
* Created by zwb on 2019/11/12 17:02
*/
public class Mapping {//映射关系 多个路径访问共享资源 servlet-name和url-pattern对应的实体类 多个资源与小名之间的关系
private String name;//servlet-name
private List<String> urlPattern;//url-pattern
public Mapping(String name, List<String> urlPattern) {
this.name = name;
this.urlPattern = urlPattern;
}
public Mapping() {
this.urlPattern = new ArrayList<String>();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<String> getUrlPattern() {
return urlPattern;
}
public void setUrlPattern(List<String> urlPattern) {
this.urlPattern = urlPattern;
}
}
|
[
"2825075112@qq.com"
] |
2825075112@qq.com
|
403cc77ab7f49bec80c8eb3862fc7850f4651d45
|
2895fa73a4d46cb26c4d77af154aaeb63779668b
|
/src/main/java/api/net/darkaqua/blacksmith/api/common/block/BlockMaterialFactory.java
|
635fdaa8a8d4994b67622722901aefb4f9c6e01a
|
[] |
no_license
|
pagoru/Blacksmith-Api
|
bfcfd14485e638834c3b107e0d50873c02a7932e
|
10de3c29470ac0f18dc5f05c8384507f058795e6
|
refs/heads/master
| 2021-05-31T18:12:32.699618
| 2016-03-13T20:31:08
| 2016-03-13T20:31:08
| 42,203,778
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,643
|
java
|
package net.darkaqua.blacksmith.api.common.block;
/**
* Created by cout970 on 28/12/2015.
*/
public class BlockMaterialFactory {
protected static BlockMaterialFactory INSTANCE;
public static IBlockMaterial AIR;
public static IBlockMaterial GRASS;
public static IBlockMaterial GROUND;
public static IBlockMaterial WOOD;
public static IBlockMaterial ROCK;
public static IBlockMaterial IRON;
public static IBlockMaterial ANVIL;
public static IBlockMaterial WATER;
public static IBlockMaterial LAVA;
public static IBlockMaterial LEAVES;
public static IBlockMaterial PLANTS;
public static IBlockMaterial VINE;
public static IBlockMaterial SPONGE;
public static IBlockMaterial CLOTH;
public static IBlockMaterial FIRE;
public static IBlockMaterial SAND;
public static IBlockMaterial CIRCUITS;
public static IBlockMaterial CARPET;
public static IBlockMaterial GLASS;
public static IBlockMaterial REDSTONE_LIGHT;
public static IBlockMaterial TNT;
public static IBlockMaterial CORAL;
public static IBlockMaterial ICE;
public static IBlockMaterial PACKED_ICE;
public static IBlockMaterial SNOW;
public static IBlockMaterial CRAFTED_SNOW;
public static IBlockMaterial CACTUS;
public static IBlockMaterial CLAY;
public static IBlockMaterial GOURD;
public static IBlockMaterial DRAGON_EGG;
public static IBlockMaterial PORTAL;
public static IBlockMaterial CAKE;
public static IBlockMaterial WEB;
public static IBlockMaterial PISTON;
public static IBlockMaterial BARRIER;
//TODO add a factory method
}
|
[
"thecout970@gmail.com"
] |
thecout970@gmail.com
|
b63c983569a6c4ea7813ff1778e19b57e0cc256c
|
be02c59830e77f3829f4e706b12e5e5b529b0403
|
/core/rio/turtle/src/main/java/org/eclipse/rdf4j/rio/turtlestar/TurtleStarParser.java
|
acc1b52053b08ad40d27d3ce0f5a7d24b22692d3
|
[
"MIT",
"BSD-3-Clause",
"CPL-1.0",
"JSON",
"Apache-2.0",
"EPL-1.0",
"MPL-1.1",
"Apache-1.1",
"LicenseRef-scancode-generic-export-compliance"
] |
permissive
|
isabella232/rdf4j
|
3d91090626ea4c8007cc4ca9bc4723e57a6b0ac2
|
2549f873716cf07eb4e8ce597046a8cf3314b55c
|
refs/heads/main
| 2023-03-20T19:28:50.577664
| 2021-03-17T05:05:25
| 2021-03-17T05:05:25
| 349,389,383
| 0
| 0
|
BSD-3-Clause
| 2021-03-19T10:51:03
| 2021-03-19T10:48:25
| null |
UTF-8
|
Java
| false
| false
| 1,720
|
java
|
/*******************************************************************************
* Copyright (c) 2020 Eclipse RDF4J contributors.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*******************************************************************************/
package org.eclipse.rdf4j.rio.turtlestar;
import java.io.IOException;
import org.eclipse.rdf4j.model.Value;
import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
import org.eclipse.rdf4j.rio.RDFFormat;
import org.eclipse.rdf4j.rio.RDFHandlerException;
import org.eclipse.rdf4j.rio.RDFParseException;
import org.eclipse.rdf4j.rio.turtle.TurtleParser;
/**
* RDF parser for Turtle* (an extension of Turtle that adds RDF* support).
*
* @author Pavel Mihaylov
*/
public class TurtleStarParser extends TurtleParser {
/**
* Creates a new TurtleStarParser that will use a {@link SimpleValueFactory} to create RDF* model objects.
*/
public TurtleStarParser() {
super();
}
/**
* Creates a new TurtleStarParser that will use the supplied ValueFactory to create RDF* model objects.
*
* @param valueFactory A ValueFactory.
*/
public TurtleStarParser(ValueFactory valueFactory) {
super(valueFactory);
}
@Override
public RDFFormat getRDFFormat() {
return RDFFormat.TURTLESTAR;
}
@Override
protected Value parseValue() throws IOException, RDFParseException, RDFHandlerException {
if (peekIsTripleValue()) {
return parseTripleValue();
}
return super.parseValue();
}
}
|
[
"jeen.broekstra@gmail.com"
] |
jeen.broekstra@gmail.com
|
c3e550f7692bd603a8f3ef976383b3f66da98ef0
|
cb6eb6d9dad3d49744cd7000050859b9517133fa
|
/test/pieces/BishopTest.java
|
17f88f01d06f7a93f0a0d46648f6be3940f50713
|
[] |
no_license
|
javajigi/next-chessgame
|
dc22d40fc65b52f2eb9e688d2e7d66a391d59026
|
309c17af77977ae916a6dfb3ef60c91b33c1ae55
|
refs/heads/master
| 2021-01-19T10:20:13.276942
| 2014-07-14T06:40:24
| 2014-07-14T06:40:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 389
|
java
|
package pieces;
import java.util.List;
import pieces.Piece.Color;
import junit.framework.TestCase;
public class BishopTest extends TestCase {
public void testPossibleMoves() throws Exception {
Position pos = new Position("a3");
Bishop bishop = new Bishop(Color.BLACK, pos);
List<Position> possibleMoves = bishop.getPossibleMoves();
assertEquals(7, possibleMoves.size());
}
}
|
[
"javajigi@gmail.com"
] |
javajigi@gmail.com
|
3f113c9504cf5432f7cbb78eeb1155aec4764a0d
|
f5dc228c5100440e9afb631e60412c2ca97a3604
|
/ConsumptionAnalysis/src/main/java/com/myapp/consumptionanalysis/web/querypage/emptyplaceholders/ColumnInfoPanel.java
|
979fa6a9b30ac99a8f87276dfdb12415e5c60b0e
|
[] |
no_license
|
Letractively/chunksofcode
|
f68545d41c61edc6288ad4e43ff98cdb517d11fd
|
9a730a6ac42286ce09a1ed889a00ab11548256cf
|
refs/heads/master
| 2021-01-10T16:54:45.350552
| 2012-12-10T19:49:01
| 2012-12-10T19:49:01
| 46,038,975
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,197
|
java
|
package com.myapp.consumptionanalysis.web.querypage.emptyplaceholders;
import java.util.Iterator;
import org.apache.log4j.Logger;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import com.myapp.consumptionanalysis.config.Table;
import com.myapp.consumptionanalysis.web.querypage.DisplayQueryPage;
@SuppressWarnings({ "serial" })
public class ColumnInfoPanel extends Panel
{
@SuppressWarnings({ "unused" })
private static Logger log = Logger.getLogger(ColumnInfoPanel.class);
public ColumnInfoPanel(String id, DisplayQueryPage queryPage2) {
super(id);
Table anyTable = queryPage2.getConfig().getSelectionConfig().getTables().get(0);
StringBuilder msg = new StringBuilder();
for (Iterator<Integer> i = anyTable.getValueColumnExpr().keySet().iterator(); i.hasNext();) {
String valueColumnLabel = anyTable.getValueColumnLabel(i.next());
msg.append(valueColumnLabel);
if (i.hasNext()) {
msg.append(", ");
}
}
add(new Label("columnInfo", msg.toString()));
setOutputMarkupId(true); // avoid js errors
}
}
|
[
"andre.ragg@92fd951c-2788-16aa-bc7f-2090130f54c4"
] |
andre.ragg@92fd951c-2788-16aa-bc7f-2090130f54c4
|
c3b66f91eb93c0ab7242e4c05ce7715d7470f246
|
e50b5bd585cdd2efaa16b180f60a4eea13db9180
|
/nsjp-persistencia/src/main/java/mx/gob/segob/nsjp/dao/documento/MandamientoAdjuntosDAO.java
|
817d7d28c3f3dd9c898907c98f40eb9f47fa086e
|
[] |
no_license
|
RichichiDomotics/defensoria
|
bc885d73ec7f99d685f7e56cde1f63a52a3e8240
|
2a87a841ae5cf47fbe18abf7651c2eaa8b481786
|
refs/heads/master
| 2016-09-03T01:00:51.529702
| 2015-03-31T01:44:15
| 2015-03-31T01:44:15
| 32,884,521
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,580
|
java
|
/**
* Nombre del Programa : MandamientoAdjuntosDAO.java
* Autor : vaguirre
* Compania : Ultrasist
* Proyecto : NSJP Fecha: 1 Sep 2011
* Marca de cambio : N/A
* Descripcion General : Describir el objetivo de la clase de manera breve
* Programa Dependiente :N/A
* Programa Subsecuente :N/A
* Cond. de ejecucion :N/A
* Dias de ejecucion :N/A Horario: N/A
* MODIFICACIONES
*------------------------------------------------------------------------------
* Autor :N/A
* Compania :N/A
* Proyecto :N/A Fecha: N/A
* Modificacion :N/A
*------------------------------------------------------------------------------
*/
package mx.gob.segob.nsjp.dao.documento;
import java.util.List;
import mx.gob.segob.nsjp.dao.base.GenericDao;
import mx.gob.segob.nsjp.model.Documento;
import mx.gob.segob.nsjp.model.MandamientoAdjuntos;
import mx.gob.segob.nsjp.model.MandamientoAdjuntosId;
/**
* Describir el objetivo de la clase con punto al final.
* @version 1.0
* @author vaguirre
*
*/
public interface MandamientoAdjuntosDAO extends GenericDao<MandamientoAdjuntos, MandamientoAdjuntosId> {
/**
* Consulta los documentos asociados a un mandamiento, por el filtro
* mandamientoId
*
* @param mandamientoId
* @return
*/
List<Documento> consultarDocumentoMandamientoAdjuntoPorMandamientoId(Long mandamientoId);
}
|
[
"larryconther@gmail.com"
] |
larryconther@gmail.com
|
c7024dc568d2d089efc320721b1a0958351ca58a
|
091c6d40da2150206c70f665b3c9552e2a23bcc5
|
/ex/app/extended/example/dom/src/main/java/org/incode/domainapp/example/dom/demo/dom/reminder/DemoReminderMenu.java
|
39c7edd6ae16dfe3efbd90ae36e575ddbb74155e
|
[
"Apache-2.0"
] |
permissive
|
marcusvb/incode-platform
|
6071c03f7bccfaa40d634d7d92f353f85744f13f
|
3dcaa10bf91257de2c6b762b77283f962ed8cd0c
|
refs/heads/master
| 2021-05-04T13:48:21.423279
| 2018-02-08T17:36:22
| 2018-02-08T17:36:22
| 120,320,959
| 2
| 0
| null | 2018-02-05T15:11:16
| 2018-02-05T15:11:16
| null |
UTF-8
|
Java
| false
| false
| 1,423
|
java
|
package org.incode.domainapp.example.dom.demo.dom.reminder;
import java.util.List;
import org.apache.isis.applib.DomainObjectContainer;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.DomainService;
import org.apache.isis.applib.annotation.DomainServiceLayout;
import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.Parameter;
import org.apache.isis.applib.annotation.SemanticsOf;
@DomainService(
nature = NatureOfService.VIEW_MENU_ONLY,
objectType = "exampleDemo.DemoReminderMenu"
)
@DomainServiceLayout(
named = "Dummy",
menuOrder = "20.6"
)
public class DemoReminderMenu {
@MemberOrder(sequence = "40")
public DemoReminder newReminder(
@Parameter(regexPattern = "\\w[@&:\\-\\,\\.\\+ \\w]*")
final String description,
final String documentationPage) {
final DemoReminder reminder = new DemoReminder(description, documentationPage);
container.persist(reminder);
container.flush();
return reminder;
}
@Action(semantics = SemanticsOf.SAFE)
@MemberOrder(sequence = "50")
public List<DemoReminder> listAllReminders() {
return container.allInstances(DemoReminder.class);
}
@javax.inject.Inject
DomainObjectContainer container;
}
|
[
"dan@haywood-associates.co.uk"
] |
dan@haywood-associates.co.uk
|
b76950755bfbabc1e6779e59069f46868205b7cf
|
97ead6dfbe1a6b569be08f7cd247161bc0a73121
|
/net/net-api/src/main/java/com/redshape/net/ServerType.java
|
9e4be938f7e245a7c7c06447de0719b351eeb9ac
|
[
"Apache-2.0"
] |
permissive
|
Redshape/Redshape-AS
|
19f54bc0d54061b0302a7b3f63e600afb01168ea
|
cf3492919a35b868bc7045b35d38e74a3a2b8c01
|
refs/heads/master
| 2021-01-17T05:17:31.881177
| 2012-09-05T13:49:50
| 2012-09-05T13:49:50
| 1,390,510
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,791
|
java
|
package com.redshape.net;
import com.redshape.utils.IEnum;
import java.util.HashMap;
import java.util.Map;
/**
* @author nikelin
* @date 12:58
*/
public class ServerType implements IEnum<String> {
private static final Map<String, ServerType> REGISTRY = new HashMap<String, ServerType>();
private String code;
protected ServerType( String code ) {
this.code = code;
REGISTRY.put(code, this);
}
public static final ServerType UNIX = new ServerType("Server.Type.UNIX");
public static final ServerType WINDOWS = new ServerType("Server.Type.WINDOWS");
public static final ServerType UNKNOWN = new ServerType("Server.Type.UNKNOWN");
public static ServerType valueOf( String name ) {
return REGISTRY.get(name);
}
public static ServerType[] values() {
return REGISTRY.values().toArray( new ServerType[REGISTRY.size()] );
}
@Override
public String name() {
return this.code;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ServerType)) return false;
ServerType that = (ServerType) o;
if (code != null ? !code.equals(that.code) : that.code != null) return false;
return true;
}
@Override
public int hashCode() {
return code != null ? code.hashCode() : 0;
}
public static ServerType detectFamily( String platformName ) {
final String normalizedName = platformName.toLowerCase();
if ( normalizedName.contains("windows") ) {
return WINDOWS;
} else if ( normalizedName.contains("freebsd") || normalizedName.contains("linux") || normalizedName.contains("unix") ) {
return UNIX;
}
return UNKNOWN;
}
}
|
[
"self@nikelin.ru"
] |
self@nikelin.ru
|
33bdd9cc2052bb2e432b3a40b20c1d8068926e8f
|
50750fbff439ace4a514c18ab825b9e13a24b0aa
|
/pegasus-spyware-decompiled/sample4/recompiled_java/sources/org/apache/commons/httpclient/auth/MalformedChallengeException.java
|
b642988ed47473a00f817a957e755cb7699161fc
|
[
"MIT"
] |
permissive
|
GypsyBud/pegasus_spyware
|
3066ae7d217a7d4b23110326f75bf6cf63737105
|
b40f5e4bdf5bd01c21e8ef90ebe755b29c2daa68
|
refs/heads/master
| 2023-06-24T05:44:01.354811
| 2021-07-31T18:59:26
| 2021-07-31T18:59:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 422
|
java
|
package org.apache.commons.httpclient.auth;
import org.apache.commons.httpclient.ProtocolException;
public class MalformedChallengeException extends ProtocolException {
public MalformedChallengeException() {
}
public MalformedChallengeException(String message) {
super(message);
}
public MalformedChallengeException(String message, Throwable cause) {
super(message, cause);
}
}
|
[
"jonathanvill00@gmail.com"
] |
jonathanvill00@gmail.com
|
385d21857be340e8ce2e0e6cee568ef784feb21e
|
26183990a4c6b9f6104e6404ee212239da2d9f62
|
/components/review_feedback_management/src/java/main/com/topcoder/management/reviewfeedback/ReviewFeedbackManager.java
|
66b62c3a9f1d05b6796a4c1ba43445818c84c6c5
|
[] |
no_license
|
topcoder-platform/tc-java-components
|
34c5798ece342a9f1804daeb5acc3ea4b0e0765b
|
51b204566eb0df3902624c15f4fb69b5f99dc61b
|
refs/heads/dev
| 2023-08-08T22:09:32.765506
| 2022-02-25T06:23:56
| 2022-02-25T06:23:56
| 138,811,944
| 0
| 8
| null | 2022-02-23T21:06:12
| 2018-06-27T01:10:36
|
Rich Text Format
|
UTF-8
|
Java
| false
| false
| 7,066
|
java
|
/*
* Copyright (C) 2012, 2013 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.management.reviewfeedback;
import java.util.List;
/**
* <p>
* This is a DAO for ReviewFeedback. It provides CRUD operations for managing the ReviewFeedback entities in
* persistence. Please note that ReviewFeedbackDetail entities, aggregated by ReviewFeedback entity, are also managed by
* this DAO. However, the interface of all CRUD operations of this DAO works with the ReviewFeedback class (the data for
* ReviewFeedbackDetail class will be accessed through ReviewFeedback entity).
* </p>
*
* <p>
* <em>Changes in 2.0:</em>
* <ol>
* <li>Updated class documentation.</li>
* <li>New "operator:String" argument is added to create() and update() methods in order to support auditing, and return
* value is added to update() method.</li>
* </ol>
* </p>
*
* <p>
* <strong>Thread safety</strong>: Implementations are required to be thread-safe with assumption that caller uses
* method arguments thread safely.
* </p>
*
* @author gevak, amazingpig, hesibo, sparemax
* @version 2.0
*/
public interface ReviewFeedbackManager {
/**
* <p>
* Creates given entity (along with its details records) in persistence.
* </p>
*
* <p>
* <em>Changes in 2.0:</em>
* <ol>
* <li>Documentation is updated according to the new data model and new audit requirements.</li>
* <li>New "operator:String" argument is added in order to support auditing.</li>
* </ol>
* </p>
*
* @param entity
* Entity to be created in persistence. Its original Id property will be ignored and after successful
* execution, it will be populated with newly generated identity. Its original audit-related properties
* (CreateUser, CreateDate, ModifyUser, ModifyDate) will be ignored, they all will be populated by this
* method. It must be not null. Its Comment property but be not empty (but may be null). Its Details
* property must be not null (but may be empty) and each of its elements (if any) must conform to all of
* the following validation rules:
* <ol>
* <li>Must be not null.</li>
* <li>Its ReviewerUserId property must contain not more than 10 significant decimal digits and must be
* unique across all entity.Details elements.</li>
* <li>Its FeedbackText property must be not null and not empty.</li>
* </ol>
* @param operator
* Specifies user who is performing this operation. Must be not null and not empty.
*
* @return Entity created in persistence (some of its properties will be populated as per method argument
* documentation). Not null.
*
* @throws IllegalArgumentException
* if any argument is invalid (as per argument description above).
* @throws ReviewFeedbackManagementPersistenceException
* if any issue occurs with persistence.
* @throws ReviewFeedbackManagementException
* if any other error occurs.
*/
public ReviewFeedback create(ReviewFeedback entity, String operator) throws ReviewFeedbackManagementException;
/**
* <p>
* Updates given entity (along with associations to details records) in persistence.
* </p>
*
* <p>
* <em>Changes in 2.0:</em>
* <ol>
* <li>Documentation is updated according to the new data model and new audit requirements.</li>
* <li>New "operator:String" argument is added in order to support auditing.</li>
* <li>Return value is added.</li>
* </ol>
* </p>
*
* @param entity
* Entity to be updated in persistence. Its Id property will be used to identify (find) entity in
* persistence. Its original audit-related properties (CreateUser, CreateDate, ModifyUser, ModifyDate)
* will be ignored, ModifyUser and ModifyDate will be populated by this method. It must be not null. Its
* Comment property but be not empty (but may be null). Its Details property must be not null (but may be
* empty) and each of its elements (if any) must conform to all of the following validation rules:
* <ol>
* <li>Must be not null.</li>
* <li>Its ReviewerUserId property must contain not more than 10 significant decimal digits and must be
* unique across all entity.Details elements.</li>
* <li>Its FeedbackText property must be not null and not empty.</li>
* </ol>
* @param operator
* Specifies user who is performing this operation. Must be not null and not empty.
*
* @return Updated entity. Not null.
*
* @throws IllegalArgumentException
* if any argument is invalid (as per argument description above).
* @throws ReviewFeedbackManagementEntityNotFoundException
* if review feedback entity with specified identity is not found in persistence.
* @throws ReviewFeedbackManagementPersistenceException
* if any issue occurs with persistence.
* @throws ReviewFeedbackManagementException
* if any other error occurs.
*/
public ReviewFeedback update(ReviewFeedback entity, String operator) throws ReviewFeedbackManagementException;
/**
* Retrieves entity with given ID from persistence.
*
* @param id
* ID of entity to retrieve.
* @return Retrieved entity. Null if entity with specified ID is not found in persistence.
* @throws ReviewFeedbackManagementPersistenceException
* If any issue occurs with persistence.
* @throws ReviewFeedbackManagementException
* If any other error occurs.
*/
public ReviewFeedback get(long id) throws ReviewFeedbackManagementException;
/**
* Deletes entity with given ID from persistence.
*
* @param id
* ID of entity to delete.
* @return true if entity was found and deleted, false if entity was not found.
* @throws ReviewFeedbackManagementPersistenceException
* If any issue occurs with persistence.
* @throws ReviewFeedbackManagementException
* If any other error occurs.
*/
public boolean delete(long id) throws ReviewFeedbackManagementException;
/**
* Retrieves entities with given project ID from persistence.
*
* @param projectId
* the project ID
*
* @return a list of retrieved entities
*
* @throws ReviewFeedbackManagementPersistenceException
* If any issue occurs with persistence.
* @throws ReviewFeedbackManagementException
* If any other error occurs.
*/
public List<ReviewFeedback> getForProject(long projectId) throws ReviewFeedbackManagementException;
}
|
[
"pvmagacho@gmail.com"
] |
pvmagacho@gmail.com
|
cf52fa60850adffb434b154f484dcdeeca15f95a
|
1cd77e4f318164c4309f2cb72e5e51d72a14c1a1
|
/app/src/main/java/com/ruslanlyalko/pl/presentation/widget/elasticdrag/ViewUtils.java
|
00e0ee83833245a984d382997dbf301a59c9fd5d
|
[] |
no_license
|
ruslanlyalko/pl
|
ca691c0b2a036a2e8ae50c31ddb3dbaefd13a9f9
|
0f62c625a774acdb111cee03b0de4a6c115525fa
|
refs/heads/master
| 2020-04-21T14:43:35.524228
| 2019-02-09T07:31:28
| 2019-02-09T07:31:28
| 169,644,579
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 755
|
java
|
package com.ruslanlyalko.pl.presentation.widget.elasticdrag;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.support.annotation.NonNull;
import android.util.DisplayMetrics;
public class ViewUtils {
private ViewUtils() { }
public static boolean isNavBarOnBottom(@NonNull Context context) {
final Resources res = context.getResources();
final Configuration cfg = context.getResources().getConfiguration();
final DisplayMetrics dm = res.getDisplayMetrics();
boolean canMove = (dm.widthPixels != dm.heightPixels &&
cfg.smallestScreenWidthDp < 600);
return (!canMove || dm.widthPixels < dm.heightPixels);
}
}
|
[
"ruslan.lyalko2@gmail.com"
] |
ruslan.lyalko2@gmail.com
|
c364ebcd8b7e9a765a34278c24adca1ee87b8256
|
d5ebdde0380bedbbc80888f82dd31005469d3058
|
/src/test/java/org/acme/getting/started/country/RegularCountriesServiceTest.java
|
1eee9e350460cb7728e9335c1f13186baf9f8176
|
[] |
no_license
|
anamarija/quarkus-test-demo
|
c3f15feb10825afb4f86779bff0ece5808d662cf
|
f3480f7c590b898da0827c3aaa394f467e17b8a1
|
refs/heads/main
| 2023-05-07T11:04:58.180941
| 2021-05-21T15:11:56
| 2021-05-21T15:11:56
| 369,555,151
| 0
| 0
| null | 2021-05-21T14:06:38
| 2021-05-21T14:06:37
| null |
UTF-8
|
Java
| false
| false
| 710
|
java
|
package org.acme.getting.started.country;
import javax.inject.Inject;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
@QuarkusTest
@QuarkusTestResource(WiremockCountries.class)
class RegularCountriesServiceTest {
@Inject
@RestClient
CountriesService countriesService;
@Test
void testGR() {
// assertThat(countriesService.getByName("GR")).hasSize(10).extracting("name").contains("Greece");
assertThat(countriesService.getByName("GR")).hasSize(1).extracting("name").contains("Ελλάδα");
}
}
|
[
"geoand@gmail.com"
] |
geoand@gmail.com
|
c0b047511c81119e2283675ea6d4031d7e9fd07c
|
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
|
/sources/kotlin/reflect/jvm/internal/impl/types/typesApproximation/C3837x21acc51c.java
|
976005cfd4f45793929d8e023bcb3c58e896dbf4
|
[] |
no_license
|
sengeiou/KnowAndGo-android-thunkable
|
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
|
39e809d0bbbe9a743253bed99b8209679ad449c9
|
refs/heads/master
| 2023-01-01T02:20:01.680570
| 2020-10-22T04:35:27
| 2020-10-22T04:35:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,084
|
java
|
package kotlin.reflect.jvm.internal.impl.types.typesApproximation;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.reflect.jvm.internal.impl.resolve.calls.inference.CapturedTypeConstructorKt;
import kotlin.reflect.jvm.internal.impl.types.UnwrappedType;
/* renamed from: kotlin.reflect.jvm.internal.impl.types.typesApproximation.CapturedTypeApproximationKt$approximateCapturedTypesIfNecessary$1 */
/* compiled from: CapturedTypeApproximation.kt */
final class C3837x21acc51c extends Lambda implements Function1<UnwrappedType, Boolean> {
public static final C3837x21acc51c INSTANCE = new C3837x21acc51c();
C3837x21acc51c() {
super(1);
}
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
return Boolean.valueOf(invoke((UnwrappedType) obj));
}
public final boolean invoke(UnwrappedType unwrappedType) {
Intrinsics.checkExpressionValueIsNotNull(unwrappedType, "it");
return CapturedTypeConstructorKt.isCaptured(unwrappedType);
}
}
|
[
"joshuahj.tsao@gmail.com"
] |
joshuahj.tsao@gmail.com
|
dcc12586e4cf54dbfb32b61862b43b8055aa459a
|
2d3ab742d830ea30b702c186d61d34cf8c324183
|
/geekbang/design-pattern/src/main/java/todo/java/geekbang/designpattern/structural/bridge/EmailMsgSender.java
|
8b829f613fc3d3628bc6c7ada17c1a46fb344f10
|
[
"MIT"
] |
permissive
|
jianchengwang/todo-java
|
39893627fc9e1250b50c41f34a2b13c90d98de2c
|
0b697590fd7f08027844c00abb352c2fddc18175
|
refs/heads/main
| 2023-08-28T03:30:20.723137
| 2023-08-01T07:16:50
| 2023-08-01T07:16:50
| 175,554,847
| 1
| 0
|
MIT
| 2023-06-14T22:34:00
| 2019-03-14T05:34:19
|
Java
|
UTF-8
|
Java
| false
| false
| 400
|
java
|
package todo.java.geekbang.designpattern.structural.bridge;
import java.util.List;
/**
* @author jianchengwang
* @date 2023/6/14
*/
public class EmailMsgSender implements MsgSender {
private List<String> emailAddresses;
public EmailMsgSender(List<String> emailAddresses) {
this.emailAddresses = emailAddresses;
}
@Override
public void send(String message) {
}
}
|
[
"jiancheng_wang@yahoo.com"
] |
jiancheng_wang@yahoo.com
|
19b53b73ab756c0bbad728074024cb323c84dd73
|
9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5
|
/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/quests/Q00691_MatrasSuspiciousRequest/Q00691_MatrasSuspiciousRequest.java
|
0ab5331db069278398e5978c9a2417b2778867d2
|
[] |
no_license
|
BETAJIb/ikol
|
73018f8b7c3e1262266b6f7d0a7f6bbdf284621d
|
f3709ea10be2d155b0bf1dee487f53c723f570cf
|
refs/heads/master
| 2021-01-05T10:37:17.831153
| 2019-12-24T22:23:02
| 2019-12-24T22:23:02
| 240,993,482
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,912
|
java
|
/*
* This file is part of the L2J Mobius 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 quests.Q00691_MatrasSuspiciousRequest;
import java.util.HashMap;
import java.util.Map;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Matras' Suspicious Request (691)
* @author GKR
*/
public class Q00691_MatrasSuspiciousRequest extends Quest
{
// NPC
private static final int MATRAS = 32245;
// Items
private static final int RED_GEM = 10372;
private static final int DYNASTY_SOUL_II = 10413;
// Reward
private static final Map<Integer, Integer> REWARD_CHANCES = new HashMap<>();
static
{
REWARD_CHANCES.put(22363, 890);
REWARD_CHANCES.put(22364, 261);
REWARD_CHANCES.put(22365, 560);
REWARD_CHANCES.put(22366, 560);
REWARD_CHANCES.put(22367, 190);
REWARD_CHANCES.put(22368, 129);
REWARD_CHANCES.put(22369, 210);
REWARD_CHANCES.put(22370, 787);
REWARD_CHANCES.put(22371, 257);
REWARD_CHANCES.put(22372, 656);
}
// Misc
private static final int MIN_LEVEL = 76;
public Q00691_MatrasSuspiciousRequest()
{
super(691);
addStartNpc(MATRAS);
addTalkId(MATRAS);
addKillId(REWARD_CHANCES.keySet());
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "32245-02.htm":
case "32245-11.html":
{
htmltext = event;
break;
}
case "32245-04.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "take_reward":
{
if (qs.isStarted())
{
final int gemsCount = qs.getInt("submitted_gems");
if (gemsCount >= 744)
{
qs.set("submitted_gems", Integer.toString(gemsCount - 744));
giveItems(player, DYNASTY_SOUL_II, 1);
htmltext = "32245-09.html";
}
else
{
htmltext = getHtm(player, "32245-10.html").replace("%itemcount%", qs.get("submitted_gems"));
}
}
break;
}
case "32245-08.html":
{
if (qs.isStarted())
{
final int submittedCount = qs.getInt("submitted_gems");
final int broughtCount = (int) getQuestItemsCount(player, RED_GEM);
final int finalCount = submittedCount + broughtCount;
takeItems(player, RED_GEM, broughtCount);
qs.set("submitted_gems", Integer.toString(finalCount));
htmltext = getHtm(player, "32245-08.html").replace("%itemcount%", Integer.toString(finalCount));
}
break;
}
case "32245-12.html":
{
if (qs.isStarted())
{
giveAdena(player, (qs.getInt("submitted_gems") * 10000), true);
qs.exitQuest(true, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
{
final PlayerInstance pl = getRandomPartyMember(player, 1);
if (pl == null)
{
return super.onKill(npc, player, isSummon);
}
int chance = (int) (Config.RATE_QUEST_DROP * REWARD_CHANCES.get(npc.getId()));
final int numItems = Math.max((chance / 1000), 1);
chance = chance % 1000;
if (getRandom(1000) <= chance)
{
giveItems(player, RED_GEM, numItems);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
return super.onKill(npc, player, isSummon);
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
htmltext = (player.getLevel() >= MIN_LEVEL) ? "32245-01.htm" : "32245-03.html";
break;
}
case State.STARTED:
{
if (hasQuestItems(player, RED_GEM))
{
htmltext = "32245-05.html";
}
else if (qs.getInt("submitted_gems") > 0)
{
htmltext = getHtm(player, "32245-07.html").replace("%itemcount%", qs.get("submitted_gems"));
}
else
{
htmltext = "32245-06.html";
}
break;
}
}
return htmltext;
}
}
|
[
"mobius@cyber-wizard.com"
] |
mobius@cyber-wizard.com
|
c3c3a8c1c26fe44b634c3e7f173bb2e30f047bc3
|
3aa1b9f5c3ced6014277099992ec087071f8217f
|
/rbac-service/src/main/java/com/rbac/web/UserController.java
|
711480704d27559e7c2aba2e613ad881b74668de
|
[] |
no_license
|
geekymv/rbac
|
fd9ee08caf96a8b19edbe0b3a81d1bf8eab4255b
|
a75b05dfe4965700c8e4119db43da38f8ef740a4
|
refs/heads/master
| 2022-06-27T19:15:02.676159
| 2020-03-07T13:58:26
| 2020-03-07T13:58:26
| 245,564,728
| 0
| 0
| null | 2022-06-21T02:56:13
| 2020-03-07T03:58:57
|
Java
|
UTF-8
|
Java
| false
| false
| 1,382
|
java
|
package com.rbac.web;
import com.rbac.base.BaseController;
import com.rbac.model.User;
import com.rbac.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/user")
@Api(value = "用户管理", description = "用户接口")
public class UserController extends BaseController {
@Autowired
private UserService userService;
@PostMapping("/list")
public List<User> list(User user) {
return null;
}
@ApiOperation(value = "新增用户", notes = "新增用户接口")
@PostMapping("/add")
public User addUser(@RequestBody User user) {
return userService.add(user);
}
@ApiOperation(value = "根据id查询用户", notes = "根据id查询用户接口")
@GetMapping("/{id}")
public User getUser(@PathVariable("id") String userId) {
return userService.getUserInfo(userId);
}
}
|
[
"ym2011678@foxmail.com"
] |
ym2011678@foxmail.com
|
01afd2bf2a3445fca7cc223b5f4fb8a835adde74
|
7af3513bde7c996100601ac417dd2bf45d140bc9
|
/config/src/main/java/com/oop/inteliframework/config/node/NodeValuable.java
|
7d1e3cbde2282ce58c37d47ca515e2beb18f5245
|
[] |
no_license
|
MaxWainer/inteli-framework
|
bca0a0dd2e882375116fed3bba9cbb765576c08e
|
448256e8a5ae1931538bcfb935980d8db8a161d9
|
refs/heads/master
| 2023-07-08T11:17:07.932339
| 2021-01-23T17:52:17
| 2021-01-23T17:52:17
| 332,197,584
| 0
| 0
| null | 2021-03-06T09:04:34
| 2021-01-23T11:49:31
|
Java
|
UTF-8
|
Java
| false
| false
| 801
|
java
|
package com.oop.inteliframework.config.node;
import lombok.Getter;
import lombok.NonNull;
import lombok.experimental.Accessors;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Optional;
@Accessors(fluent = true)
public class NodeValuable extends BaseNode {
@NonNull
@Getter
private final Object value;
public NodeValuable(String key, @Nullable ParentableNode parent, @NonNull Object value) {
super(key, parent);
this.value = value;
}
@Override
public boolean isParentable() {
return false;
}
@Override
public Optional<ParentableNode> asParentable() {
return Optional.empty();
}
@Override
public Optional<NodeValuable> asValuable() {
return Optional.of(this);
}
}
|
[
"oskardhavel@gmail.com"
] |
oskardhavel@gmail.com
|
6e98f247b9e7c930b32f76ec0acbdb75d7bef6a0
|
7d0e096aa6ccb65cfc185ec35d344689b7bc07e4
|
/springboot-fastjson/src/main/java/com/secbro2/controller/UserController.java
|
57b29e702224304a749d15277ca902bd361f5f16
|
[] |
no_license
|
secbr/springboot-all
|
89bad6bcd350da2bdcfd36b6e2332a074e417244
|
8f7413e591e2a5f12074a67eeba6ef6674bbf513
|
refs/heads/master
| 2022-08-24T09:40:35.197236
| 2022-08-02T02:21:30
| 2022-08-02T02:21:30
| 178,757,985
| 28
| 22
| null | 2022-07-31T11:01:25
| 2019-04-01T00:31:28
|
Java
|
UTF-8
|
Java
| false
| false
| 505
|
java
|
package com.secbro2.controller;
import com.secbro2.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @author sec
* @version 1.0
* @date 2020/1/7 9:18 AM
**/
@Controller
public class UserController {
@ResponseBody
@RequestMapping
public User getUserInfo() {
User user = new User();
user.setUserId(1);
user.setUsername("Tom");
return user;
}
}
|
[
"xinyoulingxi2008@126.com"
] |
xinyoulingxi2008@126.com
|
b3b1e2a8936822f2739eb4a2a8127900d9b6b714
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/20/20_0b15a9fa579d7bfb82f112c933634a7fd47154e6/SweetHome3DBootstrap/20_0b15a9fa579d7bfb82f112c933634a7fd47154e6_SweetHome3DBootstrap_s.java
|
dd31adb71071e16c812b73c12b0d7ab5c2211919
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,125
|
java
|
/*
* SweetHome3DBootstrap.java 2 sept. 07
*
* Copyright (c) 2007 Emmanuel PUYBARET / eTeks <info@eteks.com>. 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.eteks.sweethome3d;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.eteks.sweethome3d.tools.ExtensionsClassLoader;
/**
* This bootstrap class loads Sweet Home 3D application classes from jars in classpath
* or from extension jars stored as resources.
* @author Emmanuel Puybaret
*/
public class SweetHome3DBootstrap {
public static void main(String [] args) throws MalformedURLException, IllegalAccessException,
InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
Class sweetHome3DBootstrapClass = SweetHome3DBootstrap.class;
List<String> extensionJarsAndDlls = new ArrayList<String>(Arrays.asList(new String [] {
"iText-2.1.5.jar", // Jars included in Sweet Home 3D executable jar file
"freehep-vectorgraphics-svg-2.1.1.jar",
"Loader3DS1_2u.jar",
"sunflow-0.07.3f.jar",
"jmf.jar",
"jnlp.jar",
"j3dcore.jar", // Main Java 3D jars
"vecmath.jar",
"j3dutils.jar",
"macosx/gluegen-rt.jar", // Mac OS X jars and DLLs
"macosx/jogl.jar",
"macosx/libgluegen-rt.jnilib",
"macosx/libjogl.jnilib",
"macosx/libjogl_awt.jnilib",
"macosx/libjogl_cg.jnilib"}));
if ("64".equals(System.getProperty("sun.arch.data.model"))) {
extensionJarsAndDlls.add("linux/x64/libj3dcore-ogl.so"); // Linux 64 bits DLLs
extensionJarsAndDlls.add("windows/x64/j3dcore-ogl.dll"); // Windows 64 bits DLLs
} else {
extensionJarsAndDlls.add("linux/i386/libj3dcore-ogl.so"); // Linux 32 bits DLLs
extensionJarsAndDlls.add("linux/i386/libj3dcore-ogl-cg.so"); // Windows 32 bits DLLs
extensionJarsAndDlls.add("windows/i386/j3dcore-d3d.dll");
extensionJarsAndDlls.add("windows/i386/j3dcore-ogl.dll");
extensionJarsAndDlls.add("windows/i386/j3dcore-ogl-cg.dll");
extensionJarsAndDlls.add("windows/i386/j3dcore-ogl-chk.dll");
}
String [] applicationPackages = {
"com.eteks.sweethome3d",
"javax.media",
"javax.vecmath",
"com.sun.j3d",
"com.sun.opengl",
"com.sun.gluegen.runtime",
"javax.media.opengl",
"com.sun.media",
"com.ibm.media",
"jmpapps.util",
"com.microcrowd.loader.java3d",
"org.sunflow"};
ClassLoader java3DClassLoader = new ExtensionsClassLoader(
sweetHome3DBootstrapClass.getClassLoader(),
sweetHome3DBootstrapClass.getProtectionDomain(),
extensionJarsAndDlls.toArray(new String [extensionJarsAndDlls.size()]), applicationPackages);
String applicationClassName = "com.eteks.sweethome3d.SweetHome3D";
Class applicationClass = java3DClassLoader.loadClass(applicationClassName);
Method applicationClassMain =
applicationClass.getMethod("main", Array.newInstance(String.class, 0).getClass());
// Call application class main method with reflection
applicationClassMain.invoke(null, new Object [] {args});
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
06310a2c4b3495fc7b6fd1521b832f5064893033
|
95c82867f7233f4c48bc0aa9048080e52a4384c0
|
/app/src/main/java/com/furestic/office/ppt/lxs/docx/pdf/viwer/reader/free/fc/hslf/record/PositionDependentRecordAtom.java
|
e2c38eaf6bc0f5011d806e8649fc684f41051120
|
[] |
no_license
|
MayBenz/AllDocsReader
|
b4f2d4b788545c0ed476f20c845824ea7057f393
|
1914cde82471cb2bc21e00bb5ac336706febfd30
|
refs/heads/master
| 2023-01-06T04:03:43.564202
| 2020-10-16T13:14:09
| 2020-10-16T13:14:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,072
|
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 com.furestic.office.ppt.lxs.docx.pdf.viwer.reader.free.fc.hslf.record;
import java.util.Hashtable;
/**
* A special (and dangerous) kind of Record Atom that cares about where
* it lives on the disk, or who has other Atoms that care about where
* this is on the disk.
*
* @author Nick Burch
*/
public abstract class PositionDependentRecordAtom extends RecordAtom implements PositionDependentRecord
{
/** Our location on the disk, as of the last write out */
protected int myLastOnDiskOffset;
/** Fetch our location on the disk, as of the last write out */
public int getLastOnDiskOffset() { return myLastOnDiskOffset; }
/**
* Update the Record's idea of where on disk it lives, after a write out.
* Use with care...
*/
public void setLastOnDiskOffset(int offset) {
myLastOnDiskOffset = offset;
}
/**
* Offer the record the list of records that have changed their
* location as part of the writeout.
* Allows records to update their internal pointers to other records
* locations
*/
public abstract void updateOtherRecordReferences(Hashtable<Integer, Integer> oldToNewReferencesLookup);
}
|
[
"zeeshanhayat61@gmail.com"
] |
zeeshanhayat61@gmail.com
|
15f248652029069068dda8530a38c414265854a1
|
143e247fe0f636738ca00a6b584a55843bf4b28b
|
/Session12/src/co/edureka/bean/CB.java
|
8008f9e945741528de10a417844d6c75201a946d
|
[] |
no_license
|
rumaizan/Edureka2019July14
|
392b4049ee2b59eb4a9b350971d2e7f2de2c6af1
|
ea4a5e7b5572c07a6f036e60b5d24041bb10588a
|
refs/heads/master
| 2020-12-01T16:23:33.973260
| 2018-08-26T02:13:09
| 2018-08-26T02:13:09
| 230,697,386
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 357
|
java
|
package co.edureka.bean;
import org.springframework.beans.factory.annotation.Autowired;
public class CB {
CA ca; // Has-A Relation -> Dependency
public CB() {
}
@Autowired
public CB(CA ca) { // @Autowired is written with constructor
this.ca = ca;
}
public CA getCa() {
return ca;
}
public void setCa(CA ca) {
this.ca = ca;
}
}
|
[
"er.ishant@gmail.com"
] |
er.ishant@gmail.com
|
b46836d503891b832124f71f8dbb6728c7081610
|
a4a2f08face8d49aadc16b713177ba4f793faedc
|
/flink-queryable-state/flink-queryable-state-runtime/src/main/java/org/apache/flink/queryablestate/messages/KvStateInternalRequest.java
|
577389535adcaa847871b5fc4f895b25cdd90e64
|
[
"BSD-3-Clause",
"MIT",
"OFL-1.1",
"ISC",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
wyfsxs/blink
|
046d64afe81a72d4d662872c007251d94eb68161
|
aef25890f815d3fce61acb3d1afeef4276ce64bc
|
refs/heads/master
| 2021-05-16T19:05:23.036540
| 2020-03-27T03:42:35
| 2020-03-27T03:42:35
| 250,431,969
| 0
| 1
|
Apache-2.0
| 2020-03-27T03:48:25
| 2020-03-27T03:34:26
|
Java
|
UTF-8
|
Java
| false
| false
| 3,121
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.queryablestate.messages;
import org.apache.flink.annotation.Internal;
import org.apache.flink.queryablestate.KvStateID;
import org.apache.flink.queryablestate.network.messages.MessageBody;
import org.apache.flink.queryablestate.network.messages.MessageDeserializer;
import org.apache.flink.util.Preconditions;
import org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf;
import java.nio.ByteBuffer;
/**
* The request to be forwarded by the {@link org.apache.flink.runtime.query.KvStateClientProxy
* Queryable State Client Proxy} to the {@link org.apache.flink.runtime.query.KvStateServer State Server}
* of the Task Manager responsible for the requested state.
*/
@Internal
public class KvStateInternalRequest extends MessageBody {
private final KvStateID kvStateId;
private final byte[] serializedKey;
public KvStateInternalRequest(
final KvStateID stateId,
final byte[] serializedKeyAndNamespace) {
this.kvStateId = Preconditions.checkNotNull(stateId);
this.serializedKey = Preconditions.checkNotNull(serializedKeyAndNamespace);
}
public KvStateID getKvStateId() {
return kvStateId;
}
public byte[] getSerializedKey() {
return serializedKey;
}
@Override
public byte[] serialize() {
// KvStateId + sizeOf(serializedKey) + serializedKey
final int size = KvStateID.SIZE + Integer.BYTES + serializedKey.length;
return ByteBuffer.allocate(size)
.putLong(kvStateId.getLowerPart())
.putLong(kvStateId.getUpperPart())
.putInt(serializedKey.length)
.put(serializedKey)
.array();
}
/**
* A {@link MessageDeserializer deserializer} for {@link KvStateInternalRequest}.
*/
public static class KvStateInternalRequestDeserializer implements MessageDeserializer<KvStateInternalRequest> {
@Override
public KvStateInternalRequest deserializeMessage(ByteBuf buf) {
KvStateID kvStateId = new KvStateID(buf.readLong(), buf.readLong());
int length = buf.readInt();
Preconditions.checkArgument(length >= 0,
"Negative length for key and namespace. " +
"This indicates a serialization error.");
byte[] serializedKeyAndNamespace = new byte[length];
if (length > 0) {
buf.readBytes(serializedKeyAndNamespace);
}
return new KvStateInternalRequest(kvStateId, serializedKeyAndNamespace);
}
}
}
|
[
"yafei.wang@transwarp.io"
] |
yafei.wang@transwarp.io
|
0a42f600a720a7f13b13226bb4acc6794dbd7ccd
|
e99f78a1d7d244a8def43ca73d570f3a1b0c435f
|
/SDPOngoing/src/day3/FactoryPattern/TutorialExample/Square.java
|
20afc8a5e2890be69c5340c1571918fdedc4e8f2
|
[] |
no_license
|
BBK-PiJ-2015-10/Ongoing
|
5e153280a7772b1ec6ad5df02ec2cf8115ec272d
|
3a6099079c5413d864c8b3ec435f14660d6fad5e
|
refs/heads/master
| 2021-01-13T11:59:36.191993
| 2017-06-29T18:35:31
| 2017-06-29T18:35:31
| 77,915,552
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 187
|
java
|
package day3.FactoryPattern.TutorialExample;
public class Square implements Shape {
@Override
public void draw() {
System.out.println("Inside Square:: draw() method.");
}
}
|
[
"yasserpo@hotmail.com"
] |
yasserpo@hotmail.com
|
c08d67633082cb6c78d2be8a1564bb0584a09ac3
|
c913173a9475dfa9de1b5eed41ac479117eb71aa
|
/src/main/java/org/datanucleus/store/types/java8/converters/LocalTimeStringConverter.java
|
f0b939495b4edf4fcf9cb633e54e0e62f8b5eec1
|
[
"Apache-2.0"
] |
permissive
|
datanucleus/datanucleus-java8
|
85e7a1d84753223390326c775a010f5fac21e413
|
4a86ea8226f5ef26f5c6309f1ac5667838385dcc
|
refs/heads/master
| 2023-09-03T19:59:53.633190
| 2016-04-13T17:34:02
| 2016-04-13T17:34:02
| 18,055,049
| 3
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,775
|
java
|
/**********************************************************************
Copyright (c) 2012 Andy Jefferson and others. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Contributors:
...
**********************************************************************/
package org.datanucleus.store.types.java8.converters;
import java.time.LocalTime;
import org.datanucleus.store.types.converters.ColumnLengthDefiningTypeConverter;
import org.datanucleus.store.types.converters.TypeConverter;
/**
* Class to handle the conversion between java.time.LocalTime and a String form.
*/
public class LocalTimeStringConverter implements TypeConverter<LocalTime, String>, ColumnLengthDefiningTypeConverter
{
private static final long serialVersionUID = 4942570075844340588L;
public LocalTime toMemberType(String str)
{
if (str == null)
{
return null;
}
return LocalTime.parse(str);
}
public String toDatastoreType(LocalTime date)
{
return date != null ? date.toString() : null;
}
public int getDefaultColumnLength(int columnPosition)
{
if (columnPosition != 0)
{
return -1;
}
// Persist as "hh:mm:ss.SSS" when stored as string
return 12;
}
}
|
[
"andy@datanucleus.org"
] |
andy@datanucleus.org
|
d727139639cc21b1b323545477d7b9dc229c9e7c
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module444/src/main/java/module444packageJava0/Foo33.java
|
4243982bb9fa5ae6750b8fdf2a8c08f4fe59f17c
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 446
|
java
|
package module444packageJava0;
import java.lang.Integer;
public class Foo33 {
Integer int0;
Integer int1;
Integer int2;
public void foo0() {
new module444packageJava0.Foo32().foo6();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.