blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
โ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
โ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
โ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5a6ed52a53136d3033e51ba80bbfbb12d5779e45
|
e3965c3364db6351c6dbba92b5bbf2923e28b059
|
/src/main/java/HelloWorld.java
|
108fd6c034e89a1a31aab0d0d614b189ad221f74
|
[] |
no_license
|
zzwenyu/test2
|
2c0ff0ae49fd8b70e99ce5e0832dec9fcc964cc8
|
d30be4893891f4f67fc5d42ef2e5b7cf051345e6
|
refs/heads/master
| 2021-06-26T03:23:47.928066
| 2019-07-15T14:02:59
| 2019-07-15T14:02:59
| 137,292,794
| 0
| 0
| null | 2020-10-12T20:16:11
| 2018-06-14T01:55:45
|
Java
|
UTF-8
|
Java
| false
| false
| 145
|
java
|
package org.gpf.maventest01.model;
public class HelloWorld {
public String sayHelloWorld(){
return "Hello World!";
}
}
|
[
"root@localhost.localdomain"
] |
root@localhost.localdomain
|
fa6a6c6c3136dbb3eb50b2305396642d44faf777
|
31ba94f20aab2a144b67a2239b71d0a5e71b77d2
|
/src/main/java/com/epam/se2/lesson16/RecursiveGenericsExample.java
|
6ce224d2da822576669f4de342bf698969a8685f
|
[] |
no_license
|
elefus/epam-devops-09-2017
|
f61e92fce85746f8dc3cbdb72095cdd3cefe1bb9
|
706b68cf4d3eb9732d2ca24f5e9345a7b7707c51
|
refs/heads/master
| 2021-08-29T23:49:36.078982
| 2017-12-15T09:59:45
| 2017-12-15T09:59:45
| 105,904,169
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 257
|
java
|
package com.epam.se2.lesson16;
public class RecursiveGenericsExample {
public static void main(String[] args) {
// list.add(1).add(2).add(5);
GenericArrayList<Integer> arrayList = null;
arrayList.add(1).add(2).add(5);
}
}
|
[
"elefus@yandex.ru"
] |
elefus@yandex.ru
|
0d5fa16ce0e98bded5e503a9c89b05e83fec19c4
|
629e42efa87f5539ff8731564a9cbf89190aad4a
|
/unrefactorInstances/jfreechart/27/cloneInstance2.java
|
e3b3ab39b734680e803f8cf1a731dcd6ddd13bb5
|
[] |
no_license
|
soniapku/CREC
|
a68d0b6b02ed4ef2b120fd0c768045424069e726
|
21d43dd760f453b148134bd526d71f00ad7d3b5e
|
refs/heads/master
| 2020-03-23T04:28:06.058813
| 2018-08-17T13:17:08
| 2018-08-17T13:17:08
| 141,085,296
| 0
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 403
|
java
|
public void testRemove() {
XYSeries s1 = new XYSeries("Series 1");
s1.add(1.0, 1.0);
s1.add(2.0, 2.0);
s1.add(3.0, 3.0);
assertEquals(3, s1.getItemCount());
s1.remove(new Double(2.0));
assertEquals(new Double(3.0), s1.getX(1));
s1.remove(0);
assertEquals(new Double(3.0), s1.getX(0));
}
|
[
"sonia@pku.edu.cn"
] |
sonia@pku.edu.cn
|
cf6af4a34c5418284e314e707f64c67ab97ae8fc
|
312e02ac31d750ac91e0fbe7aaf52705edcb7ab1
|
/JavaThread/src/club/banyuan/demoThreadPool/MyThreadPool.java
|
7bc470323471f557ff37ce9a92aac002563bbffc
|
[] |
no_license
|
samho2008/2010JavaSE
|
52f423c4c135a7ce61c62911ed62cbe2ad91c7ba
|
890a4f5467aa2e325383f0e4328e6a9249815ebc
|
refs/heads/master
| 2023-06-14T07:57:37.914624
| 2021-07-05T16:34:18
| 2021-07-05T16:34:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,244
|
java
|
package club.banyuan.demoThreadPool;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
* @author sanye
* @version 1.0
* @date 2020/12/8 10:49 ไธๅ
*/
public class MyThreadPool {
public static void main(String[] args) {
/**
* 1.ๅๅปบไธไธชๅฏ็ผๅญ็็บฟ็จๆฑ ใๅฆๆ็บฟ็จๆฑ ็ๅคงๅฐ่ถ
่ฟไบๅค็ไปปๅกๆ้่ฆ็็บฟ็จ๏ผ้ฃไนๅฐฑไผๅๆถ้จๅ็ฉบ้ฒ๏ผ60็งไธๆง่กไปปๅก๏ผ็็บฟ็จ<br>
* 2.ๅฝไปปๅกๆฐๅขๅ ๆถ๏ผๆญค็บฟ็จๆฑ ๅๅฏไปฅๆบ่ฝ็ๆทปๅ ๆฐ็บฟ็จๆฅๅค็ไปปๅก<br>
* 3.ๆญค็บฟ็จๆฑ ไธไผๅฏน็บฟ็จๆฑ ๅคงๅฐๅ้ๅถ๏ผ็บฟ็จๆฑ ๅคงๅฐๅฎๅ
จไพ่ตไบๆไฝ็ณป็ป๏ผๆ่
่ฏดJVM๏ผ่ฝๅคๅๅปบ็ๆๅคง็บฟ็จๅคงๅฐ<br>
*
*/
// ExecutorService executorService = Executors.newCachedThreadPool();
// for (int i = 0; i <10; i++) {
// int num = i;
// executorService.submit(() -> System.out.println(Thread.currentThread().getName()+"ๆง่ก"+ num));
// }
// executorService.shutdown();
//
// System.out.println();
// for (int i = 0; i <20; i++) {
// int num = i;
// executorService.submit(() -> System.out.println(Thread.currentThread().getName()+"ๆง่ก"+ num));
//
// }
// ExecutorService pool = Executors.newSingleThreadExecutor();
// for (int i = 0; i < 10; i++) {
// final int ii = i;
// pool.execute(() -> System.out.println(Thread.currentThread().getName() + "=>" + ii));
// }
// pool.shutdown();
ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(5);
Runnable r1 = () -> System.out.println("็บฟ็จๅ็งฐ๏ผ" + Thread.currentThread().getName() + "๏ผๆง่ก:3็งๅๆง่ก");
Runnable r2 = () -> System.out.println("็บฟ็จๅ็งฐ๏ผ" + Thread.currentThread().getName() + "๏ผๆง่ก:2็งๅๆง่ก");
scheduledThreadPool.schedule(r1, 3, TimeUnit.SECONDS);
scheduledThreadPool.schedule(r2, 2, TimeUnit.SECONDS);
scheduledThreadPool.shutdown();
//ไฝฟ็จ็บฟ็จๆฑ ็ๆนๅผ,ๅ้10ไธๆกๆฐๆฎ,็บฟ็จๆฑ ไธญๅชๆ6ไธช็บฟ็จ,ไฝๆฏ่ฆๅ้็ปๅไธชไบบ 1 999 1000 1999 2000 2999
}
}
|
[
"zhoujian@banyuan.club"
] |
zhoujian@banyuan.club
|
3d7febb925afd719996bed6b3535ab7ba622285f
|
ab38746e32cd56f84f18ba75fafbd9bf73b4e999
|
/app/src/main/java/p012ch/qos/logback/core/util/DatePatternToRegexUtil.java
|
497acb1c0a3ed4bf8987119a0b11ec191afe923c
|
[] |
no_license
|
jack15177089002/mybcz_5_0_1
|
8c51a9785713046dc8ffffeff0bf8257d2af9013
|
ab47049b95ab69fe62ff5fd093d2204e00506bd5
|
refs/heads/master
| 2021-03-15T09:01:29.235028
| 2020-03-12T13:20:06
| 2020-03-12T13:20:06
| 246,839,031
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,355
|
java
|
package p012ch.qos.logback.core.util;
import java.util.ArrayList;
import java.util.List;
/* renamed from: ch.qos.logback.core.util.DatePatternToRegexUtil */
public class DatePatternToRegexUtil {
final String datePattern;
final int datePatternLength;
final CharSequenceToRegexMapper regexMapper = new CharSequenceToRegexMapper();
public DatePatternToRegexUtil(String str) {
this.datePattern = str;
this.datePatternLength = str.length();
}
public String toRegex() {
List<CharSequenceState> list = tokenize();
StringBuilder sb = new StringBuilder();
for (CharSequenceState regex : list) {
sb.append(this.regexMapper.toRegex(regex));
}
return sb.toString();
}
private List<CharSequenceState> tokenize() {
ArrayList arrayList = new ArrayList();
CharSequenceState charSequenceState = null;
for (int i = 0; i < this.datePatternLength; i++) {
char charAt = this.datePattern.charAt(i);
if (charSequenceState == null || charSequenceState.f1672c != charAt) {
charSequenceState = new CharSequenceState(charAt);
arrayList.add(charSequenceState);
} else {
charSequenceState.incrementOccurrences();
}
}
return arrayList;
}
}
|
[
"3167289375@qq.com"
] |
3167289375@qq.com
|
a2cc8509e92232cd2606eab8e9341f956dd2c552
|
22012491da3f71140d3b8548eb59905baf95a7e0
|
/com/planet_ink/coffee_mud/Abilities/Common/Bandaging.java
|
202a136659662f4fccdf81490e550bd11d8607ce
|
[
"Apache-2.0"
] |
permissive
|
griffenliu/CoffeeMud
|
01018dac96d0381ad27cb49e4e5e89557e2c6247
|
6fb04b990dc6528b01ca8e707a90e752a8310267
|
refs/heads/master
| 2020-03-23T02:38:38.136327
| 2018-07-15T02:18:23
| 2018-07-15T02:18:23
| 140,245,931
| 0
| 0
|
Apache-2.0
| 2018-07-09T07:15:15
| 2018-07-09T07:15:15
| null |
UTF-8
|
Java
| false
| false
| 6,006
|
java
|
package com.planet_ink.coffee_mud.Abilities.Common;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2006-2018 Bo Zimmerman
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.
*/
public class Bandaging extends CommonSkill implements MendingSkill
{
@Override
public String ID()
{
return "Bandaging";
}
private final static String localizedName = CMLib.lang().L("Bandaging");
@Override
public String name()
{
return localizedName;
}
private static final String[] triggerStrings =I(new String[] {"BANDAGE","BANDAGING"});
@Override
public String[] triggerStrings()
{
return triggerStrings;
}
@Override
protected int canAffectCode()
{
return 0;
}
@Override
protected int canTargetCode()
{
return Ability.CAN_MOBS;
}
@Override
public int classificationCode()
{
return Ability.ACODE_SKILL|Ability.DOMAIN_ANATOMY;
}
protected Physical bandaging=null;
protected boolean messedUp=false;
public Bandaging()
{
super();
displayText=L("You are bandaging...");
verb=L("bandaging");
}
@Override
public boolean supportsMending(Physical item)
{
if(!(item instanceof MOB))
return false;
return (item.fetchEffect("Bleeding")!=null)
||(item.fetchEffect("Injury")!=null)
||(item.fetchEffect("Hamstring")!=null)
||(item.fetchEffect("BrokenLimbs")!=null);
}
@Override
public boolean tick(final Tickable ticking, final int tickID)
{
if((affected!=null)
&&(affected instanceof MOB)
&&(tickID==Tickable.TICKID_MOB))
{
final MOB mob=(MOB)affected;
if((bandaging==null)||(mob.location()==null))
{
messedUp=true;
unInvoke();
}
if((bandaging instanceof MOB)&&(!mob.location().isInhabitant((MOB)bandaging)))
{
messedUp=true;
unInvoke();
}
if(mob.curState().adjHitPoints(super.getXLEVELLevel(invoker())+(int)Math.round(CMath.div(mob.phyStats().level(),2.0)),mob.maxState()))
mob.location().show(mob,null,CMMsg.MSG_OK_VISUAL,L("<S-NAME> mend(s) and heal(s)."));
}
return super.tick(ticking,tickID);
}
@Override
public void unInvoke()
{
if(canBeUninvoked())
{
if(affected instanceof MOB)
{
final MOB mob=(MOB)affected;
if((bandaging!=null)&&(!aborted))
{
if((messedUp)||(bandaging==null))
commonTell(mob,L("You've failed to bandage @x1!",bandaging.name()));
else
{
Ability A=bandaging.fetchEffect("Bleeding");
if(A != null)
A.unInvoke();
A=bandaging.fetchEffect("Injury");
if(A != null)
A.unInvoke();
A=bandaging.fetchEffect("Hamstring");
if(A != null)
A.unInvoke();
A=bandaging.fetchEffect("BrokenLimbs");
if(A != null)
{
mob.tell(mob,bandaging,null,L("You finish setting <T-YOUPOSS> bones, so that they can now heal properly."));
if((bandaging instanceof MOB)&&(bandaging != mob))
((MOB)bandaging).tell(mob,bandaging,null,L("<S-NAME> finishes setting your broken bones, so that they can now heal properly."));
A.setMiscText("+SETBONES");
}
}
}
}
}
super.unInvoke();
}
public double healthPct(MOB mob){ return CMath.div(mob.curState().getHitPoints(),mob.maxState().getHitPoints());}
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
if(super.checkStop(mob, commands))
return true;
verb=L("bandaging");
bandaging=null;
final MOB target=super.getTarget(mob,commands,givenTarget);
if(target==null)
return false;
if((target.fetchEffect("Bleeding")==null)
&&(target.fetchEffect("BrokenLimbs")==null)
&&(target.fetchEffect("Hamstring")==null)
&&(target.fetchEffect("Injury")==null))
{
super.commonTell(mob,target,null,L("<T-NAME> <T-IS-ARE> not bleeding, broken or injured!"));
return false;
}
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
messedUp=!proficiencyCheck(mob,0,auto);
int duration=3+(int)Math.round(10*(1.0-healthPct(target)))-getXLEVELLevel(mob);
if(duration<3)
duration=3;
verb=L("bandaging @x1",target.name());
bandaging=target;
final String msgStr = (target.fetchEffect("BrokenLimbs")!=null) ?
L("<S-NAME> begin(s) bandaging up <T-YOUPOSS> and setting <T-HIS-HER> bones.") :
L("<S-NAME> begin(s) bandaging up <T-YOUPOSS> wounds.");
final CMMsg msg=CMClass.getMsg(mob,target,this,CMMsg.MSG_DELICATE_HANDS_ACT,msgStr);
if(mob.location().okMessage(mob,msg))
{
mob.location().send(mob,msg);
beneficialAffect(mob,mob,asLevel,duration);
}
return true;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
47c3911f1f3d8e1aabc7f3197cc110c88579940a
|
42f49f1b59f0fb8cadd1138094324d34e1884f61
|
/spring-boot-start-dynamic-datasource/src/main/java/com/gqzdev/dynamic/datasource/model/DatasourceConfig.java
|
549396a232dca91bbae45bfd2b61e0bde967e8ac
|
[
"MIT"
] |
permissive
|
gqzdev/spring-boot-start
|
d199e747f699a534971a5c43dbffdf8e655b58b2
|
882bcc0d375f6504223d96fb90f201e6509c4ef2
|
refs/heads/master
| 2022-12-16T00:27:25.358459
| 2020-09-13T14:42:56
| 2020-09-13T14:42:56
| 214,058,442
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,319
|
java
|
package com.gqzdev.dynamic.datasource.model;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/**
* <p>
* ๆฐๆฎๆบ้
็ฝฎ่กจ
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 10:58
*/
@Data
@Table(name = "datasource_config")
public class DatasourceConfig implements Serializable {
/**
* ไธป้ฎ
*/
@Id
@Column(name = "`id`")
@GeneratedValue(generator = "JDBC")
private Long id;
/**
* ๆฐๆฎๅบๅฐๅ
*/
@Column(name = "`host`")
private String host;
/**
* ๆฐๆฎๅบ็ซฏๅฃ
*/
@Column(name = "`port`")
private Integer port;
/**
* ๆฐๆฎๅบ็จๆทๅ
*/
@Column(name = "`username`")
private String username;
/**
* ๆฐๆฎๅบๅฏ็
*/
@Column(name = "`password`")
private String password;
/**
* ๆฐๆฎๅบๅ็งฐ
*/
@Column(name = "`database`")
private String database;
/**
* ๆ้ JDBC URL
*
* @return JDBC URL
*/
public String buildJdbcUrl() {
return String.format("jdbc:mysql://%s:%s/%s?useUnicode=true&characterEncoding=utf-8&useSSL=false", this.host, this.port, this.database);
}
}
|
[
"gqzdev@gmail.com"
] |
gqzdev@gmail.com
|
0038f6d5554a11fb1437ade2d91ffb1c25d374b9
|
2c92bad0b2dbea25beaa0883f3950c858b191891
|
/src/com/github/teocci/nio/socket/nio2/NioSocketServer.java
|
f11358b701ea52d0664cb23938e8de759f2e2f47
|
[
"MIT"
] |
permissive
|
DryLeonhard/NioSocketCodeSample
|
c6223b143543d555ba87bc9b721d4a2f2771c7c5
|
efef0a8b8270897771a2ef470071b0307fd2d300
|
refs/heads/master
| 2023-03-22T08:07:44.965617
| 2018-08-07T07:42:16
| 2018-08-07T07:42:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,506
|
java
|
package com.github.teocci.nio.socket.nio2;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousServerSocketChannel;
import java.nio.channels.AsynchronousSocketChannel;
import java.nio.channels.CompletionHandler;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
/**
* Created by teocci.
*
* @author teocci@yandex.com on 2017-Jun-21
*/
public class NioSocketServer
{
public NioSocketServer()
{
try {
// Create an AsynchronousServerSocketChannel that will listen on port 5000
final AsynchronousServerSocketChannel listener =
AsynchronousServerSocketChannel.open().bind(new InetSocketAddress(5000));
// Listen for a new request
listener.accept(null, new CompletionHandler<AsynchronousSocketChannel, Void>()
{
@Override
public void completed(AsynchronousSocketChannel ch, Void att)
{
// Accept the next connection
listener.accept(null, this);
// Greet the client
ch.write(ByteBuffer.wrap("Hello, I am Echo Server, let's have a conversation!\n".getBytes()));
// Allocate a byte buffer (4K) to read from the client
ByteBuffer byteBuffer = ByteBuffer.allocate(4096);
try {
// Read the first line
int bytesRead = ch.read(byteBuffer).get(120, TimeUnit.SECONDS);
boolean running = true;
while (bytesRead != -1 && running) {
System.out.println("bytes read: " + bytesRead);
// Make sure that we have data to read
if (byteBuffer.position() > 2) {
// Make the buffer ready to read
byteBuffer.flip();
// Convert the buffer into a line
byte[] lineBytes = new byte[bytesRead];
byteBuffer.get(lineBytes, 0, bytesRead);
String line = new String(lineBytes);
// Debug
System.out.println("Message: " + line);
// Echo back to the caller
ch.write(ByteBuffer.wrap(line.getBytes()));
// Make the buffer ready to write
byteBuffer.clear();
// Read the next line
bytesRead = ch.read(byteBuffer).get(120, TimeUnit.SECONDS);
} else {
// An empty line signifies the end of the conversation in our protocol
running = false;
}
}
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
} catch (TimeoutException e) {
// The user exceeded the 120 second timeout, so close the connection
ch.write(ByteBuffer.wrap("Good Bye\n".getBytes()));
System.out.println("Connection timed out, closing connection");
}
System.out.println("End of conversation");
try {
// Close the connection if we need to
if (ch.isOpen()) {
ch.close();
}
} catch (IOException e1) {
e1.printStackTrace();
}
}
@Override
public void failed(Throwable exc, Void att)
{
// ...
}
});
} catch (IOException e) {
e.printStackTrace();
}
}
public static void main(String[] args)
{
new NioSocketServer();
try {
Thread.sleep(60000);
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"teocci@yandex.com"
] |
teocci@yandex.com
|
1ff3fef2f8955c64b7967d0821cee339663f3beb
|
ba0657f835fe4a2fb0b0524ad2a38012be172bc8
|
/src/main/java/designpatterns/hf/structural/adapter/mediaplayer/pattern/MediaAdapter.java
|
00adb95e80651bf9979690119ea0af4b56ff179b
|
[] |
no_license
|
jsdumas/java-dev-practice
|
bc2e29670dd6f1784b3a84f52e526a56a66bbba2
|
db85b830e7927fea863d95f5ea8baf8d3bdc448b
|
refs/heads/master
| 2020-12-02T16:28:41.081765
| 2017-12-08T23:10:53
| 2017-12-08T23:10:53
| 96,547,922
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 653
|
java
|
package designpatterns.hf.structural.adapter.mediaplayer.pattern;
public class MediaAdapter implements MediaPlayer {
private AdvancedMediaPlayer advancedMusicPlayer;
public MediaAdapter(String audioType) {
if (audioType.equalsIgnoreCase("vlc")) {
advancedMusicPlayer = new VlcPlayer();
} else if (audioType.equalsIgnoreCase("mp4")) {
advancedMusicPlayer = new Mp4Player();
}
}
@Override
public void play(String audioType, String fileName) {
if (audioType.equalsIgnoreCase("vlc")) {
advancedMusicPlayer.playVlc(fileName);
} else if (audioType.equalsIgnoreCase("mp4")) {
advancedMusicPlayer.playMp4(fileName);
}
}
}
|
[
"jsdumas@free.fr"
] |
jsdumas@free.fr
|
5dec2cf6f571f7b4e172fbd1eeedacd151f322c6
|
48700053bdf9176201afd389e61c9751144fa001
|
/fatclient/sample3/modules/app/org.jowidgets.samples.fatclient.sample3.common/src/main/java/org/jowidgets/samples/fatclient/sample3/tags/repository/TagRepository.java
|
3d77c2018023b557a166ed09edff01268dcadcdc
|
[] |
no_license
|
jo-source/jo-client-platform-samples
|
3adf461b6f47f3f228cbf5a802f7e147b985f71c
|
5c4b58a1b6a11047cb5cc8f13856f7eea0555b06
|
refs/heads/master
| 2021-01-17T03:52:24.909003
| 2017-09-30T09:15:05
| 2017-09-30T09:15:05
| 39,778,875
| 2
| 1
| null | 2016-01-14T20:12:51
| 2015-07-27T14:29:24
|
Java
|
UTF-8
|
Java
| false
| false
| 3,376
|
java
|
/*
* Copyright (c) 2014, grossmann
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the jo-widgets.org nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL jo-widgets.org BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.jowidgets.samples.fatclient.sample3.tags.repository;
import org.jowidgets.api.color.Colors;
import org.jowidgets.cap.common.api.execution.IExecutionCallback;
import org.jowidgets.cap.service.repository.api.ICrudSupportBeanRepository;
import org.jowidgets.cap.service.repository.tools.HashMapCrudRepository;
import org.jowidgets.common.color.ColorValue;
import org.jowidgets.common.types.Markup;
import org.jowidgets.samples.fatclient.sample3.books.bean.Book;
import org.jowidgets.samples.fatclient.sample3.books.repository.BookRepository;
import org.jowidgets.samples.fatclient.sample3.tags.bean.Tag;
public final class TagRepository {
public static final Tag MISSING = new Tag("Missing", new ColorValue(255, 0, 0), Markup.STRONG);
public static final Tag AVAILABLE = new Tag("Available", Colors.BLACK);
public static final Tag LENT = new Tag("Lent", new ColorValue(255, 128, 0));
public static final Tag LENDING_PERIOD_EXPIRED = new Tag("Lending period expired", new ColorValue(255, 128, 0), Markup.STRONG);
public static final ICrudSupportBeanRepository<Tag> INSTANCE = createInstance();
private TagRepository() {}
private static ICrudSupportBeanRepository<Tag> createInstance() {
return new HashMapCrudRepository<Tag>(Tag.class) {
{
add(AVAILABLE);
add(LENT);
add(LENDING_PERIOD_EXPIRED);
add(MISSING);
}
@Override
public Object getId(final Tag tag) {
return tag.getId();
}
@Override
public void delete(final Tag bean, final IExecutionCallback executionCallback) {
for (final Book book : BookRepository.INSTANCE.read()) {
if (bean != null && bean.equals(book.getTag())) {
book.setTag(null);
}
}
super.delete(bean, executionCallback);
}
};
};
}
|
[
"herr.grossmann@gmx.de"
] |
herr.grossmann@gmx.de
|
86210e17eeaf3b72ea4d9dc3e58e812c3e382c9c
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14475-5-26-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/job/AbstractJob_ESTest.java
|
4f925b00ef034497920b5555d4e9c6c0a38435b4
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 542
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Jan 19 13:50:40 UTC 2020
*/
package org.xwiki.job;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AbstractJob_ESTest extends AbstractJob_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
4ce5d96b3150e9667b7404bd93b5f78eb65807bc
|
40953aa2b935b66705457ba5078a6012e883d39a
|
/WYD-WorldServer/src/com/wyd/empire/world/server/service/base/impl/ChatRecordService.java
|
c1d93a21adb41bf0af1bc5fa49d8bd72e007239d
|
[] |
no_license
|
mestatrit/game
|
91f303ba2ff9d26bdf54cdcf8c99a0c158cdf184
|
e57b58aa5f282ed035664d08f6a5564161397029
|
refs/heads/master
| 2020-12-31T07:19:00.143960
| 2015-04-18T10:01:14
| 2015-04-18T10:01:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,665
|
java
|
package com.wyd.empire.world.server.service.base.impl;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.context.ApplicationContext;
import com.wyd.db.service.impl.UniversalManagerImpl;
import com.wyd.empire.world.bean.ChatRecord;
import com.wyd.empire.world.dao.IChatRecordDao;
import com.wyd.empire.world.server.service.base.IChatRecordService;
/**
* The service class for the TabChatRecord entity.
*/
public class ChatRecordService extends UniversalManagerImpl implements IChatRecordService {
/**
* The dao instance injected by Spring.
*/
private IChatRecordDao dao;
/**
* The service Spring bean id, used in the applicationContext.xml file.
*/
private static final String SERVICE_BEAN_ID = "ChatRecordService";
public ChatRecordService() {
super();
}
/**
* Returns the singleton <code>IChatRecordService</code> instance.
*/
public static IChatRecordService getInstance(ApplicationContext context) {
return (IChatRecordService) context.getBean(SERVICE_BEAN_ID);
}
/**
* Called by Spring using the injection rules specified in the Spring beans
* file "applicationContext.xml".
*/
public void setDao(IChatRecordDao dao) {
super.setDao(dao);
this.dao = dao;
}
public IChatRecordDao getDao() {
return this.dao;
}
/**
* ไฟๅญ่ๅคฉ่ฎฐๅฝ
*
* @param sendName
* @param reveName
* @param channel
* @param message
*/
public void saveChatLog(String sendName, String reveName, int channel, String message) {
ChatRecord chatRecord = new ChatRecord();
chatRecord.setSendName(sendName);
chatRecord.setReveName(reveName);
chatRecord.setChannel(channel);
chatRecord.setMessage(message);
chatRecord.setCreateTime(new Date());
this.dao.save(chatRecord);
}
/**
* ๆฅ่ฏข
*
* @param stime
* @param etime
* @param key
* @return
* @throws ParseException
*/
@SuppressWarnings("unchecked")
public List<ChatRecord> getChatRecord(String stime, String etime, String key) throws ParseException {
List<Object> p = new ArrayList<Object>();
String hql = "from ChatRecord where createTime between ? and ?";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
p.add(sdf.parse(stime));
p.add(sdf.parse(etime));
if (null != key && key.length() > 0) {
hql += " and ( sendName like ? or reveName like ? or message like ?)";
key = "%" + key + "%";
p.add(key);
p.add(key);
p.add(key);
}
return this.dao.getList(hql, p.toArray());
}
}
|
[
"huangwei2wei@126.com"
] |
huangwei2wei@126.com
|
105537eed1cb10e404222c6d53c3545f9f56daba
|
eb71e782cebec26969623bb5c3638d6f62516290
|
/src/com/rs/game/player/dialogues/InstanceDialogue.java
|
efd03143dc55c9d7ab591d50cca7452fa3a3bcf5
|
[] |
no_license
|
DukeCharles/revision-718-server
|
0fe7230a4c7da8de6f7de289ef1b4baec81fbd8b
|
cc69a0ab6e139d5cc7e2db9a73ec1eeaf76fd6e3
|
refs/heads/main
| 2023-06-25T05:50:04.376413
| 2021-07-25T19:38:35
| 2021-07-25T19:38:35
| 387,924,360
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,084
|
java
|
package com.rs.game.player.dialogues;
import com.rs.game.WorldTile;
/**
*
* @Author Tristam <Hassan>
* @Project - Rain
* @Date - 3 Mar 2016
*
**/
public class InstanceDialogue extends Dialogue {
@Override
public void start() {
sendOptions(TITLE, "Enter room", "Buy an instance");
stage = 1;
}
@Override
public void run(int interfaceId, int componentId) {
switch (stage) {
case END:
end();
break;
case 1:
switch (componentId) {
case OPTION_1:
player.setNextWorldTile(
player.getX() == 2863 ? new WorldTile(2864, 5354, 2) : new WorldTile(2863, 5354, 2));
end();
break;
case OPTION_2:
if (!player.hasMoney(10000000)) {
sendDialogue("You don't have enough money, you need 10m to buy an instance.");
stage = END;
} else {
end();
player.getMoneyPouch().removeMoneyMisc(10000000);
player.IsInInstance = true;
player.getControlerManager().startControler("Instance", player);
}
break;
}
break;
}
}
@Override
public void finish() {
// TODO Auto-generated method stub
}
}
|
[
"charles.simon.morin@gmail.com"
] |
charles.simon.morin@gmail.com
|
0f1f48843209c715f60a9c41d8abad2facc39c2e
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/79/1396.java
|
ea29372965bc7983f92bfdd92eff5b651e6550b4
|
[
"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
| 586
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int m;
int i;
int s = 0;
while (true)
{
s = 0;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
m = Integer.parseInt(tempVar2);
}
if (n == 0)
{
break;
}
if (n == 1)
{
System.out.print("1\n");
}
else
{
for (i = 2; i <= n; i++)
{
s = (s + m) % i;
}
System.out.printf("%d\n", s + 1);
}
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
5329c7fc7b4b4247ff9fd301cc589275de34d11d
|
3ad090a616c47ab5d679d9bcacdafbc74aaaca84
|
/spring-mvc-webapplicationinitializer/src/main/java/io/codefountain/spring/mvc/domain/Reservation.java
|
624c57b0157578c20052cd3ea525d67aa4ed868c
|
[] |
no_license
|
musibs/Spring
|
2a8610ba188e7278093e293e2e2d17523c3972ca
|
62be89e1c9b70ca6804f9ea91b54e03901a96aa2
|
refs/heads/master
| 2022-12-23T02:16:42.788016
| 2019-10-28T22:22:23
| 2019-10-28T22:22:23
| 190,841,709
| 10
| 10
| null | 2022-12-16T14:50:27
| 2019-06-08T03:40:12
|
Java
|
UTF-8
|
Java
| false
| false
| 947
|
java
|
package io.codefountain.spring.mvc.domain;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.ToString;
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Reservation {
private String courtName;
private Date date;
private int hour;
private Player player;
private SportType sportType;
public String getCourtName() {
return courtName;
}
public void setCourtName(String courtName) {
this.courtName = courtName;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public int getHour() {
return hour;
}
public void setHour(int hour) {
this.hour = hour;
}
public Player getPlayer() {
return player;
}
public void setPlayer(Player player) {
this.player = player;
}
public SportType getSportType() {
return sportType;
}
public void setSportType(SportType sportType) {
this.sportType = sportType;
}
}
|
[
"musib.somnath@gmail.com"
] |
musib.somnath@gmail.com
|
fa550922a4aae45a6afa8ad51e710fa27672ae95
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava6/Foo840.java
|
74f5b4fa5dc520f06a1cafafc3a761975a027585
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 575
|
java
|
package applicationModulepackageJava6;
public class Foo840 {
public void foo0() {
final Runnable anything0 = () -> System.out.println("anything");
new applicationModulepackageJava6.Foo839().foo9();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
public void foo9() {
foo8();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
7ad02418016a5553e185a57383017809a44f2187
|
6db0e350c1d7fe000e8e702edec2e964d4686807
|
/javafun-02-streams/src/come/tyro/javafun/results/GroupingDataWithCollectors.java
|
9142b9b947af37e132be5489bc968ae46a4010bd
|
[] |
no_license
|
chowow/java-8-lambdas-streams-demo
|
9693b1f639ccaf63717a37bda6035997cb04cde8
|
ffba1689d31db34806edbb970826e29e7456cab6
|
refs/heads/master
| 2022-01-10T19:20:45.412821
| 2019-05-27T22:13:30
| 2019-05-27T22:13:30
| 20,718,063
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,198
|
java
|
package come.tyro.javafun.results;
import com.tyro.javafun.Film;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import static com.tyro.javafun.FilmFactory.films;
import static java.lang.String.format;
public class GroupingDataWithCollectors {
private static final Function<String, Predicate<Film>> genre = g -> f -> f.getGenres().contains(g);
public static void main(String[] args) {
Map<Integer, List<Film>> worstHorrorFilms = films().stream()
.filter(genre.apply("Horror"))
.filter(f -> f.getRating() < 4)
.collect(Collectors.groupingBy(Film::getYear, TreeMap::new, Collectors.toList()));
// This is odd... collect returns a Map<Integer, List<Film>> without casting, yet if we inline
// the following it complains about types and seems to be using BiConsumer<Object, Object>.
// It will also refuse to allow us to cast the lambda parameter fl. Weird...
worstHorrorFilms.forEach((y, fl) -> System.out.println(format("%d [%d]: %s", y, fl.size(), fl)));
}
}
|
[
"="
] |
=
|
56cba5ae8c983abd3991949911f1cc9a008e4300
|
07f6a3a7141523ba3fa969d0768f3aac146a577c
|
/app/src/main/java/cn/vko/ring/im/main/helper/MessageHelper.java
|
9d08604a1300e629658cc8ca47a9f753d46df4ce
|
[] |
no_license
|
ShahbazExpress/VKO_AND
|
c2753c7614e846aeec53aeb85b9ca05358291eec
|
38a7f78ca29525a6b11c9c1f8cc0d771511b13c0
|
refs/heads/master
| 2021-12-16T12:13:53.676663
| 2017-09-19T06:09:52
| 2017-09-19T06:09:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,924
|
java
|
package cn.vko.ring.im.main.helper;
import android.text.TextUtils;
import com.netease.nim.uikit.cache.NimUserInfoCache;
import com.netease.nim.uikit.cache.TeamDataCache;
import com.netease.nimlib.sdk.friend.model.AddFriendNotify;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.constant.SystemMessageStatus;
import com.netease.nimlib.sdk.msg.constant.SystemMessageType;
import com.netease.nimlib.sdk.msg.model.SystemMessage;
import com.netease.nimlib.sdk.team.model.Team;
/**
* Created by huangjun on 2015/4/9.
*/
public class MessageHelper {
public static String getName(String account, SessionTypeEnum sessionType) {
if (sessionType == SessionTypeEnum.P2P) {
return NimUserInfoCache.getInstance().getUserDisplayName(account);
} else if (sessionType == SessionTypeEnum.Team) {
return TeamDataCache.getInstance().getTeamName(account);
}
return account;
}
public static String getVerifyNotificationText(SystemMessage message) {
StringBuilder sb = new StringBuilder();
String fromAccount = NimUserInfoCache.getInstance().getUserDisplayNameYou(message.getFromAccount());
Team team = TeamDataCache.getInstance().getTeamById(message.getTargetId());
if (team == null && message.getAttachObject() instanceof Team) {
team = (Team) message.getAttachObject();
}
String teamName = team == null ? message.getTargetId() : team.getName();
if (message.getType() == SystemMessageType.TeamInvite) {
sb.append("้่ฏท").append("ไฝ ").append("ๅ ๅ
ฅ็พค ").append(teamName);
} else if (message.getType() == SystemMessageType.DeclineTeamInvite) {
sb.append(fromAccount).append("ๆ็ปไบ็พค ").append(teamName).append(" ้่ฏท");
} else if (message.getType() == SystemMessageType.ApplyJoinTeam) {
sb.append("็ณ่ฏทๅ ๅ
ฅ็พค ").append(teamName);
} else if (message.getType() == SystemMessageType.RejectTeamApply) {
sb.append(fromAccount).append("ๆ็ปไบไฝ ๅ ๅ
ฅ็พค ").append(teamName).append("็็ณ่ฏท");
} else if (message.getType() == SystemMessageType.AddFriend) {
AddFriendNotify attachData = (AddFriendNotify) message.getAttachObject();
if (attachData != null) {
if (attachData.getEvent() == AddFriendNotify.Event.RECV_ADD_FRIEND_DIRECT) {
sb.append("ๅทฒๆทปๅ ไฝ ไธบๅฅฝๅ");
} else if (attachData.getEvent() == AddFriendNotify.Event.RECV_AGREE_ADD_FRIEND) {
sb.append("้่ฟไบไฝ ็ๅฅฝๅ่ฏทๆฑ");
} else if (attachData.getEvent() == AddFriendNotify.Event.RECV_REJECT_ADD_FRIEND) {
sb.append("ๆ็ปไบไฝ ็ๅฅฝๅ่ฏทๆฑ");
} else if (attachData.getEvent() == AddFriendNotify.Event.RECV_ADD_FRIEND_VERIFY_REQUEST) {
sb.append("่ฏทๆฑๆทปๅ ๅฅฝๅ" + (TextUtils.isEmpty(message.getContent()) ? "" : "๏ผ" + message.getContent()));
}
}
}
return sb.toString();
}
/**
* ๆฏๅฆ้ช่ฏๆถๆฏ้่ฆๅค็๏ผ้่ฆๆๅๆๆ็ป็ๆไฝๆ ๏ผ
*/
public static boolean isVerifyMessageNeedDeal(SystemMessage message) {
if (message.getType() == SystemMessageType.AddFriend) {
if (message.getAttachObject() != null) {
AddFriendNotify attachData = (AddFriendNotify) message.getAttachObject();
if (attachData.getEvent() == AddFriendNotify.Event.RECV_ADD_FRIEND_DIRECT ||
attachData.getEvent() == AddFriendNotify.Event.RECV_AGREE_ADD_FRIEND ||
attachData.getEvent() == AddFriendNotify.Event.RECV_REJECT_ADD_FRIEND) {
return false; // ๅฏนๆน็ดๆฅๅ ไฝ ไธบๅฅฝๅ๏ผๅฏนๆน้่ฟไฝ ็ๅฅฝๅ่ฏทๆฑ๏ผๅฏนๆนๆ็ปไฝ ็ๅฅฝๅ่ฏทๆฑ
} else if (attachData.getEvent() == AddFriendNotify.Event.RECV_ADD_FRIEND_VERIFY_REQUEST) {
return true; // ๅฅฝๅ้ช่ฏ่ฏทๆฑ
}
}
return false;
} else if (message.getType() == SystemMessageType.TeamInvite || message.getType() == SystemMessageType.ApplyJoinTeam) {
return true;
} else {
return false;
}
}
public static String getVerifyNotificationDealResult(SystemMessage message) {
if (message.getStatus() == SystemMessageStatus.passed) {
return "ๅทฒๅๆ";
} else if (message.getStatus() == SystemMessageStatus.declined) {
return "ๅทฒๆ็ป";
} else if (message.getStatus() == SystemMessageStatus.ignored) {
return "ๅทฒๅฟฝ็ฅ";
} else if (message.getStatus() == SystemMessageStatus.expired) {
return "ๅทฒ่ฟๆ";
} else {
return "ๆชๅค็";
}
}
}
|
[
"380712098@qq.com"
] |
380712098@qq.com
|
f3109083fc665e5fd8a449acff8e505f55daf0ff
|
ca376e37d2715686ff29ce66225516ee53333659
|
/services/hrdb/src/com/auto_erpixegykb/hrdb/controller/QueryExecutionController.java
|
38176790cec16104a7607b59e38202f74c23730e
|
[] |
no_license
|
wavemakerapps/Auto_eRPIxEgYkB
|
65bb084b96b04422eb80214bb2da59c7391bdabe
|
9f011fe380ed5b0ad1da806033be52df3b7bffbd
|
refs/heads/master
| 2020-03-19T10:38:57.222811
| 2018-06-06T21:46:58
| 2018-06-06T21:46:58
| 136,389,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 874
|
java
|
/*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved.
This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with wavemaker.com*/
package com.auto_erpixegykb.hrdb.controller;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wordnik.swagger.annotations.Api;
@RestController(value = "Hrdb.QueryExecutionController")
@RequestMapping("/hrdb/queryExecutor")
@Api(value = "QueryExecutionController", description = "controller class for query execution")
public class QueryExecutionController {
}
|
[
"automate1@wavemaker.com"
] |
automate1@wavemaker.com
|
f6ee2cba53dc348b3ac3ee66504f7e4c73521564
|
d82df7ef4b53d8700e82d132a62208899d6668ef
|
/attemper-executor/src/main/java/com/github/attemper/executor/camunda/cmd/ParentCmd.java
|
4d22fee010baba56392f3448f77f0ee6ce34352b
|
[
"MIT"
] |
permissive
|
attemper/attemper
|
b8a62cd2feae71ed5acdfa59f6c2a035a4b068d5
|
0ba921e2ca4024e5bd7f2cfcd5ae182693ca5b74
|
refs/heads/master
| 2023-08-11T11:51:28.839614
| 2022-08-16T14:00:44
| 2022-08-16T14:00:44
| 233,859,859
| 181
| 62
|
MIT
| 2023-07-23T02:46:47
| 2020-01-14T14:29:01
|
Java
|
UTF-8
|
Java
| false
| false
| 692
|
java
|
package com.github.attemper.executor.camunda.cmd;
import org.camunda.bpm.engine.impl.interceptor.Command;
import org.camunda.bpm.engine.impl.interceptor.CommandContext;
import org.springframework.jdbc.core.JdbcTemplate;
import java.sql.SQLException;
public abstract class ParentCmd implements Command<Void> {
protected JdbcTemplate injectJdbcTemplate(CommandContext commandContext) {
return new JdbcTemplate(commandContext.getProcessEngineConfiguration().getDataSource());
}
protected String getDbType(JdbcTemplate jdbcTemplate) throws SQLException {
return jdbcTemplate.getDataSource().getConnection().getMetaData().getDatabaseProductName().toLowerCase();
}
}
|
[
"820704815@qq.com"
] |
820704815@qq.com
|
67c76d7a7977030054879dcc6e9c3d38087314c2
|
a5935946bc84e85ffaa2faf9ee98db82d2cd0ebd
|
/src/main/java/br/com/josa/gameapi/repository/PlayerRepository.java
|
370574acb2b27af63e8a6b17799dafe4a88de659
|
[] |
no_license
|
JonatasBertolazzo/gameapi
|
13bbc669a6e24752c8056d800bb0e7b06d1032e5
|
6402653f6d5d3531a96839849996376eea0d7203
|
refs/heads/master
| 2021-01-16T17:57:41.548504
| 2017-08-11T12:38:43
| 2017-08-11T12:38:43
| 100,029,782
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 232
|
java
|
package br.com.josa.gameapi.repository;
import br.com.josa.gameapi.model.Player;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface PlayerRepository extends MongoRepository<Player, String> {
}
|
[
"logonrm@fiap.com.br"
] |
logonrm@fiap.com.br
|
34cbc0e515fca3be2c215e4409a7056d80135206
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_f6204a887f67f4edc91769329ab1f27389626c26/MobilityInterfaceService/17_f6204a887f67f4edc91769329ab1f27389626c26_MobilityInterfaceService_t.java
|
70f16bed1e99d1e6b3d43de5db0d13c7af366458
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,477
|
java
|
package edu.ucla.cens.mobility.glue;
import edu.ucla.cens.mobility.Mobility;
import edu.ucla.cens.mobility.MobilityControl;
import edu.ucla.cens.systemlog.Log;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.IBinder;
public class MobilityInterfaceService extends Service
{
protected static final String TAG = "Mobility";
@Override
public IBinder onBind(Intent intent) {
Mobility.initSystemLog(getApplicationContext());
return new IMobility.Stub() {
public void stopMobility()
{
SharedPreferences settings = getSharedPreferences(Mobility.MOBILITY, Context.MODE_PRIVATE);
if (settings.getBoolean(MobilityControl.MOBILITY_ON, false))
{
Editor editor = settings.edit();
editor.putBoolean(MobilityControl.MOBILITY_ON, false);
editor.commit();
Log.e(TAG, "MOBILITY_ON was just totally set to false");
Mobility.stop(getApplicationContext());
}
else
{
Log.e(TAG, "Mobility is already off according to settings");
}
}
public void startMobility()
{
Log.e(TAG, "I got called!");
SharedPreferences settings = getSharedPreferences(Mobility.MOBILITY, Context.MODE_PRIVATE);
if (!settings.getBoolean(MobilityControl.MOBILITY_ON, false))
{
Editor editor = settings.edit();
editor.putBoolean(MobilityControl.MOBILITY_ON, true);
editor.commit();
Log.e(TAG, "MOBILITY_ON was just totally set to true");
Mobility.start(getApplicationContext());
}
else
{
Log.e(TAG, "Mobility is already on according to settings");
}
Log.e(TAG, "MOBILITY_ON was just totally set to true unless it was already");
}
/**
* Set the rate in seconds to 300, 60, 30, or 15.
* @param context
* @param intervalInSeconds This must be 300, 60, 30, or 15.
* @return true if successful, false otherwise
*/
public boolean changeMobilityRate(int intervalInSeconds)
{
for (int rate : new int [] {300, 60, 30, 15})
if (intervalInSeconds == rate)
{
SharedPreferences settings = getSharedPreferences(Mobility.MOBILITY, Context.MODE_PRIVATE);
Editor editor = settings.edit();
editor.putInt(Mobility.SAMPLE_RATE, intervalInSeconds);
editor.commit();
if (settings.getBoolean(MobilityControl.MOBILITY_ON, false))
{
stopMobility();
startMobility();
}
return true;
}
return false;
}
public boolean isMobilityOn()
{
SharedPreferences settings = getSharedPreferences(Mobility.MOBILITY, Context.MODE_PRIVATE);
return settings.getBoolean(MobilityControl.MOBILITY_ON, false);
}
public int getMobilityInterval()
{
SharedPreferences settings = getSharedPreferences(Mobility.MOBILITY, Context.MODE_PRIVATE);
return settings.getInt(Mobility.SAMPLE_RATE, 60);
}
};
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a2cbb150491fd8f855a13e1922a76eb562152379
|
4d6f449339b36b8d4c25d8772212bf6cd339f087
|
/netreflected/src/Core/System.Data.Common,Version=4.2.2.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a/system/data/IsolationLevel.java
|
0ffd407b02e59f2b6390b91d216d2bd1ffd7f383
|
[
"MIT"
] |
permissive
|
lvyitian/JCOReflector
|
299a64550394db3e663567efc6e1996754f6946e
|
7e420dca504090b817c2fe208e4649804df1c3e1
|
refs/heads/master
| 2022-12-07T21:13:06.208025
| 2020-08-28T09:49:29
| 2020-08-28T09:49:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,065
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**************************************************************************************
* <auto-generated>
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
* </auto-generated>
*************************************************************************************/
package system.data;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
// Import section
// PACKAGE_IMPORT_SECTION
/**
* The base .NET class managing System.Data.IsolationLevel, System.Data.Common, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Extends {@link NetObject}.
* <p>
*
* See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Data.IsolationLevel" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Data.IsolationLevel</a>
*/
public class IsolationLevel extends NetObject {
/**
* Fully assembly qualified name: System.Data.Common, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
*/
public static final String assemblyFullName = "System.Data.Common, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
/**
* Assembly name: System.Data.Common
*/
public static final String assemblyShortName = "System.Data.Common";
/**
* Qualified class name: System.Data.IsolationLevel
*/
public static final String className = "System.Data.IsolationLevel";
static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName);
/**
* The type managed from JCOBridge. See {@link JCType}
*/
public static JCType classType = createType();
static JCEnum enumReflected = createEnum();
JCEnum classInstance = null;
static JCType createType() {
try {
return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
} catch (JCException e) {
return null;
}
}
static JCEnum createEnum() {
try {
return bridge.GetEnum(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
} catch (JCException e) {
return null;
}
}
void addReference(String ref) throws Throwable {
try {
bridge.AddReference(ref);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IsolationLevel(Object instance) {
super(instance);
if (instance instanceof JCObject) {
try {
String enumName = NetEnum.GetName(classType, (JCObject)instance);
classInstance = enumReflected.fromValue(enumName);
} catch (Throwable t) {
if (JCOBridgeInstance.getDebug())
t.printStackTrace();
classInstance = enumReflected;
}
} else if (instance instanceof JCEnum) {
classInstance = (JCEnum)instance;
}
}
public IsolationLevel() {
super();
// add reference to assemblyName.dll file
try {
addReference(JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
} catch (Throwable jcne) {
if (JCOBridgeInstance.getDebug())
jcne.printStackTrace();
}
}
public String getJCOAssemblyName() {
return assemblyFullName;
}
public String getJCOClassName() {
return className;
}
public String getJCOObjectName() {
return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
}
public Object getJCOInstance() {
return classInstance;
}
public JCType getJCOType() {
return classType;
}
final static IsolationLevel getFrom(JCEnum object, String value) {
try {
return new IsolationLevel(object.fromValue(value));
} catch (JCException e) {
return new IsolationLevel(object);
}
}
// Enum fields section
public static IsolationLevel Chaos = getFrom(enumReflected, "Chaos");
public static IsolationLevel ReadUncommitted = getFrom(enumReflected, "ReadUncommitted");
public static IsolationLevel ReadCommitted = getFrom(enumReflected, "ReadCommitted");
public static IsolationLevel RepeatableRead = getFrom(enumReflected, "RepeatableRead");
public static IsolationLevel Serializable = getFrom(enumReflected, "Serializable");
public static IsolationLevel Snapshot = getFrom(enumReflected, "Snapshot");
public static IsolationLevel Unspecified = getFrom(enumReflected, "Unspecified");
// Flags management section
}
|
[
"mario.mastrodicasa@masesgroup.com"
] |
mario.mastrodicasa@masesgroup.com
|
54bcbd5eaa3dc4109acf4d113c6a8891d4e064e8
|
0d65b964b7953a9138943f1280e303bba64307af
|
/kitty-dynamic-thread-pool/src/main/java/com/cxytiandi/kitty/threadpool/alarm/DynamicThreadPoolAlarm.java
|
851b7bc564ee169c5d463d984b2d9d8c7890ab6e
|
[] |
no_license
|
ylwb/kitty
|
7053b7fd89dbb7a307b3fc012503035d04f2c666
|
97dfcc48ffa3e9e9052cc48e530172d23f9cfb18
|
refs/heads/master
| 2023-04-02T14:47:02.733323
| 2020-12-28T09:19:27
| 2020-12-28T09:19:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,495
|
java
|
package com.cxytiandi.kitty.threadpool.alarm;
import com.cxytiandi.kitty.common.alarm.AlarmManager;
import com.cxytiandi.kitty.common.alarm.AlarmMessage;
import com.cxytiandi.kitty.common.alarm.AlarmTypeEnum;
import com.cxytiandi.kitty.common.json.JsonUtils;
import com.cxytiandi.kitty.threadpool.DynamicThreadPoolManager;
import com.cxytiandi.kitty.threadpool.KittyThreadPoolExecutor;
import com.cxytiandi.kitty.threadpool.config.DynamicThreadPoolProperties;
import com.cxytiandi.kitty.threadpool.config.ThreadPoolProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import javax.annotation.PostConstruct;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
/**
* ็บฟ็จๆฑ ๅ่ญฆ
*
* @ไฝ่
ๅฐนๅๆฌข
* @ไธชไบบๅพฎไฟก jihuan900
* @ๅพฎไฟกๅ
ฌไผๅท ็ฟๅคฉๅฐ
* @GitHub https://github.com/yinjihuan
* @ไฝ่
ไป็ป http://cxytiandi.com/about
* @ๆถ้ด 2020-05-26 21:44
*/
public class DynamicThreadPoolAlarm {
@Autowired
private DynamicThreadPoolManager dynamicThreadPoolManager;
@Autowired
private DynamicThreadPoolProperties dynamicThreadPoolProperties;
@Autowired(required = false)
private ThreadPoolAlarmNotify threadPoolAlarmNotify;
/**
* ๅบ็จๅ็งฐ๏ผๅ่ญฆ็จๅฐ
*/
@Value("${spring.application.name:unknown}")
private String applicationName;
/**
* ๆฏๅฆไฝฟ็จ้ป่ฎคๅ่ญฆ
*/
@Value("${kitty.threadpools.alarm.default:true}")
private boolean useDefaultAlarm;
@PostConstruct
public void init() {
new Thread(() -> {
while (true) {
dynamicThreadPoolProperties.getExecutors().stream().forEach(prop -> {
String threadPoolName = prop.getThreadPoolName();
KittyThreadPoolExecutor threadPoolExecutor = dynamicThreadPoolManager.getThreadPoolExecutor(threadPoolName);
dynamicThreadPoolManager.registerStatusExtension(prop, threadPoolExecutor);
int queueCapacityThreshold = prop.getQueueCapacityThreshold();
int taskCount = threadPoolExecutor.getQueue().size();
if (taskCount > queueCapacityThreshold) {
sendQueueCapacityThresholdAlarmMessage(prop, taskCount);
}
AtomicLong rejectCount = dynamicThreadPoolManager.getRejectCount(threadPoolName);
if (rejectCount != null && rejectCount.get() > 0) {
sendRejectAlarmMessage(rejectCount.get(), prop);
// ๆธ
็ฉบๆ็ปๆฐๆฎ
dynamicThreadPoolManager.clearRejectCount(threadPoolName);
}
});
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}).start();
}
private void sendRejectAlarmMessage(long rejectCount, ThreadPoolProperties prop) {
AlarmMessage alarmMessage = AlarmMessage.builder()
.alarmName("rejectCount")
.alarmType(getAlarmType())
.apiUrl(dynamicThreadPoolProperties.getAlarmApiUrl())
.message(getRejectCountMessage(rejectCount, prop))
.accessToken(dynamicThreadPoolProperties.getAccessToken())
.secret(dynamicThreadPoolProperties.getSecret())
.alarmTimeInterval(dynamicThreadPoolProperties.getAlarmTimeInterval())
.build();
if (useDefaultAlarm) {
AlarmManager.sendAlarmMessage(alarmMessage);
}
alarmNotify(alarmMessage);
}
private void sendQueueCapacityThresholdAlarmMessage(ThreadPoolProperties prop, int taskCount) {
AlarmMessage alarmMessage = AlarmMessage.builder()
.alarmName("queueCapacityThreshold")
.alarmType(getAlarmType())
.apiUrl(dynamicThreadPoolProperties.getAlarmApiUrl())
.message(getQueueCapacityThresholdMessage(prop, taskCount))
.accessToken(dynamicThreadPoolProperties.getAccessToken())
.secret(dynamicThreadPoolProperties.getSecret())
.alarmTimeInterval(dynamicThreadPoolProperties.getAlarmTimeInterval())
.build();
if (useDefaultAlarm) {
AlarmManager.sendAlarmMessage(alarmMessage);
}
alarmNotify(alarmMessage);
}
private void alarmNotify(AlarmMessage alarmMessage) {
if (threadPoolAlarmNotify != null) {
threadPoolAlarmNotify.alarmNotify(alarmMessage);
}
}
private String getQueueCapacityThresholdMessage(ThreadPoolProperties prop, int taskCount) {
return getAlarmMessage("็บฟ็จๆฑ ๅบ็ฐไปปๅกๅ ็งฏๆ
ๅต,้ๅๅฎน้:" + prop.getQueueCapacity() + ",็ญๅพ
ๆง่กไปปๅกๆฐ้:" + taskCount , prop);
}
private String getRejectCountMessage(long rejectCount, ThreadPoolProperties prop) {
return getAlarmMessage("็บฟ็จๆฑ ไธญๅบ็ฐRejectedExecutionExceptionๅผๅธธ" + rejectCount + "ๆฌก", prop);
}
private String getAlarmMessage(String reason, ThreadPoolProperties prop) {
StringBuilder content = new StringBuilder();
content.append("ๅ่ญฆๅบ็จ:").append(applicationName).append("\n");
content.append("็บฟ็จๆฑ ๅ็งฐ:").append(prop.getThreadPoolName()).append("\n");
content.append("ๅ่ญฆๅๅ :").append(reason).append("\n");
content.append("ๅๆฐไฟกๆฏ:").append(formatThreadPoolParam(prop));
content.append("ไธๅก่ด่ดฃไบบ:").append(dynamicThreadPoolProperties.getOwner()).append("\n");
content.append("ๅ่ญฆ้ด้:").append(dynamicThreadPoolProperties.getAlarmTimeInterval()).append("ๅ้\n");
return content.toString();
}
private String formatThreadPoolParam(ThreadPoolProperties prop) {
StringBuilder content = new StringBuilder("\n");
Map map = JsonUtils.toBean(Map.class, JsonUtils.toJson(prop));
map.forEach((k,v) -> {
content.append(k).append(":").append(v).append("\n");
});
return content.toString();
}
private AlarmTypeEnum getAlarmType() {
return StringUtils.hasText(dynamicThreadPoolProperties.getAlarmApiUrl()) ? AlarmTypeEnum.EXTERNAL_SYSTEM : AlarmTypeEnum.DING_TALK;
}
}
|
[
"jihuan.yin@ipiaoniu.com"
] |
jihuan.yin@ipiaoniu.com
|
829fe002adc60d1d54192cf0a58cd9cc73cccce4
|
41a5ce39648523be781f35cdc5b69f93d57829a5
|
/src/main/java/org/webguitoolkit/ui/controls/form/CheckBox.java
|
fd015124d990b3ccc7d1a9f4b7f1de9cd38efeab
|
[
"Apache-2.0"
] |
permissive
|
webguitoolkit/wgt-ui
|
455dd35bbfcb6835e3834a4537e3ffc668f15389
|
747530b462e9377a0ece473b97ce2914fb060cb5
|
refs/heads/master
| 2020-04-06T05:46:43.511525
| 2012-03-02T08:40:44
| 2012-03-02T08:40:44
| 1,516,251
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,723
|
java
|
/*
Copyright 2008 Endress+Hauser Infoserve GmbH&Co KG
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.webguitoolkit.ui.controls.form;
import java.io.PrintWriter;
import org.apache.commons.lang.StringUtils;
import org.apache.ecs.html.Input;
import org.apache.ecs.html.Span;
import org.webguitoolkit.ui.ajax.ContextElement;
import org.webguitoolkit.ui.ajax.IContext;
import org.webguitoolkit.ui.controls.event.ClientEvent;
import org.webguitoolkit.ui.controls.util.JSUtil;
/**
* <pre>
* CheckBox control:
*
* // create CheckBox
* CheckBox checkbox = factory.newCheckBox( parent, "isSelected" );
* checkbox.setSelected( true );
*
* </pre>
*/
public class CheckBox extends OptionControl implements ICheckBox {
// indicates it the event bubbles upwards in the DOM tree
private boolean eventBubble = true;
/**
* @see org.webguitoolkit.ui.controls.BaseControl#BaseControl()
*/
public CheckBox() {
super();
setCssClass("wgtInputCheckbox");
}
/**
* @see org.webguitoolkit.ui.controls.BaseControl#BaseControl(String)
* @param id unique HTML id
*/
public CheckBox(String id) {
super(id);
setCssClass("wgtInputCheckbox");
}
/**
* generating HTML for CheckBox
*/
protected void endHTML(PrintWriter out) {
Input input = new Input();
input.setType( "checkbox" );
if( StringUtils.isNotBlank(getLabel()) )
getStyle().add("float", "left");
stdParameter( input);
if (hasActionListener()) {
if( eventBubble )
input.setOnClick( JSUtil.jsFireEvent(getId(), ClientEvent.TYPE_ACTION ));
else
input.setOnClick( JSUtil.jsFireEvent(getId(), ClientEvent.TYPE_ACTION)+";stopEvent(event);" );
}
//add tabindex to html element if the tabindex is greater than 0
if(tabindex >= 0){
input.addAttribute(TABINDEX, Integer.valueOf(tabindex).toString());
}
input.setChecked( getContext().processBool(getId()) );
// eating the read only settings
ContextElement ce = getContext().processContextElement( getId() + DOT_RO);
boolean ro = ce != null && IContext.TYPE_READONLY.equals( ce.getType() );
input.setDisabled( ro );
Span surroundigSpan = new Span();
surroundigSpan.setID(getId()+"_ss");
surroundigSpan.addElement(input);
surroundigSpan.output(out);
//input.output(out);
makeLabel( out );
}
/**
* set the event bubbling to false to avoid the bubbling of the event in the DOM tree,
* useful for tables where you don't want to select the row when clicking the CheckBox
*
* @param eventBubble false to stop event bubbling
*/
public void setEventBubbling(boolean eventBubble){
this.eventBubble = eventBubble;
}
public void clearError() {
if (getContext().getValue(getId() + "_ss.addClass") != null && getContext().getValue(getId() + "_ss.addClass").equals(ERROR_STYLE_CLASS))
getContext().removeClass(getId(), getContext().processValue(getId() + "_ss.addClass"));
}
public void showError() {
getContext().addClass(getId()+"_ss", FormControl.ERROR_STYLE_CLASS);
}
}
|
[
"peter@17sprints.de"
] |
peter@17sprints.de
|
c53cb6a4f403985c28305772496fe27508b905b7
|
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
|
/subject SPLs and test cases/BerkeleyDB(5)/BerkeleyDB_P5/evosuite-tests1/com/sleepycat/je/util/DbRunAction_ESTest_scaffolding1.java
|
0a6570ff610ee469629b184652652b47f3dc2bf1
|
[] |
no_license
|
psjung/SRTST_experiments
|
6f1ff67121ef43c00c01c9f48ce34f31724676b6
|
40961cb4b4a1e968d1e0857262df36832efb4910
|
refs/heads/master
| 2021-06-20T04:45:54.440905
| 2019-09-06T04:05:38
| 2019-09-06T04:05:38
| 206,693,757
| 1
| 0
| null | 2020-10-13T15:50:41
| 2019-09-06T02:10:06
|
Java
|
UTF-8
|
Java
| false
| false
| 2,303
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 21 21:24:36 KST 2017
*/
package com.sleepycat.je.util;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@EvoSuiteClassExclude
public class DbRunAction_ESTest_scaffolding1 {
@org.junit.Rule
public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(4000);
protected static ExecutorService executor;
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.sleepycat.je.util.DbRunAction";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
executor = Executors.newCachedThreadPool();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
executor.shutdownNow();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
}
|
[
"psjung@kaist.ac.kr"
] |
psjung@kaist.ac.kr
|
bede0ae91ea9edc72d7a033602dd479d99bc6670
|
aaac30301a5b18e8b930d9932a5e11d514924c7e
|
/framework/ssmjavaconfig/src/main/java/me/maiz/trainning/framework/ssmjavaconfig/dao/ProductMapper.java
|
1506b4910c8070b8613ed281b1fa81a398df8cf2
|
[] |
no_license
|
stickgoal/trainning
|
9206e30fc0b17c817c5826a6e212ad25a3b9d8a6
|
58348f8a3d21e91cad54d0084078129e788ea1f4
|
refs/heads/master
| 2023-03-14T12:29:11.508957
| 2022-12-01T09:17:50
| 2022-12-01T09:17:50
| 91,793,279
| 1
| 0
| null | 2023-02-22T06:55:38
| 2017-05-19T10:06:01
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,029
|
java
|
package me.maiz.trainning.framework.ssmjavaconfig.dao;
import java.util.List;
import me.maiz.trainning.framework.ssmjavaconfig.entity.Product;
import me.maiz.trainning.framework.ssmjavaconfig.entity.ProductExample;
import org.apache.ibatis.annotations.Param;
public interface ProductMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
long countByExample(ProductExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
int deleteByExample(ProductExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
int deleteByPrimaryKey(Integer productId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
int insert(Product record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
int insertSelective(Product record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
List<Product> selectByExample(ProductExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
Product selectByPrimaryKey(Integer productId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
int updateByExample(@Param("record") Product record, @Param("example") ProductExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
int updateByPrimaryKeySelective(Product record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table product
*
* @mbg.generated Thu Nov 07 20:07:03 CST 2019
*/
int updateByPrimaryKey(Product record);
}
|
[
"stick.goal@163.com"
] |
stick.goal@163.com
|
e7c817c6206887185c5dbf026332bf4f568c61ed
|
127b9612a1e0646a90cd96391dcde6f53c820919
|
/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java
|
57bcea24a47422108acacb76aabf1e4b7885dc7d
|
[
"Apache-2.0"
] |
permissive
|
Metaswitch/swagger-codegen
|
bbbcb7f248ed8a484ab5a69a4baaa4d999295700
|
2e5289c4d74eafd48e3a324ccdd9e39323b5fb06
|
refs/heads/master
| 2021-09-14T18:49:40.690702
| 2017-10-05T15:07:53
| 2017-10-05T15:07:53
| 105,641,359
| 4
| 2
| null | 2017-10-18T07:59:49
| 2017-10-03T10:55:27
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,364
|
java
|
package io.swagger.model;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
public class Client {
private @Valid String client = null;
/**
**/
public Client client(String client) {
this.client = client;
return this;
}
@ApiModelProperty(value = "")
public String getClient() {
return client;
}
public void setClient(String client) {
this.client = client;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Client client = (Client) o;
return Objects.equals(client, client.client);
}
@Override
public int hashCode() {
return Objects.hash(client);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Client {\n");
sb.append(" client: ").append(toIndentedString(client)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"wing328hk@gmail.com"
] |
wing328hk@gmail.com
|
878c65a763ee8996464a05b6dedf6277a2c4bc2e
|
3735a07d455d7b40613c3c4160aa8b1cb1b3472a
|
/platform/lang-impl/src/com/intellij/largeFilesEditor/search/actions/StopRangeSearchAction.java
|
df8181ff160c9a0e38b276928479d4a5dca3b192
|
[
"Apache-2.0"
] |
permissive
|
caofanCPU/intellij-community
|
ede9417fc4ccb4b5efefb099906e4abe6871f3b4
|
5ad3e2bdf3c83d86e7c4396f5671929768d76999
|
refs/heads/master
| 2023-02-27T21:38:33.416107
| 2021-02-05T06:37:40
| 2021-02-05T06:37:40
| 321,209,485
| 1
| 0
|
Apache-2.0
| 2021-02-05T06:37:41
| 2020-12-14T02:22:32
| null |
UTF-8
|
Java
| false
| false
| 1,491
|
java
|
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.largeFilesEditor.search.actions;
import com.intellij.icons.AllIcons;
import com.intellij.largeFilesEditor.search.searchResultsPanel.RangeSearch;
import com.intellij.largeFilesEditor.search.searchTask.RangeSearchTask;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.editor.EditorBundle;
import com.intellij.openapi.project.DumbAware;
import org.jetbrains.annotations.NotNull;
public class StopRangeSearchAction extends AnAction implements DumbAware {
private final RangeSearch myRangeSearch;
public StopRangeSearchAction(@NotNull RangeSearch rangeSearch) {
this.myRangeSearch = rangeSearch;
getTemplatePresentation().setText(EditorBundle.messagePointer("large.file.editor.stop.searching.action.text"));
getTemplatePresentation().setIcon(AllIcons.Actions.Suspend);
}
@Override
public void update(@NotNull AnActionEvent e) {
RangeSearchTask task = myRangeSearch.getLastExecutedRangeSearchTask();
e.getPresentation().setEnabled(
task != null && !task.isFinished() && !task.isShouldStop()
);
}
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
RangeSearchTask task = myRangeSearch.getLastExecutedRangeSearchTask();
if (task != null) {
task.shouldStop();
}
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
b1c5a2718f351c7c2d520500e03c644a6465fb5f
|
ae64a6a2ef2ec228dc00fb3c545d17fe0d01b596
|
/android/support/v4/p001b/C0043c.java
|
21716a844abc925a0f4d22d62ee191bbd8f6d196
|
[] |
no_license
|
Ravinther/Createnotes
|
1ed5a2a5d8825e2482b17754b152c9a646631a9c
|
2179f634acb5f00402806a672778b52f7508295b
|
refs/heads/master
| 2021-01-20T19:53:12.160695
| 2016-08-15T15:56:32
| 2016-08-15T15:56:32
| 65,744,902
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 219
|
java
|
package android.support.v4.p001b;
import android.os.Parcel;
/* renamed from: android.support.v4.b.c */
public interface C0043c {
Object m220a(Parcel parcel, ClassLoader classLoader);
Object[] m221a(int i);
}
|
[
"m.ravinther@yahoo.com"
] |
m.ravinther@yahoo.com
|
fc122e940ca8644e6a21920d8d5e751f9562c5e0
|
69c1256baec48b66365b5ec8faec5d6318b0eb21
|
/Mage.Sets/src/mage/sets/magic2014/MindRot.java
|
3d89e0ac24f7e0c211ddfdfbabe59e850e4f6bfd
|
[] |
no_license
|
gbraad/mage
|
3b84eefe4845258f6250a7ff692e1f2939864355
|
18ce6a0305db6ebc0d34054af03fdb0ba88b5a3b
|
refs/heads/master
| 2022-09-28T17:31:38.653921
| 2015-04-04T22:28:22
| 2015-04-04T22:28:22
| 33,435,029
| 1
| 0
| null | 2022-09-01T23:39:50
| 2015-04-05T08:25:58
|
Java
|
UTF-8
|
Java
| false
| false
| 2,132
|
java
|
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.magic2014;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class MindRot extends mage.sets.tenth.MindRot {
public MindRot(UUID ownerId) {
super(ownerId);
this.cardNumber = 106;
this.expansionSetCode = "M14";
}
public MindRot(final MindRot card) {
super(card);
}
@Override
public MindRot copy() {
return new MindRot(this);
}
}
|
[
"ludwig.hirth@online.de"
] |
ludwig.hirth@online.de
|
3b05fb648a9e13c4fedd6108e28dcabdbf5d823b
|
056ff5f928aec62606f95a6f90c2865dc126bddc
|
/javashop/shop-core/src/main/java/com/enation/app/shop/component/payment/plugin/alipay/sdk34/api/domain/AlipayOfflineMarketReportGetModel.java
|
ffb67e805e64379012004c023c52b47cde9315cf
|
[] |
no_license
|
luobintianya/javashop
|
7846c7f1037652dbfdd57e24ae2c38237feb1104
|
ac15b14e8f6511afba93af60e8878ff44e380621
|
refs/heads/master
| 2022-11-17T11:12:39.060690
| 2019-09-04T08:57:58
| 2019-09-04T08:57:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,170
|
java
|
package com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.domain;
import com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.AlipayObject;
import com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.internal.mapping.ApiField;
/**
* ่ทๅๅบ้บไฟกๆฏ
*
* @author auto create
* @since 1.0, 2015-12-17 10:04:22
*/
public class AlipayOfflineMarketReportGetModel extends AlipayObject {
private static final long serialVersionUID = 8746896377618331274L;
/**
* ๆไฝไบบPID
*/
@ApiField("ope_pid")
private String opePid;
/**
* ๅ
จๅฑๅฏไธ็ๆตๆฐดๅท
*/
@ApiField("request_id")
private String requestId;
/**
* ้จๅบid
*/
@ApiField("shop_id")
private String shopId;
public String getOpePid() {
return this.opePid;
}
public void setOpePid(String opePid) {
this.opePid = opePid;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getShopId() {
return this.shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
}
|
[
"sylow@javashop.cn"
] |
sylow@javashop.cn
|
3ba928069fff00b866b7db896329698a0dd52881
|
b85d0ce8280cff639a80de8bf35e2ad110ac7e16
|
/com/fossil/csh.java
|
07bc954fdcfd59202a42fb891edfb42b3f8bed2b
|
[] |
no_license
|
MathiasMonstrey/fosil_decompiled
|
3d90433663db67efdc93775145afc0f4a3dd150c
|
667c5eea80c829164220222e8fa64bf7185c9aae
|
refs/heads/master
| 2020-03-19T12:18:30.615455
| 2018-06-07T17:26:09
| 2018-06-07T17:26:09
| 136,509,743
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,280
|
java
|
package com.fossil;
import android.content.Context;
import com.misfit.frameworks.common.enums.HTTPMethod;
import com.misfit.frameworks.common.log.MFLogger;
import com.misfit.frameworks.network.configuration.MFConfiguration;
import com.misfit.frameworks.network.request.MFBaseRequest;
import com.misfit.frameworks.network.responses.MFResponse;
import com.portfolio.platform.data.model.microapp.SavedPreset;
import com.portfolio.platform.response.microapp.MFUpsertPresetResponse;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONObject;
public class csh extends MFBaseRequest {
private static final String TAG = csh.class.getSimpleName();
private List<SavedPreset> cCm;
public csh(Context context, List<SavedPreset> list) {
super(context);
if (this.cCm == null) {
this.cCm = new ArrayList();
}
this.cCm.addAll(list);
}
protected Object initJsonData() {
JSONObject jSONObject = new JSONObject();
JSONArray jSONArray = new JSONArray();
for (SavedPreset savedPreset : this.cCm) {
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("createAt", savedPreset.getCreateAt());
jSONObject2.put("updatedAt", savedPreset.getUpdateAt());
jSONObject2.put("id", savedPreset.getId());
jSONObject2.put("name", savedPreset.getName());
jSONObject2.put("buttons", new JSONArray(savedPreset.getButtons()));
} catch (Exception e) {
e.printStackTrace();
}
jSONArray.put(jSONObject2);
MFLogger.m12670d(TAG, "initJsonData - json: " + jSONObject);
}
try {
jSONObject.put("_items", jSONArray);
} catch (Exception e2) {
e2.printStackTrace();
}
return jSONObject;
}
protected HTTPMethod initHttpMethod() {
return HTTPMethod.PATCH;
}
protected MFResponse initResponse() {
return new MFUpsertPresetResponse();
}
protected MFConfiguration initConfiguration() {
return dqn.bK(this.context);
}
protected String initApiMethod() {
return "/user-presets";
}
}
|
[
"me@mathiasmonstrey.be"
] |
me@mathiasmonstrey.be
|
595050944ff0f1f1a529c256cbf2d3c5c2eb4fbf
|
f8426d9766cddc2b6be389add73386a5d9b05e5a
|
/fluentlenium-core/src/main/java/org/fluentlenium/core/label/FluentLabel.java
|
0682bb9dfa6c2cbd652144f71dbd006348d53565
|
[
"Apache-2.0"
] |
permissive
|
wenceslas/FluentLenium
|
1876cce26cefaa3ef6c1b1342fa414b041ce7b5a
|
098586dc06af0ba86bcc0d9f1ce95b598a01f2c5
|
refs/heads/master
| 2022-12-05T16:15:20.964069
| 2020-08-14T13:45:44
| 2020-08-14T13:45:44
| 285,835,407
| 0
| 0
|
NOASSERTION
| 2020-08-07T13:26:57
| 2020-08-07T13:26:57
| null |
UTF-8
|
Java
| false
| false
| 691
|
java
|
package org.fluentlenium.core.label;
/**
* Apply label and label hints to element.
*
* @param <T> {@code this} class to chain method calls
*/
public interface FluentLabel<T> {
/**
* Apply a label that will be displayed as the representation of this object for error message.
*
* @param label label to use
* @return reference to this object to chain calls
*/
T withLabel(String label);
/**
* Add a label hint that will be appended to the representation of this object for error message.
*
* @param labelHint label hints to add
* @return reference to this object to chain calls
*/
T withLabelHint(String... labelHint);
}
|
[
"toilal.dev@gmail.com"
] |
toilal.dev@gmail.com
|
eaa05910b8a570701f5dd6b0513bea21524c0493
|
c47c33cd3369546330e98a00bf533bf723e91590
|
/src/main/java/mcjty/questutils/blocks/itemcomparator/ItemComparatorContainer.java
|
c57ee982c3dc8affcdfeb5c2c4177cd25d8e60c9
|
[
"MIT"
] |
permissive
|
McJtyMods/QuestUtils
|
569910eae7972d8b5d2c632519ec5ebcf8093a03
|
bdfcc939169864c94a46aa9e0567e4d59b6f1186
|
refs/heads/master
| 2021-04-15T09:44:51.151943
| 2019-04-26T13:24:42
| 2019-04-26T13:24:42
| 126,376,457
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,192
|
java
|
package mcjty.questutils.blocks.itemcomparator;
import mcjty.lib.container.*;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ItemComparatorContainer extends GenericContainer {
public static final String CONTAINER_INVENTORY = "container";
public static final int SLOT_MATCHER = 0;
public static final int SLOT_INPUT = 4*4;
public static final ContainerFactory factory = new ContainerFactory() {
@Override
protected void setup() {
addSlotBox(new SlotDefinition(SlotType.SLOT_CONTAINER), CONTAINER_INVENTORY, SLOT_MATCHER, 12, 37, 4, 18, 4, 18);
addSlotBox(new SlotDefinition(SlotType.SLOT_CONTAINER), CONTAINER_INVENTORY, SLOT_INPUT, 102, 37, 4, 18, 4, 18);
layoutPlayerInventorySlots(12, 142);
}
};
public ItemComparatorContainer(EntityPlayer player, IInventory containerInventory) {
super(factory);
addInventory(CONTAINER_INVENTORY, containerInventory);
addInventory(ContainerFactory.CONTAINER_PLAYER, player.inventory);
generateSlots();
}
@Override
protected Slot createSlot(SlotFactory slotFactory, IInventory inventory, int index, int x, int y, SlotType slotType) {
if (index >= 16 && index < 16+16) {
return new BaseSlot(inventory, index, x, y) {
@Override
public boolean isItemValid(ItemStack stack) {
if (!inventory.isItemValidForSlot(getSlotIndex(), stack)) {
return false;
}
return super.isItemValid(stack);
}
};
} else {
return super.createSlot(slotFactory, inventory, index, x, y, slotType);
}
}
@Override
public ItemStack slotClick(int index, int button, ClickType mode, EntityPlayer player) {
ItemStack stack = super.slotClick(index, button, mode, player);
((ItemComparatorTE)getInventory(CONTAINER_INVENTORY)).detect();
return stack;
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
acf90c89392dbb26dc897e4881b5037062cebb98
|
0610fb594915eef52d1b6fdef121f0f8f4059d26
|
/src/main/java/exceptions/Example.java
|
fbe2403009de765a197865c2c72101f8d8d0e5c2
|
[] |
no_license
|
amhtech/safari-start-java
|
6039fcbde012f3a3ab430fa8e1359f689323fabd
|
3c439bcea82844c82f25585b351ea862be75fa86
|
refs/heads/master
| 2022-12-25T04:47:17.676851
| 2020-10-09T16:01:27
| 2020-10-09T16:01:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 750
|
java
|
package exceptions;
public class Example {
public static String dayName(int d) {
if (d < 0 || d > 6) {
throw new IllegalArgumentException("Bad day number " + d);
}
String[] names = {"Saturday", "Sunday", "Monday", "Tuesday", "Wendesday", "Thursday", "Friday"};
return names[d];
}
public static void main(String[] args) {
System.out.println("day 0 is " + dayName(0));
try {
System.out.println("About to try silly day name");
String name = dayName(-1);
System.out.println("day 0 is " + name);
System.out.println("Name succesfully extracted");
} catch (IllegalArgumentException ie) {
System.out.println("oops, " + ie.getMessage());
}
System.out.println("Finished");
}
}
|
[
"simon@dancingcloudservices.com"
] |
simon@dancingcloudservices.com
|
fe022ab8d248da4e5e9cebf2e4ffe2eac84010fb
|
769e01d5c60f01eef96429de3df1a3e2864de945
|
/modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/selectorfields/v201605/cm/BudgetOrderField.java
|
7ad44d05ae43477da764aa9226c7f3fb75e7f6e5
|
[
"Apache-2.0"
] |
permissive
|
EliaKunz/googleads-java-lib
|
a0af9422cb078342b5c16e95667e2421720823d5
|
963f48ec99c1f5d5243e1efc72328635916e4f17
|
refs/heads/master
| 2021-01-21T05:55:07.914627
| 2016-08-26T19:03:00
| 2016-08-26T19:03:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,331
|
java
|
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.lib.selectorfields.v201605.cm;
import com.google.api.ads.adwords.lib.selectorfields.EntityField;
import com.google.api.ads.adwords.lib.selectorfields.Filterable;
/**
* A {@code Enum} to facilitate the selection of fields for {@code BudgetOrder}.
*/
public enum BudgetOrderField implements EntityField {
// Fields constants definitions
/**
* This must be passed as a string with dashes, e.g.
* "1234-5678-9012-3456".
*/
@Filterable
BillingAccountId(true),
/**
* Enables user to specify meaningful name for a billing account to aid in reconciling monthly invoices.
* This name will be printed in the monthly invoices.
* <span class="constraint Billing">This element only applies if manager account is whitelisted for new billing backend.</span>
*/
@Filterable
BillingAccountName(true),
/**
* Enables user to specify meaningful name for referencing this budget order.
* A default name will be provided if none is specified.
* This name will be printed in the monthly invoices.
* <span class="constraint Billing">This element only applies if manager account is whitelisted for new billing backend.</span>
*/
@Filterable
BudgetOrderName(true),
/**
* EndDateTime must be on or before "20361231 235959 America/Los_Angeles" or must set the same instant as "20371230 235959 America/Los_Angeles" to indicate infinite end date.
* StartDateTime and EndDateTime must use the same time zone.
*/
@Filterable
EndDateTime(true),
/**
*
*/
@Filterable
Id(true),
/**
* Contains fields that provide information on the last set of values that were passed in through the parent BudgetOrder for mutate.add and mutate.set.
* <span class="constraint Billing">This element only applies if manager account is whitelisted for new billing backend.</span>
*/
LastRequest(false),
/**
* Enables user to enter a value that helps them reference this budget order in their monthly invoices.
* This number will be printed in the monthly invoices.
* <span class="constraint Billing">This element only applies if manager account is whitelisted for new billing backend.</span>
*/
@Filterable
PoNumber(true),
/**
* A 12 digit billing ID assigned to the user by Google.
* This must be passed in as a string with dashes, e.g.
* "1234-5678-9012".
* For mutate.add, this field is required if billingAccountId is not specified.
* <span class="constraint Billing">This element only applies if manager account is whitelisted for new billing backend.</span>
*/
@Filterable
PrimaryBillingId(true),
/**
* For certain users, a secondary billing ID will be required on mutate.add.
* If this requirement was not communicated to the user, the user may ignore this parameter.
* If specified, this must be passed in as a string with dashes, e.g.
* "1234-5678-9012".
* <span class="constraint Billing">This element only applies if manager account is whitelisted for new billing backend.</span>
*/
@Filterable
SecondaryBillingId(true),
/**
* The spending limit in micros.
* To specify an unlimited budget, set spendingLimit to -1, otherwise spendingLimit must be greater than 0.
*/
@Filterable
SpendingLimit(true),
/**
* StartDateTime cannot be in the past, it must be on or before "20361231 235959 America/Los_Angeles".
* StartDateTime and EndDateTime must use the same time zone.
*/
@Filterable
StartDateTime(true),
;
private final boolean isFilterable;
private BudgetOrderField(boolean isFilterable) {
this.isFilterable = isFilterable;
}
@Override
public boolean isFilterable() {
return this.isFilterable;
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
8a1a2b6540b418f7ab3a53581a176a3f61321b8e
|
d7da8297ab4eb8e11d56f110e0fb587a6fbaf757
|
/core/src/main/java/com/netflix/iceberg/MergeAppend.java
|
1f7258931db2f8892176aff797d31190eea43e7f
|
[
"Apache-2.0"
] |
permissive
|
julienledem/iceberg
|
da023517663f049a9679130d0aa0280b269ed918
|
ab84940b24e58b366f1bd8f3bd4ae57d3fa0bf59
|
refs/heads/master
| 2021-04-06T00:47:05.945828
| 2018-02-20T21:10:59
| 2018-02-20T21:12:03
| 124,578,482
| 0
| 1
| null | 2018-03-09T18:29:47
| 2018-03-09T18:29:47
| null |
UTF-8
|
Java
| false
| false
| 7,821
|
java
|
/*
* Copyright 2017 Netflix, Inc.
*
* 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.netflix.iceberg;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.io.Closeables;
import com.netflix.iceberg.exceptions.CommitFailedException;
import com.netflix.iceberg.exceptions.RuntimeIOException;
import com.netflix.iceberg.io.OutputFile;
import com.netflix.iceberg.util.BinPacking.ListPacker;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static com.netflix.iceberg.TableProperties.MANIFEST_TARGET_SIZE_BYTES;
import static com.netflix.iceberg.TableProperties.MANIFEST_TARGET_SIZE_BYTES_DEFAULT;
/**
* Append implementation that produces a minimal number of manifest files.
* <p>
* This implementation will attempt to commit 5 times before throwing {@link CommitFailedException}.
*/
class MergeAppend extends SnapshotUpdate implements AppendFiles {
private static final long SIZE_PER_FILE = 100; // assume each file will be ~100 bytes
private final TableOperations ops;
private final PartitionSpec spec;
private final List<DataFile> newFiles = Lists.newArrayList();
private final long manifestTargetSizeBytes;
// cache merge results to reuse when retrying
private final Map<List<String>, String> mergedManifests = Maps.newHashMap();
MergeAppend(TableOperations ops) {
super(ops);
this.ops = ops;
this.spec = ops.current().spec();
this.manifestTargetSizeBytes = ops.current()
.propertyAsLong(MANIFEST_TARGET_SIZE_BYTES, MANIFEST_TARGET_SIZE_BYTES_DEFAULT);
}
@Override
public MergeAppend appendFile(DataFile file) {
newFiles.add(file);
return this;
}
@Override
public List<String> apply(TableMetadata base) {
Snapshot current = base.currentSnapshot();
List<PartitionSpec> specs = Lists.newArrayList();
List<List<ManifestReader>> groups = Lists.newArrayList();
// add the current spec as the first group. files are added to the beginning.
specs.add(spec);
groups.add(Lists.newArrayList());
groups.get(0).add(newFilesAsManifest());
List<ManifestReader> toClose = Lists.newArrayList();
boolean threw = true;
try {
// group manifests by compatible partition specs to be merged
if (current != null) {
for (String manifest : current.manifests()) {
ManifestReader reader = ManifestReader.read(ops.newInputFile(manifest));
toClose.add(reader);
int index = findMatch(specs, reader.spec());
if (index < 0) {
// not found, add a new one
List<ManifestReader> newList = Lists.<ManifestReader>newArrayList(reader);
specs.add(reader.spec());
groups.add(newList);
} else {
// replace the reader spec with the later one
specs.set(index, reader.spec());
groups.get(index).add(reader);
}
}
}
List<String> manifests = Lists.newArrayList();
for (int i = 0; i < specs.size(); i += 1) {
manifests.addAll(mergeGroup(specs.get(i), groups.get(i)));
}
threw = false;
return manifests;
} finally {
for (ManifestReader reader : toClose) {
try {
Closeables.close(reader, threw);
} catch (IOException e) {
throw new RuntimeIOException(e);
}
}
}
}
@Override
protected void cleanUncommitted(Set<String> committed) {
for (String merged: mergedManifests.values()) {
// delete any new merged manifests that aren't in the committed list
if (!committed.contains(merged)) {
deleteFile(merged);
}
}
mergedManifests.clear();
}
private List<String> mergeGroup(PartitionSpec spec, List<ManifestReader> group) {
// use a lookback of 1 to avoid reordering the manifests. using 1 also means this should pack
// from the end so that the manifest that gets under-filled is the first one, which will be
// merged the next time.
ListPacker<ManifestReader> packer = new ListPacker<>(manifestTargetSizeBytes, 1);
List<List<ManifestReader>> bins = packer.packEnd(group,
reader -> reader.file() != null ? reader.file().getLength() : newFiles.size() * SIZE_PER_FILE);
List<String> outputManifests = Lists.newLinkedList();
for (int i = 0; i < bins.size(); i += 1) {
List<ManifestReader> bin = bins.get(i);
if (bin.size() == 1 && bin.get(0).file() != null) {
// no need to rewrite
outputManifests.add(bin.get(0).file().location());
continue;
}
List<String> key = cacheKey(bin);
// if this merge was already rewritten, use the existing file.
// if the new files are in this merge, the key is based on the number of new files so files
// added after the last merge will cause a cache miss.
if (mergedManifests.containsKey(key)) {
outputManifests.add(mergedManifests.get(key));
continue;
}
OutputFile out = manifestPath(mergedManifests.size());
try (ManifestWriter writer = new ManifestWriter(spec, out, snapshotId())) {
for (ManifestReader reader : bin) {
if (reader.file() != null) {
writer.addExisting(reader.entries());
} else {
writer.addEntries(reader.entries());
}
}
} catch (IOException e) {
throw new RuntimeIOException(e, "Failed to write manifest: %s", out);
}
// update the cache
mergedManifests.put(key, out.location());
outputManifests.add(out.location());
}
return outputManifests;
}
private ManifestReader newFilesAsManifest() {
long id = snapshotId();
ManifestEntry reused = new ManifestEntry(spec.partitionType());
return ManifestReader.inMemory(spec,
Iterables.transform(newFiles, file -> {
reused.wrapAppend(id, file);
return reused;
}));
}
private List<String> cacheKey(List<ManifestReader> group) {
List<String> key = Lists.newArrayList();
for (ManifestReader reader : group) {
if (reader.file() != null) {
key.add(reader.file().location());
} else {
// if the file is null, this is an in-memory reader
// use the size to avoid collisions if retries have added files
key.add("append-" + newFiles.size() + "-files");
}
}
return key;
}
/**
* Helper method to group manifests by compatible partition spec.
* <p>
* When a match is found, this will replace the current spec for the group with the query spec.
* This is to produce manifests with the latest compatible spec.
*
* @param specs a list of partition specs, corresponding to the groups of readers
* @param spec spec to be matched to a group
* @return group of readers files for this spec can be merged into
*/
private static int findMatch(List<PartitionSpec> specs,
PartitionSpec spec) {
// loop from last to first because later specs are most likely to match
for (int i = specs.size() - 1; i >= 0; i -= 1) {
if (specs.get(i).compatibleWith(spec)) {
return i;
}
}
return -1;
}
}
|
[
"blue@apache.org"
] |
blue@apache.org
|
718c46edb5fec99842a00599e6346f7c3c3c40c4
|
8c8578aa43adf8c17b209901627f00cc84cd9f35
|
/ExamDemo/src/com/icss/entity/Tteacher.java
|
ff2aae49eac1270b96f03fa1b32f78ed576878c9
|
[] |
no_license
|
Orangeletbear/javaweb-
|
14bbcdcbd8c41c1e716d1622da6d16671f6b929c
|
2fc500cdb03b4bb75d454ad62ab39d51036d8692
|
refs/heads/master
| 2020-06-08T09:05:45.662794
| 2019-06-22T06:55:34
| 2019-06-22T06:55:34
| 193,202,101
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 852
|
java
|
package com.icss.entity;
public class Tteacher {
private String tno;
private String tname;
private String tgender;//ๆงๅซ
private String tcontact;
private String temail;
private String ison;//ๆฏๅฆๅจ่
public String getTno() {
return tno;
}
public void setTno(String tno) {
this.tno = tno;
}
public String getTname() {
return tname;
}
public void setTname(String tname) {
this.tname = tname;
}
public String getTgender() {
return tgender;
}
public void setTgender(String tgender) {
this.tgender = tgender;
}
public String getTcontact() {
return tcontact;
}
public void setTcontact(String tcontact) {
this.tcontact = tcontact;
}
public String getTemail() {
return temail;
}
public void setTemail(String temail) {
this.temail = temail;
}
public String getIson() {
return ison;
}
public void setIson(String ison) {
this.ison = ison;
}
}
|
[
"1471755989@qq.com"
] |
1471755989@qq.com
|
d529222faca14ec68751243eba9b34606d291c77
|
41ce5edf2e270e321dddd409ffac11ab7f32de86
|
/3/javax/net/ssl/KeyManager.java
|
08939f78a0a0fb8e4954b5b1491817add457b531
|
[] |
no_license
|
danny-source/SDK_Android_Source_03-14
|
372bb03020203dba71bc165c8370b91c80bc6eaa
|
323ad23e16f598d5589485b467bb9fba7403c811
|
refs/heads/master
| 2020-05-18T11:19:29.171830
| 2014-03-29T12:12:44
| 2014-03-29T12:12:44
| 18,238,039
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,147
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.net.ssl;
/**
* This is the interface to implement in order to mark a class as a JSSE key managers
* so that key managers can be easily grouped.
* The key managers are responsible for handling the keys used to
* authenticate the local side to its peer,
*
* @since Android 1.0
*/
public interface KeyManager {
}
|
[
"danny@35g.tw"
] |
danny@35g.tw
|
04236f3f3ee3d249192bc7ebd7797723fda4e73b
|
896890adb3171e1bce981e26991674ceff1d5bd8
|
/plugins/kernel/roi/roi4d/ROI4DArea.java
|
2e140c52bd1e037db2ca303e7077f42e4a7acb42
|
[] |
no_license
|
marcelomata/Icy-Kernel
|
5a5507335c5a7f4d0b613701006f582cc5560438
|
e3548c4f5e2009b92f496b9df6842140e14f33a3
|
refs/heads/master
| 2021-01-18T07:15:08.713282
| 2016-05-12T12:39:32
| 2016-05-12T12:39:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,060
|
java
|
/*
* Copyright 2010-2015 Institut Pasteur.
*
* This file is part of Icy.
*
* Icy is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Icy 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 Icy. If not, see <http://www.gnu.org/licenses/>.
*/
package plugins.kernel.roi.roi4d;
import icy.roi.BooleanMask3D;
import icy.roi.BooleanMask4D;
import icy.roi.ROI;
import icy.roi.ROI3D;
import icy.type.point.Point4D;
import icy.type.point.Point5D;
import icy.type.rectangle.Rectangle4D;
import java.awt.geom.Point2D;
import java.util.Collection;
import java.util.Map.Entry;
import plugins.kernel.roi.roi3d.ROI3DArea;
/**
* 4D Area ROI.
*
* @author Stephane
*/
public class ROI4DArea extends ROI4DStack<ROI3DArea>
{
public ROI4DArea()
{
super(ROI3DArea.class);
setName("4D area");
}
public ROI4DArea(Point4D pt)
{
this();
addBrush(pt.toPoint2D(), (int) pt.getZ(), (int) pt.getT());
}
public ROI4DArea(Point5D pt)
{
this(pt.toPoint4D());
}
/**
* Create a 3D Area ROI type from the specified {@link BooleanMask4D}.
*/
public ROI4DArea(BooleanMask4D mask)
{
this();
setAsBooleanMask(mask);
}
/**
* Create a copy of the specified 4D Area ROI.
*/
public ROI4DArea(ROI4DArea area)
{
this();
// copy the source 4D area ROI
for (Entry<Integer, ROI3DArea> entry : area.slices.entrySet())
slices.put(entry.getKey(), new ROI3DArea(entry.getValue()));
}
/**
* Adds the specified point to this ROI
*/
public void addPoint(int x, int y, int z, int t)
{
setPoint(x, y, z, t, true);
}
/**
* Remove a point from the mask.<br>
* Don't forget to call optimizeBounds() after consecutive remove operation
* to refresh the mask bounds.
*/
public void removePoint(int x, int y, int z, int t)
{
setPoint(x, y, z, t, false);
}
/**
* Set the value for the specified point in the mask.
* Don't forget to call optimizeBounds() after consecutive remove point operation
* to refresh the mask bounds.
*/
public void setPoint(int x, int y, int z, int t, boolean value)
{
getSlice(t, true).setPoint(x, y, z, value);
}
/**
* Add brush point at specified position and for specified Z,T slice.
*/
public void addBrush(Point2D pos, int z, int t)
{
getSlice(t, true).addBrush(pos, z);
}
/**
* Remove brush point from the mask at specified position and for specified Z,T slice.<br>
* Don't forget to call optimizeBounds() after consecutive remove operation
* to refresh the mask bounds.
*/
public void removeBrush(Point2D pos, int z, int t)
{
getSlice(t, true).removeBrush(pos, z);
}
/**
* Sets the ROI slice at given T position to this 4D ROI
*
* @param t
* the position where the slice must be set
* @param roiSlice
* the 3D ROI to set
* @param merge
* <code>true</code> if the given slice should be merged with the existing slice, or
* <code>false</code> to replace the existing slice.
*/
public void setSlice(int t, ROI3D roiSlice, boolean merge)
{
if (roiSlice == null)
throw new IllegalArgumentException("Cannot add an empty slice in a 4D ROI");
final ROI3DArea currentSlice = getSlice(t);
final ROI newSlice;
// merge both slice
if ((currentSlice != null) && merge)
{
// we need to modify the T and C position so we do the merge correctly
roiSlice.setT(t);
roiSlice.setC(getC());
// do ROI union
newSlice = currentSlice.getUnion(roiSlice);
}
else
newSlice = roiSlice;
if (newSlice instanceof ROI3DArea)
setSlice(t, (ROI3DArea) newSlice);
else if (newSlice instanceof ROI3D)
setSlice(t, new ROI3DArea(((ROI3D) newSlice).getBooleanMask(true)));
else
throw new IllegalArgumentException("Can't add the result of the merge operation on 3D slice " + t + ": "
+ newSlice.getClassName());
}
/**
* Returns true if the ROI is empty (the mask does not contains any point).
*/
@Override
public boolean isEmpty()
{
for (ROI3DArea area : slices.values())
if (!area.isEmpty())
return false;
return true;
}
/**
* Set the mask from a BooleanMask4D object
*/
public void setAsBooleanMask(BooleanMask4D mask)
{
if (mask != null)
{
final Collection<BooleanMask3D> values = mask.mask.values();
setAsBooleanMask(mask.bounds, values.toArray(new BooleanMask3D[values.size()]));
}
}
/**
* Set the 4D mask from a 3D boolean mask array
*
* @param rect
* the 4D region defined by 3D boolean mask array
* @param mask
* the 4D mask data (array length should be equals to rect.sizeZ)
*/
public void setAsBooleanMask(Rectangle4D.Integer rect, BooleanMask3D[] mask)
{
if (rect.isInfiniteT())
throw new IllegalArgumentException("Cannot set infinite T dimension on the 4D Area ROI.");
beginUpdate();
try
{
clear();
for (int t = 0; t < rect.sizeT; t++)
setSlice(t + rect.t, new ROI3DArea(mask[t]));
optimizeBounds();
}
finally
{
endUpdate();
}
}
/**
* Optimize the bounds size to the minimum surface which still include all mask<br>
* You should call it after consecutive remove operations.
*/
public void optimizeBounds()
{
final Rectangle4D.Integer bounds = getBounds();
beginUpdate();
try
{
for (int t = bounds.t; t < bounds.t + bounds.sizeT; t++)
{
final ROI3DArea roi = slices.get(Integer.valueOf(t));
if (roi.isEmpty())
removeSlice(t);
else
roi.optimizeBounds();
}
}
finally
{
endUpdate();
}
}
}
|
[
"stephane.dallongeville@pasteur.fr"
] |
stephane.dallongeville@pasteur.fr
|
eddd445a990b32591e0cc197d7b3d3178e76e100
|
eff9d1e6ce4032c7a2618cf8b40922401f3d1ce0
|
/ls-java-core/src/main/java/com/ls/lishuai/java/User.java
|
cbba7c7a7843113c3e228be976affc25f3d6c88f
|
[] |
no_license
|
lishuai2016/all
|
67d8ff5db911ca5c38b249172d3dcbf4234d49d7
|
aa7d6774611c21e126e628268a6abd020138974f
|
refs/heads/master
| 2022-12-09T11:03:08.571479
| 2019-08-18T16:38:41
| 2019-08-18T16:38:44
| 200,311,974
| 5
| 4
| null | 2022-11-16T07:57:51
| 2019-08-03T00:08:21
|
Java
|
UTF-8
|
Java
| false
| false
| 581
|
java
|
package com.ls.lishuai.java;
/**
* @Author: lishuai
* @CreateDate: 2018/6/5 17:03
*/
public class User {
private Integer id;
private String name;
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;
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", name='" + name + '\'' +
'}';
}
}
|
[
"1830473670@qq.com"
] |
1830473670@qq.com
|
1232789acf0acf35524e5f6725544b046241bf40
|
a658b5111dfabce174fe0cc32e18a4eba87c6210
|
/de.fxdiagram.eclipse/xtend-gen/de/fxdiagram/eclipse/commands/ClearDiagramHandler.java
|
ef4d35fbf326091acf7a0d5bc0f4b6aa543925e6
|
[] |
no_license
|
JuergenHaug/FXDiagram
|
c8de6f84af5e27260c4db472da461163b3fd0118
|
e69f89421c592bd1146c43dd23ab8961e800d9b6
|
refs/heads/master
| 2021-05-13T21:54:11.655369
| 2018-08-03T18:07:49
| 2018-08-03T18:07:49
| 116,474,996
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 771
|
java
|
package de.fxdiagram.eclipse.commands;
import de.fxdiagram.eclipse.FXDiagramView;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
@SuppressWarnings("all")
public class ClearDiagramHandler extends AbstractHandler {
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
Object _xblockexpression = null;
{
final IWorkbenchPart view = HandlerUtil.getActivePart(event);
if ((view instanceof FXDiagramView)) {
((FXDiagramView)view).clear();
}
_xblockexpression = null;
}
return _xblockexpression;
}
}
|
[
"jan.koehnlein@itemis.de"
] |
jan.koehnlein@itemis.de
|
237881d5226987180cc3f69b3f65452815e7e75e
|
ed8488fcc26627a8bdcfed7abfd6ecd484084ed9
|
/xueqiao_company_webapi/java/src/main/java/com/longsheng/trader/bean/TimeRegionBean.java
|
67eff8b10c0d304c1ae24324e2a826576abe9e21
|
[] |
no_license
|
SunningPig/xueqiao-company
|
3cf1932ecaf3a43b66534e30f4a9a9c7d84cd9fb
|
a5fa82facad07baaf247dd803c36af9019cb6fe6
|
refs/heads/main
| 2023-04-13T17:59:29.631874
| 2021-04-25T12:19:49
| 2021-04-25T12:19:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 380
|
java
|
package com.longsheng.trader.bean;
public class TimeRegionBean {
private String beginTime;
private String endTime;
public String getBeginTime() {
return beginTime;
}
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
}
|
[
"wangli@authine.com"
] |
wangli@authine.com
|
e7f8643dca6bb578847966d20c83fb5f015322ef
|
18da61c9913642d3f4a8d982e2963df9b5a40df3
|
/spring-boot-api/src/main/java/io/sample/springbootapi/resource/InvalidErrorResource.java
|
091439c6e327e1b55987f6bd5eb7d6b0f66e1674
|
[] |
no_license
|
kickccat/SpringBoot2
|
85a0957743841951c78d80b95cf6777233252487
|
2f5ac4275ceca62459bfef5fe5dd54023f2f2cd0
|
refs/heads/master
| 2020-03-24T07:41:08.708894
| 2018-09-21T13:02:58
| 2018-09-21T13:02:58
| 142,571,791
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 226
|
java
|
package io.sample.springbootapi.resource;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public class InvalidErrorResource {
private String message;
private Object errors;
}
|
[
"kickccat@hotmail.com"
] |
kickccat@hotmail.com
|
768be61bbcf0800b0ed1730f93bb9dafac4db36e
|
1a33fc11cfeccbbebf6e6d9b4308fe075aa22f48
|
/src/test/java/org/hibernate/test/resource/common/SynchronizationErrorImpl.java
|
5778a85cd310058b093a4b7d56987a8153862dc3
|
[] |
no_license
|
dreab8/JdbcSession
|
dc68880e6c9f4cf0a83902bd3da321acfa84d2a6
|
2e2ef761029662c5d7019dcf9fcb4d4c878e3393
|
refs/heads/master
| 2021-01-18T12:45:12.315746
| 2014-09-10T10:47:17
| 2014-09-10T10:47:17
| 20,409,759
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,791
|
java
|
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2013, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* 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 Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.test.resource.common;
import javax.transaction.Synchronization;
/**
* @author Steve Ebersole
*/
public class SynchronizationErrorImpl implements Synchronization {
private final boolean errorOnBefore;
private final boolean errorOnAfter;
public SynchronizationErrorImpl(boolean errorOnBefore, boolean errorOnAfter) {
this.errorOnBefore = errorOnBefore;
this.errorOnAfter = errorOnAfter;
}
@Override
public void beforeCompletion() {
if ( errorOnBefore ) {
throw new RuntimeException( "throwing requested error on beforeCompletion" );
}
}
@Override
public void afterCompletion(int status) {
if ( errorOnAfter ) {
throw new RuntimeException( "throwing requested error on afterCompletion" );
}
}
}
|
[
"steve@hibernate.org"
] |
steve@hibernate.org
|
ddbb369b305699dcecdac8baaf51980811127d43
|
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
|
/bazaar8.apk-decompiled/sources/c/c/a/n/j/d/p.java
|
79d194886ecaa8026d06b5f3e5c63a89fe928bab
|
[] |
no_license
|
BaseMax/PopularAndroidSource
|
a395ccac5c0a7334d90c2594db8273aca39550ed
|
bcae15340907797a91d39f89b9d7266e0292a184
|
refs/heads/master
| 2020-08-05T08:19:34.146858
| 2019-10-06T20:06:31
| 2019-10-06T20:06:31
| 212,433,298
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,961
|
java
|
package c.c.a.n.j.d;
import android.os.Bundle;
import android.os.Parcelable;
import c.c.a.d;
import com.farsitel.bazaar.R;
import com.farsitel.bazaar.ui.appdetail.ToolbarInfoModel;
import h.f.b.f;
import h.f.b.j;
import java.io.Serializable;
import kotlin.TypeCastException;
/* compiled from: EpisodeDetailFragmentDirections.kt */
public final class p {
/* renamed from: a reason: collision with root package name */
public static final c f6538a = new c(null);
/* compiled from: EpisodeDetailFragmentDirections.kt */
private static final class a implements b.w.p {
/* renamed from: a reason: collision with root package name */
public final String f6539a;
/* renamed from: b reason: collision with root package name */
public final String f6540b;
/* renamed from: c reason: collision with root package name */
public final ToolbarInfoModel f6541c;
public a(String str, String str2, ToolbarInfoModel toolbarInfoModel) {
j.b(str, "referrer");
j.b(str2, "videoId");
j.b(toolbarInfoModel, "toolbarInfo");
this.f6539a = str;
this.f6540b = str2;
this.f6541c = toolbarInfoModel;
}
public Bundle a() {
Bundle bundle = new Bundle();
bundle.putString("referrer", this.f6539a);
bundle.putString("videoId", this.f6540b);
if (Parcelable.class.isAssignableFrom(ToolbarInfoModel.class)) {
ToolbarInfoModel toolbarInfoModel = this.f6541c;
if (toolbarInfoModel != null) {
bundle.putParcelable("toolbarInfo", (Parcelable) toolbarInfoModel);
} else {
throw new TypeCastException("null cannot be cast to non-null type android.os.Parcelable");
}
} else if (Serializable.class.isAssignableFrom(ToolbarInfoModel.class)) {
ToolbarInfoModel toolbarInfoModel2 = this.f6541c;
if (toolbarInfoModel2 != null) {
bundle.putSerializable("toolbarInfo", toolbarInfoModel2);
} else {
throw new TypeCastException("null cannot be cast to non-null type java.io.Serializable");
}
} else {
throw new UnsupportedOperationException(ToolbarInfoModel.class.getName() + " must implement Parcelable or Serializable or must be an Enum.");
}
return bundle;
}
public int b() {
return R.id.actionEpisodeDetailToAllReviews;
}
/* JADX WARNING: Code restructure failed: missing block: B:8:0x0024, code lost:
if (h.f.b.j.a((java.lang.Object) r2.f6541c, (java.lang.Object) r3.f6541c) != false) goto L_0x0029;
*/
/* Code decompiled incorrectly, please refer to instructions dump. */
public boolean equals(java.lang.Object r3) {
/*
r2 = this;
if (r2 == r3) goto L_0x0029
boolean r0 = r3 instanceof c.c.a.n.j.d.p.a
if (r0 == 0) goto L_0x0027
c.c.a.n.j.d.p$a r3 = (c.c.a.n.j.d.p.a) r3
java.lang.String r0 = r2.f6539a
java.lang.String r1 = r3.f6539a
boolean r0 = h.f.b.j.a((java.lang.Object) r0, (java.lang.Object) r1)
if (r0 == 0) goto L_0x0027
java.lang.String r0 = r2.f6540b
java.lang.String r1 = r3.f6540b
boolean r0 = h.f.b.j.a((java.lang.Object) r0, (java.lang.Object) r1)
if (r0 == 0) goto L_0x0027
com.farsitel.bazaar.ui.appdetail.ToolbarInfoModel r0 = r2.f6541c
com.farsitel.bazaar.ui.appdetail.ToolbarInfoModel r3 = r3.f6541c
boolean r3 = h.f.b.j.a((java.lang.Object) r0, (java.lang.Object) r3)
if (r3 == 0) goto L_0x0027
goto L_0x0029
L_0x0027:
r3 = 0
return r3
L_0x0029:
r3 = 1
return r3
*/
throw new UnsupportedOperationException("Method not decompiled: c.c.a.n.j.d.p.a.equals(java.lang.Object):boolean");
}
public int hashCode() {
String str = this.f6539a;
int i2 = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
String str2 = this.f6540b;
int hashCode2 = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
ToolbarInfoModel toolbarInfoModel = this.f6541c;
if (toolbarInfoModel != null) {
i2 = toolbarInfoModel.hashCode();
}
return hashCode2 + i2;
}
public String toString() {
return "ActionEpisodeDetailToAllReviews(referrer=" + this.f6539a + ", videoId=" + this.f6540b + ", toolbarInfo=" + this.f6541c + ")";
}
}
/* compiled from: EpisodeDetailFragmentDirections.kt */
private static final class b implements b.w.p {
/* renamed from: a reason: collision with root package name */
public final String f6542a;
/* renamed from: b reason: collision with root package name */
public final int f6543b;
/* renamed from: c reason: collision with root package name */
public final String f6544c;
public b(String str, int i2, String str2) {
j.b(str, "episodeId");
j.b(str2, "referrer");
this.f6542a = str;
this.f6543b = i2;
this.f6544c = str2;
}
public Bundle a() {
Bundle bundle = new Bundle();
bundle.putString("episodeId", this.f6542a);
bundle.putInt("seasonIndex", this.f6543b);
bundle.putString("referrer", this.f6544c);
return bundle;
}
public int b() {
return R.id.actionEpisodeDetailToEpisodeDetail;
}
public boolean equals(Object obj) {
if (this != obj) {
if (obj instanceof b) {
b bVar = (b) obj;
if (j.a((Object) this.f6542a, (Object) bVar.f6542a)) {
if (!(this.f6543b == bVar.f6543b) || !j.a((Object) this.f6544c, (Object) bVar.f6544c)) {
return false;
}
}
}
return false;
}
return true;
}
public int hashCode() {
String str = this.f6542a;
int i2 = 0;
int hashCode = (((str != null ? str.hashCode() : 0) * 31) + Integer.valueOf(this.f6543b).hashCode()) * 31;
String str2 = this.f6544c;
if (str2 != null) {
i2 = str2.hashCode();
}
return hashCode + i2;
}
public String toString() {
return "ActionEpisodeDetailToEpisodeDetail(episodeId=" + this.f6542a + ", seasonIndex=" + this.f6543b + ", referrer=" + this.f6544c + ")";
}
}
/* compiled from: EpisodeDetailFragmentDirections.kt */
public static final class c {
public c() {
}
public final b.w.p a(String str, int i2, String str2) {
j.b(str, "episodeId");
j.b(str2, "referrer");
return new b(str, i2, str2);
}
public final b.w.p b(String str, int i2, String str2) {
j.b(str, "episodeId");
j.b(str2, "referrer");
return d.f4738a.a(str, i2, str2);
}
public /* synthetic */ c(f fVar) {
this();
}
public final b.w.p a(String str, String str2, ToolbarInfoModel toolbarInfoModel) {
j.b(str, "referrer");
j.b(str2, "videoId");
j.b(toolbarInfoModel, "toolbarInfo");
return new a(str, str2, toolbarInfoModel);
}
}
}
|
[
"MaxBaseCode@gmail.com"
] |
MaxBaseCode@gmail.com
|
e045d0a24010e1506b75f81824385ae561788ac4
|
3b74fbedd3001512dfe49bc0f5a18090c2e34564
|
/hvip-member-service/src/main/java/com/huazhu/hvip/member/service/impl/WebRoleServiceImpl.java
|
842f0ea546ec3384fbff05a497cb5592ec3ab3b7
|
[] |
no_license
|
xuelu520/cjiaclean-core
|
b148a78da67b45a0c0e5d5cf07c67b5cfc6d47dc
|
a96f574a8ec2b4ab7884130461671f095762995a
|
refs/heads/master
| 2020-03-27T10:19:57.138235
| 2017-11-16T01:41:23
| 2017-11-16T01:41:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 715
|
java
|
/*
* Copyright (C),2016-2016. ๅไฝ้
ๅบ็ฎก็ๆ้ๅ
ฌๅธ
* FileName: WebRoleServiceImpl.java
* Author: lijing
* Date: 2016-03-21 10:29:34
* Description: //ๆจกๅ็ฎ็ใๅ่ฝๆ่ฟฐ
* History: //ไฟฎๆน่ฎฐๅฝ ไฟฎๆนไบบๅงๅ ไฟฎๆนๆถ้ด ็ๆฌๅท ๆ่ฟฐ
* <lijing> <2016-03-21 10:29:34> <version> <desc>
*
*/
package com.huazhu.hvip.member.service.impl;
import com.huazhu.hvip.member.service.WebRoleService;
import org.springframework.stereotype.Service;
/**
* <ไธๅฅ่ฏๅ่ฝ็ฎ่ฟฐ>
* <ๅ่ฝ่ฏฆ็ปๆ่ฟฐ>
*
* @author lijing
* @see [็ธๅ
ณ็ฑป/ๆนๆณ]๏ผๅฏ้๏ผ
* @since [ไบงๅ/ๆจกๅ็ๆฌ] ๏ผๅฏ้๏ผ
*/
@Service
public class WebRoleServiceImpl implements WebRoleService{
}
|
[
"zxc,./123"
] |
zxc,./123
|
39b3e80bc76d88e227271356276a4d2e4db39aaf
|
14fec7d48aa2bd28ecbeb87e4e1d8aeb23e20635
|
/src/main/java/com/mht/controller/UserSellerController.java
|
c6c3ae1cdef7be005327e967b30b40c925786efd
|
[] |
no_license
|
haoqiunie/api1
|
352a2d75ee77b98ff09f7e5a43bfc4f6cab98294
|
37bf9c55edda5e9b7a70a85f0851472dd8306280
|
refs/heads/master
| 2022-06-27T18:22:03.203863
| 2019-08-12T03:02:11
| 2019-08-12T03:02:11
| 201,601,048
| 0
| 0
| null | 2022-06-17T02:25:39
| 2019-08-10T08:17:18
|
Java
|
UTF-8
|
Java
| false
| false
| 329
|
java
|
package com.mht.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* ๅ็ซฏๆงๅถๅจ
* </p>
*
* @author jobob
* @since 2019-07-29
*/
@RestController
@RequestMapping("/user-seller")
public class UserSellerController {
}
|
[
"1778715299@qq.com"
] |
1778715299@qq.com
|
c1800b969ee75ac1dc924a6fcf888e14185d5af2
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/neo4j/learning/2626/KernelRecoveryTest.java
|
a336232e14eb17629398a161b51b3e24dacf03f4
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,175
|
java
|
/*
* Copyright (c) 2002-2018 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.recovery;
import org.junit.Rule;
import org.junit.Test;
import java.io.File;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.mockfs.EphemeralFileSystemAbstraction;
import org.neo4j.graphdb.mockfs.UncloseableDelegatingFileSystemAbstraction;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.kernel.api.StatementConstants;
import org.neo4j.kernel.impl.transaction.command.Command.NodeCommand;
import org.neo4j.kernel.impl.transaction.command.Command.NodeCountsCommand;
import org.neo4j.kernel.impl.transaction.log.LogPosition;
import org.neo4j.kernel.impl.transaction.log.files.TransactionLogFiles;
import org.neo4j.test.TestGraphDatabaseFactory;
import org.neo4j.test.rule.TestDirectory;
import org.neo4j.test.rule.fs.EphemeralFileSystemRule;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.neo4j.test.mockito.matcher.LogMatchers.checkPoint;
import static org.neo4j.test.mockito.matcher.LogMatchers.commandEntry;
import static org.neo4j.test.mockito.matcher.LogMatchers.commitEntry;
import static org.neo4j.test.mockito.matcher.LogMatchers.containsExactly;
import static org.neo4j.test.mockito.matcher.LogMatchers.logEntries;
import static org.neo4j.test.mockito.matcher.LogMatchers.startEntry;
public class KernelRecoveryTest
{
@Rule
public final EphemeralFileSystemRule fsRule = new EphemeralFileSystemRule();
@Rule
public final TestDirectory testDirectory = TestDirectory.testDirectory();
@Test
public void shouldHandleWritesProperlyAfterRecovery() throws Exception
{
// Given
EphemeralFileSystemAbstraction fs = fsRule.get();
GraphDatabaseService db = newDB( fs );
long node1 = createNode( db );
// And given the power goes out
try ( EphemeralFileSystemAbstraction crashedFs = fs.snapshot() )
{
db.shutdown();
db = newDB( crashedFs );
long node2 = createNode( db );
db.shutdown();
// Then the logical log should be in sync
File logFile = testDirectory.databaseLayout().file( TransactionLogFiles.DEFAULT_NAME + ".0" );
assertThat
( logEntries( crashedFs, logFile ), containsExactly(
// Tx before recovery
startEntry( -1, -1 ), commandEntry( node1, NodeCommand.class ),
commandEntry( StatementConstants.ANY_LABEL, NodeCountsCommand.class ), commitEntry( 2 ),
// Tx after recovery
startEntry( -1, -1 ), commandEntry( node2, NodeCommand.class ),
commandEntry( StatementConstants.ANY_LABEL, NodeCountsCommand.class ), commitEntry( 3 ),
// checkpoint
checkPoint( new LogPosition( 0, 250 ) ) ) );
}
}
private GraphDatabaseService newDB( FileSystemAbstraction fs )
{
return new TestGraphDatabaseFactory()
.setFileSystem( new UncloseableDelegatingFileSystemAbstraction( fs ) )
.newImpermanentDatabase( testDirectory.databaseDir() );
}
private static long createNode( GraphDatabaseService db )
{
long node1;
try ( Transaction tx = db.beginTx() )
{
node1 = db.createNode().getId();
tx.success();
}
return node1;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
91194ee1f19e9bac698e90b577cc490f09fc502f
|
07faeaab515163f3493f86805e50f0b0d1aa258a
|
/src_taskmanage/com/seeyon/v3x/taskmanage/utils/GanttItem.java
|
50c6cfc289c2c3972b8e855dcca22b87f7762080
|
[] |
no_license
|
zhengxyzw/seeyon_v3x
|
033563e558794eb3d3c6d14b65fc3bd985f24e03
|
f2f91c1db65c93681ef504d410d517e77048deec
|
refs/heads/master
| 2020-06-12T20:33:08.873703
| 2017-07-11T01:21:52
| 2017-07-11T01:21:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,005
|
java
|
package com.seeyon.v3x.taskmanage.utils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
/**
* ็็นๅพไธญ็จไบๅฑ็ฐ็่็น๏ผไธๅๆจกๅๆฐๆฎๆฌฒไปฅ็็นๅพๆ ทๅผๅฑ็ฐๆถ๏ผ้ๅฐๅฏนๅบๆฐๆฎ่ฝฌๆขใ่ฎพ็ฝฎไธบ็ปไปถ่ฝๅค่งฃๆๅ่พจ่ฏ็้ๅ<br>
* ้ๅธธ่่จ๏ผPOJOไธญ้่ฆๆฉๅฑ๏ผparentใchildrenใganttIdใlogicalPath็ญ้ๆไน
ๅๅฑๆง็จไบ่ฝฌๆขไธบ็็นๅพ่็น้ๅ<br>
* @see com.seeyon.v3x.taskmanage.domain.TaskInfo
* @see com.seeyon.v3x.taskmanage.utils.GanttUtils#parse2GanttItem(com.seeyon.v3x.taskmanage.domain.TaskInfo)
* @see com.seeyon.v3x.taskmanage.utils.GanttUtils#parse2GanttItems(List, Long, com.seeyon.v3x.project.manager.ProjectManager)
* @see com.seeyon.v3x.taskmanage.controller.TaskController#ganttChartTasks(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
* <a href="mailto:yangm@seeyon.com">Rookie Young</a> 2011-3-19
*/
public class GanttItem implements Comparable<GanttItem> {
/**
* ็็นๅพไธญ่็นID
*/
private int id;
/**
* ่็นๅ็งฐ
*/
private String name;
/**
* ๅผๅงๆฅๆ
*/
private Date beginDate;
/**
* ็ปๆๆฅๆ
*/
private Date endDate;
/**
* ๆฏๅฆไธบSprint(็นๆฎ่็น๏ผๆพ็คบๆถไฝไธบ็ฑปไผผ้กน็ฎ้ถๆฎตๆscrumไธญ็sprint)
*/
private boolean sprint;
/**
* ๅฝๅ่็น็ไธ็บง็ถ่็นๆฏๅฆไธบSprint(็ปๅถไพ่ตๅ
ณ็ณปๆถ๏ผๆญค็งๆ
ๅตไธไธไบ็ปๅถๅ
ณ็ณป่ฟๆฅ็บฟ)
*/
private boolean parentIsSprint;
/**
* ๅฎๆ็
*/
private float finishRate;
/**
* ๅกซๅ
้ข่ฒ
*/
private String color;
/**
* ้พๆฅๅฐๅ
*/
private String link;
/**
* ็ถ่็น
*/
private GanttItem parent;
/**
* ๅญ่็น
*/
private List<GanttItem> children;
/**
* ้ป่พๅฑ็บงๆทฑๅบฆ
*/
private int logicalDepth;
/**
* ๆทปๅ ไธไธชๅญ่็น๏ผๅๆถๅฐ่ฏฅๅญ่็น็็ถ่็น่ฎพไธบ่ชๅทฑ
* @param child ๅพ
ๆทปๅ ็ๅญ่็น
*/
public void addChild(GanttItem child) {
if(this.children == null) {
this.setChildren(new ArrayList<GanttItem>());
}
this.getChildren().add(child);
child.setParent(this);
}
/**
* ่ทๅ็ถ่็น็ID๏ผๅฆๆ็ถ่็นไธบ็ฉบ๏ผๅ่ฟๅ็ฉบๅผ0
* @return
*/
public int getParentGanttId() {
return this.parent == null ? 0 : this.parent.getId();
}
/**
* ๅฝๅ่็นๆฏๅฆๅญๅจ็ถ่็น
* @return ๆฏๅฆๅญๅจ็ถ่็น
*/
public boolean hasParent() {
return this.parent != null;
}
/**
* ๅฝๅ่็นๆฏๅฆๅญๅจๅญ่็น
* @return ๆฏๅฆๅญๅจๅญ่็น
*/
public boolean hasChildren() {
return CollectionUtils.isNotEmpty(children);
}
/**
* ๆๅบ๏ผ้ป่พๅฑ็บงๅๅบใๅผๅงๆฅๆๅๅบ
*/
public int compareTo(GanttItem o) {
Integer depth = this.getLogicalDepth();
Integer depth_o = o.getLogicalDepth();
if(depth.compareTo(depth_o) == 0) {
return -this.getBeginDate().compareTo(o.getBeginDate());
}
return depth.compareTo(depth_o);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((beginDate == null) ? 0 : beginDate.hashCode());
result = prime * result + id;
result = prime * result + logicalDepth;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof GanttItem)) {
return false;
}
GanttItem other = (GanttItem) obj;
if (beginDate == null) {
if (other.beginDate != null) {
return false;
}
} else if (!beginDate.equals(other.beginDate)) {
return false;
}
if (id != other.id) {
return false;
}
if (logicalDepth != other.logicalDepth) {
return false;
}
if (name == null) {
if (other.name != null) {
return false;
}
} else if (!name.equals(other.name)) {
return false;
}
return true;
}
/*---------------setter/getter--------------*/
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getBeginDate() {
return beginDate;
}
public void setBeginDate(Date beginDate) {
this.beginDate = beginDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
/**
* ๆฏๅฆไธบSprint(็นๆฎ่็น๏ผๆพ็คบๆถไฝไธบ็ฑปไผผ้กน็ฎ้ถๆฎตๆscrumไธญ็sprint)
* @return ๆฏๅฆไธบsprint
*/
public boolean isSprint() {
return sprint;
}
public void setSprint(boolean sprint) {
this.sprint = sprint;
}
/**
* ๅฝๅ่็น็ไธ็บง็ถ่็นๆฏๅฆไธบSprint(็ปๅถไพ่ตๅ
ณ็ณปๆถ๏ผๆญค็งๆ
ๅตไธไธไบ็ปๅถๅ
ณ็ณป่ฟๆฅ็บฟ)
*/
public boolean isParentIsSprint() {
return parentIsSprint;
}
public void setParentIsSprint(boolean parentIsSprint) {
this.parentIsSprint = parentIsSprint;
}
public float getFinishRate() {
return finishRate;
}
public void setFinishRate(float finishRate) {
this.finishRate = finishRate;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public GanttItem getParent() {
return parent;
}
public void setParent(GanttItem parent) {
this.parent = parent;
}
public List<GanttItem> getChildren() {
return children;
}
public void setChildren(List<GanttItem> children) {
this.children = children;
}
public int getLogicalDepth() {
return logicalDepth;
}
public void setLogicalDepth(int logicalDepth) {
this.logicalDepth = logicalDepth;
}
}
|
[
"839428881@qq.com"
] |
839428881@qq.com
|
76b19be7d3556d4aca6e2179a63945236b84ede9
|
2e4d3400514f55911bba28b99327775c380c7b7c
|
/src/main/java/bad/robot/http/matchers/HttpMessageContentByteArrayMatcher.java
|
bc99d7ce225f296b9e18fc45761b11a749c57588
|
[] |
no_license
|
chrissherratt/simple-http
|
1b497d14181f39927764a786629280ff26797ce9
|
f65591fe100c71ec167859915feabcb11e1039c1
|
refs/heads/master
| 2020-12-31T01:48:21.944737
| 2013-09-04T06:58:44
| 2013-09-04T06:58:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,493
|
java
|
/*
* Copyright (c) 2011-2012, bad robot (london) ltd
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package bad.robot.http.matchers;
import bad.robot.http.HttpMessage;
import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import java.io.UnsupportedEncodingException;
import static org.hamcrest.Matchers.equalTo;
class HttpMessageContentByteArrayMatcher<T extends HttpMessage> extends TypeSafeMatcher<T> {
private final Matcher<byte[]> matcher;
private String characterSet;
@Factory
public static <T extends HttpMessage> Matcher<T> content(Matcher<byte[]> content, String characterSet) {
return new HttpMessageContentByteArrayMatcher(content, characterSet);
}
@Factory
public static <T extends HttpMessage> Matcher<T> content(byte[] content, String characterSet) {
return new HttpMessageContentByteArrayMatcher(equalTo(content), characterSet);
}
public HttpMessageContentByteArrayMatcher(Matcher<byte[]> matcher, String characterSet) {
this.matcher = matcher;
this.characterSet = characterSet;
}
@Override
public boolean matchesSafely(T actual) {
try {
return matcher.matches(actual.getContent().asString().getBytes(characterSet));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
@Override
public void describeTo(Description description) {
description.appendText("a ").appendText(HttpMessage.class.getSimpleName()).appendText(" with binary content ");
matcher.describeTo(description);
}
}
|
[
"toby.weston@gmail.com"
] |
toby.weston@gmail.com
|
4bb7de2a7177713bc7b6552b9668548d938d6846
|
969cf02071e75497117d2a48bcef6a3034819e89
|
/NetWorkProxy/src/main/java/com/android/sms/proxy/entity/DatabaseHelper.java
|
10daca2b6bf8b6d774b29a16afb939a432aa17f3
|
[] |
no_license
|
zhengyuqin/ProxyServerAndroid
|
18842ad3b5bc351a605a2cdbb376cab4d729ac70
|
0e812e8037241e274589ee20aac5c36997afb6fb
|
refs/heads/master
| 2020-04-06T15:00:00.455805
| 2016-10-21T10:08:01
| 2016-10-21T10:08:01
| 53,205,091
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,056
|
java
|
package com.android.sms.proxy.entity;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/**
* @author zyq 16-3-21
* ไฟๅญๆๆบๅท๏ผ้
ๅContentProviderไฝฟ็จ๏ผ๏ผ๏ผ๏ผ
*/
public class DatabaseHelper extends SQLiteOpenHelper {
private static final String DATABASE_NAME = "user.db";
private static final int DATABASE_VERSION = 1;
public DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE " + UserContentProviderMetaData.UserTableMetaData.TABLE_NAME + " (" +
UserContentProviderMetaData.UserTableMetaData._ID + " INTEGER PRIMARY KEY," +
UserContentProviderMetaData.UserTableMetaData.PHONE_NAME + " TEXT);"
);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXITS " + UserContentProviderMetaData.UserTableMetaData.TABLE_NAME);
onCreate(db);
}
}
|
[
"zhengyuqin@youmi.net"
] |
zhengyuqin@youmi.net
|
f449db88fd8f1b1b57c20b04f8a72ba9ee72024d
|
fb80fdc722d8ad415a66634f9060043c70191589
|
/src/main/java/hyperskill/inputStreams/CountWords.java
|
cd794796b240812787e0296d4684f15a2609b31c
|
[] |
no_license
|
arturdziocha/learn
|
ee795b09fd8d0ae0022762400b53edb65c6643c3
|
f4396844a733de2c959c64b9251bc766f211b32a
|
refs/heads/master
| 2020-12-22T06:14:55.818022
| 2020-07-31T14:40:11
| 2020-07-31T14:40:11
| 236,692,415
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,179
|
java
|
package hyperskill.inputStreams;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
/*
Read an input text from the console and print the number of words. By word we mean a sequence of characters separated by one or several spaces.
If the input is empty or there are no characters except spaces, print 0.
Sample Input 1:
one two three
Sample Output 1:
3
Sample Input 2:
between us several space characters
Sample Output 2:
5
*/
public class CountWords {
public static void main(String[] args) throws IOException {
try (Reader reader = new BufferedReader(new InputStreamReader(
new ByteArrayInputStream("between us several space characters".getBytes(StandardCharsets.UTF_8))))) {
int b;
StringBuilder line = new StringBuilder();
while ((b = reader.read()) != -1) {
line.append((char) b);
}
System.out.println(
Arrays.stream(
line.toString().split(" "))
.filter(w -> !w.isEmpty()).count());
}
}
}
|
[
"artur.dziocha@gmail.com"
] |
artur.dziocha@gmail.com
|
07be3db334dffb4e27432f2cd85b4bc9d1f212da
|
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
|
/android/support/v4/view/ViewCompatJB.java
|
43c4d46e7a311d17bd0182e96e80056ada034467
|
[] |
no_license
|
swapnilsen/OCR_2
|
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
|
1889d208e17e94a55ddeae91336fe92110e1bd2d
|
refs/heads/master
| 2021-01-20T08:46:03.508508
| 2017-05-03T19:50:52
| 2017-05-03T19:50:52
| 90,187,623
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,354
|
java
|
package android.support.v4.view;
import android.annotation.TargetApi;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.view.View;
import android.view.ViewParent;
@TargetApi(16)
@RequiresApi(16)
class ViewCompatJB {
ViewCompatJB() {
}
public static boolean hasTransientState(View view) {
return view.hasTransientState();
}
public static void setHasTransientState(View view, boolean z) {
view.setHasTransientState(z);
}
public static void postInvalidateOnAnimation(View view) {
view.postInvalidateOnAnimation();
}
public static void postInvalidateOnAnimation(View view, int i, int i2, int i3, int i4) {
view.postInvalidate(i, i2, i3, i4);
}
public static void postOnAnimation(View view, Runnable runnable) {
view.postOnAnimation(runnable);
}
public static void postOnAnimationDelayed(View view, Runnable runnable, long j) {
view.postOnAnimationDelayed(runnable, j);
}
public static int getImportantForAccessibility(View view) {
return view.getImportantForAccessibility();
}
public static void setImportantForAccessibility(View view, int i) {
view.setImportantForAccessibility(i);
}
public static boolean performAccessibilityAction(View view, int i, Bundle bundle) {
return view.performAccessibilityAction(i, bundle);
}
public static Object getAccessibilityNodeProvider(View view) {
return view.getAccessibilityNodeProvider();
}
public static ViewParent getParentForAccessibility(View view) {
return view.getParentForAccessibility();
}
public static int getMinimumWidth(View view) {
return view.getMinimumWidth();
}
public static int getMinimumHeight(View view) {
return view.getMinimumHeight();
}
public static void requestApplyInsets(View view) {
view.requestFitSystemWindows();
}
public static boolean getFitsSystemWindows(View view) {
return view.getFitsSystemWindows();
}
public static boolean hasOverlappingRendering(View view) {
return view.hasOverlappingRendering();
}
public static void setBackground(View view, Drawable drawable) {
view.setBackground(drawable);
}
}
|
[
"swasen@cisco.com"
] |
swasen@cisco.com
|
a0fa28e85e31147d75af57419ab838fc0407c820
|
936aa88990d1e478491aa66627b0263b5590aaa0
|
/Platform/mo-6-content/src/content-define/org/mo/cloud/content/define/frame/FFrameService.java
|
f9fd2cdd7ac7bd39ae7881a7d09b317103b65ae8
|
[] |
no_license
|
favedit/MoCloud3d
|
f6d417412c5686a0f043a2cc53cd34214ee35618
|
ef6116df5b66fbc16468bd5e915ba19bb982d867
|
refs/heads/master
| 2021-01-10T12:12:22.837243
| 2016-02-21T09:05:53
| 2016-02-21T09:05:53
| 48,077,310
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,884
|
java
|
package org.mo.cloud.content.define.frame;
import org.mo.cloud.content.design.configuration.FContentObject;
import org.mo.cloud.content.design.frame.IFrameConsole;
import org.mo.cloud.content.design.persistence.EPersistenceMode;
import org.mo.com.lang.EResult;
import org.mo.com.lang.REnum;
import org.mo.com.lang.RString;
import org.mo.com.xml.FXmlNode;
import org.mo.core.aop.face.ALink;
import org.mo.web.protocol.context.IWebContext;
import org.mo.web.protocol.context.IWebInput;
import org.mo.web.protocol.context.IWebOutput;
//============================================================
// <T>ๅ
ๅฎน่กจๅๆๅกใ</T>
//============================================================
public class FFrameService
implements
IFrameService
{
// ๅญๅจๅ็งฐ
protected String _storageName = "cloud";
// ๅ
ๅฎน่กจๅๆงๅถๅฐๆฅๅฃ
@ALink
protected IFrameConsole _frameConsole;
//============================================================
// <T>ๆ้ ๅ
ๅฎน่กจๅๆๅกใ</T>
//============================================================
public FFrameService(){
}
//============================================================
// <T>ๆฅ่ฏข้
็ฝฎๅค็ใ</T>
//
// @param context ็ฝ็ป็ฏๅข
// @param input ็ฝ็ป่พๅ
ฅ
// @param output ็ฝ็ป่พๅบ
//============================================================
@Override
public EResult query(IWebContext context,
IWebInput input,
IWebOutput output){
// ่ทๅพ่พๅ
ฅ
FXmlNode xinput = input.config();
FXmlNode xoutput = output.config();
EPersistenceMode modeCd = EPersistenceMode.Config;
//............................................................
// ๅๆฐ่ทๅ
String frameName = context.parameter("frame");
if(!RString.isEmpty(frameName)){
String mode = context.parameter("mode_cd");
if(!RString.isEmpty(mode)){
modeCd = REnum.parse(EPersistenceMode.class, mode);
}
FContentObject content = _frameConsole.buildDefine(_storageName, frameName, modeCd);
content.set("name", frameName);
// ่ฝฌๆขๆฐๆฎ
FXmlNode xconfig = xoutput.createNode();
content.saveConfig(xconfig);
return EResult.Success;
}
//............................................................
// ๅ
ๅฎน่ทๅ
for(FXmlNode xframe : xinput){
if(xframe.isName("Frame")){
String name = xframe.get("name");
// ๆฅๆพ็ฎๅฝๅฎไน
FContentObject content = _frameConsole.buildDefine(_storageName, name, modeCd);
content.set("name", name);
// ่ฝฌๆขๆฐๆฎ
FXmlNode xconfig = xoutput.createNode();
content.saveConfig(xconfig);
}
}
return EResult.Success;
}
}
|
[
"favedit@hotmail.com"
] |
favedit@hotmail.com
|
bfd911c340a016039024aa09a3cfd496d1187b93
|
816b5e665d315aee920fca44b32c60ec8bfad7db
|
/domain/net/xidlims/domain/CStaticValue.java
|
8accdebdda97e1bd2ce59a825a134ba6151c8129
|
[] |
no_license
|
iqiangzi/ssdutZhangCC
|
d9c34bde6197f4ccb060cbb1c130713a5663989a
|
f5f7acd9ef45b5022accbdd7f6f730963fe3dddd
|
refs/heads/master
| 2020-08-02T22:07:50.428824
| 2018-05-13T03:03:04
| 2018-05-13T03:03:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,321
|
java
|
package net.xidlims.domain;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
*/
@Entity
@NamedQueries({
@NamedQuery(name = "findAllCStaticValues", query = "select myCStaticValue from CStaticValue myCStaticValue"),
@NamedQuery(name = "findCStaticValueByCode", query = "select myCStaticValue from CStaticValue myCStaticValue where myCStaticValue.code = ?1"),
@NamedQuery(name = "findCStaticValueByCodeContaining", query = "select myCStaticValue from CStaticValue myCStaticValue where myCStaticValue.code like ?1"),
@NamedQuery(name = "findCStaticValueById", query = "select myCStaticValue from CStaticValue myCStaticValue where myCStaticValue.id = ?1"),
@NamedQuery(name = "findCStaticValueByPrimaryKey", query = "select myCStaticValue from CStaticValue myCStaticValue where myCStaticValue.id = ?1"),
@NamedQuery(name = "findCStaticValueByStaticValue", query = "select myCStaticValue from CStaticValue myCStaticValue where myCStaticValue.staticValue = ?1"),
@NamedQuery(name = "findCStaticValueByStaticValueContaining", query = "select myCStaticValue from CStaticValue myCStaticValue where myCStaticValue.staticValue like ?1"),
@NamedQuery(name = "findCStaticValueByValueName", query = "select myCStaticValue from CStaticValue myCStaticValue where myCStaticValue.valueName = ?1"),
@NamedQuery(name = "findCStaticValueByValueNameContaining", query = "select myCStaticValue from CStaticValue myCStaticValue where myCStaticValue.valueName like ?1") })
@Table(catalog = "xidlims", name = "c_static_value")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "xidlims/net/xidlims/domain", name = "CStaticValue")
public class CStaticValue implements Serializable {
private static final long serialVersionUID = 1L;
/**
*/
@Column(name = "id", nullable = false)
@Basic(fetch = FetchType.EAGER)
@GeneratedValue(strategy = GenerationType.AUTO)
@Id
@XmlElement
Integer id;
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
@Column(name = "code")
@Basic(fetch = FetchType.EAGER)
@XmlElement
String code;
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
@Column(name = "value_name")
@Basic(fetch = FetchType.EAGER)
@XmlElement
String valueName;
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
@Column(name = "static_value")
@Basic(fetch = FetchType.EAGER)
@XmlElement
String staticValue;
/**
*/
@Column(name = "academy_number")
@Basic(fetch = FetchType.EAGER)
@XmlElement
String academyNumber;
public String getAcademyNumber() {
return academyNumber;
}
public void setAcademyNumber(String academyNumber) {
this.academyNumber = academyNumber;
}
/**
*/
public void setId(Integer id) {
this.id = id;
}
/**
*/
public Integer getId() {
return this.id;
}
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
public void setCode(String code) {
this.code = code;
}
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
public String getCode() {
return this.code;
}
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
public void setValueName(String valueName) {
this.valueName = valueName;
}
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
public String getValueName() {
return this.valueName;
}
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
public void setStaticValue(String staticValue) {
this.staticValue = staticValue;
}
/**
* ๏ฟฝึต๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ
*
*/
public String getStaticValue() {
return this.staticValue;
}
/**
*/
public CStaticValue() {
}
/**
* Copies the contents of the specified bean into this bean.
*
*/
public void copy(CStaticValue that) {
setId(that.getId());
setCode(that.getCode());
setValueName(that.getValueName());
setStaticValue(that.getStaticValue());
}
/**
* Returns a textual representation of a bean.
*
*/
public String toString() {
StringBuilder buffer = new StringBuilder();
buffer.append("id=[").append(id).append("] ");
buffer.append("code=[").append(code).append("] ");
buffer.append("valueName=[").append(valueName).append("] ");
buffer.append("staticValue=[").append(staticValue).append("] ");
return buffer.toString();
}
/**
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (int) (prime * result + ((id == null) ? 0 : id.hashCode()));
return result;
}
/**
*/
public boolean equals(Object obj) {
if (obj == this)
return true;
if (!(obj instanceof CStaticValue))
return false;
CStaticValue equalCheck = (CStaticValue) obj;
if ((id == null && equalCheck.id != null) || (id != null && equalCheck.id == null))
return false;
if (id != null && !id.equals(equalCheck.id))
return false;
return true;
}
}
|
[
"1501331454@qq.com"
] |
1501331454@qq.com
|
0d91095b6303dd1fddc460d4fa58d12de22c4656
|
42754037c1db6fa6d6bf7331eee167241f3f7550
|
/app/src/main/java/com/journals/ajpbp/model/DashBoardModel.java
|
c4ff003da3e2e70c6a74e5ad53d6e08dd33ede31
|
[] |
no_license
|
suresh429/ajpbp
|
985a6a8447e03cebba536d6e39ab2cbf16b68812
|
278b3ce5f0a94b2b9d06a0806127de5b92661d93
|
refs/heads/master
| 2023-02-09T13:12:11.980434
| 2020-12-29T06:26:04
| 2020-12-29T06:26:04
| 325,204,722
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 396
|
java
|
package com.journals.ajpbp.model;
public class DashBoardModel {
private String dashBoardTitle;
public DashBoardModel(String dashBoardTitle) {
this.dashBoardTitle = dashBoardTitle;
}
public String getDashBoardTitle() {
return dashBoardTitle;
}
public void setDashBoardTitle(String dashBoardTitle) {
this.dashBoardTitle = dashBoardTitle;
}
}
|
[
"ksuresh.unique@gmail.com"
] |
ksuresh.unique@gmail.com
|
95edba3fe94c9933b0fc6a2120ea1ad118143030
|
f222dbc0c70f2372179c01ca9e6f7310ab624d63
|
/soap/src/java/com/zimbra/soap/account/type/Attr.java
|
017614c5a21f5853a9b57147f7de11f117e3b46b
|
[] |
no_license
|
Prashantsurana/zm-mailbox
|
916480997851f55d4b2de1bc8034c2187ed34dda
|
2fb9a0de108df9c2cd530fe3cb2da678328b819d
|
refs/heads/develop
| 2021-01-23T01:07:59.215154
| 2017-05-26T09:18:30
| 2017-05-26T10:36:04
| 85,877,552
| 1
| 0
| null | 2017-03-22T21:23:04
| 2017-03-22T21:23:04
| null |
UTF-8
|
Java
| false
| false
| 6,120
|
java
|
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2016 Synacor, Inc.
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software Foundation,
* version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.soap.account.type;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import com.zimbra.common.service.ServiceException;
import com.zimbra.common.soap.AccountConstants;
import com.zimbra.common.zclient.ZClientException;
import com.zimbra.soap.base.KeyAndValue;
import com.zimbra.soap.type.ZmBoolean;
/**
* e.g. For element named "attr":
* <attr name="{name}" [pd="true"]>{value}</attr>
*
* Note: where the attribute name is "n" rather than "name" use {@link KeyValuePair}
*/
public class Attr implements KeyAndValue {
public static Function<Attr, Attr> COPY = new Function<Attr, Attr>() {
@Override
public Attr apply(Attr from) {
return new Attr(from);
}
};
/**
* @zm-api-field-tag attr-name
* @zm-api-field-description Name of attribute
*/
@XmlAttribute(name=AccountConstants.A_NAME /* name */, required=true)
private String name;
// If true, flags that the real value of this attribute has not been provided - i.e. value is set to ""
/**
* @zm-api-field-tag attr-perm-denied
* @zm-api-field-description Flags whether permission has been denied (optional).
* <br />
* If <b>1 (true)</b>, flags that the real value of this attribute has not been provided.
* <br />
* The value is set to ""
*/
@XmlAttribute(name=AccountConstants.A_PERM_DENIED /* pd */, required=false)
private ZmBoolean permDenied;
/**
* @zm-api-field-tag attr-value
* @zm-api-field-description Value of attribute
*/
@XmlValue
private String value;
public Attr() {
}
public Attr(Attr attr) {
name = attr.getName();
value = attr.getValue();
permDenied = ZmBoolean.fromBool(attr.getPermDenied());
}
public Attr(String name) {
setName(name);
}
public Attr(String name, String value) {
setName(name);
setValue(value);
}
public static Attr forName(String name) {
return new Attr(name);
}
public static Attr forNameAndValue(String name, String value) {
return new Attr(name, value);
}
public static Attr forNameWithPermDenied(String name) {
Attr attr = new Attr(name, "");
attr.setPermDenied(true);
return attr;
}
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public Boolean getPermDenied() { return ZmBoolean.toBool(permDenied); }
public void setPermDenied(Boolean permDenied) { this.permDenied = ZmBoolean.fromBool(permDenied); }
@Override
public String getValue() { return value; }
@Override
public void setValue(String value) { this.value = value; }
@Override
public String toString() {
return Objects.toStringHelper(this)
.add("name", name)
.add("value", value)
.toString();
}
public static Multimap<String, String> toMultimap(List<? extends Attr> attrs) {
Multimap<String, String> map = ArrayListMultimap.create();
if (attrs != null) {
for (Attr a : attrs) {
map.put(a.getName(), a.getValue());
}
}
return map;
}
public static List<Attr> fromMultimap(Multimap<String, String> attrMap) {
List<Attr> attrs = new ArrayList<Attr>();
if (attrMap != null) {
for (Map.Entry<String, String> entry : attrMap.entries()) {
attrs.add(new Attr(entry.getKey(), entry.getValue()));
}
}
return attrs;
}
public static List <Attr> fromMap(Map<String, ? extends Object> attrs)
throws ServiceException {
List<Attr> newAttrs = Lists.newArrayList();
if (attrs == null) return newAttrs;
for (Entry<String, ? extends Object> entry : attrs.entrySet()) {
String key = (String) entry.getKey();
Object value = entry.getValue();
if (value == null) {
newAttrs.add(new Attr(key, (String) null));
} else if (value instanceof String) {
newAttrs.add(new Attr(key, (String) value));
} else if (value instanceof String[]) {
String[] values = (String[]) value;
if (values.length == 0) {
// an empty array == removing the attr
newAttrs.add(new Attr(key, (String) null));
} else {
for (String v: values) {
newAttrs.add(new Attr(key, v));
}
}
} else {
throw ZClientException.CLIENT_ERROR(
"invalid attr type: " + key + " "
+ value.getClass().getName(), null);
}
}
return newAttrs;
}
@Override
public void setKey(String key) { setName(key); }
@Override
public String getKey() { return getName(); }
}
|
[
"shriram.vishwanathan@synacor.com"
] |
shriram.vishwanathan@synacor.com
|
13bef4ef68a3f669810058697171420dbd95825e
|
4694d36492acad39b6464d153e4d3d3ad47c5c57
|
/adcom/adbnsptnr.server/src/main/java/org/adorsys/adbnsptnr/jpa/BpPtnrRole.java
|
6f5c9835f59552ba53b359a6c23c6969a0172bd3
|
[
"Apache-2.0"
] |
permissive
|
francis-pouatcha/adcom
|
36ac7ff33eabb351be78b5555c61498b7bc3de6f
|
0e3ea1ce6c2045d31c7003fc87dbda533c09c767
|
refs/heads/master
| 2021-03-27T20:31:45.315016
| 2015-06-29T09:32:06
| 2015-06-29T09:32:06
| 28,821,594
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 772
|
java
|
package org.adorsys.adbnsptnr.jpa;
import org.adorsys.javaext.description.Description;
@Description("BpPtnrRole_description")
public enum BpPtnrRole
{
@Description("BpPtnrRole_CUSTOMER_description")
CUSTOMER, @Description("BpPtnrRole_SUPPLIER_description")
SUPPLIER, @Description("BpPtnrRole_EMPLOYER_description")
EMPLOYER, @Description("BpPtnrRole_STAFF_description")
STAFF, @Description("BpPtnrRole_MANUFACTURER_description")
MANUFACTURER, @Description("BpPtnrRole_GOVERNMENT_description")
GOVERNMENT, @Description("BpPtnrRole_BROKER_description")
BROKER, @Description("BpPtnrRole_SHAREHOLDER_description")
SHAREHOLDER, @Description("BpPtnrRole_BANKER_description")
BANKER, @Description("BpPtnrRole_INSURANCE_description")
INSURANCE
}
|
[
"francis.pouatcha@adorsys.com"
] |
francis.pouatcha@adorsys.com
|
e31b88100872ef67e86cefed8e657f595b0a1891
|
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/mm/model/c$6.java
|
a9c94dff02f9789a6c7496e4f6fc1967a4020246
|
[] |
no_license
|
linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161282
| 2018-08-28T02:07:02
| 2018-08-28T02:07:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 202
|
java
|
package com.tencent.mm.model;
import com.tencent.mm.bt.h.d;
import com.tencent.mm.storage.h;
class c$6 implements d {
c$6() {
}
public final String[] xb() {
return h.diD;
}
}
|
[
"707194831@qq.com"
] |
707194831@qq.com
|
0627613f3edd58660f0402ca407347f13e3d4637
|
ed4a6183318ae0e1236bcd916290ac6f4cf1d2f8
|
/youlai-gateway/src/main/java/com/youlai/gateway/config/WhiteListConfig.java
|
a8c0bab463d4474ff55c5cdfa9cf98f760542806
|
[
"Apache-2.0"
] |
permissive
|
PanPanda/youlai-mall
|
fdae0fd62f796d9efe9ac75927fac74271aca28c
|
044bdfb031d14ed8fd8086fae372cd2924544002
|
refs/heads/master
| 2023-03-15T07:55:36.521737
| 2021-03-23T08:27:09
| 2021-03-23T08:27:09
| 345,901,318
| 1
| 0
|
Apache-2.0
| 2021-03-23T08:24:45
| 2021-03-09T06:07:51
|
Java
|
UTF-8
|
Java
| false
| false
| 379
|
java
|
package com.youlai.gateway.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import java.util.List;
/**
* ็ฝๅๅ้
็ฝฎ
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "whitelist")
public class WhiteListConfig {
private List<String> urls;
}
|
[
"1490493387@qq.com"
] |
1490493387@qq.com
|
16d4f7377d2c35f941403c193eb575991a53bbc5
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.ocms-OCMS/sources/com/oculus/android/os/internal/UserHandleInternal.java
|
b16666121396b33971205fbf100091d4e3487f65
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 786
|
java
|
package com.oculus.android.os.internal;
import android.os.UserHandle;
import com.facebook.infer.annotation.SuppressLint;
public class UserHandleInternal {
@SuppressLint({"ImprovedNewApi"})
public UserHandle getAll() {
return UserHandle.ALL;
}
@SuppressLint({"ImprovedNewApi"})
public UserHandle getSystem() {
return UserHandle.SYSTEM;
}
@SuppressLint({"InstanceMethodCanBeStatic"})
public UserHandle of(int i) {
return UserHandle.of(i);
}
@SuppressLint({"InstanceMethodCanBeStatic"})
public int getIdentifier(UserHandle userHandle) {
return userHandle.getIdentifier();
}
@SuppressLint({"InstanceMethodCanBeStatic"})
public int getAppId(int i) {
return UserHandle.getAppId(i);
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
f6e24e4fe2631211024a2f4c2181134cd0ba7905
|
f6adfce21fa6ad1b1a26ede927ab9a59bc6ebcef
|
/src/main/java/com/hwq/fundament/JavaDataStructure/linkedList/DoubleLinkedListDemo.java
|
3bbc20f3958ed5bba1286f57ace8d27ae350fa52
|
[
"Apache-2.0"
] |
permissive
|
Evil-king/Fundament
|
1a992e465d857975d0f90f0cee4f1e39137d1bd4
|
fed065ae8dde740f008d3f1c97f9ad63f0f539d1
|
refs/heads/master
| 2022-10-31T22:05:58.938736
| 2022-10-21T12:37:50
| 2022-10-21T12:37:50
| 154,928,494
| 1
| 0
|
Apache-2.0
| 2022-06-17T02:00:46
| 2018-10-27T05:14:02
|
Java
|
UTF-8
|
Java
| false
| false
| 6,274
|
java
|
package com.hwq.fundament.JavaDataStructure.linkedList;
/**
* @Auther: Administrator
* @Date: 2020/2/26 0026 18:27
* @Description:ๅๅ้พ่กจ ๅบๆฌๆ่ทฏๅๅ้กน้พ่กจๅทฎไธๅค
* ้่ฆๆณจๆ็ๆๅ ้ค
*/
public class DoubleLinkedListDemo {
public static void main(String[] args) {
//ๅๅปบ่็น
HeroNode2 heroNode1 = new HeroNode2(1, "ๅฎๆฑ", "ๅๆถ้จ");
HeroNode2 heroNode2 = new HeroNode2(2, "ๅด็จ", "ๆบๅคๆ");
HeroNode2 heroNode3 = new HeroNode2(3, "ๅข็ๆ", "็้บ้บ");
HeroNode2 heroNode4 = new HeroNode2(4, "ๆๅฒ", "่ฑนๅญๅคด");
//ๅๅปบไธไธชๅๅ้พ่กจ
DoubleLinkedList doubleLinkedList = new DoubleLinkedList();
doubleLinkedList.add(heroNode1);
doubleLinkedList.add(heroNode2);
doubleLinkedList.add(heroNode3);
doubleLinkedList.add(heroNode4);
doubleLinkedList.list();
//ไฟฎๆน
HeroNode2 newHeroNode = new HeroNode2(4, "ๅ
ฌๅญ่", "ๅ
ฅไบ้พ");
doubleLinkedList.update(newHeroNode);
System.out.println("ไฟฎๆนๅ็้พ่กจ~~~~");
doubleLinkedList.list();
//ๅ ้ค
doubleLinkedList.delete(4);
System.out.println("ๅ ้คๅ็้พ่กจ~~~~");
doubleLinkedList.list();
}
static class DoubleLinkedList{
//ๅๅงๅไธไธชๅคด่็น๏ผๅคด่็นไธ่ฆๅจ๏ผไธๅญๆพๅ
ทไฝๆฐๆฎ็
private HeroNode2 head = new HeroNode2(0, "", "");
//่ฟๅๅคด็ป็น
public HeroNode2 getHead() {
return head;
}
//้ๅๅๅ้พ่กจ็ๆนๆณ
//ๆพ็คบ้พ่กจ[้ๅ]
public void list() {
//ๅคๆญ้พ่กจๆฏๅฆไธบ็ฉบ
if (head.next == null) {
System.out.println("้ๅๆถ้พ่กจไธบ็ฉบ~");
return;
}
HeroNode2 temp = head.next;
while (true) {
//ๅคๆญๆฏๅฆๅฐ้พ่กจๆๅ
if (temp == null) {
break;
}
//่พๅบ่็นไฟกๆฏ
System.out.println(temp);
//ๅฐtempๅ็งป๏ผไธๅฎ่ฆ่ฎฐๅพ
temp = temp.next;
}
}
//ๆทปๅ ่็นๅฐๅ้พ่กจๆ่ทฏ(ไธ่่ๆๅบ)๏ผ
//1ใๆพๅฐๅฝๅ่็น็ๆๅ่็น
//2ใๅฐๆๅ่็น็nextๆๅๆฐ็่็น
public void add(HeroNode2 heroNode) {
//ๅ ไธบๅคด่็นไธ่ฝๅจ๏ผๆไปฌ้่ฆไธไธช่พ
ๅฉ้ๅ็ไธดๆถ่็นtemp
HeroNode2 temp = head;
//้ๅ้พ่กจ๏ผๆพๅฐๆๅ
while (true) {
//ๆพๅฐๆๅ
if (temp.next == null) {
break;
}
//ๅฆๆๆฒกๆๆพๅฐ๏ผๅๅฐtempๅ็งป็ปง็ปญๆพ
temp = temp.next;
}
//ๅฝ้ๅบwhileๅพช็ฏๆถ๏ผtempๅฐฑๆๅไบ้พ่กจ็ๆๅ
//ๅฝขๆไธไธชๅๅ้พ่กจ =ๅทๅฐฑ็ธๅฝไบๆ้
temp.next = heroNode;
heroNode.pre = temp;
}
//ๆ นๆฎnewHeroNode็no ๆฅไฟฎๆนๅณๅฏ
public void update(HeroNode2 newHeroNode) {
//ๅคๆญๆฏๅฆไธบ็ฉบ
if (head.next == null) {
System.out.println("้พ่กจไธบ็ฉบ~");
return;
}
//ๅฎไนไธไธช่พ
ๅฉๅ้
HeroNode2 temp = head.next;
//้ๅ้พ่กจ
boolean flag = false;
while (true) {
if (temp == null) {
break;//ๅทฒ็ป้ๅๅฎ้พ่กจ
}
if (temp.no == newHeroNode.no) {
//่ฏดๆๆพๅฐไบ
flag = true;
break;
}
temp = temp.next;
}
if (flag) {
temp.name = newHeroNode.name;
temp.nickName = newHeroNode.nickName;
} else {
System.out.printf("ๆฒกๆๆพๅฐ ็ผๅท%d็่็น๏ผไธ่ฝไฟฎๆน\n", newHeroNode.no);
}
}
/**
* ไปๅๅ้พ่กจไธญๅ ้คไธไธช่็น
* ่ฏดๆ
* 1ใๅฏนไบๅๅ้พ่กจ๏ผๆไปฌๅฏไปฅ็ดๆฅๆพๅฐ่ฆๅ ้ค็่ฟไธช่็น
* 2ใๆพๅฐๅ๏ผ่ชๆๅ ้คๅณๅฏ
* @param no
*/
public void delete(int no) {
//ๅคๆญๅฝๅ้พ่กจๆฏๅฆไธบ็ฉบ
if (head.next == null){
System.out.println("้พ่กจไธบ็ฉบ๏ผๆ ๆณๅ ้ค");
return;
}
HeroNode2 temp = head.next;//่พ
ๅฉๅ้(ๆ้)
boolean flag = false;
while (true) {
if (temp == null) { //ๅทฒ็ปๅฐ้พ่กจๆๅ
break;
}
if (temp.no == no) { //่ฏดๆๆพๅฐไบ
flag = true;
break;
}
temp = temp.next;
}
if (flag) {
//ๆพๅฐไบ้่ฆๅ ้ค็่็น๏ผๅฐ temp.next = temp.next.next
//temp.next = temp.next.next;
//ๅๅ้พ่กจ็ๅ ้ค
temp.pre.next = temp.next;
//ๅฆๆๆฏๆๅไธไธช่็น๏ผๅฐฑไธ้่ฆๆง่กไธ้ข่ฟๅฅ่ฏ๏ผๅฆๅไผๅบ็ฐ็ฉบๆ้
if(temp.next != null){
temp.next.pre = temp.pre;
}
} else {
System.out.println("้่ฆๅ ้ค็่็นไธๅญๅจ");
}
}
}
//ๅฎไนHeroNode๏ผๆฏไธชHeroNodeๅฏน่ฑกๅฐฑๆฏไธไธช่็น
static class HeroNode2 {
private int no;
private String name;
private String nickName;
public HeroNode2 next;//ๆๅไธไธไธช่็น ้ป่ฎคไธบnull
public HeroNode2 pre;//ๆๅๅไธไธช่็น ้ป่ฎคไธบnull
public HeroNode2(int no, String name, String nickname) {
this.no = no;
this.name = name;
this.nickName = nickname;
}
@Override
public String toString() {
return "HeroNode{" +
"no=" + no +
", name='" + name + '\'' +
", nickName='" + nickName + '\'' +
'}';
}
}
}
|
[
"hwq8910@163.com"
] |
hwq8910@163.com
|
2a85a8f9dc41bdd22718e519061b2a66a4cdf82b
|
63f579466b611ead556cb7a257d846fc88d582ed
|
/XDRValidator/src/main/java/generated/IntrasternalRoute.java
|
943c3aaf61e6a4fb50d0c8d53b71a359c2b40cee
|
[] |
no_license
|
svalluripalli/soap
|
14f47b711d63d4890de22a9f915aed1bef755e0b
|
37d7ea683d610ab05477a1fdb4e329b5feb05381
|
refs/heads/master
| 2021-01-18T20:42:09.095152
| 2014-05-07T21:16:36
| 2014-05-07T21:16:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,043
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.05.07 at 05:07:17 PM EDT
//
package generated;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for IntrasternalRoute.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="IntrasternalRoute">
* <restriction base="{}cs">
* <enumeration value="ISTERINJ"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "IntrasternalRoute")
@XmlEnum
public enum IntrasternalRoute {
ISTERINJ;
public String value() {
return name();
}
public static IntrasternalRoute fromValue(String v) {
return valueOf(v);
}
}
|
[
"konkapv@NCI-01874632-L.nci.nih.gov"
] |
konkapv@NCI-01874632-L.nci.nih.gov
|
8f4dc8ece1a66aeef3c758e0e06948165704019e
|
f3d7b495fd46c5ac99701188545d2bd9a2b7f502
|
/src/com/rc/openapi/dao/impl/TPromotionDAOImpl.java
|
7d0f07a10a82dcd0d984e878768c588491a7b09f
|
[] |
no_license
|
AdorkDean/111_yao_app_mobile
|
408067a16d6a6a219b93d37531c58236a93eae49
|
37bbc9f86977f4c5a803223fc85d022c36228807
|
refs/heads/master
| 2020-03-12T19:27:51.592084
| 2016-12-03T10:11:40
| 2016-12-03T10:11:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,163
|
java
|
package com.rc.openapi.dao.impl;
import java.sql.SQLException;
import java.util.List;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.rc.app.framework.webapp.model.page.PageManager;
import com.rc.app.framework.webapp.model.page.PageWraper;
import com.rc.openapi.dao.TPromotionDAO;
import com.rc.openapi.vo.TPromotion;
import com.rc.openapi.vo.TPromotionExample;
public class TPromotionDAOImpl implements TPromotionDAO {
private SqlMapClient sqlMapClient;
public void setSqlMapClient(SqlMapClient sqlMapClient) {
this.sqlMapClient = sqlMapClient;
}
public SqlMapClient getSqlMapClient() {
return sqlMapClient;
}
public TPromotionDAOImpl() {
super();
}
public TPromotionDAOImpl(SqlMapClient sqlMapClient) {
super();
this.sqlMapClient = sqlMapClient;
}
public int countByExample(TPromotionExample example) throws SQLException {
Integer count = (Integer) sqlMapClient.queryForObject("t_promotion.ibatorgenerated_countByExample", example);
return count.intValue();
}
public int deleteByExample(TPromotionExample example) throws SQLException {
int rows = sqlMapClient.delete("t_promotion.ibatorgenerated_deleteByExample", example);
return rows;
}
public int deleteByPrimaryKey(Long id) throws SQLException {
TPromotion key = new TPromotion();
key.setId(id);
int rows = sqlMapClient.delete("t_promotion.ibatorgenerated_deleteByPrimaryKey", key);
return rows;
}
public Long insert(TPromotion record) throws SQLException {
return (Long) sqlMapClient.insert("t_promotion.ibatorgenerated_insert", record);
}
public Long insertSelective(TPromotion record) throws SQLException {
return (Long) sqlMapClient.insert("t_promotion.ibatorgenerated_insertSelective", record);
}
public List selectByExample(TPromotionExample example) throws SQLException {
List list = sqlMapClient.queryForList("t_promotion.ibatorgenerated_selectByExample", example);
return list;
}
public TPromotion selectByPrimaryKey(Long id) throws SQLException {
TPromotion key = new TPromotion();
key.setId(id);
TPromotion record = (TPromotion) sqlMapClient.queryForObject("t_promotion.ibatorgenerated_selectByPrimaryKey", key);
return record;
}
public int updateByExampleSelective(TPromotion record, TPromotionExample example) throws SQLException {
UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
int rows = sqlMapClient.update("t_promotion.ibatorgenerated_updateByExampleSelective", parms);
return rows;
}
public int updateByExample(TPromotion record, TPromotionExample example) throws SQLException {
UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
int rows = sqlMapClient.update("t_promotion.ibatorgenerated_updateByExample", parms);
return rows;
}
public int updateByPrimaryKeySelective(TPromotion record) throws SQLException {
int rows = sqlMapClient.update("t_promotion.ibatorgenerated_updateByPrimaryKeySelective", record);
return rows;
}
public int updateByPrimaryKey(TPromotion record) throws SQLException {
int rows = sqlMapClient.update("t_promotion.ibatorgenerated_updateByPrimaryKey", record);
return rows;
}
private static class UpdateByExampleParms extends TPromotionExample {
private Object record;
public UpdateByExampleParms(Object record, TPromotionExample example) {
super(example);
this.record = record;
}
public Object getRecord() {
return record;
}
}
public PageWraper selectByRepositoryByPage(TPromotionExample example) throws SQLException {
PageWraper pw=null;
int count=this.countByExample(example);
List list = sqlMapClient.queryForList("t_promotion.selectByExampleByPage", example);
System.out.println("๏ฟฝ๏ฟฝิด๏ฟฝ๏ฟฝาณ๏ฟฝ๏ฟฝัฏlist.size="+list.size());
pw=PageManager.getPageWraper(example.getPageInfo(), list, count);
return pw;
}
}
|
[
"tzmarlon@163.com"
] |
tzmarlon@163.com
|
e279c7167f145b323ce744a98148ba942663f1b9
|
167c6226bc77c5daaedab007dfdad4377f588ef4
|
/java/ql/test/stubs/javafx-web/javafx/beans/property/ReadOnlyStringProperty.java
|
2a245ee1b0ad3533fde78d2a8ced4fbf8fd27a95
|
[
"MIT"
] |
permissive
|
github/codeql
|
1eebb449a34f774db9e881b52cb8f7a1b1a53612
|
d109637e2d7ab3b819812eb960c05cb31d9d2168
|
refs/heads/main
| 2023-08-20T11:32:39.162059
| 2023-08-18T14:33:32
| 2023-08-18T14:33:32
| 143,040,428
| 5,987
| 1,363
|
MIT
| 2023-09-14T19:36:50
| 2018-07-31T16:35:51
|
CodeQL
|
UTF-8
|
Java
| false
| false
| 418
|
java
|
// Generated automatically from javafx.beans.property.ReadOnlyStringProperty for testing purposes
package javafx.beans.property;
import javafx.beans.binding.StringExpression;
import javafx.beans.property.ReadOnlyProperty;
abstract public class ReadOnlyStringProperty extends StringExpression implements ReadOnlyProperty<String>
{
public ReadOnlyStringProperty(){}
public String toString(){ return null; }
}
|
[
"kaeluka@github.com"
] |
kaeluka@github.com
|
db772f27079a99be7d4b79fcad355ef9dd56da7e
|
ad50e2c2bd017372a21daade1604ad5f17e6639d
|
/app/src/main/java/com/teamleaf/samplestickerapp/Fragments/homeFragment.java
|
65f461233d0a34da0f80dda5b579b853a009a86d
|
[] |
no_license
|
anandkrrai/WhatsappStickrs
|
36847ba92eca7683bb124bd33bb18a22254d1682
|
941b4e8505e971e8985c568f4f7d8b745fc22ab3
|
refs/heads/master
| 2020-04-05T17:56:49.676646
| 2018-11-17T18:59:03
| 2018-11-17T18:59:03
| 157,082,574
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 708
|
java
|
package com.teamleaf.samplestickerapp.Fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.teamleaf.samplestickerapp.R;
public class homeFragment extends Fragment {
public homeFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
return view;
}
}
|
[
"kumar.anand.rai@gmail.com"
] |
kumar.anand.rai@gmail.com
|
8f6e90cfca6d46c144c736557fd423dcb0ea55eb
|
e96172bcad99d9fddaa00c25d00a319716c9ca3a
|
/plugin/src/test/resources/codeInsight/daemonCodeAnalyzer/lambda/graphInference/InferenceFromSiblings.java
|
1cad86808b98945503938a92c6b370f5fde584cd
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-java
|
8c1633d485833651e2a9ecda43e27c3cbfa70a8a
|
a96757bc015eff692571285c0a10a140c8c721f8
|
refs/heads/master
| 2023-09-03T12:33:23.746878
| 2023-08-29T07:26:25
| 2023-08-29T07:26:25
| 13,799,330
| 5
| 4
|
Apache-2.0
| 2023-01-03T08:32:23
| 2013-10-23T09:56:39
|
Java
|
UTF-8
|
Java
| false
| false
| 553
|
java
|
import java.util.*;
class Main {
void test(List<Integer> li) {
Fun<Stream<Integer>, Stream<Integer>> f = s -> s.substr(0);
foo(li, f, Collections.emptyList());
foo(li, s -> s.substr(0), Collections.emptyList());
}
<T, U, S_OUT extends Stream<U>, It extends Iterable<U>> Collection<U>
foo(Collection<T> coll, Fun<Stream<T>, S_OUT> f, It it) {
return null;
}
interface Stream<T> {
Stream<T> substr(long startingOffset);
}
interface Fun<T, R> {
R _(T t);
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
f67e38c837b4219e29d2be16fcdc5d1e63157673
|
00ad2e61e469488ef34a8ab93d1a0c9e68e99caf
|
/yiranpay/yiranpay-member/src/main/java/com/yiranpay/member/service/impl/MemberTrVerifyEntityServiceImpl.java
|
338344d3f278064cee25322bbf92f06101c5f9d7
|
[
"MIT"
] |
permissive
|
panda726548/yiranpay
|
13e77b620c76ef5778560ad2ef0833ae48555a4a
|
38523749bd2e00a003637f785289e21f6bf7e6dd
|
refs/heads/master
| 2023-07-11T05:48:54.645886
| 2023-07-02T11:38:48
| 2023-07-02T11:38:48
| 285,158,256
| 81
| 45
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,929
|
java
|
package com.yiranpay.member.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiranpay.member.mapper.MemberTmMemberMapper;
import com.yiranpay.member.mapper.MemberTrVerifyEntityMapper;
import com.yiranpay.member.mapper.MemberTrVerifyRefMapper;
import com.yiranpay.common.core.text.Convert;
import com.yiranpay.member.constant.MaConstant;
import com.yiranpay.member.domain.MemberIdentity;
import com.yiranpay.member.domain.MemberTmMember;
import com.yiranpay.member.domain.MemberTrVerifyEntity;
import com.yiranpay.member.domain.MemberTrVerifyRef;
import com.yiranpay.member.domain.Verify;
import com.yiranpay.member.enums.ResponseCode;
import com.yiranpay.member.enums.VerifyStatusEnum;
import com.yiranpay.member.enums.VerifyTypeEncryptMappingEnum;
import com.yiranpay.member.exception.MaBizException;
import com.yiranpay.member.exception.MaIllegalArgumentException;
import com.yiranpay.member.service.IMemberTrVerifyEntityService;
import com.yiranpay.member.utils.VerifyDomainUtil;
/**
* ่ฎค่ฏๅฎไฝ ๆๅกๅฑๅฎ็ฐ
*
* @author yiran
* @date 2019-03-30
*/
@Service
public class MemberTrVerifyEntityServiceImpl implements IMemberTrVerifyEntityService
{
private final static int MAX_COUNT = -1;
@Autowired
private MemberTrVerifyEntityMapper memberTrVerifyEntityMapper;
@Autowired
private MemberTrVerifyRefMapper memberTrVerifyRefMapper;
@Autowired
private MemberTmMemberMapper memberTmMemberMapper;
/**
* ๆฅ่ฏข่ฎค่ฏๅฎไฝไฟกๆฏ
*
* @param verifyEntityId ่ฎค่ฏๅฎไฝID
* @return ่ฎค่ฏๅฎไฝไฟกๆฏ
*/
@Override
public MemberTrVerifyEntity selectMemberTrVerifyEntityById(Integer verifyEntityId)
{
return memberTrVerifyEntityMapper.selectMemberTrVerifyEntityById(verifyEntityId);
}
/**
* ๆฅ่ฏข่ฎค่ฏๅฎไฝๅ่กจ
*
* @param memberTrVerifyEntity ่ฎค่ฏๅฎไฝไฟกๆฏ
* @return ่ฎค่ฏๅฎไฝ้ๅ
*/
@Override
public List<MemberTrVerifyEntity> selectMemberTrVerifyEntityList(MemberTrVerifyEntity memberTrVerifyEntity)
{
return memberTrVerifyEntityMapper.selectMemberTrVerifyEntityList(memberTrVerifyEntity);
}
/**
* ๆฐๅข่ฎค่ฏๅฎไฝ
*
* @param memberTrVerifyEntity ่ฎค่ฏๅฎไฝไฟกๆฏ
* @return ็ปๆ
*/
@Override
public int insertMemberTrVerifyEntity(MemberTrVerifyEntity memberTrVerifyEntity)
{
return memberTrVerifyEntityMapper.insertMemberTrVerifyEntity(memberTrVerifyEntity);
}
/**
* ไฟฎๆน่ฎค่ฏๅฎไฝ
*
* @param memberTrVerifyEntity ่ฎค่ฏๅฎไฝไฟกๆฏ
* @return ็ปๆ
*/
@Override
public int updateMemberTrVerifyEntity(MemberTrVerifyEntity memberTrVerifyEntity)
{
return memberTrVerifyEntityMapper.updateMemberTrVerifyEntity(memberTrVerifyEntity);
}
/**
* ๅ ้ค่ฎค่ฏๅฎไฝๅฏน่ฑก
*
* @param ids ้่ฆๅ ้ค็ๆฐๆฎID
* @return ็ปๆ
*/
@Override
public int deleteMemberTrVerifyEntityByIds(String ids)
{
return memberTrVerifyEntityMapper.deleteMemberTrVerifyEntityByIds(Convert.toStrArray(ids));
}
@Override
public List<MemberTrVerifyEntity> queryByMember(String memberId, Integer verifyType) {
List<MemberTrVerifyEntity> verifys = new ArrayList<MemberTrVerifyEntity>();
//ๆ นๆฎไผๅID่ทๅ่ฎค่ฏๅ
ณ็ณป ๅฏน่ฑก้ๅ
List<MemberTrVerifyRef> verifyRefList = memberTrVerifyRefMapper.selectMemberTrVerifyRefByMemberId(memberId);
if(verifyRefList !=null && verifyRefList.size() > 0){
for (MemberTrVerifyRef memberTrVerifyRef : verifyRefList) {
List<MemberTrVerifyEntity> verifyQuerys = memberTrVerifyEntityMapper.queryByMemberAndVerifyType(
memberTrVerifyRef.getVerifyEntityId(), verifyType);
if (!(verifyQuerys == null || verifyQuerys.isEmpty())) {
for (MemberTrVerifyEntity item : verifyQuerys) {
verifys.add(item);
}
}
}
}
return verifys;
}
@Override
public void addVerifys(List<MemberTrVerifyEntity> verifys, String memberId) {
if (verifys == null || verifys.size() == 0) {
return;
}
//ๆๆบๅ้ฎ็ฎฑๅช่ฝ็ปๅฎไธไธชไผๅ
for (MemberTrVerifyEntity v : verifys) {
checkVerify(v,memberId);
int verifyEntityId = memberTrVerifyEntityMapper.insertMemberTrVerifyEntity(v);
MemberTrVerifyRef memberTrVerifyRef =new MemberTrVerifyRef();
memberTrVerifyRef.setMemberId(memberId);
memberTrVerifyRef.setVerifyEntityId(verifyEntityId);
memberTrVerifyRef.setExpireTime(v.getExpireTime());
memberTrVerifyRef.setVerifyImgPath(v.getVerifyImgPath());
memberTrVerifyRef.setVerifiedTime(v.getVerifiedTime());
memberTrVerifyRef.setStatus(VerifyStatusEnum.AUTHENTICATED.getCode().intValue());
memberTrVerifyRefMapper.insertMemberTrVerifyRef(memberTrVerifyRef);
}
}
/*
* ๆๆบๅ้ฎ็ฎฑๅช่ฝ็ปๅฎไธไธชไผๅ
*/
private void checkVerify(MemberTrVerifyEntity verify,String memberId) {
//ๆๆบๅทๆ่
้ฎ็ฎฑๆฅ่ฏขๆฏๅฆๅทฒ็ป่ขซ็ปๅฎ
MemberTrVerifyEntity v = memberTrVerifyEntityMapper.selectMemberTrVerifyEntityByVerifyEntity(verify.getVerifyEntity());
if(v!=null){
MemberTrVerifyRef vr = memberTrVerifyRefMapper.selectMemberTrVerifyRefByverifyEntityId(v.getVerifyEntityId());
if(memberId.equals(vr.getMemberId())){
throw new MaIllegalArgumentException("่ฏฅไผๅๅทฒ็ป่ฎค่ฏ");
}
}
}
@Override
public MemberTrVerifyEntity selectMemberTrVerifyEntityById(Integer verifyEntityId, Integer verifyType) {
List<MemberTrVerifyEntity> list = memberTrVerifyEntityMapper.queryByMemberAndVerifyType(verifyEntityId,verifyType);
if(list.size() > 0){
return list.get(0);
}
return null;
}
}
|
[
"498617606@qq.com"
] |
498617606@qq.com
|
1f30759b2005991bf4e2e8dab8f28cff27ccc7ef
|
19490fcc6f396eeb35a9234da31e7b615abf6d04
|
/JDBrowser/src/jd/http/requests/FormData.java
|
029f58d52e0908839ab8613f9c572e6092ee1396
|
[] |
no_license
|
amicom/my-project
|
ef72026bb91694e74bc2dafd209a1efea9deb285
|
951c67622713fd89448ffe6e0983fe3f934a7faa
|
refs/heads/master
| 2021-01-02T09:15:45.828528
| 2015-09-06T15:57:01
| 2015-09-06T15:57:01
| 41,953,961
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,726
|
java
|
// jDownloader - Downloadmanager
// Copyright (C) 2009 JD-Team support@jdownloader.org
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.http.requests;
import java.io.File;
/**
* In many cases, the purpose of an HTML Form is to send data to a server. The server will process the data and then send a response to the
* user. Files are a special case with HTML forms. They are binary dataโor considered as suchโwhere all others data are text data. Because
* HTTP is a text protocol, there are special requirements to handle binary data. This class is simple POJO holding {@link File} reference,
* byte[] of data, a type and a name.
*/
public class FormData {
/**
* enumeration of FormData types
*/
public static enum Type {
DATA,
FILE,
VARIABLE
}
/** default MIME type: {@value #DEFAULT_MIME} */
private static final String DEFAULT_MIME = "application/octet-stream";
/** data byte array */
private byte[] data;
/** file */
private File file;
/** the Multipurpose Internet Mail Extensions */
private String mime;
/** The name. */
private String name;
/** The type. */
private final Type type;
/** The value. */
private final String value;
/**
* constructor
*
* @param name
* the name
* @param value
* the value
*/
public FormData(final String name, final String value) {
this.type = Type.VARIABLE;
this.name = name;
this.value = value;
}
/**
* constructor
*
* @param name
* the name
* @param filename
* the filename
* @param data
* the data
*/
public FormData(final String name, final String filename, final byte[] data) {
this(name, filename, null, data);
}
/**
* constructor
*
* @param name
* the name
* @param filename
* the filename
* @param file
* the file
*/
public FormData(final String name, final String filename, final File file) {
this(name, filename, null, file);
}
/**
* constructor
*
* @param name
* the name
* @param filename
* the filename
* @param mime
* the mime
* @param data
* the data
*/
public FormData(final String name, final String filename, final String mime, final byte[] data) {
this.mime = mime == null ? DEFAULT_MIME : mime;
this.type = Type.DATA;
this.name = name;
this.value = filename;
this.data = data;
}
/**
* constructor
*
* @param name
* the name
* @param filename
* the filename
* @param mime
* the mime
* @param file
* the file
*/
public FormData(final String name, final String filename, final String mime, final File file) {
this.mime = mime == null ? DEFAULT_MIME : mime;
this.type = Type.FILE;
this.name = name;
this.value = filename;
this.file = file;
}
/**
* @return the data byte[]
*/
public byte[] getData() {
return data;
}
/**
* @return the mime data type
*/
public String getDataType() {
return this.mime;
}
/**
* @return the file
*/
public File getFile() {
return file;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @return the type
*/
public Type getType() {
return type;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
/**
* Sets the name.
*
* @param name
* the new name
*/
public void setName(final String name) {
this.name = name;
}
}
|
[
"amicom.pro@gmail.com"
] |
amicom.pro@gmail.com
|
2cd065421d8f9aa16e4df25e0e947e5d5eb51328
|
7f31ba50c2b1f37404d507157058038acccd0a4a
|
/src/main/java/com/umasuo/product/domain/model/TestUnion.java
|
8395e1d3d9dfb575b8ff15373839300e55dbd178
|
[] |
no_license
|
umasuo/product
|
39b6ed8f301cbed05a14936acf3aeeb72006b237
|
40d257b6272faae16d04e6e47301f91d447faac7
|
refs/heads/master
| 2021-06-22T12:49:26.772222
| 2017-09-07T07:49:01
| 2017-09-07T07:49:01
| 84,195,957
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 478
|
java
|
package com.umasuo.product.domain.model;
import lombok.Data;
import java.io.Serializable;
import javax.persistence.Embeddable;
/**
* ็จไบๅผๅๆต่ฏ็unionIdๅsecretKey.
*/
@Data
@Embeddable
public class TestUnion implements Serializable{
/**
* The serialVersionUID.
*/
private static final long serialVersionUID = 843509058285040638L;
/**
* The unionId.
*/
private String unionId;
/**
* The secretKey.
*/
private String secretKey;
}
|
[
"davis.dai@go6d.com"
] |
davis.dai@go6d.com
|
9bafa26d0cc41517101795bdd99fb86ad0306a00
|
ef87f1c3398d033e2e880f8fdfb8c2410e79f553
|
/abce36/src/main/java/com/fastcode/abce36/domain/core/country/ICountryRepository.java
|
04b03621faa35e850aa7a06515eab505ac584335
|
[] |
no_license
|
musman013/musman013-sampleApplication-1
|
b40662ad1b3f78b2898381834012dd2bb17ed16a
|
493966ae8e5aa8666b298f7c302679bea4be9625
|
refs/heads/master
| 2023-02-08T16:28:42.116109
| 2021-01-01T08:46:00
| 2021-01-01T08:46:00
| 325,945,469
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 432
|
java
|
package com.fastcode.abce36.domain.core.country;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;
import java.util.*;
import java.time.*;
@Repository("countryRepository")
public interface ICountryRepository extends JpaRepository<CountryEntity, Integer>,QuerydslPredicateExecutor<CountryEntity> {
}
|
[
"info@nfinityllc.com"
] |
info@nfinityllc.com
|
fcbdb94a3cc0f505eec1ec2e0c60b797a7c106d8
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module1255/src/main/java/module1255packageJava0/Foo24.java
|
5d9a05edfbc5608d12204a273fbc036c96ae6874
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 431
|
java
|
package module1255packageJava0;
import java.lang.Integer;
public class Foo24 {
Integer int0;
Integer int1;
public void foo0() {
new module1255packageJava0.Foo23().foo6();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
f461fc6c1559694585e3160b3e49c944c0b1788e
|
f3f93c4ea9a4996eacf1ef1d643aef5fa214e6f9
|
/src/main/java/com/ankamagames/dofus/core/network/Crypto.java
|
e454dbc8941ad57cad91a73529e675505872d63a
|
[
"MIT"
] |
permissive
|
ProjectBlackFalcon/BlackFalconAPI
|
fb94774056eacd053b3daf0931a9ef9c0fb477f6
|
b038f2f1bc300e549b5f6469c82530b6245f54e2
|
refs/heads/master
| 2022-12-05T09:58:36.499535
| 2019-10-02T21:58:54
| 2019-10-02T21:58:54
| 188,725,082
| 6
| 0
|
MIT
| 2022-11-16T12:22:14
| 2019-05-26T19:49:10
|
Java
|
UTF-8
|
Java
| false
| false
| 4,291
|
java
|
package com.ankamagames.dofus.core.network;
import java.io.ByteArrayOutputStream;
import java.nio.charset.Charset;
import java.security.KeyFactory;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import com.ankamagames.dofus.network.utils.DofusDataWriter;
public class Crypto {
private static final int AES_KEY_LENGTH = 32;
private static byte[] AES_KEY;
private static final String PUBLIC_KEY =
"MIIBUzANBgkqhkiG9w0BAQEFAAOCAUAAMIIBOwKCATIAgucoka9J2PXcNdjcu6CuDmgteIMB+rih"+
"2UZJIuSoNT/0J/lEKL/W4UYbDA4U/6TDS0dkMhOpDsSCIDpO1gPG6+6JfhADRfIJItyHZflyXNUj"+
"WOBG4zuxc/L6wldgX24jKo+iCvlDTNUedE553lrfSU23Hwwzt3+doEfgkgAf0l4ZBez5Z/ldp9it"+
"2NH6/2/7spHm0Hsvt/YPrJ+EK8ly5fdLk9cvB4QIQel9SQ3JE8UQrxOAx2wrivc6P0gXp5Q6bHQo"+
"ad1aUp81Ox77l5e8KBJXHzYhdeXaM91wnHTZNhuWmFS3snUHRCBpjDBCkZZ+CxPnKMtm2qJIi57R"+
"slALQVTykEZoAETKWpLBlSm92X/eXY2DdGf+a7vju9EigYbX0aXxQy2Ln2ZBWmUJyZE8B58CAwEA"+
"AQ==";
public static byte[] encrypt(byte[] encryptedKey, String login, String password, String salt) throws Exception {
byte[] decryptedKey = decryptReceivedKey(encryptedKey);
return encryptCredentials(decryptedKey, login, password, salt);
}
private static byte[] decryptReceivedKey(byte[] receivedKey) {
byte[] resultKey = null;
try {
byte[] decodedKey = Base64.getDecoder().decode(PUBLIC_KEY);
X509EncodedKeySpec spec = new X509EncodedKeySpec(decodedKey);
KeyFactory kf = KeyFactory.getInstance("RSA");
RSAPublicKey pk = (RSAPublicKey) kf.generatePublic(spec);
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.DECRYPT_MODE, pk);
resultKey = cipher.doFinal(receivedKey);
} catch (Exception e) {
e.printStackTrace();
}
return resultKey;
}
private static byte[] encryptCredentials(byte[] key, String login, String password, String salt) throws Exception {
byte[] encryptedCredentials = null;
ByteArrayOutputStream ous = new ByteArrayOutputStream();
DofusDataWriter buffer = new DofusDataWriter(ous);
buffer.write(salt.getBytes());
buffer.write(generateRandomAESKey());
buffer.writeByte((byte)login.length());
buffer.write(login.getBytes());
buffer.write(password.getBytes());
try {
KeyFactory kf = KeyFactory.getInstance("RSA");
X509EncodedKeySpec x509 = new X509EncodedKeySpec(key);
RSAPublicKey publicKey = (RSAPublicKey) kf.generatePublic(x509);
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
encryptedCredentials = cipher.doFinal(ous.toByteArray());
} catch (Exception e) {
e.printStackTrace();
}
return encryptedCredentials;
}
private static byte[] generateRandomAESKey() throws Exception {
ByteArrayOutputStream ous = new ByteArrayOutputStream();
DofusDataWriter array = new DofusDataWriter(ous);
for(int i = 0; i < AES_KEY_LENGTH; ++i)
array.writeByte((byte)Math.floor(Math.random() * 256));
AES_KEY = ous.toByteArray();
return ous.toByteArray();
}
public static String decryptAESkey(byte[] encryptedData)
{
try
{
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
byte[] iv = new byte[cipher.getBlockSize()];
System.arraycopy(AES_KEY, 0, iv, 0, 16);
IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
SecretKeySpec secretKey = new SecretKeySpec(AES_KEY, "AES");
cipher.init(Cipher.DECRYPT_MODE, secretKey,ivParameterSpec);
byte[] resultbytes = cipher.doFinal(encryptedData);
return new String(resultbytes,Charset.forName("utf-8"));
}
catch (Exception e)
{
e.printStackTrace();
}
return null;
}
}
|
[
"baptiste.beduneau@reseau.eseo.fr"
] |
baptiste.beduneau@reseau.eseo.fr
|
592c9e92cd807447c5902c481045ae8197376086
|
f98002d6186eb2079730f6a41782a808b15fa407
|
/src/meshi/energy/hydrogenBond/GoodResiduesForHB.java
|
47b31659770ef784cdc1b8793b75cf57661b2a9c
|
[] |
no_license
|
ZivBA/CrysHomModeling
|
7d6a79fbbdd9d0c0191cd41bc01b679534bf1feb
|
3df2ec6dcd35586568d190497af6a4d9e40535fd
|
refs/heads/master
| 2021-06-28T18:35:24.297893
| 2017-07-31T07:16:36
| 2017-07-31T07:16:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,548
|
java
|
package meshi.energy.hydrogenBond;
import meshi.geometry.Distance;
import meshi.geometry.DistanceList;
import meshi.molecularElements.Atom;
import meshi.util.filters.Filter;
import java.util.Iterator;
public class GoodResiduesForHB implements Filter {
private final IsHO isHO = new IsHO();
private final IsNot13 isNot13 = new IsNot13();
private final GoodSS goodSS = new GoodSS();
private boolean firstTimeWornning = true;
private DistanceList specialDis = null;
public GoodResiduesForHB(){}
public GoodResiduesForHB(DistanceList disList){
specialDis = disList;
}
public boolean accept(Object obj) {
Distance distance = (Distance)obj;
boolean ans = isHO.accept(obj) && isNot13.accept(obj) && goodSS.accept(obj);
if (!ans)
return ans;
boolean frozen = distance.atom1() .frozen() & distance.atom2() .frozen() ;
if (ans & frozen){
if(firstTimeWornning ) //TODO check this - maybe frozen atoms should be looked at ?
{
System.out.println("*****************************************************************************************************\n" +
"*** NOTE: frozen atoms does not consider as GoodResiduesForHB !!! *****\n" +
"*****************************************************************************************************");
firstTimeWornning = false;
}
return false;
}
if(ans & specialDis != null && !specialDis.isEmpty() ){
Distance pair;
Iterator specDisIter = specialDis.iterator() ;
Atom atom1,atom2;
while( (pair = (Distance) specDisIter .next()) != null){
atom1 = pair.atom1() ;
int atom1Num = atom1.number();
atom2 = pair.atom2() ;
int atom2Num = atom2.number();
if(distance.isDistanceOf(atom1) | distance.isDistanceOf(atom2)){
return (distance.atom1().number() == atom1Num & distance.atom2() .number() == atom2Num) |
(distance.atom1().number() == atom2Num & distance.atom2() .number() == atom1Num);
}
}
}
return ans;
}
//--------------------------- internal class IsNot13 ----------------------------------
/* this filter Accept Distance between Atoms just if there are at list 3 atoms away on the sequense,
* (atomes that are less then 3 atoms away on the sequense never create Hydrogen bonds with each other)
*/
static class IsNot13 implements Filter {
public boolean accept(Object obj) {
Distance dis = (Distance)obj;
if (!dis.atom1().chain().equalsIgnoreCase(dis.atom1().chain()))
return true;
int residueNumber1 = dis.atom1().residueNumber();
int residueNumber2 = dis.atom2().residueNumber();
return (!(Math.abs(residueNumber1-residueNumber2) < 3));
}
}
//--------------------------- internal class GoodSS ---------------------------
static class GoodSS implements Filter {
public boolean accept(Object obj) {
Distance dis = (Distance)obj;
String atom1SS = dis.atom1().residue().secondaryStructure();
String atom2SS = dis.atom2().residue().secondaryStructure();
if (atom1SS.equals("COIL") || atom2SS.equals("COIL"))
return false;
if ((atom1SS.equals("HELIX") || atom1SS .equals("HELIX_OR_COIL")) && (atom2SS.equals("HELIX") | atom2SS .equals("HELIX_OR_COIL") ))
{
int residueNumber1 = dis.atom1().residueNumber();
int residueNumber2 = dis.atom2().residueNumber();
return (Math.abs(residueNumber1-residueNumber2) == 4);
}
// return !(((atom1SS.equals("HELIX") || atom1SS .equals("HELIX_OR_COIL")) && (atom2SS.equals("SHEET") | atom2SS .equals("SHEET_OR_COIL") )) ||
// ((atom1SS.equals("SHEET") | atom1SS .equals("SHEET_OR_COIL")) && (atom2SS.equals("HELIX") | atom2SS .equals("HELIX_OR_COIL") )));
return (atom1SS.equals("SHEET") || atom1SS .equals("SHEET_OR_COIL")) && (atom2SS.equals("SHEET") | atom2SS .equals("SHEET_OR_COIL"));
}
}
}
|
[
"ziv.benaharon1@mai.huji.ac.il"
] |
ziv.benaharon1@mai.huji.ac.il
|
6c0c7ff5cda010e26a5602f12d1e4cbd1be5bb14
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/di/dh/src/main/java/org.wp.dh/ui/suggestion/util/SuggestionUtils.java
|
9fa47f3c306f0ee7e18497aaf21719d6545841ce
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 2,676
|
java
|
package org.wp.dh.ui.suggestion.util;
import android.content.Context;
import org.wp.dh.WordPress;
import org.wp.dh.datasets.SuggestionTable;
import org.wp.dh.models.Blog;
import org.wp.dh.models.Suggestion;
import org.wp.dh.models.Tag;
import org.wp.dh.ui.suggestion.adapters.SuggestionAdapter;
import org.wp.dh.ui.suggestion.adapters.TagSuggestionAdapter;
import java.util.List;
public class SuggestionUtils {
public static SuggestionAdapter setupSuggestions(final int remoteBlogId, Context context, SuggestionServiceConnectionManager serviceConnectionManager) {
Blog blog = WordPress.wpDB.getBlogForDotComBlogId(Integer.toString(remoteBlogId));
boolean isDotComFlag = (blog != null && blog.isDotcomFlag());
return SuggestionUtils.setupSuggestions(remoteBlogId, context, serviceConnectionManager, isDotComFlag);
}
public static SuggestionAdapter setupSuggestions(final int remoteBlogId, Context context, SuggestionServiceConnectionManager serviceConnectionManager, boolean isDotcomFlag) {
if (!isDotcomFlag) {
return null;
}
SuggestionAdapter suggestionAdapter = new SuggestionAdapter(context);
List<Suggestion> suggestions = SuggestionTable.getSuggestionsForSite(remoteBlogId);
// if the suggestions are not stored yet, we want to trigger an update for it
if (suggestions.isEmpty()) {
serviceConnectionManager.bindToService();
}
suggestionAdapter.setSuggestionList(suggestions);
return suggestionAdapter;
}
public static TagSuggestionAdapter setupTagSuggestions(final int remoteBlogId, Context context, SuggestionServiceConnectionManager serviceConnectionManager) {
Blog blog = WordPress.wpDB.getBlogForDotComBlogId(Integer.toString(remoteBlogId));
boolean isDotComFlag = (blog != null && blog.isDotcomFlag());
return SuggestionUtils.setupTagSuggestions(remoteBlogId, context, serviceConnectionManager, isDotComFlag);
}
public static TagSuggestionAdapter setupTagSuggestions(final int remoteBlogId, Context context, SuggestionServiceConnectionManager serviceConnectionManager, boolean isDotcomFlag) {
if (!isDotcomFlag) {
return null;
}
TagSuggestionAdapter tagSuggestionAdapter = new TagSuggestionAdapter(context);
List<Tag> tags = SuggestionTable.getTagsForSite(remoteBlogId);
// if the tags are not stored yet, we want to trigger an update for it
if (tags.isEmpty()) {
serviceConnectionManager.bindToService();
}
tagSuggestionAdapter.setTagList(tags);
return tagSuggestionAdapter;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
9b3ed4c249d5a8fd17f4d4448556cce26d1a9047
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/google/android/gms/internal/zzaal.java
|
385186e7bbdef1ab485b686bcbde5ac708987bec
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,680
|
java
|
package com.google.android.gms.internal;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.api.zza;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.WeakHashMap;
public class zzaal {
/* access modifiers changed from: private */
public final Map<zzaaf<?>, Boolean> zzaBc = Collections.synchronizedMap(new WeakHashMap());
/* access modifiers changed from: private */
public final Map<TaskCompletionSource<?>, Boolean> zzaBd = Collections.synchronizedMap(new WeakHashMap());
private void zza(boolean z, Status status) {
HashMap hashMap;
HashMap hashMap2;
synchronized (this.zzaBc) {
hashMap = new HashMap(this.zzaBc);
}
synchronized (this.zzaBd) {
hashMap2 = new HashMap(this.zzaBd);
}
for (Entry entry : hashMap.entrySet()) {
if (z || ((Boolean) entry.getValue()).booleanValue()) {
((zzaaf) entry.getKey()).zzC(status);
}
}
for (Entry entry2 : hashMap2.entrySet()) {
if (z || ((Boolean) entry2.getValue()).booleanValue()) {
((TaskCompletionSource) entry2.getKey()).trySetException(new zza(status));
}
}
}
/* access modifiers changed from: 0000 */
public void zza(final zzaaf<? extends Result> zzaaf, boolean z) {
this.zzaBc.put(zzaaf, Boolean.valueOf(z));
zzaaf.zza((PendingResult.zza) new PendingResult.zza() {
public void zzy(Status status) {
zzaal.this.zzaBc.remove(zzaaf);
}
});
}
/* access modifiers changed from: 0000 */
public <TResult> void zza(final TaskCompletionSource<TResult> taskCompletionSource, boolean z) {
this.zzaBd.put(taskCompletionSource, Boolean.valueOf(z));
taskCompletionSource.getTask().addOnCompleteListener(new OnCompleteListener<TResult>() {
public void onComplete(Task<TResult> task) {
zzaal.this.zzaBd.remove(taskCompletionSource);
}
});
}
/* access modifiers changed from: 0000 */
public boolean zzvY() {
return !this.zzaBc.isEmpty() || !this.zzaBd.isEmpty();
}
public void zzvZ() {
zza(false, zzaax.zzaCn);
}
public void zzwa() {
zza(true, zzaby.zzaDu);
}
}
|
[
"thanhhuu2apc@gmail.com"
] |
thanhhuu2apc@gmail.com
|
f3ead3e44527d4873a73a2fbe683ec16c5e67e58
|
99c7c7b18a9d94f94f39a84120b4631c2545bbb3
|
/services/allscenariosdb/src/com/angularjsdependencyinjection9_4/allscenariosdb/service/SequenceAutoIncService.java
|
2b1cc05fee9f955a34a0c0168cbb8c3c24840a36
|
[] |
no_license
|
SaraswathiRekhala/AngularJsDependencyInjection9_4
|
f480a134996844979ea306951732e021b170664b
|
1a84b9180978cfa1009c999a3e720c5fb699cba4
|
refs/heads/master
| 2020-05-07T13:46:10.562114
| 2019-04-10T10:51:50
| 2019-04-10T10:51:50
| 180,561,857
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,005
|
java
|
/*Copyright (c) 2016-2017 wavemaker.com All Rights Reserved.
This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with wavemaker.com*/
package com.angularjsdependencyinjection9_4.allscenariosdb.service;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
import javax.validation.Valid;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.wavemaker.runtime.data.exception.EntityNotFoundException;
import com.wavemaker.runtime.data.export.DataExportOptions;
import com.wavemaker.runtime.data.export.ExportType;
import com.wavemaker.runtime.data.expression.QueryFilter;
import com.wavemaker.runtime.data.model.AggregationInfo;
import com.wavemaker.runtime.file.model.Downloadable;
import com.angularjsdependencyinjection9_4.allscenariosdb.SequenceAutoInc;
/**
* Service object for domain model class {@link SequenceAutoInc}.
*/
public interface SequenceAutoIncService {
/**
* Creates a new SequenceAutoInc. It does cascade insert for all the children in a single transaction.
*
* This method overrides the input field values using Server side or database managed properties defined on SequenceAutoInc if any.
*
* @param sequenceAutoInc Details of the SequenceAutoInc to be created; value cannot be null.
* @return The newly created SequenceAutoInc.
*/
SequenceAutoInc create(@Valid SequenceAutoInc sequenceAutoInc);
/**
* Returns SequenceAutoInc by given id if exists.
*
* @param sequenceautoincId The id of the SequenceAutoInc to get; value cannot be null.
* @return SequenceAutoInc associated with the given sequenceautoincId.
* @throws EntityNotFoundException If no SequenceAutoInc is found.
*/
SequenceAutoInc getById(Integer sequenceautoincId);
/**
* Find and return the SequenceAutoInc by given id if exists, returns null otherwise.
*
* @param sequenceautoincId The id of the SequenceAutoInc to get; value cannot be null.
* @return SequenceAutoInc associated with the given sequenceautoincId.
*/
SequenceAutoInc findById(Integer sequenceautoincId);
/**
* Find and return the list of SequenceAutoIncs by given id's.
*
* If orderedReturn true, the return List is ordered and positional relative to the incoming ids.
*
* In case of unknown entities:
*
* If enabled, A null is inserted into the List at the proper position(s).
* If disabled, the nulls are not put into the return List.
*
* @param sequenceautoincIds The id's of the SequenceAutoInc to get; value cannot be null.
* @param orderedReturn Should the return List be ordered and positional in relation to the incoming ids?
* @return SequenceAutoIncs associated with the given sequenceautoincIds.
*/
List<SequenceAutoInc> findByMultipleIds(List<Integer> sequenceautoincIds, boolean orderedReturn);
/**
* Updates the details of an existing SequenceAutoInc. It replaces all fields of the existing SequenceAutoInc with the given sequenceAutoInc.
*
* This method overrides the input field values using Server side or database managed properties defined on SequenceAutoInc if any.
*
* @param sequenceAutoInc The details of the SequenceAutoInc to be updated; value cannot be null.
* @return The updated SequenceAutoInc.
* @throws EntityNotFoundException if no SequenceAutoInc is found with given input.
*/
SequenceAutoInc update(@Valid SequenceAutoInc sequenceAutoInc);
/**
* Deletes an existing SequenceAutoInc with the given id.
*
* @param sequenceautoincId The id of the SequenceAutoInc to be deleted; value cannot be null.
* @return The deleted SequenceAutoInc.
* @throws EntityNotFoundException if no SequenceAutoInc found with the given id.
*/
SequenceAutoInc delete(Integer sequenceautoincId);
/**
* Deletes an existing SequenceAutoInc with the given object.
*
* @param sequenceAutoInc The instance of the SequenceAutoInc to be deleted; value cannot be null.
*/
void delete(SequenceAutoInc sequenceAutoInc);
/**
* Find all SequenceAutoIncs matching the given QueryFilter(s).
* All the QueryFilter(s) are ANDed to filter the results.
* This method returns Paginated results.
*
* @deprecated Use {@link #findAll(String, Pageable)} instead.
*
* @param queryFilters Array of queryFilters to filter the results; No filters applied if the input is null/empty.
* @param pageable Details of the pagination information along with the sorting options. If null returns all matching records.
* @return Paginated list of matching SequenceAutoIncs.
*
* @see QueryFilter
* @see Pageable
* @see Page
*/
@Deprecated
Page<SequenceAutoInc> findAll(QueryFilter[] queryFilters, Pageable pageable);
/**
* Find all SequenceAutoIncs matching the given input query. This method returns Paginated results.
* Note: Go through the documentation for <u>query</u> syntax.
*
* @param query The query to filter the results; No filters applied if the input is null/empty.
* @param pageable Details of the pagination information along with the sorting options. If null returns all matching records.
* @return Paginated list of matching SequenceAutoIncs.
*
* @see Pageable
* @see Page
*/
Page<SequenceAutoInc> findAll(String query, Pageable pageable);
/**
* Exports all SequenceAutoIncs matching the given input query to the given exportType format.
* Note: Go through the documentation for <u>query</u> syntax.
*
* @param exportType The format in which to export the data; value cannot be null.
* @param query The query to filter the results; No filters applied if the input is null/empty.
* @param pageable Details of the pagination information along with the sorting options. If null exports all matching records.
* @return The Downloadable file in given export type.
*
* @see Pageable
* @see ExportType
* @see Downloadable
*/
Downloadable export(ExportType exportType, String query, Pageable pageable);
/**
* Exports all SequenceAutoIncs matching the given input query to the given exportType format.
*
* @param options The export options provided by the user; No filters applied if the input is null/empty.
* @param pageable Details of the pagination information along with the sorting options. If null exports all matching records.
* @param outputStream The output stream of the file for the exported data to be written to.
*
* @see DataExportOptions
* @see Pageable
* @see OutputStream
*/
void export(DataExportOptions options, Pageable pageable, OutputStream outputStream);
/**
* Retrieve the count of the SequenceAutoIncs in the repository with matching query.
* Note: Go through the documentation for <u>query</u> syntax.
*
* @param query query to filter results. No filters applied if the input is null/empty.
* @return The count of the SequenceAutoInc.
*/
long count(String query);
/**
* Retrieve aggregated values with matching aggregation info.
*
* @param aggregationInfo info related to aggregations.
* @param pageable Details of the pagination information along with the sorting options. If null exports all matching records.
* @return Paginated data with included fields.
*
* @see AggregationInfo
* @see Pageable
* @see Page
*/
Page<Map<String, Object>> getAggregatedValues(AggregationInfo aggregationInfo, Pageable pageable);
}
|
[
"saraswathi.rekhala+8@wavemaker.com"
] |
saraswathi.rekhala+8@wavemaker.com
|
d3364a8bf33584130760d465da126d327c7e3a7c
|
fa02eaa873d5f3c3dcbfe7599e91dde86bd77358
|
/thinkjoy-upms/thinkjoy-upms-server/src/main/java/com/thinkjoy/upms/server/controller/manage/UpmsRoleController.java
|
98f7cd1563ae504fd5224ad0bfaaeb20877c68e9
|
[
"MIT"
] |
permissive
|
josephfourier/admin
|
27942c8a1be8ac460201117b69d7df67ee3a887a
|
1bcebbbedece08847ea83ed4910b50d964aec01c
|
refs/heads/master
| 2021-04-06T06:34:21.841180
| 2018-03-10T07:07:33
| 2018-03-10T07:07:33
| 124,630,923
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,890
|
java
|
package com.thinkjoy.upms.server.controller.manage;
import com.alibaba.fastjson.JSONArray;
import com.baidu.unbiz.fluentvalidator.ComplexResult;
import com.baidu.unbiz.fluentvalidator.FluentValidator;
import com.baidu.unbiz.fluentvalidator.ResultCollectors;
import com.thinkjoy.common.base.BaseController;
import com.thinkjoy.common.validator.LengthValidator;
import com.thinkjoy.upms.common.constant.UpmsResult;
import com.thinkjoy.upms.common.constant.UpmsResultConstant;
import com.thinkjoy.upms.dao.model.UpmsRole;
import com.thinkjoy.upms.dao.model.UpmsRoleExample;
import com.thinkjoy.upms.rpc.api.UpmsRolePermissionService;
import com.thinkjoy.upms.rpc.api.UpmsRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* ่ง่ฒcontroller
* Created by on 2017/2/6.
*/
@Controller
@Api(value = "่ง่ฒ็ฎก็", description = "่ง่ฒ็ฎก็")
@RequestMapping("/manage/role")
public class UpmsRoleController extends BaseController {
private static Logger _log = LoggerFactory.getLogger(UpmsRoleController.class);
@Autowired
private UpmsRoleService upmsRoleService;
@Autowired
private UpmsRolePermissionService upmsRolePermissionService;
@ApiOperation(value = "่ง่ฒ้ฆ้กต")
@RequiresPermissions("upms:role:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/role/index.jsp";
}
@ApiOperation(value = "่ง่ฒๆ้")
@RequiresPermissions("upms:role:permission")
@RequestMapping(value = "/permission/{id}", method = RequestMethod.GET)
public String permission(@PathVariable("id") int id, ModelMap modelMap) {
UpmsRole role = upmsRoleService.selectByPrimaryKey(id);
modelMap.put("role", role);
return "/manage/role/permission.jsp";
}
@ApiOperation(value = "่ง่ฒๆ้")
@RequiresPermissions("upms:role:permission")
@RequestMapping(value = "/permission/{id}", method = RequestMethod.POST)
@ResponseBody
public Object permission(@PathVariable("id") int id, HttpServletRequest request) {
JSONArray datas = JSONArray.parseArray(request.getParameter("datas"));
int result = upmsRolePermissionService.rolePermission(datas, id);
return new UpmsResult(UpmsResultConstant.SUCCESS, result);
}
@ApiOperation(value = "่ง่ฒๅ่กจ")
@RequiresPermissions("upms:role:read")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public Object list(
@RequestParam(required = false, defaultValue = "0", value = "offset") int offset,
@RequestParam(required = false, defaultValue = "10", value = "limit") int limit,
@RequestParam(required = false, defaultValue = "", value = "search") String search,
@RequestParam(required = false, value = "sort") String sort,
@RequestParam(required = false, value = "order") String order) {
UpmsRoleExample upmsRoleExample = new UpmsRoleExample();
if (!StringUtils.isBlank(sort) && !StringUtils.isBlank(order)) {
upmsRoleExample.setOrderByClause(sort + " " + order);
}
if (StringUtils.isNotBlank(search)) {
upmsRoleExample.or()
.andTitleLike("%" + search + "%");
}
List<UpmsRole> rows = upmsRoleService.selectByExampleForOffsetPage(upmsRoleExample, offset, limit);
long total = upmsRoleService.countByExample(upmsRoleExample);
Map<String, Object> result = new HashMap<>();
result.put("rows", rows);
result.put("total", total);
return result;
}
@ApiOperation(value = "ๆฐๅข่ง่ฒ")
@RequiresPermissions("upms:role:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/role/create.jsp";
}
@ApiOperation(value = "ๆฐๅข่ง่ฒ")
@RequiresPermissions("upms:role:create")
@ResponseBody
@RequestMapping(value = "/create", method = RequestMethod.POST)
public Object create(UpmsRole upmsRole) {
ComplexResult result = FluentValidator.checkAll()
.on(upmsRole.getName(), new LengthValidator(1, 20, "ๅ็งฐ"))
.on(upmsRole.getTitle(), new LengthValidator(1, 20, "ๆ ้ข"))
.doValidate()
.result(ResultCollectors.toComplex());
if (!result.isSuccess()) {
return new UpmsResult(UpmsResultConstant.INVALID_LENGTH, result.getErrors());
}
long time = System.currentTimeMillis();
upmsRole.setCtime(time);
upmsRole.setOrders(time);
int count = upmsRoleService.insertSelective(upmsRole);
return new UpmsResult(UpmsResultConstant.SUCCESS, count);
}
@ApiOperation(value = "ๅ ้ค่ง่ฒ")
@RequiresPermissions("upms:role:delete")
@RequestMapping(value = "/delete/{ids}",method = RequestMethod.GET)
@ResponseBody
public Object delete(@PathVariable("ids") String ids) {
int count = upmsRoleService.deleteByPrimaryKeys(ids);
return new UpmsResult(UpmsResultConstant.SUCCESS, count);
}
@ApiOperation(value = "ไฟฎๆน่ง่ฒ")
@RequiresPermissions("upms:role:update")
@RequestMapping(value = "/update/{id}", method = RequestMethod.GET)
public String update(@PathVariable("id") int id, ModelMap modelMap) {
UpmsRole role = upmsRoleService.selectByPrimaryKey(id);
modelMap.put("role", role);
return "/manage/role/update.jsp";
}
@ApiOperation(value = "ไฟฎๆน่ง่ฒ")
@RequiresPermissions("upms:role:update")
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
@ResponseBody
public Object update(@PathVariable("id") int id, UpmsRole upmsRole) {
ComplexResult result = FluentValidator.checkAll()
.on(upmsRole.getName(), new LengthValidator(1, 20, "ๅ็งฐ"))
.on(upmsRole.getTitle(), new LengthValidator(1, 20, "ๆ ้ข"))
.doValidate()
.result(ResultCollectors.toComplex());
if (!result.isSuccess()) {
return new UpmsResult(UpmsResultConstant.INVALID_LENGTH, result.getErrors());
}
upmsRole.setRoleId(id);
int count = upmsRoleService.updateByPrimaryKeySelective(upmsRole);
return new UpmsResult(UpmsResultConstant.SUCCESS, count);
}
}
|
[
"2779429237@qq.com"
] |
2779429237@qq.com
|
7c54071791022adb42a838005c8caef90f7125c2
|
67081693797bdfc4f615d671af0fd5fb74f851a4
|
/leetcode/src/main/java/L0944_Delete_Columns_to_Make_Sorted.java
|
58cb7f27913db23955f8eef41e835efa58158d9a
|
[] |
no_license
|
zzsoszz/LeetCode
|
1e32f4a3270bb892df02c3c8f93fca79b769bf71
|
982147ecfd988b97b48a280df74a5f6bb38de92f
|
refs/heads/master
| 2023-03-23T13:58:09.190892
| 2021-02-24T02:50:17
| 2021-02-24T02:50:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 165
|
java
|
// https://leetcode-cn.com/problems/delete-columns-to-make-sorted/
class L0944_Delete_Columns_to_Make_Sorted {
public int minDeletionSize(String[] A) {
}
}
|
[
"15822882820@163.com"
] |
15822882820@163.com
|
857a674a11f9deaef4ab6b29e8ccd8a4724e3e86
|
b94c49d4c4389992868dab90756b38b1b12351d4
|
/src/com/github/cuter44/muuga/contract/servlet/LoanCreate.java
|
e040360d7bfa4cce75d6ef2ed08e81241de75fd2
|
[] |
no_license
|
cuter44/muuga
|
a6f67940c4ba428d05ccf9d7e69377e352173f7b
|
e49ab73fbae29373b8b691bc08baf0a03a811da8
|
HEAD
| 2016-09-11T03:43:00.339838
| 2015-03-23T16:39:09
| 2015-03-23T16:39:09
| 24,768,952
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,862
|
java
|
package com.github.cuter44.muuga.contract.servlet;
import java.io.*;
import java.security.PrivateKey;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import com.github.cuter44.nyafx.dao.*;
import static com.github.cuter44.nyafx.dao.EntityNotFoundException.entFound;
import com.github.cuter44.nyafx.servlet.*;
import static com.github.cuter44.nyafx.servlet.Params.notNull;
import static com.github.cuter44.nyafx.servlet.Params.getLong;
import static com.github.cuter44.nyafx.servlet.Params.needLong;
//import com.github.cuter44.muuga.util.conf.*;
import static com.github.cuter44.muuga.Constants.*;
import com.github.cuter44.muuga.contract.model.*;
import com.github.cuter44.muuga.contract.core.*;
import com.github.cuter44.muuga.desire.core.*;
/** ๅบๅพๅซไบบ็ๅฟๆฟ, ๅ่ตทๅ้
* <pre style="font-size:12px">
<strong>่ฏทๆฑ</strong>
POST /contract/loan/create.api
<strong>ๅๆฐ</strong>
uid :long, ่ชๅทฑ็ uid, ไฝไธบไบคๆ็ๅไธๆน
desire :long, ๅบ็ญ็ desire id,
book :long, ๅจๅบ็ญไธไธชๆณๅๅฟๆฟๆถๅฏ้, ่ฆๅบๅฎ็ไนฆ็id, ็จไบๆ ่ฎฐไธบๅทฒๅๅบ
<i>้ดๆ</i>
uid :long , ๅฟ
้, uid
s :hex , ๅฟ
้, session key
<strong>ๅๅบ</strong>
application/json, class={@link Json#jsonizeContractBase(ContractBase, JSONObject) contract.model.LoanContract}
<strong>ไพๅค</strong>
parsed by {@link com.github.cuter44.muuga.sys.servlet.ExceptionHandler ExceptionHandler}
<strong>ๆ ทไพ</strong>ๆๆ
* </pre>
*
*/
@WebServlet("/contract/loan/create.api")
public class LoanCreate extends HttpServlet
{
private static final String UID = "uid";
private static final String DESIRE = "desire";
private static final String BOOK = "book";
protected TradeContractDao tradeDao = TradeContractDao.getInstance();
protected TradeController tradeCtl = TradeController.getInstance();
@Override
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
req.setCharacterEncoding("utf-8");
try
{
Long uid = needLong(req, UID);
Long desire = needLong(req, DESIRE);
Long book = getLong(req, BOOK);
this.tradeDao.begin();
TradeContract trade = this.tradeCtl.create(desire, uid, book);
this.tradeDao.commit();
Json.writeContractBase(trade, resp);
}
catch (Exception ex)
{
req.setAttribute(KEY_EXCEPTION, ex);
req.getRequestDispatcher(URI_ERROR_HANDLER).forward(req, resp);
}
finally
{
this.tradeDao.close();
}
return;
}
}
|
[
"cuter44@foxmail.com"
] |
cuter44@foxmail.com
|
2c9beb7c84892386552a117d29fec87cd0d6831b
|
52d004eabd95fa6f5912aae364dc3d95285f9640
|
/designer/src/main/java/com/baidu/rigel/biplatform/ma/resource/UpdateDataResource.java
|
fa3a5e3755a0ba145c6c879e31006c2fd7962a38
|
[
"Apache-2.0"
] |
permissive
|
fjfd/bi-platform
|
f92d521b051812e4a2ee0bae7da1b284901c9ffd
|
00b6c2e9e3a467e85cd4ba998c7852f34b5207fa
|
refs/heads/new_master
| 2021-01-13T09:10:19.911399
| 2015-07-01T02:32:18
| 2015-07-01T02:32:18
| 38,604,972
| 2
| 4
| null | 2015-07-06T07:49:14
| 2015-07-06T07:49:13
| null |
UTF-8
|
Java
| false
| false
| 6,422
|
java
|
/**
* Copyright (c) 2014 Baidu, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.baidu.rigel.biplatform.ma.resource;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.baidu.rigel.biplatform.ac.query.MiniCubeConnection;
import com.baidu.rigel.biplatform.ac.query.data.DataSourceInfo;
import com.baidu.rigel.biplatform.ma.ds.service.DataSourceConnectionService;
import com.baidu.rigel.biplatform.ma.ds.service.DataSourceConnectionServiceFactory;
import com.baidu.rigel.biplatform.ma.ds.service.DataSourceService;
import com.baidu.rigel.biplatform.ma.model.ds.DataSourceDefine;
import com.baidu.rigel.biplatform.ma.model.utils.GsonUtils;
//import com.baidu.rigel.biplatform.ma.report.service.ReportNoticeByJmsService;
import com.google.common.collect.Maps;
import com.google.gson.reflect.TypeToken;
/**
*
* ๅๆญฅๆดๆฐๆฐๆฎrestๆฅๅฃ๏ผ็จไบๆไพๅๆญฅๆฐๆฎๆดๆฐๆฏๆ
* @author david.wang
*
*/
@RestController
@RequestMapping("/silkroad/reports/dataupdate")
public class UpdateDataResource extends BaseResource {
/**
* LOG
*/
private static final Logger LOG = LoggerFactory.getLogger(UpdateDataResource.class);
/**
* dsService
*/
@Resource
private DataSourceService dsService;
// @Resource
// private ReportNoticeByJmsService reportNoticeByJmsService;
/**
*
* @param request HttpServletRequest
* @param response HttpServletResponse
* @return ResponseResult
*/
@RequestMapping(method = { RequestMethod.GET, RequestMethod.POST })
public ResponseResult updateData(HttpServletRequest request, HttpServletResponse response) throws Exception {
LOG.info("[INFO] --- --- begin update index meta with new request");
long begin = System.currentTimeMillis();
String dsName = request.getParameter("dsName");
String factTables = request.getParameter("factTables");
if (StringUtils.isEmpty(dsName) || StringUtils.isEmpty(factTables)) {
ResponseResult rs = new ResponseResult();
rs.setStatus(1);
rs.setStatusInfo("่ฏทๆฑไธญ้่ฆๅ
ๅซdsName, factTablesไฟกๆฏใ"
+ "ๅ
ถไธญdsNameไธบๆฐๆฎๆบๅ็งฐ๏ผfactTablesไธบๆดๆฐ็ไบๅฎ่กจๅ่กจ๏ผๅคๅผ ่กจไปฅโ,โๅๅฒ");
return rs;
}
String[] factTableArray = factTables.split(",");
ResponseResult rs = new ResponseResult();
DataSourceDefine ds = dsService.getDsDefine(Integer.toString(dsName.hashCode()));
DataSourceConnectionService<?> dsConnService = DataSourceConnectionServiceFactory.
getDataSourceConnectionServiceInstance(ds.getDataSourceType().toString ());
DataSourceInfo dsInfo = dsConnService.parseToDataSourceInfo(ds, securityKey);
Map<String, Map<String, String>> conds = Maps.newHashMap();
for (String factTable : factTableArray) {
String str = request.getParameter(factTable);
LOG.info("[INFO] --- --- conditions for {} is : {}", factTable, str);
if (isValidate(str)) {
conds.put(factTable, GsonUtils.fromJson(str, new TypeToken<Map<String, String>>() {}.getType()));
}
}
String condsStr = null;
if (conds.size() > 0) {
condsStr = GsonUtils.toJson(conds);
}
LOG.info("[INFO] --- --- conds : {}", conds);
LOG.info("[INFO] --- --- request params list ----------------------------------");
LOG.info("[INFO] --- --- dsName = {}", dsName);
LOG.info("[INFO] --- --- factTables = {}", factTables);
LOG.info("[INFO] --- --- conds = {}", condsStr);
LOG.info("[INFO] --- --- --- ---- ---- end pring param list --- --- --- --- ---- ");
boolean result = MiniCubeConnection.ConnectionUtil.refresh(dsInfo, factTableArray, condsStr);
// reportNoticeByJmsService.refreshIndex(dsInfo, factTableArray, condsStr);
if (result) {
rs.setStatus(0);
rs.setStatusInfo("successfully");
} else {
rs.setStatus(1);
rs.setStatusInfo("failed");
}
LOG.info("[INFO] -- --- update index meta result : {}", result);
LOG.info("[INFO] --- --- end update index meta, cost {} ms", (System.currentTimeMillis() - begin));
return rs;
}
private boolean isValidate(String str) {
if (StringUtils.isEmpty(str)) {
return false;
}
try {
JSONObject json = new JSONObject(str);
if (StringUtils.isEmpty(json.getString("begin")) || StringUtils.isEmpty(json.getString("end"))) {
throw new IllegalStateException("request param status incorrected");
}
Long begin = Long.valueOf(json.getString("begin"));
if (begin <= 0) {
throw new IllegalStateException("begin value need bigger than zero");
}
Long end = Long.valueOf(json.getString("end"));
if (end < begin) {
throw new IllegalStateException("end value must larger than begin");
}
} catch (Exception e) {
LOG.info(e.getMessage(), e);
throw new IllegalStateException("request param must be json style");
}
return true;
}
}
|
[
"sishuiliunian2004@163.com"
] |
sishuiliunian2004@163.com
|
71918565577cf2d353af4e58e0e322944dea5d27
|
33fc75e370bfb6cde2c656ebbe8c4fa45868e2e1
|
/BankSystem.phase5_collections/src/bank/core/Logger.java
|
786de3b3005ed755aaab67528409af3950327f3b
|
[] |
no_license
|
eldarba/822-130
|
d6a9f001dff1789a67e680396dee450e9bc73c7a
|
43d3c83f5d73b0e0d8bbc21ffb5ef18ca5736e3a
|
refs/heads/master
| 2023-04-28T00:06:00.613703
| 2021-05-10T12:04:36
| 2021-05-10T12:04:36
| 313,205,642
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 558
|
java
|
package bank.core;
import java.util.ArrayList;
import java.util.List;
public class Logger {
// we can save the log instances in a collection
private static List<Log> logs = new ArrayList<Log>();
// will be in use when working with database
private String driverName;
public Logger(String driverName) {
super();
this.driverName = driverName;
}
public static void log(Log log) {
System.out.println(log);
logs.add(log);
}
public static List<Log> getLogs() {
return logs;
}
public String getDriverName() {
return driverName;
}
}
|
[
"eldarba@gmail.com"
] |
eldarba@gmail.com
|
2529e1afa8e633c099979d24d1bcd34cae1d7065
|
afab72f0209764c956d609873b7f2b517d67ad5f
|
/WebServiceClients/src/zw/co/esolutions/ewallet/process/ProcessService_Service.java
|
9fdf3a20f5243dc7cf9ff2c5b07784a25c56c6ab
|
[] |
no_license
|
wasadmin/ewallet
|
899e66d4d03e77a8f85974d9d2cba8940cf2018a
|
e132a5e569f4bb67a83df0c3012bb341ffaaf2ed
|
refs/heads/master
| 2021-01-23T13:48:34.618617
| 2012-11-15T10:47:55
| 2012-11-15T10:47:55
| 6,703,145
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,571
|
java
|
//
// Generated By:JAX-WS RI 2.2.4-b01 (JAXB RI IBM 2.2.4)
//
package zw.co.esolutions.ewallet.process;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
@WebServiceClient(name = "ProcessService", targetNamespace = "http://process.ewallet.esolutions.co.zw/", wsdlLocation = "META-INF/wsdl/ProcessService.wsdl")
public class ProcessService_Service
extends Service
{
private final static URL PROCESSSERVICE_WSDL_LOCATION;
private final static WebServiceException PROCESSSERVICE_EXCEPTION;
private final static QName PROCESSSERVICE_QNAME = new QName("http://process.ewallet.esolutions.co.zw/", "ProcessService");
static {
PROCESSSERVICE_WSDL_LOCATION = zw.co.esolutions.ewallet.process.ProcessService_Service.class.getClassLoader().getResource("META-INF/wsdl/ProcessService.wsdl");
WebServiceException e = null;
if (PROCESSSERVICE_WSDL_LOCATION == null) {
e = new WebServiceException("Cannot find 'META-INF/wsdl/ProcessService.wsdl' wsdl. Place the resource correctly in the classpath.");
}
PROCESSSERVICE_EXCEPTION = e;
}
public ProcessService_Service() {
super(__getWsdlLocation(), PROCESSSERVICE_QNAME);
}
public ProcessService_Service(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
/**
*
* @return
* returns ProcessService
*/
@WebEndpoint(name = "ProcessServiceSOAP")
public ProcessService getProcessServiceSOAP() {
return super.getPort(new QName("http://process.ewallet.esolutions.co.zw/", "ProcessServiceSOAP"), ProcessService.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns ProcessService
*/
@WebEndpoint(name = "ProcessServiceSOAP")
public ProcessService getProcessServiceSOAP(WebServiceFeature... features) {
return super.getPort(new QName("http://process.ewallet.esolutions.co.zw/", "ProcessServiceSOAP"), ProcessService.class, features);
}
private static URL __getWsdlLocation() {
if (PROCESSSERVICE_EXCEPTION!= null) {
throw PROCESSSERVICE_EXCEPTION;
}
return PROCESSSERVICE_WSDL_LOCATION;
}
}
|
[
"stanfordbangaba@gmail.com"
] |
stanfordbangaba@gmail.com
|
573ee4ed176d57301b67c0c815acd9841860b7e5
|
0c2ad6f2b04b0626c5be597caab2c7e580ff161b
|
/graviton - game/src/main/java/org/graviton/network/game/protocol/MonsterPacketFormatter.java
|
71cce07dc17457ecf281b10700a1cb0ca9b1de10
|
[
"Apache-2.0"
] |
permissive
|
cypox/GDCore
|
d4f9ff4e63eb1cf0904ecd4a9a8dcdf7ba0074ea
|
b4977f9dfc023166af7d0ffccdc34c6e2ab2acbf
|
refs/heads/master
| 2021-01-13T16:56:31.078594
| 2017-01-08T12:22:10
| 2017-01-08T12:22:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,466
|
java
|
package org.graviton.network.game.protocol;
import org.graviton.game.creature.monster.MonsterGroup;
/**
* Created by Botan on 03/12/2016. 10:35
*/
public class MonsterPacketFormatter {
public static String gmMessage(MonsterGroup monsterGroup) {
StringBuilder identity = new StringBuilder();
StringBuilder skins = new StringBuilder();
StringBuilder levels = new StringBuilder();
StringBuilder colors = new StringBuilder();
StringBuilder builder = new StringBuilder();
builder.append(monsterGroup.getCell()).append(';');
builder.append(monsterGroup.getOrientation().ordinal()).append(';');
builder.append(monsterGroup.getStarsPercent()).append(';');
builder.append(monsterGroup.getId()).append(';');
monsterGroup.getMonsters().forEach(monster -> {
identity.append(monster.getTemplate().getId()).append(",");
skins.append(monster.getTemplate().getSkin()).append(",");
levels.append(monster.getLevel()).append(",");
colors.append(monster.getTemplate().getColors()).append(";0,0,0,0;");
});
builder.append(identity.toString().substring(0, identity.length() - 1)).append(";-3;");
builder.append(skins.toString().substring(0, skins.length() - 1)).append(';');
builder.append(levels.toString().substring(0, levels.length() - 1)).append(';').append(colors);
return builder.toString();
}
}
|
[
"ahmed.botan94@gmail.com"
] |
ahmed.botan94@gmail.com
|
2797c8dd2831b9011288f26bae0e119b6fd9945f
|
372886fd341ccb3d4ae4c8992520d75baf777702
|
/shoppingPjt/src/shopping/backend/ajax/model/UpdateCategoryStatusImplAction.java
|
30feeff79c054e5fd2219f9d2491fd05451924a8
|
[] |
no_license
|
Lee-jaeyong/shoppingJspPjt
|
23f414007fe7f8f2830424e0c177433752d3bcab
|
6eb12d31c6ae20db72cdb14b365711da35b7ad86
|
refs/heads/master
| 2022-12-06T00:32:58.794309
| 2019-12-19T17:52:07
| 2019-12-19T17:52:07
| 223,929,522
| 0
| 0
| null | 2022-12-04T21:56:39
| 2019-11-25T11:10:55
|
HTML
|
UTF-8
|
Java
| false
| false
| 999
|
java
|
package shopping.backend.ajax.model;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import shopping.action.ShoppingService;
import shopping.database.dao.CategoryDAO;
public class UpdateCategoryStatusImplAction implements ShoppingService {
@Override
public void execute(HttpServletRequest request, HttpServletResponse response) {
try {
CategoryDAO categoryDAO = new CategoryDAO();
if(request.getParameter("type").equals("true"))
categoryDAO.updateCategoryStatus(Integer.parseInt(request.getParameter("categoryNumber")),
Integer.parseInt(request.getParameter("status")));
else
categoryDAO.updateSmallCategoryStatus(request.getParameter("data").split(","),Integer.parseInt(request.getParameter("status")));
response.getWriter().write("true");
} catch (Exception e) {
try {
response.getWriter().write("false");
} catch (IOException e1) {
}
}
}
}
|
[
"wodyd202@naver.com"
] |
wodyd202@naver.com
|
5e78be888e4f90a13e278d69d39cd80cdd7b699e
|
a5ae5e37d196fd3fd14bed5da9677d62d9803ce5
|
/jOOQ/src/main/java/org/jooq/UDTField.java
|
37143d0171ccda9d100d468057a54f409c96582a
|
[
"Apache-2.0"
] |
permissive
|
srinivaskarre/jOOQ
|
ae6262a412e70e90e89837c3a1bc52c7ec110c46
|
dfe0464c4367a4d6914ff20a68221c7a4487442d
|
refs/heads/master
| 2020-09-14T16:51:12.753079
| 2019-11-21T13:53:23
| 2019-11-21T13:53:23
| 223,186,678
| 1
| 0
|
NOASSERTION
| 2019-11-21T13:59:11
| 2019-11-21T13:59:10
| null |
UTF-8
|
Java
| false
| false
| 1,370
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq;
/**
* A field contained in a UDT.
* <p>
* Instances of this type cannot be created directly. They are available from
* generated code.
*
* @param <R> The record type
* @param <T> The field type
* @author Lukas Eder
*/
public interface UDTField<R extends UDTRecord<R>, T> extends Field<T> {
/**
* @return The UDT this field is contained in
*/
UDT<R> getUDT();
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
c04ebe110976314e417e257c5aa3afab56d4a016
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/mapstruct/learning/4626/FreeBuilderAccessorNamingStrategy.java
|
fac5079fbfe054bbb1b5cc73aac9f8251378deae
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,224
|
java
|
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.spi;
import javax.lang.model.element.ExecutableElement;
/**
* Accessor naming strategy for FreeBuilder.
* FreeBuilder adds a lot of other methods that can be considered as fluent setters. Such as:
* <ul>
* <li>{@code from(Target)}</li>
* <li>{@code mapXXX(UnaryOperator)}</li>
* <li>{@code mutateXXX(Consumer)}</li>
* <li>{@code mergeFrom(Target)}</li>
* <li>{@code mergeFrom(Target.Builder)}</li>
* </ul>
* <p>
* When the JavaBean convention is not used with FreeBuilder then the getters are non standard and MapStruct
* won't recognize them. Therefore one needs to use the JavaBean convention in which the fluent setters
* start with {@code set}.
*
* @author Filip Hrisafov
*/
public class FreeBuilderAccessorNamingStrategy extends DefaultAccessorNamingStrategy {
@Override
protected boolean isFluentSetter(ExecutableElement method) {
// When using FreeBuilder one needs to use the JavaBean convention, which means that all setters will start
// with set
return false;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
742f19922a239ba1b77169287e4ee10d76fe0f34
|
abe427fff8cd9e51d566939d6b3fe5257b731913
|
/bigdata/HBase/src/main/java/definitiveGuide/chapter03/GetListExample.java
|
35d84c5fc6430ea490d109aec219264f2fba2586
|
[] |
no_license
|
pirateatpiracy/edge_old
|
5828b7f4e0d12ca499868e6d9ee2a576c64c316a
|
6780a945025ad5024ef1e0b4633ff255cfb6033d
|
refs/heads/master
| 2021-09-29T14:05:49.175077
| 2018-08-26T15:33:51
| 2018-08-26T15:33:51
| 119,120,788
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,382
|
java
|
package definitiveGuide.chapter03;
// cc GetListExample Example of retrieving data from HBase using lists of Get instances
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellUtil;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.util.Bytes;
import definitiveGuide.util.HBaseHelper;
public class GetListExample {
public static void main(String[] args) throws IOException {
Configuration conf = HBaseConfiguration.create();
HBaseHelper helper = HBaseHelper.getHelper(conf);
if (!helper.existsTable("testtable")) {
helper.createTable("testtable", "colfam1");
}
Connection connection = ConnectionFactory.createConnection(conf);
Table table = connection.getTable(TableName.valueOf("testtable"));
// vv GetListExample
byte[] cf1 = Bytes.toBytes("colfam1");
byte[] qf1 = Bytes.toBytes("qual1");
byte[] qf2 = Bytes.toBytes("qual2"); // co GetListExample-1-Prepare Prepare commonly used byte arrays.
byte[] row1 = Bytes.toBytes("row1");
byte[] row2 = Bytes.toBytes("row2");
List<Get> gets = new ArrayList<Get>(); // co GetListExample-2-CreateList Create a list that holds the Get instances.
Get get1 = new Get(row1);
get1.addColumn(cf1, qf1);
gets.add(get1);
Get get2 = new Get(row2);
get2.addColumn(cf1, qf1); // co GetListExample-3-AddGets Add the Get instances to the list.
gets.add(get2);
Get get3 = new Get(row2);
get3.addColumn(cf1, qf2);
gets.add(get3);
Result[] results = table.get(gets); // co GetListExample-4-DoGet Retrieve rows with selected columns from HBase.
System.out.println("First iteration...");
for (Result result : results) {
String row = Bytes.toString(result.getRow());
System.out.print("Row: " + row + " ");
byte[] val = null;
if (result.containsColumn(cf1, qf1)) { // co GetListExample-5-GetValue1 Iterate over results and check what values are available.
val = result.getValue(cf1, qf1);
System.out.println("Value: " + Bytes.toString(val));
}
if (result.containsColumn(cf1, qf2)) {
val = result.getValue(cf1, qf2);
System.out.println("Value: " + Bytes.toString(val));
}
}
System.out.println("Second iteration...");
for (Result result : results) {
for (Cell cell : result.listCells()) { // co GetListExample-6-GetValue2 Iterate over results again, printing out all values.
System.out.println(
"Row: " + Bytes.toString(
cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()) + // co GetListExample-7-GetValue2 Two different ways to access the cell data.
" Value: " + Bytes.toString(CellUtil.cloneValue(cell)));
}
}
System.out.println("Third iteration...");
for (Result result : results) {
System.out.println(result);
}
// ^^ GetListExample
table.close();
connection.close();
helper.close();
}
}
|
[
"koushikpaul1@gmail.com"
] |
koushikpaul1@gmail.com
|
903de3be46f58bcf77f730cdeb0b18e36e459d5f
|
6ceada0d6310f41ebd2387eed1413975f611ab55
|
/icy/gui/main/MainListener.java
|
37a69b8df361478aa6c73d1072335dbd71ab2db4
|
[] |
no_license
|
zeb/Icy-Kernel
|
441484a5f862e50cf4992b5a06f35447cd748eda
|
d2b296e043c77da31d27b8f0242d007b3e5e17e2
|
refs/heads/master
| 2021-01-16T22:46:48.889696
| 2013-03-18T13:30:43
| 2013-03-18T13:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,149
|
java
|
/*
* Copyright 2010, 2011 Institut Pasteur.
*
* This file is part of ICY.
*
* ICY is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ICY 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 ICY. If not, see <http://www.gnu.org/licenses/>.
*/
package icy.gui.main;
import java.util.EventListener;
public interface MainListener extends EventListener
{
/**
* A plugin has been started
*/
public void pluginOpened(MainEvent event);
/**
* A plugin has ended
*/
public void pluginClosed(MainEvent event);
/**
* A viewer has been opened
*/
public void viewerOpened(MainEvent event);
/**
* A viewer just got the focus
*/
public void viewerFocused(MainEvent event);
/**
* A viewer has been closed
*/
public void viewerClosed(MainEvent event);
/**
* A sequence has been opened
*/
public void sequenceOpened(MainEvent event);
/**
* A sequence just got the focus
*/
public void sequenceFocused(MainEvent event);
/**
* A sequence has been closed
*/
public void sequenceClosed(MainEvent event);
/**
* A ROI has been added to its first sequence
*/
public void roiAdded(MainEvent event);
/**
* A ROI has been removed from its last sequence
*/
public void roiRemoved(MainEvent event);
/**
* A painter has been added to its first sequence
*/
public void painterAdded(MainEvent event);
/**
* A painter has been removed from its last sequence
*/
public void painterRemoved(MainEvent event);
}
|
[
"stephane.dallongeville@pasteur.fr"
] |
stephane.dallongeville@pasteur.fr
|
2a75a222d546df487ac834b59553e3a9117a6c70
|
f96fe513bfdf2d1dbd582305e1cbfda14a665bec
|
/net.sf.smbt.jazzmutant.diagram/src/net/sf/smbt/jzmui/diagram/edit/parts/JZSurfaceLCD2EditPart.java
|
28323711df61250d18f06753f1ad22df056a25b7
|
[] |
no_license
|
lucascraft/ubq_wip
|
04fdb727e7b2dc384ba1d2195ad47e895068e1e4
|
eff577040f21be71ea2c76c187d574f1617703ce
|
refs/heads/master
| 2021-01-22T02:28:20.687330
| 2015-06-10T12:38:47
| 2015-06-10T12:38:47
| 37,206,324
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,256
|
java
|
package net.sf.smbt.jzmui.diagram.edit.parts;
import net.sf.smbt.jazzmutant.diagram.figures.JZSurfaceLCDFigure;
import net.sf.smbt.jazzmutant.diagram.parts.JZUIShapeNodeEditPart;
import net.sf.smbt.jzmui.JZSurfaceLCD;
import net.sf.smbt.jzmui.diagram.edit.policies.JZSurfaceLCD2ItemSemanticEditPolicy;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.Shape;
import org.eclipse.draw2d.StackLayout;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.ResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.swt.graphics.Color;
/**
* @generated NOT
*/
public class JZSurfaceLCD2EditPart extends JZUIShapeNodeEditPart {
/**
* @generated
*/
public static final int VISUAL_ID = 3035;
/**
* @generated
*/
protected IFigure contentPane;
/**
* @generated
*/
protected IFigure primaryShape;
/**
* @generated
*/
public JZSurfaceLCD2EditPart(View view) {
super(view);
}
/**
* @generated
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
new JZSurfaceLCD2ItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
/**
* @generated NOT
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child
.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new ResizableEditPolicy();
}
return result;
}
protected Command getMoveChildrenCommand(Request request) {
return null;
}
protected Command getCreateCommand(CreateRequest request) {
return null;
}
};
return lep;
}
/**
* @generated NOT
*/
public EditPolicy getPrimaryDragEditPolicy() {
EditPolicy result = super.getPrimaryDragEditPolicy();
if (result instanceof ResizableEditPolicy) {
ResizableEditPolicy ep = (ResizableEditPolicy) result;
ep.setResizeDirections(PositionConstants.NSEW);
}
return result;
}
/**
* @generated
*/
protected IFigure createNodeShape() {
return primaryShape = new JZSurfaceLCDFigureDescriptor();
}
/**
* @generated
*/
public JZSurfaceLCDFigureDescriptor getPrimaryShape() {
return (JZSurfaceLCDFigureDescriptor) primaryShape;
}
/**
* @generated
*/
protected NodeFigure createNodePlate() {
DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
/**
* Creates figure for this edit part.
*
* Body of this method does not depend on settings in generation model
* so you may safely remove <i>generated</i> tag and modify it.
*
* @generated
*/
protected NodeFigure createNodeFigure() {
NodeFigure figure = createNodePlate();
figure.setLayoutManager(new StackLayout());
IFigure shape = createNodeShape();
figure.add(shape);
contentPane = setupContentPane(shape);
return figure;
}
/**
* Default implementation treats passed figure as content pane.
* Respects layout one may have set for generated figure.
* @param nodeShape instance of generated figure class
* @generated
*/
protected IFigure setupContentPane(IFigure nodeShape) {
return nodeShape; // use nodeShape itself as contentPane
}
/**
* @generated
*/
public IFigure getContentPane() {
if (contentPane != null) {
return contentPane;
}
return super.getContentPane();
}
/**
* @generated
*/
protected void setForegroundColor(Color color) {
if (primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
/**
* @generated
*/
protected void setBackgroundColor(Color color) {
if (primaryShape != null) {
primaryShape.setBackgroundColor(color);
}
}
/**
* @generated
*/
protected void setLineWidth(int width) {
if (primaryShape instanceof Shape) {
((Shape) primaryShape).setLineWidth(width);
}
}
/**
* @generated
*/
protected void setLineType(int style) {
if (primaryShape instanceof Shape) {
((Shape) primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
public class JZSurfaceLCDFigureDescriptor extends JZSurfaceLCDFigure {
/**
* @generated NOT
*/
public JZSurfaceLCDFigureDescriptor() {
super((JZSurfaceLCD) ((Node) getModel()).getElement());
this.setSize(getMapMode().DPtoLP(60), getMapMode().DPtoLP(60));
}
}
}
|
[
"lucas.bigeardel@gmail.com"
] |
lucas.bigeardel@gmail.com
|
3712b2d40cca1d98bc50653b7735a93bd316600e
|
ec720d2be49f451f9c29c02a4639886c757fe45a
|
/src/main/java/com/builtbroken/armory/content/sentry/imp/ISentryHost.java
|
1ccaa6fcb80426e535ac7b967fe46a9d0de437cc
|
[] |
no_license
|
notoriousgtw/Armory
|
4e60db514d55d84241d5e530d67d4ae476ad5784
|
40a2702b68037c64b9a2319f1b1bd496f99f1091
|
refs/heads/master
| 2021-01-22T06:19:23.278815
| 2017-05-24T04:57:56
| 2017-05-24T04:57:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 573
|
java
|
package com.builtbroken.armory.content.sentry.imp;
import com.builtbroken.armory.content.sentry.Sentry;
import com.builtbroken.mc.api.IWorldPosition;
import java.util.UUID;
/**
* Applied to objects that host a sentry gun
*
* @see <a href="https://github.com/BuiltBrokenModding/VoltzEngine/blob/development/license.md">License</a> for what you can and can't do with the code.
* Created by Dark(DarkGuardsman, Robert) on 4/11/2017.
*/
public interface ISentryHost extends IWorldPosition
{
Sentry getSentry();
String getOwnerName();
UUID getOwnerID();
}
|
[
"rseifert.phone@gmail.com"
] |
rseifert.phone@gmail.com
|
14990478f24e117e4e679ccc1bc81ab89bb272ba
|
a0caa255f3dbe524437715adaee2094ac8eff9df
|
/HOLD/sources/defpackage/cjo.java
|
c1289153ecd8217ec38f6ba623a18759ea3079c0
|
[] |
no_license
|
AndroidTVDeveloper/com.google.android.tvlauncher
|
16526208b5b48fd48931b09ed702fe606fe7d694
|
0f959c41bbb5a93e981145f371afdec2b3e207bc
|
refs/heads/master
| 2021-01-26T07:47:23.091351
| 2020-02-26T20:58:19
| 2020-02-26T20:58:19
| 243,363,961
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 694
|
java
|
package defpackage;
import android.database.ContentObserver;
import android.net.Uri;
import android.os.Handler;
import com.google.android.tvlauncher.clock.ClockView;
/* renamed from: cjo reason: default package */
/* compiled from: PG */
public final class cjo extends ContentObserver {
private final /* synthetic */ ClockView a;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public cjo(ClockView clockView, Handler handler) {
super(handler);
this.a = clockView;
}
public final void onChange(boolean z) {
this.a.a();
}
public final void onChange(boolean z, Uri uri) {
this.a.a();
}
}
|
[
"eliminater74@gmail.com"
] |
eliminater74@gmail.com
|
5a0f7277c53a72b968143c527a5569b1b0304057
|
05aaa3f81a95a6e911842f61d45ff2e58bdb6293
|
/src/main/net/wohlfart/terminal/commands/PerformResetPasswords.java
|
434a7d8284a9ca6d925b014e765a6693f41c0c1b
|
[] |
no_license
|
mwohlf/nchar
|
0f682af4b25619d3503716e1d5dbb171ced5cca0
|
e5b8e67b81f38fabd64d7d06345db8fdc7309011
|
refs/heads/master
| 2021-01-20T05:29:01.319685
| 2011-10-29T17:08:02
| 2011-10-29T17:08:02
| 2,651,831
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,314
|
java
|
package net.wohlfart.terminal.commands;
import java.util.List;
import net.wohlfart.authentication.entities.CharmsUser;
import net.wohlfart.authorization.CustomHash;
import net.wohlfart.terminal.IRemoteCommand;
import org.apache.commons.lang.StringUtils;
import org.hibernate.Session;
import org.jboss.seam.Component;
import org.jboss.seam.annotations.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PerformResetPasswords implements IRemoteCommand {
private final static Logger LOGGER = LoggerFactory.getLogger(PerformResetPasswords.class);
private static final String COMMAND_STRING = "reset passwords";
@Override
public boolean canHandle(final String commandLine) {
return StringUtils.startsWith(StringUtils.trim(commandLine), COMMAND_STRING);
}
@SuppressWarnings("unchecked")
@Override
@Transactional
public String doHandle(final String commandLine) {
final Session hibernateSession = (Session) Component.getInstance("hibernateSession", true);
LOGGER.debug("hibernateSession is: {}", hibernateSession);
String passwd = StringUtils.substringAfter(commandLine, COMMAND_STRING);
if (StringUtils.isEmpty(passwd)) {
LOGGER.warn("passwd string is empty");
return "passwd string is empty";
}
passwd = passwd.trim();
if (passwd.length() < 6) {
LOGGER.warn("passwd string is too small");
return "passwd string is empty";
}
LOGGER.warn("passwd string is >{}<", passwd);
hibernateSession.getTransaction().begin();
final List<CharmsUser> list = hibernateSession.createQuery("from " + CharmsUser.class.getName()).list();
for (final CharmsUser user : list) {
user.setPasswd(CustomHash.instance().generateSaltedHash(passwd, user.getName()));
hibernateSession.persist(user);
}
LOGGER.debug("flushing...");
hibernateSession.flush();
LOGGER.debug("committing...");
hibernateSession.getTransaction().commit();
return COMMAND_STRING + " done";
}
@Override
public String getUsage() {
return COMMAND_STRING + " <new password> : reset all passwords (DON'T DO THIS IN PRODUCTION!!!)";
}
}
|
[
"michael@wohlfart.net"
] |
michael@wohlfart.net
|
6383db203c0261e7ada65be081e7b3368ec896bc
|
66e47aa077e208db59743e85a939f1c72612a78a
|
/src/collectionframework/B_ArrayListTest.java
|
91d2728edd8ea50d34e4093f08945b0f54456b33
|
[] |
no_license
|
ldyong911/201809java_high
|
9e669b78be9bbfd4644f7e97e071980507ef6254
|
ba8d8065c2b79ca46cbb0a82004f56e6c51acc15
|
refs/heads/master
| 2022-01-06T06:25:11.932270
| 2019-05-10T08:08:18
| 2019-05-10T08:08:18
| 184,007,092
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,114
|
java
|
package collectionframework;
import java.util.ArrayList;
public class B_ArrayListTest {
public static void main(String[] args) {
// ArrayList๋ ๊ธฐ๋ณธ์ ์ธ ์ฌ์ฉ๋ฒ์ด Vector์ ๊ฐ๋ค.
ArrayList list1 = new ArrayList();
// add()๋ฉ์๋๋ฅผ ์ฌ์ฉํด์ ๋ฐ์ดํฐ๋ฅผ ์ถ๊ฐํ๋ค.
list1.add("aaa");
list1.add("bbb");
list1.add(111);
list1.add('k');
list1.add(true);
list1.add(12.34);
// size() ==> ๋ฐ์ดํฐ ๊ฐ์
System.out.println("size => " + list1.size());
System.out.println("list1 => " + list1);
// get์ผ๋ก ๋ฐ์ดํฐ ๊บผ๋ด์ค๊ธฐ
System.out.println("1๋ฒ์งธ ์๋ฃ : " + list1.get(1));
// ๋ฐ์ดํฐ ๋ผ์ ๋ฃ๊ธฐ๋ ๊ฐ๋ค.
list1.add(0, "zzz");
System.out.println("list1 => " + list1);
// ๋ฐ์ดํฐ ๋ณ๊ฒฝํ๊ธฐ (set๋ฉ์๋)
String temp = (String) list1.set(0, "YYY");
System.out.println("temp => " + temp);
System.out.println("list1 => " + list1);
// ์ญ์ ํ๊ธฐ๋ ๊ฐ๋ค.
list1.remove(0);
System.out.println("์ญ์ ํ : " + list1);
list1.remove("bbb");
System.out.println("bbb ์ญ์ ํ : " + list1);
System.out.println("===========================");
// ์ ๋ค๋ฆญ์ ์ง์ ํ์ฌ ์ ์ธํ ์ ์๋ค.
ArrayList<String> list2 = new ArrayList<String>();
list2.add("AAA");
list2.add("BBB");
list2.add("CCC");
list2.add("DDD");
list2.add("EEE");
for(int i=0; i<list2.size(); i++){
System.out.println(i + " : " + list2.get(i));
}
System.out.println("---------------------------");
for(String s : list2){
System.out.println(s);
}
System.out.println("---------------------------");
// contains(๋น๊ต๊ฐ์ฒด); ==> ๋ฆฌ์คํธ์ '๋น๊ต๊ฐ์ฒด'๊ฐ ์์ผ๋ฉด true
// ๊ทธ๋ ์ง ์์ผ๋ฉด false
System.out.println(list2.contains("DDD")); // true
System.out.println(list2.contains("ZZZ")); // false
// indexOf(๋น๊ต๊ฐ์ฒด); ==> ๋ฆฌ์คํธ์์ '๋น๊ต๊ฐ์ฒด'๋ฅผ ์ฐพ์ '๋น๊ต๊ฐ์ฒด'๊ฐ
// ์๋ index๊ฐ์ ๋ฐํํ๋ค.
// ๋ฆฌ์คํธ์ '๋น๊ต๊ฐ์ฒด'๊ฐ ์์ผ๋ฉด -1์ ๋ฐํํ๋ค.
System.out.println("DDD์ index๊ฐ : " + list2.indexOf("DDD"));
System.out.println("ZZZ์ index๊ฐ : " + list2.indexOf("ZZZ"));
System.out.println("---------------------------");
// toArray() ==> ๋ฆฌ์คํธ ์์ ๋ฐ์ดํฐ๋ค์ ๋ฐฐ์ด๋ก ๋ณํํ์ฌ ๋ฐํํ๋ค.
// ๊ธฐ๋ณธ์ ์ผ๋ก Objectํ ๋ฐฐ์ด๋ก ๋ณํํ๋ค.
Object[] strArr = list2.toArray();
System.out.println("๋ฐฐ์ด์ ๊ฐ์ : " + strArr.length);
// toArray()์์ ์บ์คํ
์ ๋์ง ์๋๋ค.
// String[] strArr2 = (String[]) list2.toArray();
// ๋ฆฌ์คํธ์ ์ ๋ค๋ฆญ ํ์
์ ๋ง๋ ์๋ฃํ์ ๋ฐฐ์ด๋ก ๋ณํํ๋ ๋ฐฉ๋ฒ
// ์ ๋ค๋ฆญํ์
์ 0๊ฐ์ง๋ฆฌ ๋ฐฐ์ด์ ์์ฑํด์ ๋งค๊ฐ๋ณ์๋ก ๋ฃ์ด์ค๋ค.
// ํ์) toArray(new ์ ๋ค๋ฆญํ์
[0])
String[] strArr2 = list2.toArray(new String[0]);
System.out.println("strArr2์ ๊ฐ์ : " + strArr2.length);
for(String ss : strArr2){
System.out.println(ss);
}
for(int i=0; i<strArr2.length; i++){
System.out.println(strArr2[i]);
}
}
}
|
[
"ldyong911@gmail.com"
] |
ldyong911@gmail.com
|
c46a73e6aad6c922246348a839e635ee169cb3ae
|
1c5fd654b46d3fb018032dc11aa17552b64b191c
|
/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/DeleteOperation.java
|
225b6ce6ad0aa0ab8d92bc074b615d1c5feb9961
|
[
"Apache-2.0"
] |
permissive
|
yangfancoming/spring-boot-build
|
6ce9b97b105e401a4016ae4b75964ef93beeb9f1
|
3d4b8cbb8fea3e68617490609a68ded8f034bc67
|
refs/heads/master
| 2023-01-07T11:10:28.181679
| 2021-06-21T11:46:46
| 2021-06-21T11:46:46
| 193,871,877
| 0
| 0
|
Apache-2.0
| 2022-12-27T14:52:46
| 2019-06-26T09:19:40
|
Java
|
UTF-8
|
Java
| false
| false
| 659
|
java
|
package org.springframework.boot.actuate.endpoint.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Identifies a method on an {@link Endpoint} as being a delete operation.
*
* @author Stephane Nicoll
* @author Andy Wilkinson
* @since 2.0.0
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DeleteOperation {
/**
* The media type of the result of the operation.
* @return the media type
*/
String[] produces() default {};
}
|
[
"34465021+jwfl724168@users.noreply.github.com"
] |
34465021+jwfl724168@users.noreply.github.com
|
c835c752a42bcca61d98f5544cbd3ef598ad559e
|
55dca62e858f1a44c2186774339823a301b48dc7
|
/code/my-app/functions/3/getTurnsToReach_Unit.java
|
8bcb05c6abf8a1926a2d0cd9810caa011eaf78bd
|
[] |
no_license
|
jwiszowata/code_reaper
|
4fff256250299225879d1412eb1f70b136d7a174
|
17dde61138cec117047a6ebb412ee1972886f143
|
refs/heads/master
| 2022-12-15T14:46:30.640628
| 2022-02-10T14:02:45
| 2022-02-10T14:02:45
| 84,747,455
| 0
| 0
| null | 2022-12-07T23:48:18
| 2017-03-12T18:26:11
|
Java
|
UTF-8
|
Java
| false
| false
| 163
|
java
|
public int getTurnsToReach(Location start, Location end) {
return getTurnsToReach(start, end, getCarrier(), CostDeciders.avoidSettlementsAndBlockingUnits());
}
|
[
"wiszowata.joanna@gmail.com"
] |
wiszowata.joanna@gmail.com
|
a3273123fdf597f4f34b67d8cee6761003a11c8f
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/com/networknt/cluster/LightClusterTest.java
|
da4f2348438e6f221bfdd1602a2c50cde719b96c
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 1,639
|
java
|
/**
* Copyright (c) 2016 Network New Technologies Inc.
*
* 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.networknt.cluster;
import com.networknt.service.SingletonServiceFactory;
import java.net.URI;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
/**
* Created by stevehu on 2017-01-27.
*/
public class LightClusterTest {
private static Cluster cluster = ((Cluster) (SingletonServiceFactory.getBean(Cluster.class)));
@Test
public void testServiceToUrl() {
String s = LightClusterTest.cluster.serviceToUrl("http", "com.networknt.apib-1.0.0", null, null);
Assert.assertTrue((("http://localhost:7005".equals(s)) || ("http://localhost:7002".equals(s))));
s = LightClusterTest.cluster.serviceToUrl("http", "com.networknt.apib-1.0.0", null, null);
Assert.assertTrue((("http://localhost:7005".equals(s)) || ("http://localhost:7002".equals(s))));
}
@Test
public void testServices() {
List<URI> l = LightClusterTest.cluster.services("http", "com.networknt.apib-1.0.0", null);
Assert.assertEquals(2, l.size());
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
b1f418187ebe44c88387d4b0808349ab8bb98259
|
492ab60eaa5619551af16c79c569bdb704b4d231
|
/src/net/sourceforge/plantuml/creole/CommandCreoleMonospaced.java
|
295c4919949ea7efed43639223d5ee5ade1fe3e7
|
[] |
no_license
|
ddcjackm/plantuml
|
36b89d07401993f6cbb109c955db4ab10a47ac78
|
4638f93975a0af9374cec8200d16e1fa180dafc2
|
refs/heads/master
| 2021-01-12T22:34:56.588483
| 2016-07-25T19:25:28
| 2016-07-25T19:25:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,659
|
java
|
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2017, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* Original Author: Arnaud Roques
*
* Revision $Revision: 11025 $
*
*/
package net.sourceforge.plantuml.creole;
import net.sourceforge.plantuml.command.regex.Matcher2;
import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2;
import net.sourceforge.plantuml.graphic.FontConfiguration;
public class CommandCreoleMonospaced implements Command {
public static final String MONOSPACED = "monospaced";
private final Pattern2 pattern;
private final String monospacedFamily;
public static Command create(String monospacedFamily) {
return new CommandCreoleMonospaced("^(?i)([%g][%g](.*?)[%g][%g])", monospacedFamily);
}
private CommandCreoleMonospaced(String p, String monospacedFamily) {
this.pattern = MyPattern.cmpile(p);
this.monospacedFamily = monospacedFamily;
}
public int matchingSize(String line) {
final Matcher2 m = pattern.matcher(line);
if (m.find() == false) {
return 0;
}
return m.group(1).length();
}
public String executeAndGetRemaining(String line, StripeSimple stripe) {
final Matcher2 m = pattern.matcher(line);
if (m.find() == false) {
throw new IllegalStateException();
}
final FontConfiguration fc1 = stripe.getActualFontConfiguration();
final FontConfiguration fc2 = fc1.changeFamily(monospacedFamily);
stripe.setActualFontConfiguration(fc2);
stripe.analyzeAndAdd(m.group(2));
stripe.setActualFontConfiguration(fc1);
return line.substring(m.group(1).length());
}
}
|
[
"plantuml@gmail.com"
] |
plantuml@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.