blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
9bd4dea6b7624ade50c6f9dcdf98e883e7e50b9d
9448a8401164405d73d7f34e08d2045fa5939886
/Projekat_prosoft/Prosoft_klijent/src/forme/modeltabele/TableModelDnevnaBerba.java
d66988df706cbce6f88021352dcec06a53ded33d
[]
no_license
Marko92x/ProjekatPSMarkoBarackov
31a74d3988f7b4049204ac8d0440948f14463c7c
06e7ecc0dc20e17ca11fdb7c578126e79c476d2c
refs/heads/master
2021-01-20T20:52:40.004423
2018-01-07T13:12:19
2018-01-07T13:12:19
60,715,283
0
0
null
null
null
null
UTF-8
Java
false
false
1,732
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package forme.modeltabele; import domen.DnevnaBerba; import domen.StavkaDnevneBerbe; import java.io.File; import java.util.ArrayList; import java.util.List; import javax.swing.table.AbstractTableModel; /** * * @author Marko */ public class TableModelDnevnaBerba extends AbstractTableModel{ private List<DnevnaBerba> dnevneBerbe = new ArrayList<>(); String[] nazivKolona = new String[]{"JMBG", "Ime i prezime", "ID dnevne berbe", "Datum"}; public TableModelDnevnaBerba(List<DnevnaBerba> dnevneBerbe) { this.dnevneBerbe = dnevneBerbe; } @Override public int getRowCount() { return dnevneBerbe.size(); } @Override public int getColumnCount() { return 4; } @Override public Object getValueAt(int rowIndex, int columnIndex) { switch (columnIndex){ case 0: return dnevneBerbe.get(rowIndex).getDobavljac().getJmbg(); case 1: return dnevneBerbe.get(rowIndex).getDobavljac().getIme() + " " + dnevneBerbe.get(rowIndex).getDobavljac().getPrezime(); case 2: return dnevneBerbe.get(rowIndex).getDnevnaBerbaID(); case 3: return dnevneBerbe.get(rowIndex).getDatum(); default: return null; } } @Override public String getColumnName(int column) { return nazivKolona[column]; } public List<DnevnaBerba> getDnevneBerbe() { return dnevneBerbe; } }
[ "Marko Barackov" ]
Marko Barackov
69e67de536cfff72781eadce6a11733a4886ed21
1ebdbfcc6c4f906bb202e4cb97c38d9719a49f1d
/SyncAppServer/webagent/src/main/java/com/borqs/sync/server/webagent/account/ConfigfileServlet.java
68d2ab5e215ba4b2f749a55a5d24125ab0e712ed
[]
no_license
FreeDao/syncserver
8ebc6d7ad6da1e1eddcc692f6d0e88ca0e160030
8967e73106b8a248ff5c346883323be5d53ca16a
refs/heads/master
2020-12-25T06:13:05.053916
2013-09-24T07:54:36
2013-09-24T07:54:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,377
java
package com.borqs.sync.server.webagent.account; import java.util.logging.Logger; import com.borqs.sync.server.common.exception.AccountException; import com.borqs.sync.server.common.httpservlet.HttpServletDelegate; import com.borqs.sync.server.common.httpservlet.QueryParams; import com.borqs.sync.server.common.httpservlet.ResponseWriter; import com.borqs.sync.server.common.httpservlet.WebMethod; import com.borqs.sync.server.common.runtime.Context; import com.borqs.sync.server.webagent.ServletImp; import com.borqs.sync.server.webagent.util.WebLog; @Deprecated //temp,should remove the class after the client upgrade and do use configfile rest interface public class ConfigfileServlet extends HttpServletDelegate { public Logger mLogger; //for configuration file query private static final String REQUEST_PARMETER_FILENAME = "filename"; public ConfigfileServlet(Context context) { super(context); mLogger = WebLog.getLogger(context); } /** * http://..../configfile/query?filename=borqs_plus.xml * @throws AccountException */ @Deprecated @WebMethod("query") public void queryConfigurationFile(QueryParams qp,ResponseWriter writer) throws AccountException { String fileName = qp.checkGetString(REQUEST_PARMETER_FILENAME); ServletImp.queryConfigurationFile(mContext,fileName,writer); } }
[ "liuhuadong78@gmail.com" ]
liuhuadong78@gmail.com
d46f2ed6ee91840c5bf845c1ad55920d05ce1ade
8042759d3c4abf0cb1e61e0cb89cf54202c91a6a
/src/main/java/com/shamballa/myrecipeapp/commands/NoteCommand.java
f71787314e7d7c7bb3500c16955057dfbc4aa812
[]
no_license
aminta5/my-recipe-app
4b70a8f4864b50a15878c8525addb5e24df3fa40
49e23ebc23f5d12f00b3e4a9832f98244b0aa1b1
refs/heads/master
2020-04-17T21:41:30.074090
2019-02-27T12:54:19
2019-02-27T12:54:19
166,961,648
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package com.shamballa.myrecipeapp.commands; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor public class NoteCommand { private Long id; private String notes; }
[ "fizi2u@yahoo.com" ]
fizi2u@yahoo.com
c88e108ffcad4f306ab522512025acd214d2d8a3
3804df9354bf5b0182dc152284d336250961a3cc
/datascience/src/datascience/OpenNLP.java
9a3e8163671e80e3ffd25fa7732aee3b851dddc1
[]
no_license
nazarmubeen/AIStuffs
3c9a583a71384c8db79dce4d9280b7e5df33bbb9
7e820a660f53633e2acbc559a79e564c5ead09a0
refs/heads/master
2020-04-05T13:40:38.436767
2017-07-12T06:55:14
2017-07-12T06:55:14
94,967,935
0
0
null
null
null
null
UTF-8
Java
false
false
2,240
java
package datascience; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import opennlp.tools.sentdetect.SentenceDetectorME; import opennlp.tools.sentdetect.SentenceModel; import opennlp.tools.tokenize.Tokenizer; import opennlp.tools.tokenize.TokenizerME; import opennlp.tools.tokenize.TokenizerModel; public class OpenNLP { public static void main(String[] args) { try { useOpenNlp("My name is Rushdi Shams. " + "You can use Dr. before my name as I have a Ph.D. " + "but I am a bit shy to use it.", "C:/en-sent.bin", "sentence"); useOpenNlp("\"Let's get this vis-a-vis\", \"he said,\" " +"these boys marks are really that well?\"", "D:\\Softwares\\Jars\\NLP\\en-token.bin", "word"); } catch (IOException e) { } } static void useOpenNlp(String sourceText, String modelPath, String choice) throws IOException{ System.out.println("entry"); InputStream modelIn = null; modelIn = new FileInputStream(modelPath); if(choice.equalsIgnoreCase("sentence")){ SentenceModel model = new SentenceModel(modelIn); modelIn.close(); SentenceDetectorME sentenceDetector = new SentenceDetectorME(model); String sentences[] = sentenceDetector.sentDetect(sourceText); System.out.println("Sentences: "); for(String sentence:sentences){ System.out.println(sentence); } } else if(choice.equalsIgnoreCase("word")){ TokenizerModel model = new TokenizerModel(modelIn); modelIn.close(); Tokenizer tokenizer = new TokenizerME(model); String tokens[] = tokenizer.tokenize(sourceText); System.out.println("Words: "); for(String token:tokens){ System.out.println(token); } } else{ System.out.println("Error in choice"); modelIn.close(); return; } } }
[ "fam.nazar@gmail.com" ]
fam.nazar@gmail.com
2672bbfff455f7aec01461a35a661c950eb2f908
9fde4dcbc50da3d8fe841777d05acebfb263b25e
/app/src/main/java/com/frame/model/utils/util/ConvertUtils.java
1970c2e869f05d7b1fa379909227b041c15b7afa
[]
no_license
umqmrz/FrameWorkModel
1741099ee1040c5a908ba82cf63c6e12e1371821
27e6e42f23bcb5152b56f576fc6233516373c775
refs/heads/master
2020-03-20T04:23:34.511824
2018-06-22T10:18:36
2018-06-22T10:18:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
19,473
java
package com.frame.model.utils.util; import android.annotation.SuppressLint; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.PixelFormat; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.view.View; import com.frame.model.utils.constant.MemoryConstants; import com.frame.model.utils.constant.TimeConstants; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UnsupportedEncodingException; /** * <pre> * author: Blankj * blog : http://blankj.com * time : 2016/08/13 * desc : 转换相关工具类 * </pre> */ public final class ConvertUtils { private ConvertUtils() { throw new UnsupportedOperationException("u can't instantiate me..."); } private static final char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; /** * byteArr 转 hexString * <p>例如:</p> * bytes2HexString(new byte[] { 0, (byte) 0xa8 }) returns 00A8 * * @param bytes 字节数组 * @return 16 进制大写字符串 */ public static String bytes2HexString(final byte[] bytes) { if (bytes == null) return null; int len = bytes.length; if (len <= 0) return null; char[] ret = new char[len << 1]; for (int i = 0, j = 0; i < len; i++) { ret[j++] = hexDigits[bytes[i] >>> 4 & 0x0f]; ret[j++] = hexDigits[bytes[i] & 0x0f]; } return new String(ret); } /** * hexString 转 byteArr * <p>例如:</p> * hexString2Bytes("00A8") returns { 0, (byte) 0xA8 } * * @param hexString 十六进制字符串 * @return 字节数组 */ public static byte[] hexString2Bytes(String hexString) { if (isSpace(hexString)) return null; int len = hexString.length(); if (len % 2 != 0) { hexString = "0" + hexString; len = len + 1; } char[] hexBytes = hexString.toUpperCase().toCharArray(); byte[] ret = new byte[len >> 1]; for (int i = 0; i < len; i += 2) { ret[i >> 1] = (byte) (hex2Dec(hexBytes[i]) << 4 | hex2Dec(hexBytes[i + 1])); } return ret; } /** * hexChar 转 int * * @param hexChar hex 单个字节 * @return 0..15 */ private static int hex2Dec(final char hexChar) { if (hexChar >= '0' && hexChar <= '9') { return hexChar - '0'; } else if (hexChar >= 'A' && hexChar <= 'F') { return hexChar - 'A' + 10; } else { throw new IllegalArgumentException(); } } /** * charArr 转 byteArr * * @param chars 字符数组 * @return 字节数组 */ public static byte[] chars2Bytes(final char[] chars) { if (chars == null || chars.length <= 0) return null; int len = chars.length; byte[] bytes = new byte[len]; for (int i = 0; i < len; i++) { bytes[i] = (byte) (chars[i]); } return bytes; } /** * byteArr 转 charArr * * @param bytes 字节数组 * @return 字符数组 */ public static char[] bytes2Chars(final byte[] bytes) { if (bytes == null) return null; int len = bytes.length; if (len <= 0) return null; char[] chars = new char[len]; for (int i = 0; i < len; i++) { chars[i] = (char) (bytes[i] & 0xff); } return chars; } /** * 以 unit 为单位的内存大小转字节数 * * @param memorySize 大小 * @param unit 单位类型 * <ul> * <li>{@link MemoryConstants#BYTE}: 字节</li> * <li>{@link MemoryConstants#KB} : 千字节</li> * <li>{@link MemoryConstants#MB} : 兆</li> * <li>{@link MemoryConstants#GB} : GB</li> * </ul> * @return 字节数 */ public static long memorySize2Byte(final long memorySize, @MemoryConstants.Unit final int unit) { if (memorySize < 0) return -1; return memorySize * unit; } /** * 字节数转以 unit 为单位的内存大小 * * @param byteNum 字节数 * @param unit 单位类型 * <ul> * <li>{@link MemoryConstants#BYTE}: 字节</li> * <li>{@link MemoryConstants#KB} : 千字节</li> * <li>{@link MemoryConstants#MB} : 兆</li> * <li>{@link MemoryConstants#GB} : GB</li> * </ul> * @return 以 unit 为单位的 size */ public static double byte2MemorySize(final long byteNum, @MemoryConstants.Unit final int unit) { if (byteNum < 0) return -1; return (double) byteNum / unit; } /** * 字节数转合适内存大小 * <p>保留 3 位小数</p> * * @param byteNum 字节数 * @return 合适内存大小 */ @SuppressLint("DefaultLocale") public static String byte2FitMemorySize(final long byteNum) { if (byteNum < 0) { return "shouldn't be less than zero!"; } else if (byteNum < MemoryConstants.KB) { return String.format("%.3fB", (double) byteNum); } else if (byteNum < MemoryConstants.MB) { return String.format("%.3fKB", (double) byteNum / MemoryConstants.KB); } else if (byteNum < MemoryConstants.GB) { return String.format("%.3fMB", (double) byteNum / MemoryConstants.MB); } else { return String.format("%.3fGB", (double) byteNum / MemoryConstants.GB); } } /** * 以 unit 为单位的时间长度转毫秒时间戳 * * @param timeSpan 毫秒时间戳 * @param unit 单位类型 * <ul> * <li>{@link TimeConstants#MSEC}: 毫秒</li> * <li>{@link TimeConstants#SEC }: 秒</li> * <li>{@link TimeConstants#MIN }: 分</li> * <li>{@link TimeConstants#HOUR}: 小时</li> * <li>{@link TimeConstants#DAY }: 天</li> * </ul> * @return 毫秒时间戳 */ public static long timeSpan2Millis(final long timeSpan, @TimeConstants.Unit final int unit) { return timeSpan * unit; } /** * 毫秒时间戳转以 unit 为单位的时间长度 * * @param millis 毫秒时间戳 * @param unit 单位类型 * <ul> * <li>{@link TimeConstants#MSEC}: 毫秒</li> * <li>{@link TimeConstants#SEC }: 秒</li> * <li>{@link TimeConstants#MIN }: 分</li> * <li>{@link TimeConstants#HOUR}: 小时</li> * <li>{@link TimeConstants#DAY }: 天</li> * </ul> * @return 以 unit 为单位的时间长度 */ public static long millis2TimeSpan(final long millis, @TimeConstants.Unit final int unit) { return millis / unit; } /** * 毫秒时间戳转合适时间长度 * * @param millis 毫秒时间戳 * <p>小于等于 0,返回 null</p> * @param precision 精度 * <ul> * <li>precision = 0,返回 null</li> * <li>precision = 1,返回天</li> * <li>precision = 2,返回天和小时</li> * <li>precision = 3,返回天、小时和分钟</li> * <li>precision = 4,返回天、小时、分钟和秒</li> * <li>precision &gt;= 5,返回天、小时、分钟、秒和毫秒</li> * </ul> * @return 合适时间长度 */ @SuppressLint("DefaultLocale") public static String millis2FitTimeSpan(long millis, int precision) { if (millis <= 0 || precision <= 0) return null; StringBuilder sb = new StringBuilder(); String[] units = {"天", "小时", "分钟", "秒", "毫秒"}; int[] unitLen = {86400000, 3600000, 60000, 1000, 1}; precision = Math.min(precision, 5); for (int i = 0; i < precision; i++) { if (millis >= unitLen[i]) { long mode = millis / unitLen[i]; millis -= mode * unitLen[i]; sb.append(mode).append(units[i]); } } return sb.toString(); } /** * bytes 转 bits * * @param bytes 字节数组 * @return bits */ public static String bytes2Bits(final byte[] bytes) { StringBuilder sb = new StringBuilder(); for (byte aByte : bytes) { for (int j = 7; j >= 0; --j) { sb.append(((aByte >> j) & 0x01) == 0 ? '0' : '1'); } } return sb.toString(); } /** * bits 转 bytes * * @param bits 二进制 * @return bytes */ public static byte[] bits2Bytes(String bits) { int lenMod = bits.length() % 8; int byteLen = bits.length() / 8; // 不是 8 的倍数前面补 0 if (lenMod != 0) { for (int i = lenMod; i < 8; i++) { bits = "0" + bits; } byteLen++; } byte[] bytes = new byte[byteLen]; for (int i = 0; i < byteLen; ++i) { for (int j = 0; j < 8; ++j) { bytes[i] <<= 1; bytes[i] |= bits.charAt(i * 8 + j) - '0'; } } return bytes; } /** * inputStream 转 outputStream * * @param is 输入流 * @return outputStream 子类 */ public static ByteArrayOutputStream input2OutputStream(final InputStream is) { if (is == null) return null; try { ByteArrayOutputStream os = new ByteArrayOutputStream(); byte[] b = new byte[MemoryConstants.KB]; int len; while ((len = is.read(b, 0, MemoryConstants.KB)) != -1) { os.write(b, 0, len); } return os; } catch (IOException e) { e.printStackTrace(); return null; } finally { CloseUtils.closeIO(is); } } /** * outputStream 转 inputStream * * @param out 输出流 * @return inputStream 子类 */ public ByteArrayInputStream output2InputStream(final OutputStream out) { if (out == null) return null; return new ByteArrayInputStream(((ByteArrayOutputStream) out).toByteArray()); } /** * inputStream 转 byteArr * * @param is 输入流 * @return 字节数组 */ public static byte[] inputStream2Bytes(final InputStream is) { if (is == null) return null; return input2OutputStream(is).toByteArray(); } /** * byteArr 转 inputStream * * @param bytes 字节数组 * @return 输入流 */ public static InputStream bytes2InputStream(final byte[] bytes) { if (bytes == null || bytes.length <= 0) return null; return new ByteArrayInputStream(bytes); } /** * outputStream 转 byteArr * * @param out 输出流 * @return 字节数组 */ public static byte[] outputStream2Bytes(final OutputStream out) { if (out == null) return null; return ((ByteArrayOutputStream) out).toByteArray(); } /** * outputStream 转 byteArr * * @param bytes 字节数组 * @return 字节数组 */ public static OutputStream bytes2OutputStream(final byte[] bytes) { if (bytes == null || bytes.length <= 0) return null; ByteArrayOutputStream os = null; try { os = new ByteArrayOutputStream(); os.write(bytes); return os; } catch (IOException e) { e.printStackTrace(); return null; } finally { CloseUtils.closeIO(os); } } /** * inputStream 转 string 按编码 * * @param is 输入流 * @param charsetName 编码格式 * @return 字符串 */ public static String inputStream2String(final InputStream is, final String charsetName) { if (is == null || isSpace(charsetName)) return null; try { return new String(inputStream2Bytes(is), charsetName); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return null; } } /** * string 转 inputStream 按编码 * * @param string 字符串 * @param charsetName 编码格式 * @return 输入流 */ public static InputStream string2InputStream(final String string, final String charsetName) { if (string == null || isSpace(charsetName)) return null; try { return new ByteArrayInputStream(string.getBytes(charsetName)); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return null; } } /** * outputStream 转 string 按编码 * * @param out 输出流 * @param charsetName 编码格式 * @return 字符串 */ public static String outputStream2String(final OutputStream out, final String charsetName) { if (out == null || isSpace(charsetName)) return null; try { return new String(outputStream2Bytes(out), charsetName); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return null; } } /** * string 转 outputStream 按编码 * * @param string 字符串 * @param charsetName 编码格式 * @return 输入流 */ public static OutputStream string2OutputStream(final String string, final String charsetName) { if (string == null || isSpace(charsetName)) return null; try { return bytes2OutputStream(string.getBytes(charsetName)); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return null; } } /** * bitmap 转 byteArr * * @param bitmap bitmap 对象 * @param format 格式 * @return 字节数组 */ public static byte[] bitmap2Bytes(final Bitmap bitmap, final Bitmap.CompressFormat format) { if (bitmap == null) return null; ByteArrayOutputStream baos = new ByteArrayOutputStream(); bitmap.compress(format, 100, baos); return baos.toByteArray(); } /** * byteArr 转 bitmap * * @param bytes 字节数组 * @return bitmap */ public static Bitmap bytes2Bitmap(final byte[] bytes) { return (bytes == null || bytes.length == 0) ? null : BitmapFactory.decodeByteArray(bytes, 0, bytes.length); } /** * drawable 转 bitmap * * @param drawable drawable 对象 * @return bitmap */ public static Bitmap drawable2Bitmap(final Drawable drawable) { if (drawable instanceof BitmapDrawable) { BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable; if (bitmapDrawable.getBitmap() != null) { return bitmapDrawable.getBitmap(); } } Bitmap bitmap; if (drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 0) { bitmap = Bitmap.createBitmap(1, 1, drawable.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565); } else { bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), drawable.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565); } Canvas canvas = new Canvas(bitmap); drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); drawable.draw(canvas); return bitmap; } /** * bitmap 转 drawable * * @param bitmap bitmap 对象 * @return drawable */ public static Drawable bitmap2Drawable(final Bitmap bitmap) { return bitmap == null ? null : new BitmapDrawable(Utils.getApp().getResources(), bitmap); } /** * drawable 转 byteArr * * @param drawable drawable 对象 * @param format 格式 * @return 字节数组 */ public static byte[] drawable2Bytes(final Drawable drawable, final Bitmap.CompressFormat format) { return drawable == null ? null : bitmap2Bytes(drawable2Bitmap(drawable), format); } /** * byteArr 转 drawable * * @param bytes 字节数组 * @return drawable */ public static Drawable bytes2Drawable(final byte[] bytes) { return bytes == null ? null : bitmap2Drawable(bytes2Bitmap(bytes)); } /** * view 转 Bitmap * * @param view 视图 * @return bitmap */ public static Bitmap view2Bitmap(final View view) { if (view == null) return null; Bitmap ret = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(ret); Drawable bgDrawable = view.getBackground(); if (bgDrawable != null) { bgDrawable.draw(canvas); } else { canvas.drawColor(Color.WHITE); } view.draw(canvas); return ret; } /** * dp 转 px * * @param dpValue dp 值 * @return px 值 */ public static int dp2px(final float dpValue) { final float scale = Utils.getApp().getResources().getDisplayMetrics().density; return (int) (dpValue * scale + 0.5f); } /** * px 转 dp * * @param pxValue px 值 * @return dp 值 */ public static int px2dp(final float pxValue) { final float scale = Utils.getApp().getResources().getDisplayMetrics().density; return (int) (pxValue / scale + 0.5f); } /** * sp 转 px * * @param spValue sp 值 * @return px 值 */ public static int sp2px(final float spValue) { final float fontScale = Utils.getApp().getResources().getDisplayMetrics().scaledDensity; return (int) (spValue * fontScale + 0.5f); } /** * px 转 sp * * @param pxValue px 值 * @return sp 值 */ public static int px2sp(final float pxValue) { final float fontScale = Utils.getApp().getResources().getDisplayMetrics().scaledDensity; return (int) (pxValue / fontScale + 0.5f); } /** * 判断字符串是否为 null 或全为空白字符 * * @param s 待校验字符串 * @return {@code true}: null 或全空白字符<br> {@code false}: 不为 null 且不全空白字符 */ private static boolean isSpace(final String s) { if (s == null) return true; for (int i = 0, len = s.length(); i < len; ++i) { if (!Character.isWhitespace(s.charAt(i))) { return false; } } return true; } }
[ "haozhen38957153@sina.com" ]
haozhen38957153@sina.com
12a5f0c75b73f18d2d18836d803693ed1b485268
857054253fc02960c2791e88c4288b5cbfad566a
/services/javaapp/src/main/java/com/javaapp/service/wDataService.java
cb5a7fb96696b180aea76c30b23921f4fce02caf
[]
no_license
Dragon1997201/docker
b7440a38d6ba17836379364d38b98a370676fd1e
f38dc675ed9975d55f77557e526b3cdf032defe0
refs/heads/main
2023-07-15T19:10:12.377695
2021-08-29T14:55:59
2021-08-29T14:55:59
401,065,209
0
0
null
null
null
null
UTF-8
Java
false
false
1,520
java
package com.javaapp.service; import com.javaapp.hoursData.wData; import com.javaapp.repository.WDataRep; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; import javax.transaction.Transactional; import java.util.List; @Service public class wDataService { @Autowired private final WDataRep wDataRep; public wDataService(WDataRep wDataRep){ this.wDataRep = wDataRep; } public void createWData(wData wdata){ wDataRep.save(wdata); } @Transactional @PostConstruct public void init() { for(int j = 1; j<=31; j++) { for (int i = 0; i <= 24; i++) { wData wdata = new wData(); wdata.setHour(i); wdata.setTemperature((int) ((30+j*1.1) * Math.sin(Math.toRadians(i * 180 / 24)))); wdata.setWet(50+(int) ((20+j*1.1) * Math.sin(Math.toRadians(i * 180 / 24)))); wdata.setPressure(746 + (int) (50 * Math.sin(Math.toRadians(i * 180 / 24)))); if (j < 10) { wdata.setDaydate("2021-08-0" + (j)); } else { wdata.setDaydate("2021-08-" + (j)); } wDataRep.save(wdata); } } } public List<wData> findAll(){ return this.wDataRep.findAll(); } public List<wData> findAllByHour(int hour){ return wDataRep.findAllByHour(hour); } }
[ "nikita.lobkov2015@yandex.ru" ]
nikita.lobkov2015@yandex.ru
495e1a641347f870bc3e1ae4f7c80f817fa1cd8f
7af928921898828426b7af6eff4dd9b7e4252817
/platforms/android-28/android-stubs-src/file/java/net/URISyntaxException.java
1135175eab496cc725dcf49a0b74246da1b396e1
[]
no_license
Davidxiahao/RAPID
40c546a739a818a6562d0c9bce5df9f1a462d92b
e99f46155a2f3e6b84324ba75ecd22a278ba7167
refs/heads/master
2023-06-27T13:09:02.418736
2020-03-06T01:38:16
2020-03-06T01:38:16
239,509,129
0
0
null
null
null
null
UTF-8
Java
false
false
3,726
java
/* * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.net; /** * Checked exception thrown to indicate that a string could not be parsed as a * URI reference. * * @author Mark Reinhold * @see URI * @since 1.4 */ @SuppressWarnings({"unchecked", "deprecation", "all"}) public class URISyntaxException extends java.lang.Exception { /** * Constructs an instance from the given input string, reason, and error * index. * * @param input The input string * @param reason A string explaining why the input could not be parsed * @param index The index at which the parse error occurred, * or {@code -1} if the index is not known * * @throws NullPointerException * If either the input or reason strings are {@code null} * * @throws IllegalArgumentException * If the error index is less than {@code -1} */ public URISyntaxException(java.lang.String input, java.lang.String reason, int index) { throw new RuntimeException("Stub!"); } /** * Constructs an instance from the given input string and reason. The * resulting object will have an error index of {@code -1}. * * @param input The input string * @param reason A string explaining why the input could not be parsed * * @throws NullPointerException * If either the input or reason strings are {@code null} */ public URISyntaxException(java.lang.String input, java.lang.String reason) { throw new RuntimeException("Stub!"); } /** * Returns the input string. * * @return The input string */ public java.lang.String getInput() { throw new RuntimeException("Stub!"); } /** * Returns a string explaining why the input string could not be parsed. * * @return The reason string */ public java.lang.String getReason() { throw new RuntimeException("Stub!"); } /** * Returns an index into the input string of the position at which the * parse error occurred, or {@code -1} if this position is not known. * * @return The error index */ public int getIndex() { throw new RuntimeException("Stub!"); } /** * Returns a string describing the parse error. The resulting string * consists of the reason string followed by a colon character * ({@code ':'}), a space, and the input string. If the error index is * defined then the string {@code " at index "} followed by the index, in * decimal, is inserted after the reason string and before the colon * character. * * @return A string describing the parse error */ public java.lang.String getMessage() { throw new RuntimeException("Stub!"); } }
[ "davidxiahao@gmail.com" ]
davidxiahao@gmail.com
9cec01e6878c4229b867bfd9ed1140891c7527f3
6d41cf498399290ea93727c30b86ece7bcd87cd4
/Szo/src/MonsterMain.java
f411aaf3c0b8fe6ac2674e725e12d9a1622c5c3a
[]
no_license
SzopA-26/JavaIdeaProject
8c13bab78a13bc067f88f1dab170b95b847a4952
54f30343d29b24bcf831fa7f562091fd95e8ade0
refs/heads/master
2020-07-12T07:48:53.053139
2019-11-18T08:51:56
2019-11-18T08:51:56
204,757,933
1
0
null
null
null
null
UTF-8
Java
false
false
3,043
java
import java.util.Scanner; public class MonsterMain { public static Monster createMonster() { System.out.println("Please Enter Monster name: "); Scanner scName = new Scanner(System.in); String name = scName.next(); int hp,atk,def; while (true) { System.out.println("Please Enter " +name+ " hp atk def:"); Scanner sc = new Scanner(System.in); hp = sc.nextInt(); atk = sc.nextInt(); def = sc.nextInt(); if (hp < 0 || atk < 0 || def < 0) System.out.println("!!! Input Error please try again."); else break; } return new Monster(name, hp, atk, def); } public static void fight(Monster m1, Monster m2) { System.out.println("Please enter skill A=attack H=heal"); Scanner scSkill = new Scanner(System.in); String skill = scSkill.nextLine(); if (skill.equals("A") || skill.equals("a")) { m2.defend(m1); } else if (skill.equals("H") || skill.equals("h")) { System.out.println("Please enter recovery hp:"); Scanner scHeal = new Scanner(System.in); int heal = scHeal.nextInt(); m1.heal(heal); } } public static void main(String[] args) { System.out.println("!!!! Monster Fight !!!!"); System.out.println("Monster-1 :"); Monster m1 = createMonster(); System.out.println("Monster-2 :"); Monster m2 = createMonster(); for (int i=1;;i++) { if (m1.getAlive() && m2.getAlive()){ System.out.println("\nRound : " + i); System.out.println(">>> Monster " + m1.getName() + " turn <<<"); if (m1.getHeal()) { fight(m1, m2); System.out.println(m1.info()); System.out.println(m2.info()); } else if (!m1.getHeal()){ m1.recover(); System.out.println(m1.getName() + " Can't use skill"); } if (m2.getAlive()) { System.out.println(">>> Monster " + m2.getName() + " turn <<<"); if (m2.getHeal() && m2.getAlive()) { fight(m2, m1); System.out.println(m1.info()); System.out.println(m2.info()); } else if (!m2.getHeal()) { m2.recover(); System.out.println(m2.getName() + " Can't use skill"); } } } else { System.out.println("\nThe Winner Is .........."); if (m1.getAlive()) { System.out.println(m1.info()); } else if (m2.getAlive()) { System.out.println(m2.info()); } break; } } } }
[ "patiphat.kh@ku.th" ]
patiphat.kh@ku.th
6c9e0135513f7bb9d8e86fe969f81e0efda5480c
51f84e8938bb89f8c2553589c68ee8ea76a137ab
/src/com/company/Lesson_28_OOP/HW_28_05.java
b2140329227c06b87a37682d8a0a269b79f3ccf6
[]
no_license
novand23/TutorProject
1bc2c902929129434c4bb88e6685265e180f53b1
7c3b967b5d48b9da0f1ea65e5a34b4e64c90b106
refs/heads/master
2020-05-02T09:07:29.753890
2019-10-16T20:07:01
2019-10-16T20:07:01
177,861,948
0
0
null
null
null
null
UTF-8
Java
false
false
773
java
package com.company.Lesson_28_OOP; /* Создать класс Pet с методом getName, который возвращает строку "Я - пушистик" Создать класс Cat и унаследоваться от Pet Переопредели метод getName в классе Cat так, чтобы программа выдавала на экран надпись «Я - кот». */ public class HW_28_05 { public static void main (String []args){ Pet1 cat2 = new Cat2(); cat2.getName(); } } class Pet1 { public void getName (){ System.out.println("Я - пушистик"); } } class Cat2 extends Pet1{ @Override public void getName() { System.out.println("Я - кот"); } } //TODO
[ "novand23@gmail.com" ]
novand23@gmail.com
4f2d79357410e95e6eb1404e52cecf21cd829a09
fd589b0167dfae33c473d73920fd72e00ab6e0b6
/3. Development/1. Backend/PW/printway-service/src/main/java/com/goofinity/pgc_service/dto/supplierBalance/SupplierBalanceDTO.java
b6c62d27072e18afbe7298e9f9d88ac17caebca7
[]
no_license
joson2020/frl_printway_maintenance
c9b0ed4d6a218aa479e85b9c475230f73b6b9767
3f6e0dc84d162fc033ad78dced218d8cb15aab5f
refs/heads/master
2023-01-23T17:22:44.575197
2020-11-13T16:58:37
2020-11-13T16:58:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
517
java
package com.goofinity.pgc_service.dto.supplierBalance; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.AllArgsConstructor; import lombok.Setter; import java.util.List; @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Builder public class SupplierBalanceDTO { private String supplierEmail; private String supplierId; private boolean isPaid; private double totalAmount; private String author; private List<SupplierBalanceOrderDTO> orders; }
[ "51000027+censodev@users.noreply.github.com" ]
51000027+censodev@users.noreply.github.com
48c0c9d3933d874fc627814fd04046d42c0ee6c8
c62d65ab1959e490aa4bac9360b2e7a42cfbe860
/src/main/java/com/newvisionsoftware/poc/entandoapp/security/AuthoritiesConstants.java
d45fcf880ac03d28e8e1db71350f3949f176532a
[]
no_license
sengarrohit/entando-testProject
f376f1da5399fc200534f40429ce53221edad52d
f084cfd85e41e0064b180de6fb3aae4bff28a876
refs/heads/main
2023-07-31T22:01:57.191029
2021-09-09T15:08:54
2021-09-09T15:08:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package com.newvisionsoftware.poc.entandoapp.security; /** * Constants for Spring Security authorities. */ public final class AuthoritiesConstants { public static final String ADMIN = "ROLE_ADMIN"; public static final String USER = "ROLE_USER"; public static final String ANONYMOUS = "ROLE_ANONYMOUS"; private AuthoritiesConstants() { } }
[ "rohit.sengar@newvisionsoftware.in" ]
rohit.sengar@newvisionsoftware.in
c45bc1376ff9a6d1084cdd198183adb28abfba4b
cd8bcb9211ec0e382e1e8bec0e82fb27188f762e
/Test/src/main/java/com/yida/design/state/generator/impl/ConcreteState1.java
3fe12f4c6da9c09cee689afb117e7312646d34c9
[]
no_license
shenjichenai/test
aa44a2504e859fcae7ed6c9f38036b953485081f
be360be3d82371c98fe96a218f5b71ca03d46190
refs/heads/master
2021-06-22T15:01:06.926600
2019-01-31T00:53:23
2019-01-31T00:53:23
132,846,447
0
0
null
null
null
null
UTF-8
Java
false
false
626
java
package com.yida.design.state.generator.impl; import com.yida.design.state.generator.Context; import com.yida.design.state.generator.State; /** ********************* * @author yangke * @version 1.0 * @created 2018年8月9日 下午6:12:52 *********************** */ public class ConcreteState1 extends State { @Override public void handle1() { // 本状态下必须处理的逻辑 } @Override public void handle2() { // 设置当前状态为stat2 super.context.setCurrentState(Context.STATE2); // 过渡到state2状态,由Context实现 super.context.handle2(); } }
[ "0@0-PC" ]
0@0-PC
db95875964eef0e1bfb2f97888fbb5c1d464a3da
3dda6f46920c970f01bac7e23a015f7de09f0ae1
/src/com/neuedu/test/chapter10/Test7.java
c8cd7f159df291e089ac6f98f13d335ee3bd3e75
[]
no_license
feiyy/java10-se-2020
51a8f470b2e240021203dc2ba0a58b38a78ecd65
d21eddf2d074e7c17d07909a99082e4b0d1fd9db
refs/heads/master
2022-12-05T10:49:20.282853
2020-08-04T03:44:37
2020-08-04T03:44:37
283,656,200
0
0
null
null
null
null
GB18030
Java
false
false
582
java
package com.neuedu.test.chapter10; import java.util.ArrayList; import java.util.Iterator; public class Test7 { public static void main(String[] args) { // TODO Auto-generated method stub //泛型 ArrayList<String> list = new ArrayList<>(); list.add("x"); list.add("y"); ArrayList<Integer> list2 = new ArrayList<>(); //不需要强制类型转换 for(String str : list) { System.out.println(str); } Iterator<String> iter = list.iterator(); while(iter.hasNext()) { String str = iter.next(); System.out.println(str); } } }
[ "you@neusoft.com" ]
you@neusoft.com
838a34ac99cd434a587067b41219ef131eb500b8
69f0cc64e835688e2931ef1cad791f80ffc42089
/Lab4_UILabs1/app/src/main/java/course/labs/todomanager/AddToDoActivity.java
491666306582ebcd47677674aa56ee7ebf33e109
[ "MIT" ]
permissive
rnishtala/Android
b11f5ce39b021000a5658978a867246692554a1e
def55204e07854195bf817b67fcc2c34826ee889
refs/heads/master
2016-09-12T05:03:47.766734
2016-04-29T03:30:33
2016-04-29T03:30:33
50,972,745
0
0
null
null
null
null
UTF-8
Java
false
false
8,808
java
package course.labs.todomanager; import java.util.Calendar; import java.util.Date; import android.app.Activity; import android.app.DatePickerDialog; import android.app.Dialog; import android.app.DialogFragment; import android.app.TimePickerDialog; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.DatePicker; import android.widget.EditText; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.TextView; import android.widget.TimePicker; import course.labs.todomanager.ToDoItem.Priority; import course.labs.todomanager.ToDoItem.Status; public class AddToDoActivity extends Activity { // 7 days in milliseconds - 7 * 24 * 60 * 60 * 1000 private static final int SEVEN_DAYS = 604800000; private static final String TAG = "Lab-UserInterface"; private static String timeString; private static String dateString; private static TextView dateView; private static TextView timeView; private Date mDate; private RadioGroup mPriorityRadioGroup; private RadioGroup mStatusRadioGroup; private EditText mTitleText; private RadioButton mDefaultStatusButton; private RadioButton mDefaultPriorityButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.add_todo); mTitleText = (EditText) findViewById(R.id.title); mDefaultStatusButton = (RadioButton) findViewById(R.id.statusNotDone); mDefaultPriorityButton = (RadioButton) findViewById(R.id.medPriority); mPriorityRadioGroup = (RadioGroup) findViewById(R.id.priorityGroup); mStatusRadioGroup = (RadioGroup) findViewById(R.id.statusGroup); dateView = (TextView) findViewById(R.id.date); timeView = (TextView) findViewById(R.id.time); // Set the default date and time setDefaultDateTime(); // OnClickListener for the Date button, calls showDatePickerDialog() to // show the Date dialog final Button datePickerButton = (Button) findViewById(R.id.date_picker_button); datePickerButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showDatePickerDialog(); } }); // OnClickListener for the Time button, calls showTimePickerDialog() to // show the Time Dialog final Button timePickerButton = (Button) findViewById(R.id.time_picker_button); timePickerButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showTimePickerDialog(); } }); // OnClickListener for the Cancel Button, final Button cancelButton = (Button) findViewById(R.id.cancelButton); cancelButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO - Indicate result and finish Intent intent = new Intent(v.getContext(),ToDoManagerActivity.class); startActivityForResult(intent,R.string.cancel_string); } }); // TODO - Set up OnClickListener for the Reset Button final Button resetButton = (Button) findViewById(R.id.resetButton); resetButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO - Reset data to default values mTitleText.setText(""); if(!mDefaultStatusButton.isChecked()){ mDefaultStatusButton.toggle(); } if(!mDefaultPriorityButton.isChecked()){ mDefaultPriorityButton.toggle(); } // reset date and time setDefaultDateTime(); } }); // Set up OnClickListener for the Submit Button final Button submitButton = (Button) findViewById(R.id.submitButton); submitButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // gather ToDoItem data // TODO - Get the current Priority Priority priority = null; RadioButton mLowRadio = (RadioButton) findViewById(R.id.lowPriority); RadioButton mMedRadio = (RadioButton) findViewById(R.id.medPriority); RadioButton mHighRadio = (RadioButton) findViewById(R.id.highPriority); if(mLowRadio.isChecked()){ priority = Priority.LOW; } else if(mMedRadio.isChecked()){ priority = Priority.MED; } else{ priority = Priority.HIGH; } // TODO - Get the current Status Status status = null; RadioButton mStatusDone = (RadioButton) findViewById(R.id.statusDone); RadioButton mStatusNotDone = (RadioButton) findViewById(R.id.statusNotDone); if(mStatusDone.isChecked()){ status = Status.DONE; } else{ status = Status.NOTDONE; } // TODO - Get the current ToDoItem Title String titleString = null; EditText title = (EditText) findViewById(R.id.title); titleString = title.getText().toString(); // Construct the Date string String fullDate = dateString + " " + timeString; // Package ToDoItem data into an Intent Intent data = new Intent(v.getContext(),ToDoManagerActivity.class); ToDoItem.packageIntent(data, titleString, priority, status, fullDate); // TODO - return data Intent and finish setResult(RESULT_OK,data); finish(); } }); } // Do not modify below this point. private void setDefaultDateTime() { // Default is current time + 7 days mDate = new Date(); mDate = new Date(mDate.getTime() + SEVEN_DAYS); Calendar c = Calendar.getInstance(); c.setTime(mDate); setDateString(c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH)); dateView.setText(dateString); setTimeString(c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.MINUTE), c.get(Calendar.MILLISECOND)); timeView.setText(timeString); } private static void setDateString(int year, int monthOfYear, int dayOfMonth) { // Increment monthOfYear for Calendar/Date -> Time Format setting monthOfYear++; String mon = "" + monthOfYear; String day = "" + dayOfMonth; if (monthOfYear < 10) mon = "0" + monthOfYear; if (dayOfMonth < 10) day = "0" + dayOfMonth; dateString = year + "-" + mon + "-" + day; } private static void setTimeString(int hourOfDay, int minute, int mili) { String hour = "" + hourOfDay; String min = "" + minute; if (hourOfDay < 10) hour = "0" + hourOfDay; if (minute < 10) min = "0" + minute; timeString = hour + ":" + min + ":00"; } private Priority getPriority() { switch (mPriorityRadioGroup.getCheckedRadioButtonId()) { case R.id.lowPriority: { return Priority.LOW; } case R.id.highPriority: { return Priority.HIGH; } default: { return Priority.MED; } } } private Status getStatus() { switch (mStatusRadioGroup.getCheckedRadioButtonId()) { case R.id.statusDone: { return Status.DONE; } default: { return Status.NOTDONE; } } } private String getToDoTitle() { return mTitleText.getText().toString(); } // DialogFragment used to pick a ToDoItem deadline date public static class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { // Use the current date as the default date in the picker final Calendar c = Calendar.getInstance(); int year = c.get(Calendar.YEAR); int month = c.get(Calendar.MONTH); int day = c.get(Calendar.DAY_OF_MONTH); // Create a new instance of DatePickerDialog and return it return new DatePickerDialog(getActivity(), this, year, month, day); } @Override public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { setDateString(year, monthOfYear, dayOfMonth); dateView.setText(dateString); } } // DialogFragment used to pick a ToDoItem deadline time public static class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { // Use the current time as the default values for the picker final Calendar c = Calendar.getInstance(); int hour = c.get(Calendar.HOUR_OF_DAY); int minute = c.get(Calendar.MINUTE); // Create a new instance of TimePickerDialog and return return new TimePickerDialog(getActivity(), this, hour, minute, true); } public void onTimeSet(TimePicker view, int hourOfDay, int minute) { setTimeString(hourOfDay, minute, 0); timeView.setText(timeString); } } private void showDatePickerDialog() { DialogFragment newFragment = new DatePickerFragment(); newFragment.show(getFragmentManager(), "datePicker"); } private void showTimePickerDialog() { DialogFragment newFragment = new TimePickerFragment(); newFragment.show(getFragmentManager(), "timePicker"); } }
[ "raj.nishtala@gmail.com" ]
raj.nishtala@gmail.com
39ab8e94553d969f8519657e0936431881e74e40
63bdefca52422b39b7c57fdc5b4036fe3d931c3b
/app/src/main/java/de/smart_efb/efbapp/smartefb/ActivityParseDeepLink.java
f2dc545eed6618da81883944ba9a038e6594683f
[]
no_license
mygitpage/SmartEFB
675dd1146c03d0dfcd7512ddc99d14b3799a23eb
9196211b65cb08ed0c24aaa36b61945509e6b490
refs/heads/master
2023-04-29T23:58:48.735015
2022-10-12T20:33:27
2022-10-12T20:33:27
48,698,362
0
0
null
null
null
null
UTF-8
Java
false
false
7,629
java
package de.smart_efb.efbapp.smartefb; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; /** * Created by ich on 26.10.2016. Dispatcher for deep link in the app */ public class ActivityParseDeepLink extends Activity { public static final String OUR_ARRANGEMENT = "/ourarrangement"; public static final String OUR_GOALS = "/ourgoals"; public static final String MEETING = "/meeting"; public static final String SETTINGS = "/settings"; public static final String FAQ = "/faq"; public static final String PREVENTION = "/prevention"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // check link for border Intent intent = getIntent(); if (intent == null || intent.getData() == null) { finish(); } // handle the link openDeepLink(intent.getData()); // Finish this activity finish(); } private void openDeepLink (Uri deepLink) { String path = deepLink.getPath(); String tmpCommand = ""; int tmpDbId = 0; int tmpNumberinListView = 0; Boolean tmpEvalNext = false; // get data that comes with intent-link from URI tmpCommand = (deepLink.getQueryParameter("com")); if (OUR_ARRANGEMENT.equals(path)) { tmpDbId = Integer.parseInt(deepLink.getQueryParameter("db_id")); tmpNumberinListView = Integer.parseInt(deepLink.getQueryParameter("arr_num")); tmpEvalNext = Boolean.parseBoolean(deepLink.getQueryParameter("eval_next")); // send broadcast or intent? if (tmpCommand != null && tmpCommand.equals("change_sort_sequence_arrangement_comment")) { Intent tmpIntent = new Intent(); tmpIntent.putExtra("changeSortSequenceOfListView", "1"); // refresh list view in activity/fragement tmpIntent.setAction("ACTIVITY_STATUS_UPDATE"); this.sendBroadcast(tmpIntent); } else if (tmpCommand != null && tmpCommand.equals("change_sort_sequence_arrangement_sketch_comment")) { Intent tmpIntent = new Intent(); tmpIntent.putExtra("changeSortSequenceOfListViewSketchComment", "1"); // refresh list view in activity/fragement tmpIntent.setAction("ACTIVITY_STATUS_UPDATE"); this.sendBroadcast(tmpIntent); } else { // Launch our arrangement Intent intent = new Intent(this, ActivityOurArrangement.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("com", tmpCommand); intent.putExtra("db_id", tmpDbId); intent.putExtra("arr_num", tmpNumberinListView); intent.putExtra("eval_next", tmpEvalNext); startActivity(intent); } } else if (OUR_GOALS.equals(path)) { tmpDbId = Integer.parseInt(deepLink.getQueryParameter("db_id")); tmpNumberinListView = Integer.parseInt(deepLink.getQueryParameter("arr_num")); tmpEvalNext = Boolean.parseBoolean(deepLink.getQueryParameter("eval_next")); // send broadcast or intent? if (tmpCommand != null && tmpCommand.equals("change_sort_sequence_jointly_goal_comment")) { Intent tmpIntent = new Intent(); tmpIntent.putExtra("changeSortSequenceOfListViewJointlyComment", "1"); // refresh list view in activity/fragement tmpIntent.setAction("ACTIVITY_STATUS_UPDATE"); this.sendBroadcast(tmpIntent); } else if (tmpCommand != null && tmpCommand.equals("change_sort_sequence_debetable_goal_comment")) { Intent tmpIntent = new Intent(); tmpIntent.putExtra("changeSortSequenceOfListViewDebetableComment", "1"); // refresh list view in activity/fragement tmpIntent.setAction("ACTIVITY_STATUS_UPDATE"); this.sendBroadcast(tmpIntent); } else { // Launch our goals Intent intent = new Intent(this, ActivityOurGoals.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("com", tmpCommand); intent.putExtra("db_id", tmpDbId); intent.putExtra("arr_num", tmpNumberinListView); intent.putExtra("eval_next", tmpEvalNext); startActivity(intent); } } else if (MEETING.equals(path)) { Long tmpMeetingId = Long.parseLong(deepLink.getQueryParameter("meeting_id")); // Launch settings Intent intent = new Intent(this, ActivityMeeting.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("meeting_id",tmpMeetingId); intent.putExtra("com",tmpCommand); startActivity(intent); } else if (SETTINGS.equals(path)) { // Launch settings Intent intent = new Intent(this, ActivitySettingsEfb.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("com",tmpCommand); startActivity(intent); } else if (FAQ.equals(path)) { // check for expand string command if (tmpCommand.equals("less_or_more_text")) { String expandTextList = ""; String linkTextHash = ""; expandTextList = deepLink.getQueryParameter("expand_text_list"); linkTextHash = deepLink.getQueryParameter("link_text_hash"); // send intent to receiver in Activity Faq to update listView Intent tmpIntent = new Intent(); tmpIntent.putExtra("less_or_more_text","1"); tmpIntent.putExtra("expand_text_list",expandTextList); tmpIntent.putExtra("link_text_hash",linkTextHash); tmpIntent.setAction("ACTIVITY_STATUS_UPDATE"); ActivityParseDeepLink.this.sendBroadcast(tmpIntent); } else { // other command to show tab // Launch faq Intent intent = new Intent(this, ActivityFaq.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("com", tmpCommand); startActivity(intent); } } else if (PREVENTION.equals(path)) { String expandTextList = ""; String linkTextHash = ""; if (tmpCommand.equals("less_or_more_text")) { expandTextList = deepLink.getQueryParameter("expand_text_list"); linkTextHash = deepLink.getQueryParameter("link_text_hash"); } // Launch prevention Intent intent = new Intent(this, ActivityPrevention.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("com",tmpCommand); intent.putExtra("expand_text_list",expandTextList); intent.putExtra("link_text_hash",linkTextHash); startActivity(intent); } else { // Fall back to the main activity startActivity(new Intent(this, MainActivity.class)); } } }
[ "jjhh2000@gmx.de" ]
jjhh2000@gmx.de
deac112144a26436c108136a2266c907b05a3da7
e1bb59f57ce3b5f95bbb6ef62dc711502d23709d
/app/src/androidTest/java/com/susyimes/bulbroom/ExampleInstrumentedTest.java
c6923e15172198346454b4eb1caeee3fc486705b
[]
no_license
susyimes/BulbRoom
b2ecce95b95a14eded915ad8edd62f8b9a07b234
de6e40583135c7e3b25e8b992b1d838705ce52cd
refs/heads/master
2021-01-22T19:55:06.271537
2017-03-17T02:34:06
2017-03-17T02:34:06
85,262,541
0
0
null
null
null
null
UTF-8
Java
false
false
746
java
package com.susyimes.bulbroom; 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.*; /** * 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.susyimes.bulbroom", appContext.getPackageName()); } }
[ "705710652@qq.com" ]
705710652@qq.com
80d27e592bdf86ae65d8ba25bf0ade7b743772a2
dae5b176fdd7ec2373df66720a3a75f16a88e900
/src/Handlers/Content.java
c36940ffb031452790b848b9fd2b3a1a87bac5c9
[]
no_license
drew-vanderriet/MasterTrainer
705301c5b2ae52150e9306dc2883f606fd4059fc
39517febc916cd44f2f703fad3f36d674b9cceb4
refs/heads/master
2021-01-12T07:00:38.825238
2016-12-19T20:53:06
2016-12-19T20:53:06
76,894,452
0
0
null
null
null
null
UTF-8
Java
false
false
2,171
java
package Handlers; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; // this class loads resources on boot. // spritesheets are taken from here. public class Content { public static BufferedImage[][] GreenDragon = load("/Sprites/Creatures/greendragonblock.gif", 30, 30); public static BufferedImage[][] GreenDragonScratch = load("/Sprites/Creatures/greendragon.gif", 60, 30); public static BufferedImage[][] BlueDragon = load("/Sprites/Creatures/bluedragonblock.gif", 30, 30); public static BufferedImage[][] BlueDragonScratch = load("/Sprites/Creatures/bluedragon.gif", 60, 30); public static BufferedImage[][] Slugger = load("/Sprites/Creatures/slugger.gif", 30, 30); public static BufferedImage[][] YellowTrainer = load("/Sprites/Trainers/YellowTrainer.gif", 40, 40); public static BufferedImage[][] BrownTrainer = load("/Sprites/Trainers/BrownTrainer.gif", 40, 40); public static BufferedImage[][] BlueTrainer = load("/Sprites/Trainers/BlueTrainer.gif", 40, 40); public static BufferedImage[][] RedTrainer = load("/Sprites/Trainers/RedTrainer.gif", 40, 40); public static BufferedImage[][] Explosion = load("/Sprites/Effects/explosion.gif", 30, 30); public static BufferedImage[][] Block = load("/Sprites/Effects/block.gif", 30, 30); public static BufferedImage[][] Dead = load("/Sprites/Effects/dead.gif", 30, 30); public static BufferedImage[][] FireBall = load("/Sprites/Effects/fireball.gif", 30, 30); public static BufferedImage[][] FireBallBlue = load("/Sprites/Effects/fireballblue.gif", 30, 30); public static BufferedImage[][] load(String s, int w, int h) { BufferedImage[][] ret; try { BufferedImage spritesheet = ImageIO.read(Content.class.getResourceAsStream(s)); int width = spritesheet.getWidth() / w; int height = spritesheet.getHeight() / h; ret = new BufferedImage[height][width]; for(int i = 0; i < height; i++) { for(int j = 0; j < width; j++) { ret[i][j] = spritesheet.getSubimage(j * w, i * h, w, h); } } return ret; } catch(Exception e) { e.printStackTrace(); System.out.println("Error loading graphics."); System.exit(0); } return null; } }
[ "dvdriet@gmail.com" ]
dvdriet@gmail.com
ed80ee99a159559ab42015115a82687a2c8ffbef
88c90014ab4685f419a181a76fabdfb257a7b57c
/auth/src/test/java/me/kolek/ecommerce/dsgw/auth/AuthScopeSetTest.java
312018cc38cf123caa5dc9b3602dc5bd1e8f148a
[]
no_license
ckolek/dropship-gateway
987ae365496b6e84b9baf95958b3d2634a2cadd3
298f06f8549aab14309a8a52bf5566b5b01d2f1c
refs/heads/main
2023-09-01T20:50:11.250068
2021-10-10T18:06:23
2021-10-10T18:06:23
393,224,520
0
0
null
null
null
null
UTF-8
Java
false
false
3,682
java
package me.kolek.ecommerce.dsgw.auth; import static org.assertj.core.api.Assertions.assertThat; import java.util.Collections; import java.util.List; import java.util.Set; import org.junit.jupiter.api.Test; public class AuthScopeSetTest { private static final AuthScope SCOPE1 = AuthScope.parse("org/*/*:*"); private static final AuthScope SCOPE2 = AuthScope.parse("org/*/*:read"); private static final AuthScope SCOPE3 = AuthScope.parse("org/*/*:write"); private static final AuthScope SCOPE4 = AuthScope.parse("org/*/*/user/*:*"); private static final AuthScope SCOPE5 = AuthScope.parse("org/*/*/user/*:read"); private static final AuthScope SCOPE6 = AuthScope.parse("org/*/*/user/*:write"); @Test public void testAnyAction() { Set<AuthScope> scopes = new AuthScopeSet(); Collections.addAll(scopes, SCOPE1, SCOPE4); assertThat(scopes).hasSize(2); assertThat(scopes.contains(AuthScope.parse("org/admin/123:read"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/retail/123:write"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/supply/123:foo"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/user/abc:read"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/retail/123/user/abc:write"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/supply/123/user/abc:foo"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/123:read"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/123:write"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/user:read"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/user:write"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/abc:read"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/abc:write"))).isFalse(); assertThat(scopes.contains(new AuthScope("", List.of()))).isFalse(); } @Test public void testExplicitAction() { Set<AuthScope> scopes = new AuthScopeSet(); Collections.addAll(scopes, SCOPE2, SCOPE3, SCOPE5, SCOPE6); assertThat(scopes).hasSize(4); assertThat(scopes.contains(AuthScope.parse("org/admin/123:read"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/retail/123:write"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/supply/123:foo"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/user/abc:read"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/retail/123/user/abc:write"))).isTrue(); assertThat(scopes.contains(AuthScope.parse("org/supply/123/user/abc:foo"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/123:read"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/123:write"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/user:read"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/user:write"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/abc:read"))).isFalse(); assertThat(scopes.contains(AuthScope.parse("org/admin/123/abc:write"))).isFalse(); assertThat(scopes.contains(new AuthScope("", List.of()))).isFalse(); } @Test public void testToArray() { Set<AuthScope> scopes = new AuthScopeSet(); Collections.addAll(scopes, SCOPE1, SCOPE2, SCOPE3, SCOPE4, SCOPE5, SCOPE6); assertThat(scopes).hasSize(6); AuthScope[] array = scopes.toArray(new AuthScope[0]); assertThat(array).hasSameSizeAs(scopes); assertThat(array).containsExactlyInAnyOrder(SCOPE1, SCOPE2, SCOPE3, SCOPE4, SCOPE5, SCOPE6); } }
[ "christopher.w@kolek.me" ]
christopher.w@kolek.me
cdf4d154cb91df2f9c24c9d813704025e1895721
7978e0ecfce92d0b3557dbd24bfad48144b1fa98
/src/main/java/ua/training/Controller.java
e40c5d74802b3bdc333776bec44a94e1a95983b7
[]
no_license
averdalv/Task2
9faf6041e5556cfe58cf6f26b913f1459b8e6846
0428a30e74cd0a5c05cb303de282257716da3939
refs/heads/master
2021-01-19T20:50:19.659811
2017-04-18T00:36:05
2017-04-18T00:36:05
88,563,183
0
0
null
null
null
null
UTF-8
Java
false
false
1,905
java
package ua.training; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Controller { private Model model; private View view; private List<Integer> attempts; public Controller(Model model, View view) { this.view=view; this.model=model; this.model.setNumber(this.model.rand()); this.model.setLeftRange(ConstData.LEFT_RANGE); this.model.setRightRange(ConstData.RIGHT_RANGE); attempts=new ArrayList<Integer>(); } public void processUser() { Scanner sc=new Scanner(System.in); int numberFromUser; do { numberFromUser = getNumberFromUser(sc); addNumberToAttempts(numberFromUser); }while(!checkNumber(numberFromUser)); } public int getNumberFromUser(Scanner sc) { view.printInputMessage(model); while( ! sc.hasNextInt()) { view.printMessage(View.WRONG_INPUT); view.printInputMessage(model); sc.next(); } int numberFromUser=sc.nextInt(); if(numberFromUser<0||numberFromUser>100) { view.printMessage(View.WRONG_INPUT); return getNumberFromUser(sc); } return numberFromUser; } public void addNumberToAttempts(int number) { attempts.add(number); } public boolean checkNumber(int numberFromUser) { if(numberFromUser>model.getNumber()) { model.setRightRange(numberFromUser); view.printMessage(View.LESS_NUMBER); } else if(numberFromUser<model.getNumber()) { model.setLeftRange(numberFromUser); view.printMessage(View.GREATER_NUMBER); } else { view.printMessage(View.WIN_MESSAGE); view.printAttempts(attempts); return true; } return false; } }
[ "averdalv@gmail.com" ]
averdalv@gmail.com
a597b7f09a0cfe5c46d7cee10a0f8e0b37a42301
3ed3ae55adec66649bc40ae544005b05d928502a
/kk/src/Programacion/Ejercicio2Bucle.java
b792d8e1d94a9e718bceb6577263a8c15b1d3433
[]
no_license
yorch4/TrabajosPRG
fe27c640afbc34fe895c8e50e95e6169e434bc85
560ada1c20bbfc9401c394b53afce4bf3218997d
refs/heads/master
2020-03-30T12:44:59.782774
2019-02-14T13:00:43
2019-02-14T13:00:43
151,238,297
0
0
null
null
null
null
UTF-8
Java
false
false
572
java
package Programacion; import javax.swing.JOptionPane; public class Ejercicio2Bucle { public static void main(String[] args) { int a = Integer.parseInt(JOptionPane.showInputDialog("¿Cuántos números quiere introducir?")); int i, acumuladorNumerosMayoresDiez = 0; for (i = 0; i < a; i++) { int numero = Integer.parseInt(JOptionPane.showInputDialog("Introduzca n�mero " + i)); if (numero > 10) { acumuladorNumerosMayoresDiez += numero; } } JOptionPane.showMessageDialog(null, "Total acumulado: " + acumuladorNumerosMayoresDiez); } }
[ "diurno@pc-aula" ]
diurno@pc-aula
fd7779288d6f81a61dbbccf979b2aeb841aaa73f
2c3053ba900ea015c032cab1211ab8418cb22c9d
/basic/Item234.java
3d8716ba309fe854885414e7e48b4c46652937f1
[]
no_license
Gobella/leetcode
56b37ec942f24efe6856ae7f8fc13ea56d7db2e5
702a2adeee481af345aa0731aef14abed557e871
refs/heads/master
2021-01-10T17:46:50.000935
2017-02-26T02:06:45
2017-02-26T02:06:45
49,357,981
1
1
null
2016-12-16T02:54:35
2016-01-10T07:38:09
Go
UTF-8
Java
false
false
1,683
java
package leetcode; public class Item234 { public static void main(String[] args) { // TODO Auto-generated method stub ListNode l=new ListNode(1); ListNode head=l; l.next=new ListNode(2); // l=l.next; // l.next=new ListNode(2); // l=l.next; // l.next=new ListNode(1); // l=l.next; // l.next=new ListNode(4); // l=l.next; // l.next=new ListNode(1); // for(int i=0;i<5;i++){ // l.next=new ListNode(i); // l=l.next; // } // for(int i=9;i>-1;i--){ // l.next=new ListNode(i); // l=l.next; // } // l.next=new ListNode(1); System.out.println(isPalindrome(head)); } public static boolean isPalindrome(ListNode head) { if(head==null){ return true; } int middle=0,end=0; ListNode cusor=head; ListNode mid=head; while(cusor!=null){ int temp=(0+end)/2; for(int i=middle;i<temp;i++){ mid=mid.next; middle++; } cusor=cusor.next; end++; } if(end%2==0){ mid=mid.next; } ListNode mh=reverse(mid); while(mh!=null){ if(mh.val!=head.val){ return false; } mh=mh.next; head=head.next; } return true; } public static ListNode reverse(ListNode head){ ListNode temp=null; ListNode temp1=null; if(head.next!=null){ temp=head.next.next; head.next.next=head; temp1=head.next; head.next=null; } if(temp==null&&temp1!=null){ head=temp1; } while(temp!=null){ head=temp; temp=temp.next; head.next=temp1; temp1=head; } return head; } // System.out.println("after:"+mid.val+"-"+mid.next.val); // while(mh!=null){ // System.out.println(mh.val); // mh=mh.next; // } }
[ "bella@belladeMacBook-Pro.local" ]
bella@belladeMacBook-Pro.local
5a07d16f11cdee4025b396aebf13da02d534c2b9
f34e4912ff3eae96fc2df4632d92f91036cd52e2
/src/test/java/com/nbcuni/test/nbcidx/member/get/memberId/TC5241_MemberGet_Valid_UUID.java
6e0ea9a2c2af78dda124e906be3a698b834e4d2b
[]
no_license
RaghuRashmi/test-project
08593431ed0f7a557b4c557af296daf12236bed5
89fa25b46919a272babace4d3f001a3616b9b3cd
refs/heads/master
2021-01-15T14:11:09.007512
2014-09-26T22:03:33
2014-09-26T22:03:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,938
java
package com.nbcuni.test.nbcidx.member.get.memberId; import static org.testng.AssertJUnit.fail; import java.net.Proxy; import org.testng.Reporter; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import com.google.gson.JsonObject; import com.nbcuni.test.nbcidx.AppLib; import com.nbcuni.test.nbcidx.MemberAPIs; import com.nbcuni.test.webdriver.API; import com.nbcuni.test.webdriver.CustomWebDriver; /************************************************************************** * NBCIDX Member.Get API - TC5241_MemberGet_Valid_UUID. Copyright. * * @author Rashmi Sale * @version 1.0 Date: July 4, 2014 **************************************************************************/ public class TC5241_MemberGet_Valid_UUID { private CustomWebDriver cs; private AppLib al; private API api; private Proxy proxy=null; private MemberAPIs ma; /** * Instantiate the TestNG Before Class Method. */ @BeforeClass(alwaysRun = true) @Parameters("Environment") public void startEnvironment(String sEnv) { try { cs = null; al = new AppLib(cs); al.setEnvironmentInfo(sEnv); proxy = al.getHttpProxy(); api = new API(); api.setProxy(proxy); ma = new MemberAPIs(); } catch (Exception e) { fail(e.toString()); } } /** * Instantiate the TestNG Test Method. */ @Test(groups = {"full"}) public void memberGet_uuid() throws Exception { String params, responseString; String uuid=TC01_FindMemberFromDB.finalUUID; Reporter.log("1) Validating member.get API Response with id=<valid UUID>"); params = "id="+uuid; JsonObject response = ma.memberGetResponse(api, al, params, "*"); if(response ==null) fail("Error/Null Response from API call"); responseString = response.toString(); Reporter.log("RESPONSE BODY: " +responseString); Reporter.log("-- X --"); Reporter.log(""); } }
[ "206424426@5TS206424426L7.tfayd.com" ]
206424426@5TS206424426L7.tfayd.com
1328f0fbf6d38e4f920ebbf635a35033346bbd77
eee7082b0b6dfd6b88ecfea0b7a4b45459f5dde7
/src/main/java/com/symphony/bots/pounce/service/BasicPounceMessage.java
01959d56331929c13b727ecf6b64242836997701
[]
no_license
dnsymphony/pounce-bot
59da043caff2dadaea8616f9a14d4ac1d3a76b02
077070232ad25ae0ac83f27022eef98bd364dba3
refs/heads/master
2021-07-11T20:46:03.544305
2017-10-11T16:46:56
2017-10-11T16:46:56
106,582,112
0
1
null
null
null
null
UTF-8
Java
false
false
789
java
package com.symphony.bots.pounce.service; import java.util.ArrayList; import java.util.List; /** * @author Dan Nathanson */ public class BasicPounceMessage implements PounceMessage { private Long pouncer; private List<Long> pouncees = new ArrayList<>(); private boolean chime; BasicPounceMessage() { } @Override public Long getPouncer() { return pouncer; } @Override public void setPouncer(Long pouncer) { this.pouncer = pouncer; } @Override public List<Long> getPouncees() { return pouncees; } @Override public void setPouncees(List<Long> pouncees) { this.pouncees = pouncees; } @Override public void setChime(boolean chime) { this.chime = chime; } @Override public boolean isChime() { return chime; } }
[ "daniel.nathanson@symphony.com" ]
daniel.nathanson@symphony.com
6f3739b921317038e3d94d7afeb148a8cdde0a98
8105ee615b4cafca98a2d01a4285b050595edd22
/src/HeadFirst/Status/HasQuarterState.java
f414fe86e88727bdde4d27a12a1bc34108bd69d1
[]
no_license
PlumpMath/DesignPattern-592
63be722906a061f258c508dcd7ea2d0aba964a88
1ffb453affa8c0d966797b01caf67edaad1c2ec9
refs/heads/master
2021-01-20T09:42:14.605489
2016-09-21T13:41:01
2016-09-21T13:41:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,261
java
package HeadFirst.Status; import java.util.Random; /** * @author NikoBelic * @create 9/14/16 09:54 */ public class HasQuarterState implements State { GumballMachine gumballMachine; Random randomWinner = new Random(System.currentTimeMillis()); public HasQuarterState(GumballMachine gumballMachine) { this.gumballMachine = gumballMachine; } @Override public void insertQuater() { System.out.println("你已经插入过硬币了"); } @Override public void ejectQuater() { System.out.println("好的,硬币退回来了"); gumballMachine.setState(gumballMachine.getNoQuarterState()); } @Override public void turnCrank() { System.out.println("好的,糖果马上就会做好"); int winner = randomWinner.nextInt(10); System.out.println("抽取到数字为 " + winner); if ((winner == 0) && (gumballMachine.getCount() > 1)) { gumballMachine.setState(gumballMachine.getWinnerState()); } else { gumballMachine.setState(gumballMachine.getSoldState()); } } @Override public void dispense() { System.out.println("别急啊~糖果还没做好"); } }
[ "511958060@qq.com" ]
511958060@qq.com
8aea85a73ef08a58497d27af743dd5787a1cce4b
817635951bf9f8955f9d11b288b2e2b5c19ddf02
/redxiii-tracplus2-ejb/src/main/java/com/redxiii/tracplus/ejb/entity/WikiPk.java
f9a85b4d4f77e0b02460e59f12ddca8849adc5b8
[]
no_license
danielf80/TracPlus2
d2800a41319e2887e3dd3fad320f950476cd0e2d
4a61db476deed2e883e99e9f4318bfdfee2440e1
refs/heads/master
2022-07-29T05:02:43.582009
2021-04-27T11:09:10
2021-04-27T11:09:10
5,643,164
0
0
null
2021-06-04T01:07:24
2012-09-01T20:37:13
Java
UTF-8
Java
false
false
1,524
java
package com.redxiii.tracplus.ejb.entity; import java.io.Serializable; import javax.persistence.Basic; import javax.persistence.Embeddable; /** * @author Daniel Filgueiras * @since 19/08/2011 */ @Embeddable public class WikiPk implements Serializable, Comparable<WikiPk> { private static final long serialVersionUID = 1L; @Basic private String name; @Basic private Integer version; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public int compareTo(WikiPk other) { if (this.name.equals(other.name)) return this.version.compareTo(other.version); return this.name.compareTo(other.name); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((version == null) ? 0 : version.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; WikiPk other = (WikiPk) obj; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (version == null) { if (other.version != null) return false; } else if (!version.equals(other.version)) return false; return true; } }
[ "danielf80@gmail.com" ]
danielf80@gmail.com
7025478a73075d5a436b665ee2615ec587f48a59
dad1d22b9973f89f24b206107cbd60bb70c76359
/ht_b/src/main/java/com/ht/ht_b/B_Bean.java
9cca2dc2a94bca884f512515b57283fc631b75d7
[]
no_license
707813227/HT_ModulePattern
e0df1b8e03cc4b7b4ddffa02cf297c8dd9ea6793
6db3a1fb6307bc9bb9e7232fbbe97a725d3b9256
refs/heads/master
2020-11-26T04:46:10.243153
2019-12-19T09:21:44
2019-12-19T09:21:44
228,967,231
1
0
null
null
null
null
UTF-8
Java
false
false
119
java
package com.ht.ht_b; /** * Created on 2019/12/19. * 请写类注释 * * @author peter */ public class B_Bean { }
[ "707813227@qq.com" ]
707813227@qq.com
162ce944a605914567b502ebb7686ae907ddb566
ff561a299733cdcdaf6808544531cb8ce20cdb3a
/src/main/java/com/automation/techassessment/api/endpoints/tv/Network.java
889342ffa229647615a451a54757bac774d2adf8
[]
no_license
hariiravii/skeletor-master
153e47d6172640a5bb8a68cead142dbc44bfedc5
9a322ae0ab8204fe2895c3a60da33caf40bb7432
refs/heads/master
2022-06-19T15:40:53.055772
2019-12-08T22:03:36
2019-12-08T22:03:36
226,735,289
0
0
null
2022-05-20T21:19:29
2019-12-08T21:36:48
Java
UTF-8
Java
false
false
782
java
package com.automation.techassessment.api.endpoints.tv; public class Network { private String name; private int id; private String logo_path; private String origin_country; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getLogoPath() { return logo_path; } public void setLogoPath(String logo_path) { this.logo_path = logo_path; } public String getOriginCountry() { return origin_country; } public void setOriginCountry(String origin_country) { this.origin_country = origin_country; } }
[ "hravi@overstock.com" ]
hravi@overstock.com
81351e5dc2852079c12c5ab5b2d1b116780b68f1
fd96fd48f06cc20ee5472a99ec6c6dcc2e2ca956
/src/main/java/org/slieb/soy/meta/MetaCustomClassConverterFactory.java
48aac74fefa1236a3d52940798fedfeeb76f449d
[ "MIT" ]
permissive
StefanLiebenberg/SoyAnnotations
0e0a9f1153a5f2ffbef5f0f34263f4b43d4b418f
353618e160eda65a1456a09298a0288ee9206681
refs/heads/master
2021-01-21T21:43:23.762262
2016-03-24T00:05:40
2016-03-24T00:05:40
17,048,427
1
1
null
null
null
null
UTF-8
Java
false
false
2,009
java
package org.slieb.soy.meta; import com.google.inject.Inject; import org.slieb.soy.annotations.CustomConverter; import org.slieb.soy.factories.MetaConverterFactory; import org.slieb.soy.helpers.FactoryHelper; import org.slieb.throwables.FunctionWithThrowable; import javax.annotation.Nonnull; @SuppressWarnings("WeakerAccess") public class MetaCustomClassConverterFactory implements FunctionWithThrowable<Class<?>, MetaClassInformation, ReflectiveOperationException>, MetaConverterFactory { private final FactoryHelper factoryHelper; @Inject public MetaCustomClassConverterFactory(FactoryHelper factoryHelper) { this.factoryHelper = factoryHelper; } @Nonnull public MetaConverter getConverterInstance(Class<? extends MetaConverter> converterClass) throws IllegalAccessException, InstantiationException { MetaConverter converter = converterClass.newInstance(); if (converter instanceof MetaFactoryHelperAware) { ((MetaFactoryHelperAware) converter).setFactoryHelper(factoryHelper); } return converter; } @Nonnull public Class<? extends MetaConverter> getConverterClass(Class<?> classObject) { return classObject.getAnnotation(CustomConverter.class).value(); } public MetaConverter getConverter(Class<?> classObject) throws InstantiationException, IllegalAccessException { return getConverterInstance(getConverterClass(classObject)); } @Override public MetaClassInformation applyWithThrowable(Class<?> from) throws IllegalAccessException, InstantiationException { return new MetaClassInformation(Boolean.TRUE, from, getConverter(from), null, false); } @Nonnull @Override public Boolean canCreate(@Nonnull Class<?> classObject) { return classObject.isAnnotationPresent(CustomConverter.class); } @Nonnull @Override public MetaCustomClassConverterFactory create(@Nonnull Class<?> classObject) { return this; } }
[ "siga.fredo@gmail.com" ]
siga.fredo@gmail.com
4c0f3649eaf8040b55c7a3c25bc032a9e30986e9
88fa51e0b1b3ed2e9bba76b838a5311a7c454f56
/me/zoom/xannax/module/modules/combat/SelfTrap.java
7eddef69dd1fd06fb7d882f055af5a9b88fc1884
[]
no_license
PacketFlyAbuser/kek
8250675e2b27cd3bc3a77b27525fb055fd883a81
730391148d6026b647c6a33fd13c83f995f3881c
refs/heads/main
2023-03-07T14:48:40.897965
2021-02-17T19:33:44
2021-02-17T19:33:44
339,833,364
2
0
null
null
null
null
UTF-8
Java
false
false
10,362
java
//Deobfuscated with https://github.com/PetoPetko/Minecraft-Deobfuscator3000 using mappings "1.12 stable mappings"! // // Decompiled by Procyon v0.5.36 // package me.zoom.xannax.module.modules.combat; import net.minecraft.block.BlockObsidian; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import java.util.Collection; import java.util.Collections; import java.util.ArrayList; import net.minecraft.util.EnumFacing; import net.minecraft.block.Block; import net.minecraft.util.EnumHand; import net.minecraft.network.Packet; import net.minecraft.network.play.client.CPacketEntityAction; import net.minecraft.util.math.Vec3i; import net.minecraft.util.math.Vec3d; import me.zoom.xannax.util.BlockUtils; import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.Entity; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.block.BlockLiquid; import net.minecraft.block.BlockAir; import net.minecraft.util.math.BlockPos; import java.util.Iterator; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import me.zoom.xannax.setting.Setting; import me.zoom.xannax.module.Module; public class SelfTrap extends Module { private /* synthetic */ Setting.Integer blocksPerTick; private /* synthetic */ boolean isSneaking; private /* synthetic */ int delayStep; private /* synthetic */ int lastHotbarSlot; private /* synthetic */ int playerHotbarSlot; private /* synthetic */ String lastTickTargetName; private /* synthetic */ EntityPlayer closestTarget; private /* synthetic */ boolean firstRun; private /* synthetic */ int offsetStep; private /* synthetic */ Setting.Integer tickDelay; /* synthetic */ Setting.Mode mode; private /* synthetic */ Setting.Boolean rotate; public SelfTrap() { super("SelfTrap", "SelfTrap", Category.Combat); this.playerHotbarSlot = -1; this.lastHotbarSlot = -1; this.delayStep = 0; this.isSneaking = false; this.offsetStep = 0; } private void findClosestTarget() { final List playerEntities = SelfTrap.mc.world.playerEntities; this.closestTarget = null; for (final EntityPlayer closestTarget : playerEntities) { if (closestTarget == SelfTrap.mc.player) { this.closestTarget = closestTarget; } } } private boolean placeBlockInRange(final BlockPos blockPos) { final Block getBlock = SelfTrap.mc.world.getBlockState(blockPos).getBlock(); if (!(getBlock instanceof BlockAir) && !(getBlock instanceof BlockLiquid)) { return false; } for (final Entity entity : SelfTrap.mc.world.getEntitiesWithinAABBExcludingEntity((Entity)null, new AxisAlignedBB(blockPos))) { if (!(entity instanceof EntityItem) && !(entity instanceof EntityXPOrb)) { return false; } } final EnumFacing placeableSide = BlockUtils.getPlaceableSide(blockPos); if (placeableSide == null) { return false; } final BlockPos offset = blockPos.offset(placeableSide); final EnumFacing getOpposite = placeableSide.getOpposite(); if (!BlockUtils.canBeClicked(offset)) { return false; } final Vec3d add = new Vec3d((Vec3i)offset).add(0.5, 0.5, 0.5).add(new Vec3d(getOpposite.getDirectionVec()).scale(0.5)); final Block getBlock2 = SelfTrap.mc.world.getBlockState(offset).getBlock(); final int obiInHotbar = this.findObiInHotbar(); if (obiInHotbar == -1) { this.disable(); } if (this.lastHotbarSlot != obiInHotbar) { SelfTrap.mc.player.inventory.currentItem = obiInHotbar; this.lastHotbarSlot = obiInHotbar; } if ((!this.isSneaking && BlockUtils.blackList.contains(getBlock2)) || BlockUtils.shulkerList.contains(getBlock2)) { SelfTrap.mc.player.connection.sendPacket((Packet)new CPacketEntityAction((Entity)SelfTrap.mc.player, CPacketEntityAction.Action.START_SNEAKING)); this.isSneaking = true; } if (this.rotate.getValue()) { BlockUtils.faceVectorPacketInstant(add); } SelfTrap.mc.playerController.processRightClickBlock(SelfTrap.mc.player, SelfTrap.mc.world, offset, getOpposite, add, EnumHand.MAIN_HAND); SelfTrap.mc.player.swingArm(EnumHand.MAIN_HAND); SelfTrap.mc.rightClickDelayTimer = 4; return true; } @Override protected void onDisable() { if (SelfTrap.mc.player == null) { return; } if (this.lastHotbarSlot != this.playerHotbarSlot && this.playerHotbarSlot != -1) { SelfTrap.mc.player.inventory.currentItem = this.playerHotbarSlot; } if (this.isSneaking) { SelfTrap.mc.player.connection.sendPacket((Packet)new CPacketEntityAction((Entity)SelfTrap.mc.player, CPacketEntityAction.Action.STOP_SNEAKING)); this.isSneaking = false; } this.playerHotbarSlot = -1; this.lastHotbarSlot = -1; } @Override public void onUpdate() { if (SelfTrap.mc.player == null) { return; } if (!this.firstRun) { if (this.delayStep < this.tickDelay.getValue()) { ++this.delayStep; return; } this.delayStep = 0; } this.findClosestTarget(); if (this.closestTarget == null) { if (this.firstRun) { this.firstRun = false; } return; } if (this.firstRun) { this.firstRun = false; this.lastTickTargetName = this.closestTarget.getName(); } else if (!this.lastTickTargetName.equals(this.closestTarget.getName())) { this.lastTickTargetName = this.closestTarget.getName(); this.offsetStep = 0; } final ArrayList<Object> c = new ArrayList<Object>(); if (this.mode.getValue().equalsIgnoreCase("Normal")) { Collections.addAll(c, Offsets.TRAP); } if (this.mode.getValue().equalsIgnoreCase("NoStep")) { Collections.addAll(c, Offsets.TRAPFULLROOF); } if (this.mode.getValue().equalsIgnoreCase("Simple")) { Collections.addAll(c, Offsets.TRAPSIMPLE); } int i = 0; while (i < this.blocksPerTick.getValue()) { if (this.offsetStep >= c.size()) { this.offsetStep = 0; break; } final BlockPos blockPos = new BlockPos((Vec3d)c.get(this.offsetStep)); if (this.placeBlockInRange(new BlockPos(this.closestTarget.getPositionVector()).down().add(blockPos.getX(), blockPos.getY(), blockPos.getZ()))) { ++i; } ++this.offsetStep; } if (i > 0) { if (this.lastHotbarSlot != this.playerHotbarSlot && this.playerHotbarSlot != -1) { SelfTrap.mc.player.inventory.currentItem = this.playerHotbarSlot; this.lastHotbarSlot = this.playerHotbarSlot; } if (this.isSneaking) { SelfTrap.mc.player.connection.sendPacket((Packet)new CPacketEntityAction((Entity)SelfTrap.mc.player, CPacketEntityAction.Action.STOP_SNEAKING)); this.isSneaking = false; } } } private int findObiInHotbar() { int n = -1; for (int i = 0; i < 9; ++i) { final ItemStack getStackInSlot = SelfTrap.mc.player.inventory.getStackInSlot(i); if (getStackInSlot != ItemStack.EMPTY) { if (getStackInSlot.getItem() instanceof ItemBlock) { if (((ItemBlock)getStackInSlot.getItem()).getBlock() instanceof BlockObsidian) { n = i; break; } } } } return n; } @Override public void setup() { final ArrayList<String> list = new ArrayList<String>(); list.add("Normal"); list.add("NoStep"); list.add("Simple"); this.mode = this.registerMode("Mode", "Mode", list, "Normal"); this.rotate = this.registerBoolean("Rotate", "Rotate", true); this.blocksPerTick = this.registerInteger("Blocks Per Tick", "BlocksPerTick", 5, 0, 10); this.tickDelay = this.registerInteger("Delay", "Delay", 0, 0, 10); } @Override protected void onEnable() { if (SelfTrap.mc.player == null) { this.disable(); return; } this.firstRun = true; this.playerHotbarSlot = SelfTrap.mc.player.inventory.currentItem; this.lastHotbarSlot = -1; } private static class Offsets { private static final /* synthetic */ Vec3d[] TRAP; private static final /* synthetic */ Vec3d[] TRAPFULLROOF; private static final /* synthetic */ Vec3d[] TRAPSIMPLE; static { TRAP = new Vec3d[] { new Vec3d(0.0, 0.0, -1.0), new Vec3d(1.0, 0.0, 0.0), new Vec3d(0.0, 0.0, 1.0), new Vec3d(-1.0, 0.0, 0.0), new Vec3d(0.0, 1.0, -1.0), new Vec3d(1.0, 1.0, 0.0), new Vec3d(0.0, 1.0, 1.0), new Vec3d(-1.0, 1.0, 0.0), new Vec3d(0.0, 2.0, -1.0), new Vec3d(1.0, 2.0, 0.0), new Vec3d(0.0, 2.0, 1.0), new Vec3d(-1.0, 2.0, 0.0), new Vec3d(0.0, 3.0, -1.0), new Vec3d(0.0, 3.0, 0.0) }; TRAPFULLROOF = new Vec3d[] { new Vec3d(0.0, 0.0, -1.0), new Vec3d(1.0, 0.0, 0.0), new Vec3d(0.0, 0.0, 1.0), new Vec3d(-1.0, 0.0, 0.0), new Vec3d(0.0, 1.0, -1.0), new Vec3d(1.0, 1.0, 0.0), new Vec3d(0.0, 1.0, 1.0), new Vec3d(-1.0, 1.0, 0.0), new Vec3d(0.0, 2.0, -1.0), new Vec3d(1.0, 2.0, 0.0), new Vec3d(0.0, 2.0, 1.0), new Vec3d(-1.0, 2.0, 0.0), new Vec3d(0.0, 3.0, -1.0), new Vec3d(0.0, 3.0, 0.0), new Vec3d(0.0, 4.0, 0.0) }; TRAPSIMPLE = new Vec3d[] { new Vec3d(-1.0, 0.0, 0.0), new Vec3d(1.0, 0.0, 0.0), new Vec3d(0.0, 0.0, -1.0), new Vec3d(0.0, 0.0, 1.0), new Vec3d(1.0, 1.0, 0.0), new Vec3d(0.0, 1.0, -1.0), new Vec3d(0.0, 1.0, 1.0), new Vec3d(-1.0, 1.0, 0.0), new Vec3d(-1.0, 2.0, 0.0), new Vec3d(-1.0, 3.0, 0.0), new Vec3d(0.0, 3.0, 0.0) }; } } }
[ "70656560+NotBestDoggo@users.noreply.github.com" ]
70656560+NotBestDoggo@users.noreply.github.com
d28f79f56cbe51a8fa0a9fcf0849683e5acafdc0
22273f4b9e5aee8b1aacb5ca9e36a5d4390e8e29
/week-04/day-2/src/aircraftcarrier/AircraftCarrier.java
37113bc1fac3170a44c577fa0da0ebf4f3c8c5f0
[]
no_license
green-fox-academy/Balogh08
9f3f7deeb6398ae9786fb848c2ea07e320a8dadc
1481c81c8703dee88fef5cf451267f0de2e21b0a
refs/heads/master
2020-04-17T00:42:01.863301
2019-04-11T16:00:14
2019-04-11T16:00:14
166,059,279
0
0
null
null
null
null
UTF-8
Java
false
false
2,365
java
package aircraftcarrier; import java.util.ArrayList; import java.util.EmptyStackException; import java.util.List; public class AircraftCarrier { List<Aircraft> carrierOfAircrafts; private int carrierAmmo; private int healthPoint; public AircraftCarrier (int carrierAmmo, int healthPoint) { carrierOfAircrafts = new ArrayList<>(); this.carrierAmmo = carrierAmmo; this.healthPoint = healthPoint; } public void addAircraft(Aircraft aircraft) { carrierOfAircrafts.add(aircraft); } public void fill() { if (carrierAmmo == 0) { throw new EmptyStackException(); } List<Aircraft> notPriorityAircraft = new ArrayList<>(); for (Aircraft aircrafts : carrierOfAircrafts) { if (aircrafts.getPriority()) { aircrafts.refill(carrierAmmo); this.carrierAmmo -= aircrafts.getAmmo(); } else { notPriorityAircraft.add(aircrafts); } } for (Aircraft aircrafts : notPriorityAircraft) { aircrafts.refill(carrierAmmo); this.carrierAmmo -= aircrafts.getAmmo(); } } public int getHealtPoint() { return this.healthPoint; } public int getCarrierAmmo() { return this.carrierAmmo; } public void fight(AircraftCarrier otherAircraftCarrier) { int sumDamageOfAttacker = 0; for (Aircraft aircrafts: carrierOfAircrafts) { sumDamageOfAttacker += aircrafts.fight(); } otherAircraftCarrier.healthPoint -= sumDamageOfAttacker; } public String getStatus() { int totalDamage = 0; String status =""; for (Aircraft aircrafts : carrierOfAircrafts) { totalDamage += aircrafts.getDamage(); } String statusOfAircrafts = ""; for (Aircraft aircrafts : carrierOfAircrafts) { statusOfAircrafts += aircrafts.getStatus(); } if (getHealtPoint() > 0) { status = "HP: " + getHealtPoint() + ", Aircraft count: " + carrierOfAircrafts.size() + ", Ammo Storage: " + getCarrierAmmo() + ", Total damage: " + totalDamage + "\nAircrafts:\n" + statusOfAircrafts; } else { status = "It's dead Jim :("; } return status; } }
[ "botond.balogh8@gmail.com" ]
botond.balogh8@gmail.com
0fd8bbe182ef39d15829f16f5cd7cd38e0604d34
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Time-3/org.joda.time.MutableDateTime/BBC-F0-opt-20/24/org/joda/time/MutableDateTime_ESTest_scaffolding.java
9db751e0ff26017b763cff748b8941a9d12d4ffa
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
22,785
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Oct 24 02:45:38 GMT 2021 */ package org.joda.time; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class MutableDateTime_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.joda.time.MutableDateTime"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.timezone", "Etc/UTC"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MutableDateTime_ESTest_scaffolding.class.getClassLoader() , "org.joda.time.DateTimeZone", "org.joda.time.field.AbstractPartialFieldProperty", "org.joda.time.field.StrictDateTimeField", "org.joda.time.convert.ConverterSet$Entry", "org.joda.time.DateTimeFieldType$StandardDateTimeFieldType", "org.joda.time.chrono.BasicChronology$HalfdayField", "org.joda.time.chrono.BasicChronology$YearInfo", "org.joda.time.field.UnsupportedDurationField", "org.joda.time.format.PeriodFormatterBuilder", "org.joda.time.format.DateTimePrinter", "org.joda.time.chrono.ISOChronology", "org.joda.time.base.BaseLocal", "org.joda.time.chrono.LenientChronology", "org.joda.time.format.PeriodFormatterBuilder$FieldFormatter", "org.joda.time.field.DividedDateTimeField", "org.joda.time.convert.DateConverter", "org.joda.time.chrono.ZonedChronology", "org.joda.time.format.DateTimeFormatterBuilder$TimeZoneOffset", "org.joda.time.field.BaseDateTimeField", "org.joda.time.field.ZeroIsMaxDateTimeField", "org.joda.time.base.BaseInterval", "org.joda.time.Duration", "org.joda.time.format.FormatUtils", "org.joda.time.format.PeriodFormatter", "org.joda.time.Interval", "org.joda.time.convert.LongConverter", "org.joda.time.base.AbstractInstant", "org.joda.time.tz.DateTimeZoneBuilder", "org.joda.time.format.DateTimeParserBucket", "org.joda.time.ReadWritablePeriod", "org.joda.time.convert.ConverterSet", "org.joda.time.LocalDateTime", "org.joda.time.tz.FixedDateTimeZone", "org.joda.time.format.PeriodPrinter", "org.joda.time.convert.IntervalConverter", "org.joda.time.field.PreciseDateTimeField", "org.joda.time.chrono.LimitChronology$LimitException", "org.joda.time.convert.ReadableDurationConverter", "org.joda.time.base.BaseDuration", "org.joda.time.field.DecoratedDateTimeField", "org.joda.time.Months", "org.joda.time.YearMonthDay", "org.joda.time.format.DateTimeParser", "org.joda.time.format.DateTimeFormatterBuilder$CharacterLiteral", "org.joda.time.chrono.GJChronology$CutoverField", "org.joda.time.LocalTime$Property", "org.joda.time.field.OffsetDateTimeField", "org.joda.time.DateTime$Property", "org.joda.time.convert.ReadablePeriodConverter", "org.joda.time.Years", "org.joda.time.convert.ReadableIntervalConverter", "org.joda.time.DateTimeField", "org.joda.time.field.FieldUtils", "org.joda.time.Partial", "org.joda.time.format.ISODateTimeFormat", "org.joda.time.field.SkipDateTimeField", "org.joda.time.base.AbstractPeriod", "org.joda.time.chrono.GJDayOfWeekDateTimeField", "org.joda.time.DateTimeUtils$SystemMillisProvider", "org.joda.time.IllegalInstantException", "org.joda.time.IllegalFieldValueException", "org.joda.time.format.DateTimeFormatterBuilder$Composite", "org.joda.time.format.DateTimeFormatterBuilder$UnpaddedNumber", "org.joda.time.field.ImpreciseDateTimeField$LinkedDurationField", "org.joda.time.ReadablePeriod", "org.joda.time.chrono.ZonedChronology$ZonedDateTimeField", "org.joda.time.chrono.GregorianChronology", "org.joda.time.convert.ConverterManager", "org.joda.time.chrono.GJChronology$LinkedDurationField", "org.joda.time.Minutes", "org.joda.time.format.DateTimeFormatterBuilder$PaddedNumber", "org.joda.time.chrono.BasicMonthOfYearDateTimeField", "org.joda.time.base.AbstractPartial", "org.joda.time.base.BasePartial", "org.joda.time.base.BaseDateTime", "org.joda.time.base.AbstractDuration", "org.joda.time.DateTimeUtils", "org.joda.time.base.AbstractInterval", "org.joda.time.Hours", "org.joda.time.LocalTime", "org.joda.time.base.BasePeriod", "org.joda.time.field.DecoratedDurationField", "org.joda.time.tz.DateTimeZoneBuilder$DSTZone", "org.joda.time.format.DateTimeFormat$1", "org.joda.time.TimeOfDay", "org.joda.time.format.ISOPeriodFormat", "org.joda.time.Partial$Property", "org.joda.time.field.ImpreciseDateTimeField", "org.joda.time.chrono.CopticChronology", "org.joda.time.field.PreciseDurationField", "org.joda.time.DateTimeUtils$FixedMillisProvider", "org.joda.time.tz.DateTimeZoneBuilder$OfYear", "org.joda.time.ReadableDuration", "org.joda.time.chrono.BasicGJChronology", "org.joda.time.format.DateTimeFormatterBuilder$NumberFormatter", "org.joda.time.format.DateTimeFormatter", "org.joda.time.DurationField", "org.joda.time.chrono.IslamicChronology$LeapYearPatternType", "org.joda.time.DateTime", "org.joda.time.format.PeriodFormatterBuilder$SimpleAffix", "org.joda.time.ReadWritableDateTime", "org.joda.time.convert.PeriodConverter", "org.joda.time.chrono.ZonedChronology$ZonedDurationField", "org.joda.time.Instant", "org.joda.time.format.PeriodFormatterBuilder$Separator", "org.joda.time.convert.CalendarConverter", "org.joda.time.chrono.LimitChronology$LimitDurationField", "org.joda.time.chrono.BasicDayOfYearDateTimeField", "org.joda.time.DurationFieldType$StandardDurationFieldType", "org.joda.time.chrono.BuddhistChronology", "org.joda.time.format.DateTimeFormatterBuilder$StringLiteral", "org.joda.time.tz.DateTimeZoneBuilder$Recurrence", "org.joda.time.format.ISODateTimeFormat$Constants", "org.joda.time.convert.ReadablePartialConverter", "org.joda.time.DateTimeUtils$MillisProvider", "org.joda.time.DateTimeUtils$OffsetMillisProvider", "org.joda.time.convert.Converter", "org.joda.time.chrono.GJYearOfEraDateTimeField", "org.joda.time.convert.PartialConverter", "org.joda.time.Seconds", "org.joda.time.field.RemainderDateTimeField", "org.joda.time.JodaTimePermission", "org.joda.time.chrono.BasicWeekOfWeekyearDateTimeField", "org.joda.time.DateTimeFieldType", "org.joda.time.format.DateTimeFormatterBuilder$Fraction", "org.joda.time.format.DateTimeFormatterBuilder$FixedNumber", "org.joda.time.MutableDateTime$Property", "org.joda.time.ReadableInterval", "org.joda.time.chrono.LimitChronology$LimitDateTimeField", "org.joda.time.tz.DateTimeZoneBuilder$PrecalculatedZone", "org.joda.time.field.LenientDateTimeField", "org.joda.time.base.AbstractDateTime", "org.joda.time.field.SkipUndoDateTimeField", "org.joda.time.convert.AbstractConverter", "org.joda.time.field.DelegatedDateTimeField", "org.joda.time.chrono.BasicChronology", "org.joda.time.chrono.BasicYearDateTimeField", "org.joda.time.format.DateTimeFormatterBuilder", "org.joda.time.chrono.EthiopicChronology", "org.joda.time.tz.CachedDateTimeZone$Info", "org.joda.time.PeriodType", "org.joda.time.field.MillisDurationField", "org.joda.time.chrono.GJChronology", "org.joda.time.chrono.IslamicChronology", "org.joda.time.chrono.BasicFixedMonthChronology", "org.joda.time.field.UnsupportedDateTimeField", "org.joda.time.field.ScaledDurationField", "org.joda.time.chrono.ISOYearOfEraDateTimeField", "org.joda.time.field.PreciseDurationDateTimeField", "org.joda.time.MutablePeriod", "org.joda.time.MutableDateTime", "org.joda.time.tz.CachedDateTimeZone", "org.joda.time.ReadableDateTime", "org.joda.time.format.PeriodFormatterBuilder$Literal", "org.joda.time.format.PeriodParser", "org.joda.time.DateMidnight", "org.joda.time.convert.DurationConverter", "org.joda.time.chrono.GJMonthOfYearDateTimeField", "org.joda.time.format.DateTimeParserBucket$SavedState", "org.joda.time.chrono.BasicWeekyearDateTimeField", "org.joda.time.Days", "org.joda.time.format.DateTimeFormatterBuilder$MatchingParser", "org.joda.time.chrono.BasicSingleEraDateTimeField", "org.joda.time.format.DateTimeFormat", "org.joda.time.chrono.LimitChronology", "org.joda.time.ReadableInstant", "org.joda.time.base.BaseSingleFieldPeriod", "org.joda.time.convert.NullConverter", "org.joda.time.tz.DefaultNameProvider", "org.joda.time.tz.Provider", "org.joda.time.chrono.AssembledChronology$Fields", "org.joda.time.DurationFieldType", "org.joda.time.ReadWritableInstant", "org.joda.time.tz.NameProvider", "org.joda.time.convert.ReadableInstantConverter", "org.joda.time.convert.StringConverter", "org.joda.time.convert.InstantConverter", "org.joda.time.chrono.AssembledChronology", "org.joda.time.chrono.StrictChronology", "org.joda.time.chrono.GJEraDateTimeField", "org.joda.time.tz.ZoneInfoProvider", "org.joda.time.DateTimeZone$1", "org.joda.time.chrono.BaseChronology", "org.joda.time.chrono.JulianChronology", "org.joda.time.Period", "org.joda.time.Weeks", "org.joda.time.Chronology", "org.joda.time.format.PeriodFormatterBuilder$Composite", "org.joda.time.field.AbstractReadableInstantFieldProperty", "org.joda.time.format.PeriodFormatterBuilder$PeriodFieldAffix", "org.joda.time.LocalDate", "org.joda.time.format.DateTimeParserBucket$SavedField", "org.joda.time.chrono.BasicDayOfMonthDateTimeField", "org.joda.time.ReadablePartial", "org.joda.time.chrono.GJChronology$ImpreciseCutoverField", "org.joda.time.field.BaseDurationField" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("org.joda.time.DateTimeUtils$MillisProvider", false, MutableDateTime_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.joda.time.format.DateTimeParser", false, MutableDateTime_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.joda.time.format.DateTimePrinter", false, MutableDateTime_ESTest_scaffolding.class.getClassLoader())); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MutableDateTime_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.joda.time.base.AbstractInstant", "org.joda.time.base.AbstractDateTime", "org.joda.time.base.BaseDateTime", "org.joda.time.MutableDateTime", "org.joda.time.field.AbstractReadableInstantFieldProperty", "org.joda.time.MutableDateTime$Property", "org.joda.time.format.DateTimeFormatterBuilder", "org.joda.time.DateTimeFieldType$StandardDateTimeFieldType", "org.joda.time.DurationFieldType$StandardDurationFieldType", "org.joda.time.DurationFieldType", "org.joda.time.DateTimeFieldType", "org.joda.time.format.DateTimeFormatterBuilder$NumberFormatter", "org.joda.time.format.DateTimeFormatterBuilder$PaddedNumber", "org.joda.time.format.DateTimeFormatter", "org.joda.time.format.DateTimeFormatterBuilder$CharacterLiteral", "org.joda.time.format.DateTimeFormatterBuilder$Composite", "org.joda.time.format.DateTimeFormatterBuilder$StringLiteral", "org.joda.time.format.DateTimeFormatterBuilder$UnpaddedNumber", "org.joda.time.format.DateTimeFormatterBuilder$Fraction", "org.joda.time.format.DateTimeFormatterBuilder$TimeZoneOffset", "org.joda.time.format.ISODateTimeFormat", "org.joda.time.format.DateTimeFormatterBuilder$FixedNumber", "org.joda.time.format.DateTimeFormatterBuilder$MatchingParser", "org.joda.time.tz.FixedDateTimeZone", "org.joda.time.tz.ZoneInfoProvider", "org.joda.time.tz.DefaultNameProvider", "org.joda.time.DateTimeZone", "org.joda.time.format.ISODateTimeFormat$Constants", "org.joda.time.DateTimeUtils$SystemMillisProvider", "org.joda.time.tz.DateTimeZoneBuilder", "org.joda.time.tz.DateTimeZoneBuilder$PrecalculatedZone", "org.joda.time.tz.DateTimeZoneBuilder$DSTZone", "org.joda.time.tz.DateTimeZoneBuilder$Recurrence", "org.joda.time.tz.DateTimeZoneBuilder$OfYear", "org.joda.time.tz.CachedDateTimeZone", "org.joda.time.DateTimeUtils", "org.joda.time.format.FormatUtils", "org.joda.time.Chronology", "org.joda.time.chrono.BaseChronology", "org.joda.time.chrono.AssembledChronology", "org.joda.time.DurationField", "org.joda.time.field.MillisDurationField", "org.joda.time.field.BaseDurationField", "org.joda.time.field.PreciseDurationField", "org.joda.time.DateTimeField", "org.joda.time.field.BaseDateTimeField", "org.joda.time.field.PreciseDurationDateTimeField", "org.joda.time.field.PreciseDateTimeField", "org.joda.time.field.DecoratedDateTimeField", "org.joda.time.field.ZeroIsMaxDateTimeField", "org.joda.time.chrono.BasicChronology$HalfdayField", "org.joda.time.chrono.BasicChronology", "org.joda.time.chrono.BasicGJChronology", "org.joda.time.chrono.AssembledChronology$Fields", "org.joda.time.field.ImpreciseDateTimeField", "org.joda.time.chrono.BasicYearDateTimeField", "org.joda.time.field.ImpreciseDateTimeField$LinkedDurationField", "org.joda.time.chrono.GJYearOfEraDateTimeField", "org.joda.time.field.OffsetDateTimeField", "org.joda.time.field.DividedDateTimeField", "org.joda.time.field.DecoratedDurationField", "org.joda.time.field.ScaledDurationField", "org.joda.time.field.RemainderDateTimeField", "org.joda.time.chrono.GJEraDateTimeField", "org.joda.time.chrono.GJDayOfWeekDateTimeField", "org.joda.time.chrono.BasicDayOfMonthDateTimeField", "org.joda.time.chrono.BasicDayOfYearDateTimeField", "org.joda.time.chrono.BasicMonthOfYearDateTimeField", "org.joda.time.chrono.GJMonthOfYearDateTimeField", "org.joda.time.chrono.BasicWeekyearDateTimeField", "org.joda.time.chrono.BasicWeekOfWeekyearDateTimeField", "org.joda.time.field.UnsupportedDurationField", "org.joda.time.chrono.GregorianChronology", "org.joda.time.chrono.ISOYearOfEraDateTimeField", "org.joda.time.chrono.ISOChronology", "org.joda.time.Instant", "org.joda.time.chrono.ZonedChronology", "org.joda.time.chrono.ZonedChronology$ZonedDurationField", "org.joda.time.chrono.ZonedChronology$ZonedDateTimeField", "org.joda.time.chrono.BasicChronology$YearInfo", "org.joda.time.DateTime", "org.joda.time.field.FieldUtils", "org.joda.time.IllegalFieldValueException", "org.joda.time.convert.ConverterManager", "org.joda.time.convert.ConverterSet", "org.joda.time.convert.AbstractConverter", "org.joda.time.convert.ReadableInstantConverter", "org.joda.time.convert.StringConverter", "org.joda.time.convert.CalendarConverter", "org.joda.time.convert.DateConverter", "org.joda.time.convert.LongConverter", "org.joda.time.convert.NullConverter", "org.joda.time.convert.ReadablePartialConverter", "org.joda.time.convert.ReadableDurationConverter", "org.joda.time.convert.ReadableIntervalConverter", "org.joda.time.convert.ReadablePeriodConverter", "org.joda.time.convert.ConverterSet$Entry", "org.joda.time.format.DateTimeParserBucket", "org.joda.time.DateTimeZone$Stub", "org.joda.time.chrono.GJChronology", "org.joda.time.base.AbstractPartial", "org.joda.time.base.BaseLocal", "org.joda.time.LocalDate", "org.joda.time.field.DelegatedDateTimeField", "org.joda.time.field.SkipDateTimeField", "org.joda.time.chrono.JulianChronology", "org.joda.time.chrono.GJChronology$CutoverField", "org.joda.time.chrono.GJChronology$ImpreciseCutoverField", "org.joda.time.chrono.GJChronology$LinkedDurationField", "org.joda.time.chrono.LenientChronology", "org.joda.time.field.LenientDateTimeField", "org.joda.time.chrono.BasicSingleEraDateTimeField", "org.joda.time.field.SkipUndoDateTimeField", "org.joda.time.chrono.LimitChronology", "org.joda.time.chrono.LimitChronology$LimitDurationField", "org.joda.time.chrono.LimitChronology$LimitDateTimeField", "org.joda.time.chrono.BuddhistChronology", "org.joda.time.base.BaseSingleFieldPeriod", "org.joda.time.format.ISOPeriodFormat", "org.joda.time.format.PeriodFormatterBuilder", "org.joda.time.format.PeriodFormatterBuilder$Literal", "org.joda.time.format.PeriodFormatterBuilder$FieldFormatter", "org.joda.time.format.PeriodFormatterBuilder$SimpleAffix", "org.joda.time.format.PeriodFormatterBuilder$Composite", "org.joda.time.format.PeriodFormatterBuilder$Separator", "org.joda.time.format.PeriodFormatter", "org.joda.time.PeriodType", "org.joda.time.Days", "org.joda.time.Weeks", "org.joda.time.chrono.BasicFixedMonthChronology", "org.joda.time.chrono.CopticChronology", "org.joda.time.format.DateTimeParserBucket$SavedState", "org.joda.time.chrono.StrictChronology", "org.joda.time.field.StrictDateTimeField", "org.joda.time.field.UnsupportedDateTimeField", "org.joda.time.chrono.IslamicChronology$LeapYearPatternType", "org.joda.time.chrono.IslamicChronology", "org.joda.time.base.BasePartial", "org.joda.time.YearMonth", "org.joda.time.base.AbstractPeriod", "org.joda.time.base.BasePeriod$1", "org.joda.time.base.BasePeriod", "org.joda.time.Period", "org.joda.time.LocalDateTime", "org.joda.time.chrono.EthiopicChronology", "org.joda.time.LocalTime", "org.joda.time.base.AbstractDuration", "org.joda.time.base.BaseDuration", "org.joda.time.Duration", "org.joda.time.Partial", "org.joda.time.tz.UTCProvider", "org.joda.time.Seconds", "org.joda.time.MutablePeriod", "org.joda.time.Hours", "org.joda.time.Minutes", "org.joda.time.DateTimeUtils$OffsetMillisProvider", "org.joda.time.chrono.LimitChronology$LimitException", "org.joda.time.chrono.GJLocaleSymbols", "org.joda.time.base.AbstractInterval", "org.joda.time.base.BaseInterval", "org.joda.time.Interval", "org.joda.time.format.DateTimeFormat$1", "org.joda.time.format.DateTimeFormat", "org.joda.time.MonthDay", "org.joda.time.Years", "org.joda.time.MutableInterval", "org.joda.time.DateTimeZone$1", "org.joda.time.DateTime$Property", "org.joda.time.format.DateTimeParserBucket$SavedField", "org.joda.time.Months", "org.joda.time.DateTimeUtils$FixedMillisProvider", "org.joda.time.format.DateTimeFormatterBuilder$TimeZoneName", "org.joda.time.LocalDate$Property", "org.joda.time.tz.CachedDateTimeZone$Info", "org.joda.time.format.DateTimeFormatterBuilder$TextField", "org.joda.time.LocalDateTime$Property", "org.joda.time.LocalTime$Property", "org.joda.time.IllegalInstantException", "org.joda.time.field.AbstractPartialFieldProperty", "org.joda.time.Partial$Property" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
245403c39c7432581925f77ee964d1d9663ac59f
732182a102a07211f7c1106a1b8f409323e607e0
/gsd/externs/cfg/equip/AnnealBonus.java
23c99e2d384e7eb9a27ba3e179a1e265d7b888e5
[]
no_license
BanyLee/QYZ_Server
a67df7e7b4ec021d0aaa41cfc7f3bd8c7f1af3da
0eeb0eb70e9e9a1a06306ba4f08267af142957de
refs/heads/master
2021-09-13T22:32:27.563172
2018-05-05T09:20:55
2018-05-05T09:20:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
498
java
package cfg.equip; public final class AnnealBonus extends cfg.CfgObject { public final static int TYPEID = 1317540776; final public int getTypeId() { return TYPEID; } public final int id; public final String name; public final java.util.List<cfg.equip.BonusData> bonus = new java.util.ArrayList<>(); public AnnealBonus(cfg.DataStream fs) { this.id = fs.getInt(); this.name = fs.getString(); for(int n = fs.getInt(); n-- > 0 ; ) { this.bonus.add(new cfg.equip.BonusData(fs)); } } }
[ "hadowhadow@gmail.com" ]
hadowhadow@gmail.com
3cbf698f38040858f9411c3956da1466ef8b6483
fad2e8aa5b2adc617f238f5f5c24ff63682e8784
/hexagonal-architecture/src/main/java/com/account/service/repository/command/InsertAccountCommand.java
c19f0b612f22e02ffac252cf3161bd77253249fa
[ "MIT" ]
permissive
mmanipradeep/tutorials
4798f89de8b5706703894b31a6446712c123967b
3a55113ea05a5891871600afa8a6d4a68edc9d27
refs/heads/master
2023-08-21T19:14:36.995981
2021-10-06T05:45:44
2021-10-06T05:45:44
412,790,454
0
0
MIT
2021-10-02T12:30:59
2021-10-02T12:30:58
null
UTF-8
Java
false
false
309
java
package com.account.service.repository.command; import lombok.Builder; import lombok.Value; import lombok.With; import java.math.BigInteger; @Value @Builder @With public class InsertAccountCommand { private String accountId; private String name; private String owner; private BigInteger balance; }
[ "mani.pradeep@capgemini.com" ]
mani.pradeep@capgemini.com
506aa641e0fcfc4da3e6b7149ca32e5b09c14a00
3d539f686f182b718ff323399976e7e28d5ef675
/src/main/java/com/dprill/controledeponto/ControledepontoApplication.java
ca383780fa7a3c3fc0713ad345b4fce103621bad
[]
no_license
Daniel-Prill/controledeponto
3b5722fcd43a6297d336f21a5d7a03a6690d879f
24985f72e437ca465d451e0819d5d79e9c5d993c
refs/heads/master
2023-07-03T01:48:18.747319
2021-08-05T22:31:37
2021-08-05T22:31:37
390,543,841
0
0
null
null
null
null
UTF-8
Java
false
false
337
java
package com.dprill.controledeponto; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ControledepontoApplication { public static void main(String[] args) { SpringApplication.run(ControledepontoApplication.class, args); } }
[ "danielprilldealmeida@gmail.com" ]
danielprilldealmeida@gmail.com
542c413d1375f7a48956af10c84e2b2fe35cd5ce
d94e03b6d62b7936cdc1762c62fa913efba7262e
/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/PatchVariablesDto.java
a4ef130fcf689926d8c2e79f04ba6ea871bba6fe
[ "Apache-2.0" ]
permissive
jbellmann/camunda-bpm-platform
38499807c735168f216fd4065a2003a5527890ab
759b479b95b904da16166e52d536cf420de46fba
refs/heads/master
2021-01-25T02:38:02.719441
2013-06-03T09:43:04
2013-06-03T09:43:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,204
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.camunda.bpm.engine.rest.dto; import java.util.List; import org.camunda.bpm.engine.rest.dto.runtime.VariableValueDto; /** * @author Thorben Lindhauer */ public class PatchVariablesDto { private List<VariableValueDto> modifications; private List<String> deletions; public List<VariableValueDto> getModifications() { return modifications; } public void setModifications(List<VariableValueDto> modifications) { this.modifications = modifications; } public List<String> getDeletions() { return deletions; } public void setDeletions(List<String> deletions) { this.deletions = deletions; } }
[ "thorben.lindhauer@student.hpi.uni-potsdam.de" ]
thorben.lindhauer@student.hpi.uni-potsdam.de
c0fdbeef2385b325502e239ef2d71fa3f4c2e6c8
690fec1a69f4dc66a3830d52d36ac44210f41b45
/Complex/src/com/complex/Complex.java
33133a2744a5d84bfbafbb5d69b1e26643295e45
[]
no_license
fiskirton/JavaCourse
eda6e27effaaefd326cb53b587cdbce17fba07a5
129dca8a76963e028351684a171537019e502f7c
refs/heads/master
2021-04-23T20:53:22.567460
2020-05-19T17:18:01
2020-05-19T17:19:15
250,001,892
0
0
null
null
null
null
UTF-8
Java
false
false
1,524
java
package com.complex; public class Complex { private double real; private double imag; public Complex(double real, double imag){ this.real = real; this.imag = imag; } public double getReal() { return real; } public double getImag() { return imag; } public Complex sum(Complex right_operand){ double res_real = this.real + right_operand.real; double res_imag = this.imag + right_operand.imag; return new Complex(res_real, res_imag); } public Complex mul(Complex right_operand){ double res_real = this.real * right_operand.real - this.imag * right_operand.imag; double res_imag = this.real * right_operand.imag + this.imag * right_operand.real; return new Complex(res_real, res_imag); } public String printGeom(){ double r = Math.sqrt(this.real * this.real + this.imag * this.imag); double phi = Math.acos(Math.cos(this.real / r)); String format_string = "%.2f(cos(%2$.2f)+isin(%2$.2f))"; return String.format(format_string, r, phi); } public String toString(){ String format_string; if (this.imag == 0){ format_string = "%.2f"; return String.format(format_string, this.real); }else { format_string = "%.2f%+.2fi"; return String.format(format_string, this.real, this.imag); } } }
[ "sodaeffect977@gmail.com" ]
sodaeffect977@gmail.com
42b12ebb8832992db3c0245d9a6f1f11ce2a2df9
040b772e065bd82d0800673729a607adf98a91ce
/UD2/5-AccountProiektua/src/main/java/GastatuTaGastatu.java
661ee307b2a6dbb5e7f193de8e9ea52dd0cb628d
[]
no_license
beviga99/program20-21
8e8e4175a58f4bf0f1f5ea645e6c030dacc8bced
6994c00f4740fa9c12627d6be972ad48b4f68dc2
refs/heads/master
2023-04-06T21:25:07.219217
2021-04-26T06:31:09
2021-04-26T06:31:09
317,489,186
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
public class GastatuTaGastatu { public static void main(String[] args) { Account ac1 = new Account("1111", "Beñat", 1000); int count = 0; int dirua = 150; while(ac1.getBalance() > 150){ ac1.Debit(dirua); count++; } System.out.println("Triste nago; "+ dirua + " euro atera dut "+ count + " aldiz eta orain "+ ac1.getBalance() + " euro besterik ez zait geratzen kontuan."); } }
[ "vilarchao.benat@HP-PROBOOK-11.uni.lan" ]
vilarchao.benat@HP-PROBOOK-11.uni.lan
57a58f937462c8707370f3a3ddb020beee6af8b6
11f8ead88a9b02959c5cf9a7eee27084259519a0
/src/main/java/carpet/mixins/TrapezoidHeightProvider_cleanLogsMixin.java
4c024ba4c6483ad4212a1f990ec65124af58d41e
[ "MIT" ]
permissive
DichuuCraft/fabric-carpet
0d90c7a9e5500eb35c4d650901f4d94c73dd542b
157f76ced08f76b741d2bfb0335d8b106fe23f28
refs/heads/master
2023-08-09T23:15:57.253430
2022-02-26T06:49:36
2022-02-26T06:49:36
249,002,188
2
2
MIT
2022-03-09T11:28:02
2020-03-21T15:17:03
Java
UTF-8
Java
false
false
766
java
package carpet.mixins; import carpet.CarpetSettings; import net.minecraft.world.gen.heightprovider.TrapezoidHeightProvider; import org.apache.logging.log4j.Logger; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(TrapezoidHeightProvider.class) public class TrapezoidHeightProvider_cleanLogsMixin { @SuppressWarnings("UnresolvedMixinReference") @Redirect(method = "get", at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V") ) private void skipLogs(Logger logger, String message, Object p0) { if (!CarpetSettings.cleanLogs) logger.warn(message, p0); } }
[ "gnembonmc@gmail.com" ]
gnembonmc@gmail.com
27cde184d716ccbf470790e11d74f9478088a3bf
59c05c33eff80675d705975b4268d1931bf8e367
/dk.sdu.mdsd.parserGenerator/src/dk/sdu/mdsd/CSVParserGeneratorRuntimeModule.java
859ff12f0c5d533f89a42fbe9f83b63f63f98bbe
[]
no_license
emiljohansen/MDSD-Coeus
07224416f6b69f4464bb5fb84199fdecdf611f52
b35cec08f1ba3d7838a8a8efeea859f24b6a672f
refs/heads/main
2023-05-06T23:20:58.799732
2021-06-01T15:08:30
2021-06-01T15:08:30
363,751,521
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
/* * generated by Xtext 2.21.0 */ package dk.sdu.mdsd; /** * Use this class to register components to be used at runtime / without the Equinox extension registry. */ public class CSVParserGeneratorRuntimeModule extends AbstractCSVParserGeneratorRuntimeModule { }
[ "emil@florint.dk" ]
emil@florint.dk
fde78f627de62c9374ba05335c0f540af4907b5c
f7ecf907b8e97f29eb8ad6c2c67989b213684c03
/src/test/java/com/javafortesters/methodsforexercises/Methods.java
31aabdcf78b9cd333d360a353c7124431faef7ff
[]
no_license
TKFisher/EvilTestersProject
0f70ef2d361b75aaf976eea5b84f42cf4110bec8
04d36adb798af03fc40c89b8b38af9dc9a574355
refs/heads/master
2021-01-22T23:26:26.101981
2017-10-22T17:32:46
2017-10-22T17:32:46
85,638,526
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
package com.javafortesters.methodsforexercises; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class Methods { public static void submitButtonClick(WebDriver driver) { WebElement submitButtonBasicHTMLPage; submitButtonBasicHTMLPage = driver.findElement(By.cssSelector("input[name='submitbutton'][value='submit']")); submitButtonBasicHTMLPage.click(); } }
[ "tracy.k.fisher@gmail.com" ]
tracy.k.fisher@gmail.com
4b8418994108a89322d33ca8d74206900352ff97
9cdf54283032b63f36b698a6659ffd851ceb26f1
/src/FRC867/Nano2014/commands/ToggleCompressor.java
f726b06385c289c47e6cc8d104f05f581c66509f
[]
no_license
FRC867/Nano2014
fc492b798546ff6edebf8bf2af6914a69a9bd7c2
5a0cb8703946eaf0b70f8de976ce9c6c2cc55c59
refs/heads/master
2021-01-10T19:51:37.888972
2014-03-18T15:28:16
2014-03-18T15:28:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,228
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package FRC867.Nano2014.commands; /** * * @author Team-867 */ public class ToggleCompressor extends CommandBase { public ToggleCompressor() { // Use requires() here to declare subsystem dependencies // eg. requires(chassis); requires(compressor); } // Called just before this Command runs the first time protected void initialize() { } // Called repeatedly when this Command is scheduled to run protected void execute() { if(compressor.Started()){ compressor.Stop(); }else{ compressor.Start(); } } // Make this return true when this Command no longer needs to run execute() protected boolean isFinished() { return true; } // Called once after isFinished returns true protected void end() { } // Called when another command which requires one or more of the same // subsystems is scheduled to run protected void interrupted() { } }
[ "Team-867@HS-Robotics-867" ]
Team-867@HS-Robotics-867
def55a595b88037e6e0680626bb0870113f90025
8e03a2d3a5554a7193a5fdb22afdcefe634878cb
/Webflux/lib/org/springframework/web/reactive/ServerHttpRequest$Builder.java
3f14f4507f5693ea121832b7f26b780db0852163
[]
no_license
iathanasy/notes
586ae05f0f270307e87e1be8ed009bfa30bb67a7
e6eced651f86759ed881a4145b71f340a0493688
refs/heads/master
2023-08-03T00:58:16.035557
2021-09-29T02:01:11
2021-09-29T02:01:11
414,809,012
1
0
null
2021-10-08T01:33:56
2021-10-08T01:33:56
null
IBM852
Java
false
false
533
java
-------------------- Builder -------------------- # ServerHttpRequest─┌▓┐ŻË┐┌ interface Builder -------------------- this -------------------- Builder method(HttpMethod httpMethod); Builder uri(URI uri); Builder path(String path); Builder contextPath(String contextPath); Builder header(String headerName, String... headerValues); Builder headers(Consumer<HttpHeaders> headersConsumer); Builder sslInfo(SslInfo sslInfo); Builder remoteAddress(InetSocketAddress remoteAddress); ServerHttpRequest build();
[ "747692844@qq.com" ]
747692844@qq.com
22030a6560b11b8ccc78bab95e3c245f99ee79e1
89466d3e0178471ea671909d9bab6b68d1bbfb60
/usms/src/main/java/edu/config/Result.java
da73acb09b32582553840b96abc2c1b53773c883
[]
no_license
wxy199709/code
01bb42c2430ce6e5fd60f6e6279b69489402b06c
7e3fa8667f982abd2cb51ccd67533fcc0015ee9b
refs/heads/master
2023-02-26T18:27:55.340235
2021-02-04T09:49:07
2021-02-04T09:49:07
335,856,050
1
0
null
null
null
null
UTF-8
Java
false
false
572
java
package edu.config; import java.util.HashMap; public class Result { public static final String success = "200"; public static final String fail = "-1"; public static final String msg = "操作成功"; public static final String failMsg = "操作失败"; private static HashMap<String,Object> result = new HashMap<String,Object>(); public static HashMap<String,Object> make(String code,String msg,Object data){ result.put("code", code); result.put("msg", msg); result.put("data", data); return result; } }
[ "2794242661@qq.com" ]
2794242661@qq.com
7236c173b59145da6ffed8b39d815a4df4df31b5
f29a14ec5be082de66630aef47b20590da109c0e
/src/main/java/sec/project/domain/Account.java
8f84d17250bd8bd0bf4499c4560afc8a829b3fb7
[]
no_license
villeverkkonen/cybersecuritybase-project
0c3f39b8be962a3bd18f64332238b776b54f860c
97b0628cdce80861f30bcd7b024608640cdb3593
refs/heads/master
2021-01-12T00:24:36.813817
2017-01-18T23:32:51
2017-01-18T23:32:51
78,720,640
0
0
null
2017-01-12T07:36:56
2017-01-12T07:36:56
null
UTF-8
Java
false
false
742
java
package sec.project.domain; import java.util.UUID; import javax.persistence.Entity; import org.springframework.data.jpa.domain.AbstractPersistable; @Entity public class Account extends AbstractPersistable<Long> { private double amount; private String accountCode; public Account() { this.amount = 100.0; this.accountCode = UUID.randomUUID().toString(); } public double getAmount() { return amount; } public void setAmount(double amount) { this.amount = amount; } public String getAccountCode() { return accountCode; } public void setAccountCode(String accountCode) { this.accountCode = accountCode; } }
[ "villeverkkonen@gmail.com" ]
villeverkkonen@gmail.com
9c97b18447a43c52bd4c6c03e8845267405640b1
64a69feb5a1681bcfa490e0bf7c0999581dfafef
/src/main/java/com/example/heartbeat/heartbeatdemo/HeartbeatDemoApplication.java
fa56a9d50d0fb1602086437171cb79ef09767840
[]
no_license
tonytanCoder/heartbeat-demo
f560590a2501a2e832f8ffaa92f22ca5420e7626
03e36e388bf0de4f9f5f3ccc468ef7397c57a82d
refs/heads/master
2020-07-08T03:09:30.991001
2019-08-21T10:11:13
2019-08-21T10:11:13
203,548,183
0
0
null
2019-10-30T01:07:26
2019-08-21T09:10:11
Java
UTF-8
Java
false
false
342
java
package com.example.heartbeat.heartbeatdemo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class HeartbeatDemoApplication { public static void main(String[] args) { SpringApplication.run(HeartbeatDemoApplication.class, args); } }
[ "tanzanlong@lotussaid.com" ]
tanzanlong@lotussaid.com
94645d15037f01b20a3ba973a363eae9938631aa
b78646cbf7a7f58918d4486ec805e2b04f6cc602
/app/src/main/java/com/eex/home/bean/Subordinate.java
6f428915b64d3f7ec487a7f0873c5aabf6374e6b
[]
no_license
qingyuyefeng/eex
3944df80bd7b22e3891fc0d7669ed0a473df55d9
3b1df7705b6e35d1ee62d4801d38fdc83d3e970d
refs/heads/master
2020-12-15T07:52:33.399946
2020-01-20T09:23:36
2020-01-20T09:23:36
235,034,114
0
0
null
null
null
null
UTF-8
Java
false
false
1,912
java
package com.eex.home.bean; /** * _ooOoo_ * o8888888o * 88" . "88 * (| -_- |) * O\ = /O * ____/`---'\____ * . ' \\| |// `. * / \\||| : |||// \ * / _||||| -:- |||||- \ * | | \\\ - /// | | * | \_| ''\---/'' | | * \ .-\__ `-` ___/-. / * ___`. .' /--.--\ `. . __ * ."" '< `.___\_<|>_/___.' >'"". * | | : `- \`.;`\ _ /`;.`/ - ` : | | * \ \ `-. \_ __\ /__ _/ .-` / / * ======`-.____`-.___\_____/___.-`____.-'====== * `=---=' * <p> * ............................................. * 佛祖保佑 永无BUG * * @ProjectName: OverThrow * @Package: com.overthrow.home.bean * @ClassName: Subordinate * @Description: java类作用描述 * @Author: 胡成军 * @CreateDate: 2019/5/23 15:19 * @UpdateUser: 更新者 * @UpdateDate: 2019/5/23 15:19 * @UpdateRemark: 更新说明 * @Version: 1.0 */ public class Subordinate{ /** * id : 9e773f0b650440ae9011ba947304027d * bannerName : 24小时在线 * path : 2018-09-20/8ab047efc47341bbac6f0d504146693d * outsideAddr : null * sortNo : 1 * status : 0 * type : 0 */ /** * id */ private String id; /** * banner 名称 */ private String bannerName; /** * 路径 */ private String path; /** * 外连地址 */ private String outsideAddr; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getBannerName() { return bannerName; } public void setBannerName(String bannerName) { this.bannerName = bannerName; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } public String getOutsideAddr() { return outsideAddr; } public void setOutsideAddr(String outsideAddr) { this.outsideAddr = outsideAddr; } }
[ "97667024@qq.com" ]
97667024@qq.com
e1a286a3be807bf7f66f6828c145cdba5bb83c02
0c3fbd681efd00907a4f1d3a471b0cc5a6293b82
/src/main/java/it/soundmate/logiccontrollers/SoloProfileSoloController.java
92a9ded75dd74c6ab53c33982c0600ca0438acdd
[]
no_license
SoundMate/Soundmate
510abec47f5766382210c73810d3e3177e5048f5
7181cb90a2362a17ccaf82a152a9e96346f5b811
refs/heads/main
2023-02-04T04:42:07.046358
2020-12-18T13:47:05
2020-12-18T13:47:05
306,308,946
0
0
null
null
null
null
UTF-8
Java
false
false
2,036
java
/* * Copyright (c) 2020. * This file was created by Soundmate organization Lorenzo Pantano & Matteo D'Alessandro * Last Modified: 12/12/20, 19:39 */ package it.soundmate.logiccontrollers; import it.soundmate.database.SoloDao; import it.soundmate.database.UserDao; import it.soundmate.model.Solo; import it.soundmate.model.User; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; public class SoloProfileSoloController { private final SoloDao soloDao = SoloDao.getInstance(); private final UserDao userDao = UserDao.getInstance(); /*Singleton*/ private static SoloProfileSoloController instance = null; public static SoloProfileSoloController getInstance() { if (instance == null) { instance = new SoloProfileSoloController(); } return instance; } public Solo getSoloByUser(User user) { return soloDao.getSoloByUser(user); } public boolean addGenre(String genre, Solo solo) { return soloDao.addGenreToSolo(genre, solo); } public boolean updateEmail(Solo solo, String email) { return userDao.updateEmail(solo, email); } public boolean updatePassword(Solo solo, String password) { return userDao.updatePassword(solo, password); } public boolean updateFirstName(Solo solo, String firstName) { return userDao.updateFirstName(solo, firstName); } public boolean updateLastName(Solo solo, String lastName) { return userDao.updateLastName(solo, lastName); } public boolean saveProfilePicToDB(File image, int userID) { try { InputStream inputStream = new FileInputStream(image); return userDao.saveProfilePicForUser(inputStream, userID); } catch (FileNotFoundException e) { e.printStackTrace(); return false; } } public boolean deleteAccount(Solo solo) { return userDao.deleteUser(solo); } }
[ "49166985+LorenzoPantano@users.noreply.github.com" ]
49166985+LorenzoPantano@users.noreply.github.com
6223807b47399251f840b0051a6a8c160d8ef5e5
e8cdbe03d2e4c11262d51fdb3e9368adec0d1487
/app/src/main/java/com/tmsfalcon/device/tmsfalcon/activities/ReportedAccidentScreenOne.java
f27109d288577afe1b5955a99c81f7e1e4730af7
[]
no_license
yuvraj3822/tmsfalcon
a6a642a775f59978065afdf025a299e9ae947eb0
fc8c41f815c66ed5da52a1a645555908fc4072dc
refs/heads/master
2023-04-23T03:53:18.750047
2021-05-07T10:43:33
2021-05-07T10:43:33
365,132,995
0
0
null
null
null
null
UTF-8
Java
false
false
1,533
java
package com.tmsfalcon.device.tmsfalcon.activities; import android.content.Context; import android.content.Intent; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import com.tmsfalcon.device.tmsfalcon.NavigationBaseActivity; import com.tmsfalcon.device.tmsfalcon.R; import com.tmsfalcon.device.tmsfalcon.customtools.ZoomLinearLayout; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; public class ReportedAccidentScreenOne extends NavigationBaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View contentView = inflater.inflate(R.layout.activity_reported_accident_screen_one, null, false); drawer.addView(contentView, 0); ButterKnife.bind(this); zoom_linear_layout.init(ReportedAccidentScreenOne.this); /*zoom_linear_layout.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { return false; } });*/ } @Bind(R.id.zoom_linear_layout) ZoomLinearLayout zoom_linear_layout; @OnClick(R.id.next_btn) void goToNext(){ Intent i = new Intent(ReportedAccidentScreenOne.this,ReportedAccidentScreenTwo.class); startActivity(i); } }
[ "amandeep.tmsfalcon@gmail.com" ]
amandeep.tmsfalcon@gmail.com
af6509e390c8ea243a305270c730bb7736783a97
a8a7cc6bae2a202941e504aea4356e2a959e5e95
/jenkow-activiti/modules/activiti-bpmn-model/src/main/java/org/activiti/bpmn/model/StartEvent.java
0cb3fd2eb05f191715fe20180ebf5ce0b5c8c3b9
[ "Apache-2.0" ]
permissive
jenkinsci/jenkow-plugin
aed5d5db786ad260c16cebecf5c6bbbcbf498be5
228748890476b2f17f80b618c8d474a4acf2af8b
refs/heads/master
2023-08-19T23:43:15.544100
2013-05-14T00:49:56
2013-05-14T00:49:56
4,395,961
2
4
null
2022-12-20T22:37:41
2012-05-21T16:58:26
Java
UTF-8
Java
false
false
1,332
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.bpmn.model; import java.util.ArrayList; import java.util.List; /** * @author Tijs Rademakers */ public class StartEvent extends Event { protected String initiator; protected String formKey; protected List<FormProperty> formProperties = new ArrayList<FormProperty>(); public String getInitiator() { return initiator; } public void setInitiator(String initiator) { this.initiator = initiator; } public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } public List<FormProperty> getFormProperties() { return formProperties; } public void setFormProperties(List<FormProperty> formProperties) { this.formProperties = formProperties; } }
[ "m2spring@springdot.org" ]
m2spring@springdot.org
923f007717bb739a27c03a1271205963c5ba735f
e9cb4b66930b0196ccc72e3ab8cbcaf712cb1485
/src/test/java/com/rock/paper/scissors/game/service/player/simulator/DetermenisticPlayerActionSimulatorTest.java
6af94381381870ecdf2b5033b5e9e5628e99f20b
[]
no_license
tarasmurzenkovv/rock-paper-scissors
ae1fca0a0e94b8896a4138ab4bb7bf4275e90a4b
b8482e2e617a4680df8734d4cb5ae26194c4c9df
refs/heads/master
2022-04-09T09:15:10.838514
2020-03-07T23:06:23
2020-03-07T23:06:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,102
java
package com.rock.paper.scissors.game.service.player.simulator; import com.rock.paper.scissors.game.model.PlayerAction; import com.rock.paper.scissors.game.service.PlayerActionSimulator; import com.rock.paper.scissors.game.service.impl.player.simulator.DetermenisticPlayerActionSimulator; import com.rock.paper.scissors.game.service.impl.random.generators.OnlyOneValueProvider; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; public class DetermenisticPlayerActionSimulatorTest { private static final String PLAYER_NAME = "Player 1"; private final PlayerActionSimulator sut = DetermenisticPlayerActionSimulator.of(PLAYER_NAME, new OnlyOneValueProvider()); @Test public void shouldReturnRockActionForNonRandomActionGenerator() { Assertions.assertThat(sut.generate()) .isNotNull() .isEqualTo(PlayerAction.ROCK); } @Test public void shouldGetPlayerName() { Assertions.assertThat(sut.name()) .isNotNull() .isNotBlank() .isEqualTo(PLAYER_NAME); } }
[ "murzenkovtn@gmail.com" ]
murzenkovtn@gmail.com
399d28ef1cf1f80aaf80763b9593fbdb429a58bc
7b3bf8caedb1a6c27d67b64778fc5e8cd6fd6752
/src/main/java/com/logdb/mapper/RequestMapper.java
b32faa32ba57b96bee08483c5a722c0e04494892
[]
no_license
grigoriosdimopoulos/logdb
aadab162a502b27084283cf422b6e71ced53634f
1845d73e401a15da081221440189cfa3bb0f14f9
refs/heads/master
2020-09-06T14:46:48.580104
2019-11-26T13:34:47
2019-11-26T13:34:47
220,455,526
0
1
null
null
null
null
UTF-8
Java
false
false
214
java
package com.logdb.mapper; import com.logdb.dto.RequestDto; import com.logdb.entity.Request; public interface RequestMapper { Request convert(RequestDto requestDto); RequestDto convert(Request request); }
[ "grigoriosdimopoulos@camelotls.com" ]
grigoriosdimopoulos@camelotls.com
cc799542f2ec11995a7e16305875658b62ad94ba
0bb7ab718bea3e6151686ed97b1336f4178e7a09
/cloud-parent/cloud-study/data-jpa/src/main/java/cn/lianxf/cloud/jpa/repository/SoftProductRepository.java
f37ca17212c0691537cafc0d26304cfa02e7abde
[]
no_license
lianxf/cloud-study
5e58ad416c2fe30281574489e6fa5c2e6ebff8c4
b3e66272ca2687fcf1e18c6bfe1421fc5c51807c
refs/heads/master
2023-09-03T00:18:33.807327
2021-09-20T13:59:44
2021-09-20T13:59:44
396,063,084
0
0
null
null
null
null
UTF-8
Java
false
false
1,679
java
package cn.lianxf.cloud.jpa.repository; import cn.lianxf.cloud.jpa.controller.vo.MaterialReleaseVO; import cn.lianxf.cloud.jpa.entity.SoftProduct; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import java.util.List; /** * @className SoftProductRepository * @description 发布信息Repository * @date 2021/7/31 下午2:25 * @author little * @version 1.0.0 */ @Repository public interface SoftProductRepository extends JpaRepository<SoftProduct, String>, JpaSpecificationExecutor<SoftProduct> { /** * <p> Description: 根据流程实例ID删除</p> * @author little * @date 下午2:30 2021/7/31 * @param flowInstId 流程实例ID * @return 删除条数 */ int deleteByFlowInstId(String flowInstId); /** * <p> Description: 根据流程实例和taskId查询</p> * @author little * @date 下午12:31 2021/8/8 * @param flowInstId 流程实例ID * @param taskId 环节定义ID * @return java.util.List<cn.lianxf.cloud.jpa.cn.lianxf.cloud.entity.SoftProduct> */ List<SoftProduct> findByFlowInstIdAndTaskId(String flowInstId, String taskId); @Query(value = "select new cn.lianxf.cloud.jpa.controller.vo.MaterialReleaseVO(t.flowInstId, t.materialCode, " + "m.status) from SoftProduct t left join MaterialRelease m on t.materialCode = m.materialCode " + "where t.deleted = false and t.flowInstId = :flowInstId") List<MaterialReleaseVO> materialList(String flowInstId); }
[ "lianxfly@163.com" ]
lianxfly@163.com
b6c05fa07a87796ff9c19553d56cd7f937e80811
8d0dbb7843ba09ca9adc930e3c7024bad395f816
/src/main/java/AST/ASTCommonExpression.java
e9d934cad216ccea6ac818fc48e347a88ad2f33e
[]
no_license
tjgykhulj/Compiler-llvm
0a869ad5683c039d57740ebe9d1b09f04d7b7c49
73462f18545b98ef81de221145c98751b35ce4eb
refs/heads/master
2021-01-10T02:41:24.141801
2015-12-27T12:35:52
2015-12-27T12:35:52
48,560,792
0
0
null
null
null
null
UTF-8
Java
false
false
2,324
java
package AST; import org.llvm.Value; import AST.ASTContent; import AST.ASTContext; import AST.MyLang; import AST.SimpleNode; /* Generated By:JJTree: Do not edit this line. ASTCommonExpression.java Version 4.3 */ /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=false,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ public class ASTCommonExpression extends SimpleNode { public ASTCommonExpression(int id) { super(id); } public ASTCommonExpression(MyLang p, int id) { super(p, id); } public ASTContent code_gen(ASTContext context) throws Exception { ASTContent L = ((SimpleNode) children[0]).code_gen(context).getPValue(); if ((children.length & 1) == 0) throw new Exception("Length error."); for (int i = 1; i < children.length; i += 2) { SimpleNode c0 = (SimpleNode) children[i]; SimpleNode c1 = (SimpleNode) children[i + 1]; if (c0.code_gen(context).type != OPT) throw new Exception("Expect a opt"); int op = c0.jjtGetValue().toString().charAt(0); Value RV = c1.code_gen(context).castTo(L.type); String name = String.valueOf(++cnt); if (L.type == FLOAT_LITERAL) { switch (op) { case '+': L = new ASTContent(MyLang.builder.buildFAdd(L.value, RV, name), L.type); break; case '-': L = new ASTContent(MyLang.builder.buildFSub(L.value, RV, name), L.type); break; case '*': L = new ASTContent(MyLang.builder.buildFMul(L.value, RV, name), L.type); break; case '/': L = new ASTContent(MyLang.builder.buildFDiv(L.value, RV, name), L.type); break; case '%': throw new Exception("Error float %."); } } else { switch (op) { case '+': L = new ASTContent(MyLang.builder.buildAdd(L.value, RV, name), L.type); break; case '-': L = new ASTContent(MyLang.builder.buildSub(L.value, RV, name), L.type); break; case '*': L = new ASTContent(MyLang.builder.buildMul(L.value, RV, name), L.type); break; case '/': L = new ASTContent(MyLang.builder.buildSDiv(L.value, RV, name), L.type); break; case '%': L = new ASTContent(MyLang.builder.buildSRem(L.value, RV, name), L.type); break; } } } return L; } } /* JavaCC - OriginalChecksum=76b25156e332ec9226db9ae858171d79 (do not edit this line) */
[ "tjg-6666@163.com" ]
tjg-6666@163.com
0944e4a312f6d62c5addca704602d77bbd5dcfd7
7fb801eaae7cd2b97942f7a3f70d6e05be0f87ff
/app/framework/common/src/main/java/com/igumnov/common/Time.java
58931825e2532b3dd8ca857d937c85dd196ff030
[ "MIT" ]
permissive
campervcs/diplom
06bd6b5c1965255e601a7bcd5d664710a2142426
f1639bfe19f17ae289148df9e78d99c77a3d2104
refs/heads/master
2021-04-09T14:24:43.250393
2018-03-18T08:10:14
2018-03-18T08:10:14
125,615,127
0
0
null
null
null
null
UTF-8
Java
false
false
476
java
package com.igumnov.common; public class Time { public static void delayInSeconds(double seconds) { pauseInSeconds(seconds); } public static void sleepInSeconds(double seconds) { pauseInSeconds(seconds); } public static void pauseInSeconds(double seconds) { try { Thread.sleep((long) (1000 * seconds)); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } } }
[ "praidforum@mail.ru" ]
praidforum@mail.ru
490abef3d4785a9248796755ad357eef0651a298
558bfbe05369447a7c7dee93e4ce05b13ce5cf76
/src/garage/FamilyCar.java
3d23f9f96c9fdeed815f92adb471ba02f859aa1f
[]
no_license
maysounaukal/GarageDock
792fcd31fe7b9acadd40dba5c375bdaddc41ac38
52be320bbc3c6ffd37d274060ad6b3030d021a80
refs/heads/master
2020-12-01T22:25:03.220341
2019-12-29T19:00:38
2019-12-29T19:00:38
230,791,335
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package garage; import enums.Color; public class FamilyCar extends Car{ public final static int NUMBER_OF_SEATS = 5; private static int count; static { count = 0; } { count++; } public FamilyCar() { } public FamilyCar(Color color) { super(color); } public FamilyCar(Color color, double speed) { super(color,speed); } @Override public void setColor(Color color) { super.setColor(color); } @Override public Color getColor() { return super.getColor(); } @Override public double getSpeed() { return super.getSpeed(); } @Override public void setSpeed(double speed) { super.setSpeed(speed); } public static int getCount() { return count; } @Override public String toString() { return "FamilyCar : NUMBER_OF_SEATS=" + NUMBER_OF_SEATS + ", " + super.toString() ; } }
[ "someone.m_92@hotmail.com" ]
someone.m_92@hotmail.com
6305523d88ced49d3aa7b0a0de8a61bdff04609d
85dfec001483d414e713e1118e235ad88ce7fb62
/src/main/java/com/example/Springsecurity/service/RoleService.java
8125b13a61d99d71675c8f24092c7752cbbc23d8
[]
no_license
ShankarKundu/SpringSecurity
907dadebe6b79b556f77f70c9922a8a183959cdb
e6316df18f14736c6704b0fc9c56a6cd168beb53
refs/heads/master
2022-07-09T13:55:24.914086
2019-08-06T13:36:43
2019-08-06T13:36:43
200,858,257
0
0
null
2022-06-21T01:37:00
2019-08-06T13:35:02
Java
UTF-8
Java
false
false
183
java
package com.example.Springsecurity.service; import com.example.Springsecurity.domain.Roles; public interface RoleService { Roles insert(Roles role); Roles getRole(String name); }
[ "umasankarbist2012@gmail.com" ]
umasankarbist2012@gmail.com
09fcffcb902bd398e4a6718ad65a773a1f506b71
7fac63bcca0f82912bce776a988e259410a4e1f3
/src/Jugador.java
990c3914e06fcc14839e3746e8ce4c93e9971ee7
[]
no_license
nicolaslopez82/TrucoCartas
a1a9688dfaa84a3a3a481fc29caa1d563f1c420a
8e96d49fbd9d7ff79db7d06ac78676435089c206
refs/heads/master
2021-01-20T22:31:23.631084
2016-07-19T03:51:07
2016-07-19T03:51:07
63,658,522
0
0
null
null
null
null
UTF-8
Java
false
false
1,298
java
/** * Created by Nicolas on 5/29/2016. */ public class Jugador { private static int id = 0; private String name; private int score; public Jugador(){ id++; }; public Jugador(String name, int score) { id++; this.name = name; this.score = score; } public int getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getScore() { return score; } public void setScore(int score) { this.score = score; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Jugador)) return false; Jugador jugador = (Jugador) o; if (getScore() != jugador.getScore()) return false; return getName().equals(jugador.getName()); } @Override public int hashCode() { int result = getName().hashCode(); result = 31 * result + getScore(); return result; } @Override public String toString() { return "Jugador{" + "name='" + name + '\'' + "id='" + id + '\'' + ", score=" + score + '}'; } }
[ "nicolaslopez82@gmail.com" ]
nicolaslopez82@gmail.com
2dfb88f5ac7fd7cf82c8d80bb6e2c0f2622fe725
69fde501e8b859761dbc300a2aef6dfd63bb65f3
/UML/generated_java_code/User.java
026c73ddfaa30b30f0dff2b3c97332e25259350a
[]
no_license
yaohongliu/JavaProject
4e0a90106ce6962607713a918b33b4ac69e7e5f3
b5aa87e93a39580cc6ccacc95a106dd69ff911ae
refs/heads/master
2023-01-31T23:39:06.914684
2020-12-19T19:58:35
2020-12-19T19:58:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,072
java
import java.util.*; /** * */ public class User { /** * Default constructor */ public User() { } /** * */ private String name; /** * */ private String phoneNumber; /** * */ private String email; /** * @return */ public String getName() { // TODO implement here return ""; } /** * @param String name * @return */ public void setName(void String name) { // TODO implement here return null; } /** * */ public void Operation3() { // TODO implement here } /** * */ public void Operation4() { // TODO implement here } /** * */ public void Operation5() { // TODO implement here } /** * */ public void Operation6() { // TODO implement here } /** * @return */ public Transaction createTransaction() { // TODO implement here return null; } }
[ "yls12@txstate.edu" ]
yls12@txstate.edu
5877740daacd564dd9b9c304b77ecd386074de80
ebd808f791581c1f71c14a0147c985350a83d8a6
/src/main/java/com/deftshadow/schedyoule/config/SecurityConfig.java
8d5216961d31097803d73f110dc79ecc1f81afb0
[]
no_license
deftshadow/Schedule
38e6ada2509b87b6d3df523001b6b3fbbdc90145
fb8b18793ab59cf3665195c1b5abb2f98deddeab
refs/heads/master
2022-12-16T10:05:19.887770
2020-09-12T16:38:00
2020-09-12T16:38:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,798
java
package com.deftshadow.schedyoule.config; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.session.data.mongo.config.annotation.web.http.EnableMongoHttpSession; import javax.servlet.http.HttpServletResponse; @RequiredArgsConstructor @EnableWebSecurity @EnableMongoHttpSession @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter { private final UserDetailsService userDetailsService; @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable().cors().disable() .authorizeRequests() .antMatchers("/login", "/user/register").permitAll() .anyRequest().authenticated().and() .userDetailsService(userDetailsService) .formLogin().loginProcessingUrl("/login") .successHandler((req, res, auth) -> res.setStatus(HttpServletResponse.SC_OK)) .failureHandler((req, res, auth) -> res.setStatus(HttpServletResponse.SC_UNAUTHORIZED)) .and().logout().logoutUrl("/logout"); } @Bean public PasswordEncoder encoder() { return new BCryptPasswordEncoder(); } }
[ "kasyanenko.konstantin@mail.ru" ]
kasyanenko.konstantin@mail.ru
ad54e54e3d6cac5558bb559a364157c61268058b
fcf10ab4d15a24a104afa736dfb2be96b5181fa8
/mybase/src/test/java/com/example/mybase/ExampleUnitTest.java
699a0de30e7c07674f9c810911cdd6defc03feb6
[]
no_license
anqigit/AnqiJD
75977c26053950b3ea41ef4e2c1a27ea0a37b8d2
140a4c4ebb572ac3210a4b63d9bbd8e9ce093e5c
refs/heads/master
2020-03-20T17:01:28.135534
2018-06-16T03:45:57
2018-06-16T03:45:57
137,550,794
0
0
null
null
null
null
UTF-8
Java
false
false
379
java
package com.example.mybase; 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); } }
[ "2998141775@qq.com" ]
2998141775@qq.com
61305c2deed38a0715a156f960035267326e5343
381f843b02e47be9ca87da97f1c7e61b7d83d425
/src/utopia/vision/test/VisionMapTest.java
7187b839d94f4b8525af2a4edcaed7f4c0d09c31
[]
no_license
Mikkomario/Utopia-Vision
8cf87d8872209d13bb26251ace905a971d085009
16c4496ee8bd18cedbf9a88cf315d1774c2741d7
refs/heads/master
2021-01-15T15:32:52.857539
2016-06-26T14:42:34
2016-06-26T14:42:34
27,561,460
0
0
null
null
null
null
UTF-8
Java
false
false
5,343
java
package utopia.vision.test; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import utopia.arc.io.XmlFileBankRecorder; import utopia.arc.resource.Bank; import utopia.arc.resource.BankBank; import utopia.arc.resource.BankRecorder; import utopia.arc.resource.BankRecorder.RecordingFailedException; import utopia.flow.structure.Pair; import utopia.genesis.event.Actor; import utopia.genesis.event.Drawable; import utopia.genesis.event.StepHandler; import utopia.genesis.util.Transformable; import utopia.genesis.util.Transformation; import utopia.genesis.util.Vector3D; import utopia.genesis.video.GamePanel; import utopia.genesis.video.GameWindow; import utopia.genesis.video.GamePanel.ScalingPolicy; import utopia.genesis.video.SplitPanel.ScreenSplit; import utopia.inception.handling.HandlerRelay; import utopia.inception.util.SimpleHandled; import utopia.vision.generics.VisionDataType; import utopia.vision.resource.Sprite; import utopia.vision.resource.Tile; import utopia.vision.resource.TileMap; import utopia.vision.resource.TileMapDrawer; /** * This class tests the basic functions of TileMap and TileMapDrawer * @author Mikko Hilpinen * @since 16.6.2016 */ class VisionMapTest { // ATTRIBUTES --------------- private static final Path RESOURCE_DIRECTORY = Paths.get("testData"); // MAIN METHOD ---------------- public static void main(String[] args) { try { VisionDataType.initialise(); // Creates the sprites createSprites(); // Creates the tilemap(s) next createTileMaps(); // Reads the resources BankRecorder recorder = new XmlFileBankRecorder(RESOURCE_DIRECTORY); BankBank<Sprite> sprites = new BankBank<>(VisionDataType.SPRITE, recorder, true); BankBank<TileMap> tileMaps = new BankBank<>(VisionDataType.TILEMAP, recorder, true); sprites.initialiseAll(); tileMaps.initialiseAll(); // Sets up the environment Vector3D resolution = new Vector3D(800, 500); StepHandler stepHandler = new StepHandler(120, 20); GameWindow window = new GameWindow(resolution.toDimension(), "Test", false, false, ScreenSplit.HORIZONTAL); GamePanel panel = new GamePanel(resolution, ScalingPolicy.PROJECT, 120); window.addGamePanel(panel); HandlerRelay handlers = new HandlerRelay(); handlers.addHandler(stepHandler, panel.getDrawer()); // Creates the tilemap drawer object handlers.add(new SimpleTileMapObject(resolution.dividedBy(2), 32, tileMaps.get("default", "test"), sprites)); // Starts the game stepHandler.start(); } catch (Exception e) { System.err.println("Failed"); e.printStackTrace(); } } // OTHER METHODS ----------- private static void createSprites() throws IOException, RecordingFailedException { Bank<Sprite> sprites = new Bank<>("default", VisionDataType.SPRITE, new XmlFileBankRecorder(RESOURCE_DIRECTORY)); sprites.put("bookMark", new Sprite(RESOURCE_DIRECTORY.resolve("bookmarks_strip5.png").toFile(), 5, null)); sprites.put("close", new Sprite(RESOURCE_DIRECTORY.resolve("closebutton_strip2.png").toFile(), 2, Vector3D.ZERO)); sprites.save(); } private static void createTileMaps() throws RecordingFailedException { List<Pair<Vector3D, Tile>> tiles = new ArrayList<>(); tiles.add(new Pair<>(Vector3D.ZERO, new Tile("default", "bookMark", new Vector3D(64, 96), 0, false))); tiles.add(new Pair<>(new Vector3D(64), new Tile("default", "close", new Vector3D(96, 96)))); tiles.add(new Pair<>(new Vector3D(64 + 96), new Tile("default", "bookMark", new Vector3D(64, 96), 3, false))); TileMap map = new TileMap(tiles, new Vector3D(64 + 96 / 2, 96 / 2)); Bank<TileMap> maps = new Bank<>("default", VisionDataType.TILEMAP, new XmlFileBankRecorder(RESOURCE_DIRECTORY)); maps.put("test", map); maps.save(); } // NESTED CLASSES ---------------- private static class SimpleTileMapObject extends SimpleHandled implements Drawable, Actor, Transformable { // ATTRIBUTES ---------------- private Transformation transformation; private TileMapDrawer drawer; // CONSTRUCTOR ---------------- public SimpleTileMapObject(Vector3D position, double rotation, TileMap map, BankBank<Sprite> sprites) { this.transformation = new Transformation(position, Vector3D.IDENTITY, new Vector3D(0.5, 0), rotation); this.drawer = new TileMapDrawer(map, sprites); } // IMPLEMENTED METHODS -------- @Override public Transformation getTransformation() { return this.transformation; } @Override public void setTrasformation(Transformation t) { this.transformation = t; } @Override public void act(double duration) { this.drawer.animate(duration); } @Override public void drawSelf(Graphics2D g2d) { AffineTransform lastTransform = getTransformation().transform(g2d); this.drawer.drawMap(g2d); g2d.setTransform(lastTransform); } @Override public int getDepth() { return 0; } } }
[ "mikko_hilpinen@hotmail.com" ]
mikko_hilpinen@hotmail.com
3b75c30298c0ce17feedcf4a70d6ec5f4152cc5c
95e6b87ce514d8f61019139d48afff1bcce9150b
/wicked-forms-showcase/wicked-forms-showcase-wicket6/src/main/java/org/wickedsource/wickedforms/showcase/StaticFragment.java
aa4651d8d1d771736c7f1f6e1aa9bc070ed2fd4f
[ "Apache-2.0" ]
permissive
matthiasbalke/wicked-forms
901c6718468736316d25243907aaa4c452086c3f
4632f2ddc1ab0321fc7d4e5c69ae3f14df6bf3bd
refs/heads/master
2021-01-14T12:57:35.709999
2013-11-26T23:06:06
2013-11-26T23:06:06
14,659,499
0
0
null
null
null
null
UTF-8
Java
false
false
100
java
package org.wickedsource.wickedforms.showcase; public enum StaticFragment { USAGE, BINDINGS }
[ "tom.hombergs@gmail.com" ]
tom.hombergs@gmail.com
e3d6f6e4f2ab6bcb8c0895c328cac22903a28ca5
7c0c62d1b67bb8a2710145c9dfb0a8ee3585ef9a
/src/test/java/com/banmenit/spring/anotation/LocalDateTest.java
5d80e6556c57ce24934120d6c8a6cf3d213a28c3
[]
no_license
PearLinger/spring-anotation
c11cc0c6507f6fe45851bd209345ab9302da1093
7c56de486e3ab26e41925e15a01fe925e5ef7908
refs/heads/master
2023-01-28T16:32:35.539770
2020-12-15T10:04:51
2020-12-15T10:04:51
321,626,407
0
0
null
null
null
null
UTF-8
Java
false
false
1,384
java
package com.banmenit.spring.anotation; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.StopWatch; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; /** * @author rabbit * @version v 1.0 * @date 2020/12/15 17:58 */ @SpringBootTest(classes = SpringAnotationApplication.class) @RunWith(SpringRunner.class) public class LocalDateTest { @Test public void testReduce() throws InterruptedException { StopWatch stopWatch = new StopWatch(); stopWatch.start("getAppQuotaByIdList"); List<Integer> list = new ArrayList<>(); list.add(1); list.add(1); list.add(1); Integer reduce = list.stream().reduce(2,Integer::sum); stopWatch.stop(); System.out.println(stopWatch.prettyPrint()); System.out.println(reduce); LocalDate now = LocalDate.now(); LocalDateTime now1 = LocalDateTime.now(); DateTimeFormatter f4 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); String format = now1.format(f4); System.out.println(format); System.out.println(now1); System.out.println(now); } }
[ "377811501@qq.com" ]
377811501@qq.com
e38ed6ca84f363efa2ee7cf3fc1ef3fb3df15e34
6b73245a651f4a4ba16e6a373793dee7da4d6c50
/EcoleApp/src/main/java/fr/julien/repository/RoleRepository.java
2c690107f95362765313a481010a365f6c346d54
[]
no_license
teamJoelB/julienbackpublic
5dc927c14d9540c9815828cef56374a2b820e098
10d579e78c43d3f824c56eb57ee7da15ab21d6f6
refs/heads/master
2023-08-24T05:35:51.339674
2021-10-19T07:56:18
2021-10-19T07:56:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package fr.julien.repository; import org.springframework.data.repository.CrudRepository; import fr.julien.entities.Role; public interface RoleRepository extends CrudRepository<Role, Long>{ }
[ "bankajoel@joelbpro.com" ]
bankajoel@joelbpro.com
f873181625d4d1619ac0b1bd3a67b1e92e93a5c3
9324760e4f334d85ba9171b21136d588bbef6b2b
/src/main/java/mx/com/challenge/Bankaya/Bean/Peliculas.java
7f691033bde4c23c4775de6e8d85dc0984377abd
[]
no_license
oxcesare/BankayaChallenge
52c9106f1f5f5bc8b15f103f0f28a77512f74d30
f1324b2830b528b088686938d67ceb4c43d13ff2
refs/heads/master
2023-07-11T10:31:43.623582
2021-08-14T13:12:44
2021-08-14T13:12:44
394,758,897
0
0
null
null
null
null
UTF-8
Java
false
false
537
java
package mx.com.challenge.Bankaya.Bean; import java.util.List; public class Peliculas { private Pelicula move; private List<VersionGrupoDetalles> version_group_details; public Pelicula getMove() { return move; } public void setMove(Pelicula move) { this.move = move; } public List<VersionGrupoDetalles> getVersion_group_details() { return version_group_details; } public void setVersion_group_details(List<VersionGrupoDetalles> version_group_details) { this.version_group_details = version_group_details; } }
[ "cesaralducinruiz@192.168.100.2" ]
cesaralducinruiz@192.168.100.2
5f2de10dff2d3fb9a252baddc62ad62410496762
cf74033591b25b38f45e5ce23919283daaea41f1
/back-end/src/main/java/com/engineering/shop/chat/Message.java
396c7b325ad5fafd8ac843d9f8834a0166274e84
[ "Apache-2.0" ]
permissive
jkkostrzewski/inzynieriaProjekt
97f14a158b2f67e73e504c60348ef3522efb86a0
76496d9b99a2de090b4ee8ae00249a386cb7c1d8
refs/heads/master
2022-04-04T07:03:09.526439
2020-01-28T10:12:30
2020-01-28T10:12:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
480
java
package com.engineering.shop.chat; import lombok.*; import javax.persistence.*; import java.util.Date; @Entity @Getter @Setter @AllArgsConstructor @NoArgsConstructor @RequiredArgsConstructor public class Message { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; private String sender; private String receiver; @NonNull private String text; private final Date date = new Date(); private boolean displayed = false; }
[ "56536027+stanislawR@users.noreply.github.com" ]
56536027+stanislawR@users.noreply.github.com
c3aaaa97c9e84902466b2b5d99dbc22edc831472
28adbd54e461635baaf8d6d59800723657c78f6d
/UnionFind/bobo/unionFind/UnionFind3.java
fdceb24d6831d5279ed94ce82657ea3c8ba3fdb0
[]
no_license
DuxioMU/DataStructure
46749d0f6cd986abfd4be5640ce78256cc4fd16a
2c1c55a3481ffed37d3a5ac995ca603c2f1b7c2f
refs/heads/master
2021-06-22T16:07:34.867160
2017-08-27T08:21:31
2017-08-27T08:21:31
101,384,763
0
0
null
null
null
null
GB18030
Java
false
false
989
java
package bobo.unionFind; public class UnionFind3 { private int[] parent; private int[] sz; //sz[i]表示以i为根的集合中的元素个数 private int count; public UnionFind3(int count) { parent = new int[count]; sz = new int[count]; this.count = count; for(int i = 0; i < count; i ++){ parent[i] = i; sz[i] = 1; } } int find(int p) { assert(p >= 0 && p < count); while(p != parent[p]) p = parent[p]; return p; } boolean isConnected(int p,int q) { return find(p) == find(q); } //将元素少的根元素并到元素较少的根元素 //并不完全准确 判断树的高度 基于Rank优化可以解决这个问题 void unionElements(int p ,int q) { int pRoot = find(p); int qRoot = find(q); if(pRoot == qRoot) return; if(sz[pRoot] < sz[qRoot]) { parent[pRoot] = qRoot; sz[qRoot] += sz[pRoot]; }else { parent[qRoot] = pRoot; sz[pRoot] += sz[qRoot]; } } }
[ "dumu@runoob.com" ]
dumu@runoob.com
66898c73dd103a40b183a462fd5ca0c9247beb1b
c9377759758b2075d4005a933e6107713404073d
/jdk-1.6-parent/jwicket-parent/jwicket-core/src/main/java/org/wicketstuff/jwicket/ui/AbstractJqueryUiEmbeddedBehavior.java
2a1581c649035be25e9207528023fe59312f6cb7
[]
no_license
pmaingi/core
771f9837ff605f7ad5378bde45499d5a9b738bff
c23f46dd241754e2c23324cf201a81501db2805f
refs/heads/master
2021-01-17T22:35:03.837182
2012-11-21T10:32:01
2012-11-21T10:32:01
6,855,292
1
0
null
null
null
null
UTF-8
Java
false
false
2,492
java
package org.wicketstuff.jwicket.ui; import org.wicketstuff.jwicket.*; public abstract class AbstractJqueryUiEmbeddedBehavior extends JQueryDurableAjaxBehavior { private static final long serialVersionUID = 1L; // Javascript public static final JQueryJavaScriptResourceReference jQueryUiCoreJs = JQuery.isDebug() ? new JQueryJavaScriptResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "jquery.ui.core.js") : new JQueryJavaScriptResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "jquery.ui.core.min.js"); public static final JQueryJavaScriptResourceReference jQueryUiWidgetJs = JQuery.isDebug() ? new JQueryJavaScriptResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "jquery.ui.widget.js") : new JQueryJavaScriptResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "jquery.ui.widget.min.js"); public static final JQueryJavaScriptResourceReference jQueryUiMouseJs = JQuery.isDebug() ? new JQueryJavaScriptResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "jquery.ui.mouse.js") : new JQueryJavaScriptResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "jquery.ui.mouse.min.js"); public static final JQueryJavaScriptResourceReference jQueryUiPositionJs = JQuery.isDebug() ? new JQueryJavaScriptResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "jquery.ui.position.js") : new JQueryJavaScriptResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "jquery.ui.position.min.js"); // CSS public static final JQueryCssResourceReference jQueryUiCss = new JQueryCssResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "css/jquery-ui.css"); public static final JQueryCssResourceReference jQueryUiBaseCss = new JQueryCssResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "css/jquery.ui.base.css"); public static final JQueryCssResourceReference jQueryUiThemeCss = new JQueryCssResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "css/jquery.ui.theme.css"); public static final JQueryCssResourceReference jQueryUiAccordionCss = new JQueryCssResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "css/jquery.ui.accordion.css"); public static final JQueryCssResourceReference jQueryUiCustomCss = new JQueryCssResourceReference(AbstractJqueryUiEmbeddedBehavior.class, "css/jquery-ui.custom.css"); public AbstractJqueryUiEmbeddedBehavior(final JQueryResourceReference... requiredLibraries) { super(jQueryUiCoreJs, requiredLibraries); } }
[ "sofie.muys@hp.com" ]
sofie.muys@hp.com
47819a6419b042abe7736c94263da162bfd29975
eab35e0ba0d2819bb035995b318c0a74825cead8
/src/main/java/com/nov/jhpoi/vo/account/QueryWxDataVo.java
1443e8f0226b14d9edd065fd0a8c9cdf6e5e92af
[]
no_license
a1093826765/jh-poi
38631c72ca34af0207783c3d6c3739cc6344caae
38a122227607d884ce4157b1fbcc7a97f5f26b74
refs/heads/master
2023-03-19T04:38:57.779512
2021-03-08T08:24:25
2021-03-08T08:24:25
333,377,069
0
0
null
null
null
null
UTF-8
Java
false
false
215
java
package com.nov.jhpoi.vo.account; import lombok.Data; /** * Created by IntelliJ IDEA. * * @Author: november * Date: 2021/1/31 6:21 下午 */ @Data public class QueryWxDataVo { private String weChatNum; }
[ "1093826765@qq.com" ]
1093826765@qq.com
a9fc8e9c773f41c764956d7d352de8b0a4db211a
0c0f79d425f1395665ba198e20887902835477dc
/solution/src/test/java/com/br/myproject/CrudApiApplicationTests.java
0dcdccbba3b67c0af4b2b229c86585de4d421bd0
[]
no_license
gdurazzo/quero-ser-clickbus
0144a1f439cfcda5e4b42f5593931aef03b2dea8
302ff55d20e355459a2a5fd55db5e55e7f4fb404
refs/heads/master
2020-08-08T05:55:16.983918
2019-10-13T20:22:16
2019-10-13T20:22:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
334
java
package com.br.myproject; 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 CrudApiApplicationTests { @Test public void contextLoads() { } }
[ "gdurazzo@everis.com" ]
gdurazzo@everis.com
3c3df4ca00be5b7328a45674878eb7299f74cf11
95f5e9a6401fb4ff57ed600b243e937f7cd16627
/FitnessRoomCtrService/src/main/java/fitnessroom/service/UsersService.java
f9d4f36639e225247875006d7f693d996502f95b
[]
no_license
MyAuntIsPost90s/FitnessRoom
50c97513c877552453a8562398d9146efb4d4244
703a37b37832cf84e19320fa9d9c7a3c12edba64
refs/heads/master
2021-01-24T04:13:19.484049
2018-05-31T12:26:54
2018-05-31T12:26:54
122,926,051
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package fitnessroom.service; import java.util.List; import fitnessroom.base.model.Users; import fitnessroom.uimodel.EUIPageList; public interface UsersService { public Users doLogin(Users users, StringBuilder stringBuilder); public Users getSingle(String userid); public EUIPageList<Users> getList(Users user, int page, int rows); public void add(Users user) throws Exception; public void update(Users user); public void delete(List<String> ids); }
[ "1126670571@qq.com" ]
1126670571@qq.com
3456109aae054c039eab88f712ecc14bfb6f774e
c7e9351bc3ba17a5d41e6f8b47177121aab37c90
/oklib/src/main/java/com/oklib/util/qrcode/zxing/ZXingView.java
5f947372a50085bfee5d453478bf5436091083dd
[]
no_license
zhuwenquan/OkLibDemo
df18fed9449357e41c4fb097eca3631b4fb78257
10a8fab070506bd2f91cbc96c3d13e3d3f863e24
refs/heads/master
2021-07-10T16:04:30.164570
2017-10-13T09:21:36
2017-10-13T09:21:36
107,351,961
1
0
null
2017-10-18T03:01:31
2017-10-18T03:01:31
null
UTF-8
Java
false
false
1,884
java
package com.oklib.util.qrcode.zxing; import android.content.Context; import android.graphics.Rect; import android.util.AttributeSet; import com.google.zxing.BinaryBitmap; import com.google.zxing.MultiFormatReader; import com.google.zxing.PlanarYUVLuminanceSource; import com.google.zxing.Result; import com.google.zxing.common.HybridBinarizer; import com.oklib.util.qrcode.code.QRCodeView; public class ZXingView extends QRCodeView { private MultiFormatReader mMultiFormatReader; public ZXingView(Context context, AttributeSet attributeSet) { this(context, attributeSet, 0); } public ZXingView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initMultiFormatReader(); } private void initMultiFormatReader() { mMultiFormatReader = new MultiFormatReader(); mMultiFormatReader.setHints(QRCodeDecoder.HINTS); } @Override public String processData(byte[] data, int width, int height, boolean isRetry) { String result = null; Result rawResult = null; try { PlanarYUVLuminanceSource source = null; Rect rect = mScanBoxView.getScanBoxAreaRect(height); if (rect != null) { source = new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top, rect.width(), rect.height(), false); } else { source = new PlanarYUVLuminanceSource(data, width, height, 0, 0, width, height, false); } rawResult = mMultiFormatReader.decodeWithState(new BinaryBitmap(new HybridBinarizer(source))); } catch (Exception e) { e.printStackTrace(); } finally { mMultiFormatReader.reset(); } if (rawResult != null) { result = rawResult.getText(); } return result; } }
[ "黄伟才" ]
黄伟才
534f26dc63922177d1dda7618dc9ac9ed22c4bcc
c99fe25de6da389289bab12e6a7bac9414a1a731
/src/com/sphz/controller/system/fhsms/FhsmsController.java
24b0b3d6a1b83506f1ebb116017da9f53bb606a4
[]
no_license
baqi250/sphz
20cda52c2ce8720796a6d36bea8f70e5cef4851e
6dacd747a72efea04a63be33c2804e72ea5583c3
refs/heads/master
2020-04-17T07:30:34.480048
2019-01-18T09:12:36
2019-01-18T09:12:36
166,372,860
0
0
null
null
null
null
UTF-8
Java
false
false
6,982
java
package com.sphz.controller.system.fhsms; import java.io.PrintWriter; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.stereotype.Controller; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import com.sphz.controller.base.BaseController; import com.sphz.entity.Page; import com.sphz.service.system.fhsms.FhsmsManager; import com.sphz.util.AppUtil; import com.sphz.util.DateUtil; import com.sphz.util.Jurisdiction; import com.sphz.util.PageData; /** * 说明:站内信 * 创建人:DK * 创建时间:2016-01-17 */ @Controller @RequestMapping(value="/fhsms") public class FhsmsController extends BaseController { String menuUrl = "fhsms/list.do"; //菜单地址(权限用) @Resource(name="fhsmsService") private FhsmsManager fhsmsService; /**发送站内信 * @param * @throws Exception */ @RequestMapping(value="/save") @ResponseBody public Object save() throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"发送站内信"); //if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限(站内信用独立的按钮权限,在此就不必校验新增权限) PageData pd = new PageData(); pd = this.getPageData(); Map<String,Object> map = new HashMap<String,Object>(); List<PageData> pdList = new ArrayList<PageData>(); String msg = "ok"; //发送状态 int count = 0; //统计发送成功条数 int zcount = 0; //理论条数 String USERNAME = pd.getString("USERNAME"); //对方用户名 if(null != USERNAME && !"".equals(USERNAME)){ USERNAME = USERNAME.replaceAll(";", ";"); USERNAME = USERNAME.replaceAll(" ", ""); String[] arrUSERNAME = USERNAME.split(";"); zcount = arrUSERNAME.length; try { pd.put("STATUS", "2"); //状态 for(int i=0;i<arrUSERNAME.length;i++){ pd.put("SANME_ID", this.get32UUID()); //共同ID pd.put("SEND_TIME", DateUtil.getTime()); //发送时间 pd.put("FHSMS_ID", this.get32UUID()); //主键1 pd.put("TYPE", "2"); //类型2:发信 pd.put("FROM_USERNAME", Jurisdiction.getUsername()); //发信人 pd.put("TO_USERNAME", arrUSERNAME[i]); //收信人 fhsmsService.save(pd); //存入发信 pd.put("FHSMS_ID", this.get32UUID()); //主键2 pd.put("TYPE", "1"); //类型1:收信 pd.put("FROM_USERNAME", arrUSERNAME[i]); //发信人 pd.put("TO_USERNAME", Jurisdiction.getUsername()); //收信人 fhsmsService.save(pd); count++; } msg = "ok"; } catch (Exception e) { msg = "error"; } }else{ msg = "error"; } pd.put("msg", msg); pd.put("count", count); //成功数 pd.put("ecount", zcount-count); //失败数 pdList.add(pd); map.put("list", pdList); return AppUtil.returnObject(pd, map); } /**删除 * @param out * @throws Exception */ @RequestMapping(value="/delete") public void delete(PrintWriter out) throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"删除Fhsms"); if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 PageData pd = new PageData(); pd = this.getPageData(); fhsmsService.delete(pd); out.write("success"); out.close(); } /**列表 * @param page * @throws Exception */ @RequestMapping(value="/list") public ModelAndView list(Page page) throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"列表Fhsms"); ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); String keywords = pd.getString("keywords"); //关键词检索条件 if(null != keywords && !"".equals(keywords)){ pd.put("keywords", keywords.trim()); } String lastLoginStart = pd.getString("lastLoginStart"); //开始时间 String lastLoginEnd = pd.getString("lastLoginEnd"); //结束时间 if(lastLoginStart != null && !"".equals(lastLoginStart)){ pd.put("lastLoginStart", lastLoginStart+" 00:00:00"); } if(lastLoginEnd != null && !"".equals(lastLoginEnd)){ pd.put("lastLoginEnd", lastLoginEnd+" 00:00:00"); } if(!"2".equals(pd.getString("TYPE"))){ //1:收信箱 2:发信箱 pd.put("TYPE", 1); } pd.put("FROM_USERNAME", Jurisdiction.getUsername()); //当前用户名 page.setPd(pd); List<PageData> varList = fhsmsService.list(page); //列出Fhsms列表 mv.setViewName("system/fhsms/fhsms_list"); mv.addObject("varList", varList); mv.addObject("pd", pd); mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 return mv; } /**去发站内信界面 * @param * @throws Exception */ @RequestMapping(value="/goAdd") public ModelAndView goAdd()throws Exception{ ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); mv.setViewName("system/fhsms/fhsms_edit"); mv.addObject("msg", "save"); mv.addObject("pd", pd); return mv; } /**去查看页面 * @param * @throws Exception */ @RequestMapping(value="/goView") public ModelAndView goView()throws Exception{ ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); if("1".equals(pd.getString("TYPE")) && "2".equals(pd.getString("STATUS"))){ //在收信箱里面查看未读的站内信时去数据库改变未读状态为已读 fhsmsService.edit(pd); } pd = fhsmsService.findById(pd); //根据ID读取 mv.setViewName("system/fhsms/fhsms_view"); mv.addObject("pd", pd); return mv; } /**批量删除 * @param * @throws Exception */ @RequestMapping(value="/deleteAll") @ResponseBody public Object deleteAll() throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"批量删除Fhsms"); if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 PageData pd = new PageData(); Map<String,Object> map = new HashMap<String,Object>(); pd = this.getPageData(); List<PageData> pdList = new ArrayList<PageData>(); String DATA_IDS = pd.getString("DATA_IDS"); if(null != DATA_IDS && !"".equals(DATA_IDS)){ String ArrayDATA_IDS[] = DATA_IDS.split(","); fhsmsService.deleteAll(ArrayDATA_IDS); pd.put("msg", "ok"); }else{ pd.put("msg", "no"); } pdList.add(pd); map.put("list", pdList); return AppUtil.returnObject(pd, map); } @InitBinder public void initBinder(WebDataBinder binder){ DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); } }
[ "baqi250@163.com" ]
baqi250@163.com
487bae11b8e33487d02ee21d751ca66b69fff4b2
00b461ee7077c86c597d78b3164deb85847ecb2e
/src/main/java/com/Techworld/UserModel/UserService.java
6a3a866e00eb432caf1d718ef4ca2a1d513b51d0
[]
no_license
smasher3008/Techworld1
ad78c9b03c818a8e2847f0e2a90f6674f40ba49d
aa7202657152f140274f0d0d2d65228b132bfe23
refs/heads/master
2021-01-20T20:08:33.296962
2016-07-08T16:43:32
2016-07-08T16:43:32
62,874,427
0
0
null
null
null
null
UTF-8
Java
false
false
99
java
package com.Techworld.UserModel; public interface UserService { public void insert(User u); }
[ "hitengupta@rocketmail.com" ]
hitengupta@rocketmail.com
4fe62fef46904d2ce481eb5c2605165ad1568969
e97b3dbaa5ee1e6bd64989299827d7056968c7f2
/inception-ui-kb/src/main/java/de/tudarmstadt/ukp/inception/ui/kb/project/KnowledgeBaseProjectSettingsPanelFactory.java
f492b7dcc66ddc3d8f9532942e1eb313e14f938e
[ "Apache-2.0" ]
permissive
HerrKrishna/inception
998d1ef052eb4e1e6dbc58f9c9061d09ec62c8f0
218709fea6b6374dc753601e616a74204f605db4
refs/heads/master
2023-03-12T21:26:15.633221
2021-02-16T11:07:49
2021-02-16T11:07:49
313,596,910
0
0
Apache-2.0
2021-02-08T10:39:33
2020-11-17T11:23:00
null
UTF-8
Java
false
false
1,991
java
/* * Copyright 2018 * Ubiquitous Knowledge Processing (UKP) Lab and FG Language Technology * Technische Universität Darmstadt * * Licensed to the Technische Universität Darmstadt under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The Technische Universität Darmstadt * 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. * * 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 de.tudarmstadt.ukp.inception.ui.kb.project; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.IModel; import org.springframework.core.annotation.Order; import de.tudarmstadt.ukp.clarin.webanno.model.Project; import de.tudarmstadt.ukp.clarin.webanno.ui.core.settings.ProjectSettingsPanelFactory; import de.tudarmstadt.ukp.inception.ui.kb.config.KnowledgeBaseServiceUIAutoConfiguration; /** * <p> * This class is exposed as a Spring Component via * {@link KnowledgeBaseServiceUIAutoConfiguration#knowledgeBaseProjectSettingsPanelFactory}. * </p> */ @Order(350) public class KnowledgeBaseProjectSettingsPanelFactory implements ProjectSettingsPanelFactory { @Override public String getPath() { return "/knowledge-bases"; } @Override public String getLabel() { return "Knowledge Bases"; } @Override public Panel createSettingsPanel(String aID, final IModel<Project> aProjectModel) { return new ProjectKnowledgeBasePanel(aID, aProjectModel); } }
[ "richard.eckart@gmail.com" ]
richard.eckart@gmail.com
8fbd7f4f66e993ee45293600283534ef032b31de
8972f734a9eedade63e93d2c2bfcc1823b7b4c82
/viewhigh-analysis-parent/viewhigh-analysis-api/src/main/java/com/viewhigh/analysis/api/ILoginService.java
08e0fab442be7d3e3e9491e4c84d966ea7d8332b
[]
no_license
fujianguo8899/spring-analysis-parent
68494adc59774c32f6d163962bbc91fdfafd94db
b01a60853c879e20bb13fd475f1cb2e665f4b317
refs/heads/master
2022-12-24T14:16:33.895656
2020-09-19T14:57:54
2020-09-19T14:57:54
136,807,622
2
1
null
2022-12-10T03:26:51
2018-06-10T12:37:38
Java
UTF-8
Java
false
false
1,020
java
package com.viewhigh.analysis.api; import java.util.List; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import com.viewhigh.analysis.domain.User; import com.viewhigh.analysis.domain.UserPower; public interface ILoginService { /** * 用户登录 * @param userName * @param password * @return */ @RequestMapping(value = "/login", method = RequestMethod.POST) User login(@RequestParam(value = "userName") String userName, @RequestParam(value = "password") String password); /** * 记录用户登录记录 * @param user * @return */ @RequestMapping(value = "/recordUserLogin", method = RequestMethod.POST) Integer recordUserLogin(User user); /** * 获取用户权限 * @param id * @return */ @RequestMapping(value = "/ListUserPower", method = RequestMethod.POST) List<UserPower> ListUserPower(@RequestParam(value = "id") Long id); }
[ "fujianguo@viewhigh.com" ]
fujianguo@viewhigh.com
5b3f2fd15a0c7576d31d6f7ceaed758f11eb6ac1
88b6ebd21c60f2e52a1fa34e7d8cdac0c903e6c2
/pms/src/main/java/com/beskilled/controller/ImageOptimizer.java
5e77149c2c5a910e6575a79154004c6427f165b8
[]
no_license
mostafiz9900/spring
f8738a1c9bc01013d9ec9804ec742d8ca553326d
c31208a629dd6c1735a6688389c25af28063f4c7
refs/heads/master
2020-04-19T21:57:17.908148
2019-03-22T23:44:39
2019-03-22T23:44:39
168,456,063
1
1
null
null
null
null
UTF-8
Java
false
false
1,736
java
package com.beskilled.controller; import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @Component public class ImageOptimizer { public void optimizeImage(String UPLOADED_FOLDER, MultipartFile file, float quality, int width, int height) throws IOException { MultipartFile multipartFile = null; Path path = Paths.get(UPLOADED_FOLDER + file.getOriginalFilename()); System.out.println("Path: "+path); Path pathOut = Paths.get(UPLOADED_FOLDER +"new-"+ file.getOriginalFilename()); //create instance of File File optimizedImage=new File(pathOut.toString()); File inputImage=new File(path.toString()); //BufferedImage bufferedImage = ImageIO.read(Files.newInputStream(Paths.get(basePath + imageSource))); BufferedImage bufferedImage=ImageIO.read(Files.newInputStream(path)); BufferedImage resizedBufferedImage=resize(bufferedImage,height,width); ImageIO.write(resizedBufferedImage,"jpg",optimizedImage); // multipartFile.transferTo(optimizedImage); // return multipartFile; } private static BufferedImage resize(BufferedImage img, int height, int width) { Image tmp = img.getScaledInstance(width, height, Image.SCALE_SMOOTH); BufferedImage resized = new BufferedImage(width, height, BufferedImage.TYPE_INT_BGR); Graphics2D g2d = resized.createGraphics(); g2d.drawImage(tmp, 0, 0, null); return resized; } }
[ "you@example.com" ]
you@example.com
f23066ac99b3bc4bcafbe4d423c782a08539cde1
5982f1a154f9c678e80e774133ae67f1b4265536
/src/main/java/com/backend/service/RoleServiceImp.java
87e47ef12d03d4553e9fa0c338b85b66e24e2bb2
[]
no_license
ichrakSmati/Association-Backend
a4571b040be1136ae86161a74f8edd1feaea8316
548da36c2174a5e28d4db69b9915eb78cc87fbff
refs/heads/master
2020-08-04T11:10:02.528951
2019-10-17T17:45:13
2019-10-17T17:45:13
212,118,158
3
0
null
null
null
null
UTF-8
Java
false
false
628
java
package com.backend.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.backend.dao.RoleRepository; import com.backend.models.Role; @Service(value= "roleService") public class RoleServiceImp implements RoleService{ @Autowired private RoleRepository roleRepository; @Override public List<Role> getListRole() { return roleRepository.findAll(); } @Override public Role findById(Integer id) { return roleRepository.getOne(id); } @Override public void addRole(Role role) { roleRepository.save(role); } }
[ "ichrak.smati@esprit.tn" ]
ichrak.smati@esprit.tn
d2ff1affbe9958258761f4f04258cb25c0de33c6
11f977e64816efa73d5951272b884131bf6dcc0c
/zapus-controller/src/main/java/com/dianwoba/zapus/service/perftest/ConsoleManager.java
a3d4918bddc12c4738a66a44c2aa67f154c2a229
[]
no_license
walterlife/zapus
835bc6cbbea590f3f428f4d44efbff8f92d528a2
cd790a423a399e3d465211de21c56ab68f785d09
refs/heads/master
2020-07-15T14:40:52.538748
2017-07-11T12:26:35
2017-07-11T12:26:35
96,890,145
0
0
null
null
null
null
UTF-8
Java
false
false
7,737
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 com.dianwoba.zapus.service.perftest; import net.grinder.SingleConsole; import net.grinder.console.model.ConsoleCommunicationSetting; import net.grinder.console.model.ConsoleProperties; import org.h2.util.StringUtils; import com.dianwoba.zapus.infra.config.Config; import com.dianwoba.zapus.model.perftest.NullSingleConsole; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.TimeUnit; import static net.grinder.util.NetworkUtils.getAvailablePorts; import static com.dianwoba.zapus.common.constant.ControllerConstants.*; import static com.dianwoba.zapus.common.util.ExceptionUtils.processException; import static com.dianwoba.zapus.common.util.NoOp.noOp; /** * Console 管理器 */ @Component public class ConsoleManager { private static final int MAX_PORT_NUMBER = 65000; private static final Logger LOG = LoggerFactory.getLogger(ConsoleManager.class); private volatile ArrayBlockingQueue<ConsoleEntry> consoleQueue; private volatile List<SingleConsole> consoleInUse = Collections.synchronizedList(new ArrayList<SingleConsole>()); @Autowired private Config config; @Autowired private AgentManager agentManager; /** * Prepare console queue. */ @PostConstruct public void init() { int consoleSize = getConsoleSize(); consoleQueue = new ArrayBlockingQueue<ConsoleEntry>(consoleSize); final String currentIP = config.getCurrentIP(); for (int each : getAvailablePorts(currentIP, consoleSize, getConsolePortBase(), MAX_PORT_NUMBER)) { final ConsoleEntry e = new ConsoleEntry(config.getCurrentIP(), each); try { e.occupySocket(); consoleQueue.add(e); } catch (Exception ex) { LOG.error("socket binding to {}:{} is failed", config.getCurrentIP(), each); } } } /** * Get the base port number of console. * <p/> * It can be specified at ngrinder.consolePortBase in system.conf. Each console will be created from that port. * * @return base port number */ protected int getConsolePortBase() { return config.getControllerProperties().getPropertyInt(PROP_CONTROLLER_CONSOLE_PORT_BASE); } /** * Get the console pool size. It can be specified at ngrinder.maxConcurrentTest in system.conf. * * @return console size. */ protected int getConsoleSize() { return config.getControllerProperties().getPropertyInt(PROP_CONTROLLER_MAX_CONCURRENT_TEST); } /** * Get Timeout (in second). * * @return 5000 second */ protected long getMaxWaitingMilliSecond() { return config.getControllerProperties().getPropertyInt(PROP_CONTROLLER_MAX_CONNECTION_WAITING_MILLISECOND); } /** * Get an available console. * <p/> * If there is no available console, it waits until available console is returned back. If the specific time is * timeout can be adjusted by overriding {@link #getMaxWaitingMilliSecond()}. * * @param baseConsoleProperties base {@link net.grinder.console.model.ConsoleProperties} * @return console */ public SingleConsole getAvailableConsole(ConsoleProperties baseConsoleProperties) { ConsoleEntry consoleEntry = null; try { consoleEntry = consoleQueue.poll(getMaxWaitingMilliSecond(), TimeUnit.MILLISECONDS); if (consoleEntry == null) { throw processException("no console entry available"); } synchronized (this) { consoleEntry.releaseSocket(); // FIXME : It might fail here ConsoleCommunicationSetting consoleCommunicationSetting = ConsoleCommunicationSetting.asDefault(); if (config.getInactiveClientTimeOut() > 0) { consoleCommunicationSetting.setInactiveClientTimeOut(config.getInactiveClientTimeOut()); } SingleConsole singleConsole = new SingleConsole(config.getCurrentIP(), consoleEntry.getPort(), consoleCommunicationSetting, baseConsoleProperties); getConsoleInUse().add(singleConsole); singleConsole.setCsvSeparator(config.getCsvSeparator()); return singleConsole; } } catch (Exception e) { if (consoleEntry != null) { consoleQueue.add(consoleEntry); } throw processException("no console entry available"); } } /** * Return back the given console. * <p/> * Duplicated returns is allowed. * * @param testIdentifier test identifier * @param console console which will be returned back. */ public void returnBackConsole(String testIdentifier, SingleConsole console) { if (console == null || console instanceof NullSingleConsole) { LOG.error("Attempt to return back null console for {}.", testIdentifier); return; } try { console.sendStopMessageToAgents(); } catch (Exception e) { LOG.error("Exception occurred during console return back for test {}.", testIdentifier, e); // But the port is getting back. } finally { // This is very careful implementation.. try { // Wait console is completely shutdown... console.waitUntilAllAgentDisconnected(); } catch (Exception e) { LOG.error("Exception occurred during console return back for test {}.", testIdentifier, e); // If it's not disconnected still, stop them by force. agentManager.stopAgent(console.getConsolePort()); } try { console.shutdown(); } catch (Exception e) { LOG.error("Exception occurred during console return back for test {}.", testIdentifier, e); } int consolePort; String consoleIP; try { consolePort = console.getConsolePort(); consoleIP = console.getConsoleIP(); ConsoleEntry consoleEntry = new ConsoleEntry(consoleIP, consolePort); synchronized (this) { if (!consoleQueue.contains(consoleEntry)) { consoleEntry.occupySocket(); consoleQueue.add(consoleEntry); if (!getConsoleInUse().contains(console)) { LOG.error("Try to return back the not used console on {} port", consolePort); } getConsoleInUse().remove(console); } } } catch (Exception e) { noOp(); } } } /** * Get the list of {@link SingleConsole} which are used. * * @return {@link SingleConsole} list in use */ public List<SingleConsole> getConsoleInUse() { return consoleInUse; } /** * Get the size of currently available consoles. * * @return size of available consoles. */ public Integer getAvailableConsoleSize() { return consoleQueue.size(); } /** * Get the {@link SingleConsole} instance which is using the given port. * * @param port port which the console is using * @return {@link SingleConsole} instance if found. Otherwise, {@link NullSingleConsole} instance. */ public SingleConsole getConsoleUsingPort(Integer port) { String currentIP = config.getCurrentIP(); for (SingleConsole each : consoleInUse) { // Avoid to Klocwork error. if (each instanceof NullSingleConsole) { continue; } if (StringUtils.equals(each.getConsoleIP(), currentIP) && each.getConsolePort() == port) { return each; } } return new NullSingleConsole(); } }
[ "zhuyuwei@dianwoba.com" ]
zhuyuwei@dianwoba.com
dc44a147353dabdc0e10c8f035ebc8f91f447ed2
a303420d87f033aab7f2d90cbcfb7f9eeea3fc8f
/drools/drools-model/drools-model-compiler/src/main/java/org/drools/modelcompiler/builder/DeclaredTypeWriter.java
03824dc7fb6e25b25efd26d07929ea1502538df3
[ "Apache-2.0" ]
permissive
elguardian/kogito-runtimes
2ebb5bf7e6a7791e54dd7198c2ed2198329ad97b
e9e73651812ec9d629c892c491899411aa557fcb
refs/heads/master
2023-06-22T10:10:34.033976
2019-09-25T06:29:13
2019-09-25T06:29:13
211,028,460
0
0
Apache-2.0
2019-09-26T07:33:48
2019-09-26T07:33:48
null
UTF-8
Java
false
false
1,550
java
/* * Copyright 2019 Red Hat, Inc. and/or its affiliates. * * 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.drools.modelcompiler.builder; import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; public class DeclaredTypeWriter { protected final ClassOrInterfaceDeclaration generatedPojo; protected final PackageModel pkgModel; private final String name; public DeclaredTypeWriter(ClassOrInterfaceDeclaration generatedPojo, PackageModel pkgModel) { this.generatedPojo = generatedPojo; this.name = generatedPojo.getNameAsString(); this.pkgModel = pkgModel; } public String getSource() { String source = JavaParserCompiler.toPojoSource( pkgModel.getName(), pkgModel.getImports(), pkgModel.getStaticImports(), generatedPojo); PackageModel.log(source); return source; } public String getName() { return pkgModel.getPathName() + "/" + name + ".java"; } }
[ "mario.fusco@gmail.com" ]
mario.fusco@gmail.com
490f5a325cd7f6da49dc8a10bc3c89315a5df7d2
9176b0fd29516d34cfd0b143e1c5c0f9e665c0ed
/CS_365_Networking/Project_2/Server.java
4e70a88f44e38d480d1a913df14c16fea53081e9
[]
no_license
Mr-Anderson/james_mst_hw
70dbde80838e299f9fa9c5fcc16f4a41eec8263a
83db5f100c56e5bb72fe34d994c83a669218c962
refs/heads/master
2020-05-04T13:15:25.694979
2011-11-30T20:10:15
2011-11-30T20:10:15
2,639,602
2
0
null
null
null
null
UTF-8
Java
false
false
9,104
java
/* ------------------ Server usage: java Server [RTSP listening port] ---------------------- */ import java.io.*; import java.net.*; import java.awt.*; import java.util.*; import java.awt.event.*; import javax.swing.*; import javax.swing.Timer; public class Server extends JFrame implements ActionListener { //RTP variables: //---------------- DatagramSocket RTPsocket; //socket to be used to send and receive UDP packets DatagramPacket senddp; //UDP packet containing the video frames InetAddress ClientIPAddr; //Client IP address int RTP_dest_port = 0; //destination port for RTP packets (given by the RTSP Client) //GUI: //---------------- JLabel label; //Video variables: //---------------- int imagenb = 0; //image nb of the image currently transmitted VideoStream video; //VideoStream object used to access video frames static int MJPEG_TYPE = 26; //RTP payload type for MJPEG video static int FRAME_PERIOD = 100; //Frame period of the video to stream, in ms static int VIDEO_LENGTH = 500; //length of the video in frames Timer timer; //timer used to send the images at the video frame rate byte[] buf; //buffer used to store the images to send to the client //RTSP variables //---------------- //rtsp states final static int INIT = 0; final static int READY = 1; final static int PLAYING = 2; //rtsp message types final static int SETUP = 3; final static int PLAY = 4; final static int PAUSE = 5; final static int TEARDOWN = 6; static int state; //RTSP Server state == INIT or READY or PLAY Socket RTSPsocket; //socket used to send/receive RTSP messages //input and output stream filters static BufferedReader RTSPBufferedReader; static BufferedWriter RTSPBufferedWriter; static String VideoFileName; //video file requested from the client static int RTSP_ID = 123456; //ID of the RTSP session int RTSPSeqNb = 0; //Sequence number of RTSP messages within the session final static String CRLF = "\r\n"; //-------------------------------- //Constructor //-------------------------------- public Server(){ //init Frame super("Server"); //init Timer timer = new Timer(FRAME_PERIOD, this); timer.setInitialDelay(0); timer.setCoalesce(true); //allocate memory for the sending buffer buf = new byte[15000]; //Handler to close the main window addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { //stop the timer and exit timer.stop(); System.exit(0); }}); //GUI: label = new JLabel("Send frame # ", JLabel.CENTER); getContentPane().add(label, BorderLayout.CENTER); } //------------------------------------ //main //------------------------------------ public static void main(String argv[]) throws Exception { //create a Server object Server theServer = new Server(); //show GUI: theServer.pack(); theServer.setVisible(true); //get RTSP socket port from the command line int RTSPport = Integer.parseInt(argv[0]); //Initiate TCP connection with the client for the RTSP session ServerSocket listenSocket = new ServerSocket(RTSPport); theServer.RTSPsocket = listenSocket.accept(); listenSocket.close(); //Get Client IP address theServer.ClientIPAddr = theServer.RTSPsocket.getInetAddress(); //Initiate RTSPstate state = INIT; //Set input and output stream filters: RTSPBufferedReader = new BufferedReader(new InputStreamReader(theServer.RTSPsocket.getInputStream()) ); RTSPBufferedWriter = new BufferedWriter(new OutputStreamWriter(theServer.RTSPsocket.getOutputStream()) ); //Wait for the SETUP message from the client int request_type; boolean done = false; while(!done) { request_type = theServer.parse_RTSP_request(); //blocking if (request_type == SETUP) { done = true; //update RTSP state state = READY; System.out.println("New RTSP state: READY"); //Send response theServer.send_RTSP_response(); //init the VideoStream object: theServer.video = new VideoStream(VideoFileName); //init RTP socket theServer.RTPsocket = new DatagramSocket(); } } //loop to handle RTSP requests while(true) { //parse the request request_type = theServer.parse_RTSP_request(); //blocking if ((request_type == PLAY) && (state == READY)) { //send back response theServer.send_RTSP_response(); //start timer theServer.timer.start(); //update state state = PLAYING; System.out.println("New RTSP state: PLAYING"); } else if ((request_type == PAUSE) && (state == PLAYING)) { //send back response theServer.send_RTSP_response(); //stop timer theServer.timer.stop(); //update state state = READY; System.out.println("New RTSP state: READY"); } else if (request_type == TEARDOWN) { //send back response theServer.send_RTSP_response(); //stop timer theServer.timer.stop(); //close sockets theServer.RTSPsocket.close(); theServer.RTPsocket.close(); System.exit(0); } } } //------------------------ //Handler for timer //------------------------ public void actionPerformed(ActionEvent e) { //if the current image nb is less than the length of the video if (imagenb < VIDEO_LENGTH) { //update current imagenb imagenb++; try { //get next frame to send from the video, as well as its size int image_length = video.getnextframe(buf); //Builds an RTPpacket object containing the frame RTPpacket rtp_packet = new RTPpacket(MJPEG_TYPE, imagenb, imagenb*FRAME_PERIOD, buf, image_length); //get to total length of the full rtp packet to send int packet_length = rtp_packet.getlength(); //retrieve the packet bitstream and store it in an array of bytes byte[] packet_bits = new byte[packet_length]; rtp_packet.getpacket(packet_bits); //send the packet as a DatagramPacket over the UDP socket senddp = new DatagramPacket(packet_bits, packet_length, ClientIPAddr, RTP_dest_port); RTPsocket.send(senddp); //System.out.println("Send frame #"+imagenb); //print the header bitstream rtp_packet.printheader(); //update GUI label.setText("Send frame #" + imagenb); } catch(Exception ex) { System.out.println("Exception caught: "+ex); System.exit(0); } } else { //if we have reached the end of the video file, stop the timer timer.stop(); } } //------------------------------------ //Parse RTSP Request //------------------------------------ private int parse_RTSP_request() { int request_type = -1; try{ //parse request line and extract the request_type: String RequestLine = RTSPBufferedReader.readLine(); //System.out.println("RTSP Server - Received from Client:"); System.out.println(RequestLine); StringTokenizer tokens = new StringTokenizer(RequestLine); String request_type_string = tokens.nextToken(); //convert to request_type structure: if ((new String(request_type_string)).compareTo("SETUP") == 0) request_type = SETUP; else if ((new String(request_type_string)).compareTo("PLAY") == 0) request_type = PLAY; else if ((new String(request_type_string)).compareTo("PAUSE") == 0) request_type = PAUSE; else if ((new String(request_type_string)).compareTo("TEARDOWN") == 0) request_type = TEARDOWN; if (request_type == SETUP) { //extract VideoFileName from RequestLine VideoFileName = tokens.nextToken(); } //parse the SeqNumLine and extract CSeq field String SeqNumLine = RTSPBufferedReader.readLine(); System.out.println(SeqNumLine); tokens = new StringTokenizer(SeqNumLine); tokens.nextToken(); RTSPSeqNb = Integer.parseInt(tokens.nextToken()); //get LastLine String LastLine = RTSPBufferedReader.readLine(); System.out.println(LastLine); if (request_type == SETUP) { //extract RTP_dest_port from LastLine tokens = new StringTokenizer(LastLine); for (int i=0; i<3; i++) tokens.nextToken(); //skip unused stuff RTP_dest_port = Integer.parseInt(tokens.nextToken()); } //else LastLine will be the SessionId line ... do not check for now. } catch(Exception ex) { System.out.println("Exception caught: "+ex); System.exit(0); } return(request_type); } //------------------------------------ //Send RTSP Response //------------------------------------ private void send_RTSP_response() { try{ RTSPBufferedWriter.write("RTSP/1.0 200 OK"+CRLF); RTSPBufferedWriter.write("CSeq: "+RTSPSeqNb+CRLF); RTSPBufferedWriter.write("Session: "+RTSP_ID+CRLF); RTSPBufferedWriter.flush(); //System.out.println("RTSP Server - Sent response to Client."); } catch(Exception ex) { System.out.println("Exception caught: "+ex); System.exit(0); } } }
[ "calcprogrammer1@gmail.com" ]
calcprogrammer1@gmail.com
3dd1b3c7d879458e572c22d9296c0d72ff653d9f
a8e0ae94be06c6204183ec5966ca1f4e5f94b437
/src/math/problems/Factorial.java
ac0cefa2862e2f1d74f8f89eb4c5818d29d5c818
[]
no_license
farzin2093/Java-MidTerm2021
9c69fe186722a19c8803700c11c96a9067c4b50d
d453e46cc92438ba5f285a321feec470af21281e
refs/heads/master
2023-04-17T17:35:26.890264
2021-05-06T04:12:54
2021-05-06T04:12:54
363,668,894
0
0
null
null
null
null
UTF-8
Java
false
false
1,033
java
package math.problems; public class Factorial { public static void main(String[] args) { /* * Factorial of 5! = 5 x 4 X 3 X 2 X 1 = 120. * Write a java program to find Factorial of a given number using Recursion as well as Iteration. * */ Factorial factorial= new Factorial(); int x= factorial.factorialCalculationWithIteration(5); System.out.println(x); int y =factorial.factorialCalculationWithRecursion(5); System.out.println(y); } public int factorialCalculationWithIteration (int number){ int factorial=1 ; int finalFactorial=1; for(int i=number; i>1; i--) { factorial = i; finalFactorial = factorial *finalFactorial; } return finalFactorial; } public int factorialCalculationWithRecursion(int number){ if (number >= 1){ return number*factorialCalculationWithRecursion(number-1); } else return 1; } }
[ "farzinsheikhlive@gmail.com" ]
farzinsheikhlive@gmail.com
6ac7ce8daf13a468860333ed99b2e0eba15c9173
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/zuiyou/sources/cn/xiaochuankeji/tieba/json/UgcVideoMusicJson.java
2ee59729b7e68aa5bf5c4647bce698536d58c31d
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
2,006
java
package cn.xiaochuankeji.tieba.json; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import cn.xiaochuankeji.tieba.json.imgjson.ServerImgJson; import com.alibaba.fastjson.annotation.JSONField; import java.io.Serializable; import java.util.ArrayList; public class UgcVideoMusicJson implements Parcelable, Serializable { public static final Creator<UgcVideoMusicJson> CREATOR = new Creator<UgcVideoMusicJson>() { public UgcVideoMusicJson createFromParcel(Parcel parcel) { return new UgcVideoMusicJson(parcel); } public UgcVideoMusicJson[] newArray(int i) { return new UgcVideoMusicJson[i]; } }; @JSONField(name = "cid") public long cid; @JSONField(name = "dur") public int dur; @JSONField(name = "favor") public int favor; @JSONField(name = "id") public long id; @JSONField(name = "img") public ServerImgJson img; @JSONField(name = "title") public String musicName; @JSONField(name = "singers") public ArrayList<String> singers; @JSONField(name = "mid") public long uploaderMid; @JSONField(name = "url") public String url; protected UgcVideoMusicJson() { } protected UgcVideoMusicJson(Parcel parcel) { this.id = parcel.readLong(); this.cid = parcel.readLong(); this.url = parcel.readString(); this.musicName = parcel.readString(); this.singers = parcel.createStringArrayList(); this.uploaderMid = parcel.readLong(); this.dur = parcel.readInt(); } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int i) { parcel.writeLong(this.id); parcel.writeLong(this.cid); parcel.writeString(this.url); parcel.writeString(this.musicName); parcel.writeStringList(this.singers); parcel.writeLong(this.uploaderMid); parcel.writeInt(this.dur); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
86d30fea495c7516f89e5f7c016d587943b68907
f61b52e5f7f505a5c960dc7a41553fd9bf55829a
/module-7/Password.java
d13e6118fe64a2ca1ac47b4a94ece719a824cd50
[]
no_license
RustyDeGarmo/CSD320
2d32f5d6d620ae17a1e71ce0b1918f9b7b5dfd94
15e489dbeef9448be95b7d0b35212bd9edd33ac8
refs/heads/main
2023-08-11T16:17:48.584206
2021-10-03T01:38:02
2021-10-03T01:38:02
412,949,846
1
0
null
null
null
null
UTF-8
Java
false
false
2,058
java
/* Rusty DeGarmo Professor Payne Programming with Java 3 July 2021 */ public class Password{ public static void main(String[] args){ String p1 = "helloWorld"; String p2 = "helloworld"; String p3 = "hello"; String p4 = "Hell0W0rld"; verifyPassword(p1); verifyPassword(p2); verifyPassword(p3); verifyPassword(p4); } public static boolean verifyPassword(String password) { //variables to hold bools starting at false boolean hasUpper = false; boolean hasLower = false; boolean hasNumber = false; //check if password is long enough, exit if not if(password.length() < 8){ System.out.println("Password is too short. It must contain at least eight characters."); System.out.println(); return false; } for(int i = 0; i < password.length(); i++) { //get an individual character char c = password.charAt(i); //check if there is at least one uppercase letter //also satisfies at least one letter requirement if(Character.isUpperCase(c)) { hasUpper = true; } //check if there is at least one lowercase letter else if(Character.isLowerCase(c)) { hasLower = true; } //check if there is at least one number else if(Character.isDigit(c)) { hasNumber = true; } } //check if all of the requirements were met if(hasUpper == true && hasLower == true && hasNumber == true) { System.out.println("Your password meets all of the requirements."); System.out.println(); return true; } else{ System.out.println("Your password doesn't meet all of the requirements."); System.out.println("Passwords must be at least 8 characters and contain at least one of each: "); System.out.println("Uppercase letter, lowercase letter, and number"); System.out.println(); return false; } } }
[ "rustydegarmo@yahoo.com" ]
rustydegarmo@yahoo.com
a96b69b97b6bd27fdfea8e2a9a0830cde7d17b51
4ecf7b45b86c42e118903e1ca7f4808e145b0cdd
/jt/jt-cart/src/main/java/com/jt/service/CartServiceImpl.java
60d196c3ca23bd8c72828e0701fd4ac20d98e6b3
[]
no_license
wm199272/DongBa
bc6d67331e4c5e09ddc9688f5cfe9a3ad08c4402
e3bff983ce50d6b6cd8eca9fff0df5eb3da5f286
refs/heads/master
2020-05-21T17:37:13.538033
2019-05-11T15:52:43
2019-05-11T15:52:43
186,126,527
0
0
null
null
null
null
UTF-8
Java
false
false
1,936
java
package com.jt.service; import java.util.Date; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import com.alibaba.dubbo.config.annotation.Service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.jt.mapper.CartMapper; import com.jt.pojo.Cart; @Service public class CartServiceImpl implements CartService { @Autowired private CartMapper cartMapper; @Override public List<Cart> findCartListByUserId(Long userId) { QueryWrapper<Cart> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("user_id", userId); return cartMapper.selectList(queryWrapper); } @Override @Transactional public void updateCartNum(Cart cart) { Cart cartDB = new Cart(); cartDB.setNum(cart.getNum()).setUpdated(new Date()); UpdateWrapper<Cart> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("user_id", cart.getUserId()).eq("item_id", cart.getItemId()); cartMapper.update(cartDB, updateWrapper); } @Override @Transactional public void saveCart(Cart cart) { QueryWrapper<Cart> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("item_id",cart.getItemId()).eq("user_id", cart.getUserId()); Cart cartDB = cartMapper.selectOne(queryWrapper); if(cartDB==null) { cart.setCreated(new Date()).setUpdated(cart.getCreated()); cartMapper.insert(cart); }else { int num = cart.getNum()+cartDB.getNum(); cartDB.setNum(num); cartDB.setUpdated(new Date()); cartMapper.updateById(cartDB); } } @Override @Transactional public void delete(Cart cart) { QueryWrapper<Cart> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("item_id", cart.getItemId()).eq("user_id", cart.getUserId()); cartMapper.delete(queryWrapper); } }
[ "Administrator@192.168.106.1" ]
Administrator@192.168.106.1
c261bf28dd0fca943e741109e8752cec80d613dd
81862a721ea7d9fc230f3b16f916a0cce4784ba3
/app/src/main/java/com/sample/ssheleg/utils/dagger2/scope/ActivityScope.java
8509561970c5a6ee49667025dc7778dfdb143d5d
[]
no_license
ssheleg/android-base-project
fedd9d859628b18512aea9cf452d23f205a9a83c
fc3867fff2746a7c83217351b9932e208632f312
refs/heads/master
2020-06-30T23:30:12.517814
2017-05-12T11:27:53
2017-05-12T11:27:53
74,345,566
4
1
null
null
null
null
UTF-8
Java
false
false
204
java
package com.sample.ssheleg.utils.dagger2.scope; import javax.inject.Scope; /** * Created by Android Ninja Sergey on 17.11.2016. * skype: sergey.sheleg2 */ @Scope public @interface ActivityScope { }
[ "sergeysheleg4@gmail.com" ]
sergeysheleg4@gmail.com
98e1f8c88bc02abd4781ecd410640cf02ea5a68c
3d62bd2eeec3f01b1f8691d4291e579ade5534a9
/src/main/java/com/ex/tw/services/ICitiesService.java
96d479d438f9b8cefbf15e870e50f32f21fadc3a
[]
no_license
acubenchik/reactive
a85279e91451d0b0ee1b733a3641dfc2066a1d55
6c838326e330fcf9e8a15162c2a54aa7616e4514
refs/heads/master
2020-03-23T15:05:46.897181
2018-07-20T14:32:01
2018-07-20T14:32:01
141,722,186
0
0
null
null
null
null
UTF-8
Java
false
false
677
java
package com.ex.tw.services; import com.ex.tw.model.CityResponse; import com.ex.tw.model.Geoname; import io.reactivex.Flowable; import io.reactivex.Single; import retrofit2.http.GET; import retrofit2.http.Query; import java.util.List; public interface ICitiesService { @GET("citiesJSON") Single<CityResponse> queryGeonames(@Query("north") double north, @Query("south") double south, @Query("east") double east, @Query("west") double west, @Query("maxRows") int maxRows, @Query("username") String userName); }
[ "alex.usavchenko@gmail.com" ]
alex.usavchenko@gmail.com
635e0e80474203015a1c3f7bffa92619ba9be097
4e9c5e37a4380d5a11a27781187918a6aa31f3f9
/dse-core-6.7.0/com/datastax/bdp/cassandra/tracing/ClientConnectionMetadata.java
f1ade119b00f1fa227f49aa94b0864abdb4f752a
[]
no_license
jiafu1115/dse67
4a49b9a0d7521000e3c1955eaf0911929bc90d54
62c24079dd5148e952a6ff16bc1161952c222f9b
refs/heads/master
2021-10-11T15:38:54.185842
2019-01-28T01:28:06
2019-01-28T01:28:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,308
java
package com.datastax.bdp.cassandra.tracing; import java.net.InetAddress; import java.util.Objects; public class ClientConnectionMetadata { public final String userId; public final InetAddress clientAddress; public final int clientPort; public final String connectionId; private final int hash; public ClientConnectionMetadata(InetAddress clientAddress, int clientPort, String userId) { this.clientAddress = clientAddress; this.clientPort = clientPort; this.userId = userId; this.connectionId = clientAddress.getHostAddress() + ":" + clientPort; this.hash = Objects.hash(new Object[]{this.connectionId, userId}); } public int hashCode() { return this.hash; } public boolean equals(Object other) { if(other == this) { return true; } else if(!(other instanceof ClientConnectionMetadata)) { return false; } else { ClientConnectionMetadata otherCCM = (ClientConnectionMetadata)other; return Objects.equals(this.connectionId, otherCCM.connectionId) && Objects.equals(this.userId, otherCCM.userId); } } public String toString() { return String.format("ClientConnectionMetadata { 'connectionId':'%s', 'userId':'%s'}", new Object[]{this.connectionId, this.userId}); } }
[ "superhackerzhang@sina.com" ]
superhackerzhang@sina.com
6e46f9b22ee5111fa4da71d427149b6e9a31019e
6a95484a8989e92db07325c7acd77868cb0ac3bc
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201409/cm/GeoTargetTypeSettingNegativeGeoTargetType.java
fdad6346d82cf5a1abba6c21e145cfa41400f5cd
[ "Apache-2.0" ]
permissive
popovsh6/googleads-java-lib
776687dd86db0ce785b9d56555fe83571db9570a
d3cabb6fb0621c2920e3725a95622ea934117daf
refs/heads/master
2020-04-05T23:21:57.987610
2015-03-12T19:59:29
2015-03-12T19:59:29
33,672,406
1
0
null
2015-04-09T14:06:00
2015-04-09T14:06:00
null
UTF-8
Java
false
false
1,376
java
package com.google.api.ads.adwords.jaxws.v201409.cm; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for GeoTargetTypeSetting.NegativeGeoTargetType. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="GeoTargetTypeSetting.NegativeGeoTargetType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="DONT_CARE"/> * &lt;enumeration value="LOCATION_OF_PRESENCE"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "GeoTargetTypeSetting.NegativeGeoTargetType") @XmlEnum public enum GeoTargetTypeSettingNegativeGeoTargetType { /** * * Specifies that a user is excluded from seeing the ad * if either their AOI or their LOP matches the geo target. * * */ DONT_CARE, /** * * Specifies that a user is excluded from seeing the ad * only if their LOP matches the geo target. * * */ LOCATION_OF_PRESENCE; public String value() { return name(); } public static GeoTargetTypeSettingNegativeGeoTargetType fromValue(String v) { return valueOf(v); } }
[ "jradcliff@google.com" ]
jradcliff@google.com
48557d5b84ae95524ae1d93d78a47afa14b24ea6
31f043184e2839ad5c3acbaf46eb1a26408d4296
/src/main/java/com/github/highcharts4gwt/model/highcharts/option/api/plotoptions/funnel/MouseOutEvent.java
dab831fa8aabb36105dbb4f2dbcdb6b4cbe5287f
[]
no_license
highcharts4gwt/highchart-wrapper
52ffa84f2f441aa85de52adb3503266aec66e0ac
0a4278ddfa829998deb750de0a5bd635050b4430
refs/heads/master
2021-01-17T20:25:22.231745
2015-06-30T15:05:01
2015-06-30T15:05:01
24,794,406
1
0
null
null
null
null
UTF-8
Java
false
false
213
java
package com.github.highcharts4gwt.model.highcharts.option.api.plotoptions.funnel; import com.github.highcharts4gwt.model.highcharts.object.api.Series; public interface MouseOutEvent { Series series(); }
[ "ronan.quillevere@gmail.com" ]
ronan.quillevere@gmail.com
12909dd7bcdc5b9ee98e4e08c2ce32f987d28022
d6bd766475fbd87945a6d4c56c828fb0f82e53c2
/src/main/java/com/kwic/security/base64/Base64Decoder.java
e81c2a403fececc358eedc4256da91060fe0233e
[]
no_license
suhojang/TCPforScraping
1d2d66824f5938229fb4c2da37d4d15ffd9e1c6c
f9eab5fd01d8f3e861476c538a150194080d15fb
refs/heads/main
2023-04-13T00:42:21.844097
2021-04-07T06:36:44
2021-04-07T06:36:44
355,095,300
0
0
null
null
null
null
UTF-8
Java
false
false
4,543
java
// Base64Decoder.java // $Id: Base64Decoder.java,v 1.1 1980/01/03 17:02:38 jjh Exp $ // (c) COPYRIGHT MIT and INRIA, 1996. // Please first read the full copyright statement in file COPYRIGHT.html package com.kwic.security.base64; import java.io.* ; /** * Decode a BASE64 encoded input stream to some output stream. * This class implements BASE64 decoding, as specified in the * <a href="http://ds.internic.net/rfc/rfc1521.txt">MIME specification</a>. * @see org.w3c.tools.codec.Base64Encoder */ public class Base64Decoder { private static final int BUFFER_SIZE = 800000 ; InputStream in = null ; OutputStream out = null ; boolean stringp = false ; private final int get1 (byte buf[], int off) { return ((buf[off] & 0x3f) << 2) | ((buf[off+1] & 0x30) >>> 4) ; } private final int get2 (byte buf[], int off) { return ((buf[off+1] & 0x0f) << 4) | ((buf[off+2] &0x3c) >>> 2) ; } private final int get3 (byte buf[], int off) { return ((buf[off+2] & 0x03) << 6) | (buf[off+3] & 0x3f) ; } private final int check (int ch) { if ((ch >= 'A') && (ch <= 'Z')) { return ch - 'A' ; } else if ((ch >= 'a') && (ch <= 'z')) { return ch - 'a' + 26 ; } else if ((ch >= '0') && (ch <= '9')) { return ch - '0' + 52 ; } else { switch (ch) { case '=': return 65 ; case '+': return 62 ; case '/': return 63 ; default: return -1 ; } } } /** * Do the actual decoding. * Process the input stream by decoding it and emiting the resulting bytes * into the output stream. * @exception IOException If the input or output stream accesses failed. * @exception Base64FormatException If the input stream is not compliant * with the BASE64 specification. */ public void process () throws IOException, Base64FormatException { byte buffer[] = new byte[BUFFER_SIZE] ; byte chunk[] = new byte[4] ; int got = -1 ; int ready = 0 ; fill: while ((got = in.read(buffer)) > 0) { int skiped = 0 ; while ( skiped < got ) { // Check for un-understood characters: while ( ready < 4 ) { if ( skiped >= got ) continue fill ; int ch = check (buffer[skiped++]) ; if ( ch >= 0 ) chunk[ready++] = (byte) ch ; } if ( chunk[2] == 65 ) { out.write(get1(chunk, 0)); return ; } else if ( chunk[3] == 65 ) { out.write(get1(chunk, 0)) ; out.write(get2(chunk, 0)) ; return ; } else { out.write(get1(chunk, 0)) ; out.write(get2(chunk, 0)) ; out.write(get3(chunk, 0)) ; } ready = 0 ; } } if ( ready != 0 ) throw new Base64FormatException ("Invalid length.") ; out.flush() ; out.close(); } /** * Do the decoding, and return a String. * This methods should be called when the decoder is used in * <em>String</em> mode. It decodes the input string to an output string * that is returned. * @exception RuntimeException If the object wasn't constructed to * decode a String. * @exception Base64FormatException If the input string is not compliant * with the BASE64 specification. */ public String processString () throws Base64FormatException { if ( ! stringp ) throw new RuntimeException (this.getClass().getName() + "[processString]" + "invalid call (not a String)"); try { process() ; } catch (IOException e) { } return ((ByteArrayOutputStream) out).toString() ; } /** * Create a decoder to decode a String. * @param input The string to be decoded. */ public Base64Decoder (String input) { byte bytes[] = input.getBytes () ; this.stringp = true ; this.in = new ByteArrayInputStream(bytes) ; this.out = new ByteArrayOutputStream () ; } /** * Create a decoder to decode a stream. * @param in The input stream (to be decoded). * @param out The output stream, to write decoded data to. */ public Base64Decoder (InputStream in, OutputStream out) { this.in = in ; this.out = out ; this.stringp = false ; } public Base64Decoder (String input, OutputStream out) { byte bytes[] = input.getBytes () ; this.stringp = true ; this.in = new ByteArrayInputStream(bytes) ; this.out = out ; } }
[ "jsh2808@naver.com" ]
jsh2808@naver.com
901eaac63c3e042ef039a098433ab0e314a94720
94c246850eb2661eccabf0e49b1c46c640000bd6
/src/czj/ssh/action/QueryBookForIndex.java
c0ee32f1f02abb2a5874f3e6df441bd5a837da98
[]
no_license
RinKerman/BookShop
7c6865b55ffb0467493c39b6ca4a7077648a1a5b
6e5b7a7f79fc97ab6910058aff4ca11db31374d7
refs/heads/master
2021-06-19T08:31:32.773152
2017-06-30T03:39:53
2017-06-30T03:39:53
93,596,984
0
0
null
null
null
null
GB18030
Java
false
false
1,398
java
package czj.ssh.action; import java.util.List; import com.opensymphony.xwork2.ActionSupport; import czj.ssh.dao.BookDao; import czj.ssh.model.Book; /* * QueryBookForIndex 查询网站 index 初始化所需要的数据 * 在网页加载的时候显示出来 */ public class QueryBookForIndex extends ActionSupport{ private BookDao bookDao; private List<Book> bookListOfDate; private List<Book> bookListOfSaleAmount; private List<Book> bookListOfRandom; public QueryBookForIndex(){ } public BookDao getBookDao() { return bookDao; } public void setBookDao(BookDao bookDao) { this.bookDao = bookDao; } public List<Book> getBookListOfDate() { return bookListOfDate; } public void setBookListOfDate(List<Book> bookListOfDate) { this.bookListOfDate = bookListOfDate; } public List<Book> getBookListOfSaleAmount() { return bookListOfSaleAmount; } public void setBookListOfSaleAmount(List<Book> bookListOfSaleAmount) { this.bookListOfSaleAmount = bookListOfSaleAmount; } public List<Book> getBookListOfRandom() { return bookListOfRandom; } public void setBookListOfRandom(List<Book> bookListOfRandom) { this.bookListOfRandom = bookListOfRandom; } public String execute(){ bookListOfDate = bookDao.queryBookByDate(); bookListOfSaleAmount = bookDao.queryBookBySaleAmount(); bookListOfRandom = bookDao.queryBookByRandom(); return SUCCESS; } }
[ "243444395@qq.com" ]
243444395@qq.com
b31481560b22084b6cb8dfc20c3ee136e28cdc40
c04e424a5282b06598fe2d6f689f69b2bcf00786
/isap-dao/src/main/java/com/gosun/isap/dao/po/face/ListFilterParaBean.java
159164dc6ed62be6aca19c2e0c6d1a4923edf216
[]
no_license
soon14/isap-parent
859d9c0d4adc0e7d60f92a537769b237c1c5095b
2f6c1ec4e635e08eab57d4df4c92e90e4e09e044
refs/heads/master
2021-12-15T03:09:00.641560
2017-07-26T02:13:40
2017-07-26T02:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,380
java
package com.gosun.isap.dao.po.face; import java.io.Serializable; public class ListFilterParaBean implements Serializable{ private Integer listType; //名单类型(1.黑名单 2.白名单) private String departmentID; //部门ID private String cameraID; //相机ID private String startTime; //开始时间 private String endTime; //结束时间 private Integer start; //页索引 private Integer limit; //一页总数 public Integer getListType() { return listType; } public void setListType(Integer listType) { this.listType = listType; } public String getDepartmentID() { return departmentID; } public void setDepartmentID(String departmentID) { this.departmentID = departmentID; } public String getCameraID() { return cameraID; } public void setCameraID(String cameraID) { this.cameraID = cameraID; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public Integer getStart() { return start; } public void setStart(Integer start) { this.start = start; } public Integer getLimit() { return limit; } public void setLimit(Integer limit) { this.limit = limit; } }
[ "lzk90s@163.com" ]
lzk90s@163.com
b0e2f3eeb3c91666aa13b2b361ed3238467c30ff
112de83b24eecfde2d6db441cc02fd8136058b92
/project1/src/main/java/com/app/shared/organization/locationmanagement/Country.java
d773906e2a0828809925d33064ec7d0a96fc4f35
[]
no_license
applifireAlgo/projecttest
759fff04be4ec26588d38c7dfc719eb5d59613d2
38c51c344f492aacc8ea380f3bc901ae12da3a87
refs/heads/master
2021-01-20T18:58:42.878440
2016-06-13T06:18:43
2016-06-13T06:18:43
60,839,059
0
0
null
null
null
null
UTF-8
Java
false
false
11,093
java
package com.app.shared.organization.locationmanagement; import com.app.config.annotation.Complexity; import com.app.config.annotation.SourceCodeAuthorClass; import com.athena.server.pluggable.interfaces.CommonEntityInterface; import java.io.Serializable; import java.util.Comparator; import javax.persistence.Entity; import javax.persistence.Table; import org.eclipse.persistence.annotations.Cache; import org.eclipse.persistence.annotations.CacheType; import org.eclipse.persistence.config.CacheIsolationType; import com.fasterxml.jackson.annotation.JsonProperty; import javax.persistence.Column; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import javax.validation.constraints.Min; import javax.validation.constraints.Max; import javax.persistence.Transient; import javax.persistence.GeneratedValue; import javax.persistence.Id; import com.athena.server.pluggable.utils.helper.EntityValidatorHelper; import com.fasterxml.jackson.annotation.JsonIgnore; import javax.persistence.Version; import com.app.shared.EntityAudit; import javax.persistence.Embedded; import com.app.shared.SystemInfo; import java.lang.Override; import javax.persistence.NamedQueries; @Table(name = "ast_Country_M") @Entity @Cache(type = CacheType.CACHE, isolation = CacheIsolationType.ISOLATED) @SourceCodeAuthorClass(createdBy = "taran2789@gmail.com", updatedBy = "taran2789@gmail.com", versionNumber = "2", comments = "Country", complexity = Complexity.LOW) @NamedQueries({ @javax.persistence.NamedQuery(name = "Country.DefaultFinders", query = "select e from Country e where e.systemInfo.activeStatus=1 and e.countryName LIKE :countryName and e.countryCode1 LIKE :countryCode1"), @javax.persistence.NamedQuery(name = "Country.findById", query = "select e from Country e where e.systemInfo.activeStatus=1 and e.countryId =:countryId") }) public class Country implements Serializable, CommonEntityInterface, Comparator<Country> { @Column(name = "countryName") @JsonProperty("countryName") @NotNull @Size(min = 0, max = 128) private String countryName; @Column(name = "countryCode1") @JsonProperty("countryCode1") @Size(min = 0, max = 3) private String countryCode1; @Column(name = "countryCode2") @JsonProperty("countryCode2") @Size(min = 0, max = 3) private String countryCode2; @Column(name = "countryFlag") @JsonProperty("countryFlag") @Size(min = 0, max = 64) private String countryFlag; @Column(name = "capital") @JsonProperty("capital") @Size(min = 0, max = 32) private String capital; @Column(name = "currencyCode") @JsonProperty("currencyCode") @Size(min = 0, max = 3) private String currencyCode; @Column(name = "currencyName") @JsonProperty("currencyName") @Size(min = 0, max = 128) private String currencyName; @Column(name = "currencySymbol") @JsonProperty("currencySymbol") @Size(min = 0, max = 32) private String currencySymbol; @Column(name = "capitalLatitude") @JsonProperty("capitalLatitude") @Min(0) @Max(11) private Integer capitalLatitude; @Column(name = "capitalLongitude") @JsonProperty("capitalLongitude") @Min(0) @Max(11) private Integer capitalLongitude; @Column(name = "isoNumeric") @JsonProperty("isoNumeric") @Min(0) @Max(1000) private Integer isoNumeric; @Transient private String primaryKey; @Id @Column(name = "countryId") @JsonProperty("countryId") @GeneratedValue(generator = "UUIDGenerator") @Size(min = 0, max = 64) private String countryId; @Transient @JsonIgnore private EntityValidatorHelper<Object> entityValidator; @Version @Column(name = "versionId") @JsonProperty("versionId") private int versionId; @Embedded @JsonIgnore private EntityAudit entityAudit = new EntityAudit(); @Embedded private SystemInfo systemInfo = new SystemInfo(); @Transient private String primaryDisplay; public String getCountryName() { return countryName; } public void setCountryName(String _countryName) { if (_countryName != null) { this.countryName = _countryName; } } public String getCountryCode1() { return countryCode1; } public void setCountryCode1(String _countryCode1) { this.countryCode1 = _countryCode1; } public String getCountryCode2() { return countryCode2; } public void setCountryCode2(String _countryCode2) { this.countryCode2 = _countryCode2; } public String getCountryFlag() { return countryFlag; } public void setCountryFlag(String _countryFlag) { this.countryFlag = _countryFlag; } public String getCapital() { return capital; } public void setCapital(String _capital) { this.capital = _capital; } public String getCurrencyCode() { return currencyCode; } public void setCurrencyCode(String _currencyCode) { this.currencyCode = _currencyCode; } public String getCurrencyName() { return currencyName; } public void setCurrencyName(String _currencyName) { this.currencyName = _currencyName; } public String getCurrencySymbol() { return currencySymbol; } public void setCurrencySymbol(String _currencySymbol) { this.currencySymbol = _currencySymbol; } public Integer getCapitalLatitude() { return capitalLatitude; } public void setCapitalLatitude(Integer _capitalLatitude) { this.capitalLatitude = _capitalLatitude; } public Integer getCapitalLongitude() { return capitalLongitude; } public void setCapitalLongitude(Integer _capitalLongitude) { this.capitalLongitude = _capitalLongitude; } public Integer getIsoNumeric() { return isoNumeric; } public void setIsoNumeric(Integer _isoNumeric) { this.isoNumeric = _isoNumeric; } public String getPrimaryKey() { return countryId; } public void setPrimaryKey(String _primaryKey) { this.primaryKey = _primaryKey; } public String _getPrimarykey() { return countryId; } public String getCountryId() { return countryId; } public void setCountryId(String _countryId) { this.countryId = _countryId; } public int getVersionId() { return versionId; } public void setVersionId(int _versionId) { this.versionId = _versionId; } public void setPrimaryDisplay(String _primaryDisplay) { this.primaryDisplay = _primaryDisplay; } public SystemInfo getSystemInfo() { return systemInfo; } public void setSystemInfo(SystemInfo _systemInfo) { this.systemInfo = _systemInfo; } @JsonIgnore public boolean isHardDelete() { if (this.systemInfo == null) { this.systemInfo = new SystemInfo(); } if (this.systemInfo.getActiveStatus() == -1) { return true; } else { return false; } } @JsonIgnore @Override public boolean isValid() throws SecurityException { boolean isValid = false; if (this.entityValidator != null) { isValid = this.entityValidator.validateEntity(this); this.systemInfo.setEntityValidated(true); } else { throw new java.lang.SecurityException(); } return isValid; } @Override public void setEntityValidator(EntityValidatorHelper<Object> _validateFactory) { this.entityValidator = _validateFactory; } @Override public void setEntityAudit(int customerId, String userId, RECORD_TYPE recordType) { System.out.println("Setting logged in user info for " + recordType); if (entityAudit == null) { entityAudit = new EntityAudit(); } if (recordType == RECORD_TYPE.ADD) { this.entityAudit.setCreatedBy(userId); this.entityAudit.setUpdatedBy(userId); } else { this.entityAudit.setUpdatedBy(userId); } setSystemInformation(recordType); } @Override public void setEntityAudit(int customerId, String userId) { if (entityAudit == null) { entityAudit = new EntityAudit(); } if (getPrimaryKey() == null) { this.entityAudit.setCreatedBy(userId); this.entityAudit.setUpdatedBy(userId); this.systemInfo.setActiveStatus(1); } else { this.entityAudit.setUpdatedBy(userId); } } @JsonIgnore public String getLoggedInUserInfo() { String auditInfo = ""; if (this.entityAudit != null) { auditInfo = entityAudit.toString(); } return auditInfo; } @Override @JsonIgnore public void setSystemInformation(RECORD_TYPE recordType) { if (systemInfo == null) { systemInfo = new SystemInfo(); } if (recordType == RECORD_TYPE.DELETE) { this.systemInfo.setActiveStatus(0); } else { this.systemInfo.setActiveStatus(1); } } @JsonIgnore public void setSystemInformation(Integer activeStatus) { this.systemInfo.setActiveStatus(activeStatus); } @JsonIgnore public String getSystemInformation() { String systemInfo = ""; if (this.systemInfo != null) { systemInfo = systemInfo.toString(); } return systemInfo; } @Override @JsonIgnore public void setSystemTxnCode(Integer transactionAccessCode) { if (systemInfo == null) { systemInfo = new SystemInfo(); } this.systemInfo.setTxnAccessCode(transactionAccessCode); } @Override public int compare(Country object1, Country object2) { return 0; } public String getPrimaryDisplay() { StringBuilder sb = new StringBuilder(); sb.append(""); sb.append((countryName == null ? " " : countryName)); return sb.toString(); } public String toString() { return getPrimaryDisplay(); } public int hashCode() { if (countryId == null) { return super.hashCode(); } else { return countryId.hashCode(); } } public boolean equals(Object obj) { try { com.app.shared.organization.locationmanagement.Country other = (com.app.shared.organization.locationmanagement.Country) obj; if (countryId == null) { return false; } else if (!countryId.equals(other.countryId)) { return false; } } catch (java.lang.Exception ignore) { return false; } return true; } @JsonIgnore @Override public boolean isEntityValidated() { return this.systemInfo.isEntityValidated(); } }
[ "applifire@9dadbf43d66a" ]
applifire@9dadbf43d66a
b0b20702520ba332c03fe3dc8a186942f69ea177
0f43560c526c89ecc0596d4daa0fab45063c135c
/src/main/java/com/zjw/smallioc/beans/io/ResourceLoader.java
8fe2405b7a1fc1c4c6a6ea7a33505f82c9895225
[]
no_license
XiaoXia001/small-spring
f6e7b2829f672799ae5ad854232641da433ab4bc
c6e5dda10a7a4cd15a059dc9cfdeb85959f26d6d
refs/heads/master
2021-07-06T15:52:06.105548
2019-08-20T12:21:59
2019-08-20T12:21:59
190,680,260
0
0
null
2020-10-13T13:44:30
2019-06-07T02:55:03
Java
UTF-8
Java
false
false
333
java
package com.zjw.smallioc.io; import java.net.URL; public class ResourceLoader { /** * 获取URL * @param location * @return */ public Resource getResource(String location){ URL resource = this.getClass().getClassLoader().getResource(location); return new UrlResource(resource); } }
[ "391753186@qq.com" ]
391753186@qq.com
ff6da06ab721707ce5777e91969f588afb6b0436
3e8b3464408ef1e8532f3e64fea5b667ea200d87
/asdata/src/main/java/com/wanzhong/data/po/scar/ScarDetailsPo.java
21db8c02e1faee90c5da33e1e2c5b6ee98f7e93d
[]
no_license
zhangZev/WifiManApp
12d24b3172950305662d3e1562bda7e5424c8be9
421a5f947980b76355f210fae58cadc5bbb07c67
refs/heads/master
2022-12-30T07:59:49.801597
2020-10-19T02:51:07
2020-10-19T02:51:07
305,244,077
0
0
null
null
null
null
UTF-8
Java
false
false
7,686
java
package com.wanzhong.data.po.scar; import com.wanzhong.common.util.StringUtil; import com.wanzhong.common.util.SysContants; import java.io.Serializable; import java.util.List; /** * 车源车辆详情 */ public class ScarDetailsPo implements Serializable { /** * key_id : 20190829000001 * imgDatas : ["https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11","https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11","https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11","https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11","https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11","https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11","https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11","https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11","https://testwww.wanzhong.xin/common/queryFile?keyId=5cac17ce8721630f684eea11"] * trademark : 雪铁龙 * demio_name : 爱丽舍 * motorcycle_type : 2018款 改款 1.6L 手动舒适型 * cc : 3.0T * shelf_id : 4RTJG84JT94KYU4KD * engine_number : R4TEE3RT4 * begin_register_dt : 2019-08-06 * maturity_dt : 2019-08-01 * demio_color : 白色 * interior_color : 黑色 * use_nature : 非营运 * travel_mileage : 200 * assigned_count : 1 * price : 11.28 * same_price : 80.88 * tdesc : 经检测,该车排除火烧情况;转向柱浮锈;全车地胶地毯脏污;排除调表情况;骨架完好,排除事故车;发动机舱内部机械部件正常,无拆卸渗漏痕迹;详细结果请查看检测报告。 * status : 0 * hall_status : 仓库 * age : 1 * is_m_shop : 是否添加到微店 0 否 1是 * is_m_same : 是否同行发布 0 否 1 是 * seller_dt : 出售时间 */ private String key_id; private String trademark; private String demio_name; private String motorcycle_type; private String cc; private String shelf_id; private String engine_number; private String begin_register_dt; private String maturity_dt; private String demio_color; private String interior_color; private String use_nature; private String travel_mileage; private String assigned_count; private String price; private String same_price; private String tdesc; private String status; private String hall_status; private String age; private String phone; private List<String> imgDatas; private String is_m_shop; private String is_m_same; private String seller_dt; public String getKey_id() { return key_id; } public void setKey_id(String key_id) { this.key_id = key_id; } public String getTrademark() { return StringUtil.changeNullDefault(trademark); } public void setTrademark(String trademark) { this.trademark = trademark; } public String getDemio_name() { return StringUtil.changeNullDefault(demio_name); } public void setDemio_name(String demio_name) { this.demio_name = demio_name; } public String getMotorcycle_type() { return StringUtil.changeNullDefault(motorcycle_type); } public void setMotorcycle_type(String motorcycle_type) { this.motorcycle_type = motorcycle_type; } public String getCc() { return StringUtil.changeNullDefault(cc); } public void setCc(String cc) { this.cc = cc; } public String getShelf_id() { return StringUtil.changeNullDefault(shelf_id); } public void setShelf_id(String shelf_id) { this.shelf_id = shelf_id; } public String getEngine_number() { return StringUtil.changeNullDefault(engine_number); } public void setEngine_number(String engine_number) { this.engine_number = engine_number; } public String getBegin_register_dt() { return StringUtil.changeNullDefault(begin_register_dt); } public void setBegin_register_dt(String begin_register_dt) { this.begin_register_dt = begin_register_dt; } public String getMaturity_dt() { return StringUtil.changeNullDefault(maturity_dt); } public void setMaturity_dt(String maturity_dt) { this.maturity_dt = maturity_dt; } public String getDemio_color() { return StringUtil.changeNullDefault(demio_color); } public void setDemio_color(String demio_color) { this.demio_color = demio_color; } public String getInterior_color() { return StringUtil.changeNullDefault(interior_color); } public void setInterior_color(String interior_color) { this.interior_color = interior_color; } public String getUse_nature() { return StringUtil.changeNullDefault(use_nature); } public void setUse_nature(String use_nature) { this.use_nature = use_nature; } public String getTravel_mileage() { return StringUtil.changeNullDefault(travel_mileage); } public void setTravel_mileage(String travel_mileage) { this.travel_mileage = travel_mileage; } public String getAssigned_count() { return StringUtil.changeNullDefault(assigned_count); } public void setAssigned_count(String assigned_count) { this.assigned_count = assigned_count; } public String getPrice() { return StringUtil.formatDecimal2(price); } public void setPrice(String price) { this.price = price; } public String getSame_price() { return StringUtil.formatDecimal2(same_price); } public void setSame_price(String same_price) { this.same_price = same_price; } public String getTdesc() { return StringUtil.changeNullDefault(tdesc); } public void setTdesc(String tdesc) { this.tdesc = tdesc; } public String getStatus() { return StringUtil.changeNull(status); } public void setStatus(String status) { this.status = status; } public String getHall_status() { return StringUtil.changeNull(hall_status); } public void setHall_status(String hall_status) { this.hall_status = hall_status; } public String getAge() { return StringUtil.changeNull(age); } public void setAge(String age) { this.age = age; } public List<String> getImgDatas() { return imgDatas; } public void setImgDatas(List<String> imgDatas) { this.imgDatas = imgDatas; } public String getPhone() { return StringUtil.changeNull(phone); } public void setPhone(String phone) { this.phone = phone; } public String getIs_m_shop() { return StringUtil.changeNull(is_m_shop); } public void setIs_m_shop(String is_m_shop) { this.is_m_shop = is_m_shop; } public String getIs_m_same() { return StringUtil.changeNull(is_m_same); } public void setIs_m_same(String is_m_same) { this.is_m_same = is_m_same; } /**是否已经上架微店*/ public boolean isMShop(){ return SysContants.CHAR_1.equals(getIs_m_shop()); } /**是否已经同行发布*/ public boolean isMSame(){ return SysContants.CHAR_1.equals(getIs_m_same()); } public String getSeller_dt() { return StringUtil.changeNullDefault(seller_dt); } public void setSeller_dt(String seller_dt) { this.seller_dt = seller_dt; } }
[ "328237790@qq.com" ]
328237790@qq.com
97fc4b476e5c1835f1d962d22775e3a83b70f5fe
9bc8bcdd68be81f93b62665bec21afe59beeed76
/src/main/java/com/spring/controller/OrderItemConroller.java
ef2416c5e17023caf38e57185b71e70b6b1d915f
[]
no_license
sarita2505/order-item-app1
452456bfa5ca677b04b21582530c065bec2fbacb
37befb4a5667d2edf856a83bc7d43671a52887d1
refs/heads/master
2022-11-12T11:50:04.182606
2020-07-09T14:49:30
2020-07-09T14:49:30
278,392,168
0
0
null
null
null
null
UTF-8
Java
false
false
1,708
java
package com.spring.controller; import com.spring.model.OrderItem; import com.spring.service.IOrderItemService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController public class OrderItemConroller { @Autowired private IOrderItemService itemService; @PostMapping("/orderItems") public ResponseEntity<Integer> saveData(@RequestBody OrderItem item) { Integer i = itemService.save(item); return ResponseEntity.ok(i); } @PutMapping("/orderItems/{id}") public ResponseEntity<Integer> updateData(@RequestBody OrderItem item, @PathVariable("id") Integer id) { Integer i = itemService.update(item,id); return ResponseEntity.ok(i); } @DeleteMapping("/orderItems/{id}") public ResponseEntity<Integer> deleteData(@PathVariable("id") Integer id) { Integer i = itemService.delete(id); return ResponseEntity.ok(i); } @GetMapping("/orderItems") public ResponseEntity<List> getAllData() { List<OrderItem> orderData = itemService.selectAll(); return ResponseEntity.ok(orderData); } @GetMapping("/orderItems/order/{orderId}") public ResponseEntity<List> getAllData(@PathVariable("orderId") Integer orderId) { List<OrderItem> orderData = itemService.selectAll(orderId); return ResponseEntity.ok(orderData); } @GetMapping("/orderItems/{id}") public ResponseEntity<OrderItem> getById(@PathVariable("id") Integer id) { OrderItem data1 = itemService.selectById(id); return ResponseEntity.ok(data1); } }
[ "sourabha.patra@in.ibm.com" ]
sourabha.patra@in.ibm.com
86bb32519f30f371d81469dec75ff391ce2c80d3
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/3.6.2/common/src/main/java/com/tc/util/Stack.java
7a74d0e8ee54a25f5ad79e119ac3de42df906107
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
3,450
java
/** * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright * notice. All rights reserved. */ package com.tc.util; import java.util.ArrayList; import java.util.EmptyStackException; import java.util.Iterator; import java.util.List; /* * This stack implementation uses ArrayList internally. This is mainly created so that we don't have synchronization * overheads that java.util.Stack imposes since it is based on Vector. This class maintains an interface level * compatibility with java.util.Stack but doesn't implement all of Vector interfaces. */ public class Stack<T> { private final List<T> list = new ArrayList<T>(); /** * Creates an empty Stack. */ public Stack() { // Creates an empty Stack. } /** * Pushes an item onto the top of this stack. This has exactly the same effect as: <blockquote> * * @param item the item to be pushed onto this stack. * @return the <code>item</code> argument. * @see java.util.Vector#addElement */ public T push(T item) { list.add(item); return item; } /** * Removes the object at the top of this stack and returns that object as the value of this function. * * @return The object at the top of this stack (the last item of the <tt>Vector</tt> object). * @exception EmptyStackException if this stack is empty. */ public T pop() { int len = size(); if (len == 0) throw new EmptyStackException(); return list.remove(len - 1); } /** * Looks at the object at the top of this stack without removing it from the stack. * * @return the object at the top of this stack (the last item of the <tt>Vector</tt> object). * @exception EmptyStackException if this stack is empty. */ public T peek() { int len = size(); if (len == 0) throw new EmptyStackException(); return list.get(len - 1); } /** * Tests if this stack is empty. * * @return <code>true</code> if and only if this stack contains no items; <code>false</code> otherwise. */ public boolean empty() { return size() == 0; } /** * Size of this Stack * * @return the size of the stack */ public int size() { return list.size(); } /** * Returns the 1-based position where an object is on this stack. If the object <tt>o</tt> occurs as an item in this * stack, this method returns the distance from the top of the stack of the occurrence nearest the top of the stack; * the topmost item on the stack is considered to be at distance <tt>1</tt>. The <tt>equals</tt> method is used to * compare <tt>o</tt> to the items in this stack. * * @param o the desired object. * @return the 1-based position from the top of the stack where the object is located; the return value * <code>-1</code> indicates that the object is not on the stack. */ public int search(T o) { int i = list.lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; } /* I am not in big favor of having these interfaces */ public T get(int index) { return list.get(index); } public T remove(int index) { return list.remove(index); } public Iterator<T> iterator() { return list.iterator(); } public boolean isEmpty() { return empty(); } public boolean contains(T o) { return list.contains(o); } public boolean remove(T o) { return list.remove(o); } }
[ "hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864
c2b2d3aeb5af62a9b5f23591dd366d0e3525fa7b
944b4f8e8067134be878b73952536ba0c65745c8
/datalife-b2c/src/main/java/com/datalife/entities/BangaloreDoctorDb.java
34a36af88de13168fd7ff146576d32e945fbb379
[]
no_license
jsskmd/testing
f419dda3d316a408abbb14440f04ba42e30a0c0b
d776e94416354e30d6a296372706f2faccd82813
refs/heads/master
2020-05-29T08:52:02.900872
2016-09-28T07:32:55
2016-09-28T07:32:55
69,364,155
0
0
null
null
null
null
UTF-8
Java
false
false
2,767
java
package com.datalife.entities; import org.hibernate.annotations.DynamicUpdate; import javax.persistence.*; import java.io.Serializable; /** * Created by barath on 10/5/2015. */ @DynamicUpdate @Entity @Table(name = "BangaloreDoctorDb", uniqueConstraints = { @UniqueConstraint(columnNames = "id")}) public class BangaloreDoctorDb implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", unique = true, nullable = false) private Long id; @Column(name = "docName") private String docName; @Column(name = "clinicName") private String clinicName; @Column(name = "qualification") private String qualification; @Column(name = "experience") private String experience; @Column(name = "Specialty") private String Specialty; @Column(name = "address") private String address; @Column(name = "location") private String location; @Column(name = "city") private String city; @Column(name = "zipcode") private String zipcode; @Column(name = "state") private String state; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDocName() { return docName; } public void setDocName(String docName) { this.docName = docName; } public String getClinicName() { return clinicName; } public void setClinicName(String clinicName) { this.clinicName = clinicName; } public String getQualification() { return qualification; } public void setQualification(String qualification) { this.qualification = qualification; } public String getExperience() { return experience; } public void setExperience(String experience) { this.experience = experience; } public String getSpecialty() { return Specialty; } public void setSpecialty(String specialty) { Specialty = specialty; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getZipcode() { return zipcode; } public void setZipcode(String zipcode) { this.zipcode = zipcode; } public String getState() { return state; } public void setState(String state) { this.state = state; } }
[ "juneed@datascribetech.com" ]
juneed@datascribetech.com
dfea2d71074e11004980c98bbad78dbe306df612
95a54e3f3617bf55883210f0b5753b896ad48549
/java_src/com/google/zxing/maxicode/decoder/DecodedBitStreamParser.java
e6ccc229dd27aba670c5dd9e6c10c587d487db95
[]
no_license
aidyk/TagoApp
ffc5a8832fbf9f9819f7f8aa7af29149fbab9ea5
e31a528c8f931df42075fc8694754be146eddc34
refs/heads/master
2022-12-22T02:20:58.486140
2021-05-16T07:42:02
2021-05-16T07:42:02
325,695,453
3
1
null
2022-12-16T00:32:10
2020-12-31T02:34:45
Smali
UTF-8
Java
false
false
7,018
java
package com.google.zxing.maxicode.decoder; import com.google.zxing.common.DecoderResult; import java.text.DecimalFormat; /* access modifiers changed from: package-private */ public final class DecodedBitStreamParser { private static final char ECI = 65530; private static final char FS = 28; private static final char GS = 29; private static final char LATCHA = 65527; private static final char LATCHB = 65528; private static final char LOCK = 65529; private static final char NS = 65531; private static final char PAD = 65532; private static final char RS = 30; private static final String[] SETS = {"\nABCDEFGHIJKLMNOPQRSTUVWXYZ\u001c\u001d\u001e \"#$%&'()*+,-./0123456789:￱￲￳￴￸", "`abcdefghijklmnopqrstuvwxyz\u001c\u001d\u001e{}~;<=>?[\\]^_ ,./:@!|￵￶￰￲￳￴￷", "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚ\u001c\u001d\u001eÛÜÝÞߪ¬±²³µ¹º¼½¾€‚ƒ„…†‡ˆ‰￷ ￳￴￸", "àáâãäåæçèéêëìíîïðñòóôõö÷øùú\u001c\u001d\u001eûüýþÿ¡¨«¯°´·¸»¿Š‹ŒŽ‘’“”￷ ￲￴￸", "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001fŸ ¢£¤¥¦§©­®¶•–—˜™š›œž￷ ￲￳￸", "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?"}; private static final char SHIFTA = 65520; private static final char SHIFTB = 65521; private static final char SHIFTC = 65522; private static final char SHIFTD = 65523; private static final char SHIFTE = 65524; private static final char THREESHIFTA = 65526; private static final char TWOSHIFTA = 65525; private DecodedBitStreamParser() { } static DecoderResult decode(byte[] bArr, int i) { String str; StringBuilder sb = new StringBuilder(144); switch (i) { case 2: case 3: if (i == 2) { str = new DecimalFormat("0000000000".substring(0, getPostCode2Length(bArr))).format((long) getPostCode2(bArr)); } else { str = getPostCode3(bArr); } DecimalFormat decimalFormat = new DecimalFormat("000"); String format = decimalFormat.format((long) getCountry(bArr)); String format2 = decimalFormat.format((long) getServiceClass(bArr)); sb.append(getMessage(bArr, 10, 84)); if (!sb.toString().startsWith("[)>\u001e01\u001d")) { sb.insert(0, str + GS + format + GS + format2 + GS); break; } else { sb.insert(9, str + GS + format + GS + format2 + GS); break; } case 4: sb.append(getMessage(bArr, 1, 93)); break; case 5: sb.append(getMessage(bArr, 1, 77)); break; } return new DecoderResult(bArr, sb.toString(), null, String.valueOf(i)); } private static int getBit(int i, byte[] bArr) { int i2 = i - 1; return ((1 << (5 - (i2 % 6))) & bArr[i2 / 6]) == 0 ? 0 : 1; } private static int getInt(byte[] bArr, byte[] bArr2) { if (bArr2.length != 0) { int i = 0; for (int i2 = 0; i2 < bArr2.length; i2++) { i += getBit(bArr2[i2], bArr) << ((bArr2.length - i2) - 1); } return i; } throw new IllegalArgumentException(); } private static int getCountry(byte[] bArr) { return getInt(bArr, new byte[]{53, 54, 43, 44, 45, 46, 47, 48, 37, 38}); } private static int getServiceClass(byte[] bArr) { return getInt(bArr, new byte[]{55, 56, 57, 58, 59, 60, 49, 50, 51, 52}); } private static int getPostCode2Length(byte[] bArr) { return getInt(bArr, new byte[]{39, 40, 41, 42, 31, 32}); } private static int getPostCode2(byte[] bArr) { return getInt(bArr, new byte[]{33, 34, 35, 36, 25, 26, 27, 28, 29, 30, 19, 20, 21, 22, 23, 24, 13, 14, 15, 16, 17, 18, 7, 8, 9, 10, 11, 12, 1, 2}); } private static String getPostCode3(byte[] bArr) { return String.valueOf(new char[]{SETS[0].charAt(getInt(bArr, new byte[]{39, 40, 41, 42, 31, 32})), SETS[0].charAt(getInt(bArr, new byte[]{33, 34, 35, 36, 25, 26})), SETS[0].charAt(getInt(bArr, new byte[]{27, 28, 29, 30, 19, 20})), SETS[0].charAt(getInt(bArr, new byte[]{21, 22, 23, 24, 13, 14})), SETS[0].charAt(getInt(bArr, new byte[]{15, 16, 17, 18, 7, 8})), SETS[0].charAt(getInt(bArr, new byte[]{9, 10, 11, 12, 1, 2}))}); } /* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */ private static String getMessage(byte[] bArr, int i, int i2) { StringBuilder sb = new StringBuilder(); int i3 = i; int i4 = 0; int i5 = -1; int i6 = 0; while (i3 < i + i2) { char charAt = SETS[i4].charAt(bArr[i3]); switch (charAt) { case 65520: case 65521: case 65522: case 65523: case 65524: i6 = i4; i4 = charAt - SHIFTA; i5 = 1; break; case 65525: i5 = 2; i6 = i4; i4 = 0; break; case 65526: i5 = 3; i6 = i4; i4 = 0; break; case 65527: i4 = 0; i5 = -1; break; case 65528: i4 = 1; i5 = -1; break; case 65529: i5 = -1; break; case 65530: default: sb.append(charAt); break; case 65531: int i7 = i3 + 1; int i8 = i7 + 1; int i9 = i8 + 1; int i10 = i9 + 1; i3 = i10 + 1; sb.append(new DecimalFormat("000000000").format((long) ((bArr[i7] << 24) + (bArr[i8] << 18) + (bArr[i9] << 12) + (bArr[i10] << 6) + bArr[i3]))); break; } int i11 = i5 - 1; if (i5 == 0) { i4 = i6; } i3++; i5 = i11; } while (sb.length() > 0 && sb.charAt(sb.length() - 1) == 65532) { sb.setLength(sb.length() - 1); } return sb.toString(); } }
[ "ai@AIs-MacBook-Pro.local" ]
ai@AIs-MacBook-Pro.local