blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
553a25f1e670b5f1d8446de4a2f30e3be3ce834c
eea4e5dec36a2237fc47c15a8701dbdfe5840f44
/src/main/java/com/cjj/attendance/service/AttendanceService.java
1382726557ffbacf56916191b5a972720df6ef26
[]
no_license
JackYangyang0/AttendanceSystem
ab54fb576f842035d168e07df6d3c03f9bc07434
50ea4a0054fc11377d69b760732eeea7751d1a5f
refs/heads/master
2023-06-27T00:41:02.717250
2021-07-24T04:15:55
2021-07-24T04:15:55
380,700,260
1
0
null
null
null
null
UTF-8
Java
false
false
676
java
package com.cjj.attendance.service; import com.cjj.attendance.entity.Attendance; import com.cjj.attendance.entity.DateNum; import com.github.pagehelper.PageInfo; import java.util.List; import java.util.Map; public interface AttendanceService { PageInfo<Attendance> queryAttendance(int pageNum , int pageSize); PageInfo<Attendance> searchAttendance(int pageNum , int pageSize , String stuName); int deleteAttendance(String[] atdId); int addAttendance(Attendance attendance); int updateAttendance(Attendance attendance); List<DateNum> getDateNum(); List<DateNum> getClazDateNum(String claz); List<DateNum> getMyDateNum(String stuId); }
[ "cyy010801@163.com" ]
cyy010801@163.com
a313bf76deb159ecc331d7ee45aac283eb7ce7be
2132874bbc704cc6acac0f1e6a7fab08a7a156b5
/src/main/java/com/glqdlt/myhome/jilleo/NotificationSender.java
227ecc4ed2c6da80a419ceffdd5bfa4fb219ae0c
[]
no_license
glqdlt/jilleo
7f9f10d17d3aaf8695c1ca2a002d097e00088522
59589c323b2175919d6051e16d866b8362787f88
refs/heads/master
2023-04-21T20:05:18.770189
2021-05-09T03:22:52
2021-05-09T03:22:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,445
java
package com.glqdlt.myhome.jilleo; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; /** * @author glqdlt */ public interface NotificationSender { void submit(String message); @Component class DiscordChannelWebhook implements NotificationSender { private String webhookApiUrl; public DiscordChannelWebhook(@Value("${dicord.webhook}") String webhookApiUrl) { this.webhookApiUrl = webhookApiUrl; } private final RestTemplate jdbcTemplate = new RestTemplate(); @Override public void submit(String message) { MultiValueMap<String,String> payload = new LinkedMultiValueMap<>(); payload.add("content",message); RequestEntity<MultiValueMap<String, String>> req = RequestEntity.post(webhookApiUrl) .header("Content-Type","application/x-www-form-urlencoded") .header("User-Agent","DiscordBot") .body(payload); ResponseEntity<String> asd = jdbcTemplate.exchange(req,String.class); System.out.println(asd.getStatusCode()); } } }
[ "dlfdnd0725@gmail.com" ]
dlfdnd0725@gmail.com
de1a3cece8bd55f8e6f27de445758d8e8d50fda4
ec919f0b430d1c1a561a97400b0bf400da44fe1c
/com.synet.tool.rsc/src/com/synet/tool/rsc/dialog/SelectRuleDialog.java
b62e57eae6ec6a3b2eaac05ca184f0076d3a54c7
[]
no_license
P79N6A/RSC50
e05c1fc9b89fe8999a9a9e96b5aeae0fc87b2dc6
99d42bb2ca26ca2a844fa5fa36d6efc14769c50f
refs/heads/master
2020-04-15T02:30:20.628271
2019-01-06T11:25:20
2019-01-06T11:25:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,127
java
package com.synet.tool.rsc.dialog; import java.util.ArrayList; import java.util.List; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import com.shrcn.found.ui.app.WrappedDialog; import com.shrcn.found.ui.util.SwtUtil; import com.synet.tool.rsc.ui.TableFactory; import com.synet.tool.rsc.ui.table.RuleTable; import com.synet.tool.rsc.util.Rule; import com.synet.tool.rsc.util.RuleManager; public class SelectRuleDialog extends WrappedDialog { private RuleTable table; private List<Rule> rulesSelect; private List<Rule> rules; public SelectRuleDialog(Shell parentShell) { super(parentShell); } @Override protected Control createDialogArea(Composite parent) { GridData gridData = new GridData(GridData.FILL_BOTH); Composite composite = SwtUtil.createComposite(parent, gridData, 1); composite.setLayout(SwtUtil.getGridLayout(1)); table = TableFactory.getRuleSelectTable(composite); table.getTable().setLayoutData(gridData); initData(); return composite; } private void initData() { rules = RuleManager.getInstance().getRules(); table.setInput(rules); } @Override protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.setText("挑选规则"); } @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, "确定", true); createButton(parent, IDialogConstants.CANCEL_ID, "取消", true); } @Override protected Point getInitialSize() { return new Point(1000, 500); } @Override protected void buttonPressed(int buttonId) { if(buttonId == IDialogConstants.OK_ID) { rulesSelect = new ArrayList<>(); for (Rule rule : rules) { if(rule.isSelected()) { rulesSelect.add(rule); } } //TODO RuleManager.getInstance().modify(rules, "rules.xml"); } super.buttonPressed(buttonId); } public List<Rule> getRulesSelect() { return rulesSelect; } }
[ "15800714637@163.com" ]
15800714637@163.com
e0f792d85a4406c37e8d71fd4ecad7bc1cf4ccb9
9aff8120bce81d8f102b2841b3ec97ef8b48395c
/com/test/DemoB.java
2a8e628d432075098ebf85867d506404476669fb
[]
no_license
Sagarika55/Test123
f650ab946bcfb4407e05e5d00876016fa12f9400
28d402e24565f96d7389be8addac08be3031861e
refs/heads/master
2020-03-29T08:20:31.092500
2018-09-21T03:55:23
2018-09-21T03:55:23
149,705,470
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package com.test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.Reporter; import org.testng.annotations.Test; public class DemoB { @Test public void run() { WebDriver driver = new FirefoxDriver(); driver.get("http://www.google.co.in/"); Reporter.log("browser not opened"); } }
[ "sagarikanayakjobs@gmail.com" ]
sagarikanayakjobs@gmail.com
8a131d03cf4fb87b4d7a3c04b202c4858775adcb
87014d42dab513543281488f9d870150786c8237
/app/src/main/java/com/example/assignvdproj/Model/Users.java
ddb5c623343b8712e84612aaeb4dc46b1a95c8ed
[]
no_license
KaranPandey/AssignVDProj
4921bbef05b521a61f4d577250e4bf9e3fb20b81
daa99275354974ba16c99c4d06ea32e7622c6f24
refs/heads/master
2022-12-03T17:04:21.349846
2020-08-16T18:23:22
2020-08-16T18:23:22
288,000,878
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
package com.example.assignvdproj.Model; public class Users { private String name, phone, password, image, address; public Users() { } public Users(String name, String phone, String password, String image, String address) { this.name = name; this.phone = phone; this.password = password; this.image = image; this.address = address; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } }
[ "karanpandeykp020@gmail.com" ]
karanpandeykp020@gmail.com
e2f01dd1e59e6befde1430e68f87e1e55bb33935
50c6c54023d804ce1022f8b28c486953f6cca5de
/app/src/androidTest/java/com/example/mydorm/ExampleInstrumentedTest.java
fcd3d17688cccb344b0fecf8be26a4434ae42c95
[]
no_license
mmucahitkaya/MyDorm
323810fa9408c9420c3dfb906320f1a46014bbdf
a11d1f954fb7a6134389981ef761710c80e8bb4a
refs/heads/main
2023-02-11T00:11:19.867886
2021-01-10T21:03:41
2021-01-10T21:03:41
328,218,269
0
0
null
null
null
null
UTF-8
Java
false
false
775
java
package com.example.mydorm; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.mydorm", appContext.getPackageName()); } }
[ "noreply@github.com" ]
noreply@github.com
a5c4f0a74d12a2e1bd489dff4c842c1598d1941c
0d177ef4070381f5bcd5c7aa455439e3bbd98ff1
/io-core/src/main/java/com/wadpam/open/io/BlobstoreTaskingConverter.java
54e6a6fa2f18b8a3c96908e9da814adcb1bfc6ba
[]
no_license
sosandstrom/open-server
e0801baac115ffad9de1590c789ebae04f560ce7
d14e8c348b373d15f6ea03e96adc189a97660ca4
refs/heads/master
2016-09-07T23:13:52.114649
2014-02-05T17:52:45
2014-02-05T17:52:45
5,378,785
2
1
null
2014-01-21T14:52:23
2012-08-11T09:43:31
Java
UTF-8
Java
false
false
2,952
java
/* * INSERT COPYRIGHT HERE */ package com.wadpam.open.io; import com.google.appengine.api.blobstore.BlobKey; import com.google.appengine.api.files.AppEngineFile; import com.google.appengine.api.files.FileService; import com.google.appengine.api.files.FileServiceFactory; import com.google.appengine.api.files.FileWriteChannel; import java.io.IOException; import java.io.OutputStream; import java.nio.channels.Channels; import java.util.Collections; import java.util.HashMap; import java.util.Map; import net.sf.mardao.core.dao.Dao; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * @author sosandstrom */ public class BlobstoreTaskingConverter extends CsvConverter<Dao> { static final Logger LOG = LoggerFactory.getLogger(BlobstoreTaskingConverter.class); private final HashMap<BlobKey, String> fileMap = new HashMap<BlobKey, String>(); @Override public Object preExport(OutputStream out, Object arg, Object preExport, Dao[] daos) { try { FileService fileService = FileServiceFactory.getFileService(); AppEngineFile masterFile = fileService.createNewBlobFile("text/csv", "MasterExport.csv"); boolean lock = true; FileWriteChannel channel = fileService.openWriteChannel(masterFile, lock); OutputStream outputStream = Channels.newOutputStream(channel); // write the master headers final Object preDao = super.preDao(outputStream, null, null, null, "MasterExport", Importer.COLUMNS, Collections.EMPTY_MAP, 1, null); int entityIndex = 0; final Map<String, Object> values = new HashMap<String, Object>(); for (Dao dao : daos) { // create a Blob for each dao AppEngineFile daoFile = fileService.createNewBlobFile("text/csv", String.format("%s.csv", dao.getTableName())); BlobKey daoKey = fileService.getBlobKey(daoFile); fileMap.put(daoKey, dao.getClass().getName()); // write row to master file values.put(Importer.COLUMN_DAOCLASSNAME, dao.getClass().getName()); values.put(Importer.COLUMN_FILEKEY, daoKey.getKeyString()); super.writeValues(outputStream, null, null, preDao, Importer.COLUMNS, 0, dao, entityIndex, dao, values); entityIndex++; } super.postDao(outputStream, null, null, preDao, null, null); BlobKey masterKey = fileService.getBlobKey(masterFile); return masterKey; } catch (IOException ex) { LOG.error("Creating MasterExport.csv", ex); } return null; } @Override public Object postExport(OutputStream out, Object arg, Object preExport, Object postExport, Dao[] daos) { return preExport; } }
[ "os@goldengekko.com" ]
os@goldengekko.com
d9f97ea0d009e1e38c23a3d947ccca53ae1e766f
7bfdb8d7f78d10251ad1b138e1342ea6455b678f
/src/com/sh/dsa/array/TestDynamicArray.java
e132e99211966c80d5e989deb94148b3776e8b56
[]
no_license
saghircse/Data-Structure-Java-Implementation
712bf9d366625b656100925fd3e84b04079aa26e
210b1209d63370c75f06d3d4058b7915457b6187
refs/heads/master
2022-12-05T13:55:15.898657
2020-08-15T10:06:07
2020-08-15T10:06:07
231,785,290
0
0
null
null
null
null
UTF-8
Java
false
false
293
java
package com.sh.dsa.array; public class TestDynamicArray { public static void main(String[] args) { DynamicArray<Integer> dynamicArray = new DynamicArray<Integer>(); dynamicArray.add(50); dynamicArray.add(25); dynamicArray.add(35); System.out.println(dynamicArray); } }
[ "saghircse@gmail.com" ]
saghircse@gmail.com
884c26a73088aa6e7e3ff5a35cc07942c3f3fdf0
cbac9ad9d272d6fa21b9e33b2d82280f1e64b0d2
/PROGRAMACION/Ejercicios/arrays/src/arrays/ejercicio9.java
f9fbdc2d0131ce816fd671b510d23934e24101bb
[]
no_license
jair-ventura/FP_ESPECIALIDAD_1920
54bbda48ec6205a334e0f699b64e70d821406701
097f3e79706ce8c90eb53a70c8c88a1c2e34c312
refs/heads/master
2020-12-27T20:03:35.189279
2020-05-17T19:56:10
2020-05-17T19:56:10
238,034,597
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package arrays; public class ejercicio9 { public static void main(String[] args) { // TODO Auto-generated method stub int[] impar = new int[50]; int numero = 0; int i = 0; do { if ( numero%2 == 1 ) { impar[i] = numero; numero++; i++; } numero++; } while ( i <=49 ); for (int i1=0; i1 <impar.length; i1++) { System.out.println("El numero "+impar[i1]+" es impar."); } } }
[ "josejair.barrueto.ventura@gmail.com" ]
josejair.barrueto.ventura@gmail.com
899b68360c829163d0fa9077a96f5e73a5955009
fa43d39afde91da4379034be2d956e86cd1c70e4
/Game of Sorts/src/com/NKSA/sorting/QuickSort.java
9487d04cd44e9c743841e112a67f0d5be74779d6
[]
no_license
Abigail91/Game-of-Sorts
79a7f35797b20e679e8885beb536ca63651d98a8
b634e622d3fbcc53284f122d07f019170c91e31b
refs/heads/master
2020-03-31T00:31:34.555382
2018-10-24T10:30:10
2018-10-24T10:30:10
151,743,284
0
0
null
2018-10-23T17:08:10
2018-10-05T15:41:58
Java
ISO-8859-2
Java
false
false
1,947
java
package com.NKSA.sorting; import java.util.LinkedList; public class QuickSort<T extends Comparable<T>> { /** * Variables que serán utilizadas en la clase. */ private int i; private int j; private T pivot; private T temp; /** * Constructor de la clase. */ public QuickSort() { } /** * Método que se encarga de ordenar una lista utilizando la lógica del metodo de * ordenamiento QuickSort. * * @param array: * arreglo al cual se le desea ordenar mediante el método QuickSort. */ public void quickSort(LinkedList<T> array) { quickSort(array, 0, array.size() - 1); } /** * Método que se encarga de ordenar un arreglo de la forma QuickSort. * * @param array: * arreglo que se desea ordenar. * @param first: * primera pocisión en el arreglo. * @param last: * última posición en el arreglo. */ private void quickSort(LinkedList<T> array, int first, int last) { i = first; j = last; pivot = array.get((int) ((i + j) / 2)); do { while (array.get(i).compareTo(pivot) < 0) { i++; } while (array.get(j).compareTo(pivot) > 0) { j--; } if (i <= j) { temp = array.get(i); array.set(i, array.get(j)); array.set(j, temp); i++; j--; } } while (i <= j); if (first < j) { quickSort(array, first, j); } if (i < last) { quickSort(array, i, last); } } /** * Método que se encarga de mostrar en consola el arreglo. * * @param array: * arreglo que se desea imprimir en consola. */ public void printL(LinkedList<T> array) { System.out.print("["); for (int i = 0; i < array.size() - 1; i++) { System.out.print(array.get(i) + ", "); } System.out.print(array.get(array.size() - 1)); System.out.print("]"); System.out.println(" "); } }
[ "keisychaves@hotmail.com" ]
keisychaves@hotmail.com
b5a310453aeda8589a85a466abf5daf430be6836
7f510624d93cbd3e07c1a7896f0591df4f72be94
/src/main/java/unifi/graphics/drawable/AbstractDrawable.java
5f1c1ff5aaf5912544a8f31ffd282c5976afbec3
[]
no_license
collinsmith/unifi
cb25f406a2a6c1c4bacc5843eac800433eba83d0
00c8462bde7aeed43296fce942695205ae00de60
refs/heads/master
2021-01-20T00:21:43.526097
2017-03-29T06:51:13
2017-03-29T06:51:13
58,800,566
0
0
null
null
null
null
UTF-8
Java
false
false
7,572
java
package unifi.graphics.drawable; import android.support.annotation.IntRange; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.lang.ref.WeakReference; import java.util.Arrays; import unifi.graphics.Insets; import unifi.graphics.Rect; import unifi.util.LayoutDirection; import unifi.util.StateSet; /** * Abstract implementation of a {@link Drawable}. * * @see Drawable */ public abstract class AbstractDrawable implements Drawable { private static final Rect ZERO_BOUNDS_RECT = new Rect(); /** * Set of primitive {@code int} values representing the state of this drawable */ @NonNull private int[] mStateSet = StateSet.WILD_CARD; /** * Indicates the level of this drawable. * * @see #setLevel(int) */ @IntRange(from = 0, to = 10000) private int mLevel = 0; /** * Bounds of this drawable, lazily initialized as a new {@link Rect} when * required. */ @NonNull private Rect mBounds = ZERO_BOUNDS_RECT; /** * Weak reference to the callback associated with this drawable. */ private WeakReference<Callback> mCallback = null; /** * Indicates whether or not this drawable is visible. * * @see #setVisible(boolean, boolean) */ private boolean mVisible = true; /** * The resolved layout direction of this drawable. */ @LayoutDirection.Resolved private int mLayoutDirection; /** * {@inheritDoc} * * @return This drawable */ @NonNull @Override public Drawable mutate() { return this; } /** * {@inheritDoc} * * <p>Default implementation is no-op. */ @Override public void clearMutated() {} @Override public void setCallback(@NonNull Callback callback) { mCallback = new WeakReference<>(callback); } @Nullable @Override public Callback getCallback() { if (mCallback != null) { return mCallback.get(); } return null; } @Override public void invalidateSelf() { final Callback callback = getCallback(); if (callback != null) { callback.invalidateDrawable(this); } } @Override public void scheduleSelf(@NonNull Runnable what, long when) { final Callback callback = getCallback(); if (callback != null) { callback.scheduleDrawable(this, what, when); } } @Override public void unscheduleSelf(@NonNull Runnable what) { final Callback callback = getCallback(); if (callback != null) { callback.unscheduleDrawable(this, what); } } @Override public void setBounds(int left, int top, int right, int bottom) { Rect oldBounds = mBounds; if (oldBounds == ZERO_BOUNDS_RECT) { oldBounds = mBounds = new Rect(); } if (oldBounds.left != left || oldBounds.top != top || oldBounds.right != right || oldBounds.bottom != bottom) { if (!oldBounds.isEmpty()) { invalidateSelf(); } mBounds.set(left, top, right, bottom); onBoundsChange(mBounds); } } @Override public void setBounds(@NonNull Rect bounds) { setBounds(bounds.left, bounds.top, bounds.right, bounds.bottom); } @Override public final void copyBounds(@NonNull Rect dst) { dst.set(mBounds); } @Override public final Rect copyBounds() { return new Rect(mBounds); } @NonNull @Override public final Rect getBounds() { if (mBounds == ZERO_BOUNDS_RECT) { mBounds = new Rect(); } return mBounds; } /** * Called when the bounds of this drawable has changed. Override this method * if the drawables appearance is based on the bounds. * * <p>Note: For efficiency, the passed {@code bounds} is the same object * stored in the drawable. <strong>You should not modify the object passed * into this method.</strong> * * @see #setBounds(int, int, int, int) * @see #setBounds(Rect) */ protected void onBoundsChange(@NonNull Rect bounds) {} /** * {@inheritDoc} * <p> * <p>Note: By default, this returns the {@linkplain #getBounds full drawable * bounds}. Custom drawables may override this method to perform more precise * invalidation. */ @NonNull @Override public Rect getDirtyBounds() { return getBounds(); } @Override public boolean getPadding(@NonNull Rect dst) { dst.set(0, 0, 0, 0); return false; } @NonNull @Override public Insets getOpticalInsets() { return Insets.NONE; } @Override @LayoutDirection.Resolved public int getLayoutDirection() { return mLayoutDirection; } @Override public void setLayoutDirection(@LayoutDirection.Resolved int layoutDirection) { // TODO: This seems like an odd choice, may be due to better compat. if (getLayoutDirection() != layoutDirection) { mLayoutDirection = layoutDirection; } } @Override public int getAlpha() { return 0xFF; } @Override public boolean isStateful() { return false; } @Override public boolean setState(@NonNull int[] stateSet) { if (!Arrays.equals(mStateSet, stateSet)) { mStateSet = stateSet; return onStateChange(stateSet); } return false; } @NonNull @Override public int[] getState() { return mStateSet; } @Override public void jumpToCurrentState() {} /** * Called when the state of this drawable has changed. Override this method * if the drawable recognizes the specified state. * * @param state The new state of this drawable * * @return {@code true} if the appearance of the drawable has changed as a * result of this new state set (that is, it needs to be drawn), * {@code false} otherwise * * @see #setState(int[]) */ protected boolean onStateChange(@NonNull int[] state) { return false; } @NonNull @Override public Drawable getCurrent() { return this; } @Override public final int getLevel() { return mLevel; } @Override public final boolean setLevel(@IntRange(from = 0, to = 10000) int level) { // TODO: Validate the range? Android specifies [0..10000], but doesn't enforce if (mLevel != level) { mLevel = level; return onLevelChange(level); } return false; } /** * Called when the level of this drawable changed. Override this method if * the drawable changes appearance based on level. * * @return {@code true} if the appearance of the drawable has changed as a * result of this new level (that is, it needs to be drawn), * {@code false} otherwise * * @see #setLevel(int) */ // TODO: level range is not currently enforced, so I don't want to place that restriction here protected boolean onLevelChange(int level) { return false; } @Override public boolean setVisible(boolean visible, boolean restart) { boolean changed = mVisible != visible; if (changed) { mVisible = visible; invalidateSelf(); } return changed; } @Override public final boolean isVisible() { return mVisible; } @Override public int getIntrinsicWidth() { return -1; } @Override public int getIntrinsicHeight() { return -1; } @Override public int getMinimumWidth() { final int intrinsicWidth = getIntrinsicWidth(); return intrinsicWidth > 0 ? intrinsicWidth : 0; } @Override public int getMinimumHeight() { final int intrinsicHeight = getIntrinsicHeight(); return intrinsicHeight > 0 ? intrinsicHeight : 0; } @Nullable @Override public ConstantState getConstantState() { return null; } }
[ "collinsmith70@gmail.com" ]
collinsmith70@gmail.com
8f86640a7ec0e7305bf2fc5d42b54a32e4f017f8
8642d7976a4bd2194d3042d7ebbd960781356a30
/src/from_0_to_9/Task7.java
67cf2fd997e40590336f2454eec764d401a76202
[]
no_license
kekosius/HackerRank_Java
c7f1d3ab8e877d463b42b21f491ddbc9d6557b6a
452732bb5f0c68c6989cc81142956f2d1c383648
refs/heads/master
2023-06-20T00:23:49.545670
2021-07-16T14:34:31
2021-07-16T14:34:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
910
java
package from_0_to_9; //We use the integers a, b, and x to create the following series: //(a + 2^0 * b), (a + 2^0 * b + 2^1 * b),...,(a + 2^0 * b + 2^1 * b + ... + 2^n-1 * b) //You are given q queries in the form of a, b, and n. //For each query, print the series corresponding to the given a, b, and n //values as a single line of space-separated integers. import java.util.Scanner; public class Task7 { public static void main(String[] args) { Scanner input = new Scanner(System.in); int q = input.nextInt(); int a, b, n, cur; for (int i = 0; i < q; i++) { a = input.nextInt(); b = input.nextInt(); n = input.nextInt(); cur = a; for (int j = 0; j < n; j++) { cur+=Math.pow(2,j)*b; System.out.print(cur + " "); } System.out.println(); } } }
[ "vladoren1@mail.ru" ]
vladoren1@mail.ru
a38c0ad13a7ad6aee58f537b7a86212f554fb2ce
888e9f4299ce4053df6901f1bfd1fc15fdd8584f
/Sample/src/androidTest/java/com/owl/scratchcard/ExampleInstrumentedTest.java
75f965b20a7bb894e1981918f117f346c355d543
[ "MIT" ]
permissive
Alamusitl/ScratchCard
df29249e20e3e9e32a0725362a0fb29e051133f4
91e45bcfacd878de617db44d890a5d845d00d4d4
refs/heads/master
2020-12-30T12:23:29.733438
2017-05-16T07:58:28
2017-05-16T07:58:28
91,431,360
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
package com.owl.scratchcard; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.assertEquals; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.owl.scratchcard", appContext.getPackageName()); } }
[ "alamusitl@163.com" ]
alamusitl@163.com
2c38eb3ab61728d17684c2a2e16396d21702f052
a00527e2847ac2b6cb18b8c1cd3d3a66374c07e8
/uadp-data/src/main/java/com/upbos/data/plugins/pagination/dialects/HsqlDialect.java
a1f999f251f72c998bb651d19e369185a2da89f3
[]
no_license
www3com/uadp-boot
e90fbaa63aca698a25c6bf471848a4de29f210ff
03ccb209e3bc10072649652eb985d5289e043a3d
refs/heads/main
2023-03-22T05:55:22.525156
2021-03-23T10:35:07
2021-03-23T10:35:07
344,739,890
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
/* * Copyright (c) 2011-2014, hubin (jobob@qq.com). * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.upbos.data.plugins.pagination.dialects; import com.upbos.data.util.StringPool; /** * <p>Title: HSQLDialect.java</p> * <p>Description: HSQL 数据库分页语句组装实现</p> * <p>Copyright: Copyright (c) 2010-2020</p> * <p>Company: yideb.com</p> * * @author wangjz * @version 5.0.0 * @since 2018年9月28日 */ public class HsqlDialect implements IDialect { @Override public String buildPaginationSql(String originalSql, long offset, long limit) { StringBuilder sql = new StringBuilder(originalSql); sql.append(" limit ").append(offset).append(StringPool.COMMA).append(limit); return sql.toString(); } }
[ "wjzchina2008@126.com" ]
wjzchina2008@126.com
bbf7c12fe78b1a933a4843b477d80747ac52906d
e60b5d3d31504fc819ec8e1e9867b0d8f97152ea
/view/MenuScreen.java
1ed32c71d1c414043675621c80fe739f9c17743f
[]
no_license
vle3/F21-SE3103-lesson2
56d866c77ab922a4baec6fa95e1239462310ff4b
a0267a6b22f1dd937f9a2b489755036e4fdd271a
refs/heads/main
2023-07-17T16:13:18.955679
2021-09-01T04:21:52
2021-09-01T04:21:52
401,232,714
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
package view; import java.awt.BorderLayout; import java.awt.Container; import java.awt.Dimension; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; public class MenuScreen { private JFrame window; public MenuScreen(JFrame window) { this.window = window; } public void init() { Container cp = window.getContentPane(); JPanel menuPanel = new JPanel(); menuPanel.setPreferredSize(new Dimension(400, 200)); menuPanel.setLayout(new GridLayout(2, 1 )); cp.add(BorderLayout.CENTER, menuPanel); var baseballButton = new JButton("Baseball Game"); var drawingButton = new JButton("Triangle Drawing"); menuPanel.add(baseballButton); menuPanel.add(drawingButton); baseballButton.addActionListener(event -> { window.getContentPane().removeAll(); var panel = new BaseballGamePanel(window); panel.init(); window.pack(); window.setVisible(true); }); drawingButton.addActionListener(event -> { window.getContentPane().removeAll(); var panel = new TriangleDrawingPanel(window); panel.init(); window.pack(); window.revalidate(); }); } }
[ "vle3@uco.edu" ]
vle3@uco.edu
703cd0708e3e466e6f4351f127b44680b6130796
e7120cf2ddf3dbd3966cb3e51c0f8d226d5ad869
/src/wssip/com/wondersgroup/bc/medicarecostaudit/medaudit/model/bo/Kc72.java
2d789f05788eef4294e8c3564297871adc57c6ab
[]
no_license
wankaiss/yljknb
f7e02565870f49b40ebc02f2a19b66354b26c00e
2e60bbb18a36fe656a41caff430df3d851583652
refs/heads/master
2021-01-10T01:37:52.793176
2015-10-29T10:04:37
2015-10-29T10:04:37
45,174,409
0
3
null
null
null
null
UTF-8
Java
false
false
476
java
package com.wondersgroup.bc.medicarecostaudit.medaudit.model.bo; import javax.persistence.Entity; import javax.persistence.Table; import com.wondersgroup.bc.medicarecostaudit.medaudit.model.BaseKc72; /** * 单据明细违规信息表 * @author rhx * @version $Revision$ 2014-07-10 * @author ($Date$ modification by $Author$) * @since 1.0 */ @Entity @org.hibernate.annotations.Entity (dynamicUpdate = true) @Table( name = "KC72") public class Kc72 extends BaseKc72{ }
[ "578634482@qq.com" ]
578634482@qq.com
44d8d0725316f1684ea48b8358ffa3cbc74da2fb
58c6c968d3a8a9968d0be74490cad12c8cbb938c
/JFoenix/src/application/ListViewAndPopupMain.java
29ce2a38109878bc03d64c334883450bdaa172ad
[ "Apache-2.0" ]
permissive
DaniloBP/JavaFX
026c8fd4dfe328c19f42e05bfe12983187969af7
08339a5f503f8a8c2cd31fb80034b75b5a680a3b
refs/heads/master
2020-03-29T13:07:52.102290
2018-09-23T15:32:19
2018-09-23T15:32:19
149,119,673
0
0
null
null
null
null
UTF-8
Java
false
false
761
java
package application; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.stage.Stage; import javafx.scene.Parent; import javafx.scene.Scene; public class ListViewAndPopupMain extends Application { @Override public void start(Stage primaryStage) { try { Parent root = FXMLLoader.load(getClass().getResource("FXML_ListViewAndPopup.fxml")); //primaryStage.initStyle(StageStyle.UNDECORATED); Scene scene = new Scene(root); scene.getStylesheets().add(this.getClass().getResource("application.css").toExternalForm()); primaryStage.setScene(scene); primaryStage.show(); } catch(Exception e) { e.printStackTrace(); } } public static void main(String[] args) { launch(args); } }
[ "pereira.b.danilo@gmail.com" ]
pereira.b.danilo@gmail.com
ba093b93e08fb966b1f3c26c481e2034530040c4
268ff1fb3d8ca2d6c47ee7fd49bbeb1bdec7ede8
/src/main/java/org/iguanatool/testobject/cparser/ASTTypeName.java
15dc39b5e8fa3ae294b4c670e878a758ed667fff
[ "MIT" ]
permissive
iguanatool/iguana
408e28e723c866f509a9d7344007ec75d7cabfe4
c90d71f392b441378e23544cb5ce613392fcd849
refs/heads/master
2020-12-25T15:07:54.086002
2019-12-09T11:42:58
2019-12-09T11:42:58
73,490,895
4
0
MIT
2020-10-13T08:52:07
2016-11-11T15:54:52
Java
UTF-8
Java
false
false
690
java
/* Generated By:JJTree: Do not edit this line. ASTTypeName.java Version 4.3 */ /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.iguanatool.testobject.cparser; public class ASTTypeName extends SimpleNode { public ASTTypeName(int id) { super(id); } public ASTTypeName(CParser p, int id) { super(p, id); } /** * Accept the visitor. **/ public void jjtAccept(CParserVisitor visitor) { visitor.visit(this); } } /* JavaCC - OriginalChecksum=447df85ec482b3f66f5dbdf8ad6883b2 (do not edit this line) */
[ "p.mcminn@sheffield.ac.uk" ]
p.mcminn@sheffield.ac.uk
7772ab4ff939ae27258ec0e4bda44df6c63e242a
27ed79cf891f72d42d50a9e9c5ed0b1d08372407
/week04-lab-tasks/src/main/java/day04/Plane.java
f024bddb9a81666f287f718de85da528a89e9511
[]
no_license
Strukturavaltas360/java-sv2-daily-labs05-0-petrep
291bb3c13de88be8ba8fe472eeb3fcfd1540096d
15ae724d940e5ffb06f6f8ea2c2d8f43cee79c27
refs/heads/master
2023-08-27T21:24:16.503001
2021-11-07T21:01:44
2021-11-07T21:01:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,728
java
package day04; import java.util.ArrayList; import java.util.List; public class Plane { private final int maxCapacity; private List<Passenger> passengers = new ArrayList<>(); public Plane(int maxCapacity) { this.maxCapacity = maxCapacity; } public boolean addPassenger (Passenger passenger) { if (passengers.size() >= maxCapacity) { return false; } else { passengers.add(passenger); return true; } } public int numberOfPackages() { int numberOfPackages = 0; for (Passenger passenger : passengers) { numberOfPackages += passenger.getAmountOfPackages(); } return numberOfPackages; } public static void main(String[] args) { Passenger johndoe = new Passenger("John Doe", "wjdsgf01", 3); Passenger jackdoe = new Passenger("Jack Doe", "wjdsgf02", 4); Passenger janedoe = new Passenger("Jane Doe", "wjdsgf03", 3); Passenger jilldoe = new Passenger("Jill Doe", "wjdsgf04", 6); Passenger joedoe = new Passenger("Joe Doe", "wjdsgf05", 2); Plane plane = new Plane(4); boolean isAdded; System.out.print("Can the passenger board the plane: "); System.out.println(isAdded = plane.addPassenger(johndoe)); System.out.print("Can the passenger board the plane: "); System.out.println(isAdded = plane.addPassenger(jackdoe)); System.out.print("Can the passenger board the plane: "); System.out.println(isAdded = plane.addPassenger(janedoe)); System.out.print("Can the passenger board the plane: "); System.out.println(isAdded = plane.addPassenger(jilldoe)); System.out.print("Can the passenger board the plane: "); System.out.println(isAdded = plane.addPassenger(joedoe)); System.out.print("Package count: "); System.out.println(plane.numberOfPackages()); } }
[ "peter.petrekanics@liferay.com" ]
peter.petrekanics@liferay.com
732d43578e1601f7b6a11edc4030b6e11d55ce5d
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/TIME-7b-6-16-MOEAD-WeightedSum:TestLen:CallDiversity/org/joda/time/format/DateTimeFormatter_ESTest_scaffolding.java
f4fd3448ff6ae41f6b7db69151993beb532c89e7
[]
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
442
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Jan 20 04:23:57 UTC 2020 */ package org.joda.time.format; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DateTimeFormatter_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
69918a39221abbf1fac7917fa694adc0cc80f4bb
f9b1a7e615f2a546ee76dff799925115579d1364
/Bitlab/FirstCourse/second_lesson/Exercise15.java
342c9e22acea132d28325c7d6e3d5ef8fcd24eab
[]
no_license
NurikN999/Java
52c3d90bbf6c977771ca442a9ef11e62ff0c398d
3d0f2a0cb6777c480e87c1842819951e0e0eed05
refs/heads/master
2023-06-10T08:30:29.124103
2021-07-03T12:15:40
2021-07-03T12:15:40
303,759,354
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package Bitlab.second_lesson; import java.util.*; public class Exercise15 { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); if(a == b || a == c || b == c) System.out.println("YES"); else System.out.println("NO"); } }
[ "nurkamalnurmukhamed@gmail.com" ]
nurkamalnurmukhamed@gmail.com
38b693377645303d83f93b064ef522be2c3a7705
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_1f946cc554b2ce1a5475aef3f51aa93927e208ee/LuaAnnotator/16_1f946cc554b2ce1a5475aef3f51aa93927e208ee_LuaAnnotator_t.java
02cf9d29c63516529d8b8708d456ab62636a70c2
[]
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
5,306
java
/* * Copyright 2010 Jon S Akhtar (Sylvanaar) * * 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.sylvanaar.idea.Lua.editor.annotator; import com.intellij.lang.annotation.Annotation; import com.intellij.lang.annotation.AnnotationHolder; import com.intellij.lang.annotation.Annotator; import com.intellij.openapi.editor.colors.TextAttributesKey; import com.intellij.psi.PsiElement; import com.sylvanaar.idea.Lua.editor.highlighter.LuaHighlightingData; import com.sylvanaar.idea.Lua.lang.psi.LuaPsiElement; import com.sylvanaar.idea.Lua.lang.psi.expressions.LuaDeclarationExpression; import com.sylvanaar.idea.Lua.lang.psi.expressions.LuaIdentifier; import com.sylvanaar.idea.Lua.lang.psi.expressions.LuaParameter; import com.sylvanaar.idea.Lua.lang.psi.expressions.LuaReferenceExpression; import com.sylvanaar.idea.Lua.lang.psi.statements.LuaDeclarationStatement; import com.sylvanaar.idea.Lua.lang.psi.statements.LuaReturnStatement; import com.sylvanaar.idea.Lua.lang.psi.visitor.LuaElementVisitor; import org.jetbrains.annotations.NotNull; /** * Created by IntelliJ IDEA. * User: Jon S Akhtar * Date: Jun 8, 2010 * Time: 5:45:21 PM */ public class LuaAnnotator extends LuaElementVisitor implements Annotator { private AnnotationHolder myHolder = null; @Override public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) { if (element instanceof LuaPsiElement) { myHolder = holder; ((LuaPsiElement) element).accept(this); myHolder = null; } } public void visitReturnStatement(LuaReturnStatement stat) { if (stat.isTailCall()) { final Annotation a = myHolder.createInfoAnnotation(stat, null); a.setTextAttributes(LuaHighlightingData.TAIL_CALL); } } public void visitReferenceExpression(LuaReferenceExpression ref) { final PsiElement e = ref.resolve(); if (e instanceof LuaParameter) { final Annotation a = myHolder.createInfoAnnotation(ref, null); a.setTextAttributes(LuaHighlightingData.PARAMETER); } else if (e instanceof LuaIdentifier || e instanceof LuaDeclarationStatement) { LuaIdentifier id = (LuaIdentifier) e; TextAttributesKey attributesKey = null; if (id.isGlobal()) { attributesKey = LuaHighlightingData.GLOBAL_VAR; } else if (id.isLocal() && !id.getText().equals("...")) { attributesKey = LuaHighlightingData.LOCAL_VAR; } if (attributesKey != null) { final Annotation annotation = myHolder.createInfoAnnotation(ref, null); annotation.setTextAttributes(attributesKey); } } if (e == null) { LuaIdentifier id = (ref.getNameElement() != null) ? (LuaIdentifier) ref.getNameElement().getPsi() : null; TextAttributesKey attributesKey = null; if ((id != null) && id.isGlobal()) { attributesKey = LuaHighlightingData.GLOBAL_VAR; } if (attributesKey != null) { final Annotation annotation = myHolder.createInfoAnnotation(ref, null); annotation.setTextAttributes(attributesKey); } } } public void visitDeclarationExpression(LuaDeclarationExpression dec) { if (!(dec.getContext() instanceof LuaParameter)) { final Annotation a = myHolder.createInfoAnnotation(dec, null); a.setTextAttributes(LuaHighlightingData.LOCAL_VAR); } } public void visitParameter(LuaParameter id) { final Annotation a = myHolder.createInfoAnnotation(id, null); a.setTextAttributes(LuaHighlightingData.PARAMETER); } public void visitIdentifier(LuaIdentifier id) { // TextAttributesKey attributesKey = null; // // if (id.isGlobal()) { // attributesKey = LuaHighlightingData.GLOBAL_VAR; // } else if (id.isLocal() && !id.getText().equals("...")) { // attributesKey = LuaHighlightingData.LOCAL_VAR; // } // // // if (attributesKey != null) { // final Annotation annotation = myHolder.createInfoAnnotation(id, null); // annotation.setTextAttributes(attributesKey); // } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8e730c532ada1b27596d4811c6b0b4898fbb20c6
f55e0f08bbbbde3bbf06b83c822a93d54819b1e8
/app/src/main/java/com/jqsoft/nursing/content/ProjectExecutionItemContent.java
43821826aefa06aeba344aba564d644ed96c1f02
[]
no_license
moshangqianye/nursing
27e58e30a51424502f1b636ae47b60b81a3b2ca0
20cd5aace59555ef9d708df0fb03639b2fc843d0
refs/heads/master
2020-09-08T13:39:55.939252
2020-03-20T09:55:34
2020-03-20T09:55:34
221,147,807
0
0
null
null
null
null
UTF-8
Java
false
false
2,911
java
package com.jqsoft.nursing.content; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.jqsoft.nursing.R; import com.jqsoft.nursing.base.Constants; import com.jqsoft.nursing.bean.response_new.ExecutionProjectsResultItemBean; import com.jqsoft.nursing.listener.NoDoubleClickListener; import com.jqsoft.nursing.rx.RxBus; import com.jqsoft.nursing.util.Util; import net.qiujuer.genius.ui.widget.Button; //最近7天执行项目,超时未执行项目中的一项 public class ProjectExecutionItemContent { private Context context; private View view; private ExecutionProjectsResultItemBean bean; public ProjectExecutionItemContent(Context context) { this.context=context; } public void initView(final ExecutionProjectsResultItemBean bean){ this.bean=bean; LayoutInflater inflater = ((Activity)context).getLayoutInflater(); // View dialog = inflater.inflate(R.layout.layout_recyclerview_with_padding,(ViewGroup) getActivity().findViewById(R.id.root)); View rootView = inflater.inflate(R.layout.layout_project_item, null); rootView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); TextView tvProjectName = (TextView) rootView.findViewById(R.id.tv_project_name); TextView tvNextExecutionDate = (TextView) rootView.findViewById(R.id.tv_next_execution_date); Button btnExecute = (Button) rootView.findViewById(R.id.btn_execute); String projectName = getProjectName(); String nextExecutionDate = getNextExecutionDate(); String canonicalNextExecutionDate = Util.getYearMonthDayFromFullString(nextExecutionDate); nextExecutionDate=Constants.HINT_NEXT_EXECUTION_DATE+canonicalNextExecutionDate; tvProjectName.setText(projectName); tvNextExecutionDate.setText(nextExecutionDate); btnExecute.setOnClickListener(new NoDoubleClickListener() { @Override public void onNoDoubleClick(View v) { super.onNoDoubleClick(v); RxBus.getDefault().post(Constants.EVENT_TYPE_PROJECTS_EXECUTION_DID_CLICK_ONE_ITEM, bean); } }); view=rootView; } public String getProjectName(){ if (bean==null){ return Constants.EMPTY_STRING; } else { return Util.trimString(bean.getName()); } } public String getNextExecutionDate(){ if (bean==null){ return Constants.EMPTY_STRING; } else { return Util.trimString(bean.getNxetdate()); } } public View getView() { return view; } public void setView(View view) { this.view = view; } }
[ "123456" ]
123456
57a3d5c69b97a5cca105b3bb1eb368ce6aef36fc
8803b29a2c24d5d5a226863b4bb43e6c4c74287a
/GestionStage/src/utils/DataBase.java
b15ad79ef114b395e76ccbd06363684ebce578bc
[]
no_license
ManelTabessi/GestionEcole
832d1a7494c5c835b7d6dec6b4f2cabdcbadaf88
cbb6a72a4ba95b17c6055b6f453b4b07f0a2b147
refs/heads/master
2021-01-07T22:55:30.409956
2020-02-20T02:04:16
2020-02-20T02:04:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
829
java
package utils; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class DataBase { // les attributs private static DataBase data; private Connection con; String url = "jdbc:mysql://localhost:3306/stage"; String login = "root"; String pwd = ""; // constructeur private DataBase() { try { con = DriverManager.getConnection(url, login, pwd); System.out.println("connexion etablie"); } catch (SQLException ex) { System.out.println(ex); } } public Connection getConnection() { return con; } public static DataBase getInstance() { if (data == null) { data = new DataBase(); } return data; } }
[ "38545873+CharfeddineMohamedAli@users.noreply.github.com" ]
38545873+CharfeddineMohamedAli@users.noreply.github.com
ec5d04b10fbf4cfd102b337cf86f403166318ed7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_11088875ca0454c7de6babd39d88ad537c4d90a0/GroupSelectionQuery/2_11088875ca0454c7de6babd39d88ad537c4d90a0_GroupSelectionQuery_t.java
6b88eef55e1523a77407892ca4721f9241a7f1c1
[]
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,496
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.activiti.explorer.ui.management.identity; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.activiti.engine.IdentityService; import org.activiti.engine.identity.Group; import org.activiti.explorer.data.AbstractLazyLoadingQuery; import com.vaadin.data.Item; import com.vaadin.data.util.ObjectProperty; import com.vaadin.data.util.PropertysetItem; /** * Query that selects available groups for a user. * * @author Joram Barrez */ public class GroupSelectionQuery extends AbstractLazyLoadingQuery { protected IdentityService identityService; protected String userId; public GroupSelectionQuery(IdentityService identityService, String userId) { this.identityService = identityService; this.userId = userId; } public int size() { return (int) (identityService.createGroupQuery().count() - identityService.createGroupQuery().groupMember(userId).count()); } public List<Item> loadItems(int start, int count) { List<Item> groupItems = new ArrayList<Item>(); Set<String> currentGroups = getCurrentGroups(); int nrFound = 0; int tries = 0; while (nrFound < count && tries < 5) { // must stop at some point in time, as otherwise size() would be reached List<Group> groups = identityService.createGroupQuery() .orderByGroupType().asc() .orderByGroupId().asc() .orderByGroupName().asc() .listPage(start + (tries * count), count); for (Group group : groups) { if (!currentGroups.contains(group.getId())) { nrFound++; groupItems.add(new GroupSelectionItem(group)); } } tries++; } return groupItems; } protected Set<String> getCurrentGroups() { Set<String> groupIds = new HashSet<String>(); List<Group> currentGroups = identityService.createGroupQuery().groupMember(userId).list(); for (Group group : currentGroups) { groupIds.add(group.getId()); } return groupIds; } public Item loadSingleResult(String id) { throw new UnsupportedOperationException(); } public void setSorting(Object[] propertyIds, boolean[] ascending) { throw new UnsupportedOperationException(); } class GroupSelectionItem extends PropertysetItem { private static final long serialVersionUID = 1L; public GroupSelectionItem(Group group) { addItemProperty("id", new ObjectProperty<String>(group.getId(), String.class)); if (group.getName() != null) { addItemProperty("name", new ObjectProperty<String>(group.getName(), String.class)); } if (group.getType() != null) { addItemProperty("type", new ObjectProperty<String>(group.getType(), String.class)); } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
168f6956aea32a7722548f097d6c186db2723123
35aa1d8f516515519e97f64d0b1a27fc35fbd404
/src/com/javarush/test/level14/lesson08/home01/SuspensionBridge.java
53ad593c55f6bf8ea8c22cb55b86a3d936708a90
[]
no_license
nni93/JavaRush
8b745d3811a2faa4afd71a54aa7835262ad1c167
8fe515c78acbf4ff6899aff4aad3ae7d9586b5a8
refs/heads/master
2021-01-25T12:07:38.614480
2013-09-06T19:37:56
2013-09-06T19:37:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
172
java
package com.javarush.test.level14.lesson08.home01; class SuspensionBridge implements Bridge { @Override public int getCarsCount() { return 20; } }
[ "nni93@inbox.ru" ]
nni93@inbox.ru
722e48af59b1295b8d51c3e42cd96bff71c677a5
badae85a191540952ee7b9a24596035a5c78e19c
/index-core/src/main/java/com/sun/mdm/index/objects/validation/exception/InvalidContraintByField.java
9db21f02c815bac07e9012cffd9051f29005df29
[]
no_license
ahimanikya/FrescoMDM
864849d48946e4905d7fb9b4523d810ca86909b9
0c71a8fcced848a7d7fcb0e1a17fb01b6bcdf170
refs/heads/master
2021-01-19T19:43:57.048569
2011-01-22T19:03:43
2011-01-22T19:03:43
3,086,550
1
0
null
null
null
null
UTF-8
Java
false
false
1,600
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License ("CDDL")(the "License"). You * may not use this file except in compliance with the License. * * You can obtain a copy of the License at * https://open-dm-mi.dev.java.net/cddl.html * or open-dm-mi/bootstrap/legal/license.txt. See the License for the * specific language governing permissions and limitations under the * License. * * When distributing the Covered Code, include this CDDL Header Notice * in each file and include the License file at * open-dm-mi/bootstrap/legal/license.txt. * If applicable, add the following below this CDDL Header, with the * fields enclosed by brackets [] replaced by your own identifying * information: "Portions Copyrighted [year] [name of copyright owner]" */ package com.sun.mdm.index.objects.validation.exception; /** * @author jwu */ public class InvalidContraintByField extends ValidationException { /** * Creates a new instance of <code>InvalidContraintByField</code> without detail message. */ public InvalidContraintByField() { super("Invalid constraint-by field"); } /** * Constructs an instance of <code>InvalidContraintByField</code> with the specified detail message. * @param fieldName field name */ public InvalidContraintByField(String fieldName) { super(fieldName); } }
[ "jialu@00cabb6a-c93c-0410-93ac-b9195fe8392e" ]
jialu@00cabb6a-c93c-0410-93ac-b9195fe8392e
2eb0a32201440660eeb34ac50e4231f56692819c
bbc0820c4d53fb9e29704dcd9a4eeb4c3c1ad011
/smartapp/src/main/java/com/jldata/smartframe/core/jdbc/dialect/H2Dialect.java
fe778085ba1fbb04d10a6da01d8f209540321730
[ "Apache-2.0" ]
permissive
qq57694878/smartframe
43b08940b827d46898e838b1e2eeef93600ca7de
1fee3104336d1582c3b5cccdcf5672cad8dcfee4
refs/heads/master
2020-03-07T08:59:13.631093
2018-07-26T07:09:10
2018-07-26T07:09:10
127,394,799
1
0
null
null
null
null
UTF-8
Java
false
false
497
java
package com.jldata.smartframe.core.jdbc.dialect; /** * MysqlDialect. */ public class H2Dialect extends Dialect { /** * * @param pageNumber 0代表第一页 * @param pageSize * @param findSql * @return */ public String forPaginate(int pageNumber, int pageSize, StringBuilder findSql) { int offset = pageSize * pageNumber; findSql.append(" limit ").append(offset).append(", ").append(pageSize); // limit can use one or two '?' to pass paras return findSql.toString(); } }
[ "57694878@qq.com" ]
57694878@qq.com
25b03d6f1d2c9f0b5bb6683da034d135ceffca59
458f3f408567db4adc63014ed5cff52c027bf138
/src/main/java/org/ohnlp/medtagger/ml/type/shareToken_Type.java
d6f67d83a30ca7a93be4ad018526bcc06b353bee
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
hehuan2112/MedTaggerWeb
2aa887c4efe9ec5336a99021dc4f3c658dd3b076
7b3c7acc3bb5ac718e10ac6dbabd9013eb18b42e
refs/heads/master
2022-11-15T04:54:37.002402
2020-07-01T20:49:19
2020-07-01T20:49:19
278,906,443
0
0
Apache-2.0
2020-07-11T17:08:07
2020-07-11T17:08:07
null
UTF-8
Java
false
false
6,557
java
/* First created by JCasGen Tue Sep 24 19:28:07 CDT 2013 */ package org.ohnlp.medtagger.ml.type; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.FSGenerator; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.impl.TypeImpl; import org.apache.uima.cas.Type; import org.apache.uima.cas.impl.FeatureImpl; import org.apache.uima.cas.Feature; import org.ohnlp.typesystem.type.syntax.BaseToken_Type; /** * Updated by JCasGen Tue Sep 24 19:28:07 CDT 2013 * @generated */ public class shareToken_Type extends BaseToken_Type { /** @generated */ @Override protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (shareToken_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = shareToken_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new shareToken(addr, shareToken_Type.this); shareToken_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new shareToken(addr, shareToken_Type.this); } }; /** @generated */ @SuppressWarnings ("hiding") public final static int typeIndexID = shareToken.typeIndexID; /** @generated @modifiable */ @SuppressWarnings ("hiding") public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.ohnlp.medtagger.ml.type.shareToken"); /** @generated */ final Feature casFeat_lineNumber; /** @generated */ final int casFeatCode_lineNumber; /** @generated */ public int getLineNumber(int addr) { if (featOkTst && casFeat_lineNumber == null) jcas.throwFeatMissing("lineNumber", "org.ohnlp.medtagger.ml.type.shareToken"); return ll_cas.ll_getIntValue(addr, casFeatCode_lineNumber); } /** @generated */ public void setLineNumber(int addr, int v) { if (featOkTst && casFeat_lineNumber == null) jcas.throwFeatMissing("lineNumber", "org.ohnlp.medtagger.ml.type.shareToken"); ll_cas.ll_setIntValue(addr, casFeatCode_lineNumber, v);} /** @generated */ final Feature casFeat_lineTokenNumber; /** @generated */ final int casFeatCode_lineTokenNumber; /** @generated */ public int getLineTokenNumber(int addr) { if (featOkTst && casFeat_lineTokenNumber == null) jcas.throwFeatMissing("lineTokenNumber", "org.ohnlp.medtagger.ml.type.shareToken"); return ll_cas.ll_getIntValue(addr, casFeatCode_lineTokenNumber); } /** @generated */ public void setLineTokenNumber(int addr, int v) { if (featOkTst && casFeat_lineTokenNumber == null) jcas.throwFeatMissing("lineTokenNumber", "org.ohnlp.medtagger.ml.type.shareToken"); ll_cas.ll_setIntValue(addr, casFeatCode_lineTokenNumber, v);} /** @generated */ final Feature casFeat_shareBegin; /** @generated */ final int casFeatCode_shareBegin; /** @generated */ public int getShareBegin(int addr) { if (featOkTst && casFeat_shareBegin == null) jcas.throwFeatMissing("shareBegin", "org.ohnlp.medtagger.ml.type.shareToken"); return ll_cas.ll_getIntValue(addr, casFeatCode_shareBegin); } /** @generated */ public void setShareBegin(int addr, int v) { if (featOkTst && casFeat_shareBegin == null) jcas.throwFeatMissing("shareBegin", "org.ohnlp.medtagger.ml.type.shareToken"); ll_cas.ll_setIntValue(addr, casFeatCode_shareBegin, v);} /** @generated */ final Feature casFeat_shareEnd; /** @generated */ final int casFeatCode_shareEnd; /** @generated */ public int getShareEnd(int addr) { if (featOkTst && casFeat_shareEnd == null) jcas.throwFeatMissing("shareEnd", "org.ohnlp.medtagger.ml.type.shareToken"); return ll_cas.ll_getIntValue(addr, casFeatCode_shareEnd); } /** @generated */ public void setShareEnd(int addr, int v) { if (featOkTst && casFeat_shareEnd == null) jcas.throwFeatMissing("shareEnd", "org.ohnlp.medtagger.ml.type.shareToken"); ll_cas.ll_setIntValue(addr, casFeatCode_shareEnd, v);} /** @generated */ final Feature casFeat_capitalization; /** @generated */ final int casFeatCode_capitalization; /** @generated */ public int getCapitalization(int addr) { if (featOkTst && casFeat_capitalization == null) jcas.throwFeatMissing("capitalization", "org.ohnlp.medtagger.ml.type.shareToken"); return ll_cas.ll_getIntValue(addr, casFeatCode_capitalization); } /** @generated */ public void setCapitalization(int addr, int v) { if (featOkTst && casFeat_capitalization == null) jcas.throwFeatMissing("capitalization", "org.ohnlp.medtagger.ml.type.shareToken"); ll_cas.ll_setIntValue(addr, casFeatCode_capitalization, v);} /** initialize variables to correspond with Cas Type and Features * @generated */ public shareToken_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); casFeat_lineNumber = jcas.getRequiredFeatureDE(casType, "lineNumber", "uima.cas.Integer", featOkTst); casFeatCode_lineNumber = (null == casFeat_lineNumber) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_lineNumber).getCode(); casFeat_lineTokenNumber = jcas.getRequiredFeatureDE(casType, "lineTokenNumber", "uima.cas.Integer", featOkTst); casFeatCode_lineTokenNumber = (null == casFeat_lineTokenNumber) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_lineTokenNumber).getCode(); casFeat_shareBegin = jcas.getRequiredFeatureDE(casType, "shareBegin", "uima.cas.Integer", featOkTst); casFeatCode_shareBegin = (null == casFeat_shareBegin) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_shareBegin).getCode(); casFeat_shareEnd = jcas.getRequiredFeatureDE(casType, "shareEnd", "uima.cas.Integer", featOkTst); casFeatCode_shareEnd = (null == casFeat_shareEnd) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_shareEnd).getCode(); casFeat_capitalization = jcas.getRequiredFeatureDE(casType, "capitalization", "uima.cas.Integer", featOkTst); casFeatCode_capitalization = (null == casFeat_capitalization) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_capitalization).getCode(); } }
[ "james_masanz@86f73235-997c-406d-aa19-21ee2444f377" ]
james_masanz@86f73235-997c-406d-aa19-21ee2444f377
20580282bb7473748c3ac15857a48357f0149f78
d9dcadce3c4ca86ef1179f049ac0fa9fa5093d79
/src/test/java/com/meetings/conferent/ConferentMeetingsApplicationTests.java
46cb75b7f16ace2d75a5765f2a58a43d95e8d328
[]
no_license
ventsy95/Meetings
55f89c0445524ebdbb24c5655b93f6fe7ab0c776
7192f2e04d08eebf9cbccae3b731083db6e50d13
refs/heads/master
2022-12-03T09:32:44.278273
2020-03-11T06:40:52
2020-03-11T11:36:25
161,375,854
0
0
null
2022-11-24T05:47:23
2018-12-11T18:21:51
Java
UTF-8
Java
false
false
350
java
package com.meetings.conferent; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ConferentMeetingsApplicationTests { @Test public void contextLoads() { } }
[ "ventsy95@bitbucket.org" ]
ventsy95@bitbucket.org
3554cfbbae54d2fb7f5f06d3acd92ab657aa7131
5754f83f4052dc68ae0ec7ccaa6f17e09631a2a5
/src/com/netgame/lobby/processors/request/IRequestProcessor.java
165c663194d2c1df6e362327e2131b90f0b224ea
[]
no_license
datnt92/ChanServer
241d10b8250bd358b76a9865cd6672eb02655c1a
0bdd4a9959a3e816e14fe1de7dbe6ed8b378b181
refs/heads/master
2021-01-15T19:28:06.190954
2014-01-03T03:22:59
2014-01-03T03:22:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
306
java
package com.netgame.lobby.processors.request; import com.electrotank.electroserver5.extensions.api.value.EsObjectRO; import com.netgame.lobby.model.LobbyModel; public interface IRequestProcessor { void process(LobbyModel model, String playerName, EsObjectRO requestParameters); String getCommand(); }
[ "shadow.walker317@gmail.com" ]
shadow.walker317@gmail.com
a9fef4a2e644e54426cc1957e40d951ec2700f92
52853295b0326f7c7bf99c83fd4181599a73c476
/assigment 2 Java/Vehicle/src/Car.java
8960e99c6a77a7ced8f384da10ec0083b837f667
[]
no_license
codeine-cody/JAVA-AND-APPLICATIONS
c9f308f6f15759dc7fd7741de828d988bb324eac
6c11986d1a9953bf60b8940aa616cbfee16317f2
refs/heads/master
2021-01-19T15:24:52.094100
2017-12-06T17:04:26
2017-12-06T17:04:26
100,967,146
0
1
null
null
null
null
UTF-8
Java
false
false
714
java
public class Car extends Automobile{ protected int maxPassengers; public Car() { super(); this.maxPassengers = 0;// TODO Auto-generated constructor stub } public Car(int year, double weight, String licensePlate, String make, int maxPassengers) { super(year, weight, licensePlate, make); this.maxPassengers = maxPassengers;// TODO Auto-generated constructor stub } public int getMaxPassengers() { return maxPassengers; } public void setMaxPassengers(int maxPassengers) { this.maxPassengers = maxPassengers; } @Override public String toString() { return "Car [maxPassengers=" + maxPassengers + ", licensePlate=" + licensePlate + ", make=" + make + ", year=" + year + ", weight=" + weight + "]"; } }
[ "ctb1733@aol.com" ]
ctb1733@aol.com
2ef41e24664b9715869c1286ea460da8db948501
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_4eeca9b1a658795e6bb811a9c944191e7536fb44/IntervalMap/3_4eeca9b1a658795e6bb811a9c944191e7536fb44_IntervalMap_t.java
cabf1af310f1f1aa00c2e5af7d7eaf3ab6e4a0e6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
8,018
java
package org.sugis.intervalmap; import java.util.ArrayList; import java.util.Collection; import java.util.Deque; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import javax.annotation.Nonnull; import javax.annotation.concurrent.NotThreadSafe; /** * An IntervalMap represents a map of Interval objects to values, * with the additional ability to query with a single parameter * and find the values of all intervals that contain it. * @author Steven Schlansker * @param <K> the type of the intervals' bounds * @param <V> the type of the values stored in the Map */ @NotThreadSafe public class IntervalMap<K extends Comparable<K>, V> implements Map<Interval<K>, V> { private class IntervalNode { Interval<K> interval; K maxChildIntervalEnd; int maxChildDepth, leftCount, rightCount; V value; IntervalNode left, right; @Override public String toString() { return toString(""); } String toString(String tabs) { return tabs + interval + " => " + value + "(max subinterval end = " + maxChildIntervalEnd + ")\n" + (left == null ? "" : left.toString(tabs + "\t") + "\n") + (right == null ? "" : right.toString(tabs + "\t")); } } private abstract class Traversal<R> { /** return null to continue traversal */ abstract R visit(IntervalNode node); } private IntervalNode root; public IntervalMap<K, V> getContaining(@Nonnull K point) { IntervalMap<K, V> result = new IntervalMap<K, V>(); find(point, root, result); return result; } private void find(K point, IntervalNode current, IntervalMap<K, V> result) { if (current == null) return; if (current.maxChildIntervalEnd == null) return; // no children if (current.maxChildIntervalEnd.compareTo(point) < 0) return; if (current.left != null) find(point, current.left, result); if (current.interval.compareTo(point) == 0) result.put(current.interval, current.value); if (point.compareTo(current.interval.getLowerBound()) < 0) return; if (current.right != null) find(point, current.right, result); } public void clear() { root = null; } public boolean containsKey(Object key) { if (! (key instanceof Interval<?>) || root == null) return false; return get(key) != null; } public boolean containsValue(final Object value) { Boolean result = traverse(new Traversal<Boolean>() { @Override Boolean visit(IntervalNode node) { if (node.value.equals(value)) return Boolean.TRUE; return null; } }); if (result == Boolean.TRUE) return true; /* necessary because result could be null */ return false; } public Set<Entry<Interval<K>, V>> entrySet() { final Set<Entry<Interval<K>, V>> result = new HashSet<Entry<Interval<K>,V>>(); traverse(new Traversal<Void>() { @Override Void visit(final IntervalNode node) { result.add(new Entry<Interval<K>, V>() { public Interval<K> getKey() { return node.interval; } public V getValue() { return node.value; } public V setValue(V value) { return node.value = value; } }); return null; } }); return result; } public V get(Object key) { IntervalNode node = findUnchecked(key, root, new LinkedList<IntervalNode>()); if (node == null) return null; return node.value; } public boolean isEmpty() { return root == null; } public Set<Interval<K>> keySet() { final Set<Interval<K>> result = new HashSet<Interval<K>>(); traverse(new Traversal<Void>() { @Override Void visit(final IntervalNode node) { result.add(node.interval); return null; } }); return result; } public V put(@Nonnull Interval<K> key, V value) { IntervalNode newborn = new IntervalNode(); newborn.interval = key; newborn.value = value; if (root == null) root = newborn; else return put(root, newborn); return null; } private V put(@Nonnull IntervalNode top, @Nonnull IntervalNode newborn) { if (top.interval.equals(newborn.interval)) { V oldvalue = top.value; top.value = newborn.value; return oldvalue; } if (top.interval.compareTo(newborn.interval) < 0) { if (top.right == null) { top.right = newborn; top.rightCount++; adjustMaxChildInterval(top, newborn); top.maxChildDepth = Math.max(top.maxChildDepth, 1); return null; } else { V result = put(top.right, newborn); adjustMaxChildInterval(top, newborn); if (result == null) // a new node was added top.rightCount++; return result; } } else { if (top.left == null) { top.left = newborn; top.leftCount++; adjustMaxChildInterval(top, newborn); top.maxChildDepth = Math.max(top.maxChildDepth, 1); return null; } else { V result = put(top.left, newborn); adjustMaxChildInterval(top, newborn); if (result == null) // a new node was added top.leftCount++; return result; } } } private void adjustMaxChildInterval(IntervalNode top, IntervalNode newborn) { if (top.maxChildIntervalEnd == null || top.maxChildIntervalEnd.compareTo(newborn.interval.getUpperBound()) < 0) top.maxChildIntervalEnd = newborn.interval.getUpperBound(); } public void putAll(@Nonnull Map<? extends Interval<K>, ? extends V> m) { for (Entry<? extends Interval<K>, ? extends V> e : m.entrySet()) { put(e.getKey(), e.getValue()); } } public V remove(Object key) { List<IntervalNode> trace = new LinkedList<IntervalNode>(); IntervalNode node = findUnchecked(key, root, trace); if (node.left == null && node.right == null) { IntervalNode parent = trace.get(0); if (parent.left == node) { parent.left = null; parent.leftCount = 0; } else { assert parent.right == node; parent.right = null; parent.rightCount = 0; } return node.value; } if (node.left == null) { IntervalNode successor = node.right; IntervalNode successorsParent = node; while (successor.left != null) { successorsParent = successor; successor = successor.left; } // more } else { // more } throw new AssertionError(); } @SuppressWarnings("unchecked") private IntervalNode findUnchecked(Object key, IntervalNode current, List<IntervalNode> trace) { if (! (key instanceof Interval<?>)) return null; Interval<?> ikey = (Interval<?>) key; Class<?> paramClass = ikey.getLowerBound().getClass(); Class<?> intervalClass = root.interval.getLowerBound().getClass(); if (! (intervalClass.isAssignableFrom(paramClass))) return null; try { return find((Interval<K>) key, current, trace); } catch (ClassCastException e) { return null; } } private IntervalNode find(Interval<K> key, IntervalNode current, List<IntervalNode> trace) { if (current == null) return null; if (current.interval.equals(key)) return current; trace.add(0,current); if (current.interval.getLowerBound().compareTo(key.getLowerBound()) < 0) return find(key, current.right, trace); else return find(key, current.left, trace); } public int size() { if (root == null) return 0; return root.leftCount + root.rightCount + 1; } public Collection<V> values() { final Collection<V> result = new ArrayList<V>(); traverse(new Traversal<Void>() { @Override Void visit(final IntervalNode node) { result.add(node.value); return null; } }); return result; } private <R> R traverse(@Nonnull Traversal<R> t) { Deque<IntervalNode> queue = new LinkedList<IntervalNode>(); queue.offerFirst(root); while (!queue.isEmpty()) { IntervalNode node = queue.pop(); if (node == null) continue; R result = t.visit(node); if (result != null) return result; queue.offerFirst(node.left); queue.offerFirst(node.right); } return null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fb2dcfb11726dacf53ffef7a835085b747bdbe3a
2144ee25965acd53e58bad2a6daea6bcf22ad54c
/LUCENE/sliced/c7c9ef6a63/101df6394e.java
101df6394ef0c54077bad03f657b51474519acc8
[]
no_license
MingWEN-CS/InduceBenchmark
84e18f7168ca71f80e6a9b524b3da53cd109fc9e
035c05aee699a17e3120469131b07d2efb1e1bb1
refs/heads/master
2023-07-24T14:20:00.566491
2019-10-12T04:23:25
2019-10-12T04:23:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,763
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.solr.analysis; import org.apache.solr.common.ResourceLoader; import org.apache.solr.common.util.StrUtils; import org.apache.solr.util.plugin.ResourceLoaderAware; import org.apache.lucene.analysis.StopFilter; import org.apache.lucene.analysis.TokenStream; import java.util.HashSet; import java.util.List; import java.util.Set; import java.io.File; import java.io.File; import java.io.IOException; /** * @version $Id$ * @since solr 1.3 */ public class KeepWordFilterFactory extends BaseTokenFilterFactory implements ResourceLoaderAware { private Set<String> words; private boolean ignoreCase; @SuppressWarnings("unchecked") public void inform(ResourceLoader loader) { String wordFiles = args.get("words"); ignoreCase = getBoolean("ignoreCase",false); if (wordFiles != null) { if (words == null) words = new HashSet<String>(); try { java.io.File keepWordsFile = new File(wordFiles); if (keepWordsFile.exists()) { List<String> wlist = loader.getLines(wordFiles); words = StopFilter.makeStopSet( (String[])wlist.toArray(new String[0]), ignoreCase); } else { List<String> files = StrUtils.splitFileNames(wordFiles); for (String file : files) { List<String> wlist = loader.getLines(file.trim()); words.addAll(StopFilter.makeStopSet((String[])wlist.toArray(new String[0]), ignoreCase)); } } } catch (IOException e) { throw new RuntimeException(e); } } } /** * Set the keep word list. * NOTE: if ignoreCase==true, the words are expected to be lowercase */ public void setWords(Set<String> words) { this.words = words; } public void setIgnoreCase(boolean ignoreCase) { this.ignoreCase = ignoreCase; } public KeepWordFilter create(TokenStream input) { return new KeepWordFilter(input,words,ignoreCase); } }
[ "justinwm@163.com" ]
justinwm@163.com
9028dde433cac2921ddc0a33929a9d7684ab1fba
b4cb0574076feae3efb42b33e6bde74faac0bbb7
/src/main/java/com/pineone/icbms/sda/sf/service/SparqlService.java
267486d864993c735db7150c2abce1cdc1784eb1
[ "BSD-2-Clause" ]
permissive
kjones12345/SDA
7eb57662ea1faceb6f10343f9a83a8474921338e
8e8d4c740ddcfd2a656c36512d4cb0cf979356b9
refs/heads/master
2022-01-26T20:02:58.741249
2018-02-27T09:08:02
2018-02-27T09:08:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
16,007
java
package com.pineone.icbms.sda.sf.service; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Collections; import java.util.Comparator; import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.jena.query.QueryExecution; import org.apache.jena.query.QueryExecutionFactory; import org.apache.jena.query.QuerySolution; import org.apache.jena.query.ResultSet; import org.apache.jena.rdf.model.Literal; import org.apache.jena.update.UpdateExecutionFactory; import org.apache.jena.update.UpdateFactory; import org.apache.jena.update.UpdateProcessor; import org.apache.jena.update.UpdateRequest; import org.springframework.http.HttpStatus; import com.pineone.icbms.sda.comm.exception.UserDefinedException; import com.pineone.icbms.sda.comm.util.Utils; public class SparqlService { private final Log log = LogFactory.getLog(this.getClass()); // private final String[][] prefix = { // test private final static String[][] prefix = { { "swrlb", "http://www.w3.org/2003/11/swrlb#" }, { "protege", "http://protege.stanford.edu/plugins/owl/protege#" }, { "ssn", "http://purl.oclc.org/NET/ssnx/ssn#" }, { "rdfs", "http://www.w3.org/2000/01/rdf-schema#" }, { "dct", "http://purl.org/dc/terms/" }, { "icbms", "http://www.pineone.com/campus/" }, { "dc", "http://purl.org/dc/elements/1.1/" }, { "j.0", "http://data.qudt.org/qudt/owl/1.0.0/text/" }, { "owl", "http://www.w3.org/2002/07/owl#" }, { "xsp", "http://www.owl-ontologies.com/2005/08/07/xsp.owl#" }, { "swrl", "http://www.w3.org/2003/11/swrl#" }, { "skos", "http://www.w3.org/2004/02/skos/core#" }, { "DUL", "http://www.loa-cnr.it/ontologies/DUL.owl#" }, { "m2m", "http://www.pineone.com/m2m/" }, { "cc", "http://creativecommons.org/ns#" }, { "p1", "http://purl.org/dc/elements/1.1/#" }, { "foaf", "http://xmlns.com/foaf/0.1/" }, { "xsd", "http://www.w3.org/2001/XMLSchema#" }, { "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, { "qudt", "http://data.nasa.gov/qudt/owl/qudt#" }, { "quantity", "http://data.nasa.gov/qudt/owl/quantity#" }, { "unit", "http://data.nasa.gov/qudt/owl/unit#" }, { "dim", "http://data.nasa.gov/qudt/owl/dimension#" }, { "oecc", "http://www.oegov.org/models/common/cc#" } }; // sparql 쿼리 실행(args없음) public List<Map<String, String>> runSparql(String sparql) throws Exception { return runSparql(sparql, new String[] { "" }); } // sparql 쿼리 실행(args있음) public List<Map<String, String>> runSparql(String sparql, String[] idxVals) throws Exception { String serviceURI = Utils.getSdaProperty("com.pineone.icbms.sda.knowledgebase.sparql.endpoint"); String madeQl = ""; log.info("runSparql start ======================>"); madeQl = makeSparql(sparql, idxVals); sparql = Utils.getSparQlHeader() + madeQl.toString(); log.debug("final sparql==========>\n" + sparql); QueryExecution queryExec = QueryExecutionFactory.sparqlService(serviceURI, sparql); ResultSet rs = queryExec.execSelect(); List<Map<String, String>> list = new ArrayList<Map<String, String>>(); String vName = ""; int m = 0; for (; rs.hasNext();) { QuerySolution qs = rs.nextSolution(); Iterator<String> itr = qs.varNames(); Map<String, String> map = new HashMap<String, String>(); int n = 0; while (itr.hasNext()) { vName = (String) itr.next(); log.debug("vName[" + (m) + "][" + (n++) + "]==================>" + vName); if (qs.get(vName).isLiteral()) { log.debug("this is Literal type ............................"); Literal literal = qs.getLiteral(vName); String vValue = String.valueOf(literal.getValue()); // vValue = replaceUriWithPrefix(vValue); map.put(vName, vValue); } else if (qs.get(vName).isResource()) { log.debug("this is Resource type ............................"); String vValue = qs.getResource(vName).toString(); // vValue = replaceUriWithPrefix(vValue); map.put(vName, vValue); } else { log.debug("this is unKnown QuerySolution type............................"); } } list.add(map); m++; } log.info("runSparql end ======================>"); return list; } // 쿼리에 있는 변수를 적절한 값으로 치환하여 리턴함 public String makeSparql(String sparql, String[] idxVals) throws Exception { int cnt = 0; StringBuffer parseQl = new StringBuffer(); Date now = new Date(); String addStr = ""; String lastStr = ""; String argStr = ""; String idx = ""; int skipCnt = 0; if (idxVals == null) { log.debug("idxVals is null"); } else { log.debug("count of idxVals : " + idxVals.length); log.debug("values of idxVals : " + Arrays.toString(idxVals)); } if (sparql == null || sparql.equals("")) { throw new UserDefinedException(HttpStatus.BAD_REQUEST, "sparql is null or none !"); } log.debug("sparql to make ===========>\n" + sparql); while (!sparql.equals("")) { try { addStr = sparql.substring(0, sparql.indexOf("@{")); } catch (StringIndexOutOfBoundsException e) { // 더이상 "@{"이 없다면 나머지 // 문자열은 그대로 적용 parseQl.append(sparql); break; } lastStr = sparql.substring(sparql.indexOf("@{")); skipCnt += 2; argStr = lastStr.substring(skipCnt, lastStr.indexOf("}")); // log.debug("addStr[" + cnt + "]==========>" + addStr); // log.debug("lastStr[" + cnt + "]==========>" + lastStr); // log.debug("argStr[" + cnt + "]==========>" + argStr); parseQl.append(addStr); if (argStr.equals("systime")) { parseQl.append(Utils.systimeFormat.format(now)); } else if (argStr.equals("sysdate")) { parseQl.append(Utils.sysdateFormat.format(now)); } else if (argStr.equals("todayzero")) { parseQl.append(Utils.sysdateFormat2.format(now) + "T00:00:00"); } else if (argStr.equals("todaylast")) { parseQl.append(Utils.sysdateFormat2.format(now) + "T23:59:59"); } else if (argStr.equals("sysdatetime")) { parseQl.append(Utils.sysdatetimeFormat.format(now)); } else if (argStr.equals("nyear")) { parseQl.append(Utils.nYearFormat.format(now)); } else if (argStr.equals("nmonth")) { parseQl.append(Utils.nMonthFormat.format(now)); } else if (argStr.equals("nday")) { parseQl.append(Utils.nDayFormat.format(now)); } else if (argStr.equals("nhour")) { parseQl.append(Utils.nHourFormat.format(now)); } else if (argStr.equals("nminute")) { parseQl.append(Utils.nMinuteFormat.format(now)); } else if (argStr.equals("nsecond")) { parseQl.append(Utils.nSecondFormat.format(now)); } else if (argStr.equals("sysweekday")) { String d = Utils.sysweekdayFormat.format(now); String dStr = ""; if (d.equals("1")) { // 월요일 dStr = "monday"; } else if (d.equals("2")) { dStr = "tuesday"; } else if (d.equals("3")) { dStr = "wednesday"; } else if (d.equals("4")) { dStr = "thursday"; } else if (d.equals("5")) { dStr = "friday"; } else if (d.equals("6")) { dStr = "saturday"; } else if (d.equals("7")) { // 일요일 dStr = "sunday"; } parseQl.append(dStr); } else if (argStr.startsWith("arg")) { idx = argStr.substring(3); // "arg"이후의 숫자값을 취함 for (int i = 0; i < 100; i++) { if (Integer.parseInt(idx) == i) { parseQl.append(idxVals[i]); break; } } } else if (argStr.startsWith("now")) { String[] split = argStr.split(","); // @{now+3, second, // "YYYYMM"} int val = Integer.parseInt(split[0].substring(3)); // "now"이후의 // 연산자(+, // -)를 취함 // 날짜계산 Calendar cal = new GregorianCalendar(); cal.setTime(now); if (split[1].trim().equals("year")) { log.debug("add year by " + String.valueOf(val)); cal.add(Calendar.YEAR, val); // 년을 더한다. } else if (split[1].trim().equals("month")) { log.debug("add month by " + String.valueOf(val)); cal.add(Calendar.MONTH, val); // 월을 더한다. } else if (split[1].trim().equals("day")) { log.debug("add day by " + String.valueOf(val)); cal.add(Calendar.DAY_OF_YEAR, val); // 하루를 더한다. } else if (split[1].trim().equals("hour")) { log.debug("add hour by " + String.valueOf(val)); cal.add(Calendar.HOUR, val); // 시간을 더한다. } else if (split[1].trim().equals("minute")) { log.debug("add minute by " + String.valueOf(val)); System.out.println("add minute by " + String.valueOf(val)); cal.add(Calendar.MINUTE, val); // 분을 더한다 } else if (split[1].trim().equals("second")) { log.debug("add second by " + String.valueOf(val)); System.out.println("add second by " + String.valueOf(val)); cal.add(Calendar.SECOND, val); // 초를 더한다 } SimpleDateFormat dateFormat = new SimpleDateFormat(split[2]); parseQl.append(dateFormat.format(cal.getTime())); } else { parseQl.append("@{" + argStr + "}"); } skipCnt += argStr.length(); // skipCnt만큼 지난 이후의 나머지 문자열을 설정 sparql = lastStr.substring(skipCnt + 1); // '}'에 대한 1 증가 skipCnt = 0; lastStr = ""; argStr = ""; // cnt++; } // end of while log.debug("sparql made ===========>\n" + parseQl.toString()); return parseQl.toString(); } // sparql 쿼리결과 만들기(argument가 없음) public List<Map<String, String>> runSparqlUniqueResult(List<String> sparQlList) throws Exception { String[] args = null; return runSparqlUniqueResult(sparQlList, args); } // sparql 쿼리결과 만들기(argument가 있음) public List<Map<String, String>> runSparqlUniqueResult(List<String> sparQlList, String[] idxVals) throws Exception { // sparQlList의 쿼리를 수행한 결과를 모두 담고 있는 List List<List<Map<String, String>>> query_result_list = new ArrayList<List<Map<String, String>>>(); // sparQl한개의 수행결과를 담고 있는 List List<Map<String, String>> query_result; boolean haveNullResult = false; // return할 최종결과 List List<Map<String, String>> returnList = new ArrayList<Map<String, String>>(); log.debug("idxVals in getSparqlResult()================>" + Arrays.toString(idxVals)); // sparql 실행해서 구분자로 분리하여 list에 담는다. // 1. 모든 줄에 있는 값을 찾아야 하므로 값이 없는 row가 있으면 바로 return for (int i = 0; i < sparQlList.size(); i++) { query_result = runSparql(sparQlList.get(i), idxVals); log.debug("query_result[" + i + "] =========> \n" + query_result.toString()); if (query_result.size() == 0) { haveNullResult = true; break; } else { query_result_list.add(query_result); log.debug("query_result.size();" + query_result.size()); } } log.debug("query_result_list.size() ==>" + query_result_list.size()); log.debug("haveNullResult ==>" + haveNullResult); // 제일 작은 개수를 찾기위해서 개수및 idx 만으로 이루어진 임시 List를 만듬 List<Cnt> cntList = new ArrayList<Cnt>(); if (haveNullResult == false) { for (int i = 0; i < query_result_list.size(); i++) { Cnt cnt = new Cnt(); cnt.setCnt(query_result_list.get(i).size()); cnt.setIdx(i); cntList.add(cnt); } } // 2. 건수가 제일 작은 것을 기준으로 찾아야함. if (haveNullResult == false && query_result_list.size() > 1) { Collections.sort(cntList, new CntCompare()); int idx = cntList.get(0).getIdx(); // 첫번째 값이 제일 작은값(개수가 제일작은..) List<Map<String, String>> stdList = query_result_list.get(idx); // 기준이 // 되는 // List를 // 추출 query_result_list.remove(idx); // idx에 속하는 List는 제거하여 중복체크되지 않도록 함 log.debug("stdList =========> " + stdList.toString()); log.debug("idx ==>" + idx); // 제일 작은 개수 List를 기준으로 체크한다. int matchCnt = 0; for (int i = 0; i < stdList.size(); i++) { for (int k = 0; k < query_result_list.size(); k++) { if (query_result_list.get(k).contains(stdList.get(i))) { matchCnt++; log.debug("query_result_list.get(" + k + ").contains(stdList.get(" + i + ")) == true"); break; } if (matchCnt == 0) break; // 일치하는 것이 하나라도 확인되면 더이상 체크할 필요 없음 } // List 순환 end // matchCnt와 query_result_list의 개수가 같으면 stdList의 값과 일치하는 값이 // query_result_list각 로우에 // 있다는 의미임 if (matchCnt == query_result_list.size()) { returnList.add(stdList.get(i)); } } log.debug("matchCnt========>" + matchCnt); // 결과값이 one row이면 내부 값을 모두 리턴해줌 } else if (haveNullResult == false && query_result_list.size() == 1) { returnList = query_result_list.get(0); } else { // pass } return returnList; } // update public void updateSparql(String updateql, String[] idxVals) throws Exception { runModifySparql(updateql, idxVals); } // update(delete->insert) public void updateSparql(String deleteql, String insertql, String[] idxVals) throws Exception { // delete runModifySparql(deleteql, idxVals); // insert runModifySparql(insertql, idxVals); } // delete public void deleteSparql(String deleteql, String[] idxVals) throws Exception { runModifySparql(deleteql, idxVals); } // insert public void insertSparql(String insertql, String[] idxVals) throws Exception { runModifySparql(insertql, idxVals); } private void runModifySparql(String sparql, String[] idxVals) throws Exception { String updateService = Utils.getSdaProperty("com.pineone.icbms.sda.knowledgebase.sparql.endpoint") + "/update"; String madeQl = makeSparql(sparql, idxVals); UpdateRequest ur = UpdateFactory.create(madeQl); UpdateProcessor up = UpdateExecutionFactory.createRemote(ur, updateService); up.execute(); } // cnt를 담고 있는 임시 Cnt클래스 private final class Cnt { int idx; int cnt; int getCnt() { return cnt; } void setCnt(int cnt) { this.cnt = cnt; } int getIdx() { return idx; } void setIdx(int idx) { this.idx = idx; } } // 숫자 비교용 클래스(내림차순, DESC) private final class CntCompare implements Comparator<Cnt> { @Override public int compare(Cnt arg0, Cnt arg1) { return arg0.getCnt() > arg1.getCnt() ? -1 : arg0.getCnt() < arg1.getCnt() ? 1 : 0; } } // prefix로 치환(test) private String replaceUriWithPrefix(String vValue) throws Exception { String rst = vValue; for (int m = 0; m < prefix.length; m++) { if (vValue.indexOf((prefix[m][1])) != -1) { rst = vValue.replace(prefix[m][1], prefix[m][0] + ":"); break; } } return rst; } public static void main(String[] args) { SparqlService s = new SparqlService(); try { System.out.println("now1 ==>" + new Date()); System.out.println("result ===>" + s.makeSparql("aaa @{now+10, second, mmss}", new String[] { "" })); System.out.println("result ===>" + s.makeSparql("aaa @{now+50, minute, HHmm}", new String[] { "" })); } catch (Exception e) { e.printStackTrace(); } } }
[ "mart@paran.com" ]
mart@paran.com
9b596aa00e4f66e168a78480e3ccf0ee34d4cbea
d7613fc69bacf8bcbd46dcc132efc870014edfb3
/src/main/java/com/github/javaparser/ast/NodeList.java
10de4fa20b24081d4f247097ddc713e710372d85
[]
no_license
xiaogui10000/javaparser-core
28961a9343b1d0c7263a98ce9362aaa6e033f9ee
7cfecf2bce53b793be9ee45cd63aa1aaa4ad93dc
refs/heads/master
2020-03-24T06:58:08.736546
2018-04-03T02:42:46
2018-04-03T02:42:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
15,334
java
/* * Copyright (C) 2007-2010 Júlio Vilmar Gesser. * Copyright (C) 2011, 2013-2016 The JavaParser Team. * * This file is part of JavaParser. * * JavaParser can be used either under the terms of * a) the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * b) the terms of the Apache License * * You should have received a copy of both licenses in LICENCE.LGPL and * LICENCE.APACHE. Please refer to those files for details. * * JavaParser 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. */ package com.github.javaparser.ast; import com.github.javaparser.Consumer; import com.github.javaparser.HasParentNode; import com.github.javaparser.Predicate; import com.github.javaparser.UnaryOperator; import com.github.javaparser.ast.observer.AstObserver; import com.github.javaparser.ast.observer.Observable; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.Visitable; import com.github.javaparser.ast.visitor.VoidVisitor; import com.github.javaparser.metamodel.InternalProperty; import java.util.*; /** * A list of nodes. * It usually has a parent node. * Unlike normal Nodes, this does not mean that it is a child of that parent. * Instead, this list will make every node it contains a child of its parent. * This way, a NodeList does not create an extra level inside the AST. * * @param <N> the type of nodes contained. */ public class NodeList<N extends Node> implements List<N>, Iterable<N>, HasParentNode<NodeList<N>>, Visitable, Observable { @InternalProperty private List<N> innerList = new ArrayList<>(0); private Node parentNode; private List<AstObserver> observers = new ArrayList<>(); public NodeList() { parentNode = null; } public NodeList(Collection<N> n) { this.addAll(n); } public NodeList(N... n) { this.addAll(Arrays.asList(n)); } @Override public boolean add(N node) { notifyElementAdded(innerList.size(), node); own(node); return innerList.add(node); } private void own(N node) { if (node == null) { return; } setAsParentNodeOf(node); } public boolean remove(Node node) { int index = innerList.indexOf(node); if (index != -1) { notifyElementRemoved(index, node); node.setParentNode(null); } return innerList.remove(node); } @SafeVarargs public static <X extends Node> NodeList<X> nodeList(X... nodes) { final NodeList<X> nodeList = new NodeList<>(); Collections.addAll(nodeList, nodes); return nodeList; } public static <X extends Node> NodeList<X> nodeList(Collection<X> nodes) { final NodeList<X> nodeList = new NodeList<>(); nodeList.addAll(nodes); return nodeList; } public static <X extends Node> NodeList<X> nodeList(NodeList<X> nodes) { final NodeList<X> nodeList = new NodeList<>(); nodeList.addAll(nodes); return nodeList; } public boolean contains(N node) { return innerList.contains(node); } @Override public int size() { return innerList.size(); } @Override public N get(int i) { return innerList.get(i); } @Override public Iterator<N> iterator() { // TODO take care of "Iterator.remove" return innerList.iterator(); } @Override public N set(int index, N element) { if (index < 0 || index >= innerList.size()) { throw new IllegalArgumentException("Illegal index. The index should be between 0 and " + innerList.size() + " excluded. It is instead " + index); } if (element == innerList.get(index)) { return element; } notifyElementReplaced(index, element); innerList.get(index).setParentNode(null); setAsParentNodeOf(element); return innerList.set(index, element); } @Override public N remove(int index) { notifyElementRemoved(index, innerList.get(index)); N remove = innerList.remove(index); if (remove != null) remove.setParentNode(null); return remove; } @Override public boolean isEmpty() { return innerList.isEmpty(); } public void sort(Comparator<? super N> comparator) { // innerList.sort(comparator); Collections.sort(innerList,comparator); } public void addAll(NodeList<N> otherList) { for (N node : otherList) { add(node); } } @Override public void add(int index, N node) { notifyElementAdded(index, node); own(node); innerList.add(index, node); } /** * Inserts the node before all other nodes. */ public NodeList<N> addFirst(N node) { add(0, node); return this; } /** * Inserts the node after all other nodes. (This is simply an alias for add.) */ public NodeList<N> addLast(N node) { add(node); return this; } /** * Inserts the node after afterThisNode. * * @throws IllegalArgumentException when afterThisNode is not in this list. */ public NodeList<N> addAfter(N node, N afterThisNode) { int i = indexOf(afterThisNode); if (i == -1) { throw new IllegalArgumentException("Can't find node to insert after."); } add(i + 1, node); return this; } /** * Inserts the node before beforeThisNode. * * @throws IllegalArgumentException when beforeThisNode is not in this list. */ public NodeList<N> addBefore(N node, N beforeThisNode) { int i = indexOf(beforeThisNode); if (i == -1) { throw new IllegalArgumentException("Can't find node to insert before."); } add(i, node); return this; } @Override public Node getOptionalParentNode() { return parentNode; } /** * Sets the parentNode * * @param parentNode the parentNode * @return this, the NodeList */ @Override public NodeList<N> setParentNode(Node parentNode) { this.parentNode = parentNode; setAsParentNodeOf(innerList); return this; } @Override public Node getParentNodeForChildren() { return parentNode; } @Override public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) { return v.visit(this, arg); } @Override public <A> void accept(final VoidVisitor<A> v, final A arg) { v.visit(this, arg); } /** * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ public void forEach(Consumer<? super N> action) { //innerList.forEach(action); for (N n : innerList) { action.accept(n); } } /** * @see java.util.List#contains(java.lang.Object) */ @Override public boolean contains(Object o) { return innerList.contains(o); } /** * @see java.util.List#toArray() */ @Override public Object[] toArray() { return innerList.toArray(); } /** * @see java.util.List#toArray(java.lang.Object[]) */ @Override public <T> T[] toArray(T[] a) { return innerList.toArray(a); } /** * @see java.util.List#remove(java.lang.Object) */ @Override public boolean remove(Object o) { if (o instanceof Node) { return remove((Node) o); } else { return false; } } /** * @see java.util.List#containsAll(java.util.Collection) */ @Override public boolean containsAll(Collection<?> c) { return innerList.containsAll(c); } /** * @see java.util.List#addAll(java.util.Collection) */ @Override public boolean addAll(Collection<? extends N> c) { //c.forEach(this::add); for (N n : c) { this.add(n); } return !c.isEmpty(); } /** * @see java.util.List#addAll(int, java.util.Collection) */ @Override public boolean addAll(int index, Collection<? extends N> c) { for (N e : c) { add(index++, e); } return !c.isEmpty(); } /** * @see java.util.List#removeAll(java.util.Collection) */ @Override public boolean removeAll(Collection<?> c) { boolean changed = false; for (Object e : c) { changed = remove(e) || changed; } return changed; } /** * @see java.util.List#retainAll(java.util.Collection) */ @Override public boolean retainAll(Collection<?> c) { boolean changed = false; /*for (Object e : this.stream().filter(it -> !c.contains(it)).toArray()) { if (!c.contains(e)) { changed = remove(e) || changed; } }*/ for (Object it : this) { if( !c.contains(it)){ changed=remove(it) || changed; } } return changed; } /** * @see java.util.List#replaceAll(java.util.function.UnaryOperator) */ public void replaceAll(UnaryOperator<N> operator) { for (int i = 0; i < this.size(); i++) { set(i, operator.apply(this.get(i))); } } /** * @see java.util.Collection#removeIf(java.util.function.Predicate) */ public boolean removeIf(Predicate<? super N> filter) { boolean changed = false; /* for (Object e : this.stream().filter(filter).toArray()) { changed = remove(e) || changed; }*/ for (N e : this) { if(filter.test(e)) changed = remove(e) || changed; } return changed; } /** * @see java.util.List#clear() */ @Override public void clear() { while (!isEmpty()) { remove(0); } } /** * @see java.util.List#equals(java.lang.Object) */ @Override public boolean equals(Object o) { return innerList.equals(o); } /** * @see java.util.List#hashCode() */ @Override public int hashCode() { return innerList.hashCode(); } /** * @see java.util.List#indexOf(java.lang.Object) */ @Override public int indexOf(Object o) { return innerList.indexOf(o); } /** * @see java.util.List#lastIndexOf(java.lang.Object) */ @Override public int lastIndexOf(Object o) { return innerList.lastIndexOf(o); } /** * @see java.util.List#listIterator() */ @Override public ListIterator<N> listIterator() { return innerList.listIterator(); } /** * @see java.util.List#listIterator(int) */ @Override public ListIterator<N> listIterator(int index) { return innerList.listIterator(index); } /** * @see java.util.Collection#parallelStream() */ /* @Override public Stream<N> parallelStream() { return innerList.parallelStream(); } */ /** * @see java.util.List#subList(int, int) */ @Override public List<N> subList(int fromIndex, int toIndex) { return innerList.subList(fromIndex, toIndex); } /** * @see java.util.List#spliterator() */ /* public Iterator<N> spliterator() { return innerList.iterator(); }*/ private void notifyElementAdded(int index, Node nodeAddedOrRemoved) { // this.observers.forEach(o -> o.listChange(this, AstObserver.ListChangeType.ADDITION, index, nodeAddedOrRemoved)); List<AstObserver> list=this.observers; for (AstObserver o : list) { o.listChange(this, AstObserver.ListChangeType.ADDITION, index, nodeAddedOrRemoved); } } private void notifyElementRemoved(int index, Node nodeAddedOrRemoved) { // this.observers.forEach(o -> o.listChange(this, AstObserver.ListChangeType.REMOVAL, index, nodeAddedOrRemoved)); List<AstObserver> list=this.observers; for (AstObserver astObserver : list) { astObserver.listChange(this, AstObserver.ListChangeType.REMOVAL, index, nodeAddedOrRemoved); } } private void notifyElementReplaced(int index, Node nodeAddedOrRemoved) { // this.observers.forEach(o -> o.listReplacement(this, index, this.get(index), nodeAddedOrRemoved)); List<AstObserver> list=this.observers; for (AstObserver astObserver : list) { astObserver.listReplacement(this, index, this.get(index), nodeAddedOrRemoved); } } @Override public void unregister(AstObserver observer) { this.observers.remove(observer); } @Override public void register(AstObserver observer) { this.observers.add(observer); } @Override public boolean isRegistered(AstObserver observer) { return this.observers.contains(observer); } /** * Replaces the first node that is equal to "old" with "replacement". * * @return true if a replacement has happened. */ public boolean replace(N old, N replacement) { int i = indexOf(old); if (i == -1) { return false; } set(i, replacement); return true; } /** * @return the opposite of isEmpty() */ public boolean isNonEmpty() { return !isEmpty(); } public void ifNonEmpty(Consumer<? super NodeList<N>> consumer) { if (isNonEmpty()) consumer.accept(this); } /*public static <T extends Node> Collector<T, NodeList<T>, NodeList<T>> toNodeList() { return Collector.of(NodeList::new, NodeList::add, (left, right) -> { left.addAll(right); return left; }); }*/ private void setAsParentNodeOf(List<? extends Node> childNodes) { if (childNodes != null) { for (HasParentNode current : childNodes) { current.setParentNode(getParentNodeForChildren()); } } } private void setAsParentNodeOf(Node childNode) { if (childNode != null) { childNode.setParentNode(getParentNodeForChildren()); } } @Override public String toString() { //return innerList.stream().map(Node::toString).collect(Collectors.joining(", ", "[", "]")); StringBuilder result = new StringBuilder("["); for (N n : innerList) { result.append(n.toString()).append(","); } result.delete(result.length() - ",".length(), result.length()); result.append("]"); return result.toString(); } @Override public <N> N getAncestorOfType(Class<N> classType) { Node parent = getOptionalParentNode(); while (parent != null) { if (classType.isAssignableFrom(parent.getClass())) { return classType.cast(parent); } parent = parent.getOptionalParentNode(); } return null; } }
[ "1337893145@qq.com" ]
1337893145@qq.com
53b134675523918108e29b0e233cf97b9ae2f74e
ac534ecee6a4214ba3e5e372dfaad42d5172c094
/app/src/test/java/com/example/shaw/kotlinapp/ExampleUnitTest.java
31a58dd6752604ceb0fec6ed2b1c252a8c60993e
[]
no_license
shawwang/kotlinAIDL
19e3ed79c5c79c11b8bb3266702768e4e2b7bae8
6d56a1e5aa96e64fe133ab4a862a5a76deb7196a
refs/heads/master
2020-03-28T17:15:20.123439
2018-09-14T10:23:45
2018-09-14T10:23:45
148,772,250
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
package com.example.shaw.kotlinapp; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "289052694@qq.com" ]
289052694@qq.com
a94c10edf4333186075e4c0588e0452de5e5a615
e7c23f1aa565a1050fc50fa5d803c00d149f3c59
/src/main/java/com/beijing/westmall/controller/OrderController.java
a9cdf043703e68bb13a6c0734e92f3b9f3dec713
[]
no_license
Jokerblazes/westmall
3672bdd0fadef7f7e867dbd0834258aeff12963a
bb20551f048a702fce12e9c24520c6dfb1d95bce
refs/heads/master
2020-03-17T05:22:12.629718
2018-05-21T15:29:55
2018-05-21T15:29:55
133,313,840
0
0
null
null
null
null
UTF-8
Java
false
false
2,816
java
package com.beijing.westmall.controller; import com.beijing.westmall.common.Utils; import com.beijing.westmall.entity.Order; import com.beijing.westmall.entity.OrderItem; import com.beijing.westmall.entity.Product; import com.beijing.westmall.repository.OrderRepository; import com.beijing.westmall.repository.ProductRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.repository.query.Param; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.math.BigDecimal; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; /** * @Author Joker * @Description * @Date Create in 上午10:44 2018/5/19 */ @RestController @RequestMapping(value = "/orders") public class OrderController { @Autowired private OrderRepository orderRepository; @Autowired private ProductRepository productRepository; @RequestMapping(method = RequestMethod.POST) public ResponseEntity addOrder(@RequestBody List<OrderItem> orderItems) { List<OrderItem> items = new ArrayList<>(); for (OrderItem orderItem : orderItems) { Product old = productRepository.findOne(orderItem.getProductId()); if (old != null) { orderItem.setProduct(old); items.add(orderItem); } } Order order = Order.createOrder(items); Order actualOrder = orderRepository.save(order); HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.add("location", createLocation(actualOrder)); return new ResponseEntity(httpHeaders, HttpStatus.CREATED); } @RequestMapping(method = RequestMethod.PUT,value = "/{id}") public ResponseEntity updateOrderStatus(@PathVariable Long id, @Param("orderStatus") String orderStatus) { Order order = orderRepository.findOne(id); order.setStatus(orderStatus); Order actualOrder = orderRepository.save(order); return new ResponseEntity<Object>(actualOrder,HttpStatus.NO_CONTENT); } @RequestMapping(method = RequestMethod.GET,value = "/{id}") public Order getOrderById(@PathVariable Long id) { return orderRepository.findOne(id); } @RequestMapping(method = RequestMethod.GET) public List<Order> getOrderByUserId(@Param("userId") Long userId) { return orderRepository.findOrdersByUserId(userId); } private String createLocation(Order actualOrder) { InetAddress inetAddress = Utils.getInetAddress(); return "http://" + inetAddress.getHostAddress() + ":8083/orders/" + actualOrder.getId(); } }
[ "zcd123@qq.com" ]
zcd123@qq.com
4332a63da506b887cf0d2438eb2d874e284d61b3
b1f6d098f0254421dd3da77ac8c8c91fba905880
/app/src/main/java/io/goolean/tech/hawker/merchant/Dialog/Dialog_.java
c7fc0981d42e5eebf8dcac67f14ed61a22c8a423
[]
no_license
myank19/Hawker--Merchant
34d436a831a6f058feb5e235ce453a6509722087
51fea766442149031391e7ff2d4efe331f9040fc
refs/heads/main
2023-06-22T20:01:32.437222
2021-07-18T16:54:06
2021-07-18T16:54:06
357,246,406
0
0
null
null
null
null
UTF-8
Java
false
false
5,904
java
package io.goolean.tech.hawker.merchant.Dialog; import android.app.Activity; import android.app.Dialog; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.net.Uri; import android.view.View; import android.view.Window; import android.widget.TextView; import android.widget.Toast; import io.goolean.tech.hawker.merchant.Constant.ConnectionDetector; import io.goolean.tech.hawker.merchant.Constant.MessageConstant; import io.goolean.tech.hawker.merchant.Constant.Singleton.CallbackSnakebarModel; import io.goolean.tech.hawker.merchant.R; import io.goolean.tech.hawker.merchant.View.Login; import io.goolean.tech.hawker.merchant.View.Otp; public class Dialog_ extends Activity { public static Context _context; public static TextView camera,gallery,connect,tv_Info,btn_info_ok; public static Dialog_ dialog_ = null; public static Dialog dialog; public Dialog_(Context context) { this._context = context; } public static Dialog_ getInstanceDialog(Context context) { if(dialog_==null) _context = context; { dialog = new Dialog(_context); } return dialog_; } public static void dialog_Internet(){ dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.dialog_no_internet_connection); dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); dialog.setCancelable(false); dialog.show(); connect = (TextView)dialog.findViewById(R.id.button_connect_id); connect.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.wifi.WifiSettings"); intent.setComponent(cn); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); _context.startActivity( intent); dialog.dismiss(); } }); } public static void dialog_Close() { if(dialog.isShowing()) { dialog.dismiss(); } } public static void dialog_MessageAppFinish(Context context, String message){ dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.dialog_message_info); dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); dialog.setCancelable(false); dialog.show(); tv_Info =(TextView)dialog.findViewById(R.id.tv_info_id); tv_Info.setText(message); btn_info_ok = (TextView)dialog.findViewById(R.id.button_ok_id); btn_info_ok.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { System.exit(0); } }); } public static void dialog_MessageAppStop(Context context, String message){ dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.dialog_message_info); dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); dialog.setCancelable(true); dialog.show(); tv_Info =(TextView)dialog.findViewById(R.id.tv_info_id); tv_Info.setText(message); btn_info_ok = (TextView)dialog.findViewById(R.id.button_ok_id); btn_info_ok.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); Intent myintent = new Intent(context, Login.class); myintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(myintent); //context.startActivity(myintent, Login.class); //Toast.makeText(context,"hii",Toast.LENGTH_LONG).show(); // Activity activity = (Activity) context; // ////correct way to use finish() // activity.finish(); } }); } public static void dialog_OTPInternet(final Context applicationContext, final String pdevice_id, final String pnumber){ dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.dialog_otp_internet_connection); dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); dialog.setCancelable(false); dialog.show(); connect = (TextView)dialog.findViewById(R.id.button_connect_id); connect.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (ConnectionDetector.getConnectionDetector(applicationContext).isConnectingToInternet() == true) { new Otp().fun_OTPExpire(applicationContext,pdevice_id,pnumber); dialog.dismiss(); }else { CallbackSnakebarModel.getInstance().SnakebarMessage(applicationContext, "Please check your internet connection", MessageConstant.toast_warning); } } }); } }
[ "71424971+myank19@users.noreply.github.com" ]
71424971+myank19@users.noreply.github.com
513a24a96743973d7ca2a8f4ca5a13ec5dfb2c2b
942f45abb7497f8b947a5a95f465697d566fe179
/app/src/main/java/com/luminous/mpartner/Global.java
6b1d5d3c0b629df5e4135a5efb49d3943a136445
[]
no_license
AndroidprojectGame/MPartner
a9d8fdf0a446d0f397c0d8aacabe6dfb50385d4a
fd75dcd30a620d35447bed82794391e4d32b0697
refs/heads/master
2021-08-26T04:39:32.115641
2017-11-21T14:56:56
2017-11-21T14:56:56
111,561,897
1
0
null
null
null
null
UTF-8
Java
false
false
2,022
java
package com.luminous.mpartner; import android.app.Application; import android.content.Context; import android.widget.Toast; import com.luminous.mpartner.ui.activities.PromotionDetailActivity; import com.luminous.mpartner.utils.FontProvider; import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import com.nostra13.universalimageloader.core.assist.QueueProcessingType; import com.splunk.mint.Mint; public class Global extends Application { public static Context context; @Override public void onCreate() { super.onCreate(); context = getApplicationContext(); init(); } public void init() { // Preference.initPreference(context); Mint.initAndStartSession(context, "bdb22cdf"); FontProvider.getInstance().init(context); initImageLoader(context); // ConnectionDetector.init(context); } public static void showToast(String msg) { Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); } public static void initImageLoader(Context context) { // This configuration tuning is custom. You can tune every option, you may tune some of them, // or you can create default configuration by // ImageLoaderConfiguration.createDefault(this); // method. ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context); config.threadPriority(Thread.NORM_PRIORITY - 2); config.denyCacheImageMultipleSizesInMemory(); config.diskCacheFileNameGenerator(new Md5FileNameGenerator()); config.diskCacheSize(50 * 1024 * 1024); // 50 MiB config.tasksProcessingOrder(QueueProcessingType.LIFO); config.writeDebugLogs(); // Remove for release app // Initialize ImageLoader with configuration. ImageLoader.getInstance().init(config.build()); } }
[ "chaudhary8085@gmail.com" ]
chaudhary8085@gmail.com
e59d1d892384aed6aeec20b7b074d148464247d5
7af846ccf54082cd1832c282ccd3c98eae7ad69a
/ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_19/Foo85.java
6274148e779ed6cb13589221ca0fa6b417ea8f02
[]
no_license
Kadanza/TestModules
821f216be53897d7255b8997b426b359ef53971f
342b7b8930e9491251de972e45b16f85dcf91bd4
refs/heads/master
2020-03-25T08:13:09.316581
2018-08-08T10:47:25
2018-08-08T10:47:25
143,602,647
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package taxi.nicecode.com.ftmap.generated.package_19; public class Foo85 { public void foo0(){ new Foo84().foo5(); } public void foo1(){ foo0(); } public void foo2(){ foo1(); } public void foo3(){ foo2(); } public void foo4(){ foo3(); } public void foo5(){ foo4(); } }
[ "1" ]
1
d05f7e190b8ba2a3862ce4bae588c1cd87eb3076
990a2e5e7f2894b3a0c5f2132d8f649cd94e1129
/src/main/java/edu/uiowa/medline/authorAffiliationIdentifier/AuthorAffiliationIdentifierSource.java
9711ccba7f9f872759959150665def0536880afc
[]
no_license
eichmann/MEDLINETagLib
e821e983d2d904abc2ac8b7a9e80cc77c6c92198
676e425785f00b36bad9a846059087ae2e1e53b9
refs/heads/master
2020-03-18T20:20:42.683662
2019-04-05T15:56:31
2019-04-05T15:56:31
135,209,165
0
1
null
null
null
null
UTF-8
Java
false
false
2,072
java
package edu.uiowa.medline.authorAffiliationIdentifier; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import edu.uiowa.medline.MEDLINETagLibTagSupport; @SuppressWarnings("serial") public class AuthorAffiliationIdentifierSource extends MEDLINETagLibTagSupport { private static final Log log = LogFactory.getLog(AuthorAffiliationIdentifierSource.class); public int doStartTag() throws JspException { try { AuthorAffiliationIdentifier theAuthorAffiliationIdentifier = (AuthorAffiliationIdentifier)findAncestorWithClass(this, AuthorAffiliationIdentifier.class); if (!theAuthorAffiliationIdentifier.commitNeeded) { pageContext.getOut().print(theAuthorAffiliationIdentifier.getSource()); } } catch (Exception e) { log.error("Can't find enclosing AuthorAffiliationIdentifier for source tag ", e); throw new JspTagException("Error: Can't find enclosing AuthorAffiliationIdentifier for source tag "); } return SKIP_BODY; } public String getSource() throws JspTagException { try { AuthorAffiliationIdentifier theAuthorAffiliationIdentifier = (AuthorAffiliationIdentifier)findAncestorWithClass(this, AuthorAffiliationIdentifier.class); return theAuthorAffiliationIdentifier.getSource(); } catch (Exception e) { log.error(" Can't find enclosing AuthorAffiliationIdentifier for source tag ", e); throw new JspTagException("Error: Can't find enclosing AuthorAffiliationIdentifier for source tag "); } } public void setSource(String source) throws JspTagException { try { AuthorAffiliationIdentifier theAuthorAffiliationIdentifier = (AuthorAffiliationIdentifier)findAncestorWithClass(this, AuthorAffiliationIdentifier.class); theAuthorAffiliationIdentifier.setSource(source); } catch (Exception e) { log.error("Can't find enclosing AuthorAffiliationIdentifier for source tag ", e); throw new JspTagException("Error: Can't find enclosing AuthorAffiliationIdentifier for source tag "); } } }
[ "eichmann@deep-thought.info-science.uiowa.edu" ]
eichmann@deep-thought.info-science.uiowa.edu
faca49d30d0c48b6a044133c2da2397fc290c3e2
5636dfdf491da08874b93418726fb1a2176e298b
/codebase/l09-architektur/01-nichts/src/main/java/blob/CustomerServiceImpl.java
0ad09fefdfca6bb8ca3725d619eb92cee0a3165b
[]
no_license
SimonGrad/Vorlesung-GUI-2021
f0cc8f25e3eb8fd65db3887acb2f25e25971f985
b768e1bd42d5e859cab2fe6aac239cd62806cbce
refs/heads/master
2023-05-22T17:17:06.411242
2021-06-16T16:54:48
2021-06-16T16:54:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
52
java
package blob; public class CustomerServiceImpl { }
[ "dominik.haas@qaware.de" ]
dominik.haas@qaware.de
7fac890c28b3886805f07578b4107d65bda07b4d
f6f1296c68a9cb825da62e0eb903f5c671d897de
/stylishwidget/src/main/java/com/app/infideap/stylishwidget/view/MessageBoxDialog.java
9ddf5125b5ef09878da722227531d37d5d5aa709
[ "Apache-2.0" ]
permissive
ishandutta2007/Messaging-App
643cbb29d2887ea67d23a5ffb89702598b146326
ba3818eaca4f54f0df63ffe6d118b6ccba07eb25
refs/heads/dev_shiburagi
2022-11-18T08:51:07.605433
2020-07-06T21:41:53
2020-07-06T21:41:53
277,654,647
0
0
Apache-2.0
2020-07-06T21:42:34
2020-07-06T21:41:22
null
UTF-8
Java
false
false
2,117
java
package com.app.infideap.stylishwidget.view; import android.content.Context; import android.support.design.widget.BottomSheetDialog; import android.support.v4.app.FragmentManager; import android.view.View; /** * Created by Zariman on 7/4/2016. */ public class MessageBoxDialog { public static class Builder { private final Context context; private String message; private String text; private View.OnClickListener listener; public Builder(Context context) { this.context = context; } public Builder setMessage(int message) { return setMessage(context.getResources().getString(message)); } public Builder setMessage(String message) { this.message = message; return this; } public Builder setActionButton(int text, View.OnClickListener listener) { return setActionButton(context.getResources().getString(text), listener); } public Builder setActionButton(String text, View.OnClickListener listener) { this.text = text; this.listener = listener; return this; } public Builder setCloseButton(View.OnClickListener listener) { this.text = null; this.listener = listener; return this; } public BottomSheetDialog create() { final MessageBox messageBox = new MessageBox(context); messageBox.setMessage(message); final BottomSheetDialog dialog = new BottomSheetDialog(context); dialog.setContentView(messageBox); if (listener==null){ listener = new View.OnClickListener() { @Override public void onClick(View view) { dialog.hide(); } }; } if (text == null) messageBox.setCloseButton(listener); else messageBox.setActionButton(text, listener); return dialog; } } }
[ "tr32010@gmail.com" ]
tr32010@gmail.com
acd7dcfaf39a0ace8c5d99f50e4a6be108c41d82
c9dab1bf18fe4d7e9d74fe286f9c520fa50a9165
/src/main/java/org/everit/osgi/ecm/annotation/metadatabuilder/ComponentAnnotationMissingException.java
2b9d5b5daeea6805745e5fc43646b9e97b5871a2
[ "Apache-2.0" ]
permissive
everit-org/ecm-annotation-metadatabuilder
0126f04ab3c19fd4662bb724cf3ae59021cb1678
6db8fde727ff21d3df1b67688692e1947fe8dad9
refs/heads/master
2023-08-20T10:31:20.454774
2017-05-24T19:31:07
2017-05-24T19:31:07
24,048,611
0
2
null
2015-11-19T08:54:18
2014-09-15T08:23:50
Java
UTF-8
Java
false
false
1,107
java
/* * Copyright (C) 2011 Everit Kft. (http://www.everit.org) * * 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.everit.osgi.ecm.annotation.metadatabuilder; /** * Thrown when such a class type is passed to the {@link MetadataBuilder} that does not have the * necessary {@link org.everit.osgi.ecm.annotation.Component} annotation. */ public class ComponentAnnotationMissingException extends RuntimeException { private static final long serialVersionUID = -1780793818219338114L; public ComponentAnnotationMissingException(final String message) { super(message); } }
[ "balazs.zsoldos@everit.biz" ]
balazs.zsoldos@everit.biz
d555e615b031a1efc6cb8dcd87edc79e5e5d1190
42a3fc3f839e6bd8c798cb341f6e7e1e445997a7
/app/src/main/java/com/zoctan/solar/user/view/UserDetailView.java
63e74adcf074c307309cca006fe33978423b083f
[ "Apache-2.0" ]
permissive
only2plus/MVP-TestsInfoApp
8065fe27e0ec9322945dae96dd0a6c083a1e9044
0b4852687c6cc4aad02474763fb5ee5c0eaa1235
refs/heads/master
2021-01-18T03:17:37.659814
2017-04-04T03:27:36
2017-04-04T03:27:36
85,832,227
0
0
null
2017-03-22T13:40:37
2017-03-22T13:40:37
null
UTF-8
Java
false
false
501
java
package com.zoctan.solar.user.view; import com.zoctan.solar.beans.UserBean; /** * 用户详情视图接口 */ public interface UserDetailView { // 加载数据的过程中需要提示“正在加载”的反馈信息给用户 void showLoading(); // 加载成功后,需要将“正在加载”反馈信息取消掉 void hideLoading(); // 显示成功信息 void showSuccessMsg(UserBean userBean); // 若失败, 则需要给用户提示信息 void showFailMsg(); }
[ "朱天强" ]
朱天强
9d41954e7c1e53282bd3eae1115912fbc1a72015
9aac468e0efc2732f87d9a1e3c840ae95a08f98c
/BlueBuddy1.4/app/src/main/java/com/bluebuddy/adapters/LocationBasedRecyclerViewAdapter.java
e76b18f828ee5a9ad0f52749d0d71d09a5e63422
[]
no_license
Martin801/bluebuddy
1b7abb22fb09b0ac62e12f513f9c66c7e2bffa2d
0f2e75469eb19d4b317f9d7afff70d000be9cf6c
refs/heads/master
2020-04-08T22:25:16.415151
2018-11-30T11:54:19
2018-11-30T11:54:19
159,786,628
0
0
null
null
null
null
UTF-8
Java
false
false
1,863
java
package com.bluebuddy.adapters; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.bluebuddy.R; import com.bluebuddy.activities.LocationBasedSearchActivity; import com.bluebuddy.models.PeopleSearchGalleryItems; import com.bluebuddy.models.RecyclerViewHolders; import java.util.List; public class LocationBasedRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewHolders> { private List<PeopleSearchGalleryItems> itemList; private Activity _activity; private Context context; public LocationBasedRecyclerViewAdapter(Activity a, Context context, List<PeopleSearchGalleryItems> itemList) { this._activity = a; this.itemList = itemList; this.context = context; } @Override public RecyclerViewHolders onCreateViewHolder(ViewGroup parent, int viewType) { View layoutView = LayoutInflater.from(parent.getContext()).inflate(R.layout.peoplesearchgallerycard, null); RecyclerViewHolders rcv = new RecyclerViewHolders(layoutView); return rcv; } @Override public void onBindViewHolder(RecyclerViewHolders holder, int position) { holder.Srchpname.setText(itemList.get(position).getSrchpname()); holder.Srchppic.setImageResource(itemList.get(position).getSrchppic()); holder.CVPS.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(_activity, LocationBasedSearchActivity.class); _activity.startActivity(intent); } }); } @Override public int getItemCount() { return this.itemList.size(); } }
[ "martinwrght82@gmail.com" ]
martinwrght82@gmail.com
fd46600da658d048fbcce11de96a0c5613f7ce6f
60604e92cdd79e2dbffc639d1bbd8b5472788dcc
/src/java/bcit/contacts/ContactsService.java
56a5422177766d08a23093397f7bc3946d852847
[]
no_license
nidaa/Flex_testproject2
695bd0cd576b4b566d28c7a529f7ceecc9c82fab
1d51a13c651c5e428168cdcb93efb624445c373c
refs/heads/master
2022-12-24T01:52:28.849098
2020-09-21T14:30:55
2020-09-21T14:30:55
297,354,427
0
0
null
null
null
null
UTF-8
Java
false
false
5,005
java
package java.bcit.contacts; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.EntityTransaction; import javax.persistence.Persistence; import javax.persistence.Query; import org.apache.log4j.Logger; /** * <p>A simple example demonstrating how to interface JEE using JPA/Hibernate * with Flex (i.e. MXML, ActionScript) to produce a Create, Read, Update, * Delete (CRUD) application.</p> * <p>References:</p> * <ul> * <li><a href="https://www.hibernate.org/42.html">Sessions and Transactions</a></li> * <li><a href="http://javanotepad.blogspot.com/2007/08/managing-jpa-entitymanager-lifecycle.html"> * Managing JPA EntityManager lifecycle</a></li> * <li><a href="http://javanotepad.blogspot.com/2007/06/how-to-close-jpa-entitymanger-in-web.html"> * How to close a JPA EntityManger in web applications</a></li> * <li><a href="http://docs.jboss.org/hibernate/stable/entitymanager/reference/en/html_single/"> * Hibernate EntityManager</a></li> * </ul> * * @author Arron Ferguson * @version 1.0 */ public class ContactsService { private static Logger logger = Logger.getLogger(ContactsService.class); private static final String PERSISTENCE_UNIT = "contacts"; private static EntityManagerFactory emf = null; static { logger.info("LOADING CONTACTSSERVICE CLASS."); emf = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT); } public ContactsService() { super(); } /** * <p>Adds a <code>Contact</code> to the list. If the <code>Contact</code> * already exists, no action is taken.</p> * @param c the <code>Contact</code> to add. */ public void addContact(Contact c) { if(c == null) { return; } EntityManager em = emf.createEntityManager(); logger.info("PERSISTENCE ENTITYMANAGER ACQUIRED."); logger.info("ABOUT TO ADD CONTACT: fName: " + c.getFirstName() + ", lName: " + c.getLastName() + ", email:" + c.getEmailAddress() + ", phone: " + c.getPhoneNumber()); EntityTransaction tx = em.getTransaction(); try { tx.begin(); Contact c2 = em.find(java.bcit.contacts.Contact.class, new Long(122)); c2.setFirstName("THUNDERSTRUCK"); em.flush(); em.merge(c); tx.commit(); } catch (Exception e) { logger.error("CONTACT APP PERSISTING ERROR: " + e.getMessage()); tx.rollback(); } finally { logger.info("CONTACT APP CLOSING ENTITY MANAGER."); em.close(); } } /** * <p>Edits a <code>Contact</code> that already exists within the list. If * the <code>Contact</code> does not exist, the <code>Contact</code> is * added to the list.</p> * @param c the <code>Contact</code> to edit. */ public void editContact(Contact c) { logger.info("CONTACT TO UPDATE: " + c); addContact(c); } /** * <p>Deletes a <code>Contact</code> that already exists within the list. If * the <code>Contact</code> does not exist (based on the id), no action * is taken.</p> * @param id the id to used to delete a <code>Contact</code>. */ public void deleteContact(Long id) { logger.info("ABOUT TO DELETE CONTACT"); EntityManager em = emf.createEntityManager(); logger.info("PERSISTENCE ENTITYMANAGER ACQUIRED."); Query contactByIdQuery = em.createNamedQuery("contact.getById"); contactByIdQuery.setParameter("id", id); Contact c = (Contact) contactByIdQuery.getSingleResult(); EntityTransaction tx = em.getTransaction(); try { tx.begin(); em.remove(c); tx.commit(); } catch (Exception e) { logger.error("CONTACT APP PERSISTING ERROR: " + e.getMessage()); tx.rollback(); } finally { logger.info("CONTACT APP CLOSING ENTITY MANAGER."); em.close(); } } /** * <p>Returns a list of <code>Contact</code> objects. If there are no * contacts in the datastore, an empty list is returned.</p> * @return the list of <code>Contact</code>s. */ public List<Contact> getContacts() { logger.info("ABOUT TO RETRIEVE CONTACTS"); logger.info("AND THIS INSTANCE IS: " + this + " thread: " + Thread.currentThread()); EntityManager em = emf.createEntityManager(); logger.info("PERSISTENCE ENTITYMANAGER ACQUIRED."); Query findAllContactsQuery = em.createNamedQuery("contact.findAll"); List<Contact> contacts = findAllContactsQuery.getResultList(); if (contacts != null) { logger.debug("CONTACT APP RETRIEVED: " + contacts.size() + " CONTACT(S)"); } return contacts; } }
[ "nidaa_als@yahoo.com" ]
nidaa_als@yahoo.com
de6305a88d20b2fbc8cfa10be472566663766097
b137fe4c4c44ae81d4690198094ecb8a8a4633d7
/src/java/pruebas/pruebaconexion.java
b7ae1d0fd126a584a4eda99126e01192f92442f2
[]
no_license
afsaenzs2017/EffectiveVersion21092021
79ad5a8a41670a00de97ea1fa716e019f0a19d05
72e8f9ff59003489fd956fbbc57c5062f2e57342
refs/heads/master
2023-07-30T02:39:01.073662
2021-09-21T21:17:40
2021-09-21T21:17:40
408,975,731
0
0
null
null
null
null
UTF-8
Java
false
false
286
java
package pruebas; import controlador.conexion; import java.sql.Connection; public class pruebaconexion { public static void main(String[] args) { conexion con = new conexion(); Connection reg = con.getConn(); } }
[ "andressalazar@aoacolombia.com" ]
andressalazar@aoacolombia.com
888f81d048e8463a578a9275b4637302e59cbc1b
23a2fa5c913e651660d445653a406850fedb9742
/app/src/main/java/in/cbslgroup/ezeeoffice/Utils/ConnectivityReceiver.java
1bf73c8f2df066b5abf7daddd80efaa6e6c56b8d
[]
no_license
anku1207/EzeeOffice
c5c458b468319f56f3e919d109b99fd66a1197ce
033432b0a0359d844bd405ebb6458d71f5978599
refs/heads/main
2023-08-02T01:57:56.675355
2021-09-25T07:27:23
2021-09-25T07:27:23
410,205,666
0
0
null
null
null
null
UTF-8
Java
false
false
1,468
java
package in.cbslgroup.ezeeoffice.Utils; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class ConnectivityReceiver extends BroadcastReceiver { public static ConnectivityReceiverListener connectivityReceiverListener; public ConnectivityReceiver() { super(); } @Override public void onReceive(Context context, Intent arg1) { ConnectivityManager cm = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting(); if (connectivityReceiverListener != null) { connectivityReceiverListener.onNetworkConnectionChanged(isConnected); } } public static boolean isConnected() { ConnectivityManager cm = (ConnectivityManager) MyApplication.getInstance().getApplicationContext() .getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); return activeNetwork != null && activeNetwork.isConnectedOrConnecting(); } public interface ConnectivityReceiverListener { void onNetworkConnectionChanged(boolean isConnected); } }
[ "you@example.com" ]
you@example.com
284c75362ceee5e88a05120c1133d19a92625426
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/appbrand/widget/b/a.java
323c5710cb75277a5fc996b68d0c57799b110b90
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
480
java
package com.tencent.mm.plugin.appbrand.widget.b; import com.tencent.mm.protocal.protobuf.cwu; public abstract interface a extends com.tencent.luggage.a.b { public abstract com.tencent.mm.am.b<cwu> a(String paramString1, int paramInt1, String paramString2, int paramInt2); } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes5.jar * Qualified Name: com.tencent.mm.plugin.appbrand.widget.b.a * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
04bec68a627c12a47318b1672b049a65f179d6e6
835e96df1feec258b29d0ffeb71637c7cde37f80
/src/main/java/info/reflectionsofmind/dicerobot/method/IRollParser.java
0013d83004629d71a3259f1c56c6d2de4d9f5828
[]
no_license
LeastFixedPoint/wave-dice-robot
0542a45ee33b8ec2902d15e91bce96ec96f379f3
63b834e2c082f86862840d1185b68b48e4bc10f1
refs/heads/master
2021-01-25T12:01:48.970628
2010-02-10T12:43:33
2010-02-10T12:43:33
39,583,777
0
0
null
null
null
null
UTF-8
Java
false
false
266
java
package info.reflectionsofmind.dicerobot.method; import info.reflectionsofmind.dicerobot.exception.CannotParseRollException; public interface IRollParser<TRollInput extends IRollRequest> { TRollInput parse(String input) throws CannotParseRollException; }
[ "shooshpanchick@9dbda60a-bb1c-11de-8784-f7ad4773dbab" ]
shooshpanchick@9dbda60a-bb1c-11de-8784-f7ad4773dbab
1e75780be8b29d30f2e856fb9415383a5f71e6b8
9097e9c3c52f59d8dea2adfceddda0bf80223fc1
/src/main/java/controller/Home.java
f2883b703bc7da42b147daf430ac02503605ef10
[]
no_license
priantf/SiteVotacao
7b771253f4dd5912a04a1ccfbcb5bd843481c5fa
33194f6503c35789a94b27bead5b9587ab4dfbd3
refs/heads/master
2020-05-18T03:53:09.202868
2019-06-08T14:00:28
2019-06-08T14:00:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
631
java
package controller; import javax.servlet.ServletContext; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(name = "Home.action", urlPatterns = {"/Home.action"}) public class Home extends HttpServlet{ @Override public void doGet(HttpServletRequest req, HttpServletResponse resp){ ServletContext sc = req.getServletContext(); try{ sc.getRequestDispatcher("/html/login.jsp").forward(req, resp); } catch (Exception e){} } }
[ "luiz.prianti@outlook.com" ]
luiz.prianti@outlook.com
3bc9f6ce42caa70e87c7fca0b80bb610684910e9
bb3f7b661da0d0b6c66f78e346aca11bc5d34df9
/TaxiClient/google-play-services_lib/Driver/src/com/appspot/hk_taxi/anyTaxi/model/PhoneNumber.java
507af06fdcf04430bd35d35c7b36f480a2416544
[]
no_license
cyw617/taxi
0f7ae9d4e0e805061ec3a5f0a6f34a3273d005f6
02b9ef301990e872dd5cd3737faa04cde46c2a94
refs/heads/master
2021-01-25T04:01:22.192818
2014-05-08T06:49:46
2014-05-08T06:49:46
16,577,329
2
10
null
null
null
null
UTF-8
Java
false
false
1,932
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ /* * This code was generated by https://code.google.com/p/google-apis-client-generator/ * (build: 2014-04-01 18:14:47 UTC) * on 2014-04-04 at 08:05:00 UTC * Modify at your own risk. */ package com.appspot.hk_taxi.anyTaxi.model; /** * Model definition for PhoneNumber. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the anyTaxi. For a detailed explanation see: * <a href="http://code.google.com/p/google-http-java-client/wiki/JSON">http://code.google.com/p/google-http-java-client/wiki/JSON</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class PhoneNumber extends com.google.api.client.json.GenericJson { /** * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String number; /** * @return value or {@code null} for none */ public java.lang.String getNumber() { return number; } /** * @param number number or {@code null} for none */ public PhoneNumber setNumber(java.lang.String number) { this.number = number; return this; } @Override public PhoneNumber set(String fieldName, Object value) { return (PhoneNumber) super.set(fieldName, value); } @Override public PhoneNumber clone() { return (PhoneNumber) super.clone(); } }
[ "hongzimao@gmail.com" ]
hongzimao@gmail.com
f8a1bebc64021cf21a3d52ce2940f13def25fe89
67308b6a765014a153049f2feb680b0e9fc19afc
/DSLQL/src/main/java/org/uva/sea/ql/VisualizeTester.java
6851102bfbe0eae73ede063a3ed508fe8bd5361e
[]
no_license
kevinvdbekerom/FormBuilderDSL
556e56cf2dfcf4882f05014e8ca84472a8d1d08e
dc1f0cfbc15a559edde7cf4c0b3645c34a845b1b
refs/heads/master
2020-12-03T13:10:37.686076
2016-09-08T16:28:18
2016-09-08T16:28:18
67,719,454
0
0
null
null
null
null
UTF-8
Java
false
false
2,649
java
package org.uva.sea.ql; import java.awt.EventQueue; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import javax.swing.JPanel; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.CommonTokenStream; import org.uva.sea.ql.ast.form.Form; import org.uva.sea.ql.experiment.ASTVisualizer; import org.uva.sea.ql.parser.QLLexer; import org.uva.sea.ql.parser.QLParser; import org.uva.sea.ql.parser.QLParser.FormContext; public class VisualizeTester { static String FA = "D:\\Master\\Software Construction\\Github\\Kevin van den Bekerom\\DSLQL\\src\\main\\resources\\SampleForm.txt"; String FB = "D:\\Master\\Software Construction\\Github\\Kevin van den Bekerom\\DSLQL\\src\\main\\resources\\DependancyCheckUnsafe.txt"; String FC = "D:\\Master\\Software Construction\\Github\\Kevin van den Bekerom\\DSLQL\\src\\main\\resources\\DependancyCheckSafe.txt"; String FD = "D:\\Master\\Software Construction\\Github\\Kevin van den Bekerom\\DSLQL\\src\\main\\resources\\TypeCheckTest.txt"; public static void main(String [] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { ASTVisualizer frame = new ASTVisualizer(); testDrawVisitor(getParser(parseFile(FA)), frame); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } public static void testDrawVisitor(QLParser parser, ASTVisualizer visualizer) { FormContext fc = parser.form(); // begin parsing at init rule Form f = new Form("testForm", fc.b.result); visualizer.drawQuestions(f, visualizer.contentPane); } public static QLParser getParser(String in){ // create a CharStream that reads from standard input ANTLRInputStream input = new ANTLRInputStream(in); // create a lexer that feeds off of input CharStream QLLexer lexer = new QLLexer(input); // create a buffer of tokens pulled from the lexer CommonTokenStream tokens = new CommonTokenStream(lexer); // create a parser that feeds off the tokens buffer QLParser parser = new QLParser(tokens); return parser; } public static String parseFile(String filepath) throws Exception { BufferedReader br = new BufferedReader(new FileReader(filepath)); try { StringBuilder sb = new StringBuilder(); String line = br.readLine(); while (line != null) { sb.append(line); sb.append(System.lineSeparator()); line = br.readLine(); } String everything = sb.toString(); return everything; } catch (Exception e) { return e.getMessage(); } finally { br.close(); } } }
[ "kevin92.bekerom@live.nl" ]
kevin92.bekerom@live.nl
37cfa11459037b58a438940e0205eb0e0d7d127a
2e966a890a65ee54dbd1f0722d6c5d98a7831d3e
/MyMusic/src/main/java/softuni/exam_21_feb_2021/models/binding/UserLoginBindingModel.java
5c9c19b7549180dd7cf0f95552fcfa62a258138c
[]
no_license
Andrey-V-Georgiev/SPRING_FUNDAMENTALS
cb97ac728c9edb3aa22d65f42985fbe37ba3aaf2
2a5e4f25c4bc24a74e9f9ed57bea3f9a0e8970ea
refs/heads/master
2023-03-10T03:54:40.185889
2021-02-21T11:55:20
2021-02-21T11:55:20
325,343,463
0
0
null
null
null
null
UTF-8
Java
false
false
929
java
package softuni.exam_21_feb_2021.models.binding; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; public class UserLoginBindingModel { private String username; private String password; public UserLoginBindingModel() { } public UserLoginBindingModel(String username, String password) { this.username = username; this.password = password; } @NotBlank @Size(min = 3, max = 20, message = "Username must be between 3 and 20 symbols") public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } @NotBlank @Size(min = 5, max = 20, message = "Password must be between 5 and 20 symbols") public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
[ "andrey.v.georgiev@gmail.com" ]
andrey.v.georgiev@gmail.com
a452d4d5c7800ccf5896f657d4971770e1deb20b
4cb935ea7e0f84d6db3d1db7473f99fadb6795ae
/Ciclo2/Retos/Concesionario/src/Auto.java
527bdb5e7315c7b80b74c09c70dfbcc7ec0970aa
[]
no_license
sergiiop/MisionTIC2022
615484e89ddeeceabf39984d657a2d5ceae413e2
9a6f7932cd2ae44ba59a21b4bb30924b86947ed4
refs/heads/main
2023-07-13T12:11:27.711741
2021-08-19T01:19:06
2021-08-19T01:19:06
370,511,211
2
0
null
null
null
null
UTF-8
Java
false
false
433
java
public class Auto { private String marca; private int tipo; public Auto(String marca, int tipo) { this.marca = marca; this.tipo = tipo; } public void setMarca(String marca) { this.marca = marca; } public void setTipo(int tipo) { this.tipo = tipo; } public String getMarca() { return marca; } public int getTipo() { return tipo; } }
[ "sergio-luis98@hotmail.com" ]
sergio-luis98@hotmail.com
0218e73f7588904c66a0dba738be67937614b0a4
e7a2bd4f75bf1ad0ccb51b3c24fa4b2b36a01732
/FootballScores/app/src/main/java/barqsoft/footballscores/sync/ScoresAuthenticatorService.java
4d0ef06860a2460747d5d00301e92144dd766e6e
[]
no_license
DevB007/UdacitySuperDuo
eff907ec1b683bfb6c7523947e203217eca2ea46
47eedbf81635497a1b07ac161d477c63a722e57e
refs/heads/master
2021-01-20T18:27:48.748021
2016-08-17T12:22:58
2016-08-17T12:22:58
65,858,228
0
0
null
null
null
null
UTF-8
Java
false
false
525
java
package barqsoft.footballscores.sync; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.support.annotation.Nullable; public class ScoresAuthenticatorService extends Service { ScoresAuthenticator mAuthenticator; @Override public void onCreate() { super.onCreate(); mAuthenticator = new ScoresAuthenticator(this); } @Nullable @Override public IBinder onBind(Intent intent) { return mAuthenticator.getIBinder(); } }
[ "deveshwar.bhardwaj@gmail.com" ]
deveshwar.bhardwaj@gmail.com
aa33058352beea9f982c3b61d65853051b48826a
0ea120e61eb99abf31045ddeafdab06edd74863f
/src/main/java/net/formio/render/InputMultiplicity.java
8f6b86727576c8d068f7be89bce5a9cee08ab7fb
[]
no_license
beranradek/formio
de2579d8004451a8013a03868cfc91ba33526c10
b1ead8bf81c50498458694e479ebffbb44d0952f
refs/heads/master
2023-08-09T20:07:01.741762
2023-07-22T13:58:23
2023-07-22T13:58:23
18,575,936
32
16
null
2022-07-27T07:12:13
2014-04-08T21:40:39
Java
UTF-8
Java
false
false
947
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 net.formio.render; /** * Multiplicity of form inputs. * @author Radek Beran */ public enum InputMultiplicity { SINGLE, MULTIPLE }
[ "beran.radek@seznam.cz" ]
beran.radek@seznam.cz
5e6ea0dc3c1d7d7cb8000ba9cebe66e48f50f775
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/2/org/jfree/chart/renderer/AbstractRenderer_setBaseCreateEntities_2459.java
d7fda3e18b9b973b684b685fb618c4aa646e2197
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
3,856
java
org jfree chart render base provid common servic render method updat attribut render fire link render chang event rendererchangeev mean plot own render receiv notif render chang plot turn notifi chart abstract render abstractrender cloneabl serializ set base flag control entiti creat request send link render chang event rendererchangeev regist listen param creat visibl param notifi notifi listen base creat entiti getbasecreateent set base creat entiti setbasecreateent creat notifi base creat entiti basecreateent creat notifi fire chang event firechangeev
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
676bc48e5724e8d2388ec990c7d4d2205388a6aa
4c1015a84dd4612926e834ce6490bc3501ad7450
/src/main/java/com/example/HCM20_FPL_CT_INTERN_01_G1_Lab1/entity/student.java
62c6ca7f788a1fd372b91249daea1c009efa0485
[]
no_license
linhln013/HCM20_FPL_CT_INTER_01
f23864ed057569303ed55724af04e036f805a283
1d6577766ad9606dafcb9b17ddf1c8a0920418eb
refs/heads/master
2022-12-18T18:51:20.045295
2020-09-12T02:42:07
2020-09-12T02:42:07
294,651,843
0
0
null
null
null
null
UTF-8
Java
false
false
2,324
java
package com.example.HCM20_FPL_CT_INTERN_01_G1_Lab1.entity; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.springframework.format.annotation.DateTimeFormat; @Entity public class student { @Id @Column(name = "id", length = 8, nullable = false) private String id; @Column(name = "name", length = 50, nullable = false) private String name; @Temporal(TemporalType.DATE) @DateTimeFormat(pattern = "MM/dd/yyyy") @Column(name = "birthday", nullable = false) private Date birthday; @Column(name = "gender", nullable = false) private Boolean gender; @Column(name = "phone", length = 12, nullable = false) private String phone; @Column(name = "email", length = 50, nullable = false) private String email; @Column(name = "major", length = 50, nullable = false) private String major; @Column(name = "address", length = 500, nullable = false) private String address; public student() { super(); } public student(String id, String name, Date birthday, Boolean gender, String phone, String email, String major, String address) { super(); this.id = id; this.name = name; this.birthday = birthday; this.gender = gender; this.phone = phone; this.email = email; this.major = major; this.address = address; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public Boolean getGender() { return gender; } public void setGender(Boolean gender) { this.gender = gender; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getMajor() { return major; } public void setMajor(String major) { this.major = major; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } }
[ "linhlnpc00128@fpt.edu.vn" ]
linhlnpc00128@fpt.edu.vn
950950f1067ea47e379bdea66913da371e5be57e
4bc66f64e0c9c3ee42f0233df0db94007b8f97cf
/Programs/Chapter05Exploratory/Bank.java
adcb5f01834001b98ac1fc89eca42a2d18f9173e
[]
no_license
loganoconnell/APCS-Work
331362f7f74a55ff3385ffe7f98b0f0d4ff2c481
3e1e08dd00422d825f6a8cb1dfddf9616051697e
refs/heads/master
2020-04-05T09:55:41.676615
2017-07-03T04:50:38
2017-07-03T04:50:38
81,633,703
0
0
null
null
null
null
UTF-8
Java
false
false
940
java
// Bank.java // This file contains the <Bank> class used to demonstrate using object methods. public class Bank { private double checking; private double savings; public Bank() { checking = 0.0; savings = 0.0; } public Bank(double c, double s) { checking = c; savings = s; } public double getChecking() { return checking; } public double getSavings() { return savings; } public double getCombined() { return checking + savings; } public void checkingDeposit(double amount) { checking += amount; } public void savingsDeposit(double amount) { savings += amount; } public void checkingWithdrawal(double amount) { checking -= amount; } public void savingsWithdrawal(double amount) { savings -= amount; } public void closeChecking() { checking = 0; } public void closeSavings() { savings = 0; } }
[ "logan.developeremail@gmail.com" ]
logan.developeremail@gmail.com
a4cc4133b970a209c15946c5ebcca2e11bee9882
0907c886f81331111e4e116ff0c274f47be71805
/sources/androidx/media2/exoplayer/external/util/TimestampAdjuster.java
80b9957b5e34365adf037a8a0584856e6185c154
[ "MIT" ]
permissive
Minionguyjpro/Ghostly-Skills
18756dcdf351032c9af31ec08fdbd02db8f3f991
d1a1fb2498aec461da09deb3ef8d98083542baaf
refs/heads/Android-OS
2022-07-27T19:58:16.442419
2022-04-15T07:49:53
2022-04-15T07:49:53
415,272,874
2
0
MIT
2021-12-21T10:23:50
2021-10-09T10:12:36
Java
UTF-8
Java
false
false
2,923
java
package androidx.media2.exoplayer.external.util; public final class TimestampAdjuster { private long firstSampleTimestampUs; private volatile long lastSampleTimestampUs = -9223372036854775807L; private long timestampOffsetUs; public TimestampAdjuster(long j) { setFirstSampleTimestampUs(j); } public synchronized void setFirstSampleTimestampUs(long j) { Assertions.checkState(this.lastSampleTimestampUs == -9223372036854775807L); this.firstSampleTimestampUs = j; } public long getFirstSampleTimestampUs() { return this.firstSampleTimestampUs; } public long getLastAdjustedTimestampUs() { if (this.lastSampleTimestampUs != -9223372036854775807L) { return this.timestampOffsetUs + this.lastSampleTimestampUs; } long j = this.firstSampleTimestampUs; if (j != Long.MAX_VALUE) { return j; } return -9223372036854775807L; } public long getTimestampOffsetUs() { if (this.firstSampleTimestampUs == Long.MAX_VALUE) { return 0; } if (this.lastSampleTimestampUs == -9223372036854775807L) { return -9223372036854775807L; } return this.timestampOffsetUs; } public void reset() { this.lastSampleTimestampUs = -9223372036854775807L; } public long adjustTsTimestamp(long j) { if (j == -9223372036854775807L) { return -9223372036854775807L; } if (this.lastSampleTimestampUs != -9223372036854775807L) { long usToPts = usToPts(this.lastSampleTimestampUs); long j2 = (4294967296L + usToPts) / 8589934592L; long j3 = ((j2 - 1) * 8589934592L) + j; j += j2 * 8589934592L; if (Math.abs(j3 - usToPts) < Math.abs(j - usToPts)) { j = j3; } } return adjustSampleTimestamp(ptsToUs(j)); } public long adjustSampleTimestamp(long j) { if (j == -9223372036854775807L) { return -9223372036854775807L; } if (this.lastSampleTimestampUs != -9223372036854775807L) { this.lastSampleTimestampUs = j; } else { long j2 = this.firstSampleTimestampUs; if (j2 != Long.MAX_VALUE) { this.timestampOffsetUs = j2 - j; } synchronized (this) { this.lastSampleTimestampUs = j; notifyAll(); } } return j + this.timestampOffsetUs; } public synchronized void waitUntilInitialized() throws InterruptedException { while (this.lastSampleTimestampUs == -9223372036854775807L) { wait(); } } public static long ptsToUs(long j) { return (j * 1000000) / 90000; } public static long usToPts(long j) { return (j * 90000) / 1000000; } }
[ "66115754+Minionguyjpro@users.noreply.github.com" ]
66115754+Minionguyjpro@users.noreply.github.com
7d492aecfd4a7e6574ac214e6af098c5e5c90cee
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_c925bfa2de66865eebaa600d939d52d1a05db5a9/ChineseDictionaryReader/19_c925bfa2de66865eebaa600d939d52d1a05db5a9_ChineseDictionaryReader_s.java
daecde0e4991570a53114c5b761c1d5b842a3e48
[]
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,019
java
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; /** * Reads the csv file and builds a ChineseDictionary object from the entries in the file. * * @author Charles Marshall - marshac3 * */ public class ChineseDictionaryReader implements AbstractDictionaryReader { private File dictFile; private BufferedReader reader; /** * Constructor */ public ChineseDictionaryReader(){ dictFile = new File("cedict_ts_u8.csv"); //Chinese/English dictionary file. try { reader = new BufferedReader(new FileReader(dictFile)); } catch (FileNotFoundException e) { System.out.println("Cannot find dictionary file"); } } /** * Creates a new ChineseDictioanry object and adds entries to the dictionary as it reads through the dictionary file. * If entry does not have enough parts(i.e english definitions are missing) then that entry is skipped. */ public AbstractDictionary buildDictionary() { ChineseDictionary dict = new ChineseDictionary(); System.out.println("Reading dictionary file and building dictionary "); String line; try { int i = 0; while((line = reader.readLine()) != null){ String[] array = line.split("\t"); //split the line into separate parts based on where a 'TAB' is if(array.length == 4){ DictionaryEntry entry = new DictionaryEntry(array); dict.addTradChinese(entry.getTradChinese(), entry); dict.addSimpleChinese(entry.getSimpleChinese(), entry); dict.addPinyin(entry.getPinYin(), entry); dict.addEnglish(entry.getEnglish(), entry); } else{ System.out.println("Entry on line " + i + " does not have four parts, skipping entry."); } i++; } } catch (IOException e) { } dict.countPrefixes(); System.out.println("Finished reading file and bulding dictionary"); return dict; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e88f2750aff10df10a2e44afce7a04241b6b7130
2e5029cddee796c3ea26b3a9f4cdaa07403f529f
/Decroos/LaanDecroos_dec2013/Vb0800_PalindroomTest/src/Vb0800_PalindroomTest.java
673fa443cc0a97febce35a90ddc21f5b98b5e2b4
[]
no_license
DavidLejeune/java_DL
adc55fd1d564805098ad79220bc41a2dfdae5fd0
830dae97f6dd63746c115f84eb5e3734b6aacd17
refs/heads/master
2021-01-10T18:04:34.240986
2016-02-07T12:40:36
2016-02-07T12:40:36
51,246,830
0
0
null
null
null
null
UTF-8
Java
false
false
1,965
java
/** * @(#)Vb0800_PalindroomTest.java * * Vb0800_PalindroomTest application * */ import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class Vb0800_PalindroomTest extends JFrame { public static void main(String[] argumentenRij) { JFrame frame = new Vb0800_PalindroomTest(); frame.setSize(550,300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setTitle("Vb0800_PalindroomTest"); // naam aanpassen als je Paneel van naam wijzigt !!! Paneel paneel = new Paneel(); frame.setContentPane( paneel ); frame.setVisible(true); } } class Paneel extends JPanel { private JLabel label; private JButton knop; private JTextField tekstvak; private String boodschap = ""; // Constructor public Paneel() { label = new JLabel (" Test woord of het een palindroom is "); knop = new JButton( "Test" ); knop.addActionListener( new KnopHandler() ); tekstvak = new JTextField( 20 ); add( label ); add( tekstvak ); add( knop ); } public void paintComponent( Graphics g ) { super.paintComponent( g ); g.drawString (boodschap , 50,50); } // interne klasse voor event-handler class KnopHandler implements ActionListener { public void actionPerformed( ActionEvent e ) { // hier komen de event-handler opdrachten String invoer = tekstvak.getText(); //.toUpperCase(); StringBuffer sb = new StringBuffer (invoer); String omgekeerd = sb.reverse().toString(); tekstvak.setText( omgekeerd ); // of : "" + sb.reverse() // of : sb.toString() if (invoer.equalsIgnoreCase(omgekeerd)) boodschap = "Dat is een palindroom !"; //IgnoreCase else boodschap = "Dat is geen palindroom !"; repaint(); } } }
[ "Lejeune.David@outlook.com" ]
Lejeune.David@outlook.com
3f7aa0bf53cb65df3c4f721539a36af50c98a261
2928aaa722c858300d0adb8c3bec6604e8cae134
/app/src/test/java/com/example/lyskin/webserviceclient/ExampleUnitTest.java
8cba13e4db7c3938a1cc066e170491d3a55ab1ad
[]
no_license
vlados123321/WebServiceClient
e3c1f446e94b9ba48e0cdc1743c6468b6709d6b2
7227d7abe5e1cd02ce21ab55b65b0c2fa4789738
refs/heads/master
2020-04-25T19:21:40.205410
2019-02-28T11:28:50
2019-02-28T11:28:50
173,017,269
0
0
null
null
null
null
UTF-8
Java
false
false
396
java
package com.example.lyskin.webserviceclient; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "ul-2015-28@mail.ru" ]
ul-2015-28@mail.ru
550562c65636da9abcddd7c3224cc0990f9cdd67
a70bb22000cd7c6cfb01aa1db33164d92bf42a59
/rumo-springboot-yunpan/src/main/java/com/rumo/pojo/Resource.java
f0aa31e9a3cf1ed3f821e0d46babe4cd1a735870
[]
no_license
zixuncool/springboot-all
ef6cc0281a92b8a6a41706966aaec3aad6c1c04b
478333f32ff28477613e95ffdf11e7acc21fd488
refs/heads/master
2020-05-19T10:19:15.819966
2018-10-10T12:00:09
2018-10-10T12:00:09
184,964,876
0
0
null
null
null
null
UTF-8
Java
false
false
2,206
java
package com.rumo.pojo; import java.util.Date; public class Resource { private Integer id; private String name; private Integer folderId; private Date createTime; private Long filesize; private String ext; private String oldname; private String path; private Date updateTime; private Integer userId; private Integer type; private Integer status; private Integer isDelete; private Integer seq;// 排序号 public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getFolderId() { return folderId; } public void setFolderId(Integer folderId) { this.folderId = folderId; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Long getFilesize() { return filesize; } public void setFilesize(Long filesize) { this.filesize = filesize; } public String getExt() { return ext; } public void setExt(String ext) { this.ext = ext; } public String getOldname() { return oldname; } public void setOldname(String oldname) { this.oldname = oldname; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public Integer getUserId() { return userId; } public void setUserId(Integer userId) { this.userId = userId; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public Integer getIsDelete() { return isDelete; } public void setIsDelete(Integer isDelete) { this.isDelete = isDelete; } public Integer getSeq() { return seq; } public void setSeq(Integer seq) { this.seq = seq; } }
[ "xuchengfeifei@163.com" ]
xuchengfeifei@163.com
53ff46c83ef474335533aad289c82a00bddc2751
03c9a883c939389efbc8e4feb7636673b7883d81
/src/main/java/gungor/alper/joke/jokeapp/JokeappApplication.java
8e83b0aff750d9883c12c7df47cc461055ed2863
[]
no_license
alpergng/spring5-jokes-app
4cb3c2d4329adbf4d93d81d59c2fc82dc9099463
6a056cae12d9a8703677c36a4254ee55b54fde76
refs/heads/master
2022-01-16T20:50:16.840456
2019-07-21T15:12:09
2019-07-21T15:12:09
198,066,714
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package gungor.alper.joke.jokeapp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class JokeappApplication { public static void main(String[] args) { SpringApplication.run(JokeappApplication.class, args); } }
[ "gungor.alper@yandex.com" ]
gungor.alper@yandex.com
c0f0a8b756e36998691b5b77b35d9ac0841c533b
5ff605535fc26d9e5281b3f16374cf206d091cce
/src/what/settings/Settings.java
995a117f735e2b0d5b2b194ccef2fd79ecad0927
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
eternalmatt/WhatAndroid
1fe68229ecaa2ef2ca6fe36af2ead2d0c8949f0b
95305572c46a7560c8b10aa598ce28baff637319
refs/heads/master
2021-01-18T14:06:36.712015
2013-02-23T00:37:30
2013-02-23T00:37:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,339
java
package what.settings; import java.util.HashMap; import java.util.Set; import what.gui.R; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import api.util.Tuple; public class Settings { private static SharedPreferences settings; private static SharedPreferences.Editor settingsEditor; protected static HashMap<String, Tuple<Integer, Integer>> themes; static { themes = new HashMap<String, Tuple<Integer, Integer>>(); themes.put("newgroove", new Tuple<Integer, Integer>(R.style.Theme_newgroove, R.color.newgroove)); themes.put("Schnappi", new Tuple<Integer, Integer>(R.style.Theme_schnappi, R.color.schnappi)); themes.put("Moldy Walls by senatortom", new Tuple<Integer, Integer>(R.style.Theme_moldy_walls, R.color.moldy_walls)); themes.put("Gwindow Loves Tom by senatortom", new Tuple<Integer, Integer>(R.style.Theme_gwindow_loves_tom, R.color.gwindow_loves_tom)); themes.put("Light", new Tuple<Integer, Integer>(R.style.LightTheme, R.color.roboto)); themes.put("Dark", new Tuple<Integer, Integer>(R.style.DarkTheme, R.color.robotoDark)); themes.put("Old E and 4 Blunts by amxtrash", new Tuple<Integer, Integer>(R.style.Theme_old_e_and_four_blunts, R.color.old_e_and_four_blunts)); themes.put("Watermelon by senatortom", new Tuple<Integer, Integer>(R.style.Theme_watermelon, R.color.watermelon)); themes.put("Ridejckl's Barbie Convertible by ridejckl", new Tuple<Integer, Integer>(R.style.Theme_ridejkcls_barbie_convertible, R.color.ridejkcls_barbie_convertible)); themes.put("Wonder Orange by Guegs", new Tuple<Integer, Integer>(R.style.Theme_wonder_orange, R.color.wonder_orange)); themes.put("Dead Camels by Ananke", new Tuple<Integer, Integer>(R.style.Theme_dead_camels, R.color.dead_camels)); themes.put("Mono by dr4g0n", new Tuple<Integer, Integer>(R.style.Theme_mono, R.color.mono)); themes.put("Example by Skboud", new Tuple<Integer, Integer>(R.style.Theme_example, R.color.example)); themes.put("Penis by Entrapment", new Tuple<Integer, Integer>(R.style.Theme_penis, R.color.penis)); themes.put("Dark Meline by Santigasm", new Tuple<Integer, Integer>(R.style.Theme_dark_meline, R.color.white)); } protected static HashMap<String, Integer> icons; static { icons = new HashMap<String, Integer>(); icons.put("Icon A", R.drawable.icon_a); icons.put("Icon B", R.drawable.icon_b); icons.put("Icon C", R.drawable.icon_c); icons.put("Icon D", R.drawable.icon_d); icons.put("Icon E", R.drawable.icon_e); } /** * Initialize the settings reader and writer, should only be done once * * @param c * Context */ public static void init(Context c) { settings = PreferenceManager.getDefaultSharedPreferences(c); settingsEditor = settings.edit(); } public static boolean getTipsFirstRun() { boolean b = settings.getBoolean("tips_first_run_shown", false); if (!b) { settingsEditor.putBoolean("tips_first_run_shown", true); settingsEditor.commit(); } return b; } public static boolean getFirstHome() { boolean b = settings.getBoolean("tips_home_shown", false); if (!b) { settingsEditor.putBoolean("tips_home_shown", true); settingsEditor.commit(); } return b; } /** * @return */ public static boolean getFirstForum() { boolean b = settings.getBoolean("tips_forum_shown", false); if (!b) { settingsEditor.putBoolean("tips_forum_shown", true); settingsEditor.commit(); } return b; } public static boolean getCaching() { return settings.getBoolean("caching_preference", true); } public static boolean getShowHomeInfo() { return settings.getBoolean("showhomeinfo_preference", true); } public static void saveHomeInfo(Set<String> set) { settingsEditor.putStringSet("homecache_set", set); settingsEditor.commit(); } public static Set<String> getHomeInfo() { return settings.getStringSet("homecache_set", null); } public static void saveHomeInfoCounter(int counter) { settingsEditor.putInt("homecache_counter", counter); commit(); } public static int getHomeInfoCounter() { return settings.getInt("homecache_counter", 0); } public static boolean getCrashReportsEnabled() { return settings.getBoolean("report_preference", true); } public static boolean getSubscribedToThreads() { return settings.getBoolean("subscribetothreads_preference", true); } public static int getHomeIconPath() { return settings.getInt("homeiconpath_preference", R.drawable.icon_a); } public static void saveHomeIconPath(int path) { settingsEditor.putInt("homeiconpath_preference", path); commit(); } public static boolean getHomeIcon() { return settings.getBoolean("homeicon_preference", true); } public static boolean getBoldSetting() { return settings.getBoolean("boldthreads_preference", true); } public static Tuple<Integer, Integer> getTheme() { return new Tuple<Integer, Integer>(settings.getInt("theme_preference_a", R.style.Theme_newgroove), settings.getInt( "theme_preference_b", R.color.newgroove)); } public static void saveTheme(int theme, int color) { settingsEditor.putInt("theme_preference_a", theme); settingsEditor.putInt("theme_preference_b", color); commit(); } public static boolean getDebugPreference() { return settings.getBoolean("debug_preference", false); } public static boolean getQuickSearch() { return settings.getBoolean("quickSearch_preference", true); } public static boolean getSpotifyButton() { return settings.getBoolean("spotifyButton_preference", true); } public static boolean getLastfmButton() { return settings.getBoolean("lastfmButton_preference", true); } public static boolean getAnnouncementsService() { return settings.getBoolean("announcementsService_preference", true); } public static String getAnnouncementsServiceInterval() { return settings.getString("announcementsService_interval", "180"); } public static boolean getInboxService() { return settings.getBoolean("inboxService_preference", true); } public static String getInboxServiceInterval() { return settings.getString("inboxService_interval", "60"); } public static boolean getNotificationsService() { return settings.getBoolean("notificationsService_preference", false); } public static String getNotificationsServiceInterval() { return settings.getString("notificationsService_interval", "180"); } public static boolean getCustomBackground() { return settings.getBoolean("customBackground_preference", false); } public static boolean getTileBackground() { return settings.getBoolean("tileBackground_preference", true); } public static String getCustomBackgroundPath() { return settings.getString("customBackground_path", ""); } public static void saveQuickScannerFirstRun(boolean b) { settingsEditor.putBoolean("quickScannerFirstRun", b); commit(); } public static boolean getQuickScannerFirstRun() { return settings.getBoolean("quickScannerFirstRun", true); } public static void saveFirstRun(boolean b) { settingsEditor.putBoolean("firstRun", b); commit(); } public static boolean getFirstRun() { return settings.getBoolean("firstRun", true); } public static boolean getAvatarsEnabled() { return settings.getBoolean("avatarsEnabled_preference", true); } public static boolean getGesturesEnabled() { return settings.getBoolean("gesturesEnabled_preference", true); } public static boolean getSubscriptionsEnabled() { return settings.getBoolean("subscriptionsEnabled_preference", true); } public static void saveNumberOfAnnouncements(int i) { settingsEditor.putInt("numberOfA", i); } public static void saveCustomBackgroundPath(String s) { settingsEditor.putString("customBackground_path", s); commit(); } public static String getHostPreference() { return settings.getString("host_preference", ""); } public static String getPortPreference() { return settings.getString("port_preference", ""); } public static String getPasswordPreference() { return settings.getString("password_preference", ""); } public static int getNumberOfAnnouncements() { try { return settings.getInt("numberOfA", 0); } catch (Exception e) { e.printStackTrace(); return 0; } } public static void saveNumberOfBlogPosts(int i) { settingsEditor.putInt("numberOfB", i); } public static int getNumberOfBlogPosts() { try { return settings.getInt("numberOfB", 0); } catch (Exception e) { e.printStackTrace(); return 0; } } public static void saveMessageHashCode(int hash) { settingsEditor.putInt("messageHashCode", hash); } public static int getMessageHashCode() { try { return settings.getInt("messageHashCode", 0); } catch (Exception e) { e.printStackTrace(); return 0; } } public static void saveUserId(int id) { settingsEditor.putInt("userId", id); } public static int getUserId() { return settings.getInt("userId", 0); } public static void saveUsername(String username) { settingsEditor.putString("username", username); } public static String getUsername() { return settings.getString("username", ""); } public static void savePassword(String password) { settingsEditor.putString("password", password); } public static String getPassword() { return settings.getString("password", ""); } public static void saveRememberMe(boolean b) { settingsEditor.putBoolean("rememberMe", b); } public static boolean getRememberMe() { return settings.getBoolean("rememberMe", false); } public static void saveSessionId(String id) { settingsEditor.putString("sessionId", id); } public static String getSessionId() { return settings.getString("sessionId", ""); } public static void saveAuthKey(String key) { settingsEditor.putString("authKey", key); } public static String getAuthKey() { return settings.getString("authKey", ""); } public static void commit() { settingsEditor.commit(); } /** * @return the settings */ public static SharedPreferences getSettings() { return settings; } /** * @return the settingsEditor */ public static SharedPreferences.Editor getSettingsEditor() { return settingsEditor; } public static float getGestureSensitivity() { return settings.getFloat("gestureSensitivity_preference", 2.5f); } }
[ "tim.pirate@gmail.com" ]
tim.pirate@gmail.com
feafe5a12e08732aa1240c37144960b28fe86a15
a523ea500d94e9ab8f4fa626122e2110eb0bc846
/Java/008.字符串转换整数.java
e8e4bf980eca7e42f762015e49cf2720af0be418
[ "Apache-2.0" ]
permissive
hitdave/leetCodeSolution
0933c1442ce36a6966ae03c0973a677328b8cbfe
758503fa013e943350ea886d18e175420823cee1
refs/heads/master
2020-09-01T08:21:44.457342
2020-04-21T09:37:59
2020-04-21T09:37:59
218,918,724
2
0
null
null
null
null
UTF-8
Java
false
false
1,111
java
public class Solution { public int myAtoi(String str) { // 去掉字符串首尾的空格 str = str.trim(); // 判断是否为空和长度是否为0 if(str == null || str.length() == 0) return 0; int sign = 1, start = 0, len = str.length(); long sum = 0; // 判断符号 char firstChar = str.charAt(0); if (firstChar == '+') { sign = 1; start++; } else if (firstChar == '-') { sign = -1; start++; } for (int i = start; i < len; i++) { if (!Character.isDigit(str.charAt(i))) // 判断是否为数字 return (int) sum * sign; sum = sum * 10 + str.charAt(i) - '0'; // 判断是否越界 if (sign == 1 && sum > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } if (sign == -1 && (-1) * sum < Integer.MIN_VALUE) { return Integer.MIN_VALUE; } } return (int) sum * sign; } }
[ "hit_wjy@163.com" ]
hit_wjy@163.com
5031f24b6db910e601ecceb0bf3f04764dca664b
b4c9f04c77972e2aa9d0693ed5d476d28d42a441
/quick-dubbo/dubbo-producer/src/main/java/com/dubbo/producer/service/HelloService.java
7529be298ed994bf46cc75269385f2e36352c868
[]
no_license
SKJX1216/spring-boot-quick
a2959e353798f285822723a3f557b0fe1904293d
0c9c7fdca25f524876faeb18b90560f253e6084c
refs/heads/master
2020-03-18T08:35:17.699605
2018-05-22T15:46:48
2018-05-22T15:46:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
105
java
package com.dubbo.producer.service; public interface HelloService { String sayHello(String name); }
[ "wangxc@mac.local" ]
wangxc@mac.local
94ac8a6c5a31deffc0ddc4c73dee46d4f864885a
0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7
/JavaSource/dream/app/doc/service/AppDocReqService.java
c0aed82d335edaad4a2b8f49d91306645173ad06
[]
no_license
eMainTec-DREAM/DREAM
bbf928b5c50dd416e1d45db3722f6c9e35d8973c
05e3ea85f9adb6ad6cbe02f4af44d941400a1620
refs/heads/master
2020-12-22T20:44:44.387788
2020-01-29T06:47:47
2020-01-29T06:47:47
236,912,749
0
0
null
null
null
null
UHC
Java
false
false
1,283
java
package dream.app.doc.service; import java.util.List; import dream.app.doc.dto.AppDocReqDTO; /** * 결재요청 * @author javaworker * @version $Id: AppDocReqService.java,v 1.2 2013/12/23 06:34:52 pochul2423 Exp $ * @since 1.0 */ public interface AppDocReqService { /** * 결재요청(결재문서 작성) * @author javaworker * @version $Id: AppDocReqService.java,v 1.2 2013/12/23 06:34:52 pochul2423 Exp $ * @since 1.0 * * @param AppDocReqDTO * @param flowDtlDTOList * @throws Exception */ String inputAppDocReq(AppDocReqDTO AppDocReqDTO, List flowDtlDTOList); /** * 결재선 조회 * @author javaworker * @version $Id: AppDocReqService.java,v 1.2 2013/12/23 06:34:52 pochul2423 Exp $ * @since 1.0 * * @param appDocReqDTO * @return */ List findFlowUserList(AppDocReqDTO appDocReqDTO); /** * 결재요청시 default값(제목, 내용) 가져오기 * @author javaworker * @version $Id: AppDocReqService.java,v 1.2 2013/12/23 06:34:52 pochul2423 Exp $ * @since 1.0 * * @param appDocReqDTO * @return */ String [] findDefaultInform(AppDocReqDTO appDocReqDTO); }
[ "HN4741@10.31.0.185" ]
HN4741@10.31.0.185
dd65fc8c5ced3dab4f076333d8a18ce45f91e6cb
8c9489e6820c9d8cf2e1b157171bf6e80f1930dc
/2.JavaCore/src/com/javarush/task/task12/task1227/Solution.java
981c07144e4926e03794b60a23c6316e8d044984
[]
no_license
YuriyTombasov/JavaRush
5e85f4701724629a84a7655521e1699e2b6f77bc
dcc425371357d8f980804b0b1c5e5ae33b6333b5
refs/heads/master
2021-04-12T04:50:17.913708
2018-11-06T17:10:14
2018-11-06T17:10:14
125,962,723
0
0
null
null
null
null
UTF-8
Java
false
false
765
java
package com.javarush.task.task12.task1227; /* Fly, Run, Swim для классов Duck, Penguin, Toad */ public class Solution { public static void main(String[] args) { } public interface Fly { public void fly(); } public interface Run { public void run(); } public interface Swim { public void swim(); } public class Duck implements Fly, Run, Swim{ public void fly() { } public void run() { } public void swim() { } } public class Penguin implements Run, Swim{ public void run() { } public void swim() { } } public class Toad implements Swim{ public void swim() { } } }
[ "u.a.tombasov@gmail.com" ]
u.a.tombasov@gmail.com
8c7b5f8879ce84a5105a41e499009c4b50dfcb0a
2161aee1ef78f77249028689fb483cf78983ed2a
/src/main/java/org/nanotek/base/ShortStringBase.java
cac8e3120b0d0e0f13a801b61bd66d2fa2e83921
[]
no_license
josecarloscanova/base_entity
c1430c804e6dbabe70b4840a271bc821f4d99a3e
1b074e03522c3e134534c357bcc3eb4d6d1e1e14
refs/heads/master
2021-01-11T13:56:03.548199
2017-06-20T15:33:43
2017-06-20T15:33:43
94,900,215
0
0
null
null
null
null
UTF-8
Java
false
false
1,115
java
package org.nanotek.base; import javax.persistence.Column; import javax.persistence.Entity; import javax.validation.constraints.NotNull; @Entity @SuppressWarnings("serial") public class ShortStringBase extends LongBase { public static final int MAX_LENGTH = 31; @NotNull @Column(nullable=false, length=MAX_LENGTH) protected String value; public ShortStringBase(){} public ShortStringBase(String value) { super(); this.value = value; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; ShortStringBase other = (ShortStringBase) obj; if (value == null) { if (other.value != null) return false; } else if (!value.equals(other.value)) return false; return true; } @Override public String toString() { return "ShortStringBase [value=" + value + "]"; } }
[ "jose.carlos.canova@gmail.com" ]
jose.carlos.canova@gmail.com
03c4dc0146909e7571d6d9781783f203f2c0e76d
1cd695d4a6ebf72b7abcacbe057a0b3ca54d2756
/src/main/java/indi/zqc/shiro/constant/Constants.java
c02752b29e37d8e460a0424167e8ff7dcf8f5083
[]
no_license
zhuqianchang/springboot-shiro
6146ae91a507aa8299e496389e9a1421a19b249a
1e1cb1dba857f10315e8f46b97fe8d3d3065393a
refs/heads/master
2022-06-05T00:14:52.462550
2019-11-14T10:29:30
2019-11-14T10:29:30
221,172,139
2
0
null
2022-05-20T21:14:52
2019-11-12T08:52:13
Java
UTF-8
Java
false
false
479
java
package indi.zqc.shiro.constant; /** * @author Zhu.Qianchang * @date 2019/11/12. */ public class Constants { public static final String CLIENT_USER = "CLIENT_USER"; public static final String ADMIN_USER = "ADMIN_USER"; public static final String ROLE_USER = "USER"; public static final String ROLE_ADMIN = "ADMIN"; public static final String SHITO_REDIS_PREFIX = "shiro.redis"; public static final String PRINCIPAL_ID_FIELD_NAME = "username"; }
[ "Zhu.Qianchang@geely.com" ]
Zhu.Qianchang@geely.com
bde6c0b803e2267ebc52a7b6eae16e0475d6da1e
61b462bb420e2c07d7444be4a0514634a3946153
/src/main/java/io/github/sbcloudrace/sbauth/SbAuthApplication.java
c81d2f7b9f6f9357670826c7383d5fb9fc74bf8b
[ "MIT" ]
permissive
NFS404/sb-auth
70eea42c80c026392618e35136c825cec54e31e5
c679df0cd97ca688686d500198ce27baa4a4043a
refs/heads/master
2022-12-19T11:35:11.139547
2020-09-20T14:27:34
2020-09-20T14:27:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
504
java
package io.github.sbcloudrace.sbauth; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableFeignClients @EnableEurekaClient public class SbAuthApplication { public static void main(String[] args) { SpringApplication.run(SbAuthApplication.class, args); } }
[ "288571+nilzao@users.noreply.github.com" ]
288571+nilzao@users.noreply.github.com
24e109b6b7d2bd57f5df60eb6c51a608a3a32747
c9bc23ad5b3b2d21dec737c73c1e6c2a1cbe3504
/app/src/main/java/android/support/v7/widget/ai.java
9d70a685553f0b5148c5efe508b26646087f1645
[]
no_license
IamWilliamWang/wolf
2e68faed4cab5ba5b04ae52bc44550be04f36079
6b7ff2b74f0413578a1a34132750e5d79b0c0fe6
refs/heads/master
2020-05-27T10:45:18.596136
2017-02-20T09:58:02
2017-02-20T09:58:02
82,542,835
0
0
null
null
null
null
UTF-8
Java
false
false
1,950
java
package android.support.v7.widget; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.Drawable; import android.support.v4.h.bc; import android.util.AttributeSet; import android.widget.ImageView; public class ai extends ImageView implements bc { private ab a; private ah b; public ai(Context paramContext, AttributeSet paramAttributeSet, int paramInt) { super(bx.a(paramContext), paramAttributeSet, paramInt); paramContext = ac.a(); this.a = new ab(this, paramContext); this.a.a(paramAttributeSet, paramInt); this.b = new ah(this, paramContext); this.b.a(paramAttributeSet, paramInt); } protected void drawableStateChanged() { super.drawableStateChanged(); if (this.a != null) this.a.c(); } public ColorStateList getSupportBackgroundTintList() { if (this.a != null) return this.a.a(); return null; } public PorterDuff.Mode getSupportBackgroundTintMode() { if (this.a != null) return this.a.b(); return null; } public void setBackgroundDrawable(Drawable paramDrawable) { super.setBackgroundDrawable(paramDrawable); if (this.a != null) this.a.a(paramDrawable); } public void setBackgroundResource(int paramInt) { super.setBackgroundResource(paramInt); if (this.a != null) this.a.a(paramInt); } public void setImageResource(int paramInt) { this.b.a(paramInt); } public void setSupportBackgroundTintList(ColorStateList paramColorStateList) { if (this.a != null) this.a.a(paramColorStateList); } public void setSupportBackgroundTintMode(PorterDuff.Mode paramMode) { if (this.a != null) this.a.a(paramMode); } } /* Location: C:\Users\Administrator\Desktop\狼王\classes.jar * Qualified Name: android.support.v7.widget.ai * JD-Core Version: 0.6.0 */
[ "iamjerichoholic@hotmail.com" ]
iamjerichoholic@hotmail.com
d595dbb52f084e116673af37257617e5f6f96e4a
58af525b0d847fd9e157755d4311f76ef517f531
/Section5/test/exercise18/SharedDigitTest.java
d4c99dcca7375f1efb3ef4f71edb633293c2f6ca
[]
no_license
didaRatsimba/UdemyJavaCourse
549506c3e34cac98b87b4ecf33f514f87ef03562
365eb6b1edc3394eeafb9a4d48737108ab3efea4
refs/heads/master
2020-08-18T14:33:18.675768
2019-10-08T16:26:33
2019-10-08T16:26:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,232
java
package exercise18; import common.ParameterizedTestHelper; import org.junit.Test; import org.junit.runners.Parameterized; import java.util.Arrays; import static org.junit.Assert.*; public class SharedDigitTest extends ParameterizedTestHelper { @Parameterized.Parameters(name="Test{index}->{0} and {1} has shared digit? {2}") public static Iterable<Object[]> data() { return Arrays.asList(new Object[][]{ {12, 23, true},//hasSharedDigit(12, 23); → should return true since the digit 2 appears in both numbers {9, 99, false},//hasSharedDigit(9, 99); → should return false since 9 is not within the range of 10-99 {15, 55, true},//hasSharedDigit(15, 55); → should return true since the digit 5 appears in both numbers }); } private final int num1; private final int num2; private final boolean hasSharedDigit; public SharedDigitTest(int num1, int num2, boolean hasSharedDigit) { this.num1 = num1; this.num2 = num2; this.hasSharedDigit = hasSharedDigit; } @Test public void hasSharedDigit() { assertEquals(hasSharedDigit, SharedDigit.hasSharedDigit(num1,num2)); } }
[ "om_paliwal@mentor.com" ]
om_paliwal@mentor.com
b3f35805bd2fda0dbfeb29e4d818a0bbdf34669a
37dbabd1fa9e2731cc6dd21a73ce81ed4d28f990
/springboot/src/main/java/com/huang/springboot/mapper/ItemMapper.java
12dc6b1c95b42e187e6568ac809672aa5538b9b3
[]
no_license
huanggithub/springboot
e43459f6be7d05424d9373b25c82ddde86fd67e6
1e6f4d0b73b00510a7c00b87c88d0c1157d40e58
refs/heads/master
2020-07-03T02:39:52.571741
2019-08-11T12:09:04
2019-08-11T12:09:04
201,759,475
0
0
null
null
null
null
UTF-8
Java
false
false
246
java
package com.huang.springboot.mapper; import com.huang.springboot.pojo.Item; import org.apache.ibatis.annotations.Mapper; /** * create by Mr.huang * 666 * 666 */ @Mapper public interface ItemMapper { void add(Item item); }
[ "noreply@github.com" ]
noreply@github.com
6f65da608de0d563e7cb646716c3378d6707a5f9
6ce955abfc4fa4b9cb36f6c72d607bd1dcd18cf3
/master/verso/verso/data/Source_projects/OCLRuler-src/src/oclruler/genetics/UnstableStateException.java
7cf4622737160d219d86082f84daa47390c66a2e
[]
no_license
Eldodo/VERSO
193ef4795f2fc9d1242caba0bd22552cabb70014
a1a2199d9f06d866268cc12ce04ac22d56b6e633
refs/heads/master
2021-09-14T06:30:25.883867
2019-06-11T03:10:51
2019-06-11T03:10:51
190,816,795
0
0
null
2021-08-02T17:02:55
2019-06-07T22:18:09
HTML
UTF-8
Java
false
false
184
java
package oclruler.genetics; @SuppressWarnings("serial") public class UnstableStateException extends Exception { public UnstableStateException(String message) { super(message); } }
[ "dorian.vandamme@laposte.net" ]
dorian.vandamme@laposte.net
c819e067a1f5ebe788939ff3c246d49471dbf7a3
b2c4c0a39e67f8d1cf696202c6c092ff7661fa44
/src/test/java/com/paulinavelazquez/testingjavajunit5/junitextensions/TimingExtension.java
6e8276123166b31a5a8a0de0f59ebee7005dede6
[]
no_license
paulina-velazquez/behavior-driven-mockito
d83c7d8dac42a960a41fb37bd31cf259b5da4568
39bb0e9856f6d84b94449f529861c81ef41465c3
refs/heads/master
2023-05-13T14:18:21.138732
2021-06-07T22:04:20
2021-06-07T22:04:20
374,703,108
0
0
null
2021-06-07T21:01:49
2021-06-07T14:52:34
Java
UTF-8
Java
false
false
1,509
java
package com.paulinavelazquez.testingjavajunit5.junitextensions; import org.junit.jupiter.api.extension.AfterTestExecutionCallback; import org.junit.jupiter.api.extension.BeforeTestExecutionCallback; import org.junit.jupiter.api.extension.ExtensionContext; import java.lang.reflect.Method; import java.util.logging.Logger; /** * Original source - https://junit.org/junit5/docs/current/user-guide/#extensions-lifecycle-callbacks-timing-extension * * Created by jt on 2018-10-28. */ public class TimingExtension implements BeforeTestExecutionCallback, AfterTestExecutionCallback { private static final Logger logger = Logger.getLogger(TimingExtension.class.getName()); private static final String START_TIME = "start time"; @Override public void beforeTestExecution(ExtensionContext context) throws Exception { getStore(context).put(START_TIME, System.currentTimeMillis()); } @Override public void afterTestExecution(ExtensionContext context) throws Exception { Method testMethod = context.getRequiredTestMethod(); long startTime = getStore(context).remove(START_TIME, long.class); long duration = System.currentTimeMillis() - startTime; logger.info(() -> String.format("Method [%s] took %s ms.", testMethod.getName(), duration)); } private ExtensionContext.Store getStore(ExtensionContext context) { return context.getStore(ExtensionContext.Namespace.create(getClass(), context.getRequiredTestMethod())); } }
[ "mpaulina.velazquez@gmail.com" ]
mpaulina.velazquez@gmail.com
3a7564e2d30b3456f10e8bce402148c7b1c42b8b
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_2/src/b/a/f/e/Calc_1_2_10548.java
6346c636b895a658ee9374166c6efb261415f0c0
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.a.f.e; public class Calc_1_2_10548 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
03eb5fa28812c19382cdd3d740a6122c381265ae
8e65d7e6f61fa6d154626438543d34059fe07093
/rhyme-dictionary/dictionary/main/Main.java
2d1cf2671b0bc669bbf87aa6edb12d1c4a0f9823
[]
no_license
Mazzida/rhyme-dictionary
8b85836e9e86683a9245b8a4284af2fdd4e327e8
3acebc211d71f873bb5348560b132c5e25e22090
refs/heads/master
2016-09-10T21:39:57.475177
2010-05-02T02:35:59
2010-05-02T02:35:59
41,576,188
1
0
null
null
null
null
UTF-8
Java
false
false
248
java
package dictionary.main; public class Main { public static void main(String[] args) { if (args.length == 0) { RhymeDictionaryCLI.start(); } else { for (String arg : args) { RhymeDictionaryCLI.respondStrictRhyme(arg); } } } }
[ "rhironaga@58095746-d721-11de-8b8f-07bb6d2c2ff3" ]
rhironaga@58095746-d721-11de-8b8f-07bb6d2c2ff3
652323de380ed3868332d9b20628541991574258
689557936317b3495778be4e44a4f1d23c7fb0fc
/core/src/mindmelt/game/windows/AdjacentWindow.java
dffa4e7278bada5c5a3125dae26e1c445a5beeb0
[]
no_license
davidclifford/mindmeltGDX
535c551c6a256629f0cf0dbb4b91f037dcb36a69
dea272a1c94650fe7147ed38ea38fa16e5d41e55
refs/heads/master
2021-01-20T03:53:00.857067
2020-09-19T08:11:48
2020-09-19T08:11:48
89,596,215
3
0
null
null
null
null
UTF-8
Java
false
false
2,040
java
package mindmelt.game.windows; import com.badlogic.gdx.Gdx; import mindmelt.game.MindmeltGDX; import mindmelt.game.engine.Engine; import mindmelt.game.gui.Window; import mindmelt.game.objects.Obj; /** * Created by David on 18/05/2017. */ public class AdjacentWindow extends Window { public AdjacentWindow(int x, int y, int w, int h) { super(x, y, w, h); } @Override protected void activate(int x, int y, Engine engine) { int dir = engine.getPlayerDirection(); int x1 = x / SZ - 1; int y1 = y / SZ - 1; int xx = dir==0 ? x1 : dir==3 ? y1 : dir==2 ? -x1 : -y1; int yy = dir==0 ? y1 : dir==3 ? -x1 : dir==2 ? -y1 : x1; //Object ?? int px = engine.getPlayerX()+xx; int py = engine.getPlayerY()+yy; int pz = engine.getPlayerZ(); Obj topObj = engine.getTopObject(px, py, pz); //Pick up if (topObj != null && !topObj.isBlocked() && engine.getPlayerHandObject() == null) { int fx = topObj.getX(); int fy = topObj.getY(); int fz = topObj.getZ(); engine.getPlayerInventory().objToHand(topObj,engine); engine.fromTo(topObj,fx,fy,fz,0,0,0); // Drop } else if (engine.getPlayerHandObject()!=null && engine.canEnter(engine.getPlayerHandObject(),px,py,pz)) { if(topObj==null || (topObj!=null && !topObj.isBlocked())) { engine.getPlayerInventory().handToMap(px,py,pz,engine); engine.fromTo(topObj,0,0,0, px, py, pz); } } else if(topObj != null) { if (topObj.isMonster()){ //attack monster topObj.attack(engine); } else if(topObj.isPerson()){ engine.getWorld().talkTo(engine, topObj.getId(), px, py, pz); } else if(topObj.isAnimal()) { engine.getWorld().talkTo(engine, topObj.getId(), px, py, pz); } } else { engine.activateTile(px, py, pz); } } }
[ "david.clifford.142@gmail.com" ]
david.clifford.142@gmail.com
83493461978cca0b10db510ac83b06aa2a42ca73
66220fbb2b7d99755860cecb02d2e02f946e0f23
/src/net/sourceforge/plantuml/jungle/Needle.java
3df5f1b54f57b409f0350dc8b02b4bb040712c2f
[ "MIT" ]
permissive
isabella232/plantuml-mit
27e7c73143241cb13b577203673e3882292e686e
63b2bdb853174c170f304bc56f97294969a87774
refs/heads/master
2022-11-09T00:41:48.471405
2020-06-28T12:42:10
2020-06-28T12:42:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,089
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2020, Arnaud Roques * * Project Info: https://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * https://plantuml.com/patreon (only 1$ per month!) * https://plantuml.com/paypal * * This file is part of PlantUML. * * Licensed under The MIT License (Massachusetts Institute of Technology License) * * See http://opensource.org/licenses/MIT * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * Original Author: Arnaud Roques */ package net.sourceforge.plantuml.jungle; import java.util.List; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.color.HColorUtils; public class Needle implements UDrawable { private final double length; private final Display display; private final double degreePosition; private final double degreeOperture; private Needle(Display display, double length, double degreePosition, double degreeOperture) { this.display = display; this.degreePosition = degreePosition; this.degreeOperture = degreeOperture; this.length = length; } public void drawU(UGraphic ug) { GTileNode.getTextBlock(display); ug.draw(getLine()); ug = ug.apply(getTranslate(length)); GTileNode.getTextBlock(display).drawU(ug); } private ULine getLine() { final UTranslate translate = getTranslate(length); return new ULine(translate.getDx(), translate.getDy()); } public UTranslate getTranslate(double dist) { final double angle = degreePosition * Math.PI / 180.0; final double dx = dist * Math.cos(angle); final double dy = dist * Math.sin(angle); return new UTranslate(dx, dy); } public UDrawable addChildren(final List<GNode> children) { return new UDrawable() { public void drawU(UGraphic ug) { Needle.this.drawU(ug); if (children.size() == 0) { return; } ug = ug.apply(getTranslate(length / 2)); final UDrawable child1 = getNeedle(children.get(0), length / 2, degreePosition + degreeOperture, degreeOperture / 2); child1.drawU(ug); if (children.size() == 1) { return; } final UDrawable child2 = getNeedle(children.get(1), length / 2, degreePosition - degreeOperture, degreeOperture / 2); child2.drawU(ug); } }; } public static UDrawable getNeedle(GNode root, double length, double degree, double degreeOperture) { final Needle needle0 = new Needle(root.getDisplay(), length, degree, degreeOperture); final UDrawable n1 = needle0.addChildren(root.getChildren()); return new UDrawable() { public void drawU(UGraphic ug) { ug = ug.apply(HColorUtils.BLACK); n1.drawU(ug); } }; } }
[ "plantuml@gmail.com" ]
plantuml@gmail.com
2466ceee8d26b628c3322bec130062f887c708f5
f548aa2643f00abf499179497dfab928f3e38339
/src/main/java/com/asiabill/common/utils/SecUtil.java
95c1a75dbf34b02a922be4f0624fd139a87e2169
[]
no_license
eden2f/PaymentDemo
3040bc2eeb68bca74aded97d0f7cfe72bfc5ecea
6a0f2c72de03a7e590ea851130caca01d21bb75a
refs/heads/master
2023-05-07T09:12:27.261305
2020-08-02T04:57:58
2020-08-02T04:57:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,112
java
package com.asiabill.common.utils; import org.apache.commons.codec.binary.Hex; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.util.Base64Utils; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.SecretKeySpec; import java.security.InvalidKeyException; import java.security.Key; import java.security.NoSuchAlgorithmException; /** * * <p> * Title: * </p> * <p> * Description: 采用AES负责字符串的加密与解密 * </p> * <p> * Copyright: Copyright (c) 2011 版权 * </p> * <p> * Company: * </p> * * @author kevin * @version V1.0 * @date 2011-5-27上午10:57:33 */ public class SecUtil { private static final Log logger = LogFactory.getLog(com.asiabill.common.utils.SecUtil.class); /** * key 可自定义 * XXX keybytes从外部获取 */ private static byte[] keybytes = new byte[16]; public static byte[] getKeybytes() { return keybytes; } public static void setKeybytes(byte[] keybytes) { com.asiabill.common.utils.SecUtil.keybytes = keybytes; } /** * * @author: kevin * @Title encrypt * @Time: 2011-5-27上午10:57:56 * @Description: 加密 * @return: String * @throws: * @param value * @return */ public static String encrypt(String value) { String s = null; if(null == value){ return s; } int mode = Cipher.ENCRYPT_MODE; try { Cipher cipher = initCipher(mode); byte[] outBytes = cipher.doFinal(value.getBytes()); s = String.valueOf(Hex.encodeHex(outBytes)); } catch (Exception e) { logger.error(StringHandleUtils.getExceptionInfo(e)); } return s; } /** * * @author: kevin * @Title decrypt * @Time: 2011-5-27上午10:58:09 * @Description: 解密 * @return: String * @throws: * @param value * @return */ public static String decrypt(String value) { if(null == value){ return null; } String s = null; int mode = Cipher.DECRYPT_MODE; try { Cipher cipher = initCipher(mode); byte[] outBytes = cipher .doFinal(Hex.decodeHex(value.toCharArray())); s = new String(outBytes); } catch (Exception e) { logger.error("解密失败,解密前的值:" + value); logger.error(StringHandleUtils.getExceptionInfo(e)); } return s; } public static String encryptBase64(String value) { String s = null; if(null == value){ return s; } int mode = Cipher.ENCRYPT_MODE; try { Cipher cipher = initCipher(mode); byte[] outBytes = cipher.doFinal(value.getBytes()); //此处使用BASE64做转码功能,同时能起到2次加密的作用。 s = base64Encode(outBytes); } catch (Exception e) { logger.error(StringHandleUtils.getExceptionInfo(e)); } return s; } public static String decryptBase64(String value) { if(null == value){ return null; } String s = null; int mode = Cipher.DECRYPT_MODE; try { Cipher cipher = initCipher(mode); byte[] outBytes = cipher.doFinal(base64Decode(value)); s = new String(outBytes); } catch (Exception e) { logger.error("解密失败,解密前的值:" + value); logger.error(StringHandleUtils.getExceptionInfo(e)); } return s; } private static String base64Encode(byte[] bytes) { return Base64Utils.encodeToString(bytes); } private static byte[] base64Decode(String base64Code) throws Exception { return Base64Utils.decodeFromString(base64Code); } /** * * @author: kevin * @Title initCipher * @Time: 2011-5-27上午10:58:47 * @Description: 初始化密码 * @return: Cipher * @throws: * @param mode * @return * @throws NoSuchAlgorithmException * @throws NoSuchPaddingException * @throws InvalidKeyException */ private static Cipher initCipher(int mode) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException { Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); Key key = new SecretKeySpec(keybytes, "AES"); cipher.init(mode, key); return cipher; } public static void main(String[] args) { } }
[ "lingcq@asiabill.com" ]
lingcq@asiabill.com
95427f3d78655f65970f4450701143ebbeb905be
64aa2eaddeff25040d871a0cb9d40a4973766ee7
/src/main/java/net/gcardone/junidecode/X07.java
12d1f8c90f0db70445a5b27923f52af52d748e35
[ "Apache-2.0" ]
permissive
putragraha/junidecode
83d4cf67630a7e4abb3f1bb444ee47524dc77608
c87fff490196dcfd366fdbaee1e74c11385b37c0
refs/heads/master
2020-03-28T15:11:17.800061
2018-09-12T07:26:35
2018-09-12T07:26:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,492
java
/* * Copyright (C) 2015 Giuseppe Cardone <ippatsuman@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.gcardone.junidecode; /** * Character map for Unicode characters with codepoint U+07xx. * @author Giuseppe Cardone * @version 0.1 */ class X07 { public static final String[] map = new String[]{ "//", // 0x00 "/", // 0x01 ",", // 0x02 "!", // 0x03 "!", // 0x04 "-", // 0x05 ",", // 0x06 ",", // 0x07 ";", // 0x08 "?", // 0x09 "~", // 0x0a "{", // 0x0b "}", // 0x0c "*", // 0x0d "[?]", // 0x0e "", // 0x0f "\'", // 0x10 "", // 0x11 "b", // 0x12 "g", // 0x13 "g", // 0x14 "d", // 0x15 "d", // 0x16 "h", // 0x17 "w", // 0x18 "z", // 0x19 "H", // 0x1a "t", // 0x1b "t", // 0x1c "y", // 0x1d "yh", // 0x1e "k", // 0x1f "l", // 0x20 "m", // 0x21 "n", // 0x22 "s", // 0x23 "s", // 0x24 "`", // 0x25 "p", // 0x26 "p", // 0x27 "S", // 0x28 "q", // 0x29 "r", // 0x2a "sh", // 0x2b "t", // 0x2c "[?]", // 0x2d "[?]", // 0x2e "[?]", // 0x2f "a", // 0x30 "a", // 0x31 "a", // 0x32 "A", // 0x33 "A", // 0x34 "A", // 0x35 "e", // 0x36 "e", // 0x37 "e", // 0x38 "E", // 0x39 "i", // 0x3a "i", // 0x3b "u", // 0x3c "u", // 0x3d "u", // 0x3e "o", // 0x3f "", // 0x40 "`", // 0x41 "\'", // 0x42 "", // 0x43 "", // 0x44 "X", // 0x45 "Q", // 0x46 "@", // 0x47 "@", // 0x48 "|", // 0x49 "+", // 0x4a "[?]", // 0x4b "[?]", // 0x4c "[?]", // 0x4d "[?]", // 0x4e "[?]", // 0x4f "[?]", // 0x50 "[?]", // 0x51 "[?]", // 0x52 "[?]", // 0x53 "[?]", // 0x54 "[?]", // 0x55 "[?]", // 0x56 "[?]", // 0x57 "[?]", // 0x58 "[?]", // 0x59 "[?]", // 0x5a "[?]", // 0x5b "[?]", // 0x5c "[?]", // 0x5d "[?]", // 0x5e "[?]", // 0x5f "[?]", // 0x60 "[?]", // 0x61 "[?]", // 0x62 "[?]", // 0x63 "[?]", // 0x64 "[?]", // 0x65 "[?]", // 0x66 "[?]", // 0x67 "[?]", // 0x68 "[?]", // 0x69 "[?]", // 0x6a "[?]", // 0x6b "[?]", // 0x6c "[?]", // 0x6d "[?]", // 0x6e "[?]", // 0x6f "[?]", // 0x70 "[?]", // 0x71 "[?]", // 0x72 "[?]", // 0x73 "[?]", // 0x74 "[?]", // 0x75 "[?]", // 0x76 "[?]", // 0x77 "[?]", // 0x78 "[?]", // 0x79 "[?]", // 0x7a "[?]", // 0x7b "[?]", // 0x7c "[?]", // 0x7d "[?]", // 0x7e "[?]", // 0x7f "h", // 0x80 "sh", // 0x81 "n", // 0x82 "r", // 0x83 "b", // 0x84 "L", // 0x85 "k", // 0x86 "\'", // 0x87 "v", // 0x88 "m", // 0x89 "f", // 0x8a "dh", // 0x8b "th", // 0x8c "l", // 0x8d "g", // 0x8e "ny", // 0x8f "s", // 0x90 "d", // 0x91 "z", // 0x92 "t", // 0x93 "y", // 0x94 "p", // 0x95 "j", // 0x96 "ch", // 0x97 "tt", // 0x98 "hh", // 0x99 "kh", // 0x9a "th", // 0x9b "z", // 0x9c "sh", // 0x9d "s", // 0x9e "d", // 0x9f "t", // 0xa0 "z", // 0xa1 "`", // 0xa2 "gh", // 0xa3 "q", // 0xa4 "w", // 0xa5 "a", // 0xa6 "aa", // 0xa7 "i", // 0xa8 "ee", // 0xa9 "u", // 0xaa "oo", // 0xab "e", // 0xac "ey", // 0xad "o", // 0xae "oa", // 0xaf "", // 0xb0 "[?]", // 0xb1 "[?]", // 0xb2 "[?]", // 0xb3 "[?]", // 0xb4 "[?]", // 0xb5 "[?]", // 0xb6 "[?]", // 0xb7 "[?]", // 0xb8 "[?]", // 0xb9 "[?]", // 0xba "[?]", // 0xbb "[?]", // 0xbc "[?]", // 0xbd "[?]", // 0xbe "[?]", // 0xbf "[?]", // 0xc0 "[?]", // 0xc1 "[?]", // 0xc2 "[?]", // 0xc3 "[?]", // 0xc4 "[?]", // 0xc5 "[?]", // 0xc6 "[?]", // 0xc7 "[?]", // 0xc8 "[?]", // 0xc9 "[?]", // 0xca "[?]", // 0xcb "[?]", // 0xcc "[?]", // 0xcd "[?]", // 0xce "[?]", // 0xcf "[?]", // 0xd0 "[?]", // 0xd1 "[?]", // 0xd2 "[?]", // 0xd3 "[?]", // 0xd4 "[?]", // 0xd5 "[?]", // 0xd6 "[?]", // 0xd7 "[?]", // 0xd8 "[?]", // 0xd9 "[?]", // 0xda "[?]", // 0xdb "[?]", // 0xdc "[?]", // 0xdd "[?]", // 0xde "[?]", // 0xdf "[?]", // 0xe0 "[?]", // 0xe1 "[?]", // 0xe2 "[?]", // 0xe3 "[?]", // 0xe4 "[?]", // 0xe5 "[?]", // 0xe6 "[?]", // 0xe7 "[?]", // 0xe8 "[?]", // 0xe9 "[?]", // 0xea "[?]", // 0xeb "[?]", // 0xec "[?]", // 0xed "[?]", // 0xee "[?]", // 0xef "[?]", // 0xf0 "[?]", // 0xf1 "[?]", // 0xf2 "[?]", // 0xf3 "[?]", // 0xf4 "[?]", // 0xf5 "[?]", // 0xf6 "[?]", // 0xf7 "[?]", // 0xf8 "[?]", // 0xf9 "[?]", // 0xfa "[?]", // 0xfb "[?]", // 0xfc "[?]", // 0xfd "[?]" // 0xfe }; }
[ "ippatsuman@gmail.com" ]
ippatsuman@gmail.com
03a299c08da914b2cfc3cbd0be814910ae0fa86f
f87808b0bd87eacd7ef0c550bfe3a47c7a1fa223
/src/main/java/lesson4/Task4.java
1c6fe035dad60756554577c4b2f25aed79c5bb7f
[]
no_license
psey/homework
34fc0fb97e24b1808096afed552a072aee2d538b
40d539ec99a928ba1479e536af1e1e91e1f7d4c4
refs/heads/master
2022-09-28T16:53:51.853088
2019-06-03T14:03:43
2019-06-03T14:03:43
189,420,929
0
0
null
2022-09-01T23:07:46
2019-05-30T13:41:59
Java
UTF-8
Java
false
false
526
java
package lesson4; /*** * 4. Даны имена 2х человек (тип String). * Если имена равны, то вывести сообщение о том, что люди являются тезками. */ public class Task4 { public static void main(String[] args) { String name1 = "Serg"; String name2 = "Serg"; if (name1.equals(name2)){ System.out.println("Это тезки"); } else { System.out.println("Не тезки"); } } }
[ "ivanova.maryna@pdffiller.team" ]
ivanova.maryna@pdffiller.team
30323d1523d80b526fab6009254101ddf7723a51
6f51bf4701b4f06689e5e3a8d5f831ea4f421cc2
/a3/Sudoku.java
46102285ed139551d52e91a6c3051179c5c85820
[]
no_license
aro24/backtracking-sudoku
cae98ef008aa9cdc34ce7ef46e2ebafb27f2d68b
84151e522ee60aa08f66347b2ad793b3ccaec4a0
refs/heads/master
2020-05-26T09:02:10.696943
2019-05-23T06:44:18
2019-05-23T06:44:18
188,176,374
0
0
null
null
null
null
UTF-8
Java
false
false
8,392
java
package a3; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; public class Sudoku { static int[][] original=new int [9][9]; //need this for next static void saveOriginal(int[][] board){ for(int i=0;i<9;i++){ for(int j=0;j<9;j++){ original[i][j]=board[i][j]; } } } static boolean isFullSolution(int[][] board) { // TODO: Complete this method for(int i=0;i<9;i++){ for(int j=0;j<9;j++){ if(board[i][j]==0){ return false; } } } return true; } static boolean reject(int[][] board) { // TODOKETE: Complete this method List<Integer> remaining = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9)); for(int i=0;i<9;i++){ for(int j=0;j<9;j++){ if(board[i][j]!=0&&remaining.contains(new Integer(board[i][j]))){ remaining.remove(new Integer(board[i][j])); } else if(board[i][j]==0); else{ return true; } } remaining = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9)); } for(int k=0;k<9;k++){ for(int l=0;l<9;l++){ if(board[l][k]!=0&&remaining.contains(board[l][k])){ remaining.remove(new Integer(board[l][k])); } else if(board[l][k]==0); //Don't need to do anything with 0s else{ return true; } } remaining = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9)); } for(int m=0;m<9;m++){ remaining = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9)); int x=0, y=0, x2=0, y2=0; if(m==0){ x=0; y=0; } if(m==1){ x=3; y=0; } if(m==2){ x=6; y=0; } if(m==3){ x=0; y=3; } if(m==4){ x=3; y=3; } if(m==5){ x=6; y=3; } if(m==6){ x=0; y=6; } if(m==7){ x=3; y=6; } if(m==8){ x=6; y=6; } int xtemp=x; x2=x+3; y2=y+3; for(;y<y2;y++){ for(;x<x2;x++){ if(remaining.contains(board[y][x])&&board[y][x]!=0){ remaining.remove(new Integer(board[y][x])); } else if (board[y][x]==0); else{ return true; } } x=xtemp; } } return false; } static int[][] extend(int[][] board) { // TODO: Complete this method int [][] reBoard=new int [9][9]; for(int h=0;h<board.length;h++){ reBoard[h]=Arrays.copyOf(board[h], board[h].length); } boolean addition=false; int nX=0; int nY=0; List<Integer> remaining = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9)); for(int i=0;i<9;i++){ for(int j=0;j<9;j++){ if(remaining.contains(reBoard[i][j])){ remaining.remove(new Integer(reBoard[i][j])); } if(reBoard[i][j]==0 && !addition){ nX=j; nY=i; addition=true; //NO BREAKS BECAUSE WE GOTTA GET THOSE OTHER NUMBERS OUT OF THE WAY BRUH } } ///Then we add the number in slot 0 of remaining to a new board. Should skip unnecessary rejects for row checking. //Runtime for method might not be the best, but should definitely be better overall, since we won't be hitting as many dead-ends. if(addition && !remaining.isEmpty()){ reBoard[nY][nX]=remaining.get(0); return reBoard; } remaining = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9)); } return null; } static int[][] next(int[][] board) { // TODO: Complete this method int [][] reBoard=new int [9][9]; for(int h=0;h<board.length;h++){ reBoard[h]=Arrays.copyOf(board[h], board[h].length); } for(int i=8;i>=0;i--){ for(int j=8;j>=0;j--){ if(original[i][j]==0&&reBoard[i][j]!=0){ if(board[i][j]!=9){ int temp=reBoard[i][j]; temp++; reBoard[i][j]=temp; return reBoard; } else{ return null; //in case newest value=9, and thus can't be modified further } } } } return null; //in case no changes were found? } static void testIsFullSolution() { // TODO: Complete this method System.out.println("Full Solution test"); int[][]tester=readBoard("easy.su"); printBoard(tester); System.out.println(); System.out.println(isFullSolution(tester)); } static void testReject() { // TODO: Complete this method System.out.println("Reject test"); int[][]tester=readBoard("easy.su"); System.out.println("This board is valid"); printBoard(tester); System.out.println(); System.out.println(reject(tester)); tester=extend(tester); tester=next(tester); System.out.println("This board which was extended and went thru next is invalid"); printBoard(tester); System.out.println(reject(tester)); } static void testExtend() { // TODO: Complete this method System.out.println("Extend test"); int[][]tester=readBoard("easy.su"); System.out.println("This was the original board"); printBoard(tester); System.out.println(); tester=extend(tester); System.out.println("This board was extended once"); printBoard(tester); System.out.println(); } static void testNext() { // TODO: Complete this method System.out.println("Next test"); int[][]tester=readBoard("easy.su"); System.out.println("This board was extended once"); tester=extend(tester); printBoard(tester); System.out.println(); tester=extend(tester); printBoard(tester); System.out.println(); tester=next(tester); System.out.println("This board was extended twice, and also called next"); printBoard(tester); } static void printBoard(int[][] board) { if (board == null) { System.out.println("No assignment"); return; } for (int i = 0; i < 9; i++) { if (i == 3 || i == 6) { System.out.println("----+-----+----"); } for (int j = 0; j < 9; j++) { if (j == 2 || j == 5) { System.out.print(board[i][j] + " | "); } else { System.out.print(board[i][j]); } } System.out.print("\n"); } } static int[][] readBoard(String filename) { List<String> lines = null; try { lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset()); } catch (IOException e) { return null; } int[][] board = new int[9][9]; int val = 0; for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { try { val = Integer.parseInt(Character.toString(lines.get(i).charAt(j))); } catch (Exception e) { val = 0; } board[i][j] = val; } } saveOriginal(board); //new line added to readBoard in order for next to work return board; } static int[][] solve(int[][] board) { if (reject(board)) return null; if (isFullSolution(board)) return board; int[][] attempt = extend(board); while (attempt != null) { int[][] solution = solve(attempt); if (solution != null) return solution; attempt = next(attempt); } return null; } public static void main(String[] args) { if (args[0].equals("-t")) { testIsFullSolution(); testReject(); testExtend(); testNext(); } else { int[][] board = readBoard(args[0]); printBoard(solve(board)); } } }
[ "noreply@github.com" ]
noreply@github.com
d2f400d2e0d32ce64186fde2e19879cb18eed2a6
2f73ce3d9530d4f4ee5e364d627f8cecfd1a9092
/Algorithm/src/backjoon/q1546b.java
848d8bb468ab3b363a1ffd1d3fa749b75765bac6
[]
no_license
jm-shin/Algorithm
802416a3af58f0ac2f1f1a2903faf0df7645a95c
46a05a9efc092f077a7bd45f382e58e89f1d4026
refs/heads/master
2020-09-20T20:42:39.459886
2020-06-13T13:34:40
2020-06-13T13:34:40
224,586,253
0
0
null
null
null
null
UTF-8
Java
false
false
858
java
package backjoon; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class q1546b { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] preGradeArray = br.readLine().split(" "); int[] gradeArray = new int[n]; for(int i=0; i<preGradeArray.length; i++){ gradeArray[i] = Integer.parseInt(preGradeArray[i]); } Arrays.sort(gradeArray); float maxGrade = gradeArray[n-1]; float sumGrade = 0; for(int j=0; j<gradeArray.length; j++){ sumGrade += gradeArray[j]/maxGrade*100; } System.out.println(sumGrade/n); } }
[ "jongminshin@172.16.1.23" ]
jongminshin@172.16.1.23
bc74e46c4fb118c294fa50d2f77d5c906529f938
961a9e71ad7fb48eb9d073e791ea97118bf741e2
/src/Physio_Controllers/Schedule_reply_form.java
281bfb0b4b1fa631adb739fb90dec9de1e8fad21
[]
no_license
akilasithara69/giantro
9044de3b0ab62545dc2d788c9a72f61233e4e6a9
7b63d4fc9632ae7f386cce3745e702706fc7ad8c
refs/heads/master
2022-11-27T13:03:31.763022
2020-08-04T06:07:43
2020-08-04T06:07:43
279,773,942
0
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
package Physio_Controllers; import java.io.IOException; import java.sql.SQLException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import Physio_Beans.Schedule; import Physio_Models.ScheduleDAO; @WebServlet("/Schedule_reply_form") public class Schedule_reply_form extends HttpServlet { private static final long serialVersionUID = 1L; private ScheduleDAO scheduleDAO; public Schedule_reply_form() { super(); scheduleDAO = new ScheduleDAO(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { showEditFormSchedule(request, response); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } private void showEditFormSchedule(HttpServletRequest request, HttpServletResponse response) throws SQLException, ServletException, IOException { int schedule_no = Integer.parseInt(request.getParameter("schedule_no")); int scount = Integer.parseInt(request.getParameter("noofstep")); Schedule existingSchedule = scheduleDAO.getSchedule(schedule_no); RequestDispatcher dispatcher = request.getRequestDispatcher("physio/Schedule_reply_form.jsp"); request.setAttribute("schedule", existingSchedule); request.setAttribute("scount", scount); dispatcher.forward(request, response); } }
[ "akilasithara3@gmail.com" ]
akilasithara3@gmail.com
c44b6ca24b5ef369470d054e396176df125505dc
ba966307d1e4e6f3c2e99d1f2a24fc04f47ca3b8
/workspace/BOB/src/edu/uniasselvi/ads24/bob/enumeradores/ETipoCampo.java
1c4920f524a4d185367d23e1218b8f675eb521f5
[]
no_license
herberttn/bob-the-builder
e1ac5c257f9fe398eb3cafd1aecaed109174ecd6
cf77e876083d0976d799417e2619eace2fa2a522
refs/heads/master
2021-05-26T14:22:39.561768
2013-12-04T23:54:00
2013-12-04T23:54:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
121
java
package edu.uniasselvi.ads24.bob.enumeradores; public enum ETipoCampo { STRING, INTEGER, DECIMAL, LISTA, PK, TABELA; }
[ "macaneirojr@gmail.com" ]
macaneirojr@gmail.com
a60526de714cad293c2f1daed2d2611da3860b56
68e232d1792440df7a78d45e2bcd1c4eaf7cd37b
/REST API/src/main/java/io/egen/entity/Alert.java
b75162138974942e61f0b34451b3985e7cea678f
[]
no_license
krishna1madhur/Car-Tracker
1cb063e7a3ca8885146876a585fd334b99cf6490
a8b031023ec5f5c2b33dc872d84464cdd183f0ae
refs/heads/master
2021-01-16T20:20:39.434463
2017-10-08T21:40:41
2017-10-08T21:40:41
100,200,141
2
0
null
2017-09-03T00:47:09
2017-08-13T19:36:38
null
UTF-8
Java
false
false
1,657
java
package io.egen.entity; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToOne; @Entity public class Alert { public enum Priority { HIGH, MEDIUM, LOW; } public enum AlertType { FUELVOLUME, SPEED, ENGINEHP, ENGINELIGHTSON, ENGINECOOLANTLOW, CRUISECONTROLON, ENGINERPM, TIREPRESSURE; } @Id @GeneratedValue(strategy = GenerationType.AUTO) private long alertId; @OneToOne private Reading reading; @OneToOne private Vehicle vehicle; @Enumerated(EnumType.STRING) private Priority priorityValue; @Enumerated(EnumType.STRING) private AlertType alertType; public Priority getPriorityValue() { return priorityValue; } public AlertType getAlertType() { return alertType; } public void setAlertType(AlertType alertType) { this.alertType = alertType; } public void setPriorityValue(Priority priorityValue) { this.priorityValue = priorityValue; } public long getAlertId() { return alertId; } public void setAlertId(long alertId) { this.alertId = alertId; } public Reading getReading() { return reading; } public void setReading(Reading reading) { this.reading = reading; } public Vehicle getVehicle() { return vehicle; } public void setVehicle(Vehicle vehicle) { this.vehicle = vehicle; } @Override public String toString() { return "Alert [alertId=" + alertId + ", reading=" + reading + ", vehicle=" + vehicle + ", priorityValue=" + priorityValue + ", alertType=" + alertType + "]"; } }
[ "krishna1madhur@gmail.com" ]
krishna1madhur@gmail.com
c5e3629f5cab89d303b794a4ccff0c01f1e915c2
758018a1c6be534f48c77c20c94787a9267fa4dd
/src/main/java/com/ttm/pet/model/vo/app/WorksOuterVo.java
c051a85fe26158afc5a4d14999f08296859a18ba
[]
no_license
Gitjiangwei/pet
124514502512d8cf5c616e829e6dd1c57d0f6699
ff7aff889355bdbe69bc368256e54b73a0172320
refs/heads/main
2023-03-27T03:21:05.295641
2021-03-29T12:46:23
2021-03-29T12:46:23
347,010,984
0
0
null
null
null
null
UTF-8
Java
false
false
2,053
java
package com.ttm.pet.model.vo.app; //小程序关注推荐 /app 模块列表 public class WorksOuterVo { private String customerId; private String title; private String customerName; private String portrait; private Long id; private String firstImg; private String content; private String describe; private Long createTime; private Integer type; private Integer isTop; public String getCustomerId() { return customerId; } public void setCustomerId(String customerId) { this.customerId = customerId; } public String getCustomerName() { return customerName; } public void setCustomerName(String customerName) { this.customerName = customerName; } public String getPortrait() { return portrait; } public void setPortrait(String portrait) { this.portrait = portrait; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstImg() { return firstImg; } public void setFirstImg(String firstImg) { this.firstImg = firstImg; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getDescribe() { return describe; } public void setDescribe(String describe) { this.describe = describe; } public Long getCreateTime() { return createTime; } public void setCreateTime(Long createTime) { this.createTime = createTime; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Integer getIsTop() { return isTop; } public void setIsTop(Integer isTop) { this.isTop = isTop; } }
[ "15035571514@163.com" ]
15035571514@163.com
2f8f2d582e6096a5db493a4e7ddd49e1107e5142
376628afed79f963ba17bffa9ce245762696d894
/src/com/lijwen/service/SeckillService.java
931d8c73f3f56175a69a7070dac266959513acd3
[]
no_license
564025324/mySeckill
fc8bd430060777e089d2dbb59f021bcc18943cba
ea0e6d2796c7bb4c53a48d90cf59285c212763bb
refs/heads/master
2022-05-01T19:38:10.505495
2018-10-28T04:17:09
2018-10-28T04:17:09
134,743,059
0
0
null
null
null
null
UTF-8
Java
false
false
437
java
/** * @author Lijingwen * */ package com.lijwen.service; import java.util.List; import com.lijwen.entity.Seckill; public interface SeckillService { /** * 查询所有秒杀 */ List<Seckill> getSeckillList(); /** * 查询单个秒杀商品信息 */ Seckill getById(long seckillId); /** * 开启秒杀时输出秒杀接口的地址,否则输出秒杀时间和系统时间 */ /** * 执行秒杀操作 */ }
[ "564025324@qq.com" ]
564025324@qq.com
40dec1202de841744228a059f80f3236f88c2240
5076d14c853effaa65be6103fa4d47e246b3ca27
/src/main/java/com/tyc/service/FyMoneyTemporary01Service.java
017aed90f22b96b3b2933ddc50318cc1dbeb2c2c
[]
no_license
Tang5566/family_service_platform
cea82017c5517518e0f501f19491da0591a5ab25
2b02d39198ae0ef8baa33456a81ab79a28370aba
refs/heads/master
2023-03-06T14:20:38.861485
2021-02-23T13:56:37
2021-02-23T13:56:37
341,571,675
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package com.tyc.service; import com.tyc.bean.FyMoneyTemporary01; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * 费用临时表1 服务类 * </p> * * @author tyc * @since 2021-02-20 */ public interface FyMoneyTemporary01Service extends IService<FyMoneyTemporary01> { }
[ "1213859735@qq.com" ]
1213859735@qq.com
7f7487d3e1db2faa8fc5f4d39d985f971efbd9b1
d9477e8e6e0d823cf2dec9823d7424732a7563c4
/plugins/Templates/tags/Templates-4.1.2/velocity/directives/Prompt.java
e31cdd248a851c85b87c2e816faefba8db2ac51f
[]
no_license
RobertHSchmidt/jedit
48fd8e1e9527e6f680de334d1903a0113f9e8380
2fbb392d6b569aefead29975b9be12e257fbe4eb
refs/heads/master
2023-08-30T02:52:55.676638
2018-07-11T13:28:01
2018-07-11T13:28:01
140,587,948
1
0
null
null
null
null
UTF-8
Java
false
false
2,566
java
/* * Prompt.java * Copyright (c) 2002 Calvin Yu * * 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 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 velocity.directives; import java.io.Writer; import javax.swing.JOptionPane; import org.apache.velocity.context.InternalContextAdapter; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.runtime.parser.node.Node; import org.gjt.sp.jedit.textarea.JEditTextArea; import velocity.VelocityConstants; /** * A directive to prompt the user for a value. */ public class Prompt extends SimpleDirective implements VelocityConstants { /** * Return name of this directive. */ public String getName() { return "prompt"; } /** * Return type of this directive. */ public int getType() { return LINE; } /** * Prompt the user for a value. */ public boolean render(InternalContextAdapter context, Writer writer, Node node) throws MethodInvocationException { Object prompt = getRequiredValue(node, 0, "label", context); if (prompt == null) { return false; } String key = getRequiredVariable(node, 1, "key"); Object defaultValue = getOptionalValue(node, 2, context); boolean overrideContext = getOptionalBoolean(node, 3, context); if (!overrideContext && context.getInternalUserContext().get(key) != null) { return true; } JEditTextArea textArea = (JEditTextArea) context.get(TEXT_AREA); Object value = JOptionPane.showInputDialog(textArea, prompt, "Velocity Prompt", JOptionPane.QUESTION_MESSAGE, null, null, defaultValue); if (value != null) { context.getInternalUserContext().put(key, value); } return true; } }
[ "kpouer@6b1eeb88-9816-0410-afa2-b43733a0f04e" ]
kpouer@6b1eeb88-9816-0410-afa2-b43733a0f04e
6377f7fb4eb2e1b40faf151f3d26fd7369135709
16c378359041a053502ca7a2dcbbd5bf721f3515
/app/src/main/java/com/app/pixstory/base/BaseAdapter.java
690dad43ac6f3e57cb2f27dd331b35f5b4c95d59
[ "Apache-2.0" ]
permissive
Arvindo9/Pixstory
8fc982e05a43b16598a1f8c7d4da4a936828060d
9d90dee647b434f00e1ea913a0a326dc073ea717
refs/heads/master
2023-01-22T05:01:27.226201
2020-11-21T20:13:47
2020-11-21T20:13:47
314,895,519
0
0
null
null
null
null
UTF-8
Java
false
false
11,252
java
package com.app.pixstory.base; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Adapter; import android.widget.Filter; import android.widget.Filterable; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.databinding.DataBindingUtil; import androidx.databinding.ViewDataBinding; import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; /** * Author : Arvindo Mondal * Created on : 09-05-2019 * Email : arvindomondal@gmail.com * Designation : Programmer * About : I am a human can only think, I can't be a person like machine which have lots of memory and knowledge. * Quote : No one can measure limit of stupidity but stupid things bring revolutions * Strength : Never give up * Motto : To be known as great Mathematician * Skills : Algorithms and logic */ public abstract class BaseAdapter<B extends ViewDataBinding, D> extends RecyclerView.Adapter<BaseAdapter.ViewHolder> implements Filterable { protected String filterText = ""; protected ArrayList<D> list; protected ArrayList<D> mainList; private FilterClass filter = null; private Listener listener; public interface Listener { /** * * @param data original data item of list */ void onAdapterItem(Object data, String tag, int position); } public void addItems(List<D> model) { list.addAll(model); notifyDataSetChanged(); } public void clearItems() { list.clear(); mainList.clear(); notifyDataSetChanged(); } public void setListener(Listener listener) { this.listener = listener; } public Listener getListener() { return listener; } /** * * @param adapterList list args require to bind adapter up to the size of array */ public BaseAdapter(ArrayList<D> adapterList) { this.list = adapterList; this.mainList = adapterList; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { // create a new view LayoutInflater inflater = LayoutInflater.from(parent.getContext()); B binding = DataBindingUtil.inflate(inflater, getLayout(), parent, false); showHideView(); doJobInOnCreate(parent, viewType, binding); // set the view's size, margins, paddings and layout parameters return getViewHolder(binding); } protected <VB extends ViewDataBinding> ViewDataBinding createBinding(ViewGroup parent, int viewType, @LayoutRes int layoutId){ LayoutInflater inflater = LayoutInflater.from(parent.getContext()); VB binding = DataBindingUtil.inflate(inflater, layoutId, parent, false); // return DataBindingUtil.<VB>inflate(inflater, // layoutId, parent, false); return binding; } /** * * @param viewGroup view group * @param viewType view type * @param binding adapter binding */ protected void doJobInOnCreate(ViewGroup viewGroup, int viewType, B binding) { // return binding; } @Override // public void onBindViewHolder(@NonNull ViewHolder holder, int position) { public void onBindViewHolder(@NonNull BaseAdapter.ViewHolder holder, int position) { holder.bind(list.get(position), position); } @Override public int getItemCount() { if (list != null) return list.size(); else return 0; } @Override public long getItemId(int position) { return position; } @Override public int getItemViewType(int position) { int itemType = getItemViewTypeAdapter(position); if(itemType != 0){ return itemType; } return position; } /** * * @param position current index of ArrayList * @return return 0 if single layout xml else override this method for multiple xml or elements */ protected abstract int getItemViewTypeAdapter(int position); /** * This will hide the view on first load * This is use to make the hidden view on first load * left blank if noting is hidden */ protected void showHideView(){} /** * * @return R.layout.layout_file */ @LayoutRes protected abstract int getLayout(); /** * Initialised View Holder * @param binding DataBinding * @return new ViewHolder<B, D>(binding); */ public abstract ViewHolder getViewHolder(B binding); //-----------------filter/search in adapter--------------------- /** * * @return new FilterClass(); */ protected abstract FilterClass initialisedFilterClass(); /** * <p>Returns a filter that can be used to constrain CalendarData with a filtering * pattern.</p> * <p> * <p>This method is usually implemented by {@link Adapter} * classes.</p> * * @return a filter used to constrain CalendarData */ @Override public Filter getFilter() { if (filter == null) filter = initialisedFilterClass(); return filter; } /** * class use for the filter of adapter view */ public abstract class FilterClass extends Filter { // private AdapterFilterCalls adapterFilterCalls; private ArrayList<D> filteredArrayList; /** * * @return Context, to initialise and use filter class pass activity or application context */ public abstract Context getContext(); protected FilterClass(){ // this.adapterFilterCalls = (AdapterFilterCalls) getContext(); } @Override protected FilterResults performFiltering(CharSequence constraint) { FilterResults filterResults = new FilterResults(); constraint = constraint.toString().toLowerCase(); if (constraint.length() <= 0) { filteredArrayList = mainList; } else { filteredArrayList = new ArrayList<>(); filteredArrayList = filterData(constraint, mainList, filteredArrayList); filterResults.count = filteredArrayList.size(); filterResults.values = filteredArrayList; } return filterResults; } @Override protected void publishResults(CharSequence constraint, FilterResults results) { //noinspection unchecked list = (ArrayList<D>) results.values; filterText = constraint + ""; if (constraint == null || constraint.length() <= 0) { list = mainList; filterText = ""; } // adapterFilterCalls.callBackToActivity(String.valueOf(filteredArrayList.size())); notifyDataSetChanged(); } /** * * @param filteredArrayList JobsResponse for (L CalendarData : list) { if (CalendarData.getRefNo().toLowerCase().contains(constraint) || CalendarData.getZone().toLowerCase().contains(constraint)) filteredArrayList.add(CalendarData); } * @param list only one time, use in for loop * @param filteredArrayList This list will return with added CalendarData */ public abstract ArrayList<D> filterData(CharSequence constraint, ArrayList<D> list, ArrayList<D> filteredArrayList); } //------------------view Holder--------------------------------- public abstract class ViewHolder<B extends ViewDataBinding, D> extends RecyclerView.ViewHolder{ protected int position; protected B binding; public B getBinding(){ return binding; } /** * * @param binding layout reference */ protected ViewHolder(B binding) { super(binding.getRoot()); this.binding = binding; } protected ViewHolder(View view) { super(view); } void bind(D data, int position){ this.position = position; bindData(data); setClickListeners(data, position); doSomeWorkHere(binding, data, position); } /** * If there is anything to do then do here otherwise leave it blank * @param binding layout reference for single view * @param data for single view * @param position position of ArrayList */ protected abstract void doSomeWorkHere(B binding, D data, int position); /** * * @param data binding.setCalendarData(new AdapterViewModel(CalendarData)); */ protected abstract void bindData(D data); protected void setClickListeners(D data, int position) { ViewHolderClickListener viewHolderClickListener = viewHolderReference(binding, data, position); setClickListeners(viewHolderClickListener, binding, data); } /** * Method to set click listeners on view holder or groups * * @param thisContext set it on method : binding.layout.setOnClickListener(thisContext); * @param binding DataBinding * @param data CalendarData */ public abstract void setClickListeners(ViewHolderClickListener thisContext, B binding, D data); /** * Initialised holder by new operator * * @param binding DataBinding * @param data dataList * @return new ViewHolderClickListener<B, D>(binding, CalendarData, position) * @param position of adapter */ protected abstract ViewHolderClickListener viewHolderReference( B binding, D data, int position); } //----------------------------ViewHolder Click Listener--------- public abstract class ViewHolderClickListener<B extends ViewDataBinding, D> implements View.OnClickListener{ protected final int position; protected B binding; private final D data; /** * * @param position of a adapter in current view */ public ViewHolderClickListener(B binding, D data, int position) { this.position = position; this.binding = binding; this.data = data; } /** * Called when a view has been clicked. * * @param view The view that was clicked. * switch (view.getId()){ * case R.id.id: * // itemView.getContext().startActivity(); * break; * } */ @Override public abstract void onClick(View view); } //-------------------------------------------------------------- }
[ "arvindomondal@gmail.com" ]
arvindomondal@gmail.com
86bf8a217ac08529ec0b497a413d0c5ab0c7cab9
390b489033b7bde9f7138dc888f68e072650d3ab
/src/main/java/io/rbetik12/gui/TableWindow.java
78dab96255b93258c179c3f77ccde58cfa9dda51
[]
no_license
rbetik12/java-client
2c38adae061dcd9a86a3a15c31f1c2d1a8cc89ad
8b6d82de19a0f03447287e4d0332439c027b44f5
refs/heads/master
2023-01-03T12:00:06.945262
2020-11-02T19:25:09
2020-11-02T19:25:09
295,027,035
0
0
null
null
null
null
UTF-8
Java
false
false
7,026
java
package io.rbetik12.gui; import io.rbetik12.models.NetAction; import io.rbetik12.models.SortBy; import io.rbetik12.models.WindowType; import io.rbetik12.network.NetworkManager; import javax.swing.*; import javax.swing.table.DefaultTableModel; import java.awt.*; import java.awt.event.*; public class TableWindow extends JFrame { private final int windowWidth = 800; private final int windowHeight = 600; private final String[] columnNames = {"ID", "Name", "Creation date", "Number of participants", "Genre", "Label"}; private JTable table; public TableWindow() { super("Client"); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS)); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { setVisible(false); dispose(); } }); drawTable(); drawCommandsMenu(); createTableUpdaterThread(); pack(); setSize(windowWidth, windowHeight); setFocusable(true); requestFocus(); setVisible(true); } private void createTableUpdaterThread() { Thread updaterThread = new TableUpdaterThread(this); updaterThread.start(); } public void updateTableModel(MouseEvent e) { int col = table.columnAtPoint(e.getPoint()); String name = table.getColumnName(col); String[][] sortedData; switch (name) { case "ID": sortedData = BandsManager.getTable(SortBy.id); break; case "Name": sortedData = BandsManager.getTable(SortBy.name); break; case "Creation name": sortedData = BandsManager.getTable(SortBy.creationDate); break; case "Number of participants": sortedData = BandsManager.getTable(SortBy.numberOfParticipants); break; case "Genre": sortedData = BandsManager.getTable(SortBy.genre); break; case "Label": sortedData = BandsManager.getTable(SortBy.label); break; default: sortedData = BandsManager.getTable(SortBy.id); break; } table.setModel(new DefaultTableModel(sortedData, columnNames)); } public void updateTableModel() { String[][] sortedData; sortedData = BandsManager.getTable(SortBy.name); table.setModel(new DefaultTableModel(sortedData, columnNames)); } private void drawCommandsMenu() { JPanel commandsPanel = new JPanel(new FlowLayout()); commandsPanel.setBackground(Color.decode("#673AB7")); add(commandsPanel); JLabel id = new JLabel("ID"); id.setAlignmentX(CENTER_ALIGNMENT); commandsPanel.add(id); JFormattedTextField idField = new JFormattedTextField(); idField.setValue(0L); idField.setColumns(4); idField.setEditable(true); idField.setMaximumSize(new Dimension(Integer.MAX_VALUE, idField.getPreferredSize().height)); commandsPanel.add(idField); JButton showElementsButton = new JButton("Show objects"); showElementsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { WindowManager.loadWindow(WindowType.Objects); } }); commandsPanel.add(showElementsButton); JButton addElementButton = new JButton("Add"); addElementButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { WindowManager.loadModalWindow(WindowType.MusicBand, NetAction.Add); } }); commandsPanel.add(addElementButton); JButton updateElementButton = new JButton("Update"); updateElementButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { WindowManager.loadModalWindow(WindowType.MusicBand, NetAction.Update, idField.getValue()); } }); commandsPanel.add(updateElementButton); JButton removeElementButton = new JButton("Remove by ID"); removeElementButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { NetworkManager.remove((long) idField.getValue()); } }); commandsPanel.add(removeElementButton); commandsPanel.add(Box.createVerticalStrut(100)); JButton executeScriptButton = new JButton("Execute script"); executeScriptButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { } }); commandsPanel.add(executeScriptButton); commandsPanel.add(Box.createVerticalStrut(100)); JButton addIfLower = new JButton("Add if lower"); addIfLower.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { WindowManager.loadModalWindow(WindowType.MusicBand, NetAction.AddIfMin); } }); commandsPanel.add(addIfLower); commandsPanel.add(Box.createVerticalStrut(100)); JButton removeGreaterButton = new JButton("Remove greater"); removeGreaterButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { WindowManager.loadModalWindow(WindowType.MusicBand, NetAction.RemoveGreater); } }); commandsPanel.add(removeGreaterButton); commandsPanel.add(Box.createVerticalStrut(100)); JButton removeLowerButton = new JButton("Remove lower"); removeLowerButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { WindowManager.loadModalWindow(WindowType.MusicBand, NetAction.RemoveLower); } }); commandsPanel.add(removeLowerButton); } private void drawTable() { JPanel tablePanel = new JPanel(); String[][] data = BandsManager.getTable(SortBy.id); DefaultTableModel tableModel = new DefaultTableModel(data, columnNames); table = new JTable(tableModel); JScrollPane scrollPane = new JScrollPane(table); add(scrollPane); JLabel label = new JLabel("Music bands"); tablePanel.add(label); table.getTableHeader().addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { updateTableModel(e); } }); } }
[ "mr.prikota@gmail.com" ]
mr.prikota@gmail.com
2e09f7a6c4f7fa56a6f02616c4656c0665f8c3fe
e37d1afd322f0c7b51bda04368a2037bc4d7900d
/src/java/org/archive/jbs/filter/RobotsFilter.java
3729cdb7b2e315b8e54dea56bdf60c5c96ffd765
[ "Apache-2.0" ]
permissive
amohoste/jbs
17276c4210a65c46afa429d50dc3d2aa15ef5986
87de5d3fc2f6084c9f9d19e7b7feb7e140bb8080
refs/heads/master
2020-07-04T05:04:56.928560
2019-08-13T14:53:31
2019-08-13T14:53:31
202,165,811
0
0
Apache-2.0
2019-08-13T14:48:49
2019-08-13T14:48:48
null
UTF-8
Java
false
false
1,376
java
/* * Copyright 2010 Internet Archive * * 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.archive.jbs.filter; import java.io.*; import java.net.*; import org.archive.jbs.Document; /** * Simple DocumentFilter that filters out robots and favicon URLs. */ public class RobotsFilter implements DocumentFilter { public boolean isAllowed( Document document ) { String url = document.get( "url" ); try { URI uri = new URI( url ); String path = uri.getPath(); // If no path, then trivially *not* robots nor favicon. if ( path == null ) return true; path = path.trim(); if ( "/favicon.ico".equals( path ) || "/robots.txt" .equals( path ) ) { return false; } } catch ( URISyntaxException e ) { } return true; } }
[ "aaron@archive.org" ]
aaron@archive.org