blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2
values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82
values | src_encoding stringclasses 28
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 7 5.41M | extension stringclasses 11
values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5a14e9b11427790858bf281dd4d8734b5d058d62 | 6a131227e10365f5869431bf1c89743039c0cd42 | /src/com/gl/app/resources/HelloResource.java | 911ca29fd84aa1a6b3f3b725d977ef13584bad88 | [] | no_license | woweiwangzhe/Demo5 | c800b3929e86db862e6e22c377e85e90b5b1b565 | 44e99413d1ab0e5812422c0c4fd80aef522420a1 | refs/heads/master | 2021-05-04T08:50:44.020209 | 2018-05-07T05:46:03 | 2018-05-07T05:46:03 | 70,372,133 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 382 | java | package com.gl.app.resources;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.springframework.stereotype.Controller;
@Path("/hello")
@Controller
public class HelloResource {
@Path("/say")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String sayHello() {
return "Hello Jersey";
}
}
| [
"wangshuai@yuuxin.com"
] | wangshuai@yuuxin.com |
0b5b27e5b62f28f4c1c5d718d019619ff2cd90e5 | 5a54c558f73e8b59936d1086b8fc830510fff0f5 | /src/com/bengreenier/blackhole/util/Port.java | 690d037b706de8eec542b3d15936a0fef0bfe6ea | [] | no_license | bengreenier-archive/blackhole | 924558a1b30efa742522e3f27b5f9575ec1f3323 | 38185d8dee5ecb7f2b28697e44cb8203fd265e01 | refs/heads/master | 2021-05-27T23:14:26.715052 | 2013-02-23T18:32:34 | 2013-02-23T18:32:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 324 | java | package com.bengreenier.blackhole.util;
/**
* Define some statics we need
* pertaining to port data.
* @author B3N
*
*/
public class Port {
public static final int DEFAULT = 53535;
private static int nextPort = DEFAULT;
public static int getNext() {
nextPort++;
return nextPort;
}
}
| [
"mygithub@b3nhub.com"
] | mygithub@b3nhub.com |
87dbdbe52fa40549a0dd9d8d8dc1aa81216c54bc | 0950aaf650474370a635fc374d272098a6ad9fc7 | /api/src/main/java/equipmentManagementSystem/controller/EquipmentController.java | 6a2c17654441cb1dd60a3e7f4f69e6c2f92bee7f | [] | no_license | JinCheng4917/equipmentManagementSystem | 49c5fdfc2174d3ad8608d9a97aa8ae9ec37ee43a | 39774a224a237b540b194df17f59517363181a59 | refs/heads/main | 2023-01-28T19:57:14.375679 | 2020-12-16T05:10:24 | 2020-12-16T05:10:24 | 307,049,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,067 | java | package equipmentManagementSystem.controller;
import com.fasterxml.jackson.annotation.JsonView;
import equipmentManagementSystem.entity.Department;
import equipmentManagementSystem.entity.Equipment;
import equipmentManagementSystem.entity.Type;
import equipmentManagementSystem.entity.User;
import equipmentManagementSystem.service.EquipmentService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("equipment")
public class EquipmentController {
private final EquipmentService equipmentService;
public EquipmentController(EquipmentService equipmentService) {
this.equipmentService = equipmentService;
}
@GetMapping("getAll")
@JsonView(Department.UserJsonView.class)
public Page<Equipment> page(@RequestParam int page, @RequestParam int size) {
return this.equipmentService.findAll(PageRequest.of(page, size));
}
@GetMapping("getToRepair")
@JsonView(Department.UserJsonView.class)
public Page<Equipment> getToRepair(@RequestParam int page, @RequestParam int size) {
return this.equipmentService.getToRepair(PageRequest.of(page, size));
}
@GetMapping("getBorrow")
@JsonView(Department.UserJsonView.class)
public Page<Equipment> getBorrow(@RequestParam int page, @RequestParam int size) {
return this.equipmentService.getBorrow(PageRequest.of(page, size));
}
@PutMapping("{id}")
@JsonView(Department.UserJsonView.class)
public Equipment update(@PathVariable Long id, @RequestBody Equipment equipment) {
return this.equipmentService.update(id, equipment);
}
@GetMapping("{id}")
@JsonView(Department.UserJsonView.class)
public Equipment getEquipmentById(@PathVariable Long id) {
return this.equipmentService.getEquipmentById(id);
}
@GetMapping("query")
@JsonView(Department.UserJsonView.class)
public Page<Equipment> findAll(
@RequestParam(required = false) String name,
@RequestParam(required = false) String internalNumber,
@RequestParam(required = false) String place,
@RequestParam(required = false) Long states,
@RequestParam(required = false) Long type,
Pageable pageable) {
return this.equipmentService.quaryAll(
name,
states,
place,
internalNumber,
pageable,
type);
}
@PostMapping
public void add(@RequestBody Equipment equipment) {
this.equipmentService.add(equipment);
}
@DeleteMapping("{id}")
public void delete(@PathVariable Long id) {
this.equipmentService.delete(id);
}
@PutMapping("report/{id}")
@JsonView(Department.UserJsonView.class)
public Equipment report(@PathVariable Long id, @RequestBody Equipment equipment) {
return this.equipmentService.report(id, equipment);
}
@PutMapping("borrow/{id}")
@JsonView(Department.UserJsonView.class)
public Equipment borrow(@PathVariable Long id, @RequestBody Equipment equipment) {
return this.equipmentService.borrow(id, equipment);
}
@PutMapping("return/{id}")
@JsonView(Department.UserJsonView.class)
public Equipment toReturn(@PathVariable Long id, @RequestBody Equipment equipment) {
return this.equipmentService.toReturn(id, equipment);
}
@PutMapping("repair/{id}")
@JsonView(Department.UserJsonView.class)
public Equipment repair(@PathVariable Long id, @RequestBody Equipment equipment) {
return this.equipmentService.repair(id, equipment);
}
@PutMapping("scrap/{id}")
@JsonView(Department.UserJsonView.class)
public Equipment scrap(@PathVariable Long id, @RequestBody Equipment equipment) {
return this.equipmentService.scrap(id, equipment);
}
} | [
"3300491785@qq.com"
] | 3300491785@qq.com |
37941dbec4848794cd9145276149f43638336669 | 04ca10adb5c0d3e156d72d54233cc257f9c8cd9d | /Login/app/src/androidTest/java/com/codepath/login/ExampleInstrumentedTest.java | 8313e2434fd4729fb6956a33e9e75024febc2fb5 | [] | no_license | senthilag/PersonalRepo | ca15687574f0275d063b5048907d3e83efe5c0c7 | 299f46e40136ed8b3ba6fa10a9b245258fd4f7a7 | refs/heads/master | 2021-01-11T17:52:52.784829 | 2017-01-27T18:57:41 | 2017-01-27T18:57:41 | 79,858,369 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 740 | java | package com.codepath.login;
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.codepath.login", appContext.getPackageName());
}
}
| [
"senthilg@yahoo-inc.com"
] | senthilg@yahoo-inc.com |
df8db4b81a6c42d305320203ec2b489289253e9a | 9768c03271577f1b515253cd39e25dd62c0303e8 | /FSWWW/src/main/java/fscms/cmm/util/AES256Helper.java | d2ea352c4040bddad6c183fe6dcc8dfdd2caf1ca | [] | no_license | sstrov/bike2020 | 4fd07e2683473b3c6d827eb34aa8ac9f590447df | f09b3c42f51ecd21b1f536636661106d99202d00 | refs/heads/master | 2022-11-29T02:18:47.216792 | 2020-08-11T11:01:50 | 2020-08-11T11:01:50 | 286,677,681 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,511 | java | package fscms.cmm.util;
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
public class AES256Helper {
private String iv;
private Key keySpec;
/**
* AES256 설정 솔트 일련번호로 암호화 키 생성
* @param key : 솔트 일련번호
* @throws UnsupportedEncodingException
*/
public AES256Helper(String key) throws UnsupportedEncodingException {
this.iv = key.substring(0, 16);
byte[] keyBytes = new byte[16];
byte[] b = key.getBytes("UTF-8");
int len = b.length;
if (len > keyBytes.length) {
len = keyBytes.length;
}
System.arraycopy(b, 0, keyBytes, 0, len);
SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES");
this.keySpec = keySpec;
}
/**
* @Method Name : encode
* @작성일 : 2019. 10. 1.
* @작성자 : Edmund
* @변경이력 :
* @Method 설명 : 암호화
*/
public String encode(String str) throws InvalidKeyException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException {
Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding");
c.init(Cipher.ENCRYPT_MODE, keySpec, new IvParameterSpec(iv.getBytes()));
byte[] encrypted = c.doFinal(str.getBytes("UTF-8"));
String enStr = new String(Base64.encodeBase64(encrypted));
return enStr;
}
/**
* @Method Name : decode
* @작성일 : 2019. 10. 1.
* @작성자 : Edmund
* @변경이력 :
* @Method 설명 : 복호화
*/
public String decode(String str) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException {
Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding");
c.init(Cipher.DECRYPT_MODE, keySpec, new IvParameterSpec(iv.getBytes("UTF-8")));
byte[] byteStr = Base64.decodeBase64(str.getBytes());
return new String(c.doFinal(byteStr), "UTF-8");
}
}
| [
"me@DESKTOP-CTNRMB6"
] | me@DESKTOP-CTNRMB6 |
ca430ba6f3d383bcf3d0dc17f0060c59c2f099d7 | e2c7f9d3ed11f5632a1b96029dfa85d8a2f55963 | /src/edu/ucsb/cs56/w16/drawings/georgelieu/advanced/CoffeeCup.java | a0aeaeffebffdac9b4ba19fad77fe03c44319802 | [
"MIT"
] | permissive | vincenicoara/W16-lab04 | 59dde14ddae8d7f25f2e74728298f7f0d75d22be | 7c9dd1bf837b81d955fd75c702e56f300f2188d5 | refs/heads/master | 2021-01-15T11:44:36.328281 | 2016-02-05T01:09:16 | 2016-02-05T01:09:16 | 49,993,856 | 0 | 13 | MIT | 2023-07-03T03:05:31 | 2016-01-20T00:50:19 | Java | UTF-8 | Java | false | false | 2,843 | java | package edu.ucsb.cs56.w16.drawings.georgelieu.advanced;
import java.awt.geom.GeneralPath; // combinations of lines and curves
import java.awt.Shape; // general class for shapes
import edu.ucsb.cs56.w16.drawings.utilities.ShapeTransforms;
import edu.ucsb.cs56.w16.drawings.utilities.GeneralPathWrapper;
/**
A Coffee Cup (wrapper around a General Path, implements Shape)
This provides an example of how you can start with the coordinates
of a hard coded object, and end up with an object that can be
drawn anywhere, with any width or height.
@author Phill Conrad
@version for CS56, W16, UCSB
*/
public class CoffeeCup extends GeneralPathWrapper implements Shape
{
/**
* Constructor for objects of class CoffeeCup
*/
public CoffeeCup(double x, double y, double width, double height)
{
// Specify the upper left corner, and the
// width and height of the original points used to
// plot the *hard-coded* coffee cup
final double ORIG_ULX = 100.0;
final double ORIG_ULY = 100.0;
final double ORIG_HEIGHT = 300.0;
final double ORIG_WIDTH = 400.0;
GeneralPath leftSide = new GeneralPath();
// left side of cup
leftSide.moveTo(200,400);
leftSide.lineTo(160,360);
leftSide.lineTo(130,300);
leftSide.lineTo(100,200);
leftSide.lineTo(100,100);
GeneralPath topAndBottom = new GeneralPath();
topAndBottom.moveTo(100,100);
topAndBottom.lineTo(500,100); // top of cup
topAndBottom.moveTo(200,400);
topAndBottom.lineTo(400,400); // bottom of cup
Shape rightSide = ShapeTransforms.horizontallyFlippedCopyOf(leftSide);
// after flipping around the upper left hand corner of the
// bounding box, we move this over to the right by 400 pixels
rightSide = ShapeTransforms.translatedCopyOf(rightSide, 400.0, 0.0);
// now we put the whole thing together ino a single path.
GeneralPath wholeCup = new GeneralPath ();
wholeCup.append(topAndBottom, false);
wholeCup.append(leftSide, false);
wholeCup.append(rightSide, false);
// translate to the origin by subtracting the original upper left x and y
// then translate to (x,y) by adding x and y
Shape s = ShapeTransforms.translatedCopyOf(wholeCup, -ORIG_ULX + x, -ORIG_ULY + y);
// scale to correct height and width
s = ShapeTransforms.scaledCopyOf(s,
width/ORIG_WIDTH,
height/ORIG_HEIGHT) ;
// Use the GeneralPath constructor that takes a shape and returns
// it as a general path to set our instance variable cup
this.set(new GeneralPath(s));
}
}
| [
"georgelieu@umail.ucsb.edu"
] | georgelieu@umail.ucsb.edu |
dcec645bf735f3a2c775e1b3f918e5fcf8ba4f90 | de8f4f39225500c8de8167444978bed7d4725ad0 | /jspider/src/jspider/pt2.java | 2f56a5dfdeafc308b0afc76ca053e825cef88b6f | [] | no_license | pawankumarsharm/java | 1b56f7c404d6efe27b247177e0662ea8c8a34c19 | bdfa3fce19f459677f16cf88c34b62dad87ef3d6 | refs/heads/master | 2020-07-15T21:15:32.347342 | 2019-09-01T08:40:51 | 2019-09-01T08:40:51 | 176,570,691 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 559 | java | package jspider;
import java.util.Scanner;
public class pt2 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("enter the number");
int n=sc.nextInt();
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print("* ");
}
System.out.println();
}
// *
// * *
// * * *
// * * * *
// * * * * *
}
}
/*for(int i=0;i<=n;i++)
{
for(int j=0;j<=n-i;j++)
{
if(i>j)
System.out.print("*");
else
System.out.print(" ");
}
System.out.println();
* */
| [
"kumarsharmapawan190@gmail.com"
] | kumarsharmapawan190@gmail.com |
4ec60cf094d31fbd8aa600dcaa6cc7951142d0d9 | 53b88d0e2ab61aa00d42e83866b88daa42113df5 | /algorithms/quiz/GameOfLife.java | f9e6c96dd682bc9e1669886bc56756219404d746 | [] | no_license | Shajan/CS | 93c24dd011cfff4a97fc2c003207a6373266fb7d | 8b32426d66167f3cba3815164447ae324e9107af | refs/heads/master | 2023-07-18T20:48:30.259772 | 2023-07-10T16:20:39 | 2023-07-10T16:21:35 | 3,363,252 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,015 | java | import java.io.Console;
import java.util.*;
class GameOfLife {
private int rows, cols;
private byte[][] state;
private int iteration;
private GameOfLife(int rows, int cols) {
this.rows = rows;
this.cols = cols;
this.state = new byte[2][];
this.state[0] = new byte[(int)Math.ceil((double)(rows*cols)/8)];
this.state[1] = new byte[(int)Math.ceil((double)(rows*cols)/8)];
}
private byte[] live() { return state[iteration%2]; }
private byte[] next() { return state[(iteration + 1)%2]; }
private int offset(int row, int col) { return rows*row + col; }
private int index(int offset) { return offset/8; }
private byte mask(int offset) { return (byte)((byte)1 << (offset%8)); }
private boolean isLive(int row, int col) {
byte[] s = live();
int offs = offset(row, col);
return ((s[index(offs)] & mask(offs)) != 0);
}
private void setLive(int row, int col) {
byte[] s = next();
int offs = offset(row, col);
int idx = index(offs);
s[idx] |= mask(offs);
}
private void setDead(int row, int col) {
byte[] s = next();
int offs = offset(row, col);
int idx = index(offs);
s[idx] &= ~mask(offs);
}
private boolean isValid(int row, int col) {
return (row >= 0 && row < rows && col >= 0 && col < cols);
}
private int neighbours(int row, int col) {
int count = 0;
for (int i=row-1; i<=row+1; ++i) {
for (int j=col-1; j<=col+1; ++j) {
if (i == row && j == col)
continue;
if (isValid(i, j) && isLive(i, j))
++count;
}
}
return count;
}
private void advance() {
for (int i=0; i<rows; ++i) {
for (int j=0; j<cols; ++j) {
int count = neighbours(i, j);
if (isLive(i, j)) {
if (count < 2 || count > 3)
setDead(i, j);
else
setLive(i, j);
} else {
if (count == 3)
setLive(i, j);
else
setDead(i, j);
}
}
}
++iteration;
}
private void initCursor() {
System.out.print(String.format("%c[%d;%df", 0x1B, 0, 0));
}
private void print() {
initCursor();
System.out.println(iteration);
for (int i=0; i<rows; ++i) {
System.out.print(String.format("%2d:[", i));
for (int j=0; j<cols; ++j) {
System.out.print(isLive(i,j) ? "O" : ".");
}
System.out.println("]");
}
}
private void trace() {
print();
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
//console.readLine();
}
private void init() {
Random rand = new Random();
for (int i=0; i<rows; ++i)
for (int j=0; j<cols; ++j)
if (rand.nextInt(4) == 0)
setLive(i, j);
iteration = 1;
}
public static void main(String[] args) {
Console console = System.console();
GameOfLife gol = new GameOfLife(35, 120);
gol.init();
gol.trace();
for (int i=0; i<100; ++i) {
gol.advance();
gol.trace();
}
}
}
| [
"sdasan@twitter.com"
] | sdasan@twitter.com |
91dbd92e26245f058f5e15279d02ee31d54c4bad | dc0ba34949ddac155843cf042950e23a38502020 | /app/src/main/java/com/example/kvin/bollywoodlisting/LruBitmapCache.java | e9737e8b746adcac4a12cb1b0efb1fafe101285f | [] | no_license | kaustubh87/YoutubePlayerAPI | 7464b1122efea099e7364aab28033fe7027fb2ad | 5da7dcfff1fff4f13c6da38efb38ba6c72498f3f | refs/heads/master | 2021-01-10T08:48:09.310313 | 2016-02-27T04:15:22 | 2016-02-27T04:15:22 | 51,894,395 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 991 | java | package com.example.kvin.bollywoodlisting;
import android.graphics.Bitmap;
import android.util.LruCache;
import com.android.volley.toolbox.ImageLoader;
/**
* Created by kvin on 2/15/16.
*/
public class LruBitmapCache extends LruCache<String, Bitmap> implements ImageLoader.ImageCache {
public static int getDefaultLruCacheSize() {
final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
final int cacheSize = maxMemory / 8;
return cacheSize;
}
public LruBitmapCache() {
this(getDefaultLruCacheSize());
}
public LruBitmapCache(int sizeInKiloBytes) {
super(sizeInKiloBytes);
}
@Override
protected int sizeOf(String key, Bitmap value) {
return value.getRowBytes() * value.getHeight() / 1024;
}
@Override
public Bitmap getBitmap(String url) {
return get(url);
}
@Override
public void putBitmap(String url, Bitmap bitmap) {
put(url, bitmap);
}
} | [
"kaustubh87@gmail.com"
] | kaustubh87@gmail.com |
a350d3a995d29648e316b04bf3f5a85d8ebeee9a | b35c20bad802803e43af47218b8f415d1f08df1c | /app/src/main/java/turtleraine/sandbox/com/lifequest/helpers/error_handling/Try.java | 6b605d88e8381513e07f5cdf5ae6efa775b9cbbb | [] | no_license | Misterturtle/LifeQuest | cd6368c97ae0371683205235f474a1b85e33e1d6 | 9d23a2b857786b7eec8393d523736780d8047a04 | refs/heads/master | 2020-04-28T01:26:36.630744 | 2019-03-15T20:16:52 | 2019-03-15T20:16:52 | 174,857,027 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | package turtleraine.sandbox.com.lifequest.helpers.error_handling;
import java.util.function.Supplier;
public class Try<T> {
public TryResult<T> Try(Supplier<T> functionToTry) {
try {
T functionResult = functionToTry.get();
Success<T> success = new Success<>(functionResult);
return success;
} catch (Exception e) {
return new Failure(e);
}
}
}
| [
"Ryan@conaway58.com"
] | Ryan@conaway58.com |
eefed3b5ba6950d8139cd212d4135d41ead88300 | ac0928649286946b742223ed3385d3f736b05ab8 | /app/src/main/java/com/favesolution/jktotw/Adapters/ShareAdapter.java | 30c49b2716a0b73b7b64446eb8012397559b519b | [] | no_license | danielhermawan/JktOtw | b52e7c98f767fa5df842d90d79e99d335482fb45 | 0b1ca8ed98ccc2c31ca6520e2b62d4828f806d33 | refs/heads/master | 2021-06-03T08:12:39.589539 | 2016-09-09T07:31:40 | 2016-09-09T07:31:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,236 | java | package com.favesolution.jktotw.Adapters;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.favesolution.jktotw.R;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* Created by Daniel on 11/8/2015 for JktOtw project.
*/
public class ShareAdapter extends RecyclerView.Adapter<ShareAdapter.ShareHolder> {
private List<ResolveInfo> mInfos;
private Context mContext;
private String mMessage;
private Uri mUriImage;
public ShareAdapter(Context context,List<ResolveInfo> infos,String message,Uri uriImage) {
mContext=context;
mInfos = infos;
mMessage = message;
mUriImage = uriImage;
}
@Override
public ShareHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
View v = inflater.inflate(R.layout.list_shares,parent,false);
return new ShareHolder(v);
}
@Override
public void onBindViewHolder(ShareHolder holder, int position) {
ResolveInfo resolveInfo = mInfos.get(position);
holder.bindShareItems(resolveInfo,mContext,mMessage,mUriImage);
}
@Override
public int getItemCount() {
return mInfos.size();
}
class ShareHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
@Bind(R.id.icon_share)ImageView mImageIcon;
@Bind(R.id.text_name_share) TextView mTextName;
private ResolveInfo mResolveInfo;
private String mMessage;
private Context mContext;
private Uri mUriImage;
public ShareHolder(View itemView) {
super(itemView);
ButterKnife.bind(this,itemView);
itemView.setOnClickListener(this);
}
public void bindShareItems(ResolveInfo resolveInfo,Context context,String message,Uri uriImage) {
mResolveInfo = resolveInfo;
mMessage = message;
mContext = context;
mUriImage = uriImage;
PackageManager pm = context.getPackageManager();
String appName = resolveInfo.loadLabel(pm).toString();
Drawable icon = resolveInfo.loadIcon(pm);
mTextName.setText(appName);
mImageIcon.setImageDrawable(icon);
}
@Override
public void onClick(View v) {
ActivityInfo activityInfo = mResolveInfo.activityInfo;
Intent i = new Intent();
i.setAction(Intent.ACTION_SEND);
i.putExtra(Intent.EXTRA_TEXT, mMessage);
i.putExtra(Intent.EXTRA_STREAM,mUriImage);
i.setType("image/*");
i.setClassName(activityInfo.applicationInfo.packageName,
activityInfo.name);
mContext.startActivity(i);
}
}
}
| [
"danielhermawan96@gmail.com"
] | danielhermawan96@gmail.com |
c9a46bcbef9b898f2dbbc3b9c6431eef58399bee | 488b31007e5f57ed625d22e2eb55397577b38956 | /src/main/PeopleStore.java | 21757e649fe55261a699f3a5c03e5a9443a23721 | [] | no_license | sn1p3r46/introsde-2015-assignment-1 | 722d689549a589b6a1fbdc3ef9625fb0066f26f9 | b958ca2526bfac8eaf74d29917a51ec1710f4771 | refs/heads/master | 2021-01-10T03:34:34.191224 | 2015-12-22T03:57:56 | 2015-12-22T03:57:56 | 44,643,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 820 | java | package main;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import models.Person;
import javax.xml.bind.annotation.*;
/**
* Created by alexander on 21/10/15.
*/
@XmlRootElement(name="people")
@XmlAccessorType(XmlAccessType.FIELD)
public class PeopleStore {
@XmlElementWrapper(name="peopleList")
@XmlElement(name="person")
private List<Person> data = new ArrayList<Person>();
public PeopleStore () {
}
public List<Person> getData() {
return data;
}
public void setData(List<Person> data) {
this.data = data;
}
} | [
"kingokongo46@gmail.com"
] | kingokongo46@gmail.com |
d7fdf7633b6847074655857e7304b4ef286df319 | 057088eec8e77416fcb7ae3db535d0ef5c3fcded | /app/src/main/java/com/aefottt/redrockwinterworkqt/contract/LoginContract.java | 5e36ae69a70d1c7255dedac6935956fbd12c1429 | [] | no_license | sulv9/RedRockWinterWorkQt | 5a3915fdefd94ad748b198d96140cd233e8e9794 | c3dbf01849312996aae05b7af2b9002a05a4c04b | refs/heads/main | 2023-03-07T01:24:39.116263 | 2021-02-21T13:56:44 | 2021-02-21T13:56:44 | 331,507,507 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 927 | java | package com.aefottt.redrockwinterworkqt.contract;
import android.widget.TextView;
import com.aefottt.redrockwinterworkqt.base.BaseView;
import com.aefottt.redrockwinterworkqt.model.LoginModelCallback;
import java.util.Map;
public interface LoginContract {
interface Model{
// 请求发送并处理结果
void onLoginOrRegister(String url, Map<String, String> account, LoginModelCallback callback);
}
interface View{
// 登录或注册成功
void loginOrRegisterSuccess();
// 登录或注册失败
void loginOrRegisterFail();
}
interface Presenter{
// 发送登录或者注册请求
void sendHttpRequest(String url, Map<String, String> account);
// 检查用户填入信息是否符合要求
boolean checkEtInfo(String username, String password, String passwordAgain, TextView tipTv);
}
}
| [
"aefottt@outlook.com"
] | aefottt@outlook.com |
caa4fa17e584f5e8e98b24a3aac64b9a23be02d6 | be200fa25382b56ee0cb39d1eb6dfc182a6712f8 | /13 - Interfacey Bits/src/simsgame/SimsGamesConsole.java | fb400ac22a760f63424b68f5344d31055e45c2f6 | [] | no_license | ht450/programming-module-eclipse-workspace | 0c810429a13984b84109fbac4c39d9ee18eac2d7 | 7a3252ea0dd5086520856f8f1364061f6e952373 | refs/heads/main | 2023-03-20T16:52:29.219676 | 2021-03-08T11:59:42 | 2021-03-08T11:59:42 | 345,641,062 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,799 | java | /**
*
*/
package simsgame;
import java.util.ArrayList;
/**
* @author Hugh
*
*/
public class SimsGamesConsole {
/**
* @param args
*/
public static void main(String[] args) {
// create people
Person diner1 = new Person("Zayne");
Person diner2 = new Person("Claire");
ArrayList<Person> diners = new ArrayList<Person>();
diners.add(diner1);
diners.add(diner2);
// create pests
IPest pest1 = new HouseFly();
IPest pest2 = new HouseFly();
IPest pest3 = new HouseFly();
IPest pest4 = new Telesales();
IPest pest5 = new Telesales();
IPest pest6 = new Baby("Neil");
// how to see the underlying structure
//HouseFly houseFly = (HouseFly) pest1;
//houseFly.getInsectType();
ArrayList<IPest> dinnerPests = new ArrayList<IPest>();
dinnerPests.add(pest1);
dinnerPests.add(pest2);
dinnerPests.add(pest3);
dinnerPests.add(pest4);
dinnerPests.add(pest5);
// dinner time
DiningRoom dinnerTime = new DiningRoom(diners, dinnerPests);
System.out.println("Dinner Time : ");
dinnerTime.serveFood();
// breakfast time
ArrayList<IPest> breakfastPests = new ArrayList<IPest>();
breakfastPests.add(pest1);
DiningRoom breakfastTime = new DiningRoom(diners, breakfastPests);
System.out.println("\nBreakfast : ");
breakfastTime.serveFood();
// added baby
ArrayList<IPest> dinnerPestsWithChild = new ArrayList<IPest>();
dinnerPestsWithChild.add(pest1);
dinnerPestsWithChild.add(pest2);
dinnerPestsWithChild.add(pest3);
dinnerPestsWithChild.add(pest4);
dinnerPestsWithChild.add(pest5);
dinnerPestsWithChild.add(pest6);
DiningRoom dinnerWithChild = new DiningRoom(diners, dinnerPestsWithChild);
System.out.println("\nBaby is in bed... Time for food...");
dinnerWithChild.serveFood();
}
}
| [
"59090167+ht450@users.noreply.github.com"
] | 59090167+ht450@users.noreply.github.com |
3fb210bc5287cacc48256f914c8e7728de283543 | 9c65761ffd98125b400f6ef78e21bc0cb2e24449 | /src/main/java/kirilin/dev/sparkstarter/unsafe/FilterTransformationOfficer.java | 678892363adb267fde52b102f6a543aa042784ff | [] | no_license | DmitryFullStack/multi-handler | 89f9b0e895ffb79eb8876bde1b66e8d7fe45a996 | ef9af0097919ae4459d87cbc1f750eb3ad132fe0 | refs/heads/main | 2023-04-20T14:42:40.365688 | 2021-05-23T20:46:32 | 2021-05-23T20:46:32 | 370,153,419 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 848 | java | package kirilin.dev.sparkstarter.unsafe;
import javafx.util.Pair;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import java.util.*;
@Component("findBy")
@RequiredArgsConstructor
public class FilterTransformationOfficer implements TransformationOfficer {
private final Map<String, FilterTransformation> transformationMap;
@Override
public Pair<SparkTransformation, List<String>> createTransformation(List<String> remainingWords, Set<String> fieldNames) {
String fieldName = WordsMatcher.findAndRemoveMatchingPiecesIfExists(fieldNames, remainingWords);
String filterName = WordsMatcher.findAndRemoveMatchingPiecesIfExists(transformationMap.keySet(), remainingWords);
return new Pair<>(transformationMap.get(filterName), Collections.singletonList(fieldName));
}
}
| [
"d.kirilin@amg-bs.ru"
] | d.kirilin@amg-bs.ru |
1defe41f2d5dbfd39477dfcfa3e88f1ee5d3ce27 | b6c6dd059b452e3a0dc23a02e7c42193096f4c55 | /src/main/java/com/accenture/ws/OrderApplication.java | 576c03895526e2c41a0c8cfd9b8f74748b42259d | [] | no_license | jcmagnaye/DevOpsAPI | 5bdc3bf79d578021f8e230e4682c20578599d240 | f3dfee23bac13bd383f9bd0cc456ebbfe294227f | refs/heads/master | 2023-06-13T09:03:54.226461 | 2021-07-08T07:23:04 | 2021-07-08T07:23:04 | 384,037,286 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 661 | java | package com.accenture.ws;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@SpringBootApplication
public class OrderApplication extends SpringBootServletInitializer{
public static void main(String[] args) {
SpringApplication.run(OrderApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
{
return application.sources(OrderApplication.class);
}
}
| [
"john.c.magnaye@accenture.com"
] | john.c.magnaye@accenture.com |
37b91565544a4f3c226c310e436308c06cac061c | 4c9d35da30abf3ec157e6bad03637ebea626da3f | /eclipse/libs_src/org/spongycastle/asn1/cryptopro/GOST3410NamedParameters.java | a0f9b582e4302965de30e269fb8b4c414a536795 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"Apache-2.0"
] | permissive | youweixue/RipplePower | 9e6029b94a057e7109db5b0df3b9fd89c302f743 | 61c0422fa50c79533e9d6486386a517565cd46d2 | refs/heads/master | 2020-04-06T04:40:53.955070 | 2015-04-02T12:22:30 | 2015-04-02T12:22:30 | 33,860,735 | 0 | 0 | null | 2015-04-13T09:52:14 | 2015-04-13T09:52:11 | null | UTF-8 | Java | false | false | 5,496 | java | package org.spongycastle.asn1.cryptopro;
import java.math.BigInteger;
import java.util.Enumeration;
import java.util.Hashtable;
import org.spongycastle.asn1.ASN1ObjectIdentifier;
/**
* table of the available named parameters for GOST 3410-94.
*/
public class GOST3410NamedParameters {
static final Hashtable objIds = new Hashtable();
static final Hashtable params = new Hashtable();
static final Hashtable names = new Hashtable();
static private GOST3410ParamSetParameters cryptoProA = new GOST3410ParamSetParameters(
1024,
new BigInteger(
"127021248288932417465907042777176443525787653508916535812817507265705031260985098497423188333483401180925999995120988934130659205614996724254121049274349357074920312769561451689224110579311248812610229678534638401693520013288995000362260684222750813532307004517341633685004541062586971416883686778842537820383"),
new BigInteger(
"68363196144955700784444165611827252895102170888761442055095051287550314083023"),
new BigInteger(
"100997906755055304772081815535925224869841082572053457874823515875577147990529272777244152852699298796483356699682842027972896052747173175480590485607134746852141928680912561502802222185647539190902656116367847270145019066794290930185446216399730872221732889830323194097355403213400972588322876850946740663962")
// validationAlgorithm {
// algorithm
// id-GostR3410-94-bBis,
// parameters
// GostR3410-94-ValidationBisParameters: {
// x0 1376285941,
// c 3996757427
// }
// }
);
static private GOST3410ParamSetParameters cryptoProB = new GOST3410ParamSetParameters(
1024,
new BigInteger(
"139454871199115825601409655107690713107041707059928031797758001454375765357722984094124368522288239833039114681648076688236921220737322672160740747771700911134550432053804647694904686120113087816240740184800477047157336662926249423571248823968542221753660143391485680840520336859458494803187341288580489525163"),
new BigInteger(
"79885141663410976897627118935756323747307951916507639758300472692338873533959"),
new BigInteger(
"42941826148615804143873447737955502392672345968607143066798112994089471231420027060385216699563848719957657284814898909770759462613437669456364882730370838934791080835932647976778601915343474400961034231316672578686920482194932878633360203384797092684342247621055760235016132614780652761028509445403338652341")
// validationAlgorithm {
// algorithm
// id-GostR3410-94-bBis,
// parameters
// GostR3410-94-ValidationBisParameters: {
// x0 1536654555,
// c 1855361757,
// d 14408629386140014567655
// 4902939282056547857802241461782996702017713059974755104394739915140
// 6115284791024439062735788342744854120601660303926203867703556828005
// 8957203818114895398976594425537561271800850306
// }
// }
// }
);
static private GOST3410ParamSetParameters cryptoProXchA = new GOST3410ParamSetParameters(
1024,
new BigInteger(
"142011741597563481196368286022318089743276138395243738762872573441927459393512718973631166078467600360848946623567625795282774719212241929071046134208380636394084512691828894000571524625445295769349356752728956831541775441763139384457191755096847107846595662547942312293338483924514339614727760681880609734239"),
new BigInteger(
"91771529896554605945588149018382750217296858393520724172743325725474374979801"),
new BigInteger(
"133531813272720673433859519948319001217942375967847486899482359599369642528734712461590403327731821410328012529253871914788598993103310567744136196364803064721377826656898686468463277710150809401182608770201615324990468332931294920912776241137878030224355746606283971659376426832674269780880061631528163475887"));
static {
params.put(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_A,
cryptoProA);
params.put(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_B,
cryptoProB);
// params.put(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_C,
// cryptoProC);
// params.put(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_D,
// cryptoProD);
params.put(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_XchA,
cryptoProXchA);
// params.put(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_XchB,
// cryptoProXchA);
// params.put(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_XchC,
// cryptoProXchA);
objIds.put("GostR3410-94-CryptoPro-A",
CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_A);
objIds.put("GostR3410-94-CryptoPro-B",
CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_B);
objIds.put("GostR3410-94-CryptoPro-XchA",
CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_XchA);
}
/**
* return the GOST3410ParamSetParameters object for the given OID, null if
* it isn't present.
*
* @param oid
* an object identifier representing a named parameters, if
* present.
*/
public static GOST3410ParamSetParameters getByOID(ASN1ObjectIdentifier oid) {
return (GOST3410ParamSetParameters) params.get(oid);
}
/**
* returns an enumeration containing the name strings for parameters
* contained in this structure.
*/
public static Enumeration getNames() {
return objIds.keys();
}
public static GOST3410ParamSetParameters getByName(String name) {
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier) objIds.get(name);
if (oid != null) {
return (GOST3410ParamSetParameters) params.get(oid);
}
return null;
}
public static ASN1ObjectIdentifier getOID(String name) {
return (ASN1ObjectIdentifier) objIds.get(name);
}
}
| [
"longwind2012@hotmail.com"
] | longwind2012@hotmail.com |
b2bad3282eb3023238193a922eb4e16c9436905d | e8fb2cb60fce9ed55a66c1add1026906ae414b4a | /src/com/cp/dao/impl/AllInformDAOImpl.java | a08e4394c1e45b39214b5876576b5d23d5e783c4 | [] | no_license | CodeDaMoWang/company | 62210850214dabf8c70881f879edf8fa648ef9a5 | 223f5213015d378f410039f2c09acf28017b2fe4 | refs/heads/master | 2021-09-01T05:17:53.599037 | 2017-12-25T02:18:32 | 2017-12-25T02:18:32 | 115,294,006 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,000 | java | package com.cp.dao.impl;
import com.cp.dao.AllInformDAO;
import com.cp.model.AllInform;
import com.cp.utils.JDBCUtil;
import java.sql.Date;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by 徐鹏 on 2017/12/19.
*/
public class AllInformDAOImpl implements AllInformDAO {
private JDBCUtil jdbcUtil = JDBCUtil.getInitJDBCUtil();
//查询
@Override
public List<AllInform> getAll() throws SQLException {
String sql = "SELECT * FROM t_all_inform ";
List<Object> list = jdbcUtil.excuteQuery(sql, null);
return getAllInformList(list);
}
//新增
@Override
public int insertAll(AllInform allInform) throws SQLException {
String sql = "INSERT INTO t_all_inform VALUES (null,?,?,?,?) ";
Object[] params = {allInform.getSenderNumber(),allInform.getInformTitle(),allInform.getInformContent(),allInform.getSendDate()};
int n = jdbcUtil.executeUpdate(sql, params);
return n;
}
//删除
@Override
public int deleteAll(int id, String senderNumber) throws SQLException {
String sql = "DELETE FROM t_all_inform WHERE id = ? AND senderNumber = ? ";
Object[] params = {id,senderNumber};
int n = jdbcUtil.executeUpdate(sql, params);
return n;
}
//查询
//(Integer) map.get("id"),
private List<AllInform> getAllInformList(List<Object> list) {
List<AllInform> allInformList = new ArrayList<>();
for (Object object : list) {
Map<String, Object> map = (Map<String, Object>) object;
AllInform allInform = new AllInform(map.get("senderNumber").toString(), map.get("informTitle").toString(),
map.get("informContent").toString(), (Date) map.get("sendDate"));
//给id设置值
allInform.setId((Integer) map.get("id"));
allInformList.add(allInform);
}
return allInformList;
}
}
| [
"31917934+CodeDaMoWang@users.noreply.github.com"
] | 31917934+CodeDaMoWang@users.noreply.github.com |
dd6e1f528a9448c0681bf664bddab19af53ff72b | f2eafdf0d2423cf420dde190fba1bb71650edc5a | /app/src/main/java/com/jiage/battle/surface/aircraft2/Supply.java | 3fb453e2e4d935e09fd614410f4af093c3161f33 | [] | no_license | XinJiaGe/Battle | 676f7c411578e72ea646ebe62aa0acbe18ca5791 | 16b427b1962a993d9dd1c40463ff9502bf55a3f7 | refs/heads/master | 2021-06-15T02:24:15.191588 | 2019-12-17T09:31:01 | 2019-12-17T09:31:01 | 148,568,854 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,013 | java | package com.jiage.battle.surface.aircraft2;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import com.jiage.battle.R;
import com.jiage.battle.constant.ApkConstant;
import com.jiage.battle.util.BitmapUtils;
import com.jiage.battle.util.OtherUtil;
import com.jiage.battle.util.SurfaceViewUtil;
import java.util.Vector;
/**
* 作者:李忻佳
* 日期:2019/4/10
* 说明:补给
*/
public class Supply {
private Rect rect = new Rect(0,0,0,0);
private Bitmap bitmap;
private Bitmap bitmapBg;
private int x,y,mScreenW,mScreenH;
private int speed = 8; //速度
private boolean isDead = false;
private TYPE type = TYPE.BLOOD;
public Supply(Context context, Bitmap bitmap, TYPE type, Rect rect, int screenW, int screenH){
this.mScreenW = screenW;
this.mScreenH = screenH;
this.bitmap = bitmap;
this.type = type;
bitmapBg = BitmapUtils.ReadBitMap(context, R.drawable.icon_aircraftwars_supply_bg);
x = rect.centerX();
y = rect.centerY();
}
public void myDraw(Canvas mCanvas, Paint mPaint){
mCanvas.drawBitmap(bitmapBg,x-bitmapBg.getWidth()/2,y-bitmapBg.getHeight()/2,mPaint);
mCanvas.drawBitmap(bitmap,x-bitmap.getWidth()/2,y-bitmap.getHeight()/2,mPaint);
rect = new Rect(x-bitmapBg.getWidth()/4,y-bitmapBg.getHeight()/4,x+bitmapBg.getWidth()/4,y+bitmapBg.getHeight()/4);
if(ApkConstant.isDebug) {
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setColor(Color.RED);
mCanvas.drawRect(rect, mPaint);
}
}
public void logic(Play play, Vector<Enemy> vcEnemy, AircraftSurface.onSurfaceListener mListener) {
y += speed;
if(y>mScreenH){
isDead = true;
}
if(SurfaceViewUtil.isCollsionWithRect(rect,play.getRect())){//和主角碰撞了
isDead = true;
switch (type) {
case BLOOD:
if(mListener!=null) mListener.addBlood(1);
break;
case BOOM:
for (int i = 0; i < vcEnemy.size(); i++) {//敌人逻辑
Enemy enemy = vcEnemy.elementAt(i);
if(!enemy.isBoos()) {
enemy.setDead(true);
if (mListener != null) mListener.addFraction(enemy.getFraction());
}
}
break;
case PROTECTION:
play.addProtectionCover();
break;
case ARMS:
play.upgrade();
break;
}
}
}
enum TYPE{
BLOOD,//加血
BOOM,//炸弹
PROTECTION,//防护罩
ARMS//升级武器
}
public boolean isDead() {
return isDead;
}
}
| [
"347292753@qq.com"
] | 347292753@qq.com |
b0e4cd2286733d9a558ff109118a2237ee40c2ff | d494f6bd686adf3c81c6f9b718fa645bca9efa68 | /test/com/softlib/imatch/test/ticketprocessing/ProcessedTicketTest.java | 703c426ba9f3eda6d90ab74fb14ff5c4f2f3da8c | [] | no_license | maximdon/SocialTopic | ee563469559241254ed8883cb30c2ad8a67585a8 | 38871913d681fec25947297721a2387f32131d08 | refs/heads/master | 2021-01-23T10:48:48.468519 | 2017-06-05T19:39:11 | 2017-06-05T19:39:11 | 93,098,368 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,514 | java | package com.softlib.imatch.test.ticketprocessing;
import java.util.ArrayList;
import java.util.Arrays;
import junit.framework.Assert;
import org.apache.log4j.xml.DOMConfigurator;
import org.junit.BeforeClass;
import org.junit.Test;
import com.softlib.imatch.ConsoleAppRuntimeInfo;
import com.softlib.imatch.InMemoryTicket;
import com.softlib.imatch.RuntimeInfo;
import com.softlib.imatch.dictionary.TechnicalDictionary;
import com.softlib.imatch.dictionary.TechnicalDictionaryKey;
import com.softlib.imatch.dictionary.TechnicalDictionaryTerm;
import com.softlib.imatch.ticketprocessing.ProcessedField;
import com.softlib.imatch.ticketprocessing.ProcessedTicket;
public class ProcessedTicketTest {
public static final String FIELD_TITLE = "Title";
public static final String FIELD_BODY = "Body";
private void newField(ProcessedTicket ticket,
String fieldName,String[] strings) {
ticket.startSession(fieldName,"100",fieldName);
ArrayList<String> stringsList =
new ArrayList<String>(Arrays.asList(strings));
for (String str : stringsList)
ticket.addTerm(new TechnicalDictionaryKey(str));
ticket.endSession(0,null,false);
}
private ProcessedTicket newTicket() {
//ObjectId is not important here
return new ProcessedTicket(new InMemoryTicket("_COMMON_"), ProcessedTicket.getDefaultCalculator());
}
@BeforeClass
public static void init() {
ConsoleAppRuntimeInfo.init(null);
DOMConfigurator.configure(RuntimeInfo.getCurrentInfo().getRealPath("/{SolutionConfigFolder}/log4j-console.xml"));
TechnicalDictionary dictionary = (TechnicalDictionary) RuntimeInfo.getCurrentInfo().getBean("dictionary");
dictionary.loadDictionary();
}
private void printProcessedTicket(ProcessedTicket ticket) {
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
System.out.println("printProcessedTicket :");
System.out.println("----------------------");
for (ProcessedField field : ticket.getData().values()) {
System.out.println(" --> Field :"+field.getFieldName());
for ( TechnicalDictionaryTerm term : field.getTerms() )
System.out.println(" Term = " + term.getTermText());
}
System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
}
@Test
public void test_1Field_NoMatch() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_BODY, new String[] {"Center"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_BODY, new String[] {"access"});
float matchScore = ProcessedTicket.match(ticket1, ticket2).getScore();
Assert.assertEquals("No matches, the score should be 0", (float)0.0, matchScore);
}
@Test
public void test_1Field_Match1() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_TITLE, new String[] {"access"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_TITLE, new String[] {"access"});
newField(ticket2,FIELD_BODY, new String[] {"backup"});
float matchScore = ProcessedTicket.match(ticket1, ticket2).getScore();
Assert.assertEquals("Partial match, the score should be 0.5", (float)1, matchScore);
}
@Test
public void test_2Field_PartialMatch() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_TITLE, new String[] {"access"});
newField(ticket1,FIELD_BODY, new String[] {"backup"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_TITLE, new String[] {"access"});
newField(ticket2,FIELD_BODY, new String[] {"backup"});
float matchScore = ProcessedTicket.match(ticket1, ticket2).getScore();
printProcessedTicket(ticket1);
printProcessedTicket(ticket2);
boolean result = (matchScore >= 0.4) && (matchScore <= 0.5);
System.out.println("Match Score ="+matchScore);
Assert.assertEquals("Partial match, the score should be ~ 0.45", true, result);
}
@Test
public void test_2Field_Match() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_TITLE, new String[] {"access","backup"});
newField(ticket1,FIELD_BODY, new String[] {"cancel","callback"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_TITLE, new String[] {"access","backup"});
newField(ticket2,FIELD_BODY, new String[] {"cancel","callback"});
float matchScore = ProcessedTicket.match(ticket1,ticket2).getScore();
printProcessedTicket(ticket1);
printProcessedTicket(ticket2);
Assert.assertEquals("Partial match, the score should be 1", (float)1, matchScore);
}
@Test
public void test_1Field_Match() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_TITLE, new String[] {"access","backup"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_TITLE, new String[] {"access","backup"});
float matchScore = ProcessedTicket.match(ticket1,ticket2).getScore();
printProcessedTicket(ticket1);
printProcessedTicket(ticket2);
Assert.assertEquals("Partial match, the score should be 1", (float)1, matchScore);
}
@Test
public void test_1Field_Match3() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_TITLE, new String[] {"access", "backup"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_TITLE, new String[] {"access", "center"});
float matchScore = ProcessedTicket.match(ticket1, ticket2).getScore();
printProcessedTicket(ticket1);
printProcessedTicket(ticket2);
boolean result = (matchScore >= 0.4) && (matchScore <= 0.5);
System.out.println("Match Score ="+matchScore);
Assert.assertEquals("Partial match, the score should be ~ 0.45", true, result);
}
@Test
public void test_1Field_FullMatch() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_TITLE, new String[] {"access", "backup"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_TITLE, new String[] {"access", "backup"});
float matchScore = ProcessedTicket.match(ticket1, ticket2).getScore();
printProcessedTicket(ticket1);
printProcessedTicket(ticket2);
Assert.assertEquals("Full match, the score should be 1", (float)1.0, matchScore);
}
@Test
public void test_2Field_PartialMatch2() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_TITLE, new String[] {"access", "center"});
newField(ticket1,FIELD_BODY, new String[] {"backup", "char"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_TITLE, new String[] {"access", "backup"});
newField(ticket2,FIELD_BODY, new String[] {"char", "class"});
float matchScore = ProcessedTicket.match(ticket1, ticket2).getScore();
printProcessedTicket(ticket1);
printProcessedTicket(ticket2);
boolean result = (matchScore >= 0.4) && (matchScore <= 0.5);
System.out.println("Match Score ="+matchScore);
Assert.assertEquals("Partial match, the score should be ~ 0.45", true, result);
}
@Test
public void test_2Field_FullMatch() {
ProcessedTicket ticket1 = newTicket();
newField(ticket1,FIELD_TITLE, new String[] {"access", "backup"});
newField(ticket1,FIELD_BODY, new String[] {"center", "char"});
ProcessedTicket ticket2 = newTicket();
newField(ticket2,FIELD_TITLE, new String[] {"access", "backup"});
newField(ticket2,FIELD_BODY, new String[] {"center", "char"});
float matchScore = ProcessedTicket.match(ticket1, ticket2).getScore();
printProcessedTicket(ticket1);
printProcessedTicket(ticket2);
Assert.assertEquals("Full match, the score should be 1", (float)1.0, matchScore);
}
};
| [
"maxim_donde@yahoo.com"
] | maxim_donde@yahoo.com |
08326dc41360bea4ae6661af07d97e75cc02f810 | 45605b537f3e983e2302f811347db7301910dfee | /IvanZubkov/src/main/java/entity/Operation.java | 4907679a04544ff01547a7c469d1a2480352a930 | [] | no_license | simonpirko/servlet-hm-C32 | 22b797954b3166cb48d9d98229adf94177b1adb3 | 8d0e294fc401659543c2d54b18b408e692cf71a7 | refs/heads/master | 2022-10-08T13:34:20.714025 | 2020-06-03T22:54:18 | 2020-06-03T22:54:18 | 268,350,786 | 0 | 3 | null | 2020-06-03T22:50:07 | 2020-05-31T19:38:07 | Java | UTF-8 | Java | false | false | 483 | java | package entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Operation implements Comparable<Operation> {
private double num1;
private double num2;
private double result;
private String symbol;
private User user;
@Override
public int compareTo(Operation operation) {
return Double.compare(this.result, operation.result);
}
}
| [
"you@example.com"
] | you@example.com |
6bff2baa15f8b56794cfdfd9e97ccc44f5f3a92c | c2d8181a8e634979da48dc934b773788f09ffafb | /storyteller/output/gasbooknet/SetSelectionOfPublicUserDeliveryphoneAction.java | 5ae0d02a62426da0e57c550cb0f5a93f701a4c8e | [] | no_license | toukubo/storyteller | ccb8281cdc17b87758e2607252d2d3c877ffe40c | 6128b8d275efbf18fd26d617c8503a6e922c602d | refs/heads/master | 2021-05-03T16:30:14.533638 | 2016-04-20T12:52:46 | 2016-04-20T12:52:46 | 9,352,300 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,532 | java | package net.gasbooknet.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.gasbooknet.model.*;
import net.gasbooknet.model.crud.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.web.context.support.WebApplicationContextUtils;
import net.enclosing.util.HibernateSession;
public class SetSelectionOfPublicUserDeliveryphoneAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res) throws Exception{
Session session = new HibernateSession().currentSession(this
.getServlet().getServletContext());
for (int I = 0; I < req.getParameterValues("id").length; i++) {
Criteria criteria2 = session.createCriteria(PublicUser.class);
criteria2.add(Restrictions.idEq(Integer.valueOf(req.getParameterValues("id")[i])));
PublicUser publicUser = (PublicUser)criteria2.uniqueResult();
publicUser.setdeliveryphone(true);
session.save(publicUser);
}
transaction.commit();
session.flush();
return mapping.findForward("success");
}
} | [
"toukubo@gmail.com"
] | toukubo@gmail.com |
2442de8d6f397f36838967c06023a3c61fc9319d | a78cbb3413a46c8b75ed2d313b46fdd76fff091f | /src/mobius.provereditor/ProverEditor/src/mobius/prover/gui/editor/BasicTextAttribute.java | cc57e5d40547d17185e3385aea0946f87c169846 | [] | no_license | wellitongb/Mobius | 806258d483bd9b893312d7565661dadbf3f92cda | 4b16bae446ef5b91b65fd248a1d22ffd7db94771 | refs/heads/master | 2021-01-16T22:25:14.294886 | 2013-02-18T20:25:24 | 2013-02-18T20:25:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 912 | java | package mobius.prover.gui.editor;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.swt.graphics.Color;
/**
* A text attribute class with enhanced background color support.
*
* @author J. Charles (julien.charles@inria.fr)
*/
public class BasicTextAttribute extends TextAttribute {
/** the background color. */
private Color fBgColor;
/**
* Create a text attribute with the specified foreground color.
* @param foreground A color. Cannot be <code>null</code>
*/
public BasicTextAttribute(final Color foreground) {
super(foreground);
fBgColor = super.getBackground();
}
/**
* Change the background color of the text attribute.
* @param bgColor the new background color
*/
public void setBackground(final Color bgColor) {
fBgColor = bgColor;
}
/** {@inheritDoc} */
@Override
public Color getBackground() {
return fBgColor;
}
}
| [
"jcharles@c6399e9c-662f-4285-9817-23cccad57800"
] | jcharles@c6399e9c-662f-4285-9817-23cccad57800 |
6f95915d3aa7c0ac761984b391691abda1c2f3bc | e65c8c85347bd273ce83d3337019dbab9854a114 | /src/main/java/com/example/demo/service/netty/argus/BootStrap.java | 91b3d6a0b88eeb359372008e48c14ef2f0e3d849 | [] | no_license | lywhlao/springBootClientDemo | 5bff0524637a72a7fe804f144a3e22f4086eff49 | 3fb82c606a751c90fd3badeeb004be694ecc6350 | refs/heads/master | 2022-06-27T14:13:41.391716 | 2020-02-25T15:16:49 | 2020-02-25T15:16:49 | 135,978,381 | 0 | 0 | null | 2022-06-17T01:54:40 | 2018-06-04T06:08:30 | Java | UTF-8 | Java | false | false | 149 | java | package com.example.demo.service.netty.argus;
/**
* @Author: laojiaqi
* @Date: 2020-02-24 22:29
* @Description:
*/
public class BootStrap {
}
| [
"jiaqi.lao@tongdun.cn"
] | jiaqi.lao@tongdun.cn |
c3405df8ac17b78682c43b49a10d1be3271b5533 | dbbdbd22553061f1322ef5a050a3e64494a6111f | /sipphone/src/local/media/AudioSender.java | 5584497952fb44fb2c1bd52cc771e87e5aee46a3 | [] | no_license | coralcea/bigbluebutton | dc4e58549f1716f29cf1ada624d96b02336c9993 | c4f1e1cfd0fa28e4da3c7ef674751428617115e7 | refs/heads/master | 2021-01-20T11:06:34.729942 | 2011-03-18T00:06:19 | 2011-03-18T00:06:19 | 1,383,960 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,074 | java | package local.media;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioFileFormat;
import java.io.File;
import java.io.FileInputStream;
/** AudioSender is a pure-java audio stream sender.
* It uses the javax.sound library (package).
*/
public class AudioSender
{
// ******************************* MAIN *******************************
/** The main method. */
public static void main(String[] args)
{
String daddr=null;
int dport=0;
int payload_type=0;
int tone_freq=500;
double tone_amp=1.0;
int sample_rate=8000;
int sample_size=1;
int frame_size=500;
int frame_rate; //=sample_rate/(frame_size/sample_size);
// byte_rate=frame_rate/frame_size=8000
boolean linear_signed=false;
boolean pcmu=false;
boolean big_endian=false;
String filename=null;
boolean sound=true;
boolean help=true;
for (int i=0; i<args.length; i++)
{
if (args[i].equals("-h"))
{ break;
}
if (i==0 && args.length>1)
{ daddr=args[i];
dport=Integer.parseInt(args[++i]);
help=false;
continue;
}
if (args[i].equals("-p") && args.length>(i+1))
{ payload_type=Integer.parseInt(args[++i]);
continue;
}
if (args[i].equals("-F") && args.length>(i+1))
{ sound=false;
filename=args[++i];
continue;
}
if (args[i].equals("-T") && args.length>(i+1))
{ sound=false;
tone_freq=Integer.parseInt(args[++i]);
continue;
}
if (args[i].equals("-A") && args.length>(i+1))
{ tone_amp=Double.parseDouble(args[++i]);
continue;
}
if (args[i].equals("-S") && args.length>(i+2))
{ sample_rate=Integer.parseInt(args[++i]);
sample_size=Integer.parseInt(args[++i]);
continue;
}
if (args[i].equals("-L") && args.length>(i+1))
{ frame_size=Integer.parseInt(args[++i]);
continue;
}
if (args[i].equals("-Z"))
{ linear_signed=true;
continue;
}
if (args[i].equals("-U"))
{ pcmu=true;
continue;
}
if (args[i].equals("-E"))
{ big_endian=true;
continue;
}
// else, do:
System.out.println("unrecognized param '"+args[i]+"'\n");
help=true;
}
if (help)
{ System.out.println("usage:\n java AudioSender <dest_addr> <dest_port> [options]");
System.out.println(" options:");
System.out.println(" -h this help");
System.out.println(" -p <type> payload type");
System.out.println(" -F <audio_file> sends an audio file");
System.out.println(" -T <frequency> sends a tone of given frequency [Hz]");
System.out.println(" -A <amplitude> sets an amplitude factor [0:1]");
System.out.println(" -S <rate> <size> sample rate [B/s], and size [B]");
System.out.println(" -L <size> frame size");
System.out.println(" -Z uses PCM linear signed format (linear unsigned is used as default)");
System.out.println(" -U uses PCMU format");
System.out.println(" -E uses big endian format");
System.exit(0);
}
frame_rate=sample_rate/(frame_size/sample_size);
AudioFormat.Encoding codec;
if (pcmu) codec=AudioFormat.Encoding.ULAW;
else
if (linear_signed) codec=AudioFormat.Encoding.PCM_SIGNED;
else
codec=AudioFormat.Encoding.PCM_UNSIGNED; // default
int tone_codec=ToneInputStream.PCM_LINEAR_UNSIGNED;
if (linear_signed) tone_codec=ToneInputStream.PCM_LINEAR_SIGNED;
try
{ RtpStreamSender sender;
AudioInput audio_input=null;
if (sound) AudioInput.initAudioLine();
if (sound)
{ AudioFormat format=new AudioFormat(codec,sample_rate,8*sample_size,1,sample_size,sample_rate,big_endian);
System.out.println("System audio format: "+format);
audio_input=new AudioInput(format);
sender=new RtpStreamSender(audio_input.getInputStream(),false,payload_type,frame_rate,frame_size,daddr,dport);
}
else
if (filename!=null)
{ File file=new File(filename);
if (filename.indexOf(".wav")>0)
{ AudioFileFormat format=AudioSystem.getAudioFileFormat(file);
System.out.println("File audio format: "+format);
AudioInputStream audio_input_stream=AudioSystem.getAudioInputStream(file);
sender=new RtpStreamSender(audio_input_stream,true,payload_type,frame_rate,frame_size,daddr,dport);
}
else
{ FileInputStream input_stream=new FileInputStream(file);
sender=new RtpStreamSender(input_stream,true,payload_type,frame_rate,frame_size,daddr,dport);
}
}
else
{ ToneInputStream tone=new ToneInputStream(tone_freq,tone_amp,sample_rate,sample_size,tone_codec,big_endian);
sender=new RtpStreamSender(tone,true,payload_type,frame_rate,frame_size,daddr,dport);
}
if (sender!=null)
{
sender.start();
if (sound) audio_input.play();
System.out.println("Press 'Return' to stop");
System.in.read();
sender.halt();
if (sound) audio_input.stop();
if (sound) AudioInput.closeAudioLine();
}
else
{ System.out.println("Error creating the rtp stream.");
}
}
catch (Exception e) { e.printStackTrace(); }
}
} | [
"chhay.sokoun@realwat.net"
] | chhay.sokoun@realwat.net |
658ad72fa1993704d20f7436993c6be0181b3357 | 1dca36d86fb910037b991fc8e2a8762e5efc6012 | /src/main/java/cn/fy/fy/config/WebMvcConfig.java | 10e120ffdba44d5b59c2db95df943f7f9eb17b05 | [] | no_license | l15539670181/fy | 982a6eb2b973b785250501becbbf0172f87b68e2 | 63925fe6fc7317451e6d30216d13ed7964d170e5 | refs/heads/master | 2022-07-14T22:25:48.971073 | 2020-04-19T06:58:39 | 2020-04-19T06:58:39 | 247,676,252 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,544 | java | package cn.fy.fy.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
/**
* 注册拦截器
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
//addPathPattern后跟拦截地址,excludePathPatterns后跟排除拦截地址
//registry.addInterceptor(new MyInterceptor()).addPathPatterns("fy/vote/**").excludePathPatterns("fy/anime-type/list").excludePathPatterns("/user-message/login");
InterceptorRegistration registration = registry.addInterceptor(new MyInterceptor());
registration.addPathPatterns("/vote/**");
registration.addPathPatterns("/vote-need/**");//所有路径都被拦截
registration.addPathPatterns("/Recharge/**");
registration.addPathPatterns("/anime-type/StoreTiao");
// registration.excludePathPatterns(
// "/user-message/login",//添加不拦截路径
// "/anime-type/list", //登录
// "/**/*.html", //html静态资源
// "/**/*.js", //js静态资源
// "/**/*.css", //css静态资源
// "/**/*.woff",
// "/**/*.ttf"
// );
}
} | [
"1679257786@qq.com"
] | 1679257786@qq.com |
947c6ae08a633d42b03f91cd232a309357c55dbe | ab9418ea68e056297792cd1eee6fee051d340bbe | /src/main/java/com/enjoy/BeanLifeCycle/ConfigOfBeanLifeCycle.java | a277da2e06aa767c3528e26bb2eee6ffdd54ca1e | [
"Apache-2.0"
] | permissive | cczuwangkun/springanno | 6df41103c19747ac42dbefb253b8362d2591312e | d99617eeada527b2c2320cf250ec178ca85d5585 | refs/heads/master | 2022-06-25T02:26:17.009374 | 2019-06-20T07:30:25 | 2019-06-20T07:30:25 | 188,249,587 | 0 | 0 | Apache-2.0 | 2022-06-21T01:17:50 | 2019-05-23T14:24:56 | Java | UTF-8 | Java | false | false | 669 | java | package com.enjoy.BeanLifeCycle;
import com.enjoy.cap7.Bean.Bike;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/**
* @Author:waken
* @Date: Created in 2019/4/27 21:38
* @Description:
*/
/**
* 功能描述: bean的生命周期 创建-> 初始化 —> 销毁
*/
@Configuration
@ComponentScan("com.enjoy.BeanLifeCycle")
public class ConfigOfBeanLifeCycle {
@Bean(initMethod = "init", destroyMethod = "destroy")
public Student student() {
System.out.println("1我先实例化");
return new Student();
}
}
| [
"403803003@qq.com"
] | 403803003@qq.com |
c162c0d5bac883ad18ad9b8dbdcab9a0b33a3630 | 0c98aa6ef541d47fe9771eca77aac1fd614c8755 | /app/src/main/java/py/com/personal/mimundo/activities/administracion/ValidarCreacionUsuarioActivity.java | 6e46871d41f46864be569fd36094c6889ef48d04 | [] | no_license | federix8190/MiMundoAndroid | 43ed3e88fe9b259bbd864c382b455f6e26548c4c | 86f8ad5bd06d8e6dd35e77aa4a187e1dbfd01bb3 | refs/heads/main | 2023-02-17T21:53:00.914621 | 2021-01-11T20:19:25 | 2021-01-11T20:19:25 | 328,781,298 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,904 | java | package py.com.personal.mimundo.activities.administracion;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import org.apache.http.HttpVersion;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.protocol.HTTP;
import java.security.KeyStore;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.DialogFragment;
import py.com.personal.mimundo.activities.AppBaseActivity;
import py.com.personal.mimundo.disenhos.Configuraciones;
import py.com.personal.mimundo.activities.R;
import py.com.personal.mimundo.security.client.MySSLSocketFactory;
import py.com.personal.mimundo.services.Resultado;
import py.com.personal.mimundo.services.usuarios.models.ValidarUsuario;
import py.com.personal.mimundo.services.usuarios.service.UsuarioInterface;
import retrofit.RequestInterceptor;
import retrofit.RestAdapter;
import retrofit.RetrofitError;
import retrofit.client.ApacheClient;
/**
* Created by Konecta on 25/07/2014.
*/
public class ValidarCreacionUsuarioActivity extends AppBaseActivity {
private ValidarCreacionTask mValidacionTask;
private ProgressBar mProgressView;
private RelativeLayout mLoginFormView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_validar_creacion_usuario);
setTitle(getResources().getString(R.string.alta_usuario_title));
configurarActionBar();
registerBaseActivityReceiver();
mLoginFormView = (RelativeLayout) findViewById(R.id.form_login);
mProgressView = (ProgressBar) findViewById(R.id.progressbar_login);
View.OnClickListener listener = new View.OnClickListener(){
@Override
public void onClick(View v) {
EditText numeroLinea = (EditText) findViewById(R.id.numeroLinea);
if(numeroLinea.getText() != null && !numeroLinea.getText().toString().isEmpty()) {
showProgress(true);
System.err.println("Numero de linea : " + numeroLinea.getText().toString());
mValidacionTask = new ValidarCreacionTask(numeroLinea.getText().toString());
mValidacionTask.execute((Void) null);
} else {
Toast.makeText(ValidarCreacionUsuarioActivity.this,
getResources().getString(R.string.alta_usuario_ingresar_linea), Toast.LENGTH_SHORT).show();
}
}
};
TextView validarLinea = (TextView) findViewById(R.id.validarLineaButton);
validarLinea.setOnClickListener(listener);
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/Platform-Regular.otf");
((EditText) findViewById(R.id.numeroLinea)).setTypeface(tf);
validarLinea.setTypeface(tf);
}
@Override
protected void onDestroy() {
super.onDestroy();
unRegisterBaseActivityReceiver();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
/**
* Shows the progress UI and hides the login form.
*/
public void showProgress(final boolean show) {
// The ViewPropertyAnimator APIs are not available, so simply show and hide the relevant UI components.
mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
}
/**
* Represents an asynchronous login/registration task used to authenticate
* the user.
*/
public class ValidarCreacionTask extends AsyncTask<Void, Void, Resultado> {
private String mNumeroLinea;
ValidarCreacionTask(String numeroLinea) {
mNumeroLinea = numeroLinea;
}
@Override
protected Resultado doInBackground(Void... params) {
try {
RestAdapter adapter = getRestAdapter();
UsuarioInterface service = adapter.create(UsuarioInterface.class);
String numeroLinea = mNumeroLinea;
if (!mNumeroLinea.isEmpty() && mNumeroLinea.substring(0, 1).equals("0")) {
numeroLinea = mNumeroLinea.substring(1, mNumeroLinea.length());
}
ValidarUsuario datos = new ValidarUsuario();
datos.setTipoUsuario("LINEA");
datos.setNumeroLinea(numeroLinea);
Resultado resultado = service.valiarCreacionUsuario(datos);
SharedPreferences pref = getApplicationContext().getSharedPreferences("MiMundoPreferences", 0);
SharedPreferences.Editor editor = pref.edit();
editor.putString("user", mNumeroLinea);
editor.commit();
return resultado;
} catch (RetrofitError e) {
Resultado r = (Resultado) e.getBody();
if (r != null && r.getMensaje() != null && !r.getMensaje().isEmpty()) {
return new Resultado(false, r.getMensaje());
} else {
return new Resultado(false, "Error al ejecutar la operación");
}
}
}
@Override
protected void onPostExecute(final Resultado resultado) {
mValidacionTask = null;
showProgress(false);
if (resultado.isExitoso()) {
Intent i = new Intent(ValidarCreacionUsuarioActivity.this, AltaUsuarioLineaActivity.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (i != null) {
startActivity(i);
}
} else {
DialogFragment dialogo = ValidarCreacionUsuarioDialogFragment.newInstance(
getResources().getString(R.string.alta_usuario_validacion_title), resultado.getMensaje());
//DialogFragment dialogo = crearDialogo(getResources().getString(R.string.alta_usuario_validacion_title), resultado.getMensaje());
dialogo.show(ValidarCreacionUsuarioActivity.this.getSupportFragmentManager(), "Validacion");
}
}
@Override
protected void onCancelled() {
mValidacionTask = null;
showProgress(false);
}
}
private RestAdapter getRestAdapter() {
final SharedPreferences pref = getApplicationContext().getSharedPreferences("MiMundoPreferences", 0);
// No se debe incluir el Token de session para validar la linea
RequestInterceptor requestInterceptor = new RequestInterceptor() {
@Override
public void intercept(RequestFacade request) {
request.addHeader("client_id", Configuraciones.CLIENT_ID);
}
};
RestAdapter adapter = new RestAdapter.Builder()
.setEndpoint(Configuraciones.MI_MUNDO_SERVER)
.setRequestInterceptor(requestInterceptor)
.setClient(new ApacheClient(getNewHttpClient()))
.build();
return adapter;
}
/*private DialogFragment crearDialogo(final String titulo, final String mensaje) {
DialogFragment dialog = ValidarCreacionUsuarioDialogFragment.newInstance(titulo, mensaje);
return new DialogFragment() {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
DialogInterface.OnClickListener aceptarListener = new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
}
};
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setMessage(mensaje).setTitle(titulo);
builder.setPositiveButton(getResources().getString(R.string.alta_usuario_btn_aceptar), aceptarListener);
AlertDialog dialog = builder.create();
return dialog;
}
};
}*/
public void validarNeutralClick() {
}
public static class ValidarCreacionUsuarioDialogFragment extends DialogFragment {
public static ValidarCreacionUsuarioDialogFragment newInstance(String title, String message) {
ValidarCreacionUsuarioDialogFragment frag = new ValidarCreacionUsuarioDialogFragment();
Bundle args = new Bundle();
args.putString("title", title);
args.putString("message", message);
frag.setArguments(args);
return frag;
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
String title = getArguments().getString("title");
String message = getArguments().getString("message");
return new AlertDialog.Builder(getActivity())
.setTitle(title)
.setMessage(message)
.setNeutralButton(R.string.alta_usuario_btn_aceptar,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
((ValidarCreacionUsuarioActivity)getActivity()).validarNeutralClick();
}
}
)
.create();
}
}
private void configurarActionBar() {
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE
| ActionBar.DISPLAY_SHOW_CUSTOM);
}
public HttpClient getNewHttpClient() {
try {
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(null, null);
SSLSocketFactory sf = new MySSLSocketFactory(trustStore);
sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
HttpParams params = new BasicHttpParams();
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params, HTTP.UTF_8);
SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
registry.register(new Scheme("https", sf, 443));
ClientConnectionManager ccm = new ThreadSafeClientConnManager(params, registry);
return new DefaultHttpClient(ccm, params);
} catch (Exception e) {
return new DefaultHttpClient();
}
}
}
| [
"federico.torres@konecta.com.py"
] | federico.torres@konecta.com.py |
657175f9858479333b55bcbc35ceb7ee1c2c9ee3 | f58575cfc739e4e3f23464fc5c533a728782e5cd | /gae/src/novoda/bookation/gae/server/dao/JdoBookationDao.java | aa73ffff4ef91c3ace47b66a88acb5fcc3149598 | [] | no_license | GunioRobot/bookation | 41a15e14f8836f7bd9f257dc048534daad3795f2 | 56aeedd2af746358e89fde59443c044d7c7035f8 | refs/heads/master | 2021-01-18T20:57:20.625032 | 2010-09-17T09:05:04 | 2010-09-17T09:05:04 | 2,618,107 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,544 | java | package novoda.bookation.gae.server.dao;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Logger;
import javax.jdo.JDOOptimisticVerificationException;
import javax.jdo.PersistenceManager;
import javax.jdo.Query;
import novoda.bookation.gae.shared.Bookation;
import novoda.bookation.gae.shared.BookationMarker;
import org.appengine.commons.dao.PMF;
public class JdoBookationDao implements BookationDao {
private static final Logger log = Logger.getLogger(JdoBookationDao.class.getName());
protected PersistenceManager getPM() {
return PMF.get().getPersistenceManager();
}
@Override
public Bookation get(Long id) {
if(id == null) {
return null;
}
return getPM().getObjectById(Bookation.class, id);
}
@Override
public Long persist(Bookation toPersist) {
PersistenceManager pm = getPM();
pm.currentTransaction().begin();
try {
Bookation bookation = get(toPersist.getId());
if(bookation != null) {
toPersist.setId(bookation.getId());
} else {
toPersist.setCreated(new Date());
}
toPersist.setModified(new Date());
bookation = pm.makePersistent(toPersist);
pm.currentTransaction().commit();
return bookation.getId();
} catch(JDOOptimisticVerificationException e) {
log.severe("JDOOptimisticVerificationException " + e.getMessage());
throw new RuntimeException("JDOOptimisticVerificationException", e);
} finally {
if (pm.currentTransaction().isActive()) {
pm.currentTransaction().rollback();
}
pm.close();
}
}
@Override
@SuppressWarnings("unchecked")
public List<BookationMarker> get(String account) {
PersistenceManager pm = getPM();
Query query = pm.newQuery(Bookation.class);
query.setFilter("email == accountParam");
query.declareParameters("String accountParam");
try {
List<Bookation> results = (List<Bookation>) query.execute(account);
if(results == null) {
return new ArrayList<BookationMarker>();
}
List<BookationMarker> markers = new ArrayList<BookationMarker>();
for(Bookation bookation : results) {
markers.add(new BookationMarker(bookation.getLatitude(), bookation.getLongitude()));
}
return markers;
} finally {
query.closeAll();
}
}
}
| [
"luigi.agosti@gmail.com"
] | luigi.agosti@gmail.com |
99cdbbfcb78610d256003ebf58882f442b219019 | ba126f0e0a3e612b029375cb4e1bd0247b6672a4 | /app/src/main/java/com/officework/interfaces/InterfaceBroadcastCallback.java | 83582b9f3b38f1250d9a2aff50ff7481aa2c0e06 | [] | no_license | Diksha1290/OfficeWork | 58a079c1e1706c4c2a5167daedb446119d671eaf | 1fbe04da09e54bd8aa6a81bb33910b9682bf0d74 | refs/heads/master | 2020-09-13T03:01:27.147541 | 2019-11-19T07:49:35 | 2019-11-19T07:49:35 | 222,638,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 196 | java | package com.officework.interfaces;
/**
* Created by Girish on 8/19/2016.
*/
public interface InterfaceBroadcastCallback {
public void onBroadcastCallBack(boolean isPower, String status);
}
| [
"diksha@veridic.in"
] | diksha@veridic.in |
62aae7cd0aa77de1e8c0e0c43816b274210ef047 | 921d8b7636f03b95eeaf90f141d48e5ffecc8bd6 | /AmazonFactory/src/brinnich/TiefkuehlFabrik.java | 7c75f330173ae7ae7774a2c1e7283c763f172d1d | [] | no_license | sbrinnich-tgm/SEW-4YHIT | 6b2e969578a474fcf74233f4856693624e32bf1a | ae5f9e5b3a29932e4c68d9a0efbc7f5b03e241e7 | refs/heads/master | 2021-01-18T05:09:03.188767 | 2015-05-01T18:31:29 | 2015-05-01T18:31:29 | 27,813,165 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 450 | java | package brinnich;
/**
* Stellt eine Tiefkuehl-Fabrik dar, mit der Tiefkuehlprodukte erstellt werden koennen
* @author Selina Brinnich
* @version 2014-12-30
*
*/
public class TiefkuehlFabrik extends Fabrik {
@Override
public Artikel erstelle(String produkt, double menge) {
switch(produkt){
case "TK_Spinat":
return new TK_Spinat(menge);
case "TK_Maronireis":
return new TK_Maronireis(menge);
default:
return null;
}
}
}
| [
"sbrinnich@student.tgm.ac.at"
] | sbrinnich@student.tgm.ac.at |
360cef395e4f6e58acd823e02953e0c4501daa7f | f3c092ad32d41a31d11909c2dafc7e5b1d7f09ed | /eAlarmAndroid/E_Alarm/src/co/vn/e_alarm/DistrictFragment.java | 236312e43f634f4f75e2ba1580ea6391df172fb4 | [] | no_license | ngotuan12/eAlarm | f91ee432a54835790ef04f9e9cb583a1d334aac5 | 53071afc54d39de992cfb07505a8a1b28beac938 | refs/heads/master | 2021-01-21T12:47:13.493363 | 2016-03-25T00:27:03 | 2016-03-25T00:27:06 | 22,984,781 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,271 | java | package co.vn.e_alarm;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class DistrictFragment extends Fragment {
private static String[] arrDistrict;
static boolean check = false;
int position = 0;
/** Called when the activity is first created. */
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.row_district, null);
TextView tvDistric = (TextView) view.findViewById(R.id.tvDistrict);
if (check) {
position = getArguments().getInt("POSITION_DISTRICT");
}
if(arrDistrict!=null){
tvDistric.setText("" + arrDistrict[position]);
}
return view;
}
public static void SetDistrict(String[] listStatus) {
arrDistrict = listStatus;
}
/**
* input position district of fragment
*
* @param po
* : position district fragment
* @return Fragment
*/
public static Fragment newInstance(int po) {
check = true;
DistrictFragment f = new DistrictFragment();
Bundle b = new Bundle();
b.putInt("POSITION_DISTRICT", po);
f.setArguments(b);
return f;
}
}
| [
"tuanna@email.ex-artisan.com"
] | tuanna@email.ex-artisan.com |
0f3406b9fe0e05165d823e5388c5e2dccf8ca60b | 0ec0e2721ca6b29bdeb130c8b53c4fbd6dcdcefe | /src/main/java/org/occideas/voxco/service/IVoxcoService.java | e8d99744d43d536d372535c4d681230485b574d2 | [
"MIT"
] | permissive | DataScientists/OccIDEAS | 61f54a400ed5a8f6d760b3aa97c8b007f686f3ea | e45843fa8ca0c2c1032d77c299ff01fb9853eed1 | refs/heads/master | 2023-02-15T09:41:02.054560 | 2023-02-03T06:38:01 | 2023-02-03T06:38:01 | 49,174,212 | 2 | 0 | MIT | 2022-05-20T20:58:20 | 2016-01-07T01:59:12 | Java | UTF-8 | Java | false | false | 355 | java | package org.occideas.voxco.service;
import org.occideas.vo.NodeVoxcoVO;
import java.util.List;
public interface IVoxcoService {
void exportSurvey(Long id);
void exportSurvey(Long id, boolean filter);
void exportAllToVoxco();
void importVoxcoResponse(boolean recreateExtractions);
List<NodeVoxcoVO> validateVoxcoQuestions();
}
| [
"mcboyao@gmail.com"
] | mcboyao@gmail.com |
c0df35b9757b75df28dd2decd2fbc0afa3473401 | 2c74a15524bed73c12afb08da4276cf50385a4a0 | /src/main/java/com/ss/util/JsonData.java | 2efa093eabc9dd044fa8e717848ba1814574ce7d | [] | no_license | JackHuzzZ/crm | 0169dc42bdc2f01c94c701964e8fff1672b57173 | 3264b2d9bd9d9ec77de2836dd69abe82427c72bf | refs/heads/master | 2020-05-02T19:46:25.346211 | 2019-03-28T09:23:53 | 2019-03-28T09:23:53 | 178,166,798 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 272 | java | package com.ss.util;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class JsonData {
private String key;
private Object value;
private String msg;
private Boolean state;
}
| [
"18113515095@163.com"
] | 18113515095@163.com |
8b9d1038065f2289043dad2a6eed318602139f16 | 2189dab5efc190494938d79b4238bbe90c4f7fde | /src/main/java/jwt_0510/demo/controller/AuthController.java | 6f9882468373550d9a806f40dd33ca5bf1f1521d | [] | no_license | hyun6ik/Spring-JWT-theReal | d631404e366a42074df8e84c00cd95dc8ae7bedb | b14fd269916d1ebae9f7daa6507b6d1115e53260 | refs/heads/master | 2023-04-24T14:04:12.052676 | 2021-05-10T14:50:14 | 2021-05-10T14:50:14 | 366,067,821 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,936 | java | package jwt_0510.demo.controller;
import jwt_0510.demo.dto.LoginDto;
import jwt_0510.demo.dto.TokenDto;
import jwt_0510.demo.jwt.JwtFilter;
import jwt_0510.demo.jwt.TokenProvider;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
@RestController
@RequestMapping("/api")
@RequiredArgsConstructor
public class AuthController {
private final TokenProvider tokenProvider;
private final AuthenticationManagerBuilder authenticationManagerBuilder;
@PostMapping("/authenticate")
public ResponseEntity<TokenDto> authorize(@Valid @RequestBody LoginDto loginDto){
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginDto.getUsername(), loginDto.getPassword());
Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken);
SecurityContextHolder.getContext().setAuthentication(authentication);
String jwt = tokenProvider.createToken(authentication);
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.add(JwtFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);
return new ResponseEntity<>(new TokenDto(jwt), httpHeaders, HttpStatus.OK);
}
}
| [
"fkanwm@naver.com"
] | fkanwm@naver.com |
f4c3655c7d3f3b87b665a7128dbc8564088e044c | 6dbae30c806f661bcdcbc5f5f6a366ad702b1eea | /Corpus/ecf/1146.java | 9d24036a1ff79033ea7e8abc54e7e55a5913f684 | [
"MIT"
] | permissive | SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018 | d3fd21745dfddb2979e8ac262588cfdfe471899f | 0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0 | refs/heads/master | 2020-03-31T15:52:01.005505 | 2018-10-01T23:38:50 | 2018-10-01T23:38:50 | 152,354,327 | 1 | 0 | MIT | 2018-10-10T02:57:02 | 2018-10-10T02:57:02 | null | UTF-8 | Java | false | false | 2,041 | java | /****************************************************************************
* Copyright (c) 2007 Composent, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Composent, Inc. - initial API and implementation
*****************************************************************************/
package org.eclipse.ecf.docshare.messages;
import java.io.*;
import org.eclipse.ecf.internal.docshare.Messages;
import org.eclipse.ecf.sync.IModelChangeMessage;
import org.eclipse.ecf.sync.SerializationException;
/**
* @since 2.1
*
*/
public class Message implements IModelChangeMessage, Serializable {
private static final long serialVersionUID = 4858801311305630711L;
/**
* Deserialize in to message
* @param bytes
* @return IModelChangeMessage
* @throws SerializationException
*/
public static IModelChangeMessage deserialize(byte[] bytes) throws SerializationException {
try {
final ByteArrayInputStream bins = new ByteArrayInputStream(bytes);
final ObjectInputStream oins = new ObjectInputStream(bins);
return (IModelChangeMessage) oins.readObject();
} catch (final Exception e) {
throw new SerializationException(Messages.DocShare_EXCEPTION_DESERIALIZING_MESSAGE0, e);
}
}
public byte[] serialize() throws SerializationException {
try {
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(this);
return bos.toByteArray();
} catch (final Exception e) {
throw new SerializationException(Messages.DocShare_EXCEPTION_DESERIALIZING_MESSAGE0, e);
}
}
public Object getAdapter(Class adapter) {
return null;
}
}
| [
"masudcseku@gmail.com"
] | masudcseku@gmail.com |
a3d36ca20139f7c8cbea05406a93d86265ff0575 | 963549b5cf3738b326a6222f8253c38b7493645e | /builds-review/apps/expense-service/src/main/java/com/redhat/training/Expense.java | eb7392c685ead16ed6d5f226cdec475be1b05616 | [
"Apache-2.0"
] | permissive | stolarware/DO288-apps | 6fce82a14085538654ad9feacaaa8ae98c1533a3 | 632de7602187440a852287cb56c9b29e892cc351 | refs/heads/main | 2023-08-16T19:18:46.115824 | 2023-08-11T13:55:15 | 2023-08-11T13:55:15 | 382,363,455 | 0 | 0 | Apache-2.0 | 2021-07-02T14:00:10 | 2021-07-02T14:00:09 | null | UTF-8 | Java | false | false | 1,775 | java | package com.redhat.training;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.UUID;
public class Expense {
enum PaymentMethod {
CASH, CREDIT_CARD, DEBIT_CARD,
}
private UUID uuid;
private String name;
private LocalDateTime creationDate;
private PaymentMethod paymentMethod;
private BigDecimal amount;
public Expense(UUID uuid, String name, LocalDateTime creationDate,
PaymentMethod paymentMethod, String amount) {
this.uuid = uuid;
this.name = name;
this.creationDate = creationDate;
this.paymentMethod = paymentMethod;
this.amount = new BigDecimal(amount);
}
public Expense(String name, PaymentMethod paymentMethod, String amount) {
this(UUID.randomUUID(), name, LocalDateTime.now(), paymentMethod, amount);
}
public Expense() {
this.uuid = UUID.randomUUID();
this.creationDate = LocalDateTime.now();
}
public UUID getUuid() {
return uuid;
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public LocalDateTime getCreationDate() {
return creationDate;
}
public void setCreationDate(LocalDateTime creationDate) {
this.creationDate = creationDate;
}
public PaymentMethod getPaymentMethod() {
return paymentMethod;
}
public void setPaymentMethod(PaymentMethod paymentMethod) {
this.paymentMethod = paymentMethod;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
} | [
"noreply@github.com"
] | noreply@github.com |
e902d1e24be96d85aeba83ea16b4c67293749f6d | daf9d135937c3d1fb9369dc41a19b4fc3712d180 | /src/main/java/com/mohansrihari/CustomRequestProcessor.java | 350843a2461ee9a06dcb2357800ded52f8082bdf | [] | no_license | mohansrihari/struts-facebook-integration | a8d99a54746c656ffb3124841d8b01fc32b4f126 | 0e6bb5e326ac0917ddd22e4ad368c7f3ecd032cf | refs/heads/master | 2020-04-18T04:14:51.057573 | 2014-09-05T11:02:01 | 2014-09-05T11:02:01 | 4,376,066 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,316 | java | package com.mohansrihari;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
import org.apache.struts.tiles.TilesRequestProcessor;
import com.mohansrihari.action.InitAction;
import com.mohansrihari.facebook.FacebookParameterProviderImpl;
import com.mohansrihari.facebook.FacebookToken;
import com.mohansrihari.facebook.FacebookTokenExtractor;
import com.mohansrihari.service.FacebookService;
import com.mohansrihari.service.locator.ServiceLocator;
import com.mohansrihari.util.Util;
public class CustomRequestProcessor extends TilesRequestProcessor
{
private FacebookTokenExtractor tokenExtractor;
private static final String FACEBOOK_TOKEN = "facebookToken";
private static final String REQUEST_AUTH="/requestAuth.do";
private static final Logger logger = Logger.getLogger(InitAction.class);
@Override protected boolean processPreprocess(HttpServletRequest request,
HttpServletResponse response)
{
Util.loggerMessage(logger,"processPreprocess","Start");
String path = request.getServletPath();
HttpSession session = request.getSession();
if(path.equals(REQUEST_AUTH))
{
return true;
}
try
{
FacebookService facebookService = (FacebookService)Util.getService(ServiceLocator.FACEBOOK_SERVICE);
tokenExtractor = new FacebookTokenExtractor(facebookService);
try {
FacebookToken facebookToken = tokenExtractor.extract( new FacebookParameterProviderImpl(request));
session.setAttribute("facebookToken",facebookToken);
} catch (com.mohansrihari.exception.FacebookException exception) {
if (exception.isOAuthException()) {
forceLogin(request, response);
return false;
}
} catch (Exception e) {
e.printStackTrace();
}
}
catch(Exception e)
{
throw new RuntimeException(e.getMessage(), e);
}
Util.loggerMessage(logger,"processPreprocess","End");
return true;
}
private void forceLogin(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.getSession().removeAttribute(FACEBOOK_TOKEN);
request.getRequestDispatcher(REQUEST_AUTH).forward(request,response);
}
}
| [
"mohansrihari123@gmail.com"
] | mohansrihari123@gmail.com |
c050ea8279651d531a40cc5ebc7abbb2fc04a1dd | ed49254b278b48473c9bdf1c3e70ef8010e83cf7 | /BayesBaseNew/src/edu/cmu/tetrad/search/ImpliedOrientation.java | 7db8dd3a73a694a211ef080a9a5ae90a49e53988 | [] | no_license | sfu-cl-lab/exception-mining | 5ac1e70a9a527d4129d77df66e536c287e5b4e25 | 7b80481f7d906a49db99901adb4059b273ac6af6 | refs/heads/master | 2021-05-31T22:36:21.973306 | 2016-05-15T22:05:14 | 2016-05-15T22:05:14 | 58,755,606 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,055 | java | ///////////////////////////////////////////////////////////////////////////////
// For information as to what this class does, see the Javadoc, below. //
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, //
// 2007, 2008, 2009, 2010 by Peter Spirtes, Richard Scheines, Joseph Ramsey, //
// and Clark Glymour. //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
///////////////////////////////////////////////////////////////////////////////
package edu.cmu.tetrad.search;
import edu.cmu.tetrad.data.Knowledge;
import edu.cmu.tetrad.data.IKnowledge;
import edu.cmu.tetrad.graph.Graph;
/**
* Adds any orientations implied by the given orientation.
*
* @author Joseph Ramsey
*/
public interface ImpliedOrientation {
/**
* Sets knowledge.
*/
void setKnowledge(IKnowledge knowledge);
/**
* Adds implied orientations.
*/
void orientImplied(Graph graph);
}
| [
"sriahi@sfu.ca"
] | sriahi@sfu.ca |
03138722861453ae2067bdcc4d5aefb9bcf9aa8e | a920ee2050b7468349dd5336dd654455c5500813 | /src/main/java/hillel/spring/review/ReviewRepository.java | 2784fe265cc0843c836b92efe490b7981acafb54 | [] | no_license | AlexanderTarasyuk/SpringRestApp | eb2d38d4229489daf635e72bce780ebfb2d0ac53 | 1a2701e5d84d67a2b32ca9eabe185bc5928d2cf2 | refs/heads/master | 2020-06-18T09:53:39.679190 | 2019-09-21T06:56:10 | 2019-09-21T06:56:10 | 196,065,719 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 350 | java | package hillel.spring.review;
import hillel.spring.review.model.Review;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface ReviewRepository extends JpaRepository<Review, Integer> {
List<Review> findByDoctorId(Integer doctorId);
}
| [
"vergolff@gmail.comcd"
] | vergolff@gmail.comcd |
3a305610dd4a659e6b61f36ae0d67d10a2919657 | a2bdb65bc64bb10d042c0e13ebcc5697387323ff | /android/app/src/main/java/com/tstcr20200616_dev_6133/MainActivity.java | 2497e8a199e2fef8d9791cdb52b69aa84dae4715 | [] | no_license | crowdbotics-apps/tstcr20200616-dev-6133 | 7402d7bffa1104d8781dc63cb06422692b3326bb | 7f44159faf892fad036aa7f9b06ae78fc04a49d5 | refs/heads/master | 2022-10-27T22:01:37.589371 | 2020-06-16T14:39:10 | 2020-06-16T14:39:10 | 272,731,702 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 389 | java | package com.tstcr20200616_dev_6133;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "tstcr20200616_dev_6133";
}
}
| [
"team@crowdbotics.com"
] | team@crowdbotics.com |
202e2f8f5032b32693dcbd78193231e3dfa1c7f7 | ddbe0810bbac1ee3bbcbb10c2e337f5b96f75234 | /StormSecurity/MobiCine/app/src/main/java/br/com/stormsecurity/mobicine/service/impl/AbstractServiceImpl.java | 0642d634477a2bc39c41f50f370c1e4518bfa781 | [] | no_license | dennysbarbosa/Projeto-Mobi-Cine-Android | 242089318c496b3004f7c096b21d263543cce657 | 9bfbc2a6b9406901673867ef65a5d332e607fd7b | refs/heads/master | 2021-01-10T11:59:56.106225 | 2016-04-05T02:21:25 | 2016-04-05T02:21:25 | 55,388,506 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 575 | java | package br.com.stormsecurity.mobicine.service.impl;
import com.google.gson.Gson;
public class AbstractServiceImpl {
private static Gson gson = null;
public static Gson getGson() {
if (gson == null) {
gson = new Gson();
}
return gson;
}
public boolean processarRespostaServidor(boolean sucesso, String data) {
if (!sucesso || data.startsWith("Erro")
|| data.contains("Error report")
|| data.contains("Host name may not be null")
|| data.contains("refused") || data.contains("ROAPError")) {
return false;
} else {
return true;
}
}
} | [
"dennysbarbosa29@gmail.com"
] | dennysbarbosa29@gmail.com |
f6909ad1a3491a9005e475aacad6f0fdf28691f8 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/ttnet/org/chromium/net1/urlconnection/CronetChunkedOutputStream.java | b7280318a777a7a45240e94690f538033b9c52ab | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,952 | java | package com.ttnet.org.chromium.net1.urlconnection;
import com.ttnet.org.chromium.net1.UploadDataProvider;
import com.ttnet.org.chromium.net1.UploadDataSink;
import java.io.IOException;
import java.net.HttpRetryException;
import java.net.SocketTimeoutException;
import java.nio.ByteBuffer;
final class CronetChunkedOutputStream extends CronetOutputStream {
public final ByteBuffer mBuffer;
private final CronetHttpURLConnection mConnection;
public boolean mLastChunk = false;
public final MessageLoop mMessageLoop;
private final UploadDataProvider mUploadDataProvider = new UploadDataProviderImpl();
class UploadDataProviderImpl extends UploadDataProvider {
public long getLength() {
return -1;
}
private UploadDataProviderImpl() {
}
public void rewind(UploadDataSink uploadDataSink) {
uploadDataSink.onRewindError(new HttpRetryException("Cannot retry streamed Http body", -1));
}
public void read(UploadDataSink uploadDataSink, ByteBuffer byteBuffer) {
if (byteBuffer.remaining() >= CronetChunkedOutputStream.this.mBuffer.remaining()) {
byteBuffer.put(CronetChunkedOutputStream.this.mBuffer);
CronetChunkedOutputStream.this.mBuffer.clear();
uploadDataSink.onReadSucceeded(CronetChunkedOutputStream.this.mLastChunk);
if (!CronetChunkedOutputStream.this.mLastChunk) {
CronetChunkedOutputStream.this.mMessageLoop.quit();
}
} else {
int limit = CronetChunkedOutputStream.this.mBuffer.limit();
CronetChunkedOutputStream.this.mBuffer.limit(CronetChunkedOutputStream.this.mBuffer.position() + byteBuffer.remaining());
byteBuffer.put(CronetChunkedOutputStream.this.mBuffer);
CronetChunkedOutputStream.this.mBuffer.limit(limit);
uploadDataSink.onReadSucceeded(false);
}
}
}
/* access modifiers changed from: 0000 */
public final void checkReceivedEnoughContent() throws IOException {
}
/* access modifiers changed from: 0000 */
public final UploadDataProvider getUploadDataProvider() {
return this.mUploadDataProvider;
}
/* access modifiers changed from: 0000 */
public final void setConnected() throws IOException {
}
private void ensureBufferHasRemaining() throws IOException {
if (!this.mBuffer.hasRemaining()) {
uploadBufferInternal();
}
}
public final void close() throws IOException {
super.close();
if (!this.mLastChunk) {
this.mLastChunk = true;
this.mBuffer.flip();
}
}
private void uploadBufferInternal() throws IOException {
checkNotClosed();
this.mBuffer.flip();
cronet_loop(this.mConnection.getReadTimeout());
checkNoException();
}
public final void write(int i) throws IOException {
ensureBufferHasRemaining();
this.mBuffer.put((byte) i);
}
private void cronet_loop(int i) throws IOException {
try {
this.mMessageLoop.loop(i);
} catch (SocketTimeoutException unused) {
if (this.mConnection != null) {
this.mConnection.onUploadTimeout();
this.mMessageLoop.reset();
this.mMessageLoop.loop(i / 2);
}
} catch (Exception e) {
if (this.mConnection != null) {
CronetHttpURLConnection cronetHttpURLConnection = this.mConnection;
StringBuilder sb = new StringBuilder("Unexpected request usage, caught in CronetChunkedOutputStream, caused by ");
sb.append(e);
cronetHttpURLConnection.setException(new IOException(sb.toString()));
this.mMessageLoop.reset();
this.mMessageLoop.loop(i / 2);
}
}
}
CronetChunkedOutputStream(CronetHttpURLConnection cronetHttpURLConnection, int i, MessageLoop messageLoop) {
if (cronetHttpURLConnection == null) {
throw new NullPointerException();
} else if (i > 0) {
this.mBuffer = ByteBuffer.allocate(i);
this.mConnection = cronetHttpURLConnection;
this.mMessageLoop = messageLoop;
} else {
throw new IllegalArgumentException("chunkLength should be greater than 0");
}
}
public final void write(byte[] bArr, int i, int i2) throws IOException {
checkNotClosed();
if (bArr.length - i < i2 || i < 0 || i2 < 0) {
throw new IndexOutOfBoundsException();
}
int i3 = i2;
while (i3 > 0) {
int min = Math.min(i3, this.mBuffer.remaining());
this.mBuffer.put(bArr, (i + i2) - i3, min);
i3 -= min;
ensureBufferHasRemaining();
}
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
d2429ce1504005b22d5c7e552c23465483f47f6b | 0bd2a900824c05bd49fec3294a857567a7e4575c | /src/tests/org/jboss/test/remoting/transport/socket/load/PooledConnectionTestCase.java | dbd44c2d91ab57b8a350dc9e25950cc48bac24b6 | [] | no_license | dcreado/jbossremoting2.5.3 | 769e0bf3cfb026e76999ad9fc8057132a52c7b0e | 74d0979a0b0f4e41e189f620bd1a3c9554c638a4 | refs/heads/master | 2021-01-01T06:04:42.540475 | 2013-04-25T17:23:13 | 2013-04-25T17:23:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,778 | java | package org.jboss.test.remoting.transport.socket.load;
import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
import junit.framework.TestCase;
import org.apache.log4j.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.transport.Connector;
public class PooledConnectionTestCase extends TestCase
{
private static int numOfRunnerThreads = 10;
// private static int numOfRunnerThreads = 3;
private static SynchronizedInt responseCount = new SynchronizedInt(0);
private Connector connector;
// static
// {
// BasicConfigurator.configure();
// Logger.getRootLogger().setLevel(Level.INFO);
// Logger.getInstance("org.jboss.remoting.transport.socket").setLevel(Level.ALL);
// }
private Logger logger = Logger.getRootLogger();
protected String getTransport()
{
return "socket";
}
public static void main(String[] args) throws Throwable
{
PooledConnectionTestCase rt = new PooledConnectionTestCase();
rt.startServer();
// rt.runMultipleClients(Integer.parseInt(args[1]));
rt.runMultipleClients(PooledConnectionTestCase.numOfRunnerThreads);
}
public void setUp() throws Exception
{
startServer();
}
public void tearDown() throws Exception
{
if(connector != null)
{
connector.stop();
connector.destroy();
}
}
public void startServer() throws Exception
{
String locatorURI = getTransport() + "://localhost:54000/?maxPoolSize=10&timeout=10000";
InvokerLocator locator = new InvokerLocator(locatorURI);
connector = new Connector();
connector.setInvokerLocator(locator.getLocatorURI());
connector.create();
SampleInvocationHandler invocationHandler = new SampleInvocationHandler();
connector.addInvocationHandler("sample", invocationHandler);
connector.start();
}
public void testRunClients() throws Throwable
{
runMultipleClients(PooledConnectionTestCase.numOfRunnerThreads);
// waiting 8 seconds as the server handler will have waited client calls
// 5 seconds, but should only be able to make client invocations 2 at a time.
Thread.currentThread().sleep(8000);
// should not have all invocations as should be blocking within client invoker (as only
// allows 2 concurrent client connections).
assertFalse(10 == PooledConnectionTestCase.responseCount.get());
Thread.currentThread().sleep(120000);
System.out.println("Response count = " + PooledConnectionTestCase.responseCount + ". Expected 10.");
assertEquals(10, PooledConnectionTestCase.responseCount.get());
}
public void runClient(String clientId) throws Throwable
{
String locatorURI = getTransport() + "://localhost:54000/?clientMaxPoolSize=2";
InvokerLocator locator = new InvokerLocator(locatorURI);
Client client = new Client(locator);
client.connect();
String req = clientId;
Object resp = client.invoke(req);
PooledConnectionTestCase.responseCount.increment();
System.out.println("Received response of: " + resp + ". Response count = " + PooledConnectionTestCase.responseCount);
System.in.read();
}
public void runMultipleClients(int cnt) throws Throwable {
for (int i = 0; i < cnt; i++) {
Thread t = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(1000);
runClient(Thread.currentThread().getName());
} catch (Throwable e) {
logger.error(e);
e.printStackTrace();
}
}
}, Integer.toString(i));
t.start();
}
}
}
| [
"domingos.creado@gmail.com"
] | domingos.creado@gmail.com |
ebeb5ecd719e37bcd748bf070e38fd17e7b1808a | 38be8c108d747580935b0725888b667a494b8caf | /src/main/java/TestPredict.java | c6f1e203f8c744bb9d59c7d1db1ad156257a246f | [] | no_license | pawnxyc/jdk8new | 0320f5be614f771a918640e8f2555e74e305c6f8 | 006c8f947165ac2599c81f0816cc59591b3c7012 | refs/heads/master | 2022-11-09T22:28:20.586117 | 2020-06-09T07:44:34 | 2020-06-09T07:44:34 | 255,293,722 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 554 | java | import java.util.*;
import java.util.stream.Collectors;
public class TestPredict {
public static void main(String[] args) {
User u1= new User(11,"xiaom",'m');
User u2= new User(10,"pawn",'w');
User u3= new User(122,"faker",'w');
User u4= new User(11,"joker",'m');
List<User> list = Arrays.asList(u1,u2,u3,u4);
List<User> list1 = list.stream().
filter(User.yearmorethen10.and(User.sexisman)).
collect(Collectors.toList());
System.out.println(list1);
}
}
| [
"pawncd@cn.ibm.com"
] | pawncd@cn.ibm.com |
76557f110f68f3cbd713ff46319d39f846c5e792 | 79b276f2d2bbafdd4e21ab531495661c88a4d26f | /app/src/main/java/com/example/notewise/Folder.java | a69a766ec79260b79194212b6b53181e9427b5dc | [] | no_license | prath1996/NoteWise | ac68fc9492641f970f896e929d732300056850b5 | 89152b449dd165677c49adc0f8204e93b9e9e18b | refs/heads/master | 2020-08-02T20:43:12.944766 | 2019-09-29T14:15:27 | 2019-09-29T14:15:27 | 211,501,174 | 0 | 0 | null | 2019-09-29T14:15:28 | 2019-09-28T13:02:13 | Java | UTF-8 | Java | false | false | 1,107 | java | package com.example.notewise;
import java.sql.Timestamp;
import java.util.List;
public class Folder {
private String FolderName;
private Timestamp FirstCreated;
private Timestamp LastModified;
private List<File> ListOfFile;
public Folder(String name) {
this.FolderName = name;
this.FirstCreated = new Timestamp(System.currentTimeMillis());
this.LastModified = this.FirstCreated;
}
public String getFolderName() {
return FolderName;
}
public void setFolderName(String FolderName) {
this.FolderName = FolderName;
}
public Timestamp getFirstCreated() {
return FirstCreated;
}
public Timestamp getLastModified() {
return LastModified;
}
public void setLastModified(Timestamp LastModified) {
this.LastModified = LastModified;
}
public void AddNote(Note object) {
this.ListOfFile.add(object);
}
public void AddTodo(Todo object) {
this.ListOfFile.add(object);
}
public List<File> getListOfFile() {
return ListOfFile;
}
}
| [
"duthade.sanket@iitgn.ac.in"
] | duthade.sanket@iitgn.ac.in |
10c3af293d2bdcf20ae1365af0c1bc5c7eef67f8 | d99c3111584c897265330d97f7fe14fa6e4dc118 | /app/src/main/java/com/tv/supersoccer/theop/MovieList.java | 8ea84c432825cb80d655d62d5ceade2bd7559585 | [] | no_license | hendradedis/THEOplayer-example | 975a018287b7e52fdc7ca793bed4b7a1a8649e31 | f3fb1cbdab0842fff4f604e1218c3444112780e0 | refs/heads/master | 2020-03-23T01:58:45.407262 | 2018-07-14T13:47:49 | 2018-07-14T13:47:49 | 140,944,995 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,594 | java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.tv.supersoccer.theop;
import java.util.ArrayList;
import java.util.List;
public final class MovieList {
public static final String MOVIE_CATEGORY[] = {
"Category Zero",
"Category One",
"Category Two",
"Category Three",
"Category Four",
"Category Five",
};
private static List<Movie> list;
private static long count = 0;
public static List<Movie> getList() {
if (list == null) {
list = setupMovies();
}
return list;
}
public static List<Movie> setupMovies() {
list = new ArrayList<>();
String title[] = {
"Zeitgeist 2010_ Year in Review",
"Google Demo Slam_ 20ft Search",
"Introducing Gmail Blue",
"Introducing Google Fiber to the Pole",
"Introducing Google Nose"
};
String description = "Fusce id nisi turpis. Praesent viverra bibendum semper. "
+ "Donec tristique, orci sed semper lacinia, quam erat rhoncus massa, non congue tellus est "
+ "quis tellus. Sed mollis orci venenatis quam scelerisque accumsan. Curabitur a massa sit "
+ "amet mi accumsan mollis sed et magna. Vivamus sed aliquam risus. Nulla eget dolor in elit "
+ "facilisis mattis. Ut aliquet luctus lacus. Phasellus nec commodo erat. Praesent tempus id "
+ "lectus ac scelerisque. Maecenas pretium cursus lectus id volutpat.";
String studio[] = {
"Studio Zero", "Studio One", "Studio Two", "Studio Three", "Studio Four"
};
String videoUrl[] = {
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Zeitgeist/Zeitgeist%202010_%20Year%20in%20Review.mp4",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Demo%20Slam/Google%20Demo%20Slam_%2020ft%20Search.mp4",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Gmail%20Blue.mp4",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Fiber%20to%20the%20Pole.mp4",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Nose.mp4"
};
String bgImageUrl[] = {
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Zeitgeist/Zeitgeist%202010_%20Year%20in%20Review/bg.jpg",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Demo%20Slam/Google%20Demo%20Slam_%2020ft%20Search/bg.jpg",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Gmail%20Blue/bg.jpg",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Fiber%20to%20the%20Pole/bg.jpg",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Nose/bg.jpg",
};
String cardImageUrl[] = {
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Zeitgeist/Zeitgeist%202010_%20Year%20in%20Review/card.jpg",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Demo%20Slam/Google%20Demo%20Slam_%2020ft%20Search/card.jpg",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Gmail%20Blue/card.jpg",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Fiber%20to%20the%20Pole/card.jpg",
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Nose/card.jpg"
};
for (int index = 0; index < title.length; ++index) {
list.add(
buildMovieInfo(
title[index],
description,
studio[index],
videoUrl[index],
cardImageUrl[index],
bgImageUrl[index]));
}
return list;
}
private static Movie buildMovieInfo(
String title,
String description,
String studio,
String videoUrl,
String cardImageUrl,
String backgroundImageUrl) {
Movie movie = new Movie();
movie.setId(count++);
movie.setTitle(title);
movie.setDescription(description);
movie.setStudio(studio);
movie.setCardImageUrl(cardImageUrl);
movie.setBackgroundImageUrl(backgroundImageUrl);
movie.setVideoUrl(videoUrl);
return movie;
}
} | [
"hendradedisupriadi@gmail.com"
] | hendradedisupriadi@gmail.com |
6f2d9a9cb5626fcf2e5a67b4bb4e5cf15d5ad4f2 | 547070fce458b8732cd0bd9f50ed4d37e68c6ab8 | /livebookstore/src/net/livebookstore/domain/Category.java | 8563566347421bef4f7c89477ddd6a2af84c9207 | [] | no_license | snowelf/livebookstore | d05302be2145f74357ed62a2a284e66400cff427 | 000db8ed578b315ea69d397ce15dd3b15bb0673b | refs/heads/master | 2021-01-18T10:38:28.079751 | 2008-08-29T13:50:34 | 2008-08-29T13:50:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,823 | java | package net.livebookstore.domain;
import java.util.*;
import javax.persistence.*;
import org.apache.commons.logging.LogFactory;
import org.hibernate.annotations.GenericGenerator;
/**
* Category that has tree structure.
*
* @author xuefeng
*/
@Entity
@Table(name="t_category")
public class Category {
public static final int ROOT_ID = 0x01000000;
private static final int[] MASK = {
0xFF000000,
0xFFFF0000,
0xFFFFFF00,
0xFFFFFFFF
};
private Integer id; // PK
private String name;
private int categoryOrder;
private int mask;
private int level;
private int parentId = 0; // parentId;
private List<Category> children = new ArrayList<Category>();
/**
* Primary key of id. We use Integer instead of Long because there are some
* problems if using Long on HSQLDB.
*/
@Id
@GeneratedValue(generator="assigned")
@GenericGenerator(name="assigned", strategy="assigned")
public Integer getId() { return id; }
// set object's id also set mask & parent's id:
public void setId(Integer id) {
this.id = id;
for(int i=0; i<MASK.length; i++) {
if((MASK[i] & id.intValue())==id.intValue()) {
this.mask = MASK[i];
this.level = i;
if(i>0)
this.parentId = id.intValue() & MASK[i-1];
break;
}
}
}
@Column(nullable=false)
public int getCategoryOrder() { return categoryOrder; }
public void setCategoryOrder(int categoryOrder) { this.categoryOrder = categoryOrder; };
@Transient
public int getParentId() { return parentId; }
@Transient
public int getLevel() { return level; }
@Transient
public List<Category> getChildren() { return children; }
public void setChildren(List<Category> children) {
this.children = children;
}
@Column(nullable=false, length=20)
public String getName() { return name; }
public void setName(String name) { this.name = name; }
@Transient
public int getMask() { return mask; }
@Transient
public boolean isRoot() { return level==0; }
@Transient
public boolean isLeaf() { return level==3; }
public synchronized boolean add(Category child) {
if(this.level>=child.level)
return false;
if((child.level - this.level) == 1) {
if((child.id.intValue() & mask) == this.id.intValue()) {
// direct child:
LogFactory.getLog(Category.class).info("add child " + child + " into " + this);
this.children.add(child);
return true;
}
return false;
}
for(Category c : children) {
if(c.add(child))
return true;
}
return false;
}
public synchronized boolean remove(Category child) {
for(Category c : children) {
if(c.getId().intValue()==child.getId().intValue()) {
children.remove(c);
return true;
}
if(c.remove(child)) {
return true;
}
}
return false;
}
public String toString() {
return "[" + Integer.toHexString(id.intValue()) + ", " + level + "] " + name;
}
public void debug() {
String s = "";
for(int i=0; i<getLevel(); i++) {
s = s + " ";
}
LogFactory.getLog(Category.class).info(s + "[" + Integer.toHexString(id.intValue()) + ", " + Integer.toHexString(getMask()) + "] " + name);
for(Category c : children)
c.debug();
}
}
| [
"askxuefeng@28d0ba32-b41c-0410-b96d-49d1a54840f3"
] | askxuefeng@28d0ba32-b41c-0410-b96d-49d1a54840f3 |
3451e8c6f81f5e919017dcc60f189bf04e319c6a | a772a6b8794ad9ba335ef6231e4d5b5409a9909a | /src/java/br/cesjf/lppo/ListaVistanteServlet.java | dd42fd9d35499df85982ef61dbee3d430ab2f8d1 | [] | no_license | cesjf-lppo/cesjf-lppo-2017-1-exr03-jeje23 | 79b9ccdf9a88e298c5319dad682d0a969659d02c | e7c036e83e1af9ace0e7344230b7780e2f30b29c | refs/heads/master | 2021-01-19T08:02:43.889421 | 2017-04-08T00:50:46 | 2017-04-08T00:50:46 | 87,597,690 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,792 | 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 br.cesjf.lppo;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author aluno
*/
@WebServlet(name = "ListaVisitanteServlet", urlPatterns = {"/lista.html"})
public class ListaVistanteServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
List<Visitante> visitantes = new ArrayList<>();
try {
//Pegar os dados do banco
Class.forName("org.apache.derby.jdbc.ClientDriver");
Connection conexao = DriverManager.getConnection("jdbc:derby://localhost:1527//lppo-2017-1", "usuario", "senha");
Statement operacao = conexao.createStatement();
ResultSet resultado = operacao.executeQuery("SELECT * FROM visitante ");
while(resultado.next()){
Visitante visitanteAtual = new Visitante();
visitanteAtual.setId(resultado.getLong("id"));
visitanteAtual.setNome(resultado.getString("nome"));
visitanteAtual.setIdade(resultado.getInt("idade"));
visitanteAtual.setEntrada(resultado.getTimestamp("entrada"));
visitanteAtual.setSaida(resultado.getTimestamp("saida"));
visitantes.add(visitanteAtual);
}
} catch (ClassNotFoundException ex) {
Logger.getLogger(ListaVistanteServlet.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(ListaVistanteServlet.class.getName()).log(Level.SEVERE, null, ex);
}
request.setAttribute("visitantes", visitantes);
request.getRequestDispatcher("WEB-INF/lista-visitante.jsp").forward(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}
}
| [
"je_barbosaa@hotmail.com"
] | je_barbosaa@hotmail.com |
ef265ede110a0286766f1b0d3d7bcbc4b843b929 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes5.dex_source_from_JADX/com/facebook/graphql/deserializers/GraphQLInstantArticleDeserializer.java | 1036e4a15bfdaf12c00afc2b2cb153434f425ac8 | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,941 | java | package com.facebook.graphql.deserializers;
import com.facebook.flatbuffers.FlatBufferBuilder;
import com.facebook.flatbuffers.MutableFlatBuffer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.nio.ByteBuffer;
/* compiled from: options_bar_menu */
public class GraphQLInstantArticleDeserializer {
public static int m5262a(JsonParser jsonParser, FlatBufferBuilder flatBufferBuilder) {
int[] iArr = new int[10];
while (jsonParser.c() != JsonToken.END_OBJECT) {
String i = jsonParser.i();
jsonParser.c();
if (!(jsonParser.g() == JsonToken.VALUE_NULL || i == null)) {
if (i.equals("feedback")) {
iArr[0] = GraphQLFeedbackDeserializer.m4892a(jsonParser, flatBufferBuilder);
} else if (i.equals("fullLatestVersion")) {
iArr[1] = GraphQLInstantArticleVersionDeserializer.m5265a(jsonParser, flatBufferBuilder);
} else if (i.equals("global_share")) {
iArr[2] = GraphQLExternalUrlDeserializer.m4867a(jsonParser, flatBufferBuilder);
} else if (i.equals("id")) {
iArr[3] = flatBufferBuilder.b(jsonParser.o());
} else if (i.equals("latest_version")) {
iArr[4] = GraphQLInstantArticleVersionDeserializer.m5265a(jsonParser, flatBufferBuilder);
} else if (i.equals("owner_id")) {
iArr[5] = flatBufferBuilder.b(jsonParser.o());
} else if (i.equals("rich_document_edge")) {
iArr[6] = GraphQLInstantArticleVersionDeserializer.m5265a(jsonParser, flatBufferBuilder);
} else if (i.equals("url")) {
iArr[7] = flatBufferBuilder.b(jsonParser.o());
} else if (i.equals("relatedArticleVersion")) {
iArr[8] = GraphQLInstantArticleVersionDeserializer.m5265a(jsonParser, flatBufferBuilder);
} else if (i.equals("messenger_content_subscription_option")) {
iArr[9] = GraphQLMessengerContentSubscriptionOptionDeserializer.m5367a(jsonParser, flatBufferBuilder);
} else {
jsonParser.f();
}
}
}
flatBufferBuilder.c(10);
flatBufferBuilder.b(0, iArr[0]);
flatBufferBuilder.b(1, iArr[1]);
flatBufferBuilder.b(2, iArr[2]);
flatBufferBuilder.b(3, iArr[3]);
flatBufferBuilder.b(4, iArr[4]);
flatBufferBuilder.b(5, iArr[5]);
flatBufferBuilder.b(6, iArr[6]);
flatBufferBuilder.b(7, iArr[7]);
flatBufferBuilder.b(8, iArr[8]);
flatBufferBuilder.b(9, iArr[9]);
return flatBufferBuilder.d();
}
public static MutableFlatBuffer m5263a(JsonParser jsonParser, short s) {
FlatBufferBuilder flatBufferBuilder = new FlatBufferBuilder(128);
int a = m5262a(jsonParser, flatBufferBuilder);
if (1 != 0) {
flatBufferBuilder.c(2);
flatBufferBuilder.a(0, s, 0);
flatBufferBuilder.b(1, a);
a = flatBufferBuilder.d();
}
flatBufferBuilder.d(a);
ByteBuffer wrap = ByteBuffer.wrap(flatBufferBuilder.e());
wrap.position(0);
MutableFlatBuffer mutableFlatBuffer = new MutableFlatBuffer(wrap, null, null, true, null);
mutableFlatBuffer.a(4, Boolean.valueOf(true));
return mutableFlatBuffer;
}
public static void m5264a(MutableFlatBuffer mutableFlatBuffer, int i, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) {
jsonGenerator.f();
int g = mutableFlatBuffer.g(i, 0);
if (g != 0) {
jsonGenerator.a("feedback");
GraphQLFeedbackDeserializer.m4895b(mutableFlatBuffer, g, jsonGenerator, serializerProvider);
}
g = mutableFlatBuffer.g(i, 1);
if (g != 0) {
jsonGenerator.a("fullLatestVersion");
GraphQLInstantArticleVersionDeserializer.m5267a(mutableFlatBuffer, g, jsonGenerator, serializerProvider);
}
g = mutableFlatBuffer.g(i, 2);
if (g != 0) {
jsonGenerator.a("global_share");
GraphQLExternalUrlDeserializer.m4869a(mutableFlatBuffer, g, jsonGenerator, serializerProvider);
}
if (mutableFlatBuffer.g(i, 3) != 0) {
jsonGenerator.a("id");
jsonGenerator.b(mutableFlatBuffer.c(i, 3));
}
g = mutableFlatBuffer.g(i, 4);
if (g != 0) {
jsonGenerator.a("latest_version");
GraphQLInstantArticleVersionDeserializer.m5267a(mutableFlatBuffer, g, jsonGenerator, serializerProvider);
}
if (mutableFlatBuffer.g(i, 5) != 0) {
jsonGenerator.a("owner_id");
jsonGenerator.b(mutableFlatBuffer.c(i, 5));
}
g = mutableFlatBuffer.g(i, 6);
if (g != 0) {
jsonGenerator.a("rich_document_edge");
GraphQLInstantArticleVersionDeserializer.m5267a(mutableFlatBuffer, g, jsonGenerator, serializerProvider);
}
if (mutableFlatBuffer.g(i, 7) != 0) {
jsonGenerator.a("url");
jsonGenerator.b(mutableFlatBuffer.c(i, 7));
}
g = mutableFlatBuffer.g(i, 8);
if (g != 0) {
jsonGenerator.a("relatedArticleVersion");
GraphQLInstantArticleVersionDeserializer.m5267a(mutableFlatBuffer, g, jsonGenerator, serializerProvider);
}
g = mutableFlatBuffer.g(i, 9);
if (g != 0) {
jsonGenerator.a("messenger_content_subscription_option");
GraphQLMessengerContentSubscriptionOptionDeserializer.m5369a(mutableFlatBuffer, g, jsonGenerator, serializerProvider);
}
jsonGenerator.g();
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
29d0e15091359d4380df61a3c5d3579bba8171c4 | 6debdab9bffb9b880d9611edc1102a913242e5ab | /authentication-browser/src/main/java/novli/auth/authentication/browser/support/SocialUserInfo.java | e51a527c4b65fa22254af0f31ee6eae3c0405202 | [] | no_license | FatLi1989/authentication-server | e1c5adff8c0c91ced3562e2be7b287782f159223 | 762852b369bc4ad84cfd86f4f9c9f569201f0aa8 | refs/heads/master | 2020-07-07T12:56:39.657405 | 2019-09-06T00:20:15 | 2019-09-06T00:20:15 | 203,354,316 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 416 | java | package novli.auth.authentication.browser.support;
import lombok.Data;
@Data
public class SocialUserInfo {
/**
* qq 微信 等第三方登录名称
**/
private String providerId;
/**
* qq 微信 等第三方登录openId
**/
private String providerUserId;
/**
* 昵称
**/
private String nickName;
/**
* 头像
**/
private String headImg;
}
| [
"514340686@qq.com"
] | 514340686@qq.com |
1c2ba85b599a33b38f5972a66c0c0b014d6df2a7 | 36cd2e3ec84f3440cc751b182c10e956a4a29c6e | /aio-core/src/main/java/org/smartboot/socket/transport/package-info.java | 96b367859547e51363ed14ccc4748fe84003721a | [
"Apache-2.0"
] | permissive | apple006/smart-socket | 6f64aeae5555f8f90f98e4d8ddb9539691661d26 | 4fd57eb75a6d7327d94c925e127eec7e21759b66 | refs/heads/master | 2020-05-15T13:16:46.393879 | 2019-04-19T01:18:57 | 2019-04-19T01:18:57 | 182,293,875 | 1 | 0 | Apache-2.0 | 2019-04-19T16:26:57 | 2019-04-19T16:26:57 | null | UTF-8 | Java | false | false | 258 | java | /**
* 提供AIO通信服务的具体实现。
*
*
* <p>
* 该package下的类是对JAVA AIO进行一层轻度封装,提供更友好的使用体验。
* </p>
*
* @author 三刀
* @version V1.0 , 2018/5/19
*/
package org.smartboot.socket.transport; | [
"junwei.zheng@hipac.cn"
] | junwei.zheng@hipac.cn |
2fa05a1aa65f75ae85bb9d2cf32f3c439e44177c | 9a62169ace507c0be95adf3f86c849b0dc144c3e | /src/softtest/registery/file/ResetFrame.java | c3edb0cee8359c10a8551360aa563cd48081b425 | [] | no_license | 13001090108/DTSEmbed_LSC | 84b2e7edbf1c7f5162b19f06c892a5b42d3ad88e | 38cc44c10304458e923a1a834faa6b0ca216c0e2 | refs/heads/master | 2020-04-02T05:27:57.577850 | 2018-10-22T06:28:28 | 2018-10-22T06:28:28 | 154,078,761 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 3,273 | java | package softtest.registery.file;
import java.awt.Component;
import java.awt.Container;
import java.awt.event.ActionListener;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
public class ResetFrame extends JFrame
{
private JLabel requestLabel;
private JTextField requestFiled;
private JLabel respondLabel;
private JTextField respondFiled;
private JLabel space1;
private JLabel space2;
private JLabel message1;
// private JLabel message2;
private JButton enter;
public ResetFrame()
{
requestLabel = new JLabel("重置请求码:");
requestFiled = new JTextField();
requestFiled.setEditable(false);
respondLabel = new JLabel("重置响应码:");
respondFiled = new JTextField();
respondFiled.setFocusable(true);
space1 = new JLabel("");
space2 = new JLabel("");
message1 = new JLabel("---用户操作不当引起错误 请拨打电话010-62246981联系解决---");
enter = new JButton("重置");
enter.setActionCommand("enter");
Container c = this.getContentPane();
GroupLayout layout = new GroupLayout(c);
c.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
GroupLayout.SequentialGroup h1a = layout.createSequentialGroup();
h1a.addComponent(requestLabel);
h1a.addComponent(requestFiled);
GroupLayout.SequentialGroup h1b = layout.createSequentialGroup();
h1b.addComponent(respondLabel);
h1b.addComponent(respondFiled);
GroupLayout.ParallelGroup h1 = layout
.createParallelGroup(GroupLayout.Alignment.CENTER);
h1.addComponent(space1);
h1.addGroup(h1a);
h1.addGroup(h1b);
h1.addComponent(space2);
h1.addComponent(message1);
GroupLayout.ParallelGroup h = layout
.createParallelGroup(GroupLayout.Alignment.TRAILING);
h.addGroup(h1);
h.addComponent(enter);
layout.setHorizontalGroup(h);
GroupLayout.ParallelGroup v1 = layout
.createParallelGroup(GroupLayout.Alignment.CENTER);
v1.addComponent(requestLabel);
v1.addComponent(requestFiled);
GroupLayout.ParallelGroup v2 = layout
.createParallelGroup(GroupLayout.Alignment.CENTER);
v2.addComponent(respondLabel);
v2.addComponent(respondFiled);
GroupLayout.SequentialGroup v3 = layout.createSequentialGroup();
v3.addComponent(space1);
v3.addGroup(v1);
v3.addGroup(v2);
v3.addComponent(space2);
v3.addComponent(message1);
v3.addComponent(enter);
layout.setVerticalGroup(v3);
layout.linkSize(SwingConstants.VERTICAL, new Component[] {
requestFiled, respondFiled });
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(this);
}
catch (Exception ex)
{
}
this.setTitle("错误提示");
this.setBounds(400, 200, 450, 165);
this.setResizable(false);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
}
public void addActionLisener(ActionListener listener)
{
enter.addActionListener(listener);
}
public String getRespondField()
{
return respondFiled.getText().trim();
}
public void setReqField(String meg)
{
requestFiled.setText(meg);
}
}
| [
"lishaochun@bupt.edu.cn"
] | lishaochun@bupt.edu.cn |
3b852b6589b74a4f4d5e3cebe2b05db788a34e7d | 00e1255866e71aa92dc6688e4f06b65d1405e160 | /app/src/main/java/com/erp/distribution/sfa/model_acc_cb/CbMutasiKash.java | af3ded0fd5c455664a7f93ed75463858ac4e3eea | [] | no_license | bagus-stimata/MitraBelanja | 3703447a72ed8ad07c082dc3afb68c14254eb0d7 | 650084726ccf92c5b2a61e73a9a9735f3408beda | refs/heads/master | 2022-12-22T08:15:08.301637 | 2020-10-01T04:29:40 | 2020-10-01T04:29:40 | 279,060,916 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,109 | java | package com.erp.distribution.sfa.model_acc_cb;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import com.erp.distribution.sfa.model.modelenum.EnumAccTransactionType;
import java.io.Serializable;
import java.util.Date;
@Entity(tableName="cb_mutasikash")
public class CbMutasiKash implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@PrimaryKey(autoGenerate = true)
private long refno=0;
/*
* JIKA COPY DARI TEMPAT LAIN: MAKA SEBAGAI LOG TRACK MENINGGALKAN SOURCE_ID = ID sumber asal dia dicopy
* keperluan diantaranya:
* 1. Clone Database. karena tidak mungkin menggunakan Kode External yang bisa jadi kemungkinan kembar, tapi harus pakai kode internal
* 2.
*/
private long sourceID =0;
// @ManyToOne
// @JoinColumn(name="fdivisionBean", referencedColumnName="ID", nullable=false)
// private FDivision fdivisionBean;
private Integer fdivisionBean = 0;
private String noRek = "";
private String cekNumber = "";
private Date trDate = new Date();
private String payee = "";
private String notes = "";
/*
* JIKA: true maka jurnalnya berbeda
*
*/
private boolean mutasiKas= false;
private boolean mutasiAntarPT= false;
private boolean mutasiKonfirm= false;
/*
* Dipakai untuk Settlemen dengan AR vs Kasir
*/
// @ManyToOne
// @JoinColumn(name="payeeBean", referencedColumnName="ID", nullable=true)
// private FSalesman payeeBean;
private Integer payeeBean = 0;
private Double amount = 0.0;
private boolean endOfDay = false;
//SUMBER J=JOURNAL, BP=Sales Order and Retur, AR=Account Receivable, PO=Purchase, AP=Account Payable
// @Column(name="SOURCE", length=5)
// private String source= 0;
private EnumAccTransactionType accTransactionType;
/*
* Account Bank Only: Jadi harus difilter
*/
// @ManyToOne
// @JoinColumn(name="accAccountBean", referencedColumnName="ID", nullable=false)
// private AccAccount accAccountBean;
private Integer accAccountBean = 0;
private Date created = new Date();
private Date modified = new Date();
private String modifiedBy =""; //User ID
}
| [
"bagus.stimata@gmail.com"
] | bagus.stimata@gmail.com |
108e1eb41a435d90565ef41b6adbb6ba8d4519f2 | 0f346a3136225488ea36a6cac0855a6a4b4aea4f | /Lectures/Week08_ExamPrep/Code/Exercise1/oops/ClassAssignment.java | e78fc02c1540ab884357623170353a616bcec776 | [] | no_license | melvyniandrag/JavaFall2019ClassRepo | 3d13e58050856fcc4fe9cf3a27ed3c0e6070073e | 32a43a46f02ae67a06ef84775d4263338ca893af | refs/heads/master | 2021-11-20T02:19:44.811624 | 2021-10-16T03:13:23 | 2021-10-16T03:13:23 | 205,074,099 | 1 | 8 | null | null | null | null | UTF-8 | Java | false | false | 690 | java | import java.io.*;
public class ClassAssignment{
public static void main(String[] args){
final String inputFile = args[0];
final String outputFile = args[1];
int[][] intArr = null;
try{
intArr = ChangeBackground.ReadPPMIntoIntArray(inputFile);
for( int i : intArr[10]){
System.out.println(i);
}
}
catch( FileNotFoundException ex1 ){
ex1.printStackTrace();
}
catch( IOException ex2 ){
ex2.printStackTrace();
}
ChangeBackground.ChangeWhiteToRed(intArr);
try{
ChangeBackground.WritePPMFile(intArr, outputFile);
}
catch( FileNotFoundException ex2 ){
ex2.printStackTrace();
}
catch(IOException ex1){
ex1.printStackTrace();
}
}
}
| [
"melvyniandrag@gmail.com"
] | melvyniandrag@gmail.com |
d034144fe46d7964d37c582889adf630dd038689 | a742472ac2b5b2f11646e1e43b777cb5e164c7bc | /DrawCircle.java | d4e11c60ad09f6d059f3bc5f4d849ebe46654470 | [] | no_license | am7u19/Circle-Detector | a40140bd1e83e78e75b591dc11d71392078702d2 | fb1196e66987b4331fa787da72a0c137166e7488 | refs/heads/master | 2020-09-09T20:11:41.823104 | 2019-11-13T21:34:26 | 2019-11-13T21:34:26 | 221,555,546 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,458 | java | import java.awt.*;
import java.awt.image.BufferedImage;
/**
* This class contains a method that highlights a circle on an image.
*/
public class DrawCircle {
/**
* Highlights a circle with given center and radius.
* Highlight colour changes depending on circle colour.
*
* @param image Input image
* @param xCenter x-coordinate of center of circle
* @param yCenter y-coordinate of center of circle
* @param radius Radius of circle
*/
public static void drawCircle(BufferedImage image, int xCenter, int yCenter, int radius) {
Graphics imageGraphics = image.getGraphics();
for (int theta = 0; theta < 360; theta++) {
int y = (int) (yCenter - radius * Math.sin(theta * Math.PI / 180));
int x = (int) (xCenter - radius * Math.cos(theta * Math.PI / 180));
if (x < image.getWidth() && y < image.getHeight()) {
if (x >= 0 && y >= 0) {
Color pixelColor = new Color(image.getRGB(xCenter, yCenter));
if (pixelColor.getRed() < 100) {
imageGraphics.setColor(Color.RED);
} else if (pixelColor.getBlue() < 100) {
imageGraphics.setColor(Color.BLUE);
} else if (pixelColor.getGreen() < 100) {
imageGraphics.setColor(Color.GREEN);
} else {
imageGraphics.setColor(Color.MAGENTA);
}
imageGraphics.drawRect(x, y, 1, 1);
}
}
}
}
}
| [
"noreply@github.com"
] | noreply@github.com |
4ce3c70a6f41b0505d531d17bde1a3d8b7f1dcde | f910a84171e04f833a415f5d9bcc36920aa8c9aa | /Inventory-Module/src/main/java/nybsys/tillboxweb/models/ReasonModel.java | c0ff5601ec9d476439630b685bee41caefdc927d | [] | no_license | rocky-bgta/Java_Mircoservice_Backend_With_Mosquitto | 7ecb35ca05c1d44d5f43668ccd6c5f3bcb40e03b | 7528f12ed35560fcd4aba40b613ff09c5032bebf | refs/heads/master | 2022-11-17T23:50:42.207381 | 2020-09-18T13:53:00 | 2020-09-18T13:53:00 | 138,392,854 | 0 | 1 | null | 2022-11-16T07:30:17 | 2018-06-23T10:38:52 | Java | UTF-8 | Java | false | false | 626 | java | /**
* Created By: Md. Nazmus Salahin
* Created Date: 18-May-18
* Time: 11:54 AM
* Modified By:
* Modified date:
* (C) CopyRight Nybsys ltd.
*/
package nybsys.tillboxweb.models;
import nybsys.tillboxweb.BaseModel;
public class ReasonModel extends BaseModel {
private Integer reasonID;
private String reason;
public Integer getReasonID() {
return reasonID;
}
public void setReasonID(Integer reasonID) {
this.reasonID = reasonID;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
}
| [
"rocky.bgta@gmail.com"
] | rocky.bgta@gmail.com |
83cf3503cf8aeb04d60bfe52eef39c4006a35cbf | 0d5888623eea38ab4ffc86e0a534c77324a1da87 | /app/src/androidTest/java/com/example/sus/ExampleInstrumentedTest.java | b6dbdf93476e4be083a2499a719c9aa1233d1744 | [] | no_license | Raiane-nepomuceno/SUS | 24231112a5222bdad212a5e7d333a58ad98ebb2a | d1d93e49338035d37ded662354e5fb95de651583 | refs/heads/master | 2023-08-01T12:41:03.182967 | 2021-09-16T12:01:15 | 2021-09-16T12:01:15 | 406,567,724 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 744 | java | package com.example.sus;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.sus", appContext.getPackageName());
}
} | [
"nepomuceno.raiane@aluno.ifsp.edu.br"
] | nepomuceno.raiane@aluno.ifsp.edu.br |
5da4179d2504125d1ad935bb7f9d741b36e1403e | 049f2f598ba5a3dba5c85443c4a2081c70168a3d | /workspancests/aadhaar-csc/src/com/auth/dao/PersonalDAOImpl.java | a2c8c5c8f76be44ff3458e98ccbd9f88b3c778fb | [] | no_license | sanjunegi001/OnlineShop | 479aa10e7c2822d78b0136585da364196189de53 | 836b8ea6dface8fcd95225fd9093e3bf88475c1f | refs/heads/master | 2020-04-03T01:42:27.220071 | 2018-10-27T07:34:08 | 2018-10-27T07:34:08 | 154,937,826 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,640 | java | package com.auth.dao;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.auth.bean.Personal;
import com.auth.bean.deviceDetails;
@Repository
@Transactional
public class PersonalDAOImpl implements PersonalDAO {
@Autowired
private SessionFactory sessionFactory;
public Personal getByPersonal_ID(int Personal_ID) {
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
Criteria criteria = (Criteria) session.get(Personal.class, Personal_ID);
session.flush();
session.clear();
tx.commit();
session.close();
sessionFactory.close();
return (Personal) criteria;
}
public List<Personal> getAllPersonal() {
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
Criteria criteria = sessionFactory.getCurrentSession().createCriteria(Personal.class);
session.flush();
session.clear();
tx.commit();
session.close();
sessionFactory.close();
return criteria.list();
}
public int save(Personal personal) {
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
Integer criteria = (Integer) session.save(personal);
session.flush();
session.clear();
tx.commit();
session.close();
sessionFactory.close();
return criteria;
}
public void update(Personal personal) {
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
Criteria criteria = (Criteria) session.merge(personal);
session.flush();
session.clear();
tx.commit();
session.close();
sessionFactory.close();
}
public void view(Personal personal) {
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
Criteria criteria = (Criteria) session.merge(personal);
session.flush();
session.clear();
tx.commit();
session.close();
sessionFactory.close();
}
public void delete(int Personal_ID) {
Personal p = getByPersonal_ID(Personal_ID);
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
sessionFactory.getCurrentSession().delete(p);
session.flush();
session.clear();
tx.commit();
session.close();
sessionFactory.close();
}
}
| [
"sanjay.negi@ARS-DELL-LT-042.abrspl.com"
] | sanjay.negi@ARS-DELL-LT-042.abrspl.com |
d8dec971cee45ee1799fae304018908f15d59bf9 | ad4b7476ecaaff2d1a98a9fa51d6246fb90b535e | /Tabel.java | e60fdcf167af648f15388923a895c4ac849c2a5d | [] | no_license | maverickWolfFTW/DP-Book | 9dc1cb2f713589cdfbedddaf258bd9f8d141828f | 40a1dbddd76442113d39631cdac4c5d668f1e170 | refs/heads/master | 2021-01-12T15:53:22.402568 | 2016-10-25T13:52:12 | 2016-10-25T13:52:12 | 71,901,057 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 753 | java | package carte;
public class Tabel implements Element{
@Override
public Element addElement(Element e) throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void removeElement(Element e) throws Exception {
// TODO Auto-generated method stub
}
@Override
public Element getElement(int index) throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void print() {
// TODO Auto-generated method stub
}
@Override
public Element[] getElement() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public BBox getBoundingBox() {
// TODO Auto-generated method stub
return null;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
d940f6305d4a1865ad4162a58f1d47412e955cae | 48920e88836b340a16d0405e187d472adeda45a9 | /MeshSim/src/com/ecse414/meshsim/router/RouteTable.java | 8961b9fe23c6b0c6a10f9b5e84ee753c009d9262 | [] | no_license | mvertescher/ECSE414 | fcbd1ef5cfd99f67c9d2e7360c4d946461da54a6 | 491ecfe64fa4300d19d61104c6243d5fd80bc1dd | refs/heads/master | 2020-12-24T14:01:28.544984 | 2014-11-16T20:06:33 | 2014-11-16T20:06:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 682 | java | package com.ecse414.meshsim.router;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class RouteTable {
private Map<String,RouteTableEntry> table;
public RouteTable() {
table = new ConcurrentHashMap<String,RouteTableEntry>();
}
public int getRoute(String id) {
RouteTableEntry entry = table.get(id);
if (entry != null) {
if (entry.isValid()) {
return entry.getNextHopPort();
}
}
return 0;
}
public boolean addRoute(String id, String name, int hops, String nextHopIp, int nextHopPort) {
RouteTableEntry entry = new RouteTableEntry(name,hops,nextHopIp,nextHopPort);
table.put(id, entry);
return true;
}
}
| [
"mvertescher@verizon.net"
] | mvertescher@verizon.net |
3117f7fc869550d500c981fff2390fc8bfa93a19 | a3e30c4ea7c8176334115b438b0f102c9d1bb9c0 | /src/main/java/eoram/cloudexp/threading/Job.java | 66b3d227d301117ff696ba28e33148f0659693d1 | [
"BSD-2-Clause"
] | permissive | olav-st/oram-proxy | 68012333a7a46ea12af45a588aaf0874cdbe583e | 122ad7019de22688fdd4f17af2b0c7fc8c21dbad | refs/heads/master | 2020-06-01T05:10:59.734094 | 2019-06-06T21:08:46 | 2019-06-06T21:08:46 | 190,649,580 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 839 | java | package eoram.cloudexp.threading;
import java.util.concurrent.Callable;
import eoram.cloudexp.pollables.Pollable;
import eoram.cloudexp.utils.Errors;
/**
* Represents a job.
*
* @param <T>
*/
public class Job<T> extends Pollable
{
protected String name = null;
protected Callable<T> task = null;
protected T result = null;
protected boolean done = false;
public Job(String n, Callable<T> t) { name = n; task = t; Errors.verify(task != null); }
public Job(Callable<T> t) { this("unnamed-job", t); }
public void call()
{
try { result = task.call(); }
catch (Exception e)
{
done = true;
e.printStackTrace();
System.exit(-1);
Errors.error(e);
}
done = true;
}
public String toString() { return name + ": " + task.toString(); }
@Override
public boolean isReady() { return done == true; }
}
| [
"olav.s.th@gmail.com"
] | olav.s.th@gmail.com |
289c92218ec33dcc4a3ab674d7ac9c00501a6660 | b0ebaa305151defa61c0645f1e701fa16a91629b | /app/src/main/java/bloodbank/android/example/com/bloodbank/adapter/SliderAdapter.java | fa0478a6a21b931929cb141dd7bafa09155cf796 | [] | no_license | ShroukIbrahim/BloodBank | c266bbc7717dfcfb638160760bfac72fde11d312 | 15991eb3a08971bc87aad945638d67c4cfab7096 | refs/heads/master | 2020-06-10T04:43:13.957056 | 2019-08-13T16:09:16 | 2019-08-13T16:09:16 | 193,585,786 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,788 | java | package bloodbank.android.example.com.bloodbank.adapter;
import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import bloodbank.android.example.com.bloodbank.R;
import butterknife.BindView;
public class SliderAdapter extends PagerAdapter {
private Context context;
private LayoutInflater layoutInflater;
private int[] sliderImage = {R.drawable.slider1,R.drawable.slider2};
public SliderAdapter( Context context )
{
this.context = context;
}
@Override
public int getCount() {
return sliderImage.length;
}
@Override
public boolean isViewFromObject( View view, Object object ) {
return (view == (LinearLayout) object);
}
@Override
public Object instantiateItem( ViewGroup container, final int position ) {
layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = layoutInflater.inflate(R.layout.item_of_slider, container, false);
ImageView sliderimage = (ImageView) view.findViewById(R.id.sliderimage);
sliderimage.setImageResource(sliderImage[position]);
ViewPager viewPager =(ViewPager) container;
viewPager.addView(view,0);
//container.addView(view);
return view;
}
@Override
public void destroyItem( ViewGroup container, int position, Object object ) {
ViewPager viewPager =(ViewPager) container;
View view =(View) object;
viewPager.removeView(view);
//container.removeView((LinearLayout) object);
}
}
| [
"shroukibrahim4873@gmail.com"
] | shroukibrahim4873@gmail.com |
541e5bd01373428f96641687b517e94930f3c627 | 7905a727b7109212d9d636a734d254b01183acef | /app/src/main/java/com/sonal/apple/peaceofmind/Player/Playerthree.java | 319d7a2039cf984a3e6204a4c00501e62bdaf438 | [] | no_license | sonalspatel22/PeaceOfMind | 3368bd2f1b617a4706aadac1b2ffda13f46e1088 | e1837766af72540fd85daea0010635e485a9d506 | refs/heads/master | 2020-04-09T05:42:33.166854 | 2018-12-02T18:20:12 | 2018-12-02T18:20:15 | 160,075,732 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | package com.sonal.apple.peaceofmind.Player;
import android.app.Activity;
import android.media.MediaPlayer;
import static com.sonal.apple.peaceofmind.MainActivity.player3;
public class Playerthree {
Activity activity;
int song;
public Playerthree(Activity activity, int songid) {
this.activity = activity;
this.song = songid;
if (songid == -1) {
stopplayer();
} else {
startplayer();
}
}
public void startplayer() {
try {
if (player3 != null) {
player3.release();
player3 = null;
}
player3 = new MediaPlayer();
player3 = MediaPlayer.create(activity, song);
player3.setLooping(true);
player3.start();
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
private void stopplayer() {
if (player3 != null) {
player3.release();
player3 = null;
}
}
}
| [
"sonalpatelit22@gmail.com"
] | sonalpatelit22@gmail.com |
05b9008592f1624c32bf73cf230a461b2620f72f | 75b9e87857fbbc0ace2c382c76e6e86ef241731e | /aop/src/main/java/hello/aop/AopApplication.java | 2ee4c79ecf571bb228e931a245b1049e224ddb8c | [] | no_license | bob-park/study-spring-advanced | 9ebe5f83b944c831fdeed152b4613c302401a36a | 64c59afb2d13de992893ef24079c36280f711f3c | refs/heads/master | 2023-08-26T22:03:08.526155 | 2021-11-09T11:52:18 | 2021-11-09T11:52:18 | 423,061,212 | 0 | 0 | null | 2021-11-09T11:52:19 | 2021-10-31T05:25:48 | Java | UTF-8 | Java | false | false | 308 | java | package hello.aop;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class AopApplication {
public static void main(String[] args) {
SpringApplication.run(AopApplication.class, args);
}
}
| [
"hwpark11@kakao.com"
] | hwpark11@kakao.com |
eb5424f99c9400094efc61cc8122069636b3906e | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/69/45.java | 9a3a449aea38c9a68c7c724a74c8a7247a67babb | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,232 | java | package <missing>;
public class GlobalMembers
{
public static int[] a = new int[200];
public static int[] b = new int[200];
public static int[] out = new int[200];
public static void init()
{
for (int i = 0;i < 200;i++)
{
a[i] = 0;
b[i] = 0;
out[i] = 0;
}
}
public static void load()
{
String temp = new String(new char[201]);
temp = ConsoleInput.readToWhiteSpace(true).charAt(0);
int begin = 200 - temp.length();
for (int i = 0;i < temp.length();i++)
{
a[begin + i] = temp.charAt(i) - '0';
}
temp = ConsoleInput.readToWhiteSpace(true).charAt(0);
begin = 200 - temp.length();
for (int i = 0;i < temp.length();i++)
{
b[begin + i] = temp.charAt(i) - '0';
}
}
public static void add()
{
int carry = 0;
int i = 0;
for (i = 199;i >= 0;i--)
{
out[i] = a[i] + b[i] + carry;
if (out[i] >= 10)
{
out[i] -= 10;
carry = 1;
}
else
{
carry = 0;
}
}
for (i = 0;i < 199;i++)
{
if (out[i] != 0)
{
break;
}
}
for (;i < 200;i++)
{
System.out.print(out[i]);
}
System.out.print("\n");
}
public static int Main()
{
init();
load();
add();
return 0;
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
4b76b3bacf2eb9eab46da3df75c2ec361add15fb | 168ade09443ba7f3da8e48c1716497f7224e2c0b | /PTTK_BookStoreOnline/src/model/Category.java | 6cb77e615f7eb2a7ed48ee3bb9b8525cde107882 | [] | no_license | ntheanh201/A-D-Labs | 90720f0b93facec143ffa22276ae5c9428a5c71e | d01ef59232214851e940450a8208ac50d48a85cc | refs/heads/master | 2023-02-01T08:10:18.945443 | 2020-12-14T06:44:28 | 2020-12-14T06:44:28 | 295,309,171 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 840 | java |
package model;
import java.io.Serializable;
import java.util.List;
public class Category implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private String name;
private String description;
private List<Book> bookList;
public Category() {
}
public Category(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public List<Book> getBookList() {
return bookList;
}
public void setBookList(List<Book> bookList) {
this.bookList = bookList;
}
}
| [
"ntheanh201@gmail.com"
] | ntheanh201@gmail.com |
6090d97017ba2d802fe9f7c8f1338429a2a8d519 | a5f1da80efdc5ae8dfda2e18af2a1042e2ff9234 | /src/com/cyb/String/字符串比较.java | 71cc17cef8b60acbb5f0141c2b6efc417b9842ad | [] | no_license | iechenyb/sina1.0 | fb2b7b9247c7f6504e10d8301ee581a3b960bac2 | aac363143e920a418f0cc3a8e3cadcb91cdb3acf | refs/heads/master | 2021-05-23T04:47:39.852726 | 2020-05-15T00:32:27 | 2020-05-15T00:32:27 | 81,402,063 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,451 | java | package com.cyb.String;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* 作者 : iechenyb<br>
* 类描述: 说点啥<br>
* 创建时间: 2017年10月16日
* http://www.blogjava.net/nokiaguy/archive/2008/05/07/198990.html
*/
public class 字符串比较 {
Log log = LogFactory.getLog(字符串比较.class);
static final String fstr1="a";
static final String fstr2="bc";
static String nfstr1="a";
static String nfstr2="bc";
public static void main(String[] args) {
String str = "abc";
String str1 = "a";
String str2 = "bc";
final String fstr1="a";
final String fstr2="bc";
String combo0 = fstr1+fstr2;
String combo1 = "a" + "bc"; //true 第一种情况 字节码class中combol1=abc
String combo2 = str1 + str2; //false 第二种情况 字节码中combo2=str1+str2
String combo3 = fstr1+fstr2;//true
String combo4 = nfstr1+nfstr2;//false
String combo5="a"+str2;//false字符串变量与常量字符串相加
String combo6 ="a"+fstr2;//最终变量 true
String combo7 ="a"+nfstr2;//非最终变量 false
System.out.println(str == combo0);//true
System.out.println(str == combo1);//true
System.out.println(str == combo2);//false
System.out.println(str == combo3);//true
System.out.println(str == combo4);//false
System.out.println(str == combo5);//false
System.out.println(str == combo6);//true
System.out.println(str == combo7);//false
}
}
| [
"zzuchenyb@sina.com"
] | zzuchenyb@sina.com |
03c019792ccc0e7a720152e74d90243c526f46d0 | 74d5892672b1af9ff96846f5c4400b0539fc96f4 | /src/main/java/MyApp.java | 00d2132f0fe19e5c8fcf3796959599fb4877fe8b | [] | no_license | gavin-dale/spring-interface | 9ff4223f8a8cf9b84ab7e40abc1fcc3383c42a97 | 1b44c25fe2dc69740ac5e7572090c387c107bcd2 | refs/heads/main | 2023-03-17T13:27:39.153490 | 2021-03-14T02:48:28 | 2021-03-14T02:48:28 | 347,505,810 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 167 | java | public class MyApp {
public static void main(String[] args) {
Coach coach = new TrackCoach();
System.out.println(coach.getDailyWorkout());
}
}
| [
"gavindale00@gmail.com"
] | gavindale00@gmail.com |
3fcd923f4a4c2100f58fd79102671aa5261b7935 | cd0515449a11d4fc8c3807edfce6f2b3e9b748d3 | /managed/src/main/java/com/yugabyte/yw/forms/DetachUniverseFormData.java | 5d170999f7578127dea6809f0823b2ce61c66ba5 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"OpenSSL"
] | permissive | wwjiang007/yugabyte-db | 27e14de6f26af8c6b1c5ec2db4c14b33f7442762 | d56b534a0bc1e8f89d1cf44142227de48ec69f27 | refs/heads/master | 2023-07-20T13:20:25.270832 | 2023-07-11T08:55:18 | 2023-07-12T10:21:24 | 150,573,130 | 0 | 0 | Apache-2.0 | 2019-07-23T06:48:08 | 2018-09-27T10:59:24 | C | UTF-8 | Java | false | false | 144 | java | // Copyright (c) Yugabyte, Inc.
package com.yugabyte.yw.forms;
public class DetachUniverseFormData {
public boolean skipReleases = false;
}
| [
"wang.charles234@gmail.com"
] | wang.charles234@gmail.com |
349cb1f47dec44012da1c341febc92e73b66840c | 8f011535ea1014242c43a6bc924d5b870a55d39b | /out-java/src/haxe/root/Sys.java | 67ebb83b2f82deee4287fef557e3b8950fe1eddd | [] | no_license | cambiata/haxe-java-svg2g2d | 1544f89fbe55a334f9654f6a4370182116e99c52 | 09f717a61c86b859e68ec400f6e980144e5d70e9 | refs/heads/master | 2016-08-11T18:57:11.111020 | 2016-04-08T17:41:04 | 2016-04-08T17:41:04 | 36,559,609 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 881 | java | package haxe.root;
import haxe.root.*;
@SuppressWarnings(value={"rawtypes", "unchecked"})
public class Sys extends haxe.lang.HxObject
{
public Sys(haxe.lang.EmptyObject empty)
{
}
public Sys()
{
//line 27 "F:\\HaxeToolkit\\haxe\\std\\java\\_std\\Sys.hx"
haxe.root.Sys.__hx_ctor__Sys(this);
}
public static void __hx_ctor__Sys(haxe.root.Sys __temp_me8)
{
}
public static void exit(int code)
{
//line 124 "F:\\HaxeToolkit\\haxe\\std\\java\\_std\\Sys.hx"
java.lang.System.exit(((int) (code) ));
}
public static java.lang.Object __hx_createEmpty()
{
//line 27 "F:\\HaxeToolkit\\haxe\\std\\java\\_std\\Sys.hx"
return new haxe.root.Sys(haxe.lang.EmptyObject.EMPTY);
}
public static java.lang.Object __hx_create(haxe.root.Array arr)
{
//line 27 "F:\\HaxeToolkit\\haxe\\std\\java\\_std\\Sys.hx"
return new haxe.root.Sys();
}
}
| [
"jonasnys@gmail.com"
] | jonasnys@gmail.com |
c0ca9d252679ded62dd2c9f71f064dc02931f4dd | 6127ea1df06ff3f0746c53dd2920b6d8419cf52d | /tags/version1.1.1/src/GLBS/laba.java | d0c506af8dd0fb7f9cf741c19724ad1542b0119b | [] | no_license | gablena/laba | 1ac19e6bb2cc30f663ca6ab6b4c12dab884942a4 | 55aafc9ad37c375a00d7a485dbbcb3583a246512 | refs/heads/master | 2022-07-19T06:09:39.784921 | 2020-05-21T12:19:12 | 2020-05-21T12:19:12 | 265,771,383 | 0 | 0 | null | 2020-05-21T11:59:51 | 2020-05-21T06:22:31 | Java | WINDOWS-1251 | Java | false | false | 4,418 | java | package GLBS;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JButton;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class laba {
public static void main(String args[]) {
String sh = JOptionPane.showInputDialog("Ширина (м)");
String dl = JOptionPane.showInputDialog("Длина (см)");
Font font = new Font(null, Font.ITALIC, 23);
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = (JPanel) frame.getContentPane();
Dimension size = new Dimension(200, 200);
frame.setLayout(null);
JLabel label0 = new JLabel("Уфимский государственный авиационный технический университет");
panel.add(label0);
label0.setFont(font);
label0.setBounds(200, 0, size.width+1000, size.height);
JLabel label1 = new JLabel("ПИ-218");
panel.add(label1);
label1.setFont(font);
label1.setBounds(150, 30, size.width, size.height);
JLabel label2 = new JLabel("Габриелян Е.В.");
panel.add(label2);
label2.setFont(font);
label2.setBounds(50, 100, size.width, size.height);
JLabel label3 = new JLabel("161");
panel.add(label3);
label3.setFont(font);
label3.setBounds(300, 100, size.width, size.height);
JLabel label4 = new JLabel("Лаврентьева Е.А.");
panel.add(label4);
label4.setFont(font);
label4.setBounds(50, 200, size.width, size.height);
JLabel label5 = new JLabel("022");
panel.add(label5);
label5.setFont(font);
label5.setBounds(300, 200, size.width, size.height);
JLabel label6 = new JLabel("Байсарова А.Р.");
panel.add(label6);
label6.setFont(font);
label6.setBounds(50, 300, size.width, size.height);
JLabel label7 = new JLabel("434");
panel.add(label7);
label7.setFont(font);
label7.setBounds(300, 300, size.width, size.height);
JLabel label8 = new JLabel("Шайхуллин Т.Р.");
panel.add(label8);
label8.setFont(font);
label8.setBounds(50, 400, size.width, size.height);
JLabel label9 = new JLabel("470");
panel.add(label9);
label9.setFont(font);
label9.setBounds(300, 400, size.width, size.height);
JLabel label10 = new JLabel("V=" + 5*100*Double.parseDouble(dl)*Double.parseDouble(sh)*100 +" cм^3");
panel.add(label10);
label10.setFont(font);
label10.setBounds(150, 500, size.width+1000, size.height);
label10.setBounds(150, 500, size.width+1000, size.height);
ImageIcon imgIco = new ImageIcon("./src/GLBS/logo.jpg");
Image image = imgIco.getImage();
Image newimg = image.getScaledInstance(450, 200, java.awt.Image.SCALE_SMOOTH);
imgIco = new ImageIcon(newimg);
JLabel img = new JLabel(imgIco);
panel.add(img);
JLabel label11 = new JLabel("Расчет загрузки принтера");
panel.add(label11);
label11.setFont(font);
label11.setBounds(750, 240, size.width+300, size.height);
img.setBounds(400,0, size.width+250,size.height+250);
ImageIcon imgIco21 = new ImageIcon("./src/GLBS/курсач11.jpg");
Image image2 = imgIco21.getImage();
Image newimg2 = image2.getScaledInstance(450, 300, java.awt.Image.SCALE_SMOOTH);
imgIco21 = new ImageIcon(newimg2);
JLabel img2 = new JLabel(imgIco21);
img2.setBounds(650,280, size.width+250,size.height+250);
panel.add(img2);
img2.setVisible(false);
JButton button1 = new JButton("Информация");
panel.add(button1);
button1.setBounds(400, 450, size.width, size.height);
button1.setSize(200, 40);
button1.setVisible(true);
JButton button = new JButton("Мнемосхема");
panel.add(button);
button.setBounds(400, 400, size.width, size.height);
button.setSize(200, 40);
button.setVisible(true);
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
img2.setVisible(true);
}
});
frame.setPreferredSize(new Dimension(300, 300));
frame.setSize(1300, 700);
frame.setVisible(true);
}
}
| [
"lena.gabrielyan29@mail.ru"
] | lena.gabrielyan29@mail.ru |
aac48f62e8e9d89abe2d27e776f282d299136c23 | 8037278735b7daade0b8f13ca1dc731aff629327 | /src/main/java/cn/ximcloud/itsource/算法学习/_02插入排序算法/InsertionSortPlus.java | 4ff32be495a2489909e6c56ea62f0a02aa8d6f3b | [] | no_license | usami-muzugi/itsource | 1cc0cd07bc9b1a4e771a886df8ad04790970b318 | 2cd92335a8ed86d5831da72c431bbf9222edf424 | refs/heads/master | 2020-03-22T13:13:31.215302 | 2018-09-22T15:30:07 | 2018-09-22T15:30:07 | 140,092,256 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,940 | java | package cn.ximcloud.itsource.算法学习._02插入排序算法;
/**
* Created by IntelliJ IDEA.
* User: Wizard
* Date: 2018-09-05
* Time: 13:32
* ProjectName: itsource
* To change this template use File | Settings | File Templates.
* ////////////////////////////////////////////////////////////////////
* // _ooOoo_ //
* // o8888888o //
* // 88" . "88 //
* // (| ^_^ |) //
* // O\ = /O //
* // ____/`---'\____ //
* // .' \\| |// `. //
* // / \\||| : |||// \ //
* // / _||||| -:- |||||- \ //
* // | | \\\ - /// | | //
* // | \_| ''\---/'' | | //
* // \ .-\__ `-` ___/-. / //
* // ___`. .' /--.--\ `. . ___ //
* // ."" '< `.___\_<|>_/___.' >'"". //
* // | | : `- \`.;`\ _ /`;.`/ - ` : | | //
* // \ \ `-. \_ __\ /__ _/ .-` / / //
* // ========`-.____`-.___\_____/___.-`____.-'======== //
* // `=---=' //
* // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
* // 佛祖保佑 永无BUG 永不修改 //
* ////////////////////////////////////////////////////////////////////
**/
public class InsertionSortPlus {
public static void insertSort(int[] arr) {
int length = arr.length;
for (int i = 1; i < length; i++) {
// 存储这个需要被排序的元素的值
int tempVar = arr[i];
// 存储这个需要被排序的元素的索引(在外面能取到这个j)
int j;
for (j = i; j > 0; j--) {
if (arr[j] < arr[j - 1]) {
// 做的操作就仅仅是把前一个元素往后面移动而已了,不再是之前的需要进行三次赋值操作
arr[j] = arr[j - 1];
} else {
break;
}
}
// 排序进行到这里,该被排序的元素的正确的位置已经找到了,但是没有值
// 这里进行一次赋值操作,完成当前列排序
arr[j] = tempVar;
}
}
private static void swap(int[] arr, int indexA, int indexB) {
int tempVar = arr[indexA];
arr[indexA] = arr[indexB];
arr[indexB] = tempVar;
}
}
| [
"715759898@qq.com"
] | 715759898@qq.com |
80ece42632aaf48e61f6a868b8686fd6e73bef34 | 639f4515c1e9b73504fc28ce2b278768026afca7 | /app/src/main/java/com/sosaley/sosy/intruderdetection/IntruderDetectionRoomNameAdapter.java | cdb03cf0b7f34ef2a9a64dbcf5ff1bb6a20f87e2 | [] | no_license | SaravanaMurale/Sosy-master | 5f04ef33f088aff3b0e4deeeec1cb6971fa4a5fa | 261c1663c6377fd5a671aff63f51379a83451457 | refs/heads/master | 2023-03-13T02:05:59.710045 | 2021-03-03T06:12:55 | 2021-03-03T06:12:55 | 342,498,339 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,495 | java | package com.sosaley.sosy.intruderdetection;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.sosaley.sosy.R;
import com.sosaley.sosy.model.IntruderRoomNameDTO;
import com.sosaley.sosy.utils.PreferenceUtil;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
public class IntruderDetectionRoomNameAdapter extends RecyclerView.Adapter<IntruderDetectionRoomNameAdapter.IntruderRoomNameViewHolder> {
private Context context;
List<IntruderRoomNameDTO> intruderRoomNameDTOList;
IntruderRoomClickListener intruderRoomClickListener;
public IntruderDetectionRoomNameAdapter(Context context, List<IntruderRoomNameDTO> intruderRoomNameDTOList, IntruderRoomClickListener intruderRoomClickListener) {
this.context = context;
this.intruderRoomNameDTOList = intruderRoomNameDTOList;
this.intruderRoomClickListener = intruderRoomClickListener;
}
@NonNull
@Override
public IntruderRoomNameViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
LayoutInflater layoutInflater = LayoutInflater.from(context);
View view = layoutInflater.inflate(R.layout.layout_intruder_detection_name_adapter, parent, false);
return new IntruderRoomNameViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull IntruderRoomNameViewHolder holder, int position) {
String intruderRoomClickedStatus = PreferenceUtil.getValueString(context, PreferenceUtil.INTRUDER_ROOM_CLICKED_STATUS);
if (intruderRoomClickedStatus != null) {
if (intruderRoomClickedStatus.equals(intruderRoomNameDTOList.get(position).getIntruderRoomId())) {
holder.intruderDoorRoomName.setBackgroundColor(Color.parseColor("#D3D3D3"));
} else if (!intruderRoomClickedStatus.equals(intruderRoomNameDTOList.get(position).getIntruderRoomId())) {
holder.intruderDoorRoomName.setBackgroundColor(Color.parseColor("#FAFAFA"));
}
}
holder.intruderDoorRoomName.setText(intruderRoomNameDTOList.get(position).getIntruderRoomName());
}
@Override
public int getItemCount() {
return intruderRoomNameDTOList == null ? 0 : intruderRoomNameDTOList.size();
}
public class IntruderRoomNameViewHolder extends RecyclerView.ViewHolder {
TextView intruderDoorRoomName;
public IntruderRoomNameViewHolder(@NonNull View itemView) {
super(itemView);
intruderDoorRoomName = (TextView) itemView.findViewById(R.id.intruderDoorRoomName);
intruderDoorRoomName.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
IntruderRoomNameDTO intruderRoomNameDTO = intruderRoomNameDTOList.get(getAdapterPosition());
PreferenceUtil.remove(context, PreferenceUtil.INTRUDER_ROOM_CLICKED_STATUS);
PreferenceUtil.setValueString(context, PreferenceUtil.INTRUDER_ROOM_CLICKED_STATUS, intruderRoomNameDTO.getIntruderRoomId());
notifyDataSetChanged();
}
});
}
}
public interface IntruderRoomClickListener {
public void intruderRoomName(IntruderRoomNameDTO intruderRoomNameDTO);
}
}
| [
"murali.e@sosaley.in"
] | murali.e@sosaley.in |
32caf4eeb246cddede2c95564fe316d373763ebf | fab446772fec4dc88afa9c7209ac12515c63c999 | /game-engine-interface/src/main/java/za/co/entelect/challenge/game/contracts/command/Command.java | aae5ce552577af392f6b7a1abdd8a52d638d84da | [
"MIT"
] | permissive | avanderw/alysm | 04809648c5c80ac5a73986d46cdd67f3324d9d15 | c1b88fc6daacca5c7f1097daa49b31ae5e64f044 | refs/heads/master | 2020-03-13T06:01:48.321279 | 2018-09-08T11:59:15 | 2018-09-08T11:59:15 | 130,995,907 | 0 | 1 | MIT | 2018-05-15T11:45:28 | 2018-04-25T11:25:18 | Java | UTF-8 | Java | false | false | 630 | java | package za.co.entelect.challenge.game.contracts.command;
import za.co.entelect.challenge.game.contracts.exceptions.InvalidCommandException;
import za.co.entelect.challenge.game.contracts.game.GamePlayer;
import za.co.entelect.challenge.game.contracts.map.GameMap;
public interface Command {
/**
* Tells this command to perform the required action within the command transaction provided
*
* @param gameMap The game map to make command calculations
* @param player The issuing player for this command
*/
void performCommand(GameMap gameMap, GamePlayer player) throws InvalidCommandException;
}
| [
"mark.rosewall@entelect.co.za"
] | mark.rosewall@entelect.co.za |
cc9a4aef9388099b13f96fa1193a2f483fcb489c | b6b9055ea3518ae1fe02e9cbfdaa8aadc8eff856 | /src/HeadFirst/Chapter14/QuizCard.java | ae632c09516e182d8bc16e242645f9f0f726d072 | [] | no_license | baronwithyou/JavaPractice | 62b1c53b3befe8dd7b48492e2199ec5de700187c | f1bf41e1e1f6d518358b90f429985f2829884653 | refs/heads/master | 2021-09-06T14:28:14.835200 | 2018-02-07T14:24:26 | 2018-02-07T14:24:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 364 | java | package HeadFirst.Chapter14;
public class QuizCard {
private String question;
private String answer;
public QuizCard(String question, String answer) {
this.question = question;
this.answer = answer;
}
public String getAnswer() {
return answer;
}
public String getQuestion() {
return question;
}
}
| [
"linsi.yao@163.com"
] | linsi.yao@163.com |
ee6e138bd6818d80e4082bbde7dd097e18efce09 | c3912df67ab0ac361d98afc4a55e204a2d048c42 | /src/org/pstcl/ea/model/ConsolidatedLossReportModel.java | 971bf15bb22b13b7460b9bc2fa4b6b142caac416 | [] | no_license | pstcl/EAP_With_Tampers | 6d4758463fea6018fb7c9a32cf95a745f83ffd32 | ad3ce224f6bd4f8264869ba5e413e385ae502cf6 | refs/heads/master | 2020-04-26T08:02:43.097909 | 2019-04-12T09:07:19 | 2019-04-12T09:07:19 | 173,411,295 | 0 | 1 | null | 2019-04-12T09:07:20 | 2019-03-02T06:18:56 | Java | UTF-8 | Java | false | false | 4,095 | java | package org.pstcl.ea.model;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;
import org.pstcl.ea.model.entity.LossReportEntity;
public class ConsolidatedLossReportModel {
private BigDecimal difference;
private Date endDate;
private Map<String, LossReportModel> lossReportModelMap;
private Integer month;
private BigDecimal percentage;
private Date startDate;
private LossReportEntity sumAll;
private LossReportEntity sumAllTD;
private LossReportEntity sumITGT;
private Integer countAll;
private Integer countAllTD;
private Integer countITGT;
public Integer getCountAllDataManualEntry() {
return countAllDataManualEntry;
}
public void setCountAllDataManualEntry(Integer countAllDataManualEntry) {
this.countAllDataManualEntry = countAllDataManualEntry;
}
public Integer getCountAllTDDataManualEntry() {
return countAllTDDataManualEntry;
}
public void setCountAllTDDataManualEntry(Integer countAllTDDataManualEntry) {
this.countAllTDDataManualEntry = countAllTDDataManualEntry;
}
public Integer getCountITGTDataManualEntry() {
return countITGTDataManualEntry;
}
public void setCountITGTDataManualEntry(Integer countITGTDataManualEntry) {
this.countITGTDataManualEntry = countITGTDataManualEntry;
}
private Integer countAllDataManualEntry;
private Integer countAllTDDataManualEntry;
private Integer countITGTDataManualEntry;
private Integer countAllDataAvailable;
private Integer countAllTDDataAvailable;
private Integer countITGTDataAvailable;
public Integer getCountAllDataAvailable() {
return countAllDataAvailable;
}
public void setCountAllDataAvailable(Integer countAllDataAvailable) {
this.countAllDataAvailable = countAllDataAvailable;
}
public Integer getCountAllTDDataAvailable() {
return countAllTDDataAvailable;
}
public void setCountAllTDDataAvailable(Integer countAllTDDataAvailable) {
this.countAllTDDataAvailable = countAllTDDataAvailable;
}
public Integer getCountITGTDataAvailable() {
return countITGTDataAvailable;
}
public void setCountITGTDataAvailable(Integer countITGTDataAvailable) {
this.countITGTDataAvailable = countITGTDataAvailable;
}
public Integer getCountAll() {
return countAll;
}
public void setCountAll(Integer countAll) {
this.countAll = countAll;
}
public Integer getCountAllTD() {
return countAllTD;
}
public void setCountAllTD(Integer countAllTD) {
this.countAllTD = countAllTD;
}
public Integer getCountITGT() {
return countITGT;
}
public void setCountITGT(Integer countITGT) {
this.countITGT = countITGT;
}
private Integer year;
public BigDecimal getDifference() {
return difference;
}
public Date getEndDate() {
return endDate;
}
public Map<String, LossReportModel> getLossReportModelMap() {
return lossReportModelMap;
}
public Integer getMonth() {
return month;
}
public BigDecimal getPercentage() {
return percentage;
}
public Date getStartDate() {
return startDate;
}
public LossReportEntity getSumAll() {
return sumAll;
}
public LossReportEntity getSumAllTD() {
return sumAllTD;
}
public LossReportEntity getSumITGT() {
return sumITGT;
}
public Integer getYear() {
return year;
}
public void setDifference(BigDecimal difference) {
this.difference = difference;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public void setLossReportModelMap(Map<String, LossReportModel> lossReportModelMap) {
this.lossReportModelMap = lossReportModelMap;
}
public void setMonth(Integer month) {
this.month = month;
}
public void setPercentage(BigDecimal percentage) {
this.percentage = percentage;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public void setSumAll(LossReportEntity sumAll) {
this.sumAll = sumAll;
}
public void setSumAllTD(LossReportEntity sumAllTD) {
this.sumAllTD = sumAllTD;
}
public void setSumITGT(LossReportEntity sumITGT) {
this.sumITGT = sumITGT;
}
public void setYear(Integer year) {
this.year = year;
}
}
| [
"40257916+pstcl@users.noreply.github.com"
] | 40257916+pstcl@users.noreply.github.com |
51944bc66929bd01b216a51ba53b37ed438a1264 | 498855cc2200b64ac8347024675d8a61ef4428c7 | /src/app/util/rssnotifier/RssDetailActivity.java | fe255da130baaf562c9e9d6242f9a2896e806e04 | [] | no_license | ethan605/RssNotifier | 6044805821ad4d18b4aaf8c3ec4e57ba51a69319 | 25509df339c7274e25c22cdcdcf41e2505b94dc0 | refs/heads/master | 2020-05-19T20:57:00.870296 | 2012-04-24T18:05:27 | 2012-04-24T18:05:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,764 | java | package app.util.rssnotifier;
import android.app.*;
import android.content.Intent;
import android.net.Uri;
import android.os.*;
import android.graphics.Bitmap;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.webkit.*;
import android.widget.*;
import app.util.rssnotifier.R;
public class RssDetailActivity extends Activity {
final String TAG = "RssDetailActivity";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.rss_item_detail);
final Bundle bundle = getIntent().getExtras();
TextView txtTitle = (TextView) findViewById(R.id.rss_item_title);
txtTitle.setText(bundle.getString("rss_title"));
txtTitle.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(bundle.getString("rss_link")));
RssDetailActivity.this.startActivity(intent);
}
});
WebView webContent = (WebView) findViewById(R.id.rss_item_content);
webContent.getSettings().setJavaScriptEnabled(true);
webContent.getSettings().setBuiltInZoomControls(true);
webContent.setWebViewClient(new WebViewClient() {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
Toast.makeText(RssDetailActivity.this, R.string.rss_content_loading, Toast.LENGTH_SHORT).show();
setProgressBarIndeterminateVisibility(true);
}
@Override
public void onPageFinished(WebView view, String url) {
setProgressBarIndeterminateVisibility(false);
}
});
webContent.loadUrl(bundle.getString("rss_link"));
}
}
| [
"thanhnx.605@gmail.com"
] | thanhnx.605@gmail.com |
39789404b96c355d9087da34759e411d7c2b2c54 | 04e78fd96cf7ab8d64787453151397e548aa13e3 | /app/src/main/java/com/example/sadhika/duckduckgo/pojos/Maintainer.java | db9fa4b24cae9fda5d92e44dc8a0ffbabb1b5c5b | [] | no_license | sumit9881/DuckDuckGo | 94b92348d57b050dd917b086a8af9158e838af75 | 293c47f31deaf1e735a6a095efe574adf4aedfc8 | refs/heads/master | 2021-01-09T20:32:41.979140 | 2016-06-15T04:26:43 | 2016-06-15T04:26:43 | 61,176,121 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java |
package com.example.sadhika.duckduckgo.pojos;
import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@Generated("org.jsonschema2pojo")
public class Maintainer {
@SerializedName("github")
@Expose
private String github;
/**
*
* @return
* The github
*/
public String getGithub() {
return github;
}
/**
*
* @param github
* The github
*/
public void setGithub(String github) {
this.github = github;
}
}
| [
"sumit9881@gmail.com"
] | sumit9881@gmail.com |
8d5121d6e7df9727cc0bb3bc478372c89deb598c | 62e3763bb0259a1167985a6d5fe4a40fa97d3216 | /java_concurrent/src/test/java/com/example/concurrent/VolatileTest.java | 3b0d4683d0fdced2e89b608f48612713609ab000 | [] | no_license | xwh9004/geekbang | be15d568863ae481a4bda1d13167df18d6939509 | ee489cef4e96cd98d1c79403eb1b9930b19d4731 | refs/heads/master | 2022-06-27T07:30:24.678853 | 2020-11-15T14:08:13 | 2020-11-15T14:08:13 | 225,793,448 | 1 | 0 | null | 2022-06-17T03:30:23 | 2019-12-04T06:14:54 | Java | UTF-8 | Java | false | false | 1,140 | java | package com.example.concurrent;
/**
* <p><b>Description:</b>
* TODO
* <p><b>Company:</b>
*
* @author created by Jesse Hsu at 10:09 on 2020/4/8
* @version V0.1
* @classNmae VolatileTest
*/
public class VolatileTest {
public static volatile int race =0;
public static void increase(){
race++;
}
private static final int THREAD_COUNTS =20;
public static void main(String[] args) throws InterruptedException {
// IntStream.range(0,THREAD_COUNTS).forEach(i->{
// new Thread(()->{
// for(int j=0;j<10000;j++){
// increase();
// }
// }).start();
// });
Thread[] threads=new Thread[THREAD_COUNTS];
for (int i=0;i<THREAD_COUNTS;i++){
threads[i] = new Thread(()->{
for(int j=0;j<10000;j++){
increase();
}
});
threads[i].start();
}
// System.out.println(Thread.activeCount());
for (int i=0;i<THREAD_COUNTS;i++){
threads[i].join();
}
System.out.println(race);
}
}
| [
"wuhui.xu@newtouch.cn"
] | wuhui.xu@newtouch.cn |
093445f5e2a5bcbfa4c77d86fc59f28edef4a558 | f40ba0be10e056339daf3be94b80363ed46bc416 | /src/main/java/codeWars/kyu6/SumOfParts_20209007/SumParts.java | a7cb86ca117925572b8a189467d191dacc89ec22 | [] | no_license | JinHoooooou/codeWarsChallenge | e94a3d078389bc35eb25928ddc6c963f5878eb3e | 4f6cbc7351e6f027f2451b5237db05aa1dc5f857 | refs/heads/master | 2022-05-21T03:04:36.139987 | 2021-10-25T06:29:05 | 2021-10-25T06:29:05 | 253,538,045 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 300 | java | package codeWars.kyu6.SumOfParts_20209007;
import java.util.Arrays;
public class SumParts {
public static int[] sumParts(int[] ls) {
int[] result = new int[ls.length + 1];
for (int i = ls.length - 1; i >= 0; i--) {
result[i] = result[i + 1] + ls[i];
}
return result;
}
}
| [
"jinho4744@naver.com"
] | jinho4744@naver.com |
6e4c207b44480ba28ca786d57abec23209c037c9 | ee735a084e6cdd806f4fd6c702686b34443cf3b1 | /processor/src/test/java/org/mapstruct/ap/test/builder/ignore/BaseDto.java | 50b6d35e594054ceb973cf943236c533df057ba8 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | thyming/mapstruct | 913328ccef60bbf4617d2b86527982e4f8f404e0 | 616aaa986d473baedc8849a156616e7431673a43 | refs/heads/master | 2020-03-10T22:06:28.663234 | 2018-07-12T21:30:37 | 2018-07-12T21:30:37 | 129,611,204 | 0 | 0 | null | 2018-04-15T13:09:55 | 2018-04-15T13:09:55 | null | UTF-8 | Java | false | false | 1,046 | java | /**
* Copyright 2012-2017 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.ap.test.builder.ignore;
/**
* @author Filip Hrisafov
*/
public class BaseDto {
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
148824c8eabea29e26529663bbdd60881d2adf12 | f6cd38d79d363fbc205bf3b740c47d5e30bea6e3 | /src/com/sds/icto/mysite/servlet/action/board/InsertAction.java | 3145252fd84460711d673c29a23073e0024dbbb5 | [] | no_license | icto55-2-kickscar/mysite | 35b5c2e201a5f3b8a43faf7a2e0e1d29c62e1a8c | 8c8e0ecfbb579b9c5156dccbf7c88848905cc8a3 | refs/heads/master | 2020-05-05T07:01:19.143045 | 2015-08-05T07:23:48 | 2015-08-05T07:23:48 | 35,265,964 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,510 | java | package com.sds.icto.mysite.servlet.action.board;
import java.io.IOException;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.sds.icto.mysite.dao.BoardDao;
import com.sds.icto.mysite.vo.BoardVo;
import com.sds.icto.mysite.vo.MemberVo;
import com.sds.icto.web.Action;
public class InsertAction implements Action {
@Override
public void execute(HttpServletRequest request, HttpServletResponse response)
throws SQLException, ClassNotFoundException, ServletException,
IOException {
// 세션 객체를 가져옴
HttpSession session = request.getSession( false );
if( session == null ) {
response.sendRedirect( "/mysite/board" );
return;
}
// 세션 객체에 저장된 MemberVo 객체를 꺼냄
MemberVo memberVo = ( MemberVo ) session.getAttribute( "authMember" );
if( memberVo == null ) {
response.sendRedirect( "/mysite/board" );
return;
}
// 폼 입력 값
String title = request.getParameter( "title" );
String content = request.getParameter( "content" );
// VO 값 담기
BoardVo vo = new BoardVo();
vo.setTitle(title);
vo.setContent(content);
vo.setMemberNo( memberVo.getNo() );
vo.setMemberName( memberVo.getName() );
BoardDao dao = new BoardDao();
dao.insert(vo);
response.sendRedirect( "/mysite/board" );
}
}
| [
"kickscar@sunnyvale.co.kr"
] | kickscar@sunnyvale.co.kr |
b6c34cae94bd270a799ec4c927c1b38eb6c5ae91 | cb80d3b60a58ee7264aa37be257d03ecbe878328 | /src/dynamix_framework/dynamix-framework/src/org/ambientdynamix/update/DynamixUpdates.java | 6bfb081689635501ad4c374841f00d4a77ae9cc3 | [] | no_license | theodori/AndroidExperimentation | 92860e9b902b0755e7720ffcbf79e0ea18316d66 | 60a7b17ee4dc4bd4d61aac530b8c577692a95bba | refs/heads/master | 2021-01-18T11:41:40.376168 | 2015-02-26T12:31:52 | 2015-02-26T12:31:52 | 12,404,293 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,310 | java | /*
* Copyright (C) The Ambient Dynamix Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ambientdynamix.update;
import java.util.ArrayList;
import java.util.List;
/**
* Updates for the Dynamix Framework.
* @author Darren Carlson
*
*/
public class DynamixUpdates {
private List<TrustedCertBinder> trustedWebConnectorCerts = new ArrayList<TrustedCertBinder>();
/**
* Returns the list of TrustedCertBinders for the WebConnector.
*/
public List<TrustedCertBinder> getTrustedWebConnectorCerts() {
return trustedWebConnectorCerts;
}
/**
* Sets the list of TrustedCertBinders for the WebConnector.
*/
public void setTrustedWebConnectorCerts(List<TrustedCertBinder> trustedWebConnectorCerts) {
this.trustedWebConnectorCerts = trustedWebConnectorCerts;
}
}
| [
"theodori@ceid.upatras.gr"
] | theodori@ceid.upatras.gr |
d4be31823d3ce541755f5361dde129aea571967c | 681e8cb883058df726a9d9237942ed5a1cd9bfd1 | /src/main/java/com/explore/vo/ExamBatchVo.java | eed9eaa2a64eebe12eaa09cbf54f022d844af649 | [] | no_license | explore2017/AiExam | 012e79f9f80647e61e4f1f4ab87b21fc08731e28 | f5a794f846af55ae7e90cd6ccc5aa19dec359721 | refs/heads/master | 2020-04-23T14:24:44.624882 | 2019-05-19T04:27:28 | 2019-05-19T04:27:28 | 171,230,876 | 0 | 0 | null | 2019-03-01T13:11:16 | 2019-02-18T06:54:49 | Java | UTF-8 | Java | false | false | 771 | java | package com.explore.vo;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;
@Setter
@Getter
public class ExamBatchVo {
private Integer id;
//批次ID
private Integer batchId;
private String name;
//批次名称
private String batchName;
//批次描述
private String batchDescribe;
//批次考试开始时间
private Date batchStartTime;
//批次考试结束时间
private Date batchEndTime;
//批次状态
private Integer batchStudentStatus;
private Integer subjectId;
private Integer examTypeId;
private String subscribe;
private Date startTime;
private Date endTime;
private Integer creatorId;
private Date createTime;
private Date updateTime;
}
| [
"794409767@qq.com"
] | 794409767@qq.com |
8cc3c54db2888ba761e9d9cef17252c2887725d4 | 6e1ff9e27220939ab726183e1e9fd72f0788f746 | /OscarIDE-oscar/OscarIDE-oscar/com.oscar.opm.gef/src/com/oscar/opm/gef/editor/OPMGraphicalEditor.java | da8032952eb5a9fdbb63952a2530be5d9beb90ee | [] | no_license | dohkim119/IDE | 3c98cec5f44c32aa96cbcb988644abca72ab13e3 | 9a950424de4b6957af6e90126f794122e5726fec | refs/heads/master | 2020-04-06T12:20:43.019395 | 2018-11-13T22:36:24 | 2018-11-13T22:36:24 | 157,451,894 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,085 | java | package com.oscar.opm.gef.editor;
import java.io.IOException;
import java.util.EventObject;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor.PropertyValueWrapper;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.gef.DefaultEditDomain;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.ui.actions.ToggleGridAction;
import org.eclipse.gef.ui.actions.ToggleSnapToGeometryAction;
import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette;
import org.eclipse.gef.ui.properties.UndoablePropertySheetEntry;
import org.eclipse.gef.ui.properties.UndoablePropertySheetPage;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.IPropertySourceProvider;
import org.eclipse.ui.views.properties.PropertySheetPage;
import com.oscar.opm.gef.action.OPMCreateObjectAction;
import com.oscar.opm.gef.action.OscarCodePathChangeAction;
import com.oscar.opm.gef.action.OscarCodeModifyAction;
import com.oscar.opm.gef.action.ResizeToContentsAction;
import com.oscar.opm.gef.editor.part.OPMEditPartFactory;
import com.oscar.opm.model.OPMObjectProcessDiagram;
import com.oscar.opm.model.OPMPackage;
import com.oscar.opm.model.provider.OPMItemProviderAdapterFactory;
public class OPMGraphicalEditor extends GraphicalEditorWithFlyoutPalette
{
private Resource opdResource;
private OPMObjectProcessDiagram opd;
PropertySheetPage propertyPage;
public OPMGraphicalEditor()
{
setEditDomain(new DefaultEditDomain(this));
}
@Override
protected void initializeGraphicalViewer()
{
super.initializeGraphicalViewer();
getGraphicalViewer().setContents(opd);
}
@Override
protected void configureGraphicalViewer()
{
super.configureGraphicalViewer();
getGraphicalViewer().setEditPartFactory(new OPMEditPartFactory());
getActionRegistry().registerAction(new ToggleGridAction(getGraphicalViewer()));
getActionRegistry().registerAction(new ToggleSnapToGeometryAction(getGraphicalViewer()));
getGraphicalViewer().setContextMenu(new OPMGraphicalEditorContextMenuProvider(getGraphicalViewer(),getActionRegistry()));
}
@Override
protected void createActions() {
super.createActions();
OscarCodePathChangeAction changeAction = new OscarCodePathChangeAction(this);
getActionRegistry().registerAction(changeAction);
getSelectionActions().add(changeAction.getId());
OscarCodeModifyAction modifyAction = new OscarCodeModifyAction(this);
getActionRegistry().registerAction(modifyAction);
getSelectionActions().add(modifyAction.getId());
// create action for contextMenu.
/*
ResizeToContentsAction resizeAction = new ResizeToContentsAction(this);
getActionRegistry().registerAction(resizeAction);
getSelectionActions().add(resizeAction.getId());
OPMCreateObjectAction createAction = new OPMCreateObjectAction(this);
getActionRegistry().registerAction(createAction);
*/
}
@Override
protected PaletteRoot getPaletteRoot()
{
return new OPMGraphicalEditorPalette();
}
@Override
public void doSave(IProgressMonitor monitor)
{
if(opdResource == null) return;
try
{
opdResource.save(null);
getCommandStack().markSaveLocation();
} catch(IOException e) {
e.printStackTrace();
opdResource = null;
}
}
@Override
public void init(IEditorSite site,IEditorInput input) throws PartInitException
{
super.init(site, input);
loadInput(input);
}
private void loadInput(IEditorInput input)
{
OPMPackage.eINSTANCE.eClass();
ResourceSet resourceSet = new ResourceSetImpl();
if(input instanceof IFileEditorInput) {
IFileEditorInput fileInput = (IFileEditorInput) input;
IFile file = fileInput.getFile();
opdResource = resourceSet.createResource(URI.createURI(file.getLocationURI().toString()));
try {
opdResource.load(null);
opd = (OPMObjectProcessDiagram) opdResource.getContents().get(0);
} catch (IOException e) {
e.printStackTrace();
opdResource = null;
}
}
}
@Override
public void commandStackChanged(EventObject event)
{
firePropertyChange(PROP_DIRTY);
super.commandStackChanged(event);
}
/**
* This method implements adapting to {@link IPropertySheetPage}. All other requests are
* forwarded to the {@link GraphicalEditorWithFlyoutPalette#getAdapter(Class) parent}
* implementation.
*/
@Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class type)
{
if(type.equals(IPropertySheetPage.class))
{
if(propertyPage == null)
{
propertyPage = (UndoablePropertySheetPage) super.getAdapter(type);
// A new PropertySourceProvider was implemented to fetch the model
// from the edit part when required. The property source is provided
// by the generated EMF classes and wrapped by the AdapterFactoryContentProvider
// to yield standard eclipse interfaces.
IPropertySourceProvider sourceProvider = new IPropertySourceProvider()
{
IPropertySourceProvider modelPropertySourceProvider = new AdapterFactoryContentProvider(new OPMItemProviderAdapterFactory());
@Override
public IPropertySource getPropertySource(Object object)
{
IPropertySource source = null;
if(object instanceof EditPart) source = modelPropertySourceProvider.getPropertySource(((EditPart) object).getModel());
else source = modelPropertySourceProvider.getPropertySource(object);
if(source != null) return new UnwrappingPropertySource(source);
else return null;
}
};
UndoablePropertySheetEntry root = new UndoablePropertySheetEntry(getCommandStack());
root.setPropertySourceProvider(sourceProvider);
propertyPage.setRootEntry(root);
}
return propertyPage;
}
return super.getAdapter(type);
}
/**
* A property source which unwraps values that are wrapped in an EMF
* {@link PropertyValueWrapper}
*
*
*/
public class UnwrappingPropertySource implements IPropertySource
{
private IPropertySource source;
public UnwrappingPropertySource(final IPropertySource source)
{
this.source = source;
}
@Override
public Object getEditableValue()
{
Object value = source.getEditableValue();
if(value instanceof PropertyValueWrapper)
{
PropertyValueWrapper wrapper = (PropertyValueWrapper) value;
return wrapper.getEditableValue(null);
}
else
{
return source.getEditableValue();
}
}
@Override
public IPropertyDescriptor[] getPropertyDescriptors()
{
return source.getPropertyDescriptors();
}
@Override
public Object getPropertyValue(Object id)
{
Object value = source.getPropertyValue(id);
if(value instanceof PropertyValueWrapper)
{
PropertyValueWrapper wrapper = (PropertyValueWrapper) value;
return wrapper.getEditableValue(null);
}
else
{
return source.getPropertyValue(id);
}
}
@Override
public boolean isPropertySet(Object id)
{
return source.isPropertySet(id);
}
@Override
public void resetPropertyValue(Object id)
{
source.resetPropertyValue(id);
}
@Override
public void setPropertyValue(Object id,Object value)
{
source.setPropertyValue(id, value);
}
}
/*
/**
* Override superclass's method (protected) to public
* to provide Editdomain to {@link OPMCreateObjectAction}
@Override
public DefaultEditDomain getEditDomain() {
return super.getEditDomain();
}
*/
}
| [
"totheparadise119@gmail.com"
] | totheparadise119@gmail.com |
6aab94c0c3635d32c6c711fa87878c45034620b5 | a63f257c1c6d0d08fff01601a79d0c6dd78e0dd5 | /evl-examples/src/main/java/eu/daproject/evl/tests/example11/Example11.java | edaf613e1b2ce45e78cf6b2b9f9fbe9b1451f12b | [
"Apache-2.0"
] | permissive | ylegoc/evl | 3b1fd047cd52ab2a6b3b5c26a81ad6b21a59842c | 86414d86fa43fb8361b14d4ec2a8ed730b4f2ead | refs/heads/master | 2023-03-21T01:07:23.639974 | 2023-03-05T09:46:00 | 2023-03-05T09:46:00 | 188,688,043 | 3 | 0 | Apache-2.0 | 2022-11-15T10:45:43 | 2019-05-26T13:43:16 | Java | UTF-8 | Java | false | false | 2,438 | java | /*******************************************************************************
* Copyright 2019 The EVL authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
******************************************************************************/
package eu.daproject.evl.tests.example11;
import eu.daproject.evl.exception.InvocationException;
import eu.daproject.evl.predicate.Predicate;
import eu.daproject.evl.predicate.PredicateMethod1;
import eu.daproject.evl.tests.classes.A;
import eu.daproject.evl.tests.classes.B;
/**
* Example with predicate dispatch in data.
*
*/
public class Example11 {
public static class Foo {
public int process(A obj, int x) {
return 1;
}
public boolean test(A obj, int x) {
return (x < 0);
}
public int process(B obj, int x) {
return 2;
}
public boolean test(B obj, int x) {
return (x >= 10 && x < 20);
}
public int process2(B obj, int x) {
return 3;
}
public boolean test2(B obj, int x) {
return (x >= 20);
}
}
public static void run() throws Throwable {
A b = new B(2, -5);
Foo foo = new Foo();
PredicateMethod1<Integer> predicateMethod = new PredicateMethod1<Integer>();
predicateMethod.add(foo, "process", A.class, int.class).data(new Predicate(foo, "test", A.class, int.class));
predicateMethod.add(foo, "process", B.class, int.class).data(new Predicate(foo, "test", B.class, int.class));
predicateMethod.add(foo, "process2", B.class, int.class).data(new Predicate(foo, "test2", B.class, int.class));
System.out.println(predicateMethod.invoke(b, -1));
try {
System.out.println(predicateMethod.invoke(b, 1));
}
catch (InvocationException e) {
System.out.println("No function for x = 1");
}
System.out.println(predicateMethod.invoke(b, 11));
System.out.println(predicateMethod.invoke(b, 21));
System.out.println("Predicate method = " + predicateMethod);
}
}
| [
"ylegoc@gmail.com"
] | ylegoc@gmail.com |
08f2e5ba5ad4c3c1bf55be56d8e4ac127b585353 | a94c6020742cbee98f9e563abff0e39126052cf4 | /View/src/main/java/I18N.java | 6de7a13e86180887369f89b524b2e399ec3f4d0c | [] | no_license | Hanna-J-K/SudokuGameProject | d6bd263a7933606852e59582313624a6c7e44293 | 27f7bee34a44d80aeb9e7284b89d01babaa9f7c9 | refs/heads/master | 2023-04-03T01:22:24.885745 | 2021-04-21T10:14:03 | 2021-04-21T10:14:03 | 360,122,907 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,364 | java | import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.concurrent.Callable;
import javafx.beans.binding.Bindings;
import javafx.beans.binding.StringBinding;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
public final class I18N {
private static final ObjectProperty<Locale> locale;
static {
locale = new SimpleObjectProperty<>(getDefaultLocale());
locale.addListener((observable, oldValue, newValue) -> Locale.setDefault(newValue));
}
public static List<Locale> getSupportedLocales() {
return new ArrayList<>(Arrays.asList(new Locale("en","UK"),
new Locale("fr","FR"), new Locale("pl","PL")));
}
public static Locale getDefaultLocale() {
Locale sysDefault = Locale.getDefault();
return getSupportedLocales().contains(sysDefault) ? sysDefault : new Locale("en", "UK");
}
public static Locale getLocale() {
return locale.get();
}
public static void setLocale(Locale locale) {
localeProperty().set(locale);
Locale.setDefault(locale);
}
public static ObjectProperty<Locale> localeProperty() {
return locale;
}
public static String get(final String key, final Object... args) {
ResourceBundle bundle = ResourceBundle.getBundle("Language", getLocale());
return MessageFormat.format(bundle.getString(key), args);
}
public static StringBinding createStringBinding(final String key, Object... args) {
return Bindings.createStringBinding(() -> get(key, args), locale);
}
public static StringBinding createStringBinding(Callable<String> func) {
return Bindings.createStringBinding(func, locale);
}
public static Label labelForValue(Callable<String> func) {
Label label = new Label();
label.textProperty().bind(createStringBinding(func));
return label;
}
public static Button buttonForKey(final String key, final Object... args) {
Button button = new Button();
button.textProperty().bind(createStringBinding(key, args));
return button;
}
} //wolny tajwan
| [
"210234@edu.p.lodz.pl"
] | 210234@edu.p.lodz.pl |
d0a59c4d159d075ba15e3c657a9d8fd91039381d | a233a2d8237691cc140d5687f5a2d89c6bd9732c | /OfPet/app/src/main/java/com/cn/flylo/ofpet/bean/Task.java | f992ed452ef01d0a7757e8401ad9b8920464cb54 | [] | no_license | anweiwen/OfPet | 8c0bb441fe5e7feda86c2de439904d3c3acbe2e0 | 30a0e085c78fe4a5ae2ad9e9679410d3d10376dd | refs/heads/master | 2020-08-17T15:59:11.118648 | 2019-11-01T13:42:45 | 2019-11-01T13:42:45 | 215,685,168 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 632 | java | package com.cn.flylo.ofpet.bean;
/**
* @author axw_an
* @create on 2019/10/24
* @refer url:
* @description:
* @update: axw_an:2019/10/24:
*/
public class Task {
public int status;
public int version;
public String createTime;
public int taskId;
public int userId;
public String name;
public String phone;
public int type;
public String title;
public Integer attachId;
public String startDate;
public String endDate;
public String content;
public int numbers;
public int attendCount;
public int doing;
public OfferUser user;
public Integer join;
}
| [
"274639709@qq.com"
] | 274639709@qq.com |
3b93d5e3b13006a41d065778496cf9b09df5f4e4 | caaf5e32ec391e44e6a2b0467d3447060cd5c72e | /gen/com/example/sums101/BuildConfig.java | 615c7d64c1fa02e7ed4a1a3461dddc37a1fa6ab8 | [] | no_license | andrewrice90/sums101 | 29626bc418981a289d4d02ea1c63cddda6adf903 | 54262b02f3f9f63e2f0e9d3e492063db2dc9fccf | refs/heads/master | 2020-06-09T17:09:01.211003 | 2014-05-14T11:43:25 | 2014-05-14T11:43:25 | 19,777,118 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 161 | java | /** Automatically generated file. DO NOT MODIFY */
package com.example.sums101;
public final class BuildConfig {
public final static boolean DEBUG = true;
} | [
"andrewrice90@gmail.com"
] | andrewrice90@gmail.com |
7244d04ea270c7065ead6b44277ac8ca0559836d | dcd447a9c1eef80652a8d971e9956a3dfc7c37e9 | /src/main/java/pl/javastart/springjpaboot/model/klucz_zlozony/Person.java | f98646a1ba1156d161177fc89ee07e6365a69edb | [] | no_license | bartoszgurgul/spring-jpa-boot | e3040fbc095bc7e15ee3479d9d0fb02eaebcd99e | a785dd90c5c2acb489f8a77440535ddd1cc9eac9 | refs/heads/master | 2023-02-17T18:43:21.241759 | 2021-01-19T13:53:51 | 2021-01-19T13:53:51 | 330,770,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 934 | java | //package pl.javastart.springjpaboot.model.klucz_zlozony;
//
//import javax.persistence.Entity;
//import javax.persistence.Id;
//import javax.persistence.IdClass;
//import java.io.Serializable;
//
//@Entity
//@IdClass(PersonKey.class)
//public class Person implements Serializable {
// @Id
// private String firstName;
// @Id
// private String lastName;
// @Id
// private String telephone;
//
// public String getFirstName() {
// return firstName;
// }
//
// public void setFirstName(String firstName) {
// this.firstName = firstName;
// }
//
// public String getLastName() {
// return lastName;
// }
//
// public void setLastName(String lastName) {
// this.lastName = lastName;
// }
//
// public String getTelephone() {
// return telephone;
// }
//
// public void setTelephone(String telephone) {
// this.telephone = telephone;
// }
//}
| [
"bartoszgurgul@gmail.com"
] | bartoszgurgul@gmail.com |
d59110b244d6d7c0963b875a371ea9c461d16d96 | f695ae49da2be5ea108dce9f2c532827a725d3fb | /zucchini-ui-backend/src/main/java/io/zucchiniui/backend/comment/rest/UpdateCommentRequest.java | cf2e83430a7c18dc6412b6453ccc8e5929a3186c | [
"MIT"
] | permissive | safoa/zucchini-ui | cc5f7519a05f2f5419d6f08de866005537336de7 | a5474b3311f4cb138bf5d530ab5073ec433dbd44 | refs/heads/master | 2020-06-03T21:28:51.213361 | 2019-06-20T15:56:35 | 2019-06-20T15:56:35 | 191,738,106 | 0 | 0 | MIT | 2019-06-13T10:01:42 | 2019-06-13T10:01:41 | null | UTF-8 | Java | false | false | 335 | java | package io.zucchiniui.backend.comment.rest;
import org.hibernate.validator.constraints.NotEmpty;
public class UpdateCommentRequest {
@NotEmpty
private String content;
public String getContent() {
return content;
}
public void setContent(final String content) {
this.content = content;
}
}
| [
"pierre.gentile.perso@gmail.com"
] | pierre.gentile.perso@gmail.com |
72613075315acde26fb86aef282e72b1d4f88e58 | fffdc5890af30cfc249a42272bdc4bd24bbd3066 | /laboratoryeighteen/src/main/java/com/nixsolutions/laboratoryeighteen/model/CurrentUser.java | d0cc7da72b3907adbcc93f3e63c405944f19f429 | [] | no_license | krikgreg/greg | 2c12151f7b600f05f18fdde41d474afe7278b970 | 986222004f5e82816e6d5c946594546c207ecab4 | refs/heads/master | 2021-05-07T23:53:43.797882 | 2017-11-28T09:45:59 | 2017-11-28T09:45:59 | 107,524,763 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,149 | java | package com.nixsolutions.laboratoryeighteen.model;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import java.util.Collections;
import com.nixsolutions.laboratoryeighteen.entity.RoleEntity;
import com.nixsolutions.laboratoryeighteen.entity.UserEntity;
public class CurrentUser extends User {
private static final long serialVersionUID = -3250953033560579950L;
private long id;
private String firstName;
private RoleEntity role;
public CurrentUser(UserEntity user) {
super(user.getLogin(), user.getPassword(), true, true, true, true, Collections.singleton(new SimpleGrantedAuthority(user.getRole().getName())));
this.id = user.getId();
this.firstName = user.getFirstName();
this.role = user.getRole();
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public RoleEntity getRole() {
return role;
}
public void setRole(RoleEntity role) {
this.role = role;
}
} | [
"grigoriy@Grigoriys-MBP.nixsolutions.com"
] | grigoriy@Grigoriys-MBP.nixsolutions.com |
ad2ba2b3c59e7b4660e53a88bc3ef68fc50e189b | 9866f399d38ef7ae71e05716ae0a9988ecb86d60 | /Despachos/src/interfaz/comunicacion/servidorBD/CronometroReconexion.java | 30dd86aaad1d14c4c72953dc69ed9240cc5c98e8 | [] | no_license | christmo/lojanito-escritorio2 | d4e4e387661e1ee79efa1b68f9972e28b47953cc | 18e6e316e9d7d09faff8982e473edf36c4b825e4 | refs/heads/master | 2021-01-01T19:11:53.574882 | 2012-05-07T23:51:33 | 2012-05-07T23:51:33 | 32,122,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,198 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package interfaz.comunicacion.servidorBD;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author christmo
*/
public class CronometroReconexion extends Thread {
private boolean seguir = true;
int i = 1;
public CronometroReconexion() {
seguir = true;
i = 1;
}
@Override
public void run() {
while (seguir) {
i++;
if (i == 60) {
System.err.println("Reiniciar la conexion con el servidor...");
ConsultaRecorridosServidorBD.cerrarConexionServerKradac();
ConsultaRecorridosServidorBD.AbrirPuerto();
i = 1;
}
try {
Thread.sleep(1000);
} catch (InterruptedException ex) {
Logger.getLogger(CronometroReconexion.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
CronometroReconexion c;
public void IniciarCrono() {
this.start();
seguir = true;
i = 1;
}
public void reiniciar() {
i = 1;
}
}
| [
"christmo99@55787118-18e6-c3fa-eee6-1eb2663fe64c"
] | christmo99@55787118-18e6-c3fa-eee6-1eb2663fe64c |
9e1b49448f32f29afa636601c4da7611ca6a55bf | 7efb720d1de10218521f4ad077136b824c90af20 | /src/main/java/com/learn/springjms/config/JmsConfig.java | a5fbe9953acda35072ed2c1c7103a758b51c6d4f | [] | no_license | vcsheel/spring-jms | e6b60c087039ea1977366f194e377da35fff7db0 | 101106e90623c9406cb32b2277391bdcda7a609b | refs/heads/master | 2022-10-31T13:03:06.597562 | 2020-06-19T16:40:35 | 2020-06-19T16:40:35 | 273,459,088 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 757 | java | package com.learn.springjms.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.support.converter.MappingJackson2MessageConverter;
import org.springframework.jms.support.converter.MessageConverter;
import org.springframework.jms.support.converter.MessageType;
@Configuration
public class JmsConfig {
public static final String MY_QUEUE = "my-message-queue";
public static final String SEND_RCV_QUEUE = "reply-back-to-me";
public MessageConverter messageConverter() {
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
converter.setTargetType(MessageType.TEXT);
converter.setTypeIdPropertyName("_type");
return converter;
}
}
| [
"viveksheel96@gmail.com"
] | viveksheel96@gmail.com |
98682c9e8fc217df7285b0c7e23fecbc81f0fc8a | 32c00154870e49e9b98b7ee36dae76249d0eda3a | /ogresean/bats/BBEntityInsectBat.java | 4de903a2570fcc95e2f05af2b25cdaa17237001f | [] | no_license | GotoLink/OgreSean | e8b0aa2ff9a788c507a92ef92b1b9579c2b769c3 | d3cb03ceda72f462ba22eefc48c9d8182a8d1d60 | refs/heads/master | 2021-01-10T21:18:19.129589 | 2015-02-01T20:33:54 | 2015-02-01T20:33:54 | 13,926,479 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,080 | java | package ogresean.bats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
public class BBEntityInsectBat extends BBEntityBat {
public BBEntityInsectBat(World world) {
super(world);
}
@Override
public int getBiomeMaxY(BiomeGenBase biome) {
return biome == BiomeGenBase.forest || biome == BiomeGenBase.swampland ? 127 : 64;
}
@Override
public int getBiomeMinY(BiomeGenBase biome) {
return 6;
}
@Override
public int getMaxSpawnedInChunk() {
return worldObj.isDaytime() ? 14 : 8;
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(3D);
}
@Override
protected byte getAttackDelay() {
return (byte) (getBatAction() > 2 ? 40 : 80);
}
@Override
protected int getBatDamage() {
return getBatAction() < 3 ? 2 : 3;
}
/**
* @return the additional x and z velocity that is added to entities that
* collide with the bat.
*/
@Override
protected double getBonusVelocity() {
return (rand.nextInt(3 + worldObj.difficultySetting.ordinal() * 2) + 4 + worldObj.difficultySetting.ordinal());
}
/**
* @return the additional y velocity that is added to entities that collide
* with the bat.
*/
@Override
protected double getBonusVelocity2() {
return 0.01D + worldObj.difficultySetting.ordinal() * 0.01D;
}
/**
* @return a value that determines how often the bat drops manure. higher =
* less often
*/
@Override
protected int getDropFreq() {
return 3200;
}
@Override
protected double getXZFlight() {
return 0.038D - (getMaxHealth() - getHealth()) * 0.0038D;
}
@Override
protected double getXZFlightAttackBoost() {
return 0.028D;
}
@Override
protected double getYFlight() {
return 0.16D - (getMaxHealth() - getHealth()) * 0.016D;
}
@Override
protected double getYFlightAttackBoost() {
return 0.08D;
}
@Override
protected void handleEchos() {
if (rand.nextFloat() < (isWet() ? 0.024F : 0.008F)) {
worldObj.playSoundAtEntity(this, getEchoSound(), getSoundVolume() * 1.1F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);
}
}
@Override
protected boolean isValidTarget(EntityLivingBase el) {
return el instanceof EntitySpider;
}
@Override
protected boolean willAttack() {
return getBatAction() > 2 ? rand.nextInt(20) == 0 : rand.nextInt(10) == 0;
}
/**
* @return true if the bat has become aggressive
*/
@Override
protected boolean willBecomeAggressive(Entity entity) {
return entity instanceof EntitySpider;
}
}
| [
"gotolinkminecraft@gmail.com"
] | gotolinkminecraft@gmail.com |
4049063c2065c7ea1e3d4e4a1a84949cdb1f9c45 | f0955b115fa9cd5d07e6b942a8148183c70eebda | /src/main/java/com/alassaneniang/spring5webapp/domain/Book.java | bcf6398bd3cdef6314f6377641f999e2ccaa94eb | [] | no_license | adniang75/spring5webapp | 85b1586a594422fb4a74ed9f88dccc88b36f0051 | ff4a452028c3c5152dc3b1ca3dc9319b69d17468 | refs/heads/master | 2021-12-03T01:14:13.436138 | 2021-11-18T12:22:36 | 2021-11-18T12:22:36 | 429,150,646 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,007 | java | package com.alassaneniang.spring5webapp.domain;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
@Entity
public class Book {
@Id
@GeneratedValue( strategy = GenerationType.AUTO )
private Long id;
private String title;
private String isbn;
@ManyToMany
@JoinTable( name = "author_book", joinColumns = @JoinColumn( name = "book_id" ),
inverseJoinColumns = @JoinColumn( name = "author_id" ) )
private Set<Author> authors = new HashSet<>();
@ManyToOne
private Publisher publisher;
public Book () {
}
public Book ( String title, String isbn ) {
this.title = title;
this.isbn = isbn;
}
public Long getId () {
return id;
}
public void setId ( Long id ) {
this.id = id;
}
public String getTitle () {
return title;
}
public void setTitle ( String title ) {
this.title = title;
}
public String getIsbn () {
return isbn;
}
public void setIsbn ( String isbn ) {
this.isbn = isbn;
}
public Set<Author> getAuthors () {
return authors;
}
public void setAuthors ( Set<Author> authors ) {
this.authors = authors;
}
public Publisher getPublisher () {
return publisher;
}
public void setPublisher ( Publisher publisher ) {
this.publisher = publisher;
}
@Override
public boolean equals ( Object o ) {
if ( this == o ) return true;
if ( o == null || getClass() != o.getClass() ) return false;
Book book = (Book) o;
return Objects.equals( id, book.id );
}
@Override
public int hashCode () {
return id != null ? id.hashCode() : 0;
}
@Override
public String toString () {
return "Book{" +
"id=" + id +
", title='" + title + '\'' +
", isbn='" + isbn + '\'' +
'}';
}
}
| [
"adniang75@gmail.com"
] | adniang75@gmail.com |
69debd82ee03935d23707b3f3c0168439171f512 | 201d729bb0177c0a66760986542f33cacac672c2 | /app/src/main/java/com/example/dedsec/wellplace/activities/LoginActivity.java | 487872bd626fbb0156596926966a47ffa2233ed8 | [] | no_license | kecyokevinny/WellPlace | fa36a801967de408006b0882aeed0b68f671e021 | ded91565c3b195386fcd8013c304a59bc8d88606 | refs/heads/master | 2021-01-19T23:02:54.369484 | 2017-04-20T22:29:02 | 2017-04-20T22:29:02 | 88,909,753 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 432 | java | package com.example.dedsec.wellplace.activities;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.example.dedsec.wellplace.R;
public class LoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
getSupportActionBar().hide();
}
}
| [
"kecyokevinny@gmail.com"
] | kecyokevinny@gmail.com |
3316c7be5eb91ac44b6a2f71ecc097bba3d485e9 | a059eb982e5f5e603a28b3839a9af5cbdcc01657 | /src/main/Java/cn/edu/sysu/Service/VIPService.java | 10ae7122250defab827940d6bb7d3cfeb31ac60d | [] | no_license | lkkkkkkkkk/KTV-System | 38a1988203a9dcaf5d0f2fa30965613c286b0e13 | eb593c80c446bcf174cd89b15d38de6df875d094 | refs/heads/master | 2020-04-28T21:26:37.478390 | 2018-07-09T09:27:05 | 2018-07-09T09:27:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,671 | java | package cn.edu.sysu.Service;
import cn.edu.sysu.Dto.OperationStatus;
import cn.edu.sysu.Entity.VIP;
import java.util.List;
/**
* Project name: KTV-System
* Package name: cn.edu.sysu.Service
* Created by lihan on 2018/4/14
* Description: VIP的业务层接口,提供
* 对VIP的增加、删除、修改以及查询等方法。
*/
public interface VIPService {
/**
* 商家添加VIP会员
*
* @param VIP 将要添加的VIP会员
* @return 返回添加VIP会员的结果
*/
OperationStatus addVIP(VIP VIP);
/**
* 商家删除VIP会员
*
* @param cname 将要被删除的VIP会员名字
* @return 返回删除VIP会员的结果
*/
OperationStatus deleteVIP(String cname);
/**
* 查询所有VIP会员信息
*
* @return 返回所有会员列表
*/
List<VIP> queryAllVIP();
/**
* 根据姓名信息查询VIP会员信息
*
* @param id VIP会员编号
* @return 返回符合姓名查询的VIP
*/
VIP queryVIPById(int id);
/**
* 根据姓名信息查询VIP会员信息
*
* @param cname VIP会员姓名
* @return 返回符合姓名查询的VIP
*/
VIP queryVIPByName(String cname);
/**
* 根据电话查询VIP信息
*
* @param phone VIP会员电话号码
* @return 返回电话号码为phone的VIP
*/
VIP queryVIPByPhone(String phone);
/**
* 更改会员名字
*
* @param id VIP会员编号
* @param cname 新的VIP会员名字
* @return 返回更改VIP会员名字的结果
*/
OperationStatus changeName(int id, String cname);
}
| [
"fndnh@foxmail.com"
] | fndnh@foxmail.com |
8f45c51fc96baabfd60a0fb0ba89d3bf7ce9d753 | 54c252f96103b80441e49ef1679c5d656de4bb42 | /algorithm/src/ex6/BTException.java | 651f0e90a1381cfb469069ba23f9890bbb7c7007 | [
"MIT"
] | permissive | Eskeptor/ComReport | d551b44a3dcc41c0d09e21ef2b5be41eb40a9f3c | 83a6fad2d8f3b585b31e6f9ce5e39d0a6e168fc2 | refs/heads/master | 2021-08-22T07:09:22.510571 | 2017-11-29T15:17:31 | 2017-11-29T15:17:31 | 104,036,624 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 374 | java | package ex6;
/* Class BTException */
public class BTException extends Exception {
public BTException() {
super();
}
public BTException(String message) {
super(message);
}
public BTException(String message, Throwable cause) {
super(message, cause);
}
public BTException(Throwable cause) {
super(cause);
}
}
| [
"skyvvv624@naver.com"
] | skyvvv624@naver.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.